libera/commonlisp - IRC Chatlog
Search
13:57:15
mzan
_death: you are right. Nowdays weak reference means usually a garbage collectable reference. Deep and shallow are better terms. In a GUI toolkit, a reference is deep if the slot point to an object owned by a container. It is shallow if it is a link to an external object. So a Document object owns its paragraphs, but it can have links to the author, and to the page format.
13:57:38
mzan
If you clone/copy the document, you deep clone the paragraphs but not the autor or page format descritpion.
13:59:14
mzan
If you model some OOP hiearchy with these annotations, it is easier to reason about what is copy and what is equal. Maybe not in all cases, but in a lot of them. For CL lists, hash-tables and other data structures, the problem remain.
14:04:28
mzan
It is a part <--> owner relationship. The author of a document is not a part of a document, while a paragraph is a part of a document.
14:06:46
_death
possibly a frame representation language can provide more hints about the context, since it can support more relations than is-a/has-a
14:08:52
_death
but ideally a context can be supplied ad hoc, if a general mechanism of copy/equal is assumed
15:43:42
kakuhen
Your multiple threads might be ran on distinct cores, or they won't. It depends what your OS scheduler does
19:05:03
nij-
kakuhen hmmm but there are some languages that do not run on multiple cores, if I understand correctly (e.g. python)
19:08:56
mfiano
That effectively means one OS thread can only be executing something at any given time
19:15:41
mfiano
A lot of Python people tend to just FFI out to C for that sort of heavy lifting, or compute with multiple OS processes with some stdlib API. It's literally been about 20 years since I used Python, and it hasn't changed much since then, relatively speaking.
19:19:38
Fade
when I was still a python programmer, the GIL caused my general interest in message passing architectures.
19:21:56
mfiano
Which is why it would have made more sense, with it adopting the actor paradigm from what I remember.
19:23:17
nij-
"That effectively means one OS thread can only be executing something at any given time"
19:23:18
mfiano
I saw Fare reply to my message in here just the other day, so I know he still comes around.
19:26:29
Bike
most lisps do more compilation than interpretation, so you're not gonna have a grand interpreter lock or whatever it is GIL stands for
19:29:07
mfiano
I don't know how it works, but it sounded like some kind of mutex that prevents only 1 thread from entering the runtime to give results and receive more work, or something like that.
19:30:23
mfiano
It's the subject of a lot of controversy, but the CMUCL Python is a better topic anyway.
19:37:08
mfiano
Oh, by the way, in case it wasn't clear from not being in the other Lisp channels I frequent, as of yesterday, I'm back to making libraries in CL. I cannot consider Julia as a serious language anymore, for it has deceived me after 7 years of research.
19:41:49
Fade
from my memory, the interpreter runs in one system process, and all threading inside that process is scheduled by the python interpreter as 'green' threads.
19:42:06
Fade
this may have changed in the past ten years, because it was a pain point even ten years ago.
19:42:54
mfiano
I want to say that it is too pragmatic, but that sounds wrong. Basically, it took shortcuts, and the memory model of the host leaks in, in very unexpected and surprising ways. The most surprising part though, is only after 7 years of following Julia's evoluation, did I just learn that the core team has generally agreed to follow C++'s memory model. To use Julia effectively, you not only have to
19:42:55
mfiano
know Julia, but how the different passes of the Julia compiler work, the semantics of the C++ memory model, particularly the undefined behavior, and the behavior employed by LLVM, which is surprising even for undefined.
19:45:02
Fade
I'm glad you're back, mfiano. sorry for all the tooling entropy you seem to have been experiencing.
19:46:31
mfiano
That is true. I am disabled and a hobbyist programmer. So I have time to learn new things.
19:47:20
mfiano
It is disappointing, yes, but I do enjoy CL, with its many warts and all, so I am not as disappointed as I am glad to be back.
19:49:59
mfiano
The truth is, I needed new scenery, both on the computer and IRL, due to trying to manage some mental health issues. But that seems to be under control now.
19:51:35
mfiano
Said issues probably resulted in a very bleak image painted of CL in my recent blog article. I apologize for that.
19:54:20
mfiano
Now that I got that situation under control that was really affecting my life and making it hard to think clearly, I actually enjoy programming. I feel like I got a ton of code written for a new CL project today, with 130 tests passing. Something I would have struggled with a couple months to a couple years ago.
19:56:45
mfiano
It's a secret experiment. I don't even know if it will work out as a cohesive whole yet, so I'm not going to talk about it. It's just a bunch of sketches in my notebook and a fragment of code at this point.
20:29:25
nij-
I wonder are there JS code that are hard to be written from parenscript (up to semantic equivalence)?
20:30:01
Josh_2
is it es6 idk but the shorthand for things like promises doesn't exist which is very annoying
20:49:42
varjag
when using SORT on a list, there's no guarantee in the language that it's going to do that by rplacd'ing around the same cons cells, right?
20:58:33
NotThatRPG
Does anyone have a recommendation for a portable CL random number generator? It doesn't have to be brilliant, but I want something that will let me have replicable results across implementations when I supply a seed -- otherwise I need to write different tests for different implementations, which is painful
20:59:46
NotThatRPG
I suppose I could just make a mock RNG for use in testing, but without something like a portable ADVISE that seems strictly harder than finding a portable random library.
21:05:55
NotThatRPG
Thanks! I had used cl-random before, but would prefer something that is maintained.
21:47:03
NotThatRPG
Shinmera: just a thought -- would you entertain a PR that pushed the documentation out into `random-state/documentation` ? The reason I ask is that the documentation introduces a dependency tail that I don't think is necessary just to use the library.