freenode/lisp - IRC Chatlog
Search
19:00:35
emacsomancer
maybe related to the "can't find file relative to core..." errors, does uiop:run-program expect a full path (for a compiled binary)? [e.g. is (uiop:run-program "bash") ok, or should it be (uiop:run-program "/usr/bin/bash") ? ] - I would have assumed it would just check the relevant $PATH
19:15:13
phoe
wait a second though - could you paste the full error along with the stacktrace anywhere?
19:16:38
emacsomancer
phoe: I'm getting reports from someone else, so this is all I have currently: http://dpaste.com/0PNDSZ8
19:17:27
emacsomancer
(I'm still wondering if asdf:progam-op shouldn't be sufficient - e.g. next browser (which is relatively complex with a number of moving pieces) builds everything with asdf:progam-op)
19:19:54
emacsomancer
when I build and run on my own system, they run find, no matter where I run them from
20:13:31
bobross
phoe: Another update... Successfully managed to load a file with an external Gemini client now :D
20:27:14
_death
hmmm.. define-modify-macro in the clhs takes a parameter named "function" which is a symbol.. but I don't see anything saying it should be the name of a function.. since it shows an equivalency I claim it should work with names of other kinds of operators as well, say (define-modify-macro andf (&rest args) and) .. apparently the message introducing d-f-m ( http://cl-su-ai.lisp.se/msg05411.html ) uses that name and it's just been kept
20:27:15
_death
as-is.. I don't yet understand the define-setf-expander ("define-setf-method") example there btw..
20:30:42
bobross
Will do! I am planning to make the source code available when I feel it's in a good state... Will let you know at that point
20:43:40
Bike
_death: the define-setf-method thing seems to be defining a destructurer. like (let (x y) (setf (cons x y) (list 1 2 3)) (values x y)) => 1, (2 3)
20:48:41
_death
that makes sense.. but what functionality does get-destructuring-backquote-setf-method give (as opposed to get-setf-method/expansion) .. maybe it's more like (setf `(,x ,y) ...) ?
20:51:30
pfdietz
Xach: I will deal with that finalize-inheritance problem in sel within the next couple of days. It's problematic.
20:56:55
_death
Bike: I guess it was still not exposed.. it's a good question whether get-destructuring-backquote-setf-method is actually get-setf-expansion
21:38:35
scymtym
lessandro`: the channel topic has links to multiple websites with logs. one is https://irclog.tymoon.eu/freenode/%23lisp
21:44:22
pve
hi, is something like #\Newlin|e| allowed syntax? (it works on sbcl and gives #\Newline)
21:50:58
phoe
"When the token x is more than one character long, the x must have the syntax of a symbol with no embedded package markers. In this case, the sharpsign backslash notation parses as the character whose name is (string-upcase x)"
21:56:25
phoe
oh right, if I understand correctly, then the \ in #\Newline is re-interpreted as a single escape
3:20:48
minion
beach, memo from pjb: quicksort optimization (branchless Lomuto partitioning): https://blog.reverberate.org/2020/05/29/hoares-rebuttal-bubble-sorts-comeback.html
4:26:13
Decs
Hey all, this week I wrote a small runtime to support the Actor Model of computation. Pastebin if you're interested: https://pastebin.com/piPY0GVX. First time I've tackled a problem like this, all comments are welcome.
4:29:53
beach
And, yes, as no-defun-allowed points out, you would typically use a standard class for a queue, not a closure.
4:30:26
no-defun-allowed
And then it might be more efficient to use a lock and condition variable per queue.
4:30:34
Decs
okay thanks beach. There may be something funky with my emacs as I can never get my loops to indent properly
4:31:13
beach
Apparently, the contribution slime-indentation is now part of the default setup. But if you have an older version, you may have to include it manually.
4:32:31
beach
There are an awful lot of c*r calls in there. That's a sign that you need to use standard classes or structs instead of lists.
4:32:37
no-defun-allowed
I would also represent each actor as an object that holds its own message queue and closure.
4:33:37
beach
At the very least, you should introduce a layer of named abstractions as "aliases" for those c*r calls.
4:34:21
Decs
The use of closures are a symptom of having just learnt of them, its my new superpower!
4:36:34
Decs
I totally agree I need to name some things, so when i come back to this code it's not incomprehensible like you say
4:37:26
no-defun-allowed
You could probably get away with using a package like safe-queue for the queue implementation too.
4:38:22
beach
So I think that sums it up: Use standard classes. Indent properly. Don't quote your CASE keys. Introduce abstractions. Use WHEN and UNLESS for single-branch conditionals.
4:40:28
no-defun-allowed
The trouble with making structures from lists is that you have to infer the shape from wherever that structure is created.
4:41:44
no-defun-allowed
I read "fond, noun: Having a strong liking, inclination, or affection", and you told us all. But to keep this productive, let's say I said fond instead.
4:42:21
no-defun-allowed
noun→adjective. God dammit, I should focus on just my homework and not #lisp and my homework.
4:48:14
Decs
Cheers yeah it's been at the back of my mind that the list destructuring (?) is messy. I'll definitely look into making every thing more explicit
4:55:10
Decs
I had read Carl Hewitt didnt consider actors having their own message queues as fundamental so I decided on a whim that I would take that approach. even though all the implementations Ive seen tack them onto the actors class. Not sure of the pros and cons of either approach.
4:56:39
no-defun-allowed
If you had an implementation where actors had their own threads, and receiving a message blocked the thread, I think it would be a requirement to use separate queues.
4:58:59
no-defun-allowed
You use message handlers to represent actors and a scheduler running on one thread, which does not require that. I have not tested this, but I would also expect that using a message queue per actor (and an appropriate means of scheduling) would improve throughput with many worker threads.
5:06:10
Decs
ahh, yes I tried to make the queue operations as fast as i could to limit blocking between worker threads, but I can see how it may be a problem with more worker threads operating on the queue potentially simultaneously
5:07:49
no-defun-allowed
(Oh, and if you're on SBCL, safe-queue will use SB-CONCURRENCY, which is likely faster as it uses compare-and-swap instead of a lock.)
5:08:31
Decs
with the multi queue approach threads will only block if trying to write to the same actors queue
5:39:05
seok
can you pass multiple values (values a b c ...) to a function which takes same number of arguments?