jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
amb007 has joined #commonlisp
euouae has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
tedwing has joined #commonlisp
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
recordgroovy has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
CptKirk has quit [Ping timeout: 248 seconds]
CptKirk has joined #commonlisp
fiddlerwoaroof has quit [Read error: Software caused connection abort]
fiddlerwoaroof has joined #commonlisp
kg7ski has quit [Ping timeout: 252 seconds]
jeosol has quit [Ping timeout: 260 seconds]
kg7ski has joined #commonlisp
pillton has joined #commonlisp
Brucio-61 has quit [Read error: Connection reset by peer]
<mfiano> Going through my todo list the other day, I have a couple projects that would be best served by CL. Maybe I can bump their priority up a tad and work on some CL again. But, it's been 5 months without CL and I can't complain...the right tool for the job, and all that.
Brucio-61 has joined #commonlisp
scymtym has quit [Ping timeout: 260 seconds]
scymtym has joined #commonlisp
<Josh_2> You are enjoying Julia?
<mfiano> Yeah, it's one of a few languages I use.
tedwing has quit [Quit: leaving]
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
<mfiano> Julia in a nutshell, is very much like Scheme or CL in a lot of surprising ways, but, ignoring the syntax, semantically the language has some unique takes on things, which allows for some nice optimizations, but which most CL folks would not like at all.
<Josh_2> Nice :)
<Josh_2> Only language I've had much interest in learning is Smalltalk, but the fact Pharo smalltalks editor doesn't have emacs keybindings is a bit of a bummer :(
<waleee> every time I try to play around with pharo, I have gotten the same library error that's supposed to have beem fixed 2 years ago
<mfiano> It's still symbols and everything is an expression and you can write real macros in a similar fashion to CL, but the compilation model has very strict rules. For example a running program in your image will not see changes to recompiled functions in the call graph. This is because there is a world age, and you must explicitly ask for the latest world age in your loop, which can be quite slow.
<mfiano> The Julia module system is almost exactly like CL packages, too.
<mfiano> Complete with import, export, use, shadowing, and PLNs.
<mfiano> It's interesting how similar Julia is to CL, but with a lot more restrictions in place, as they favor performance more than anything.
<waleee> is it easier to make a custom image these days?
<waleee> I remember quite long load & compile times for libraries
<mfiano> There was a slide at the last JuliaCon with a quote that seems applicable here with regards to CL/Julia: "Liberties constrain. Constraints liberate.". Make of that what you will.
another-axel-bee has quit [Read error: Software caused connection abort]
<Josh_2> mfiano: taken to the extreme you have C++ ;)
axel-bee has joined #commonlisp
<mfiano> It's very easy to make a custom image.
<mfiano> But they are quite large compared to something like CCL or SBCL
<waleee> I was also a bit miffed that they moved the linear algebra-stuff into a library
akoana has quit [Quit: leaving]
<mfiano> That's part of the stdlib, but I did see they moved it into a library with failing tests about a month ago. So I'm assuming that is not a thing yet in master :)
dipper has joined #commonlisp
dipper_ has quit [Ping timeout: 260 seconds]
recordgroovy has quit [Quit: leaving]
recordgroovy has joined #commonlisp
recordgroovy has quit [Client Quit]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Lord_of_Life_ is now known as Lord_of_Life
recordgroovy has joined #commonlisp
recordgroovy has left #commonlisp [#commonlisp]
recordgroovy has joined #commonlisp
recordgroovy is now known as shunter
shunter has quit [Client Quit]
fe[nl]ix has quit [Read error: Software caused connection abort]
shunter has joined #commonlisp
fe[nl]ix has joined #commonlisp
shunter has quit [Client Quit]
attila_lendvai_ has quit [Ping timeout: 260 seconds]
shunter has joined #commonlisp
shunter has quit [Remote host closed the connection]
shunter has joined #commonlisp
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
monaaraj has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
tyson2 has quit [Remote host closed the connection]
Gernn has joined #commonlisp
<Gernn> I've tried magicl (can't get determinant or matrix multiplication to
<Gernn> Hey--does anyone have a rec for a linear algebra library?
<Gernn> work, which feels silly) and lla (doesn't have a non-destructive
<Gernn> matrix scaling operation???) and have taken a look at the wiki
<Gernn> It's hard to figure out what the popular + well supported library for
<Gernn> this is from cliki--it just provides a flat list of things that
<Gernn> *claim* to do linear algebra
bilegeek has joined #commonlisp
Gernn has quit [Ping timeout: 248 seconds]
jeosol has joined #commonlisp
pok has quit [Read error: Software caused connection abort]
pok has joined #commonlisp
pok has quit [Changing host]
pok has joined #commonlisp
jolby has quit [Ping timeout: 260 seconds]
paulapatience has joined #commonlisp
krjst has quit [Read error: Software caused connection abort]
krjst has joined #commonlisp
perrierjouet has quit [Ping timeout: 260 seconds]
kg7ski has quit [Ping timeout: 252 seconds]
rainthree has joined #commonlisp
kg7ski has joined #commonlisp
perrierjouet has joined #commonlisp
paulapatience has quit [Remote host closed the connection]
jolby has joined #commonlisp
igemnace has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 260 seconds]
_cymew_ has joined #commonlisp
Alfr has quit [Killed (silver.libera.chat (Nickname regained by services))]
azimut has quit [Ping timeout: 255 seconds]
Alfr has joined #commonlisp
azimut has joined #commonlisp
Brucio-61 has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
sveit has quit [Ping timeout: 268 seconds]
sveit has joined #commonlisp
frgo has quit [Ping timeout: 246 seconds]
<contrapunctus> Gernn: see if there's anything useful at https://github.com/CodyReichert/awesome-cl
<contrapunctus> (On the off chance Gernn checks the logs later.)
Brucio-61 has quit [Ping timeout: 246 seconds]
pve has joined #commonlisp
srji has quit [Ping timeout: 272 seconds]
srji has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
enzuru has joined #commonlisp
bilegeek_ has joined #commonlisp
bilegeek has quit [Ping timeout: 260 seconds]
frodef_ has joined #commonlisp
frodef has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
bilegeek_ has quit [Quit: Leaving]
Cymew has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
shka has joined #commonlisp
MajorBiscuit has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
frodef_ is now known as frodef
_cymew_ has quit [Read error: Connection reset by peer]
_cymew_ has joined #commonlisp
CptKirk has quit [Ping timeout: 246 seconds]
ttree has quit [Ping timeout: 260 seconds]
frodef has quit [Ping timeout: 246 seconds]
frodef has joined #commonlisp
epony has quit [Ping timeout: 272 seconds]
amb007 has joined #commonlisp
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest8212
amb007 has quit [Ping timeout: 248 seconds]
frodef has quit [Ping timeout: 260 seconds]
frodef_ has joined #commonlisp
<mariari> with default CL logic, is there something similar to Small talk's class side method dispatch (thus dispatch on the class itself rather than the instance), The closest I can see is `c2mop:class-prototype' and dispatching on that
<beach> mariari: CLOS dispatch is based on the class of the object.
<beach> mariari: Perhaps if you could give an example?
jolby has quit [Quit: Client closed]
<frodef_> mariari: forward the call to a class dispatcher, like (apply #'my-function/class-dispatch (find-class object) rest-args) ? Not sure when this would be useful, though.
<pve> mariari: the class prototype is also an instance of the class, unless I'm mistaken, so it won't do what you want
<frodef_> s/find-class/class-of
<mariari> Sure, I was thinking of a generic interface for lists. Let's say we have a generic car, cdr, and nil. car and cdr are trivial as they can just dispatch on the object given in, however nil could disaptch on the given class, rather than having to make an instance of it
epony has joined #commonlisp
<mariari> I've noticed this pattern when looking at pharo/small talk recently, and found it's sort of neat how there is a class side and an instance side to methods, as the class itself is an object that one can dispatch on
* beach is lost.
* frodef_ too
frodef_ is now known as frodef
<beach> mariari: NIL is not a function, so not comparable to CAR and CDR.
<mariari> correct, I'm talking about a hypothetical interface for say lists
<beach> What would the function NIL do in this hypothetical interface?
<frodef> mariari: maybe a small code example?
<mariari> beach: create the nil for the given type. so when you say make a generic map, it would create the nil associated with your type rather than say the list version always
<mariari> frodef: of the idea or the car cdr nil interface? I have some functions in smalltalk I just pulled up that I can paste
<frodef> mariari: probably better sketch out what you are thinking in lisp?
<pve> mariari: In CL, defining a class does not also define a new metaclass specifically for that class, like in smalltalk. So you have no "class side hierarchy" for the methods to follow. Like if you specialize on (eql (find-class 'my-class)), calling call-next-method won't do what you want.
<mariari> pve: ahh that would make sense then how small talk derives it's class side instances
<Nilby> mariari: It's quite possible to create generic versions of most list and sequence functions. You can even just nil's null class, or make your own alternate nil and null.
<Nilby> I use generic list and sequence methods frequently. Some things like typed arrarys are a little trouble though.
<pve> mariari: are you asking? If you have access to the smalltalk blue book, it's explained in the beginning of chapter 16.
<Nilby> Sometimes you have to create a pointless wrapper class.
<mariari> pve: no more of just a realization on how the parts come together and why I have an issue thinking about such dispatch in CL.
<mariari> frodef: you could view it like (empty string), (empty list), which would be generic methods that would dispatch to giving you the empty string and list
amb007 has joined #commonlisp
<frodef> mariari: what would "string" and "list" evaluate to in those forms? class-objects?
<frodef> ... or a string and a list, respectively?
<mariari> the class object of each, yeah
<beach> mariari: For that, you can make and EQL specializer.
<pve> mariari: it is possible to implement smalltalk-like class-side behaviour in CLOS, I've tried it and it worked nicely.
<frodef> how would that be useful beyond (empty-string) and (empty-list), or (empty 'string) and (empty 'list)?
<frodef> ... I guess there's some sort of smalltalk thing here that I don't grasp.
amb007 has quit [Ping timeout: 252 seconds]
<beach> (defmethod empty ((class (eql (find-class 'list)))) nil)
<frodef> beach: but (empty (find-class 'list)) would be useless, as would (empty (class-of x)), it seems to me.
<pjb> (defmethod empty ((class-name (eql 'list))) '())
<beach> frodef: Sure.
<mariari> pve: what did you use it for, am curious
<pve> frodef: i think the idea is that if (empty (find-class 'my-class)) works, then it should automatically work for subclasses of my-class
amb007 has joined #commonlisp
<mariari> frodef: dispatching on a prototype would fix the interface I'm thinking of, though I think I'm missing some parts of the greater use due to not writing too much small talk, saw a use case for it in Factor (whose object system is a derivative of CL's)
<pve> mariari: I implemented (or perhaps "emulated") the smalltalk object system and message passing in CLOS. Not the standard library :)
<frodef> I suspect this is maybe about abusing OO/CLOS to do things it shouldn't, i.e. is better expressed in other ways.
amb007 has quit [Ping timeout: 246 seconds]
<mariari> pve: do you have the code anywhere I'd be interested in reading it
shka has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
<pve> mariari: I'm in the process of cleaning it up, want to put it on github but life gets in the way, you know?
<mariari> yeah I feel you. My life has been much more busy lately. If you ever do feel free to ping me I idle here, and find such code useful for my own thoughts
<pve> mariari: here's a couple of old screenshots to give you an idea:
amb007 has joined #commonlisp
ryanbw has quit [Ping timeout: 272 seconds]
<mariari> Nice, I really should play with more reader extensions in CL. I know Factor has a small talk parser, wonder if someone did something similar over there
<mariari> I'm guessing it also plays nicely with sly auto completion and all that? That is always something I've wondered about when building a new language DSL that strays far from normal CL
<pve> symbol completion works yes
amb007 has quit [Ping timeout: 246 seconds]
ryanbw has joined #commonlisp
anticomputer_ has quit [Remote host closed the connection]
<Nilby> pve: That's cool. I don't know why it makes me so happy to see CL act like other langauges.
anticomputer has joined #commonlisp
amb007 has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
random-nick has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
anticomputer has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #commonlisp
Guest8212 has quit [Ping timeout: 260 seconds]
Guest8212 has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
danieli has quit [Quit: Alpine Linux, the security-oriented, lightweight Linux distribution]
<pve> Nilby: thanks, I enjoy it also
pillton has quit [Remote host closed the connection]
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
<pve> I think the fact that I was able to do it using CLOS metaclasses says something about the quality of CLOS and the MOP.
<Nilby> I agree. I sometimes use a simple mixin to make classes prototype-able with instance slots.
amb007 has joined #commonlisp
<pve> do you mean adding slots/properties on demand? or delegating requests to a parent object?
<Nilby> adding on demand
amb007 has quit [Ping timeout: 260 seconds]
<pve> ok
amb007 has joined #commonlisp
dawranliou has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
dipper has quit [K-Lined]
dipper has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
nij- has joined #commonlisp
mariari has quit [Quit: WeeChat 3.6]
jmd_ has quit [Ping timeout: 248 seconds]
amb007 has joined #commonlisp
mariari has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
euouae has joined #commonlisp
<euouae> Hello, I've been trying to find out what is allowed for a symbol name, but I can't figure it out. Is it any NUL-terminating string?
<euouae> Or even NUL is allowed?
<beach> Any sequence of characters.
<beach> Including none.
cosimone has joined #commonlisp
<euouae> even 0-valued bytes then?
<beach> Only characters. Not bytes.
<euouae> So this is related to implementations and architectures, but for practical matters it seems code-char converts 0-255 to a character representing a byte
<beach> That depends on the implementation. The standard characters are given in the standards document.
<Bike> it'll convert it to a character. implementations usually use ascii, so that includes characters like 'A' or '!', which don't really "represent" bytes in any way
<euouae> or is it about ill-formed byte sequences of character encodings?
<Bike> what are you talking about?
<euouae> utf
<beach> Symbol names do not contain any "encoding".
<Bike> forget about bytes. it's not complicated. a symbol name can be any string of characters. how those characters are encoded is irrelevant.
<beach> It's a sequence of Common Lisp characters.
<jackdaniel> characters in common lisp are not numbers, that's all there us to it
<jackdaniel> is*
<jackdaniel> (nor bytes of course)
<ecraven> you can write the representation of a symbol as a sequence of utf-8 bytes, but the actual *name* of the symbol in a running CL system is not that
<euouae> ecraven: why not?
<jackdaniel> and strings are not null terminated fwiw, they are vectors of characters with known length
<Bike> because that would be an abstraction break
<euouae> Bike: "may not be that" then
<Bike> What?
nij- has quit [Ping timeout: 252 seconds]
<euouae> He said /actual name/ so he's not talking about the definition but what the implementation does
<euouae> and the implementation /may/ not encode them as utf-8, right?
<White_Flame> CL deals in characters, on this topic, not byte encodings
<Bike> sure, the implementation can encode them however it wants. because the encoding is, again, irrelevant to the fact that it's a string of characters.
<White_Flame> the actual backing storage for chars is opaque
<jackdaniel> do you count electrons when you reference a memory?
<jackdaniel> s/a/the/
<euouae> If opaque, how do you know that anything can be done?
<Bike> do you understand what an abstraction is?
<White_Flame> because the spec defines what can be done
<euouae> Bike, do you understand what a petty insult is?
<Bike> I am asking genuinely because I don't understand what is confusing about this.
<euouae> White_Flame: do you know where that is? i.e. the bare minimum provided
<beach> This is fascinating.
<Bike> When you "call" a "function", do you care what particular machine code is underlying it? Not usually. There's a function and you call it.
<White_Flame> the CLHS is the cl hyperspec, but information is scattered throughout it
<euouae> E.g. how do you know that #\a is a character?
<Bike> Because it's defined to be a character.
<euouae> where?
<Bike> That's like asking how you know that 4.7 is a number.
<White_Flame> the chapter on Characters will give you a lot
<Bike> clhs #\
<Bike> There
<jackdaniel> how do you know that 3 is a number (in C)?
<euouae> Okay #\a is valid if a is a character, why is a a character?
<Bike> I don't understand the question.
doyougnu has joined #commonlisp
<jackdaniel> me neither
<White_Flame> because source code comes in as a stream of characters, which the reader processes
<euouae> jackdaniel: the clhs talks about radixes though
<euouae> yeah but you need to define what a character is
<Bike> Yes, the CLHS defines what a character is.
<euouae> and if it's all implementation-defined then nothing is given for certain
<White_Flame> what are you fundamentally asking or looking for?
<Bike> There's an entire chapter of the CLHS defining how characters work.
<White_Flame> C doesn't define teh bit layout of an int, nor its size (though there are minimums)
<jackdaniel> it does, and it talks about characters and strings too
<euouae> White_Flame: I'm imagining something such as "the implementation must support the lower-half of the ascii table" or some such
<jackdaniel> none of these is unspecified
<White_Flame> what you're seeming to ask is not commonly specified for any programming language
<Bike> There is a minimum set of standard characters.
<Bike> The encoding of the characters is not specified, but there is a set.
<euouae> White_Flame: C defines the character-set for the source code actually, e.g. @ is not part of it
<Bike> clhs 2.1.3
<Bike> this is the minimum character set.
<jackdaniel> so does common lisp, the minimal set of characters
<euouae> Bike, awesome, thanks. That's what I was asking for
<jackdaniel> what Bike saud :)
<euouae> either my English is terrible or y'all had me running laps
<jackdaniel> quite roundabout way of asking
<White_Flame> you were asking about NUL bytes and such first
<Bike> indeed. if you have more questions, read the chapter first, please.
<jackdaniel> I think that you assume some things that are not universally true
<jackdaniel> nothing to do with English per se
<AadVersteden[m]> I have a tree-like data structure that, once constructed, only makes sense as a whole. From an earlier implementation we know garbage collection may well become a big overhead. Is there some library or well-known approach for having such a tree-like structure that could be GCd as a whole?
<euouae> I mean 13.1.2.2 on Character Repertoires (which I was reading) did not mention standard-char
<euouae> and ch 13 is quite far from ch 2
<AadVersteden[m]> Or pointers to something similar that could help.
<jackdaniel> AadVersteden[m]: make a cons pool
<jackdaniel> then conses will be "referenced" for gc and reusable for you
<AadVersteden[m]> hmmmm. 🤔; literally reusing the cons cells. Would not walk the most efficiently but I could maintain a list of local objects, I guess...
<jackdaniel> you may return a tree to the pool
<beach> AadVersteden[m]: What makes you think that it would normally not be "GCd as a whole"?
<White_Flame> euouae: chapter 2 is syntax, which certainly intersects with how characters are used
<euouae> Fair
<AadVersteden[m]> This is a very silly idea and I could bolt it onto a more stupid implementation at first. The same would hold for the structs I'd like to use this for.
<beach> AadVersteden[m]: A copying garbage collector won't touch the dead objects, so the tree will then never be traversed by the GC.
<pjb> euouae: you cannot know that #\a is read as character, if you don't know the state of the current *readtable*. But you can learn it with: (type-of #\a) #| --> standard-char |#
<AadVersteden[m]> beach: Presumptions. Each cons cell would presumably have a reference-counter or similar, rather than the set of cons cells as a whole.
<pjb> euouae: and (subtypep 'standard-char 'character) #| --> t ; t |#
<AadVersteden[m]> beach: Could you elaborate there? I'm on SBCL, if that matters, and I may have a wrong mental model.
<beach> AadVersteden[m]: I know of no Common Lisp implementation that uses reference counters.
amb007 has joined #commonlisp
<AadVersteden[m]> beach: I told you I had presumptions and I didn't know. Looks like the truth ^_^.
<beach> AadVersteden[m]: The GC traverses live objects, not dead ones.
<euouae> pjb, I'm not sure yet about the readtable or the reader, but I'll look into that later too
<beach> AadVersteden[m]: What has not been traversed is then dead, no matter what structure it has (or had).
<pjb> euouae: the existance of a NUL character depends on the support for the ASCII encoding, and a mapping of ASCII control code to character (which is disgusting, but often done). in practice, (char-code #\nul) #| --> 0 |# could exist in your implementation.
<White_Flame> euouae: and beyond the standard characters, other chars have categories and properties, so whitespace, graphic chars, case handling, what's numeric, etc can be handled outside just the standard ones. I believe many other languages treat beyond-standard characters as token constituents
<euouae> pjb, I'm just writing notes on what systems/packages are and I wanted to figure out what a namespace is, what a binding is, etc
<euouae> so it came down to a name is a string, a string is an array of characters, what's a character?
<AadVersteden[m]> beach: Oh, that totally changes things. That would mean I'd better have some large array with pointer-like things rather than a wide range of CONS cells? Or is there something smart that doesn't make it that bad?
<White_Flame> euouae: a character is a primitive type, with lots of properties per instance
<pjb> euouae: so, yes, you could name your symbol "
<beach> AadVersteden[m]: I think you are trying to optimize based on a faulty mental model of how things work. That is almost never a good idea. Especially if you have not identified any bottlenecks.
<White_Flame> (instances are generally flyweighted, have character codes, and deal with named encodings for input/output)
dawranliou has left #commonlisp [#commonlisp]
<AadVersteden[m]> beach: I agree! Though we had an implementation on this beforehand, and GC and copying of query data is what was the biggest slowdown. I'd prefer to have the right mental model and see if choices early on would likely influence the implementation.
<beach> euouae: A character is anything for which (CHARACTERP <object>) returns a true value.
<beach> clhs characterp
<pjb> euouae: note char-code-limit, so you can collect all the characters with: (loop for code below char-code-limit when (code-char code) collect (code-char code) )
amb007 has quit [Ping timeout: 252 seconds]
<euouae> oh nice, the implementation can be inspected then
<euouae> 1114112 for mine, looks like utf-8?
<pjb> Nope.
<pjb> This looks like unicode.
<White_Flame> looks like unicode
<jackdaniel> looks like unicode
<AadVersteden[m]> beach: For the parsing itself we have a more sensible speed now (using the profiler), yay! But the datastructure that is generated will be passing code in many other places. If a structure with linked lists and structs is a bad one for GC, I have sufficient reason to believe that may become an issue and hence I'd like to see what to migrate to then.
<euouae> oh I see
cosimone` has joined #commonlisp
<euouae> That makes sense, they're code points
<AadVersteden[m]> Or at least what to benchmark and compare with.
<frodef> I'm using SBCL and a few threads. Do I need to manually serialize access to a shared hash-table?
<beach> AadVersteden[m]: You can't really influence that. If your implementation has a copying collector, then your live objects are going to be copied, whether there are lots of them or few.
CptKirk has joined #commonlisp
cosimone has quit [Ping timeout: 260 seconds]
<AadVersteden[m]> beach: I'm targeting SBCL and assume that holds there too. Would a copying collector have more load with many small objects (eg: cons cells) rather than fewer vectors?
<pjb> frodef: sbcl has an extension for hash-tables.
<beach> AadVersteden[m]: Possibly. But I don't know the details of the SBCL garbage collector, so I can't answer that. Perhaps hayley knows.
<pjb> frodef: but in general, you will want to use mutex on coarser blocks of code than a single gethash, so using that extension would be counter-productive performance-wise.
Inline has joined #commonlisp
<AadVersteden[m]> frodef: (make-hash-table :synchronized t) if that's the only thing to serialize
<frodef> right, thanks
<AadVersteden[m]> beach: I agree that it's premature btw. I was mainly trying to skip an issue like "use library awesome-gcless-trees from quicklisp with a mega-specific API". I don't want to have to rewrite the solution and I'd prefer to use lessons learned so far.
<beach> AadVersteden[m]: Yes, I see.
amb007 has joined #commonlisp
nij- has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
CptKirk has quit [Ping timeout: 248 seconds]
Brucio-61 has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
pfd has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
amb007 has joined #commonlisp
Inline_ has joined #commonlisp
scymtym has joined #commonlisp
Inline has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 252 seconds]
<ecraven> euouae: not sure which guarantees CL-the-standard makes about which characters may be encoded, but Unicode does not encode all characters that existed in CL-compatible implementations by far, so for example like Emacs, a CL implementation may as well use non-unicode as the internal character encoding
Inline__ has joined #commonlisp
amb007 has joined #commonlisp
<White_Flame> and there's no guarantee about what CL might do with characters whose char-code happens to be unicode surrogates or whatever. You just get "a character" on input, can inspect its properties (including its code (from CL's view)) and send it to output
<euouae> ecraven, apparently there's a standard-set defined in 2.1.3 of 96 characters, a-zA-Z0-9 and !$"'(),_-./:;?+<=>#%&*@[\]{|}`^~
Inline_ has quit [Ping timeout: 252 seconds]
<Bike> ecraven: what characters does unicode not have?
<pjb> Bike: #\prince ?
<White_Flame> symbolics had tons of weird chars for once
<ecraven> a substantial part of XCCS for example (Interlisp)
<Bike> that CLs did have, i mean
<ecraven> Bike: that I don't know, thus "CL-compatible" ;)
<White_Flame> I doubt they're all in unicode, especially very platform specific symbols denoting keyboard keys and such
Sauvin has quit [Read error: Connection reset by peer]
<ecraven> I really don't understand why Unicode doesn't include all of XCCS, but ... hysterical raisins I assume
<White_Flame> control codes did all sors of custom stuff with fonts, too
<euouae> hysterial raisins hahah
<Bike> unicode has APL in it now, is all
waleee has joined #commonlisp
<Bike> my usual go to standard for weird computer characters
Sauvin has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
<White_Flame> last I checked, unicode didn't have full coverage of PETSCII
<White_Flame> which is totally ridiculous
pfd has joined #commonlisp
<pjb> That said, you can compose something close to #\prince: https://parkerhiggins.net/2013/01/writing-the-prince-symbol-in-unicode/
<splittist> euouae: you might find the way cltl2 describes common lisp helpful.
scymtym has quit [Ping timeout: 248 seconds]
Brucio-61 has quit [Ping timeout: 252 seconds]
<ecraven> euouae: I learned that from Riastradh decades ago
<pjb> euouae: the problem with using character outside of the base-char in files, is that you will need to use something else than :external-format :default in open, load, compile-file, etc.
<pjb> and external-formats are not standardized.
jeosol has quit [Quit: Client closed]
<euouae> ecraven: I'm not familiar with them, who are they?
<ecraven> a great Schemer (and probably other languages at well)
<euouae> very nice
<euouae> pjb, nice thanks. Good to know
<euouae> I assumed I could use any unicode on sbcl or any modern impl but I suppose not?
<euouae> I mean, utf-8 source code. I didn't realize load takes :external-format
<pjb> euouae: in practice, if you limit yourself to modern implementations on posix systems, yes, you can use unicode.
<pjb> euouae: and they indeed have external-formats to read and write utf-8 files.
amb007 has joined #commonlisp
<White_Flame> *default-external-format* => :UTF-8 for me
<White_Flame> but the standard itself makes sure it does not commit to any particular encoding or character set
<White_Flame> allowing these to be flexible and configurable
amb007 has quit [Ping timeout: 252 seconds]
cosimone` has quit [Ping timeout: 260 seconds]
Brucio-61 has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
Inline__ has quit [Quit: Leaving]
scymtym has joined #commonlisp
santiago` has joined #commonlisp
attila_lendvai has joined #commonlisp
causal has quit [Quit: WeeChat 3.7.1]
<Josh_2> mariari: (defmethod my-method ((test (eql (find-class 'my-superclass)))))
euouae has quit [Ping timeout: 260 seconds]
euouae has joined #commonlisp
santiago` has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
santiagopim has joined #commonlisp
<beach> Josh_2: We decided that solution is not acceptable.
<beach> Josh_2: The issue is closed.
<dipper> a notable Lisp figure made the announcement of switching to Julia https://www.tamaspapp.eu/post/common-lisp-to-julia/
<dipper> how do you think this blog?
<beach> dipper: I always find it amusing when people complain that some Common Lisp code behave differently in different Common Lisp implementations, so they then switch to a "language" with a single implementation instead. Go figure!
<White_Flame> scientific computing often has very specific control requirements depending on their scale
<White_Flame> any templated language could offer out of the box what he wanted, but so can macros
<euouae> When I tried to use Common Lisp for some basic scientific stuff, I did encounter a basic bug in an implementation
<White_Flame> even without creating a huge framework
<jackdaniel> I'm usually amused how people feel obligued to tell the world that they are ditching common lisp - I don't think I see it often for other programming languages
<jackdaniel> on the other hand I'm not that attentive to blogs about, say, Go
<beach> jackdaniel: I totally agree.
<euouae> I think for scientific stuff, the language doesn't really matter, so you're just using Julia, Python or C/++ if you really need to squeeze the performance
<nij-> It must have been a hard decision for them. So hard that worth being documented.
<jackdaniel> that said I get it, common lisp is terrible from various angles; just don't see the reason why it must be justified ,)
cosimone` has joined #commonlisp
<beach> jackdaniel: I have seen this phenomenon several times in the past, once with a guy who was an acquaintance of mine. I am puzzled every time.
yottabyte has joined #commonlisp
<jackdaniel> from more happy news (than people abandoning our terrible programming language), behold the resize mixin for presentations in mcclim: http://turtleware.eu/static/paste/a36672dd-mixin.mp4
<euouae> beach, I mean, the article makes a good point: you can't dispatch on double-float
<jackdaniel> well, you kind of can; most implementations actually have a class for double float
<beach> You can in some implementations.
<euouae> Yeah, that's a good point too
<White_Flame> you can't dispatch on _array of_ double-float
<Bike> do engineers do this elsewhere? someone switches the brand of rachet they use and writes a blog post about it?
<beach> euouae: I don't understand why people want their Common Lisp programs to be portable across all Common Lisp implementations, and then they go right ahead and use a single-implementation "language".
<Bike> i guess they probably do sometimes
<euouae> but reproducible results are important in science (not tied to implementation)
<jackdaniel> don't get me wrong, if I ever ditch common lisp I will write a post about how terrible the language is
<jackdaniel> ;D
<beach> I give up.
<euouae> Sometimes this is not importnat beach
<euouae> beach, Julia happens to have 1 implementation, but presumably he's using standard julia
<beach> euouae: So what is the complaint? Their favorite Common Lisp implementation can probably dispatch like that, so why not consider that particular implementation the target.
<jackdaniel> euouae: if you stick to 1 implementation, then there you have it - it either works or it does not - perfectly reproducible
<beach> Oh, Julia has a standard?
<beach> What standards organization published it?
<euouae> Because he ties his code to the implementation, which may be undesirable for reproducibility in terms of his scientific thing
amb007 has joined #commonlisp
<euouae> jackdaniel: Yeah, pinned dependencies are not fun to work with in science papers. That's not how it works.
<Bike> what beach is saying, euouae, is that if you are using julia you are necessarily doing that.
<euouae> Try reading a paper from 1970
<beach> For it to count as a "standard" of a "programming language", it would have to be published by an organization that is separate from the one that creates the implementation.
<White_Flame> euouae: this is not about reproducible results, it's about performance
<euouae> White_Flame: I'm just speculating
<White_Flame> the results do not change if the implementation specializes arrays orn ot
pfd has quit [Quit: Client closed]
<Bike> also, scientists totally just keep using fortran code that only works on one compiler from 1970, tragically enough
<euouae> Yeah that's because we know there's a reproducibility problem Bike
<euouae> We expect more quality standards to apply to our science work than in 1970
<euouae> And anyway, I'm just speculating on why they're saying what they're saying. Scientists are not programmers.
<euouae> So you can't expect that they have your enlightened point of view of the matter
<White_Flame> most depends on the IEEE standards more than anything else
<Bike> the point beach was making is that julia is totally irrelevant in this respect, since it is in fact just one implementation rather than a standard, so i don't know why you're saying this.
<jackdaniel> euouae: they say, that you can't specialize on an array of double floats; that's perfectly reproducible (as White_Flame pointed out)
<euouae> jackdaniel: what, if you fix the implementation?
<jackdaniel> no, the standard does not allow for specialization on types, only on classes
<jackdaniel> and a vector of double floats is of the class vector, period -- reproducible
amb007 has quit [Ping timeout: 252 seconds]
<White_Flame> and that doesn't change the numeric values nor the operations on them
<jackdaniel> you may cook your own code that performs additional dispatch /from the method to specialized functions/, but that's another story
<jackdaniel> and you may write it portably, like
<euouae> I think we have a communication problem jackdaniel, that's not what I'm talking about
<White_Flame> the only difference in the specialization and dispatch is performance
<jackdaniel> I believe that we have a communication problem - what you say makes little sense to me
<White_Flame> (and some storage size)
<euouae> That's like telling a hungry person that you're not a bakery, period, their problem is solved.
<Josh_2> Soyentists
<jackdaniel> you've complained about reproducibility, now you say about features
<Josh_2> beach: okay :)
<euouae> I did not complain, I speculated on the reasons that may have led the blog poster to make their blog post
<jackdaniel> so I've answered to the speculated reason - reproducibility was not one of them
<Josh_2> very nice work jackdaniel can you change fonts in McClim :thinking:
<euouae> Yes, you're not a bakery, so the hungry person's problem is solved
<euouae> We get it
<euouae> Very intelligent
<jackdaniel> Josh_2: yes, you can
<euouae> I'm busy, have a good day.
euouae has quit []
<White_Flame> wat
<Josh_2> well
<Josh_2> that was quite the reaction
<jackdaniel> euouae: what you say doesn't make sense; "- something is <a>; - it is not <a>; - well, but what about <b>?"
<jackdaniel> Josh_2: thanks!
<Bike> love of sarcasm plus inability to write clearly is a bad combination.
<beach> I do think euouae has a problem expressing things, and then gets angry when people don't understand.
<jackdaniel> a blog post about unfriendly community on #commonlisp in 3, 2, 1
<Josh_2> :sunglasses:
<Josh_2> Badge of honour
<White_Flame> I seem to understand more n00b and outsider speak than others, but I concur beach :-P
<beach> White_Flame: Heh, lucky you!
<beach> I think my training as an engineer destroyed my comprehension flexibility.
<White_Flame> hmm, but dipper was the one who asked about the blog post, get anything from all that? :-P
<jackdaniel> btw specialization of types would be implementable (sort of, similar to eql specializers), but the problem is the priority of methods - which type takes precedence over another? (integer 1 3) vs (integer 2 4) - so that would be a buggy can of worms for programmers
amb007 has joined #commonlisp
<jackdaniel> also some typep computations may get expensive, so dispatch would take a hit too
<White_Flame> template types from other langs skirt those problems by being less expressive as to always being concrete
<_death> there are about a zillion extensions to dispatch that present solutions this issue, no?
<jackdaniel> sure
<jackdaniel> one of these are presentation methods dispatched on presentation types
<jackdaniel> presentation generic functions*
lisper29 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<jackdaniel> my point is that shoehorning it directly into mop as a new type of a specializer would be doable, just not very wise
nij- has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
<dipper> sorry no offend, I just saw the article, and need someone can explain what it talk is wrong. White_Flame
<jackdaniel> I don't think that this post is wrong - it makes a valid point that you can't specialize on specialized arrays
<jackdaniel> that said you could always (macrolet ((frob () …)) (etypecase obj (a (frob)) (b (frob)) ...)); you could even dress it in a macro
<White_Flame> dipper: you didn't offend anything, euouae was just injecting things he didn't know about
<White_Flame> and yeah, for large scientific computation, you tend to want very strict specialization on numeric types, no matter their container, to compile fast code
<White_Flame> this can be done in CL, and pretty easily but the author didn't want to do it manually and opted for another language more tuned to that scenario
<dipper> thank you
amb007 has quit [Ping timeout: 252 seconds]
dipper has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<Josh_2> Just lispin around dipper
<Josh_2> rip they gone
amb007 has quit [Ping timeout: 246 seconds]
monaaraj has quit [Ping timeout: 252 seconds]
Cymew has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
Bocaneri has joined #commonlisp
Sauvin has quit [Remote host closed the connection]
Bocaneri is now known as Guest6797
monaaraj has joined #commonlisp
<pjb> Not everybody has drmeister's fortitude to write one's own CL implementation just to do one's job…
<pjb> Or even, the ability to debug and patch a single implementation bug.
amb007 has joined #commonlisp
kg7ski has quit [Ping timeout: 260 seconds]
kg7ski has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 260 seconds]
MajorBiscuit has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
amb007 has joined #commonlisp
Guest6797 is now known as Sauvin
monaaraj has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
mjoerg has joined #commonlisp
cage has joined #commonlisp
Catie has joined #commonlisp
amb007 has joined #commonlisp
mjoerg has quit [Remote host closed the connection]
_cymew_ has quit [Quit: Konversation terminated!]
_cymew_ has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
ttree has joined #commonlisp
amb007 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
cosimone` has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 260 seconds]
Sauvin has quit [Read error: Connection reset by peer]
Bocaneri has joined #commonlisp
Bocaneri is now known as Guest186
waleee has joined #commonlisp
jeosol has joined #commonlisp
Guest186 is now known as Sauvin
Inline_ has joined #commonlisp
amb007 has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
nij- has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 246 seconds]
danieli has joined #commonlisp
tyson2 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 260 seconds]
cosimone has joined #commonlisp
Inline__ has joined #commonlisp
Inline__ is now known as Inline
Inline_ has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
Inline has quit [Killed (silver.libera.chat (Nickname regained by services))]
Inline_ is now known as Inline
amb007 has joined #commonlisp
azimut has joined #commonlisp
random-nick has joined #commonlisp
attila_lendvai has joined #commonlisp
aartaka has joined #commonlisp
jeosol has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 260 seconds]
rainthree has quit [Read error: Connection reset by peer]
lisper29 has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
jello_pudding has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
amb007 has joined #commonlisp
ttree_ has joined #commonlisp
ttree has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 252 seconds]
tyson2 has joined #commonlisp
akoana has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Inline_ has joined #commonlisp
ec_ has quit [Ping timeout: 255 seconds]
_cymew_ has quit [Ping timeout: 246 seconds]
ec_ has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
igemnace has quit [Quit: WeeChat 3.7.1]
attila_lendvai has joined #commonlisp
jello_pudding has quit [Ping timeout: 246 seconds]
jello_pudding has joined #commonlisp
Guest8212 has quit [Quit: WeeChat 3.7.1]
matt` has joined #commonlisp
cosimone has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 260 seconds]
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
morganw has joined #commonlisp
kg7ski has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
kg7ski has joined #commonlisp
jeffrey has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
jmdaemon has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
Inline__ has joined #commonlisp
bilegeek has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
nij- has joined #commonlisp
<nij-> (with-open-file (*standard-output* (format nil "/Users/nij/test.txt") :direction :output)
<nij-> (format t "a") (sleep 20) (format t "b"))
<nij-> This is how I redirect things to a file.
<nij-> However, if anything bad happens during (sleep 20), the file will be deleted.
<phoe> yes
<nij-> How do I create an output stream, so that the file is written incrementally?
<phoe> nij-: manually
<nij-> That means..?
<phoe> (let ((stream (open ...))) (unwind-protect ... (close stream)))
<pjb> phoe: nope.
<nij-> Oh.. how about writing the lines before the whole thing returns?
<phoe> the unwinder for W-O-F is defined to remove the newly created file if there's an non-local transfer of control
<pjb> nij-: with :if-exists :append
<pjb> (with-open-file (*standard-output* (format nil "/Users/nij/test.txt") :direction :output :if-exists :append :if-does-not-exist :create) (format t "a"))
<pjb> (sleep 20)
<pjb> (with-open-file (*standard-output* (format nil "/Users/nij/test.txt") :direction :output :if-exists :append :if-does-not-exist :create) (format t "b"))
<nij-> pjb I have to separate that in two forms?
<pjb> Not necessarily; You can also do: (with-open-file (*standard-output* (format nil "/Users/nij/test.txt") :direction :output :if-exists :append :if-does-not-exist :create) (ignore-errors (progn (format t "a") (sleep 20) (format t "b"))))
<pjb>
<pjb> or some other error handling inside the with-open-file.
<nij-> Hmm.. but then "ab" gets written into the file only after those 20 seconds.
<nij-> Can I make it to write "a" first into the file
<pjb> you're the programmer.
<nij-> Wait for 20 secs, and then write "b" into the file?
<pjb> With finish-output.
<phoe> pjb: huh
<Bike> you might want finish-output.
<Bike> oh, jinx.
<nij-> Oh! Finish output is the thing :D
amb007 has joined #commonlisp
<phoe> I cannot reconcile the difference here
<pjb> nij-: or actually force-output if you want to start the sleeping while flushing the file.
<phoe> "If a new output file is being written, and control leaves abnormally, the file is aborted and the file system is left, so far as possible, as if the file had never been opened."
<phoe> there's an explicit jump in W-O-F and yet the file is not "aborted" and the file system is not left as if the file had never been opened
Inline_ has joined #commonlisp
<phoe> how does :IF-EXISTS :APPEND modify this behavior?
<pjb> it was for when we use two with-open-file.
<phoe> no, I mean - the way I'm reading the spec, W-O-F is specified to abort the file, but it clearly is not aborted
<pjb> phoe: ignore-error.
<phoe> what is ignore-error?
<pjb> closing a file does a finish-output, so having two with-open-file is the same as inserting a finish-output.
<pjb> clhs ignore-errors
amb007 has quit [Ping timeout: 252 seconds]
<phoe> but nij-'s original issue had only one W-O-F
<phoe> and so does my example
<pjb> The question is "How do I create an output stream, so that the file is written incrementally?".
<pjb> Not: "How do I create an output stream with a single with-open-file, so that the file is written incrementally?"
<phoe> oh, I see what you mean
Inline__ has quit [Ping timeout: 260 seconds]
pve has quit [Quit: leaving]
<pjb> Files are always written incrementally. Since they're sequences of bytes on posix systems.
<phoe> okay, I have a different question then: in https://plaster.tymoon.eu/view/3509#3509 why is a non-NIL value returned on sbcl 2.2.9?
<pjb> #sbcl
* phoe goes there!
<pjb> but otherwise, on the other implementations,
<pjb> clhs return-from
<pjb> NIL is the default.
<pjb> Or just clhs with-open-file, as you quoted, non-local exit, not errors!
matt` has quit [Remote host closed the connection]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
shka has quit [Ping timeout: 248 seconds]
jeffrey has quit [Quit: Client quit]
prokhor has quit [Remote host closed the connection]
prokhor has joined #commonlisp
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
jello_pudding has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
morganw has quit [Remote host closed the connection]
jello_pudding has joined #commonlisp
zyni-moe has joined #commonlisp