morganw has quit [Remote host closed the connection]
nij- has quit [Ping timeout: 260 seconds]
causal has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
tyson2` has quit [Remote host closed the connection]
akoana has quit [Quit: leaving]
tyson2 has joined #commonlisp
thuna` has quit [Remote host closed the connection]
dra has quit [Quit: Leaving]
<dbotton>
what is the difference between declaim and proclaim?
phantomics has joined #commonlisp
<Bike>
declaim has compile time side effects and doesn't evaluate its arguments
<dbotton>
thanks
eddof13 has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
eddof13 has quit [Client Quit]
<shunter>
Toplevel proclaims establishes declarations in the global environment. It's unspecified whether toplevel declaims have any effect after the file it lives in is compiled.
tetsuo9_ has left #commonlisp [#commonlisp]
pjb has quit [Ping timeout: 264 seconds]
jeffrey has quit [Quit: Client quit]
waleee has quit [Quit: WeeChat 3.7.1]
Oladon has quit [Quit: Leaving.]
waleee has joined #commonlisp
pdietz has joined #commonlisp
waleee has quit [Quit: WeeChat 3.7.1]
waleee has joined #commonlisp
pfd has quit [Ping timeout: 260 seconds]
jello_pudding has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 252 seconds]
jeosol has joined #commonlisp
Fare has joined #commonlisp
attila_lendvai has quit [Ping timeout: 264 seconds]
<mfiano>
Hello all. I have a couple ideas, but I'm looking for different opinions on how one might, if it was so required, to go about preventing the instantiation of a class, if that class is prohibitively intended to be used only as a super class, for some particular domain. Bonus points if you can argue why it is a good way to go about it.
<mfiano>
phoe: Yes, I meant, like kicking around the parens and stuff instead of moving to Java or something non-programming :)
pdietz has quit [Ping timeout: 260 seconds]
<dbotton>
mfiano: just add a slot or use an existing slot with a uniform the signals an error is simplest way.
<mfiano>
dbotton: Then every subclass would be required to override that slot, which is an implementation detail. I don't like that at all.
<dbotton>
Than create your own factory to make instances
<dbotton>
A good practice anyways
<dbotton>
You can identify the type there and signal if they try and create your abstract class
<beach>
Look at DEFINE-PROTOCOL-CLASS in McCLIM.
<mfiano>
I think you are making an assumption that is not true. The un-instantiatable classes are mixin classes that can be provided to a variety of different objects, some whose constructors I don't control. Using stealth-mixin or dynamic-mixins, one can alter the super class list.
waleee has quit [Ping timeout: 256 seconds]
<mfiano>
beach: Thanks, will do.
tyson2 has quit [Remote host closed the connection]
<mfiano>
Oh I like that approach a lot.
<mfiano>
beach: I think there is actually an error in that method causing it not to do what is intended.
<mfiano>
Ignore that. It seems the state of my image was at fault.
nij- has joined #commonlisp
<mfiano>
That method seems to have a strange effect I cannot explain.
<mfiano>
If I restart my image, define that macro, a protocol class using it, and a class that inherits from the protocol class, when attempting to instantiate the subclass, I get the error, but if I select the RETRY restart in the debugger, it works, and on all subsequent attempts without the debugger. I wonder if beach or jackdaniel could explain that one.
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life has joined #commonlisp
son0p has quit [Ping timeout: 256 seconds]
azimut has quit [Ping timeout: 255 seconds]
<beach>
I suggest you ask gilberth. I believe he designed it.
<scymtym>
i think i added the trick for preventing instantiation. i have to go now but can check the logs later
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<mfiano>
I got it to work now. I was slightly modifying it for my purpose, and in doing so, I didn't realize that the initform was meaningless, and was just the quoted error form.
<beach>
"meaningless"?
<mfiano>
As in it was unevaluated, and just there for display purposes or something when viewing the object in the inspector. An initform of nil, with an initfunction of the error is all it takes for it to work for me.
<mfiano>
code is doing `:initform '#1=(error ...) :initfunction (lambda () #1#)` which is quoting the first but not the second. I missed that subtle detail. The value of the initform does not matter much, as this slot is not inherited due to the EQL specializer on `compute-slots`, and it is not even evaluated yet before the initfunction error. At least that's what I gather by reading about it. Please
<mfiano>
correct me if I am wrong.
<dirtcastle>
Josh_2: thanks for the suggestion. I wonder which is the best language and book to learn OOPS. Lisp is not known for OOPS right...
<beach>
dirtcastle: CLOS is probably the best object system around.
<dirtcastle>
I heard that too
<beach>
dirtcastle: The book by Sonja Keene is probably the only one exclusively dedicated to CLOS, but PCL has a lot about it too. Modern Common Lisp code uses CLOS a lot.
<mfiano>
and what makes it nice, is that it is fully extensible. The MOP is the CLOS as macros are to syntax.
<mfiano>
is to*
<dirtcastle>
what is MOP
Brucio-61 has quit [Ping timeout: 260 seconds]
<dirtcastle>
which is the best book to learn OOPS then
<beach>
dirtcastle: Start with PCL, I think.
<mfiano>
A protocol specifying how to define, and by extension, extend CLOS
<beach>
dirtcastle: MetaObject Protocol.
<dirtcastle>
oh ok
scymtym has quit [Ping timeout: 260 seconds]
<dirtcastle>
I'm currently reading PCL.
<beach>
Then you should be fine.
<mfiano>
That is a good overview of the language and focuses on a lot of CLOS features.
<edgar-rft>
dirtcastle: the best book I read for learning CLOS is Sonya Keene's "Object-Oriented Programming in COMMON LISP: A Programmer's Guide to CLOS"
<beach>
dirtcastle: Who told you that "Lisp is not known for OOPS right..."?
<dirtcastle>
edgar-rft: _beach mentioned the same book :D
<beach>
dirtcastle: I mean, Common Lisp is not very much known at all. Period.
<hayley>
Conventional "wisdom" is that Lisp is a functional language, no?
<beach>
*sigh*
<mfiano>
Ugh
<dirtcastle>
I read originally it was known for using both procedural,functional style.
<hayley>
Ouch.
<beach>
dirtcastle: Common Lisp? Really? Where did you read that?
<dirtcastle>
not specifically common lisp.
<dirtcastle>
just lisp in general
<dirtcastle>
in the olden days
<dirtcastle>
decades ago
<beach>
dirtcastle: But Common Lisp has much more than most its predecessors. Including CLOS.
* beach
now fears he is going to be given a list of predecessors with object systems in them,.
* hayley
hopes the scare quotes suggests that she does not agree much with the "wisdom".
<dirtcastle>
yes. I heard common lisp has the ability to adapt to any new paradigm that comes around. And the comment I read said " common lisp has the best object system and that's ironic".
<hayley>
I told off a lecturer at my old university for making that statement. And the instructor for operating systems class had said similar for Elisp.
<beach>
hayley: I apologize on behalf of my (previous) "colleagues".
<mfiano>
beach: "lisp in general" also includes predecessor sibling branches developed independently of CL, some of which have CLOS-like or otherwise modern object systems.
<hayley>
Wouldn't state _any_ new paradigm, c.f. Felleisen's "On the expressive power of programming languages". There are some interesting things you cannot do with macros/local rewrites only.
<beach>
dirtcastle: It doesn't make much sense to "learn CLOS" in itself. CLOS is part of the Common Lisp language, and you use it together with the other features.
<dirtcastle>
lisp is known for using procedural & functional style, recursion and macros. and lambda functions?
<hayley>
I'd go easy on recursion, as only the Scheme standard mandates tail-call elimination.
<beach>
mfiano: You just confirmed my fear.
<dirtcastle>
common lisp doesn't have tail-call elimination?
<hayley>
It doesn't.
<beach>
Not in the standard.
<dirtcastle>
I expected it to have
<mfiano>
No, but you can guarantee it with macros, portably.
* beach
can't figure out why there is this desire to teach him about Lisp, compiler design, programming-language implementation, etc., when he is attempting to use his pedagogical skills to inform newbies.
igemnace has joined #commonlisp
<dirtcastle>
I just read abt languages in reddit and hackernews and stuff. for the past couple weeks I've been visiting 4chan's /g/ board extensively.
<beach>
mfiano: Are you part of a conspiracy to get me to shut up and not help newbies here?
<mfiano>
No, I'm just stating facts, not directed at you, except the last one. If this bothers you, I apologize. Maybe public forums are not your preferred venue?
<beach>
mfiano: The one that started with "beach: "lisp in general" also includes..." was not directed to me?
<hayley>
I don't think any of the three are great for discussing programming languages.
<beach>
mfiano: Yes, you may be right. I conclude that I should try to shut up. But that would be sad because some newbies think my remarks are helpful.
<mfiano>
That was "the last one". What do you not like about that fact? I was not speaking of CL predessors, but Lisp predessors that have evolved independently of CL that cannot be ignored with "lisp in general"
<mfiano>
Now if only I could spell when typing fast.
<beach>
mfiano: Like i said, I don't like to be lectured on things I know, when I am making pedagogical simplifications to newbies.
<beach>
I even included "most" in my simplification, to try to avoid being lectured to.
* beach
failed miserably.
<mfiano>
Tutoring is best done in a more controlled environment. If you don't like comments in a forum of hundreds, then I'm sorry for you.
<beach>
Got it.
_cymew_ has joined #commonlisp
<hayley>
I think people not familiar with Lisp consider members of the Lisp family as more homogenous than the members are. So it is plausible for people to derive misconceptions about Common Lisp from other languages. But maybe I should shut up too.
<hayley>
s/than the members are/than the members are in reality/
varjag has joined #commonlisp
<mariari>
From Oleg "My overall impression from ILC02 was that Lisp and Scheme, despite the common syntax, are different languages and communities. I think Python is closer to Haskell than Lisp is to Scheme. Common Lisp (CL) seems to me like a Smalltalk with round parentheses. Scheme community is more diverse, valuing the functional approach. In contrast, CL community seems more pragmatic and more ad
<mariari>
hoc. The CL code I saw was object-oriented, stateful, and Smalltalk-like."
Fare has quit [Ping timeout: 256 seconds]
<frodef>
To me the essence of CL is the principled approach to dynamic scope. Which is (or should be) extremely important for good programs.
rgherdt has joined #commonlisp
<beach>
frodef: You mean as in special variables, the condition system, etc.?
<_cymew_>
Not to make fun of ayone, but for me the essence of CL is people obsessed with scope in all shapes and forms.
<frodef>
beach: yes.
<frodef>
also one of the best use for macros is to enable readable dynamic context constructs. WITH-foo that makes precise boundaries with precise semantics.
<frodef>
_cymew_: that's a substantial aspect of programming, isn't it.
<_cymew_>
I'm a spectator in quite a few programming language communities online, and some talk about what they are doing and their projects. Others mainly talk aout how to implement compilers, and some talk about scope more than anything.
<_cymew_>
It is a bit exaggerated for effect, but the differences are quite stark.,
<_cymew_>
I became tired of the compiler people, but that's just me.
<_cymew_>
To emphasize my experience. I once had a guy notice the lisp sticker on my laptop, and he approached me and started asking my opinion on lazy evalation and scope...
<_cymew_>
I found that funny.
<mfiano>
Regarding preventing instantiation: the previously discussed MOP method is very nice, however, is there any solution, or can this be adapted, such that these "protocol classes" can be instantiated internally? For example, there may be a constructor function whose symbol is exported, and also the class-name symbol is also exported, but the intent is for the user to never use `make-instance`
<mfiano>
directly on the exported class name, as that could cause disastrous consequences. But, internally, the supplier may need to instantiate it for it's own purposes.
<frodef>
I'm writing some software to juggle around data from "web applications". It's information that should be in the kilobytes, but through the magic of XML and combinatorial explosion, it's easily becomes hundreds of megabytes. It's incredible to behold.
<frodef>
..and the web-apps themselves somehow put a hefty load on a modern desktop machine, occasionally just bogging down under intense memory and CPU overutilization.
<frodef>
..not to mention the network bandwidth wastage. Sigh.
Fare has joined #commonlisp
shka has joined #commonlisp
lisp123 has joined #commonlisp
Cymew has joined #commonlisp
epony has quit [Remote host closed the connection]
lisp123 has quit [Read error: Connection reset by peer]
enzuru has joined #commonlisp
pve has joined #commonlisp
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
<mzan>
dirtcastle: I'm not an expert of CL, but I'm starting using it. As functional programming language is not on par with OCaml and Haskell. By default it has no algebraic data types and persistent data structures. On the good side, there is that functions can be passed as arguments. Rarely functions are returned as results. Macro are used instead.
<mzan>
You can use CL libraries with persistent data structures and algebraic data structures, and there is also Coalton.
frgo_ has joined #commonlisp
<mzan>
So if you want, you can use it as a FP. But, the majority of CL code does not follow this approach.
son0p has quit [Ping timeout: 255 seconds]
kstuart has joined #commonlisp
frgo has quit [Ping timeout: 256 seconds]
<mariari>
on the side of functional CL, you can do some FP idioms that are common in Haskell and OCaml better than in OCaml and Haskell, as you can have arbitrary sum types which helps with idioms quite a bit and regain exhaustion through serapeu
frgo_ has quit [Ping timeout: 256 seconds]
<pve>
mzan: conses are persistent, no?
<mariari>
I tend to write my CL mostly functionally, where you can even derive your own updater functions easily enough, once one uses CL for a decent amount of time, you can basically treat it like any other functional language but with a proper environment to help one code
<mzan>
yes, they are a poor man persistent data structure
<Josh_2>
Good Morning :sunglasses:
<Josh_2>
I dont think its controversial to say that the defacto way of writing cl is using Generics
<frodef>
good morning
<Josh_2>
But nothing stopping you doing whatever you want :sunglasses:
<mzan>
mariari: I'm checking https://github.com/ruricolist/serapeum interesting. Thanks. Are you able to declare some algebraic data types in advance, like in Haskell?
<pve>
mzan: why "poor man's"? Aren't they just fundamental?
<mariari>
mzan: you can do it with normal or
<mariari>
I do this all throughout my compilers, much nicer than doing it in haskell
<mariari>
let me show you
<mariari>
(deftype substobj () `(or alias prod coprod so0 so1))
<mariari>
I tend to write this, along with (defclass <substobj> (direct-pointwise-mixin) ())
MajorBiscuit has joined #commonlisp
<mariari>
so I can also do a defmethod on it
<mariari>
now if you hand match-of substobj it'll yell at you at macroexpansion time
<mariari>
this works much better than any ML I've used as the or's can be nested. I really should send in a patch to them to improve the exhaustion warning, as it doesn't always give a nice message
<mariari>
the direct-pointwise-mixin here just lets me derive generic object equality, much like you'd derive Eq in haskell
<mzan>
mariari: nice. In Haskell, datatypes definitions are often one of the entry point used for understanding some code. In CL without extensions, I lack this type of documentation.
<mariari>
well you have it without extension, the extension just gives you exhaustion
<mariari>
the only issue I tend to have, is that I use high test coverage to make sure they are consistent, but at least SBCL does check if you try to pass in the wrong type (CCL tends to care less on the default settings)
<mzan>
pve: poor man, because they are references but they can be managed also like values. But if you are not disciplined, you can insert bugs in the code. Instead in Haskell anything is a value, i.e. persistent. So you cannot insert errors. But it is fair: Haskell was designed decades after CL, and it is dedicated to only one paradigm.
<mariari>
serapeum gives you defadt, but i don't use it as it defines out structs which I don't like using these days
<mariari>
the defadt in the library also removes the writer fields for the structs, so they are basically pure values
<mzan>
mariari: thanks. I copy and pasted your notes on the notes of my current CL project, and I will study them better. Interesting.
<mariari>
no problem, it was a breath of fresh air writing a compiler in CL after having writing one for a long time in Haskell, CL is just more flexible in how you can represent data. Like with c2mop you can derive generic traversals with protected slots etc
<Josh_2>
mzan: what is your current project?
<mariari>
I've done this in haskell in the past, and it was a pain, as you basically just define your own Sexp type, as AST's in the ML style just don't scale due to how rigid they are, since they can not be adhoc
<pve>
mzan: I understand what you mean, but "decades after CL" is probably not an accurate statement
<mzan>
Josh_2: I made some toy projects in CL. Now I'm writing a live environment for a Knowledge-Base language, and maybe in future, assuming I will finish the first part, also for a compiler for a language based on attribute grammars
<Josh_2>
All of that apart from "toy projects in CL" went over my head :joy:
<mzan>
mariari: yes, static typing is useful, but it limits freedom. Sometime, you need freedom for expressing powerful things. I hope that with the serapeum approach, one can have both freedom and some safety. I will study it better.
<mariari>
I can link you a project that is done in a functional style if you want with this
<mzan>
yes, I will read the code
<mariari>
if you look at my alucard codebase: https://github.com/anoma/juvix-circuits/tree/main/src you'll see most code written in this style, mostly purely functional with some mutation to get things done at the top and to setup the mixing of languages
<mariari>
but checkout the intermediate folder for the data layout and the pass folder for the various compiler passes, you simply can not do this style of development in ML, I'd argue this style is much safer than the ML approach as well
<Josh_2>
mzan: change the colours to be much whiter and it would be very festive :D
<mzan>
If you read the define-language parts, you see algebraic data types, and they are better than in Haskell, regarding the domain of PL.
<mariari>
yeah I do things in a very nanopass style mzan
<mzan>
And define-pass are transformation pass. They are type checked.
<mariari>
the problem with the ML style of design is the typing makes them lose sight of the problem at hand, often you'll find giant passes as the rigidness of ML ADT's are simply too inflexible for real compiler work, and the approaches out of it (Tagless final, trees that grow, etc etc) are too hacky
Fare has quit [Quit: Leaving]
karlosz has joined #commonlisp
<mariari>
yeah I've read their paper before it looks neat, never played with it personally, but I'm with them on smaller style of passes as they become more trivial to reason about, and prove if you really wanted to
kstuart has quit [Ping timeout: 246 seconds]
<mariari>
the thing about lisps is that you have the freedom to define your own static analysis tools, as you have readily more access to the format of data if you so desire, writing tools in Generic in Haskell is a pain and encures some runtime costs, and since you can't augment the system you are stuck with what you are given
<mzan>
One minor detail of Nanopass, but that is wonderful, is that like in math/CS, you can specify new intermediate languages (IR) specifying only the differences respect the previous IR. It is a very compact notation. A lot better than Haskell notation, for this domain. Lisp is fun!
<mzan>
It si completely malleable.
<mariari>
mzan: I don't use this in the code I sent since serapeum's default checker does not work with it, but you can do something similar with deftype (deftype modified-thing () `(or if (not cond) ast-with-cond))
<mariari>
mzan: I don't use this in the code I sent since serapeum's default checker does not work with it, but you can do something similar with deftype (deftype modified-thing () `(or if (and (not cond) ast-with-cond))) might need an and there
pjb has joined #commonlisp
vassenn has quit [Quit: Leaving]
thuna` has joined #commonlisp
thoughtron has quit [Ping timeout: 256 seconds]
ebrasca has joined #commonlisp
random-nick has joined #commonlisp
lisp123 has joined #commonlisp
son0p has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
thoughtron has joined #commonlisp
perrierjouet has joined #commonlisp
ritchie101 has joined #commonlisp
ritchie101 has quit [Ping timeout: 265 seconds]
epony has quit [Ping timeout: 268 seconds]
_cymew_ has quit [Ping timeout: 264 seconds]
causal has quit [Quit: WeeChat 3.7.1]
<lisp123>
mariari, I hate this ongoing perpetuation that CL is not functional - it is multi paradigm and generic functions are a way to merge an OO approach with the functional underpinnings of lisp
<lisp123>
The syntax of CL encourages a largely functional style as side-effects are isolated within functions
jmdaemon has quit [Ping timeout: 252 seconds]
<mariari>
the funny thing about generic functions is that they would feel at home for those who come Haskell and its derivatives (they would call them type classes). But yeah I largely agree with your sentiment. The compilers nicely support the functional style speed wise as well
<lisp123>
I agree
<mariari>
the only things that I've noticed lacking is that object equality I have to derive myself typically. Grabbing FSET is not a big deal in most circumstances when I want functional data structures
<Equill>
mzan: It looks like we have some interests in common beyond Lisp. This knowledge-base language: is it for automated reasoning/ML, or for human interaction?
<mariari>
yeah I've read about that before when I've brought up this, though I do have one issue with my equality strategy. Is there a generic way to grab the fields of structs I know c2mop can do it but that is undefined behavior
<mzan>
Equill: it is far for being publishable, so I don't like to discuss details. But I can listen you ;-) BTW, it is for human interaction, and it is a simplified version of RDF, OWL, Datalog and so on. You use it only for specifying basic relationships between chunk of data. All other functionalities had to be in ad-hoc systems.
<Equill>
mzan: We should take this into #lisp-cafe, but we definitely have a shared interest there. My IT-infrastructure management thing turned into a KMS engine that happens to be useful for managing IT infrastructure :)
<mzan>
ok
epony has joined #commonlisp
<mzan>
random-nick: regarding https://www.nhplace.com/kent/PS/EQUAL.html nice lecture, but I note that objective-C and other similar OOP languages solved this problem better. They have weak and strong references. If you copy/clone an object, you copy the weak references
<mzan>
(i.e. they remain reference to the same object), while you copy/clone the strong references
<mzan>
Probably you can use the same appropach for equality.
<mzan>
If you compare two objects they are the same if they share the same exact weak references
<mzan>
and if they have compatible/equal strong references.
<_death>
the point of that article is that equality and copying are context dependent.. if you pick some definition without consideration of context it may appear arbitrary and unsuitable.. you're just saying they picked one
<mzan>
yes, right
<mzan>
annotating strong and weak references in an OOP hierarchy, can solve this problem, or it can help a lot. But I'm sure that or I can extend CLOS with this functionality, or there is already a library doing this, or maybe it is already part of the standard
<mzan>
In CL nothing is impossible :-)
<_death>
again, it does not solve the problem, unless you also provide a context (the article uses the term "intent")
<mzan>
I'm not stupid
<mzan>
again
<mzan>
agfain
<mzan>
There is a tecninque based on strong and weak reference. Sometime you can use it.
<_death>
I've not heard of it (in those terms).. to me strong and weak references are related to garbage collection
pjb has quit [Remote host closed the connection]
<_death>
(the dichotomy more familiar to me is deep/shallow)
tyson2 has joined #commonlisp
<beach>
_death: What are deep and shallow references?
<_death>
beach: not references, but copying or equality
<_death>
anyway, it's easy to imagine that there could be some language to define such semantics, like say (define-copy-semantics my-context (another-context) :deep ((class1 slot1)) :shallow ((class1 slot2))) or something.. but then it may be easier (and more general) just to the define the specific operation procedurally
cage has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
ec has joined #commonlisp
akonai_ has joined #commonlisp
akonai has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
<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.
<mzan>
If you clone/copy the document, you deep clone the paragraphs but not the autor or page format descritpion.
<mzan>
It is used for sure in objective-c. IIRC also in OpenDoc defunct Apple standard.
<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.
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
karlosz has quit [Remote host closed the connection]
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
<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.
scymtym has joined #commonlisp
Brucio-61 has joined #commonlisp
<_death>
possibly a frame representation language can provide more hints about the context, since it can support more relations than is-a/has-a
<_death>
but ideally a context can be supplied ad hoc, if a general mechanism of copy/equal is assumed
attila_lendvai has quit [Ping timeout: 265 seconds]
random-nick has quit [Ping timeout: 260 seconds]
seletz has quit [Read error: Connection reset by peer]
seletz has joined #commonlisp
azimut has joined #commonlisp
scymtym_ has joined #commonlisp
scymtym has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym_ has quit [Ping timeout: 268 seconds]
Brucio-61 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
pdietz has joined #commonlisp
nij- has joined #commonlisp
<nij->
Do Common Lisp implementations make use of multiple CPUs automatically?
<Bike>
Make use for what
<nij->
Run threads over multiple cores, instead of just on one core.
<Bike>
modern implementations will do concurrency, yes
tyson2 has joined #commonlisp
attila_lendvai has joined #commonlisp
pjb has joined #commonlisp
<mzan>
_death: sure
<kakuhen>
This is up to the OS scheduler, not the programming language
<kakuhen>
Your multiple threads might be ran on distinct cores, or they won't. It depends what your OS scheduler does
pdietz has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
pdietz has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
Oladon has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Cymew has quit [Ping timeout: 248 seconds]
booaa has quit [Ping timeout: 260 seconds]
NotThatRPG has quit [Ping timeout: 260 seconds]
pdietz has quit [Quit: Client closed]
seletz has quit [Ping timeout: 260 seconds]
MajorBiscuit has quit [Ping timeout: 260 seconds]
igemnace has quit [Quit: WeeChat 3.7.1]
seletz has joined #commonlisp
morganw has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 255 seconds]
_cymew_ has joined #commonlisp
azimut has joined #commonlisp
jmdaemon has joined #commonlisp
varjag has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
tyson2 has joined #commonlisp
ec has joined #commonlisp
azimut has quit [Remote host closed the connection]
Helmholtz has quit [Quit: Bridge terminating on SIGTERM]
tiziodcaio has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
bitspook[m] has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
acma has quit [Quit: Bridge terminating on SIGTERM]
AadVersteden[m] has quit [Quit: Bridge terminating on SIGTERM]
sp has quit [Quit: Bridge terminating on SIGTERM]
cel7t has quit [Quit: Bridge terminating on SIGTERM]
torhex-pasmul[m] has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
hayley has quit [Quit: Bridge terminating on SIGTERM]
nicm[m] has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
ecocode[m] has quit [Quit: Bridge terminating on SIGTERM]
loke[m] has quit [Quit: Bridge terminating on SIGTERM]
infra_red[m] has quit [Quit: Bridge terminating on SIGTERM]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
get_in_the_fucki has quit [Quit: Bridge terminating on SIGTERM]
Bung has joined #commonlisp
Bung has quit [Remote host closed the connection]
Bung has joined #commonlisp
azimut has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
Mrtn[m] has joined #commonlisp
anticomputer has joined #commonlisp
attila_lendvai has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
anticomputer has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
AadVersteden[m] has joined #commonlisp
kakuhen has joined #commonlisp
char[m] has joined #commonlisp
Duuqnd has joined #commonlisp
nicm[m] has joined #commonlisp
ecocode[m] has joined #commonlisp
acma has joined #commonlisp
tiziodcaio has joined #commonlisp
Helmholtz has joined #commonlisp
loke[m] has joined #commonlisp
torhex-pasmul[m] has joined #commonlisp
dieggsy has joined #commonlisp
infra_red[m] has joined #commonlisp
cel7t has joined #commonlisp
bitspook[m] has joined #commonlisp
hayley has joined #commonlisp
get_in_the_fucki has joined #commonlisp
ec has quit [Remote host closed the connection]
sp has joined #commonlisp
ec has joined #commonlisp
nij- has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
yottabyte has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
thoughtron has quit [Ping timeout: 256 seconds]
NotThatRPG has joined #commonlisp
sedzcat has joined #commonlisp
_cymew_ has quit [Ping timeout: 264 seconds]
jeosol has joined #commonlisp
ec_ has joined #commonlisp
ec has quit [Ping timeout: 255 seconds]
nij- has joined #commonlisp
random-nick has joined #commonlisp
Lord_of_Life has quit [Read error: Connection reset by peer]
ryanbw has quit [Quit: I'll be back.]
Lord_of_Life has joined #commonlisp
azimut has joined #commonlisp
<nij->
kakuhen hmmm but there are some languages that do not run on multiple cores, if I understand correctly (e.g. python)
<phoe>
you understand wrong, python is multithreaded
azimut has quit [Remote host closed the connection]
<mfiano>
Well there is the GIL
azimut has joined #commonlisp
<mfiano>
That effectively means one OS thread can only be executing something at any given time
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
thoughtron has joined #commonlisp
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
<phoe>
oh, as in that
<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.
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
pdietz has joined #commonlisp
<Fade>
when I was still a python programmer, the GIL caused my general interest in message passing architectures.
<mfiano>
I can see that.
Lord_of_Life has quit [Read error: Connection reset by peer]
<mfiano>
For a moment I thought you were Fare, and would have made even more sense.
<Fade>
low levenshtein distance.
<mfiano>
Yup
<Fade>
I think fare has largely departed the CL world for gerbil.
<nij->
gerbil?
<phoe>
gerbil scheme
<mfiano>
Which is why it would have made more sense, with it adopting the actor paradigm from what I remember.
<Fade>
it seems to mostly forsake image based systems for a fully AOT compilation model
<nij->
"That effectively means one OS thread can only be executing something at any given time"
<mfiano>
I saw Fare reply to my message in here just the other day, so I know he still comes around.
<nij->
Yeah, so I wonder what's the case in SBCL, say?
Lord_of_Life has joined #commonlisp
* Fade
nods
<nij->
Is it REAL parallelism?
<nij->
Or is it a fake one like python's?
<Fade>
sbcl supports system level threads.
<mfiano>
SBCL uses what the kernel provides
<Fade>
as does ccl
<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
<mfiano>
Global
_cymew_ has joined #commonlisp
<nij->
i see
<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.
akonai_ has quit [Ping timeout: 248 seconds]
<mfiano>
It's the subject of a lot of controversy, but the CMUCL Python is a better topic anyway.
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
nij- has joined #commonlisp
akonai has joined #commonlisp
<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.
jolby has joined #commonlisp
<Josh_2>
Can you elaborate?
<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.
<Fade>
this may have changed in the past ten years, because it was a pain point even ten years ago.
<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
<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.
<Josh_2>
What
<mfiano>
tldr: Julia has C++ pouring out of its seams.
<Fade>
I'm glad you're back, mfiano. sorry for all the tooling entropy you seem to have been experiencing.
Lycurgus has joined #commonlisp
<mfiano>
Thank you, but sorry for the what?
<Fade>
switching languages is a big unbounded cost.
<Fade>
switching and then being disappointed is... disappointing.
<mfiano>
That is true. I am disabled and a hobbyist programmer. So I have time to learn new things.
* Fade
nods
<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.
<nij->
nice to have you back :)
<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.
<mfiano>
Said issues probably resulted in a very bleak image painted of CL in my recent blog article. I apologize for that.
Lord_of_Life has quit [Read error: Connection reset by peer]
ec_ has quit [Remote host closed the connection]
<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.
ec_ has joined #commonlisp
<nij->
mfiano what are you working on now?
lisp123 has joined #commonlisp
<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.
Lord_of_Life has joined #commonlisp
<lisp123>
glad to have you back mfiano
<mfiano>
Thanks lisp123
<mfiano>
Good night!
<lisp123>
nights
attila_lendvai has quit [Ping timeout: 265 seconds]
thuna` has quit [Ping timeout: 268 seconds]
thuna` has joined #commonlisp
lisp123 has quit [Ping timeout: 246 seconds]
hayley has quit [Changing host]
hayley has joined #commonlisp
epony has quit [Remote host closed the connection]
epony has joined #commonlisp
pdietz has quit [Ping timeout: 260 seconds]
<nij->
parenscript is a sublanguage embedded in CL
<nij->
it compiles to Javascript
<nij->
I wonder are there JS code that are hard to be written from parenscript (up to semantic equivalence)?
<Josh_2>
Yes
<nij->
For example :O?
<Josh_2>
It does not support es6
<Josh_2>
is it es6 idk but the shorthand for things like promises doesn't exist which is very annoying
<Josh_2>
The hacky workarounds required are irritating
<nij->
So "missing keywords"..
<nij->
other than missing keywords?
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
<Josh_2>
Well its only really a sort of wrapper, you can get all the syntax totally wrong
attila_lendvai has joined #commonlisp
<Josh_2>
So other than new syntax added in es6? everything works
<Josh_2>
I have written a large amount of PS
<Josh_2>
Those missing abstractions are very annoying though
<Josh_2>
I have some code somewhere
<Josh_2>
ah yeh
<Josh_2>
The fact that the async keyword is missing is a massive PITA
<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?
<jackdaniel>
right
<nij->
Josh_2 Thanks for sharing.
<nij->
Is it hard for you to hack PS to include promise and asyncio?
pranavats has left #commonlisp [Error from remote client]
<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
<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.
<NotThatRPG>
Looks like cl-random is morbid, but random-state is alive.
<Bike>
random-state is good
tyson2 has quit [Remote host closed the connection]
<Shinmera>
NotThatRPG: I can heartily recommend random-state's squirrel-rng.
<Shinmera>
It'll be very fast and it supports going back, too, not just forward.
<NotThatRPG>
Thanks! I had used cl-random before, but would prefer something that is maintained.
ebrasca has quit [Remote host closed the connection]
<Josh_2>
for prng I have always just used ironclad
Alfr has quit [Ping timeout: 252 seconds]
Oladon has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
attila_lendvai has quit [Ping timeout: 248 seconds]
Bung has quit [Remote host closed the connection]
<Josh_2>
The PS code is pretty crazy, can't say I have any idea whats going on :joy:
<nij->
why is it crazy?
<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.
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Shinmera>
no
attila_lendvai has joined #commonlisp
<Shinmera>
doc-utils is a dep of everything I publish
<Shinmera>
the dependency is so small it really does not matter.
varjag has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
pranavats has joined #commonlisp
<nij->
Josh_2 I think you dont need to go to the source code of parenscript.