Search
Thursday, 13th of July 2017, 10:33:10 UTC
11:04:34
phoe
Is there any function that, given a cons and a value, destructively updates that cons in a way similar to PUSH?
11:05:05
phoe
Like - I can write it myself, it's simple, but is there anything like that out in the wild already?
11:07:08
_death
it depends on the place you give to push
11:29:06
phoe
Is (defgeneric foo (bar bar bar)) valid?
11:30:36
TMA
phoe: you mean something like (lambda (cons value) (push (cdr cons) (car cons)) (setf (car cons) value)) ?
11:30:47
phoe
Bike: neither SBCL nor CCL complain about it.
11:31:12
specbot
http://www.lispworks.com/reference/HyperSpec/Body/m_defgen.htm
11:31:41
Bike
the parameter names in the defgeneric are irrelevant except for debugging, so i can imagine it working and an implementation not bothering ot check
11:32:08
phoe
ECL chokes when I try to DEFMETHOD on that generic function
11:35:11
TMA
it looks like it might be a problem -- it shall be an generic-function-lambda-list -- which is a lambda-list -- which does not allow for repeated var names
11:35:33
phoe
sounds like it's time to file some bugs
11:38:41
phoe
jackdaniel: ECL does not complain about such a defgeneric either, ^
11:39:18
Bike
why would you want to do this. don't
11:40:11
phoe
I just found a bug in my few months' old code - it produced code like (defgeneric foo (t t t)) by mistake where it should have produced (defgeneric foo (bar baz quux)).
11:40:16
phoe
and SBCL did not choke on this.
11:41:44
phoe
so the moment someone ran this code on CCL for example, it would blow up.
11:48:02
Bike
well, t is additionally a constant
12:05:31
jackdaniel
generic? which generic
12:06:11
phoe
jackdaniel: (defgeneric foo (bar bar bar))
12:07:52
jackdaniel
please file a bug, though I don't think it's a high-priority issue (if you put t as parameter name you ask for a fail anyway)
12:17:11
schweers
jackdaniel: just out of curiosity: what exactly is the bug here? that such a defgeneric does not signal an error?
12:18:10
phoe
schweers: yes, it should signal an error.
12:18:25
phoe
a) because T is not a valid variable name as it's a constant, b) because there are duplicate parameter names
12:18:55
schweers
k, that’s what I thought, just wanted to be sure :)
12:19:20
phoe
jackdaniel: it's a petty issue, but as I said, it's possible to turn these into real-life compilation bugs
12:19:57
schweers
understandable, I’d like to know too if I ever made such a mistake
12:20:31
schweers
and not like the implementation to silently do the thing I probably meant. Although I think I’d prefer a warning over an error.
12:20:42
schweers
but hey, I don’t want to be nit-picking
12:21:01
phoe
the specification says this is an error though.
13:40:08
|3b|
is it actually forbidden to define a function with T as a parameter? T is a valid variable name (it has to be since it names a constant variable), you just aren't allowed to bind it (since it is a constant and in CL package), but binding doesn't happen until you call the function
13:40:41
|3b|
ACTION isn't arguing that anything that complains should stop complaining (even at full warning level), just curious if i missed something in the spec
13:40:44
schweers
I guess the reason it is illegal is that it is forbidden to redefine names defined in the standard
13:41:06
|3b|
it is forbidden to /bind/ them (and a bunch of other things unrelated to function parameters)
13:41:19
|3b|
but defining a function doesn't bind it
13:41:21
beach
schweers: That's not quite true.
13:41:35
beach
schweers: standard names can be used as lexical variables.
13:41:45
beach
... including function parameters.
13:41:46
specbot
The COMMON-LISP Package: http://www.lispworks.com/reference/HyperSpec/Body/11_aba.htm
13:41:53
schweers
beach: ah, so one is only forbidden from /globally/ defining them?
13:42:13
|3b|
ACTION reads it as no local bindings either
13:42:25
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
13:42:26
Bike
"binding it as a function", etc
13:42:31
beach
schweers: The rules are a bit complicated. You need to look at the page.
13:43:18
Bike
defgeneric doesn't actually establish bindings, and i think it would be reasonable, if very slightly inconvenient, for an implementation to accept (t t t) as a gf lambda list
13:43:20
|3b|
ah, you can locally bind the ones that aren't variables
13:43:52
|3b|
ACTION forgot the 'exceptions' page, that exception doesn't apply to T though
15:10:03
raynold
ahh it's a wonderful day
15:29:09
diegs_
** NICK testingaverylong
15:29:20
testingaverylong
** NICK diegs_
15:41:36
kang0
Flipkart is open source fully?
15:44:29
beach
Do you have reasons to believe it is written in Common Lisp?
15:46:03
kang0
beach can you explain me about org mode
15:46:21
Bike
well, flipkart has a github
15:46:35
beach
kang0: No, I can't. And even if could, it would be off topic.
15:46:37
kang0
Does it mean it's open source? Bike
15:46:52
Bike
at least a dozen languages used, none of which seem to be lisp
15:47:34
Bike
https://github.com/Flipkart/null definitely some oddities
15:47:51
kang0
I wish I can replace my excel
15:47:55
Bike
why would it be more on topic if i explained it?
15:48:03
Bike
there's an #emacs i think, ask them
15:48:37
kang0
Which on topic stuffs you can explain me
15:48:56
kang0
What's some oddoties means?
15:49:19
Bike
"some oddities" as in "i think this is weird"
15:49:39
Bike
because it's nearly empty?
15:49:51
Bike
anyway, it looks like flipkart has dozens and dozens of forks of things which are mostly open source
15:50:22
kang0
https://github.com/Flipkart
17:11:59
nosefouratyou_
does anyone know of a small project I could write tests for? I want to practice using testing in cl.
17:12:48
malice
nosefouratyou_: any tests framework?
17:13:12
nosefouratyou_
I'd be happy to use whichever one someone else prefers
17:13:24
nosefouratyou_
I just want to learn about testing in cl
17:15:56
oleo
http://www.cliki.net/test%20framework
17:16:32
shka
nosefouratyou_: https://github.com/sirherrbatka/cl-data-structures
17:16:50
shka
there are tests, but not really unit tests
17:16:55
malice
Yes, cl-data-structures is one thing that you could test
17:16:59
malice
shka: how about cl-lore?
17:17:24
shka
it needs tests, but right now i'm refactoring it
17:17:26
malice
nosefouratyou_: and if you want to start *really* small, you can add tests to cl-sandbox: https://github.com/MatthewRock/cl-sandbox/
17:17:35
malice
at the end of the test file there's a todo note
17:17:40
oleo
stefil, rt and lisp-unit are the known ones to me actually (i mean not in depth)
17:17:44
shka
besides, there are no docstrings
17:17:53
nosefouratyou_
malice: I am definitely looking for something small to start with, thank you for that suggestion
17:18:11
shka
in cl-data-structure expected behavior is documented
17:23:30
nosefouratyou_
prove looks awesome! I really like the fact that it has colorized output, sort of like npm stuff
17:26:30
nosefouratyou_
is there a way in helm to make backspace delete the word instead of individual characters?
17:26:38
nosefouratyou_
sorry, wrong channel
18:08:52
shka
kang0: programmable gate array
18:08:59
shka
you can put soft chip on it
18:09:15
shka
electronic hardware to be exact
18:09:23
kang0
https://www.gnu.org/philosophy/free-hardware-designs.en.html
18:09:54
shka
well, i can explain their logic
18:10:10
shka
so, as i said FPGA is programmable gate array
18:11:39
edgar-rft
...like this: <https://en.wikipedia.org/wiki/Field-programmable_gate_array>
18:14:36
Bike
kang0: this isn't a general channel. you can get better help for a lot of questions elsewhere.
18:15:00
malice
kang0: is this related to Lisp?
18:15:52
edgar-rft
AFAIK there had been several attempts to implement Lisp Machines in FPGAs
18:16:43
kang0
Where's your memory?and promises? malice
18:16:55
malice
yeah, I could use more RAM
18:35:27
random-nick
is there a common lisp for the JVM?
18:37:52
shka
does anybody knows why the heck armed bear common lisp was called armed bear common lisp?
18:41:39
Bike
it's pretty hard to disarm a bear
18:42:20
shka
bears don't need to be armed
18:42:21
Bike
well, it has a "bear arms" joke
18:43:06
shka
i will just accept ABCL as awesome, albeit crazy, name
18:43:39
jackdaniel
why would I? ask easye
18:43:58
shka
jackdaniel: because you seem to know everything
18:43:59
jackdaniel
at first it was Armed Bear Lisp, as a small Lisp for J editor I think
18:44:13
malice
jackdaniel: I remember that you had some nice image about various implementations and thought that you had some knowledge about them
18:44:13
jackdaniel
old website shows a quote, which indicates it was a pun: " The right of the people to keep and arm bears shall not be infringed! "
18:44:47
jackdaniel
yes, I had a diagram, but I don't know why armed bear, I only suspect that it was the abovementioned pun
18:45:02
jackdaniel
shka: right, that explains it. and yes, I do ;-)
18:45:10
shka
yeah, and we should drop armed bears on parachutes
18:45:31
shka
the most fearsome force ever
18:45:55
jackdaniel
here it is: http://armedbear-j.sourceforge.net/
18:46:11
shka
the only person that knows more is p_l
18:46:38
shka
p_l is so omniscient that if there would be two omniscients, he would be both
18:47:14
p_l
I've met people who know so vastly more than me, especially in lisp community
18:48:17
shka
well, i never met anyone that is more kin on computer history
18:50:31
jackdaniel
to jest stosunkowo nowa rzecz
18:54:43
edgar-rft
maybe armed bear has a friend named legged bear
19:04:06
phoe
edgar-rft: that was a really bad pun
19:04:23
phoe
but I bet legged bear runs on the CLR
19:05:50
p_l
phoe: some commercial lisping has been done on ABCL running through IKVM on .NET
19:06:30
jackdaniel
afaik interepreter run on CLR in one of the forks
19:06:46
jackdaniel
maybe that's what p_l is saying
19:07:19
p_l
jackdaniel: IKVM allowed one to run complete ABCL
19:07:32
phoe
p_l: I know that ABCL ran on IKVM, but I had no idea that it was used for commercial purposes
19:08:42
p_l
I have a... view into certain project at one multinational. With the quality of source, rewriting in Lisp would probably fly unnoticed...
19:10:08
p_l
tl;dr version is that quite often companies don't care what language is used so long as it's on supported platform
19:11:20
phoe
so ABCL is a pretty good choice with all the JBosses around
19:12:59
p_l
and some of the "important LoB apps" is a) dead simple coding b) nobody looks wt it anyway except poor sods in support. So be your own support
19:18:00
p_l
an app that every month provides reports considered crucial in a certain multinational is some of the worst java code that had been decompiled with original source lost
19:18:59
p_l
this is combined with shell script that triggers an oft-failing file transfer tool, which is then processed by MSSQL stored procedures and SSIS packages
19:19:31
p_l
it's no competition to lisp except for size of the bidding company for the contract
19:23:19
emaczen
how do I "refresh" so that asdf can find new systems?
19:25:41
phoe
I use QL:REGISTER-LOCAL-PROJECTS - that's why I ask. It seems to work.
19:26:49
Bike
initialize-source-registry, i th ink
19:27:05
jackdaniel
emaczen: maybe (asdf::clear-configuration) ;?
19:28:07
Bike
or maybe clear-source-configuration
19:28:23
Bike
the manual says it "clears any cache for the search algorithm"
19:28:55
emaczen
What you said first, worked immediately
20:44:11
aeth
Programs that mostly just interact with a database can be written poorly because the real work is done in the database.
21:06:14
p_l
aeth: yet the program part had been a source of user frustrations for ages
21:20:34
edgar-rft
phoe: That was not a pun. It's *always* good to have friends.
21:26:03
phoe
edgar-rft: this isn't C++, friends aren't mandatory to write idiomatic code
21:27:06
edgar-rft
ACTION will implement CL++ to get some friends
21:28:08
phoe
...that's going to be a proof that you can't get some friends without getting enemies along the way
22:10:08
aeth
edgar-rft: I think you mean incf-cl
22:10:14
aeth
a little less catchy than C++
22:22:27
diegs_
** NICK erctestlongnickn
22:22:33
erctestlongnickn
** NICK erctestlongnick
Thursday, 13th of July 2017, 22:33:10 UTC