freenode/#lisp - IRC Chatlog
Search
11:51:17
myrkraverk
jackdaniel: you mean the innards of it? I haven't dared to look at them, myself.
15:14:43
khrbt
myrkraverk: I have been sitting on this for a while. https://github.com/khirbat/linedit.git
17:41:07
stacksmith
Greetings. Need advice: at the end of my function I call a function that returns multiple values. I need to add an extra value at the end. Is there a way of doing that without m-v-b and a new values form?
17:42:50
Bike
i guess you could do (multiple-value-call #'values (call) other-value). but i would rate this as pretty weird
17:46:23
stacksmith
Since all this is happening at the end of the function, I thought there may be some magic way to append more...
19:51:22
fourier
also a question about asdf and quicklisp: if I have a system specified in defsystem-depends-on, and perform ql:quickload of my system, the system defined in defsystem-depends-on by some reason is not downloaded by ql
19:53:25
Bike
is (defstruct foo foos1 (foos2 foos1)) legal? i thought it was but now i think i was mistaken
20:04:00
sjl
> The symbols which name the slots must not be used by the implementation as the names for the lambda variables in the constructor function, since one or more of those symbols might have been proclaimed special or might be defined as the name of a constant variable.
20:05:03
sjl
If you're expecting foos2 to have an initform of foos1, and that that would evaluate to the keyword you passed for foos1, I think that bit of the spec explicitly forbids that
20:08:53
sjl
interestingly, sbcl and ccl DO use the symbols as the parameter names if you specify a BOA constructor
20:16:23
fourier
please recommend some simple documentation generation system from CL sources. I need something what can extract docstrings from functions and generate github markdown document. could write something myself but maybe something exists already
20:20:39
rme
I'm not trying to tell you what to do, but one option would be to write actual documentation, rather than fiddling around trying to generate it from docstrings and introspection.
20:21:22
Bike
the page on defstruct says the initforms are to be evaluated in the lxeical environment of the defstruct, which pretty much forbids that
20:21:51
sjl
Bike: yeah, I don't think that can work for the keyword constructors because they're supposed to use other symbols as the lambda arguments
20:26:46
sjl
> If no default value is supplied for an aux variable variable, the consequences are undefined if an attempt is later made to read the corresponding slot's value before a value is explicitly assigned. If such a slot has a :type option specified, this suppressed initialization does not imply a type mismatch situation; the declared type is only required to apply when the slot is finally assigned.
20:35:43
Bike
new question. if the clhs defines a function can an implementation have it be a generic function instead?
21:04:10
k-stz
hey, I try to parse a formula like !A and generate ==> (not A). I'm stuck on how to approach this, do I use READ-CHAR or just convert it to a string? Problem arose when trying to parse formulas like: !(a -> b)
21:23:50
stacksmith
k-stz: suggestion: make sure you understand Lisp pretty well before attempting to implement a compiler for another language. Otherwise you will be in a world of pain. You must pay special attention to the CL reader and its limitations, symbols and packages (in terms of how your syntax maps to CL)...
21:26:17
stacksmith
Another suggestion: unless you really need a different syntax, stick with Lisp and save yourself a lot of trouble.
21:32:24
k-stz
stacksmith: thanks, I wanted to try a simple parser in lisp because I never tried it and hope to learn something. That felt like a good starting point
21:37:23
stacksmith
k-stz: I do not mean to discourage, but I speak from personal experience of trying to do something similar when I started with Lisp. It seemed like an easy enough task, but led to a serious smack-in-the-face realization of just how pathetically ignorant I was at the time. It was a great experience but your appreciation of such things may be different.
21:43:52
k-stz
stacksmith: I think I see your point, this already isn't as easy as a thought. No damage done, though. Seeing the first few problems makes me attentive to solutions, and I just might know where to look next
21:46:51
stacksmith
k-stz: Another observation is that you can do it in a Lispy way, by using the Lisp reader, macros, etc. or by parsing text, the way you'd probably do it in C or whatnot. You will learn entirely different things. Lisp is great for writing DSLs, but it is not a task for a novice.
21:51:05
stacksmith
k-stz: Read 'On Lisp' - it is full of useful information about doing things like that, including an entire Prolog implementation in a few pages of code, and information about reader macros and regular macros.
22:01:18
k-stz
stacksmith: I have this book on my radar, I should also encounter this topic again in SICP soon. Thanks again o/
22:05:13
k-stz
I found what I read about Erik Naggum enjoyable as well, I'd say because he can articulate his opinions well and he touches on many things. It doesn't appear shallow
22:06:04
Shinmera
While his writings are very insightful, they definitely often are inflammatory as well though.
22:09:35
stacksmith
I learned a tremendous amount when I started out - by reading Naggum transcripts. It was never boring, although somewhat painful on occasions.
22:11:36
dim
https://tapoueh.org/blog/2018/03/object-relational-database-management-system/ if you're interested, comparing PostgreSQL type system / function overloading with CLOS generic functions