freenode/#lisp - IRC Chatlog
Search
8:43:55
loke
Is there any rational reason to even have structs in CL (other than backwards compatibility?)
8:45:33
jackdaniel
I believe (that would require proper research to claim it though), that new words start with an individual who comes up with new word / construct, then with his closest circle of friends (internet speeds it up) - sometimes despised by others (i.e adults) as not clean language, and then it spreads further - gradually
8:45:36
beach
shka: You (and everyone else) can of course do whatever you want in your own code. The problems arise when unconventional code is submitted to others.
8:46:19
beach
jackdaniel: Pinker did the research. again, I recommend his writing and hist talks related to his book about style.
8:46:24
jackdaniel
sometimes it is that only the next generation uses the new word / construct, but with time it becomes part of the "official" and "agreed" language
8:47:55
jackdaniel
so it is withtout the centralized mechanism, yet it is not: most people find it useful, so they start to use it. It's just more and more people use it until it is acceptable
8:48:40
jackdaniel
if the circle of the individual friend wouldn't spread the new word, it wouldn't exist outside his own dictionary, hence language evolution would be stopped
8:50:11
shka
but at the very least it would be nice to point out one and say "this one does not totally suck"
9:38:33
axion
Well unless you are using use-package or the equivalent, all symbols will be prefixed by the package they are defined in, if it isn't current, and isn't a keyword, as far as I know.
9:41:55
axion
No, but you should most definitely be using it anyway. You could M-. to jump to the definition if you were, but I was giving a general approach
9:42:29
akr[m]
yeah, I tried jump to the definition, but emacs says that no handler could find it or something
9:43:41
axion
Then slime/sly are not installed properly. I would go back to the beginning and start there. Without it, you will be lost. Even seasoned Common Lisp developers rely on it greatly...it is a staple.
9:45:38
akr[m]
when I try to disassemble symbol on it, I get 'The function COMMON-LISP-USER::WITH-ASSOC-VALUES2 is undefined'
9:47:51
axion
That's because I already mentioned it is not a function, and why would you want to view the disassembly of it anyway?
9:48:26
akr[m]
not sure how slime is supposed to handle dependencies, this project doesn't use quicklisp, it just passes the path to dependencies as --asdf-tree to buildapp
9:51:02
axion
If you are new to Common Lisp as you say you are, your first step should be installing and configuring SLIME and Quicklisp. Second step is to read Practical Common Lisp. The only other way leads to the path of frustration
9:51:33
akr[m]
well, I've written a bit in some other lisps, I just find the package ecosystem confusing
9:53:52
akr[m]
I guess I wanna read http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html
9:54:46
axion
That book is very linear in nature. You should read it front to back and do all the practicals.
10:00:21
axion
I think you can decide whether or not you know how to manipulate cons cells well enough to skip one of the most important chapters and practical hands on experience.
10:05:05
axion
Then read that for now, but if you want to learn a language, set some time aside for it :)
12:33:12
clintm
Xach: if you have a free second at some point, I have a question re. amazon and request signing that, from looking at the irc logs, it looks like you have run in to as well.
12:36:18
clintm
Oh, no, your code is fine. It's my code that's throwing errors. I have a signed request url *that works in the scratchpad* but doesn't when I try to fetch it with drakma. I have sys locale set to utf8, content is charset=utf8, but I still get signaturedoesnotmatch errors.
12:37:55
Xach
Hmm, when that happens, I usually have to stare carefully at the "you signed"/"we signed" output
12:38:41
clintm
Ok, so there's not tribal knowledge with drakma and amazon requests that I'm missing then... as usual, the problem is me. hehe.
12:39:36
Xach
87% of the time it ends up being something silly for me, like missing a field or something.
12:41:31
clintm
That's what I thought, until I tested the signed url that I generated in their tool. I'll go get coffee, come back and stare at it, think really hard, and it'll probably come to me. Actually, it'll probably come to me when I stop thinking about it. That's how it usually works.
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?