freenode/#lisp - IRC Chatlog
Search
14:42:38
phoe
Suddenly, I don't write programs in Notepad and compile them with gcc. I can play with C interactively, from the REPL, instantiate structures, poke and peek memory locations.
15:04:20
pjb
dispersed: normal people cannot run C in their minds. They can only imagine they can run it, and they're wrong, wrong and wrong.
15:59:11
nosefouratyou_
phoe: the only way I've read about doing c interactively is http://nullprogram.com/blog/2014/12/23/ and cling
16:30:46
jurov
ACTION had eureka moment: what if running C in one's mind is the cause of its undefined behaviour?
18:01:29
nosefouratyou_
I have the following code https://gist.github.com/nosefouratyou/b7cb0cecab882478cc3c63c6a4374e4c and I have a bug
18:01:58
nosefouratyou_
(format t ":before completed for agent ~a and event ~a~%" a e) runs at the end of update :before, but I get an error before update is called
18:03:04
nosefouratyou_
the error is here https://gist.github.com/nosefouratyou/0327648eb08efb0d3817b050cad41564
18:08:15
beach
nosefouratyou_: Something else seems to be executing between the two. Something that allocates an instance of TRANSITION, passing the wrong initarg.
18:09:00
nosefouratyou_
beach: but how could something run between :before and the main method? I was under the impression it went :update method -> normal method -> :after method
18:10:10
beach
nosefouratyou_: If there are several :BEFORE methods, they all run before the primary method.
18:11:23
nosefouratyou_
beach: I know you are trying to help, and I appreciate that, but I am pretty dumb at cl at the moment. How would I inspect the value of #'update?
18:12:02
beach
You type #'UPDATE in the SLIME REPL and then you click with your right mouse button on the presentation that resulted.
18:18:46
beach
You should see a red presentation that says something like <standard-generic-function UPDATE>
18:19:44
nosefouratyou_
it's in a package, so I am doing (pat::update) and I get an error saying Too few arguments to call <STANDARD-GENERIC-FUNCTION PAT::UDPATE ...>
18:20:58
nosefouratyou_
this is the output https://gist.github.com/nosefouratyou/6a4b670982f3d61e254f4be4359a94ab
18:22:07
nosefouratyou_
this is what I see: https://gist.github.com/nosefouratyou/388d36b84970a56d049938198a8244d1
18:24:09
beach
Well, in your backtrace, a method is called, and it is this one: (#<STANDARD-METHOD PAT::UPDATE (PAT::FSMAGENT PAT::MARKETUPDATE)> #<PAT::TICKBARGENERATOR #x302001617F6D> #<PAT::PRC #x302001643CDD>)
18:24:47
beach
That method is calling SETFSM which calls make-instance, and that's where it goes wrong.
18:28:30
beach
I need to go spend time with my (admittedly small) family. Hope you find it with these additional hints.
18:40:21
beach
And one of the initialization arguments that it passes is invalid. It seems to be passing an object of type TRANSITION to make-instance.
18:53:59
PuercoPop
phoe: the top comment in the /r/lisp post is not saying no to the concept of a guide, but to the ones proposed. "Don't talk unless you can improve the silence". The awesome-foo guides tend to be more focus on aggregation than curation. They even link to ariel-network's style guide that recommends the @ reader-macro!.
18:56:22
PuercoPop
Of the 3, the lisp-lang one seems best but it steps into personal preferences of the author like recommendin one package per file or use of the type slot (or the accessor option being first).
19:21:53
phoe
PuercoPop: this comment effectively says "none of the listed" to my question, "which one should be on top".
19:42:23
PuercoPop
shka: you shouldn't but afaict the convention is initarg->iniform->accesor->type->documentation
19:55:32
nosefouratyou_
I have the following code: https://gist.github.com/nosefouratyou/5b31ef28f8673af3ef55b39c8bea3f9b and when I try to inspect j I get "Unbound variable: J"
20:07:25
nosefouratyou_
sometimes I *can* inspect it, but I really don't know what I am doing so it's hard to recreate
20:17:23
Bike
just having (setf foo ...) with no prior mention of foo is bad. doesn't your compiler warn you?
21:40:46
WhiskyRyan
I am an undergraduate CS student and find common lisp fascinating and am studying it in my free time. My school uses mainly Java, but my instructor encourages completing assignments in lisp for extra credit. While learning common lisp I am finding that most of the texts are fairly old (yet still relevant) and am wondering if it is still used by any major companies or industries? If I wanted to actually work with lisp one day is
21:40:46
WhiskyRyan
common lisp a viable option or are the new languages like Clojure more common/taking over now?
21:44:48
pjb
You could certainly start up a company and decide to use Common Lisp today (this is what I would do).
21:47:36
WhiskyRyan
pjb: Thanks. Is Franz the most common commercial implementation of common lisp? I am mainly using SBCL while learning.
21:48:50
pjb
Not necessarily. Lispworks also has a big marketshare, and there are a few other commercial implementations.
21:52:42
phoe
CLISP is an interpreted (by default) implementation, so the code it produces will be slower.
21:53:38
phoe
But then, it has no compilation overhead, because it's an interpreted (by default) implementation. So exactly what pjb said.
21:54:23
WhiskyRyan
I started with CLISP but found it to be orders of magnitude slower for some example programs in a book I read than SBCL. Is the speed of the compiled code for CCL comparable to SBCL?
21:58:10
phoe
I have a (array (unsigned-byte 8) N). I want to turn it into a foreign array for C usage.
22:05:06
clintm
Xach: In case someone is looking for this same problem and the irc log comes up in their search, the solution is to pass :preserve-uri to drakma:http-request so that it doesn't re-encode params in the url.
0:16:25
nosefouratyou_
why am I getting this error?: https://gist.github.com/nosefouratyou/b9d99a6c18f7557b6c26eda9a7a70ee7
0:34:39
nosefouratyou_
how do you escape a list? I have something like (:asdf 1 :boo 2) and I want :asdf 1 :boo 2