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:58:32 mzan It is used for sure in objective-c. IIRC also in OpenDoc defunct Apple standard.
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:22:26 nij- Do Common Lisp implementations make use of multiple CPUs automatically?
15:23:43 Bike Make use for what
15:26:25 nij- Run threads over multiple cores, instead of just on one core.
15:27:30 Bike modern implementations will do concurrency, yes
15:41:26 mzan _death: sure
15:43:04 kakuhen This is up to the OS scheduler, not the programming language
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:06:55 phoe you understand wrong, python is multithreaded
19:07:39 mfiano Well there is the GIL
19:08:56 mfiano That effectively means one OS thread can only be executing something at any given time
19:12:07 phoe oh, as in that
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:20:05 mfiano I can see that.
19:20:23 mfiano For a moment I thought you were Fare, and would have made even more sense.
19:20:49 Fade low levenshtein distance.
19:20:59 mfiano Yup
19:21:20 Fade I think fare has largely departed the CL world for gerbil.
19:21:40 nij- gerbil?
19:21:50 phoe gerbil scheme
19:21:56 mfiano Which is why it would have made more sense, with it adopting the actor paradigm from what I remember.
19:22:51 Fade it seems to mostly forsake image based systems for a fully AOT compilation model
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:23:26 nij- Yeah, so I wonder what's the case in SBCL, say?
19:23:28 Fade ACTION nods
19:23:32 nij- Is it REAL parallelism?
19:23:36 nij- Or is it a fake one like python's?
19:24:07 Fade sbcl supports system level threads.
19:24:11 mfiano SBCL uses what the kernel provides
19:24:12 Fade as does ccl
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:26:44 mfiano Global
19:28:14 nij- i see
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:38:16 Josh_2 Can you elaborate?
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:43:31 Josh_2 What
19:45:00 mfiano tldr: Julia has C++ pouring out of its seams.
19:45:02 Fade I'm glad you're back, mfiano. sorry for all the tooling entropy you seem to have been experiencing.
19:45:34 mfiano Thank you, but sorry for the what?
19:45:50 Fade switching languages is a big unbounded cost.
19:46:12 Fade switching and then being disappointed is... disappointing.
19:46:31 mfiano That is true. I am disabled and a hobbyist programmer. So I have time to learn new things.
19:47:11 Fade ACTION nods
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:57 nij- nice to have you 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:55:32 nij- mfiano what are you working on now?
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.
19:59:51 lisp123 glad to have you back mfiano
20:00:40 mfiano Thanks lisp123
20:00:52 mfiano Good night!
20:01:10 lisp123 nights
20:28:46 nij- parenscript is a sublanguage embedded in CL
20:28:54 nij- it compiles to Javascript
20:29:25 nij- I wonder are there JS code that are hard to be written from parenscript (up to semantic equivalence)?
20:29:38 Josh_2 Yes
20:29:48 nij- For example :O?
20:29:50 Josh_2 It does not support es6
20:30:01 Josh_2 is it es6 idk but the shorthand for things like promises doesn't exist which is very annoying
20:30:25 Josh_2 The hacky workarounds required are irritating
20:30:47 nij- So "missing keywords"..
20:30:52 nij- other than missing keywords?
20:43:17 Josh_2 Well its only really a sort of wrapper, you can get all the syntax totally wrong
20:44:07 Josh_2 So other than new syntax added in es6? everything works
20:44:15 Josh_2 I have written a large amount of PS
20:45:10 Josh_2 Those missing abstractions are very annoying though
20:46:10 Josh_2 I have some code somewhere
20:47:26 Josh_2 ah yeh
20:48:57 Josh_2 The fact that the async keyword is missing is a massive PITA
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:50:29 jackdaniel right
20:53:40 nij- Josh_2 Thanks for sharing.
20:53:51 nij- Is it hard for you to hack PS to include promise and asyncio?
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:01:16 NotThatRPG Looks like cl-random is morbid, but random-state is alive.
21:02:00 Bike random-state is good
21:05:05 Shinmera NotThatRPG: I can heartily recommend random-state's squirrel-rng.
21:05:17 Shinmera It'll be very fast and it supports going back, too, not just forward.
21:05:55 NotThatRPG Thanks! I had used cl-random before, but would prefer something that is maintained.
21:27:50 Josh_2 nij-: I have not looked at the PS source
21:28:14 Josh_2 for prng I have always just used ironclad
21:45:08 Josh_2 The PS code is pretty crazy, can't say I have any idea whats going on :joy:
21:46:01 nij- why is it crazy?
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.
21:54:22 Shinmera no
21:55:03 Shinmera doc-utils is a dep of everything I publish
21:56:29 Shinmera the dependency is so small it really does not matter.
22:08:03 nij- Josh_2 I think you dont need to go to the source code of parenscript.
22:15:17 Josh_2 I think its possible yes
1:25:32 clone_of_saturn ** NICK saturn2