<ixelp>
CL-INTERPOL - String interpolation for Common Lisp
<jmercouris>
I imagine modifying the reader in a library is rather controversial
<beach>
Does it really modify the reader?
<beach>
I think it just defines reader macros.
<beach>
It looks like it defines #? as a reader macro.
<beach>
So the only potential problem would be a clash with a different library that also defines #?, no?
Noisytoot has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
<gilberth>
Even then you could be polite. Provide a function named FUNKY-SYNTAX that installs the macro character and first copies *readtable*. Like (DEFUN FUNKY-SYNTAX () (SETQ *READTABLE* (COPY-READTABLE *READTABLE*)) (SET-MACRO-CHARACTER ...)). Then at the head of a file using that funky syntax say (FUNKY-SYNTAX) at the top as you say (IN-PACKAGE ...)
<gilberth>
Then loading or compiling a file using that syntax won't alter your default read table as *READTABLE* is bound by COMPILE-FILE and LOAD and you modify on a copy. No harm done. No clashes.
Noisytoot has quit [Ping timeout: 248 seconds]
<gilberth>
More controversial would be the the of a string interpolation library. As when such a library is used some hacker confusing internal and external representation must be nearby with all its problems.
<beach>
Would be the what?
<jmercouris>
fair enough, it does use #?, but still, it *could* class
<gilberth>
Sorry. The use. ;Never edit a sentence.
<jmercouris>
s/class/clash
rkazak has joined #commonlisp
King_julian has joined #commonlisp
Noisytoot has joined #commonlisp
Noisytoot has quit [Ping timeout: 244 seconds]
rkazak has quit [Ping timeout: 244 seconds]
mgl has joined #commonlisp
<Shinmera>
beach: yea that's what I was meaning with "implementing collision detection algorithms"
<beach>
Shinmera: Got it.
rkazak has joined #commonlisp
jon_atack has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 246 seconds]
dino_tutter has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
kiyafirs has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
rkazak has joined #commonlisp
edgar-rft_ has joined #commonlisp
edgar-rft` has quit [Ping timeout: 252 seconds]
dinomug has quit [Remote host closed the connection]
dajole has quit [Quit: Connection closed for inactivity]
jpthing has quit [Ping timeout: 276 seconds]
rkazak has joined #commonlisp
varjag has joined #commonlisp
mwnaylor has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
mari-estel has quit []
mwnaylor has quit [Ping timeout: 245 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
vardhan_ has joined #commonlisp
rkazak has joined #commonlisp
vardhan_ has quit [Quit: Leaving]
jrx has joined #commonlisp
vardhan has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
tuck has quit [Remote host closed the connection]
random-nick has joined #commonlisp
tuck has joined #commonlisp
JuanDaugherty has joined #commonlisp
rkazak has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 265 seconds]
tuck has quit [Remote host closed the connection]
tuck has joined #commonlisp
rkazak has joined #commonlisp
uhuh has joined #commonlisp
trocado has quit [Ping timeout: 248 seconds]
decweb has joined #commonlisp
rkazak has quit [Ping timeout: 244 seconds]
trocado has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
King_julian has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
cowboy8625 has joined #commonlisp
jrx has quit [Remote host closed the connection]
King_julian has joined #commonlisp
rkazak has quit [Ping timeout: 244 seconds]
dnhester26 has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
rkazak has joined #commonlisp
notzmv has joined #commonlisp
dnhester26 has quit []
X-Scale has joined #commonlisp
<beach>
I'll take advantage of the relative silence to show what I have been working on the past few days: https://github.com/robert-strandh/Futhark is a library that implements most of the functionality of the Strings dictionary of the Common Lisp standard. Not quite finished, but well on the way.
<ixelp>
GitHub - robert-strandh/Futhark: Implementation of the Common Lisp Strings dictionary
rkazak has quit [Ping timeout: 252 seconds]
<beach>
Initially, it was merely an extraction of existing SICL code, but it is now almost entirely rewritten with improved support in the form of macros.
<bjorkintosh>
question beach, have you by chance ever used Snobol?
<beach>
Nope. Never did.
<beach>
Futhark is perhaps more evidence that extracting code to be more portable improves the quality.
<beach>
JuanDaugherty: Many chapters of the standard have a "Concepts" section and a "Dictionary" section. The Strings chapter is no exception.
<JuanDaugherty>
ah, i c, ty
<beach>
yaw
vardhan has quit [Ping timeout: 246 seconds]
jonatack has joined #commonlisp
vardhan has joined #commonlisp
yottabyte has joined #commonlisp
<yottabyte>
is it hard to make an executable I can run? I am using asdf and just quickload my system in emacs with slime right now
<random-nick>
depends on the implementation you're using
uhuh has quit [Read error: Connection reset by peer]
<yottabyte>
I'm using sbcl
<JuanDaugherty>
no it's easy, there are multiple pkgs if you cant roll ur own
rkazak has joined #commonlisp
uhuh` has joined #commonlisp
uhuh` has quit [Client Quit]
<yottabyte>
can someone refer me to a guide/documentation for it?
<beach>
yottabyte: I should probably not be the one answering this, but SAVE-LISP-AND-DIE has a keyword parameter :EXECUTABLE that you can use. Unless this has changed last time I looked.
<beach>
yottabyte: As I recall, it's a bit tricky in that you can't have multiple threads running, and things like SLIME create threads, so you can't do it from SLIME.
<ixelp>
Scripting. Command line arguments. Executables.
<yottabyte>
actually, this needs a main function too
<yottabyte>
but maybe the function I call to start my web server is my main function
<beach>
yottabyte: Fire up SBCL and do (defun hello () (format t "hello") (sb-ext:exit)) and then (save-lisp-and-de "hello" :executable t :toplevel #'hello)
<beach>
yottabyte: That's all it takes.
<beach>
You can then execute ./hello
<beach>
And, yes, you need to tell it which function to execute on startup.
shmorg83 has quit [Ping timeout: 245 seconds]
rkazak has quit [Ping timeout: 246 seconds]
<beach>
yottabyte: Does that make sense?
<yottabyte>
yes, it does, beach. thanks for the help. I'm trying it out right now
<beach>
Great!
<bjorkintosh>
I know most never touch sbcl directly when sly and slime exist. but if you do have to, rlwrap sbcl works quite nicely.
<bjorkintosh>
save-lisp-and-de should be save-lisp-and-die
<yottabyte>
beach: and perhaps you don't need the call to sb-ext:exit since save-lisp-and-die does it implicitly? unless you left it in for a reason
<bjorkintosh>
incidentally, the binary created by sbcl for the hello world example is 39M
<bjorkintosh>
same thing in C is 16k.
<beach>
yottabyte: Very likely. There was a reason I said that I probably should not be the one answering this question, since I don't create executables myself.
<yottabyte>
do you run lisp in prod?
<bjorkintosh>
you don't need a standalone executable to use it in production, yottabyte.
<bjorkintosh>
unless you really want it.
<beach>
yottabyte: I consider the REPL to be my "shell".
zxcvz has joined #commonlisp
rkazak has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
<yottabyte>
do you run out of slime?
<beach>
Me? Yes.
rkazak has joined #commonlisp
<yottabyte>
nice
varjag has joined #commonlisp
<beach>
Well, sort of. Emacs+SLIME is not a great development environment, but it's the best we have, or maybe Sly is a bit better. For starters I would like to see a better listener, perhaps CLIM-based. There is the CLIM listener, but its purpose is a bit different.
vardhan has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 265 seconds]
slyrus has quit [Ping timeout: 252 seconds]
<varjag>
does one need to explicity close concatenated stream if the underlying streams close?
notzmv has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
shka has quit [Read error: Connection reset by peer]
rkazak has quit [Ping timeout: 248 seconds]
shka has joined #commonlisp
kopiyka_ has joined #commonlisp
dra has joined #commonlisp
terrorjack45 has joined #commonlisp
unlucy has quit [Ping timeout: 265 seconds]
rakka has quit [Ping timeout: 265 seconds]
crumbles- has joined #commonlisp
rkazak has joined #commonlisp
cow_2001 has quit [Ping timeout: 265 seconds]
crumbles has quit [Ping timeout: 265 seconds]
kopiyka has quit [Ping timeout: 265 seconds]
krjst has quit [Ping timeout: 265 seconds]
delyan_ has quit [Ping timeout: 265 seconds]
terrorjack4 has quit [Ping timeout: 265 seconds]
xaltsc has quit [Ping timeout: 265 seconds]
rahmanlar has quit [Ping timeout: 265 seconds]
terrorjack45 is now known as terrorjack4
unlucy has joined #commonlisp
rakka has joined #commonlisp
delyan_ has joined #commonlisp
xaltsc has joined #commonlisp
rahmanlar has joined #commonlisp
krjst has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
cow_2001 has joined #commonlisp
zwr has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
rkazak has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
yazz has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
notzmv has joined #commonlisp
rkazak has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
rkazak has quit [Ping timeout: 252 seconds]
NorthStar has joined #commonlisp
X-Scale has quit [Ping timeout: 276 seconds]
NorthStar is now known as X-Scale
kevingal has joined #commonlisp
X-Scale has quit [Ping timeout: 276 seconds]
X-Scale has joined #commonlisp
JuanDaugherty has joined #commonlisp
rkazak has joined #commonlisp
<citizeno>
So I spent the holidays writing yet another binary serializer/deserializer. I've been a somewhat satisfied user of cl-store and hyperluminal-mem for 10 years, but they stopped meeting my needs (cl-store is just too slow!). I looked at cl-conspack and while it is faster in most cases than cl-store it doesn't work for me either. So, anyway, I
<citizeno>
came up with https://github.com/ajberkley/cl-binary-store which meets my main needs: 1. No need to write code for every simple standard-object or structure-object, like cl-store; 2. Fast. It uses an explicit reference tracking scheme which makes restoration of complex data super fast. Anyhow, before I cut a release tag I was wondering about
<citizeno>
what people use these things for or any experiences they have with other libraries. cl-binary-store is currently sbcl only (because, well, the main driver for me was speed as I was waiting 5-10 minutes for 1.5GB of data to be serialized or deserialized), but that shouldn't be too hard to fix.
<ixelp>
GitHub - ajberkley/cl-binary-store: A fast Common Lisp binary serializer/deserializer
younder has joined #commonlisp
citizeno5 has joined #commonlisp
citizeno has quit [Ping timeout: 240 seconds]
gorignak has quit [Quit: quit]
<NotThatRPG>
We've been using cl-persistence. It would be nice to have something that's super fast, but SBCL-only would be a show-stopper for us. I peeked at the code quickly, but didn't get a good sense of how much work it would be to make it turn over in another implementation.
<varjag>
we're moving from cl-store to cbor.lisp
<varjag>
also pushing for lisp tags standardization with iana
<ixelp>
GitHub - mishoo/cbor.lisp: CBOR library for Common Lisp
<citizeno5>
It looks interesting, my first read through seems to rule out loops / references. The proposed object tag requires writing out the slot names each time... that's not great. I only skimmed things, so I could be missing a lot.
<varjag>
it does not rule out loops and references naturally
<varjag>
you can implement circular lists, shared trees ect
<varjag>
etc
<varjag>
but there is balance as to how lisp specific you want it to be
<citizeno5>
OK, I misread "The structures supported are limited to arrays and trees; loops and lattice-style graphs are not supported." in the RFC
<aeth>
I wonder if I should look into something like CBOR
<varjag>
if you want to fully serialize mop, displaced arrays and other esotherics cbor is the wrong choice
<aeth>
At the moment, my plan is to just dump the arrays as bytes, using float-features for reading/writing the floats as such.
<aeth>
I personally don't need to do anything other than arrays, other than mapping these arrays to the internals
<varjag>
but if you want something that is standard, covers most practical use cases and interoperate with everything else in the world i think it's the way to go
<aeth>
Personally, I don't really _need_ interoperability because I only need serialization for a save game format. My main concern with serialization would be all of the unknown unknowns with writing a proper file format as opposed to using someone else's.
amoroso has joined #commonlisp
<aeth>
But for me, personally, everything is either already in an array or can probably be put into one. With the main mess of rolling my own binary format being mapping those arrays back to the internal data structures.
<aeth>
Which, again, mostly store arrays. But many of them. Very many.
<varjag>
right
amoroso has quit [Client Quit]
<aeth>
I don't think anything that's not an array needs to be saved and can just be reconstructed.
<varjag>
well in our case we need to move to something in prod that can be properly documented
<varjag>
cl-store is not the optimal for that
<aeth>
Well, I never looked into the arbitrary CL serializers because they're probably too powerful and I'm concerned primarily about security here. That is to say, if I release a game, someone may download someone else's save game file, and if that save game file can load _anything_ then that's a security risk.
<varjag>
the next milestone (after we get tags assigned) is to write cbor format documentation generator for the set of instances one wants to serialize
akoana has joined #commonlisp
<aeth>
But CBOR, if it supports the CL array data types, might be interesting.
<aeth>
hmm, although if its arrays are 1D, that might complicate things.
<varjag>
it does support vectors, arrays and row/column major representations already
<varjag>
cbor itself
<varjag>
and specializations of those to common int and float types
<aeth>
Can they be mixed? Graphics is usually column-major matrices (because column vectors m*v, not row vectors v*m, are typically used), while arbitrary 2D arrays in CL are usually thought of as row-major.
<aeth>
Although I suppose this can be handled at the application side
<varjag>
i haven't looked much into that tbh
rkazak has joined #commonlisp
<citizeno5>
aeth: if you don't mind using a library instead, cl-binary-store lets you define the "codespace" you support for reading or writing... so you can restrict your data types to whatever you want. I've only done basic examples, but then you don't have to re-invent the fast magic stuff for storing/restoring.
rbcarleton has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 264 seconds]
<NotThatRPG>
yottabyte: Xach's buildapp program makes it easy to package up SBCL or CCL based executables.
<citizeno5>
aeth: I like that notion though about being careful about loading of data --- right now the loading allows switching of codespaces (so away from an "array only" space for your game, for example), so I should make it clear how you would lock that down.
<aeth>
well, the arrays would need to be named, but once named, any structure can be reconstructed
<aeth>
so not just arrays, but close
mwnaylor has joined #commonlisp
rkazak has joined #commonlisp
attila_lendvai has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
mishoo has quit [Ping timeout: 252 seconds]
zlqrvx has quit [Ping timeout: 246 seconds]
<citizeno5>
aeth: OK, I added features and an example of removing capabilities during restoration of a data file. In the README section Adding codepoints to the codespace I show removing the ability to serialize / deserialize double-floats and what happens if you load a file that tries to switch to a codespace that supports that.
zlqrvx has joined #commonlisp
rkazak has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
attila_lendvai has quit [Ping timeout: 265 seconds]
shawnw has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 29.4]
notzmv has quit [Ping timeout: 265 seconds]
jweek has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 246 seconds]
pve has quit [Quit: leaving]
mgl has quit [Ping timeout: 265 seconds]
robin has quit [Ping timeout: 276 seconds]
chiselfuse has quit [Remote host closed the connection]