Search
Monday, 8th of April 2019, 15:22:37 UTC
15:27:58
pjb
(read-from-string "(let ((a '#1=(10 . #1#))) (nth 42 a))") #| --> (let ((a '#1=(10 . #1#))) (nth 42 a)) ; 37 |#
15:28:20
pjb
fivo_: REPL = read eval PRINT loop.
15:32:27
Bike
i think beach pretty much covered it
15:49:13
refpga
Hi, in case of let, are the forms evaluated sequentially like progn?
15:49:20
refpga
(let ((var1 init-form-1)
15:50:07
specbot
http://www.lispworks.com/reference/HyperSpec/Body/s_let_l.htm
15:51:06
beach
refpga: Please don't do that again. Use a pastebin service.
15:51:06
sjl_
also, if you're pasting more than 2-3 lines at once, it's generally better to use a pastebin. freenode rate limits so after the first couple of lines they start to slowly trickle in one-by-one
15:51:33
shka_
refpga: it's ok, just don't do it :)
15:51:48
beach
refpga: The forms are evaluated left-to-right, but the variables are bound "in parallel" for LET.
15:52:12
beach
refpga: So VAR1 is not visible in INIT-FORM-2.
15:57:15
pfdietz
LET* does the binding interleaved with the evaluation, so VAR1 would be visible in FORM2, etc.
15:58:45
shka_
refpga: btw, if you are feeling stressed, inadequate or otherwise uncomfortable at #lisp there is also channel #clshool
15:59:07
shka_
you are welcome here, obviously, but just so you know :-)
16:16:01
fivo_
When I evaluate (read-from-string "(toto:funcall #'(lambda (x) x) 1)")
16:16:17
fivo_
I get TOTO doesn't exist with line and column information
16:16:25
fivo_
Is this implementation dependent?
16:17:05
nwoob
which laptop do you guys use
16:17:33
fivo_
I am essentially looking for some read function that would return source-line and column
16:17:34
Bike
fivo_: the line and column info is implementation dependent, if that's what you're asking
16:17:51
fivo_
Is there somehting along the lines of
16:17:57
Bike
https://github.com/robert-strandh/Eclector is a reader library that you can get source info from
16:18:04
fivo_
(source-line (car (read-from-string "(toto:funcall #'(lambda (x) x) 1)")))
16:18:17
fivo_
sorry without TOTO in this case
16:18:28
Bike
What would that return? The line FUNCALL is defined on?
16:18:41
Bike
in the implementation source
16:19:25
fivo_
but the link you send looks promising
16:20:00
Bike
so like (source-line 'funcall)? that's not in the standard (which doesn't mandate implementations be open source, even) but common tools support similar functionality.
16:22:18
fivo_
I mean the read function would also need to be different.
16:24:44
fivo_
Essentially I wanted to know if there is something similar to READ that parses some expression but gives me also other types of information like source-line, column, original package of the symbol.
16:25:09
beach
fivo_: Eclector does that.
16:25:28
Bike
i think you might have an erroneous concept of what a symbol is.
16:25:56
Bike
if you use the eclector reader, it will give you an object with information about the source positions of _the stuff you read_.
16:26:07
Bike
which doesn't include the implementation's definitions of functions like funcall.
16:26:14
fivo_
I get it it's not a symbol at that point
16:27:36
Bike
well, you can try eclector and see. you can get information about the position of the funcall symbol in the code you read, but it won't tell you where the funcall function is defined.
16:31:02
pjb
nwoob: why do you assume we're using a laptop?
16:31:10
pjb
I'm punching my irc message on a 029…
16:31:26
pjb
https://www.youtube.com/watch?v=YnnGbcM-H8c
16:33:21
pjb
fivo_: (read-from-string "(toto:funcall #'(lambda (x) x) 1)") #| ERROR: There is no package named "TOTO" . |#
16:38:01
beach
fivo_: I think Bike is on to what you are trying to do. And I think you are confused.
16:40:14
fivo_
I essentially messed up when I said yes to "The line FUNCALL is defined on"
16:40:44
fivo_
It should rather be the "line funcall is called".
16:41:02
beach
fivo_: What do you mean by "original package of the symbol"?
16:41:34
refpga
shka_: That channel (#clshool) is empty.
16:42:17
Bike
fivo_: in that case eclector would be helpful. though in this particular case, where you're reading from a string instead of a file, there's not a lot of source info to be had
16:43:04
Bike
it'll tell you the position in the string, at least
16:43:37
fivo_
Bike: yes that was just for illustration.
19:44:34
shka_
refpga: sorry for the typo, beach is correct
19:45:39
shka_
i can't do anything right today
20:01:45
p_l
anyone knows if LW 7.1 will get a personal edition?
20:02:26
_death
shka: go solve a maze :)
21:18:18
quipa
hello, new to common lisp, using sbcl on linux mint, I installed the cl-quicklisp package but it doesn't seem to be accessible in sbcl
21:18:45
quipa
Any ideas what I should configure? Or should I just uninstall that package and follow the procedure in the website
21:20:01
quipa
Hum in synaptic I notice the package installed /usr/share/cl-quicklisp/quicklisp.lisp
21:21:12
quipa
running that seems to work
21:21:25
quipa
wonder why the package install doesn't do that automatically
21:22:37
p_l
quipa: ... let's just say that debian packaging isn't exactly good?
21:23:35
quipa
what packaging is xD, still haven't come by a good cross-platform language agnostic package manager
21:23:54
p_l
well, language agnostic in this case doesn't necessarily works
21:23:55
quipa
still usually try to use the default package manager if I can
21:24:07
p_l
I normally do manual install of quicklisp, recently been testing roswell
21:24:34
quipa
running the script from the install package seems to work
21:25:02
quipa
the only thing I am wondering now is if the other packages that get installed by the system package manager will be easy to use
21:26:16
quipa
when it comes to package managers I love this essay http://michael.orlitzky.com/articles/motherfuckers_need_package_management.xhtml
21:31:12
quipa
https://lispcookbook.github.io/cl-cookbook/getting-started.html
21:31:40
quipa
this suggests the procedure for debian based systems
21:32:36
asarch
How do you invert the elements of a list: '(eins zwei drei) => '(drei zwei eins)?
21:34:06
p_l
asarch: have you tried (reverse ...) ?
21:41:20
asarch
Thank you very much p_l! :-)
22:04:56
quipa
nydel: good night over here :)
0:56:15
Lord_of_Life_
** NICK Lord_of_Life
Tuesday, 9th of April 2019, 3:22:37 UTC