freenode/#lisp - IRC Chatlog
Search
17:21:43
johnnybanana
So this is what I have (defmacro macro-call (&rest form) `(mapcar #'(format t "~&~S => ~S~%" ',form ,form) ,@form))
17:25:21
Bike
I already gave you an example of what your expansion could look like, try aiming for that
17:30:00
_rumbler31
at runtime he wants to emit "=>" so the inner body will look like (write-string " => ; ") (form1) ...
17:45:56
phoe
Because I just realized that I'm about to reinvent wget with my custom code, and that doesn't sound good.
18:19:45
Bike
otherwise it would be kind of tricky to account for different calls returning different values and stuff.
18:22:01
phoe
Bike: wouldn't be too tricky. the multiple-value-mapcar would keep an internal counter of how many values were at most returned; every time this counter is bumped up, new dummy list(s) filled with NILs are returned.
18:30:58
skrtskrt
I am currently working on a macro where it takes a list of variables and a body of code, and ensures that the variables revert to their original values after the body of code is evaluated
18:32:02
phoe
do you mean that you store their values somewhere before the body of code, execute the code, and then set the variables to these stored values?
18:43:05
phoe
since I just realized that a MULTIPLE-VALUE-MAP{CAR,CAN,LIST,CON} would be really handy.
18:46:35
Bike
(let ((hash (make-hash-table))) (setf (gethash 'fuck hash) t (gethash 'shit hash) nil) (multiple-value-mapcar (rcurry #'gethash hash) '(fuck shit stack)) => (T NIL NIL), (T T NIL)
19:01:16
phoe
we need a minimum length of all argument lists but maximum length of all multiple-value-lists
19:02:32
_death
better to just work on lists instead of pretending that you're dealing with multiple values..
19:04:05
Bike
for the argument lists you can do (loop for l = lists then (mapcar #'cdr l) until (some #'endp l) collecting (multiple-value-list (apply function (mapcar #'first l))))
19:04:32
_death
phoe: then use multiple-value-list to get a list of the values and work on this list
19:05:18
phoe
hm, for me this means destructuring-bind + multiple-value-list + some means of collecting the results.
19:24:03
phoe
Bike: I allowed myself to blog it at https://blog.teknik.io/phoe/p/1604 - I hope you have nothing against it.
21:12:22
shka
well, to be fair even gnu cat get's updates so perhaps there is no such thing as perfect application
21:12:53
KZiemian
shka: even if there suboptimal is better that put this project longer in the state of coma
21:46:36
Younder
try one of the noisy groups like Haskell, they should be right up your alley. You are a Haskell programmer you just don't know it yet
0:54:37
Elronnd
I'm trying a to learn webdev with lisp. I looked at a few frameworks, and what I found were clack and ningle, which seemed nice and simple. But I have problems with both of them
0:55:02
Elronnd
with ningle, with this simple script, http://sprunge.us/aYTF, when I run it it says it worked and it's listening. But it's definitely not listening
0:55:37
Elronnd
with clack, there's a minimal example that says to pass it a lambda taking an env. But it doesn't tell you what things are in the 'env', so how tf do you get at the env?
1:00:01
resttime
For me: https://files.catbox.moe/6hfblv.png , maybe it's because you're running the file as a script?
1:12:45
jasom
Elronnd: If you have the time to get it setup, I strongly recommend emacs+slime+evil (evil is a vim compatibility package for emacs).
1:13:25
jasom
Elronnd: it's not urgent since slimv+vim "does the job" as you say, but slime is definitely less "meh" and more "wow"
1:16:12
resttime
The Paredit package would be a nice addition to check out as well if you're not too overwhelmed with new stuff. It helps with manipulating/balancing parenthesis.
1:18:18
resttime
I'd say learn how to configure the emacs to manage packages, get the recommended ones, and then dive in.
1:33:09
pierpa
when you launch emacs it display some useful informations, including pointers to tutorials
4:24:48
ebrasca
open-network-stream: make client process failed: Connection refused, :name, sly-1, :buffer, nil, :host, 127.0.0.1, :service, 4005, :nowait, nil
4:45:08
ebrasca
I have read http://joaotavora.github.io/sly/#Connecting-to-a-remote-Lisp but I can't make sly to connect.
5:02:32
jasom
Elronnd: https://jasom.github.io/clack-tutorial/pages/getting-started-with-clack/ please tell me any questions about clack not answered there so I can improve it (it's still a draft)
5:03:16
jasom
Elronnd: and it includes a link to the official docs for what env is: http://quickdocs.org/lack/#the-environment