freenode/#lisp - IRC Chatlog
Search
9:20:44
JohnMS_WORK
Does anyone know of an example code for passing a C++ class object to the embeded common lisp library?
11:10:16
samlamamma
Opinions on if and maybe how we should get multiple packages of the same name and perhaps nested:packages:in:lisp?
11:45:11
heisig
samlamamma: There was a paper discussing this topic on this year's ELS, called 'Symbols as Namespaces in Common Lisp'
11:46:11
samlamamma
lieven: I saw that the ABCL devs had a thing about that, I couldn't find it in the docs though
11:47:33
samlamamma
heisig: It works well because we're forced to make it work. Having versioned packages would let system maintainers keep older dependencies without updating to the bleeding edge. I'll look up the paper
11:47:46
heisig
samlamamma: The paper is in the conference proceedings: https://european-lisp-symposium.org/static/proceedings/2019.pdf
11:50:51
samlamamma
LdBeth: Assume A and B both depend on system C (and defining packages A, B and C respectively). C updates with some incompatible change, B wants to update and A wants to stay. I use both A and B, how do I load both A and B in my Lisp image?
11:54:32
samlamamma
I know, that's my point. We're forced into a certain culture because of the limitations of CL.
12:21:30
beach
samlamamma: first-class global environments these problems, but they are obviously not standard, and no implementation uses them (yet).
12:23:26
beach
samlamamma: Oh, and if you want more information about SICL and Cleavir, we hang out in #sicl.
12:24:21
samlamamma
beach: I don't listen to it much anymore, but yes that's where my uname is from :-). I'm idling in #sicl as we speak!
17:06:20
Josh_2
What would be the lispy way to solve this problem, print out numbers 1 - 10 in a random order
17:06:38
Josh_2
I have a solution but I don't think It's very good. I am just curious this is not for anything serious
17:09:16
aeth
What I would do not knowing the correct algorithm for shuffling or anything like that would be to make an adjustable vector with the contents #(0 1 2 3 4 5 6 7 8 9 10) and swap the number I'm removing with the last item and then vector-pop
17:11:21
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=0b13392c will be valid until 17:15 UTC.
17:15:49
aeth
dlowe: Yeah, but you can just use the vector length as what you call random with so it's not a complete waste to do it as actually adjustable
18:08:50
dlowe
I mention that because I didn't actually know it wasn't a good shuffle for a long time
18:11:07
pjb
White_Flame: sort doesn't guarantee much on the order of elements if you don't give it an order function. You will have "elements [will be] scrambled in some unpredictable way". Which doesn't mean it will be a random shuffle.
18:11:45
White_Flame
pjb: while it may just look like a spurious trailing comment, I did put a smiley at the end for a reason
18:17:07
ck_
also, Fisher-Yates is the same thing as the Knuth shuffle, right? I wonder how many months between the implementations
18:22:56
aeth
Here's "my" algorithm with the efficiency adjustment dlowe (Knuth?) gave of not even having to pop an adjustable, and just working on the index directly
18:24:01
aeth
I think that's correct... technically 16-bit Lisps might not like me using fixnum instead of alexandria:array-index, but you probably won't notice this on a modern 64-bit Lisp, and either way, you'd just get an out of bounds error if I'm wrong.
18:25:39
aeth
dlowe: This is specifically for integers starting with 1, and it will have to be a fixnum because it will also have to double as an array index
18:30:04
aeth
Bike: it's shuffling the numbers 1 to 10 (or 1 to n in my generalization) so it's a more specific problem. In this case, the elements can't be any larger than array-dimension-limit which must be a positive fixnum or the algorithm won't work
18:33:13
aeth
Bike: since the problem was specifically for numbers from 1 to n, the elements are necessarily of the type `(integer 1 ,array-dimension-limit) which is necessarily a subset of fixnum. I should probably check-type for the more specific type, though
18:34:28
aeth
Bike: I meant to say that the type doubles as an array index, but that's not true, either, since it's actually shifted up by 1
20:14:31
iarebatm`
How would you guys go about implementing a 'throttle'? ex, I want to use dexador to issue http requests against a web service, but that service has a maximum requests/per-second that I'm allowed to use.
20:17:40
dlowe
You might consider something more sophisticated, like retrying with exponential backoff
20:57:32
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=71ee1b95 will be valid until 21:00 UTC.