selwyn has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
lottaquestions has joined #commonlisp
Skyfire has quit [Quit: brb]
Skyfire has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Ping timeout: 252 seconds]
waleee has joined #commonlisp
lottaquestions has quit [Ping timeout: 245 seconds]
asarch has joined #commonlisp
<asarch>
One stupid question: do I need :external-format :utf-8 for with-open-file in SBCL?
igemnace has joined #commonlisp
<hayley>
It depends on the encoding of the file, and the default encoding that SBCL uses on your computer.
ski has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
<asarch>
Thank you, thank you very much :-)
waleee has joined #commonlisp
asarch has quit [Quit: Leaving]
gendl has quit [Ping timeout: 252 seconds]
gendl has joined #commonlisp
kevingal has quit [Remote host closed the connection]
splittist has quit [Read error: Connection reset by peer]
victor has quit [Ping timeout: 265 seconds]
hubvu has quit [Ping timeout: 252 seconds]
splittist has joined #commonlisp
nature has joined #commonlisp
hubvu has joined #commonlisp
victor has joined #commonlisp
Nilby has joined #commonlisp
prxq has quit [Ping timeout: 252 seconds]
prxq_ has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 245 seconds]
tyson2 has quit [Remote host closed the connection]
akoana has left #commonlisp [#commonlisp]
<beach>
Good morning everyone!
Guest-liao has joined #commonlisp
Spawns_Carpeting has joined #commonlisp
semz has quit [Ping timeout: 265 seconds]
nature has quit [Quit: leaving]
semz has joined #commonlisp
<beach>
Spawns_Carpeting: What is your objective with this work of yours? I can tell you how the Cleavir AST would look for an expression like the one that hayley showed, but that may be pointless depending on your objective.
<Spawns_Carpeting>
beach: what do you mean objective? it's just for fun/learning
<Spawns_Carpeting>
no real objective
<beach>
OK, then...
<beach>
The AST would have a parent node "function application", and it would have two children. The first child would be "function", and the second a list of arguments.
<beach>
The "function" node would then either be a "named function" AST if the operator is a symbol, or it would be an "anonymous function" AST if the operator is (lambda (x) x) as in the example hayley gavce.
<beach>
gave
taiju has quit [Ping timeout: 265 seconds]
<beach>
s/parent node/root node/ I guess.
taiju has joined #commonlisp
<Spawns_Carpeting>
that makes sense, I think I keep getting the parse tree and the AST mixed up
<Spawns_Carpeting>
AST doesn't really care that much about lists or atoms and whatnot, just about expressions
<Spawns_Carpeting>
my first AST was a flat list for each sexpr rather than an actual tree for example
<beach>
Right. The Lisp "parse tree" for something like ((lambda (x) x) 1) is trivial, and completely specified.
<Spawns_Carpeting>
yeah it would be a list with a list with list right?
<Spawns_Carpeting>
like this: [[lambda [x] x] 1]
<Spawns_Carpeting>
thats a python list syntax
<beach>
... It is a proper list of two elements. The first element is a list of three elements, and the second element is 1.
<beach>
Spawns_Carpeting: It serves no purpose to ask me in terms of Python.
<Spawns_Carpeting>
heh sorry
<Spawns_Carpeting>
what you said makes sense though for sure
donovanquixote has joined #commonlisp
<Spawns_Carpeting>
i guess I should just ignore lambdas and more advanced stuff for a while anyways
<beach>
You can't really ignore lambda expressions of you want to compile Lisp.
<Spawns_Carpeting>
its just a bytecode thing for now, technically it's nothing because nothing does anything or works at all
<Spawns_Carpeting>
this is my first time doing anything related to programming langs and parsers and stuff
<beach>
I see. Good luck.
<Spawns_Carpeting>
thanks beach, it helps quite a bit to have some pointers
<beach>
Pleasure.
<Spawns_Carpeting>
why do you say you can't ignore lambdas by the way?
<beach>
Because for Lisp, they are all over the place.
<Spawns_Carpeting>
you technically can omit them thought right?
<Spawns_Carpeting>
might be a bad idea... but possible
<beach>
Well, that's why I asked about the objectives. You can omit whatever you like if you just want to learn by tinkering a bit. But if you want to compile Lisp, you need to handle all possible constructs.
<Spawns_Carpeting>
I guess I should say "thing that slightly resembles lisp"
<Spawns_Carpeting>
with an actual lisp being a goal eventually if I get that far
<beach>
minion: Please tell Spawns_Carpeting about Cleavir.
<minion>
Spawns_Carpeting: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<beach>
minion: Please tell Spawns_Carpeting about SICL.
<minion>
Spawns_Carpeting: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
<Spawns_Carpeting>
this looks pretty cool thanks for sharing
<Spawns_Carpeting>
a lot of info as well
<beach>
Sure.
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
<gin>
quicklisp is back up! good to see that
iamFIREc1 has quit [Quit: WeeChat 3.3]
<hayley>
Spawns_Carpeting: I sort of ignored functions with my first "Lisp" interpreter, and trying to write less trivial programs drove me up a wall.
spiaggia has joined #commonlisp
<hayley>
I could also provide my own bytecode compiler, but it would be tricky to follow, as you'd need to keep the bytecode specification and intermediate languages in mind. But my (lazy) approach is to replace variable references in the input language with De Brujin indices, and then generate linear bytecode.
<gin>
hayley: is your interpreter code available somewhere?
<gin>
I too want to write my own tiny Lisp interpreter (or something like it) but don't know where to start. is it necessary to read the dragon book first?
<spiaggia>
gin: Also in order to learn how it is done?
<gin>
spiaggia: yes, a hobby project. yes, to learn how it is done and also to use it myself at least to write trivial programs
pve has joined #commonlisp
<spiaggia>
gin: I recommend "Lisp in Small Pieces" or "Anatomy of Lisp".
<hayley>
But, if you haven't written any interpreter before, I would also recommend you start with a "tree walking" interpreter which doesn't bother with bytecode.
<gin>
hayley: by tree walking, do you mean do a recursive descent in the abstract syntax tree and evaluate each node on the fly?
<gin>
spiaggia: thank you for the recommendation. looking them up
<hayley>
Yes, but you don't even have to bother with producing an AST. Just dispatch on the nested list structure.
<spiaggia>
gin: Lisp in Small Pieces is more modern, but I like them both for different reasons.
<gin>
hayley: oh! that sounds simple. worth a try.
<Spawns_Carpeting>
I will check that out tomorrow hayley thanks. I am heading to bed right now and will be back tomorrow!
<gin>
5
<gin>
ignore '5' above. typo
<Spawns_Carpeting>
also gin maybe we could chat sometime since we are both working on very similar things!
<gin>
lisp in small pieces - 500 pages. sounds like going to take hard work. have to plan time for it.
<gin>
Spawns_Carpeting: sure. what are you working on now?
<Spawns_Carpeting>
working on going to sleep haha
<Spawns_Carpeting>
sorry I have to wake up in a little bit
<hayley>
The book covers a few interpreters (tree walking and bytecode) and then compilation to C, so it makes good use of 500 pages to me.
<gin>
anatomy of lisp - 464 pages. so two hefty books. will start with only one. out of anatomy of lisp and lisp in small pieces which one do you recommend me, a beginner who has never implemented an interpreter?
<Spawns_Carpeting>
but a bytecode VM for a lang that at least resembles lisp
<Spawns_Carpeting>
bytecode VM / bytecode compiler
<gin>
ok, so you have a bytecode VM where the bytecode language is like Lisp?
<Spawns_Carpeting>
the VM is just a standard VM with asm like opcodes, the source language is what I want to be lisp like
<Spawns_Carpeting>
I don't care too much about the VM itself honestly
* hayley
scratches head
<gin>
Spawns_Carpeting: ok
<Spawns_Carpeting>
so you write lispy programs, it gets compiled to your standard PUSH/POP/JUMP style opcodes
<spiaggia>
gin: Anatomy of Lisp could be hard to find.
<gin>
anyone has learnt programming with Logo here? always wanted to ask, is Logo really a dialect of Lisp? i see it mentioned often.
<gin>
spiaggia: that is nice. makes it easy for me. will start with lisp in small pieces.
<Spawns_Carpeting>
what is your goal gin ?
<hayley>
I dunno, but based on (fortunately) infrequent discussions, I sometimes wonder if Common Lisp is a dialect of Lisp.
<spiaggia>
gin: Good. And the translation was made by an excellent translator, making the English version better than the original.
<gin>
interesting there is #logo channel too on this irc.
gaqwas has joined #commonlisp
<gin>
Spawns_Carpeting: goal is to create a small Lisp or Lisp-like language for fun, learning, and also using it to solve small problems like tiny calculations for which I usually use python these days.
<spiaggia>
gin: In fact, the translator was the only person who got promoted to "distinguished writer" at the French ILOG company that used to sell Lisp systems and tools.
<spiaggia>
gin: Her first programming language was Lisp and she has a PhD in English.
<hayley>
(Of course, the answer is no, CL is very clearly Smalltalk. They both have late binding of most things, useful type systems, and no datum that isn't an object :)
amb007 has quit [Ping timeout: 265 seconds]
icer has joined #commonlisp
<spiaggia>
gin: And if you bring your copy of Lisp in Small Pieces to ELS, she will sign it for you.
<gin>
spiaggia: woah! talk about combining two skills to create a very niche set of skills. i have often heard this advice is that the best way to make a mark in the world is to take two good skills you have and combine them because the combination would become a niche set of skills that very few other people may have
<gin>
spiaggia: like XKCD guy - tech + drawing comics
amb007 has joined #commonlisp
<spiaggia>
gin: Indeed.
<susam>
Is ELS going to be physical (as opposed to virtual) this year?
<hayley>
I heard it will be a bit of both. Best double-check...
<hayley>
There's a physical location for ELS 2022 (the ELS this year happened last May), but no mention of an online part on the ELS website.
<hayley>
Oh, helps if I check my emails. Didier Verna said "We will also arrange to remain hybrid so that people can physically attend, or follow online!"
<spiaggia>
susam: Yes, as hayley says, both. The location is Porto, Portugal.
Skyfire has quit [Ping timeout: 260 seconds]
<susam>
Thanks hayley and spiaggia.
<spiaggia>
Sure.
<susam>
I am new to this community, by the way. I began joining this channel only since last year although I have been on IRC for 15 years. Attended the last ELS virtually. The talk on Extempore blew my mind. I would like to attend this year's too. Perhaps virtually because I don't live in Europe.
<spiaggia>
susam: We have regular visitors from the US, Japan, etc.
<spiaggia>
s/visitors/participants/
<hayley>
I had hoped to visit last year (from Australia), and also catch the last tour of The Stranglers if possible, but both were stopped by the pandemic. I'll see what I can do for ELS 2022.
Spawns_Carpeting has quit [Ping timeout: 265 seconds]
<spiaggia>
hayley: It is worth going. Just putting a face to many of the people we interact with is worth it.
<hayley>
Definitely.
pranavats has left #commonlisp [#commonlisp]
<susam>
Very nice. I will probably only be a visitor (a lurker). Hoping to participate some day. Although I learnt CL long time ago, it is only recently that I have begun using it seriously for some of my hobby projects.
<susam>
gin: Yes, Logo has had a lot of Lisp influence. I talked to an LCSI Logo developer sometime back and the LCSI logo (which is the same as Atari Logo and IBM PC Logo) were developer by experienced Lispers. Emacs + an assember written in Lisp + a debugger written in Lisp were their development tools.
<spiaggia>
susam: I don't know if you habitually go to computing conferences, but you can be a participant without presenting anything, and in fact, most people are. There might be 15 presentations or so, for around 90 participants. The thing about going is not so much about the presentations, but about the discussions with the participants during the breaks, or over meals and coffee breaks.
<susam>
gin: I even remember seeing "plist" in one of the Logo manuals.
shka has joined #commonlisp
<susam>
spiaggia: Makes sense. Thanks for the insight.
<spiaggia>
Sure.
Cymew has joined #commonlisp
makomo has quit [Quit: WeeChat 3.2]
jackdani1l is now known as jackdaniel
jackdaniel has joined #commonlisp
jackdaniel has quit [Changing host]
<jackdaniel>
o/
<hayley>
\o
donovanquixote has quit [Quit: Leaving]
pranavats has joined #commonlisp
<spiaggia>
Hello jackdaniel.
Skyfire has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
spiaggia has left #commonlisp [ERC Version 5.3 (IRC client for Emacs)]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
taiju has quit [*.net *.split]
sm2n has quit [*.net *.split]
luna-is-here has quit [*.net *.split]
jcowan has quit [*.net *.split]
scymtym has quit [*.net *.split]
mzan has quit [*.net *.split]
Alfr has quit [*.net *.split]
borodust has quit [*.net *.split]
terrorjack has quit [*.net *.split]
mingus has quit [*.net *.split]
samebchase has quit [*.net *.split]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
pranavats has left #commonlisp [#commonlisp]
makomo_ has joined #commonlisp
random-nick has joined #commonlisp
taiju has joined #commonlisp
mzan has joined #commonlisp
terrorjack has joined #commonlisp
sm2n has joined #commonlisp
luna-is-here has joined #commonlisp
jcowan has joined #commonlisp
scymtym has joined #commonlisp
mingus has joined #commonlisp
borodust has joined #commonlisp
samebchase has joined #commonlisp
Alfr has joined #commonlisp
makomo_ has quit [Ping timeout: 265 seconds]
terrorjack has quit [Max SendQ exceeded]
terrorjack has joined #commonlisp
makomo_ has joined #commonlisp
cjb has quit []
gaqwas has quit [Ping timeout: 245 seconds]
notzmv has quit [Ping timeout: 250 seconds]
robin has quit [Remote host closed the connection]
hendursa1 has joined #commonlisp
<pve>
Hi, is it stylistically ok to use strings in a defpackage form, e.g. (:export "CAT" "MEOW" "PURR" ...)?
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
robin has joined #commonlisp
makomo_ has quit [Ping timeout: 252 seconds]
<beach>
pve: I personally think it looks ugly if you then use lower-case letters in the code, which is why I use uninterned symbols instead.
<beach>
The other problem with strings is that it may not work when the readtable changes. If you use uninterned symbols, there is a better chance that the name of the symbol you use in code is going to be the same as that of the uninterned symbol. I am thinking particularly of Franz "modern mode".
<beach>
pve: But it is not a big problem, so use strings if that's what you want.
Tomte has joined #commonlisp
Tomte has quit [Remote host closed the connection]
<pve>
beach: Ok thanks. Now that I think about it, this might even be just a matter of syntax highlighting. I like how the strings stand out a bit among the keywords.
cosimone has quit [Remote host closed the connection]
<pve>
Perhaps I should tell emacs to highlight uninterned symbols differently..
cosimone has joined #commonlisp
<pve>
And I had not thought of the "modern mode" problem
<beach>
pve: I have said this several times, but let me say it again: Emacs syntax highlighting is mediocre at best. It doesn't take different roles of symbols into account. It seems wrong to highlight all uninterned symbols the same no matter the role, and it seems wrong to highlight all strings the same too.
<beach>
pve: I use Emacs for Common Lisp programming only because we don't have anything better yet. But we are working on it.
<JeromeLon>
(let ((*message* *messages*)) (do something that indirectly (and temporarily) changes and uses *messages*))
<JeromeLon>
I remember getting an sbcl warning about this (using lexical variable for a name that looks like a dynamic one)
<JeromeLon>
But I am not getting it anymore. Does anyone have any idea what circumstances are triggering it?
<beach>
JeromeLon: It would be highly unusual to initialize a variable with a name in singular form with a variable in plural form.
<pve>
beach: Oh, are you saying that, for example, exported symbols in a defpackage form (written as uninterned symbols) could be highlighted differently than uninterned symbols elsewhere in the code?
<beach>
pve: They should, yes.
<beach>
pve: And the strings used in the :EXPORT clause should be highlighted the same as the uninterned symbols in that clause.
<pve>
beach: That had never occurred to me, but it does seem like a much better way.
<beach>
I.e., the role is more important than the precise nature of the token.
<cosimone>
there are some emacs theems, such as dracula, that do highlight documentation strings differently with respect to other strings
<cosimone>
however, using a declare expression beforehand fools it into thinking it's a regular string
<Nilby>
hmmm, my emacs setup seems to highlight 'foo :foo #:foo "foo" all differntly
<mfiano>
Then it is behaving correctly
<beach>
cosimone: The technique used by Emacs is intrinsically broken.
<JeromeLon>
beach: or maybe that was my mistake? yes, it was probably a typo, I can reproduce. Thanks!
<beach>
Nilby: Exactly, and that's wrong.
<cosimone>
it's not the smartest there is, that's for sure
<Nilby>
beach: Why?
<beach>
Nilby: Because, as I said, if the role is the same, the highlighting should be the same.
<mfiano>
I do not consider _that_ aspect of Emacs highlighting wrong. I wouldn't want it any other way
<cosimone>
i think a lot of the logic used to highlight common lisp is the same as the one used for emacs lisp, but i could be wrong
<loke[m]>
I'll have to check the spec, but I'm pretty sure that the declarations have to come after the docstring.
<cosimone>
i modified color-identifiers.el a bit to account for common lisp, it does provide a nicer and much richer highlighting
<beach>
mfiano: I'll remember not to recommend anything else then.
<cosimone>
btw is there some shorthand to invoke the hyperspec, this is murdering my eyes
<beach>
mfiano: Do you think it is fine that 1. The first DEFMETHOD is highlighted as if it were an operator, and 2. that the second DEFMETHOD is not highlighted the same as the first?
<beach>
mfiano: I am saying that the IDE we are working on would not be for you.
<mfiano>
beach: I wasn't talking about semantic highlighting. I was talking about the atom type differentiations.
<beach>
mfiano: So in (defpackage ... (:export "FOO" 'bar) you want FOO and bar highlighted differently?
<beach>
Er, bar, not 'bar
<mfiano>
I would make lots of mistakes if my uninterned symbol was the same color as a keyword symbol as an argument to a function for example.
makomo_ has joined #commonlisp
<mfiano>
Since it is easy to miss at a glance (only an additional character)
<beach>
But I never suggested that.
<mfiano>
I was replying to Nilby's observation
<beach>
On the other hand, if you do (f :foo :foo) and F is (defun f (&key foo)...) I would definitely want the second :foo to be highlighted differently.
<beach>
mfiano: I see. I'll be quiet then.
<mfiano>
Maybe, but I think that is subjective.
<_death>
cosimone: declarations can come before or after docstring
<beach>
I maintain that the role of a token is more important than its exact syntax. And I maintain that Emacs is unable to take the role into account.
<mfiano>
Why will you "refuse to make suggestions" and "be quiet" over different opinions? Lisp's main strengths include the flexibility it gives programmers and listening to other opinions is always welcome. That sounds sort of a childish response..
<cosimone>
_death: yes, i noticed that too, if i run (documentation ...), i can still see the string
<beach>
mfiano: I just meant that I won't argue with you since you were not referring to any of my suggestions.
<ecraven>
beach: well, emacs *could* do this by just sending the form to swank for fontification
<ecraven>
it just doesn't do this ;)
<mfiano>
Ok, then I apologize.
<_death>
cosimone: the splicing notation [[a | b]] does not impose an order
<cosimone>
it's up to personal preference, but i think the "canonical" form seems to be declarations first
<beach>
ecraven: Yes, of course.
<cosimone>
_death: i see, i wasn't aware of that
<mfiano>
I welcome all opinions on style. It is the collective style that helps us grow.
<ecraven>
but I definitely agree that better fontification would be a boon
<ecraven>
also, nested presentations :-/
<_death>
cosimone: in my experience (and in my style) declarations tend to come after
<beach>
ecraven: I can't agree more.
<cosimone>
yes, i prefer it too
<ecraven>
I've been thinking about that on and off, actually *parsing* s-expressions for fontification in emacs, not just regex-matching them
<ecraven>
and even better than parsing, using a running system to know *what* anything is actually
<beach>
ecraven: We are working on it.
<ecraven>
beach: where, if I may ask?
<ecraven>
I mean, in what context?
<beach>
ecraven: Second Climacs uses READ (in the form of Eclector) to parse the buffer contents, so that it can take custom reader macros and such into account. And scymtym has been doing work on syntax analysis of the result.
<beach>
ecraven: The main thing stopping me (or us) from making progress is that I still need to figure out how to compute indentation.
<ecraven>
ah, but that means losing all the rest of my Emacs packages :-/
<ecraven>
hehe, indentation is just insanely complicated
<beach>
Not if you have an AST that represents the contents. :)
<ecraven>
for example, emacs "incorrectly" indents '(foo bar\nbaz quux), where I *want* foo and baz to start at the same column (because it's all "data").
<beach>
ecraven: And yes, it is not Emacs.
<ecraven>
the problem isn't Emacs per se, but all the existing modes in Emacs
<mfiano>
Want to know my worst example of Emacs CL indentation failure?
<beach>
ecraven: But, again, to do it right, you need to parse the contents using Common Lisp READ.
<beach>
mfiano: Yes please!
<beach>
My favorite example is (let ((prog1<newline>...)))
<mfiano>
in an asdf:defsystem :depends-on form, if the first dependency is a symbol that begins with DEF, it indents the rest of the list very strangely. It also doesn't matter if its a symbol, keyword, or uninterned symbol prefix.
<ecraven>
well, that's because Emacs only knows the symbols, not what they are bound to ;)
<mfiano>
I like to sort my dependencies lexicographically, and in one project #:defpackage-plus was first. Big mistake :)
<beach>
ecraven: Or, as I put it, it doesn't know the "role" of the symbols.
<ecraven>
yea
<_death>
there is a discussion about precisely these indentation issues current on emacs-devel
<jackdaniel>
automatic indentation was supposed to save the programmer from certain cosmetic dillemas but given how much headache comes from invalid indentation (or of implementing the right thing), that claim seems to be shaky ,)
<beach>
jackdaniel: I maintain that the problems are due to a fundamentally flawed technique for computing indentation.
<mfiano>
beach: Try making the car of a :depends-on form something like #:DEFACE
<beach>
mfiano: I believe you, and I am not surprised.
<mfiano>
It is absolutely horrible after reindenting.
<mfiano>
beyond anything I have seen, even the prog1 thing
<jackdaniel>
beach: I know; I wonder what would be the correct approach for editors that aim to target multiple languages with indentation rules that depend on the role of a symbol
<mfiano>
Semantic indentation I agree with much more so than semantic highlighting.
<jackdaniel>
probably such editor would need to implement at least a part of a compiler for each supported language
<jackdaniel>
(and this is more common in ides lately I think, not necessarily for indentation but for completion and such)
<pjb>
gin: but then, if you want to go beyond the toy tiny lisp interpreter, reading LiSP is indeed a very good idea.
<beach>
jackdaniel: I seriously doubt that there is a uniform approach that can take different languages into account. Each language would need a parser that recognizes that language, in our case READ. And it needs to be incremental to handle large buffers, which I suspect is not even possible in most languages.
cosimone has quit [Remote host closed the connection]
<pjb>
gin: and the latest edition of the Dragon Book, Compiler Principles Techniques and Tools, Aho et al. http://dragonbook.stanford.edu/ if you want to go beyond (other languages with parsers, code generation, the latest edition even covers some garbage collection).
<_death>
beach: for languages without programmable syntax there's the tree-sitter approach
<pjb>
gin: LiSP is 500 pages, but it describes actually 11 interpreters/compilers refining them from simplistic to sophisticated, so it's more like 11 times 45 pages. You can process 45 pages ;-)
<beach>
_death: Sure, but I suspect that for languages with complicated syntax rules, there will be many more cases where the entire buffer parse result will be invalidated by a single keystroke.
Everything has joined #commonlisp
<beach>
I may be wrong of course.
pranavats has joined #commonlisp
<_death>
beach: depends on the keystroke :).. but I think it seems to work in practice, so IDEs (and emacs..) adopt or experiment with it
<mfiano>
beach: tree-sitter is supposed to be fault tolerant for things like that, though i don't know how that works in process
<pjb>
beach: at least, emacs can highlight docstrings differently from literal strings.
<beach>
_death: Sounds good.
<mfiano>
practice*
<pjb>
Well, I've seen it do it once. I can't reproduce right now… :-/
<shka>
hey, any info on when the quicklisp comes back?
attila_lendvai has joined #commonlisp
<pjb>
I've see messages telling it's back already.
<pjb>
it pings.
<ecraven>
I just opened the homepage, seems to be there
<shka>
yeah, works for me as well
<shka>
had a problem in the morning
selwyn has joined #commonlisp
attila_lendvai_ has joined #commonlisp
flip768 has quit [Read error: Connection reset by peer]
flip214 has joined #commonlisp
<flip214>
when using FORMAT with ~s, can I make the output (nested in a sublist) of floats like with ~f instead of ~e? for this use case 123456789123.456 is easier to read/compare than 1.234…e9.
<loke[m]>
"A declare expression, sometimes called a declaration, can occur only at the beginning of the bodies of certain forms; that is, it may be preceded only by other declare expressions, or by a documentation string if the context permits."
cosimone has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 265 seconds]
<flip214>
pjb: well, it's not necessarily on the first level
rain3 has joined #commonlisp
<flip214>
of course, if I knew how many levels deep the sublists go (yeah, so more like a tree), I could use ~{ ~}. In fact, I already do, for one level ;)
<_death>
you can try with a different pprint-dispatch table
<flip214>
but I hoped that there's some *print-* variable that I could change
cosimone has joined #commonlisp
<flip214>
_death: ah, thanks, that looks promising
scymtym has quit [Ping timeout: 252 seconds]
makomo_ has quit [Ping timeout: 252 seconds]
cosimone` has quit [Ping timeout: 252 seconds]
notzmv has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.3]
makomo_ has joined #commonlisp
<beach>
Shinmera: As you know, I object to the term "compiled language", but I can understand that you may have to simplify things, given the audience.
amb007 has quit [Read error: Connection reset by peer]
<beach>
Shinmera: "We explore... games in detail" sounds like "in detail" refers to the games. Maybe "We explore in detail ... games"
amb007 has joined #commonlisp
<beach>
Shinmera: "In CLOS methods ..." looks like "methods" are attached to CLOS. I would insert a comma: "In CLOS, methods ...".
scymtym has joined #commonlisp
<beach>
"specialise on .. arguments" -> "specialise to ... parameters"
makomo_ has quit [Quit: WeeChat 3.2]
makomo has joined #commonlisp
sp has joined #commonlisp
<beach>
Shinmera: "All of the methods require" I would write as "Each of the methods requires".
sp has quit [Changing host]
sp has joined #commonlisp
<beach>
Shinmera: "only really shines once ..." -> really shines only once..."
<sp>
Hello!
<beach>
Hello sp.
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<susam>
Hello beach! That other nick (sp) is just my other nick connected via Matrix bridge. I was just testing out the Matrix-Libera bridging.
* sp
is susam
<beach>
Shinmera: "the superclass's method" -> "the method of the superclass"
<beach>
susam: Yes, I saw that from the nick changes.
<susam>
Oh yes, the cloak and ircname displays it. Don't have to explain then.
<beach>
Shinmera: My (admittedly small) family says that demonstrative pronouns should be followed by a noun phrase. "To implement this [...], "
<beach>
Shinmera: "to the enemy class' superclass list" -> "to the list of superclasses of the enemy class"
<beach>
Shinmera: "when determining the set of" is a dangling participle that many people don't like. "when the set of ... is determined".
<beach>
"the emitter's :before method" -> "the :before method of the emitter"
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<beach>
"when segregating behaviours" [also a dangling participle] "when behaviors are segregated"
<beach>
Shinmera: "out of the gate"? Do you mean "out of the box"?
<beach>
Shinmera: "when designing the overall" [dangling participle]
<beach>
Shinmera: "when handled, the stack unwinds" is a misplaced modifier.
<beach>
Shinmera: "when handled, the condition causes the stack to unwind", except that is not true. Handling a condition does not cause the stack to unwind.
<Shinmera>
? the handler of handler-case is executed after unwinding.
<beach>
Did you say HANDLER-CASE?
<beach>
I don't see it.
<Shinmera>
in this first section I'm talking about handler-case, as that's the construct analogous to try/catch in other languages. I then refine it to distinguish with handler-bind later.
<beach>
And it is not the handling that causes it. It's the non-local control transfer that is part of the macro HANDLER-CASE.
<beach>
Hmm, OK, that's not clear to me.
<Shinmera>
sure. I'm not going to go into that much detail here.
<jackdaniel>
fwiw I have a local utility handler-case* that executes the handler /before/ unwinding the stack (built on top of handler-bind)
<beach>
Shinmera: Anyway, i need to take a lunch break. I'll read more later.
<Shinmera>
Thanks, I'll go through your revisions in a bit!
<Shinmera>
Enjoy your lunch
<beach>
Thanks.
random-nick has quit [Ping timeout: 265 seconds]
amb007 has quit [Read error: Connection reset by peer]
frgo has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<madnificent_>
Xach: Probably not the best time to say so, but with QuickLisp being down I realized I do appreciate it existing very much. It's been a game changer. There's something stopping me from adding things I need to it which I can't point my finger to so I'm sure it'll keep gaining momentum. Thank you.
madnificent_ is now known as madnificent
Lycurgus has joined #commonlisp
sp has quit [Quit: Reconnecting]
sp has joined #commonlisp
sp has quit [Client Quit]
sp has joined #commonlisp
shka has quit [Ping timeout: 245 seconds]
loskutak has joined #commonlisp
tyson2 has joined #commonlisp
Cymew has quit [Ping timeout: 265 seconds]
frgo has joined #commonlisp
kevingal has joined #commonlisp
random-nick has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
Lycurgus has quit [Quit: Exeunt]
lad has joined #commonlisp
Cymew has joined #commonlisp
igemnace has joined #commonlisp
fengshaun has quit [Ping timeout: 268 seconds]
Bike has joined #commonlisp
patrice has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
lottaquestions has joined #commonlisp
shka has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 268 seconds]
shka has quit [Quit: Konversation terminated!]
heisig has joined #commonlisp
hisacro has quit [Ping timeout: 265 seconds]
jeosol has quit [Ping timeout: 252 seconds]
SAL9000 has quit [Quit: WeeChat 3.1]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
igemnace has quit [Remote host closed the connection]
SAL9000 has joined #commonlisp
Cymew has quit [Ping timeout: 252 seconds]
SAL9000 has quit [Ping timeout: 250 seconds]
makomo has quit [Ping timeout: 252 seconds]
loskutak has quit [Ping timeout: 265 seconds]
philnum[m] has joined #commonlisp
SAL9000 has joined #commonlisp
fengshaun has joined #commonlisp
hisacro has joined #commonlisp
Guest-liao has quit [Quit: Client closed]
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
SAL9000 has quit [Quit: WeeChat 3.1]
heisig has quit [Quit: Leaving]
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
tyson2 has quit [Client Quit]
jealousmonk has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
euandreh has quit [Ping timeout: 245 seconds]
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
Devon has joined #commonlisp
kevingal has quit [Remote host closed the connection]
SAL9000 has joined #commonlisp
aeth has quit [Ping timeout: 252 seconds]
lad has quit [Ping timeout: 252 seconds]
<Devon>
What caused yesterday's QuickLisp.org outage?
aeth has joined #commonlisp
makomo has joined #commonlisp
<Shinmera>
registrar didn't propagate records in time
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123>
Is it true that loop for x in y append z is inefficient?
<beach>
lisp123: No. Since it is APPEND, Z has to be copied, but that's not more inefficient than it would be to copy it in other situations.
<Bike>
the way that's usually implemented, it doesn't actually use append, and each z is only copied once
<lisp123>
beach & Bike: Great thanks.
<beach>
lisp123: What made you think it was inefficient?
<lisp123>
https://ccrma.stanford.edu/CCRMA/Courses/AlgoComp/cm/doc/contrib/lispstyle.html --> Remember that append copies its arguments. Avoid using append inside a loop to add elements to the back of a list. Use the collect clause in loop, or push elements onto a list and then nreverse the list to return the original ordering.
<Bike>
that sounds like it's talking about doing (append list (list elem)) which is actually kind of dumb
<beach>
Exactly.
<beach>
lisp123: That's totally different.
<lisp123>
Thanks for confirming. I felt it was something like that but got threw off because it said use a collect clause in a loop so wasn't 100% sure if it also applied to an append clause in the loop macro
<lisp123>
I was aware of the CMU Guide to Lisp, but not all the FAQs
frgo has quit [Remote host closed the connection]
<beach>
And if Z is known to be freshly allocated, you can use NCONC instead of APPEND.
lottaquestions has quit [Ping timeout: 245 seconds]
<lisp123>
Thanks, good to know
amb007 has quit [Ping timeout: 268 seconds]
euandreh has joined #commonlisp
amb007 has joined #commonlisp
frgo has joined #commonlisp
scymtym_ has joined #commonlisp
scymtym has quit [Ping timeout: 252 seconds]
<pjb>
lisp123: the problem I have with loop for x in y append z is not that it's inefficient, it is that it's implemented in a non-conforming way in all implementations! The standard says that it should be implemented as (apply (function append) y), which implies that all the x in y are copied BUT THE LAST one! But all implementations copy all the elements: https://termbin.com/pjyq
<beach>
Interesting. I believe SICL LOOP has the same issue.
<beach>
I should figure out how to fix that.
makomo_ has joined #commonlisp
<beach>
I think it would work to have 2 "tail pointers".
scymtym_ has quit [Ping timeout: 265 seconds]
caret has joined #commonlisp
<beach>
When APPEND is used, the cells between the two are copied.
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
<beach>
And COLLECT X could then be implemented as APPEND (LIST X)
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<beach>
Nah, forget that last one.
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<lisp123>
pjb: what are the implications of not copying the last one? I saw that in the standard but didn't realise what it means. Does it mean less memory should be used? And if one changes the last element then the appended list also should change?
nowl has joined #commonlisp
<pjb>
lisp123: in general, indeed, it doesn't mean much, only some memory is reused. But if you mutate the original lists, then the mutations on the last one will be reflected on the appended list. And properties such as: tailp ldiff will break.
<lisp123>
I see. The implementations should be held to account! I wonder if there was a specific discussion done on this during ANSI process (perhaps alluding to the same points you just mentioned)
<pjb>
tailp/ldiff can be used to represend circular lists without circularity; this is how prolog does it. So it may be important for some algorithms…
<lisp123>
That sounds pretty important :(
<pjb>
The standard is quite explicit on this point.
<lisp123>
Yes, I noted that as well every time I read it
<pjb>
Now, I admit that the behavior of the implementations is valid; we may want to amend the standard on this point… But it's a formal non-conformity.
<pjb>
If only they documented it! Implementations are allowed to diverge (they become a superset of a subset of CL), but only if they document both the subset and the superset!
<lisp123>
Agree. I feel bad for someone who may have relied upon that point, assuming it was true
<pjb>
We would discuss this on cll; nowadays there doesn't remain much common place where all implementers can discuss those problems. We could make a lightning talk at next ELS…
<_death>
I don't think this behavior is worth the trouble in loop-append though
<pjb>
But it must be documented.
<pjb>
one way or the other.
<pjb>
I'll post an issue on WSCL
<copec>
Do you still :use between separate lisp files that will make up a single system that will have the package name that should be used (via pln's). Or do you even pln between the separate lisp files (each file in its own "subpackage")?
amb007 has quit [Read error: Connection reset by peer]
hendursa1 has quit [Quit: hendursa1]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
hendursaga has joined #commonlisp
amb007 has joined #commonlisp
<Shinmera>
Who are you talking to?
rain3 has quit [Ping timeout: 265 seconds]
<copec>
The proverbial you
<Shinmera>
Ah. I do not use one package per file as I think it's a horrible idea. I use plns a lot, and never :use a package unless it's specifically designed for that.
waleee has joined #commonlisp
<copec>
I see, thank you
amb007 has quit [Ping timeout: 252 seconds]
<beach>
I totally agree with Shinmera.
<Fade>
thirded
amb007 has joined #commonlisp
<copec>
Shinmera: For a project that you want to make a singular system, do you use a file for the defpackage form, for what you want to export, and then just in-package the same package the rest of the files, I take it?
<copec>
and put all the files as :components in the asdf:defsystem form under the .asd file?
<Shinmera>
To me packages are part of the user interface. As such, I make as many packages as I think is appropriate for the user. Typically this is one, but sometimes it is more. I put those into a package.lisp, and then use in-package as appropriate.
<Shinmera>
And yeah, listing the files is NBD.
frgo has quit [Remote host closed the connection]
<etimmons>
I drank the whole package inferred system, one package per file kool aid a while ago, but have been souring on it as of late.
<copec>
^me too
<Shinmera>
Files are part of the internal interface. They are an implementation detail that should serve to organise code how it makes sense to you, not to the user.
amb007 has quit [Ping timeout: 265 seconds]
<copec>
I was hoping it would also cut along the aspect of making code more readable, since I was generally my-system-name/file-name for the package along each file
<copec>
Then use the other files that I needed to
rgherdt__ has quit [Remote host closed the connection]
<etimmons>
I still think it has its merits in some circumstances, but I realized what I really liked about it was the ability to locally declare dependencies, on both other files internal to the same system and other systems.
amb007 has joined #commonlisp
<selwyn>
can files be too long?
<etimmons>
I started work on an ASDF extension that was basically package-inferred-system, but did not require one package per file.
<etimmons>
Sadly, I haven't had the time to go back and finish it yet now that some of the support it needed from ASDF has been exported
rogersm has joined #commonlisp
<Shinmera>
selwyn: imo, very much yes
<copec>
selwyn, There is probably some limit in an arbitrary component to be reached with file length, but generally they are divided up according to how a programmer wants to organize, which ideally should fall a long lines most commonly understood
<copec>
🤷
frgo has joined #commonlisp
tyson2 has joined #commonlisp
<copec>
One more question Shinmera: How do you quickly find in which file where a definition is for a symbol for a respective namespace is defined?
<copec>
I realize this is a more practical question rather than CL
<Shinmera>
I M-.?
<selwyn>
me too
<selwyn>
but common lisp source files are not always viewed in emacs
Cymew has joined #commonlisp
<selwyn>
which is an argument for shorter source files
<Shinmera>
idk man if you need to know that info without emacs just boot emacs up
<Shinmera>
I can't really think of a situation where one really needs to know this but can't access emacs
<selwyn>
a repo on github that i don´t want to/can´t clone at the moment
<Shinmera>
sounds like a bad reason to force the entire code organisation into a specific style :v
<selwyn>
well, ok
cosimone has joined #commonlisp
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
nowl has quit [Quit: Leaving]
amb007 has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
Cymew has quit [Ping timeout: 265 seconds]
lottaquestions has joined #commonlisp
lisp123 has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
makomo_ has quit [Quit: WeeChat 3.2]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
tyson2 has joined #commonlisp
waleee has quit [Ping timeout: 250 seconds]
lottaquestions has quit [Ping timeout: 245 seconds]
<pjb>
selwyn: that said, when you browse C sources where there's one function per file, you realize that it's going to far too.
waleee has joined #commonlisp
<pjb>
My current answer is that we should let the editor decide where to store stuff.
<White_Flame>
cue rant about tiles themselves being a problem
<White_Flame>
*files
<White_Flame>
forcing a linearization of your code, instead of being a set of declarations & scopes, and having more flexible organization in viewing & editing
Nilby has quit [Ping timeout: 260 seconds]
lisp123 has quit [Quit: Leaving...]
<pve>
do you mean something like the Smalltalk class browser?
<White_Flame>
pve: that's only one idea, but anything that doesn't lock you to the happenstance location in files is good
scymtym has joined #commonlisp
<White_Flame>
copec: abstractions overlap, and different functions/declarations have different relations, just not prev/next inside a section
hineios has joined #commonlisp
<pve>
White_Flame: yeah, I think I saw on reddit that someone was working on a "class browser" type emacs mode (possibly integrated with slime).. it looked pretty interesting, but I'm not sure how serious it was
<pjb>
pve: yes, for the browsing user interface, indeed.
<copec>
Yeah, it usually becomes "there is too much going on in this single file", so the arbitrary spot that there are less specific details that are convenient to digest together, make the cut there and start a new file
<ecraven>
is there any short tutorial on how to read a binary file into some sort of sequence and then access it as various different number formats at given offsets? (u32le, u16be, and so on)
<copec>
Then when all done, it becomes clear where it makes more sense to divide up, so I end up moving source around anyways. I have never seemed to have gotten enough experience to call that out ahead of time
<ecraven>
pjb: unfortunately I have mixed data, it's not all one datatype :-/
<pjb>
ecraven: well, the point is to load the bytes, and then to decode them.
<pjb>
You can use displaced arrays.
<ecraven>
yea, how *do* I best decode them? overlapping displaced arrays?
<ecraven>
ah, ok. thanks!
<pjb>
Well, you use a decoding library anyways. There are several.
<ecraven>
does common lisp support pdp byte ordering (
<ecraven>
"middle endian") out of the box?
<pjb>
I don't know any implementation having a :external-format that let you specify that for binary file.
<pjb>
The standard says: The external-format is meaningful for any kind of file stream whose element type is a subtype of character.
<pjb>
but implementation could add external-formats for binary files.
<White_Flame>
ecraven: CL doesn't expose the memory layout
<pjb>
So, the usual: only octet binary files, and decode yourself.
<pjb>
Since octet binary files is what posix provides.
<ecraven>
thanks ;)
gaqwas has joined #commonlisp
<ecraven>
can loop collect into an array?
<White_Flame>
I usually use MAP for that, although if you need extended features of LOOP like conditionall COLLECT, then yeah that's harder
<White_Flame>
if you don't care about GC pressure, you can always (coerce (loop .. ) '(vector ...))
<ecraven>
thanks ;)
<yitzi>
You could use `do (vector-push ...)`
<yitzi>
and just return it.
<White_Flame>
if you need to do soemthing like that, I prefer (map (make-array size) (lambda () ...)) to generate them
<pjb>
or (loop for d from 0 for e in list do (setf (aref destination d) e) (incf d))
<pjb>
or (loop for d from 0 for e in list do (setf (aref destination d) e))
<copec>
It's generally not CL style, but I pretty much always factor complicated loops into recursive algorithms, using function tail recursion, and under SBCL it has always been quicker too
rogersm has quit [Quit: Leaving...]
Spawns_Carpeting has joined #commonlisp
caret has quit [Read error: Connection reset by peer]
Lycurgus has joined #commonlisp
lottaquestions has joined #commonlisp
Psybur has joined #commonlisp
lottaquestions has quit [Ping timeout: 250 seconds]
jeosol has joined #commonlisp
lottaquestions has joined #commonlisp
<copec>
White_Flame, what kind of organizational system would you have in mind? Storing the code in some sort of DB under declarations & scopes?
<pjb>
copec: this could still be files, for compatibility with current tools (git, asdf, quicklisp).
<pjb>
copec: but the point is that where to put the code would be decided by the system.
<pjb>
copec: the heuristic would start with 1 package = 1 file, plus some topological sorting of dependencies (compilation-time and run-time), so eval-when or separate dependent files would be generated automatically.
Mandus_ has quit [Ping timeout: 260 seconds]
edgar-rft is now known as all
all is now known as Guest5617
Guest5617 is now known as edgar-rft
Mandus_ has joined #commonlisp
lad has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
pve has quit [Quit: leaving]
lottaquestions has quit [Ping timeout: 245 seconds]
cjb has joined #commonlisp
makomo has quit [Ping timeout: 265 seconds]
skeemer has joined #commonlisp
<skeemer>
hello all, i am reading SICP and fell in love with lispy languages... i know the book uses MIT-scheme but I found scheme implementations frustrating for their lack of ecosystem and libraries... which i find too fragmented... I was wondering how common lisp was in this concern...
<skeemer>
can anybody share his/her ideas?
patrice has quit [Quit: Leaving]
<Lycurgus>
there's also a #quicklisp but its author isn't currently there (but is here)
<pjb>
skeemer: yes, CL is better in this respect.
<edgar-rft>
skeemer: in contrast to Scheme, Common Lisp incudes the "standard library" in its specification.
<mzan>
skeemer: hi, I'm new here too. I used recently Racket, that it is a Scheme with a rather broad set of libraries. Now I'm trying CL. I'm using QuickLisp and it seems very very good.
<mzan>
(quicklisp is a package manager, not a version of CL)
Alfr has quit [Quit: Leaving]
Alfr has joined #commonlisp
<etimmons>
skeemer: There are a lot of libraries for CL and they tend to be relatively stable since the core language is not continuously evolving.
<skeemer>
thanks Lycurgus for pointing me out all these channels
<Lycurgus>
np
<skeemer>
pjb, mzn what i liked about scheme was functional programming, is it something lisp does/allows?
<mzan>
I saw some CL packages with persistent data structures. So this can be a first step.
<mzan>
Lisp is inherently multi paradigm, so I hope o.
<mzan>
so
<etimmons>
However, there are some frustrations. There does seem to be a tendency for libraries to be reimplemented, resulting in a number of libraries that so similar things (this seems especially prevalent in anything web related)
<etimmons>
s/so/do/
<skeemer>
etimmons, i am ok with having a bunch of libraries... for doing the same thing and having the choice
<Odin->
etimmons: The thing is, that's even _worse_ in some other languages.
<Odin->
*cough*node*cough*
Lycurgus has quit [Quit: Exeunt]
<skeemer>
how is the common lisp landscape in terms of modernity of the language, i mean is it a dying language or people is still developing libraries/modules and so on ?
<random-nick>
there is still plenty of development going on
<etimmons>
Additionally, I think there's a lack of documentation (no clue how the Schemes fair on this front). Quickdocs is nice, but IMO, extracted docstrings does not a user manual make.
<random-nick>
not even close to how much languages like python, c++ or javascript get tho
<Odin->
skeemer: While a fair question, I suspect even COBOL is more 'alive' than people would expect in those terms.
<Odin->
skeemer: And one of the problems I've had with modern JavaScript is that it's _so_ live that something that worked three months ago might not do so now, unless you've been keeping it working for the duration.
<Odin->
It's a benchmark that can easily steer one wrong, is my point. :D
<etimmons>
Last, this is related to documentation, but I don't think there are any great channels for developers to communicate what has changed between versions of their systems.
<etimmons>
A lot of projects don't have numbered versions, nor changelogs. And for those that do, we don't have a great way to disseminate that information when someone is installing or upgrading a dep
aeth has quit [Ping timeout: 265 seconds]
<Odin->
Are there languages that solve that by means other than tooling and convention?
<etimmons>
But, other than that, in my experience CL systems tend to be high quality and typically don't arbitrarily break things on you, even when they're still being actively developed
<skeemer>
another thing that confuses me is that lisp is case insensitive when it comes to function/variables/constant
<Odin->
skeemer: Case sensitive, but case folding by default.
aeth has joined #commonlisp
<Odin->
skeemer: This is an unusual attribute, but shared with e.g. SQL.
<etimmons>
Odin-, skeemer : The problem with multiple approaches to the same thing is it's very frustrating when they do practically the same thing except for a handful of situations, but the developers just decided to not work together
<Odin->
skeemer: The underlying system _is_ case sensitive, but unless you specifically mark that you don't want it to, everything gets uppercased.
<mfiano>
skeemer: CL is case sensitive to all of those
<ulfvonbe`>
it can be a little unusual when you try using mathematical symbols like δ and find that it gets printed as Δ ;-)
<etimmons>
One example that comes to mind is Drakma and Dexador. Dexador is so much easier to deploy on Windows because it uses built-in Windows libs, but I prefer Drakma everywhere else because its code is more readable and I've had fewer problems with it
<etimmons>
Odin-: I think tooling and convention is largely how other languages I've used solve it.
<etimmons>
I'm slowly working on CLPM (a QL alternative), and one thing I'm particularly proud of is that it uses conditions to tell you what systems its going to update and drops you in the debugger to let you have final approval/disapproval.
<etimmons>
I'd love to attach changelogs to those conditions so that it could say "I'm updating system A from 1.1 to 1.3, here are the changes as summarized by the project author" so you can make more informed decisions about upgrades and take advantage of new capabilities
<etimmons>
But it's turning out to be really hard to bootstrap that
<Odin->
There's work on establishing that for CL. Honestly, the notion that most programs will predominantly consist of code that's part of other projects developed independently is newer than you'd think.
<etimmons>
Do you have any pointers to people working on that? All efforts I'm aware of that seem to be going that direction are either related to CLPM or dead (Qi, CLDM)
<GreaseMonkey>
"the notion that most programs will predominantly consist of code that's part of other projects developed independently is newer than you'd think" --> it's probably due to the popularity of making libraries non-copyleft open-source which tends to get exploited by a lot of companies
<GreaseMonkey>
on a more on-topic note, do you have a git repo or something for CLPM yet?
<skeemer>
also how didfficult is it to do FFI in common lisp ?
<skeemer>
like to wrap libs written in C and/or other languages? is it something explained in practical common lisp ?
<Odin->
In my experience, not.
<etimmons>
skeemer: I don't think PCL describes it. CFFI is the de facto, portable way of doing FFI and it's a pleasure to use for relatively small libs
* Odin-
has on more than one occasion used a CL REPL to experiment with a C library in preference to short C programs.
<GreaseMonkey>
if you want a good test library for CFFI, zlib is worth doing... unless the zlib wrapper in quicklisp is no longer hopelessly broken
<Odin->
... that said, big C libraries are usually a pain to work with from any language.
<etimmons>
For larger libs, you may want to consider evaluating things like CLAW or cl-autowrap to automatically generate the low level bindings for you and then slap a Lisp-ier interface on top
john-a-carroll has joined #commonlisp
<etimmons>
But the standard feeling around these parts is that it's better to make a native CL solution if possible, rather than use FFI
<etimmons>
Easier to distribute and leaves you (and your users) less at the whim of the C library devs
<Odin->
Also worth keeping in mind that there are CL implementations that are not based around the C runtime abstraction, such as ABCL.
<skeemer>
Odin-, do you have any good tutorial/blog article explaining how to do what you do? like experimenting with a C library with a lisp repl ?
<Odin->
skeemer: I don't. I started doing it based on the material in the CFFI manual.
<skeemer>
ok thanks Odin-
cjb has quit []
gaqwas has quit [Ping timeout: 252 seconds]
cosimone has quit [Quit: ERC (IRC client for Emacs 27.1)]
aartaka has joined #commonlisp
<jcowan>
etimmons: It is certainly possible to do crypto or TCP/IP in Lisp (indeed, Interlisp does), but doesn't strike me as a good idea in either case.
<hayley>
Crypto in C is only marginally easier - I read the OpenSSL developers read the assembler output for what C code they have to make sure it's still constant time.
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
ulfvonbe` is now known as ulfvonbelow
aartaka has quit [Ping timeout: 265 seconds]
john-a-carroll has quit [Quit: Ping timeout (120 seconds)]
dec0d3r has joined #commonlisp
lad has quit [Ping timeout: 245 seconds]
aartaka has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
igemnace has joined #commonlisp
katya has quit [Quit: WeeChat 3.2.1]
mariari has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
<jcowan>
hayley: My point is that you shouldn't write your own crypto code in any language: you should use a widely deployed library.
<jcowan>
as the saying is, "unless you trust nobody and your crypto skills are second to none"
<ulfvonbelow>
I always thought "don't roll your own crypto" generally referred to devising cryptographic algorithms, not necessarily writing or porting an implementation
<jcowan>
That is certainly even worse. But if you are concerned with covert timing channels, porting is also a Bad Thing.
<ulfvonbelow>
yeah, I imagine the GC probably gives out timing information like it's candy
<hayley>
Not so much the GC, provided you use machine integers.
<mzan>
Is there someone using CL, coming from Scheme? I'm using Racket in some semi-production utility, but I want to test CL.
<ulfvonbelow>
For sufficiently large probabilistic sets, existential and universal qualifiers become trivially true and false, respectively
aartaka has quit [Ping timeout: 265 seconds]
taiju has quit [Read error: Connection reset by peer]
<mzan>
For trivial enough questions, the set of answers will be empty :-)
<mzan>
trivial/boring
taiju has joined #commonlisp
<ulfvonbelow>
I have used scheme, and I am using CL, so I guess I fit that description
attila_lendvai has quit [Ping timeout: 252 seconds]
Guest-liao has joined #commonlisp
<mzan>
ulfvonbelow: "used Scheme" ... "using CL", so you prefer CL. Many thanks :-)