torbo has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 240 seconds]
AmatureProgramme has quit [Quit: Leaving]
shinohai_ is now known as shinohai
<AeroNotix>
edgar-rft: what's your angle?
<edgar-rft>
my angle?
<AeroNotix>
edgar-rft: I'm not sure what you're trying to prove
<AeroNotix>
it's specifically referring to hardware memory, RAM.
<AeroNotix>
not just the abstract concept of data
secretmyth has quit [Ping timeout: 240 seconds]
<edgar-rft>
AeroNotix: I don't try to prove anything, I just simply still do not understand what you're trying to achieve.
<AeroNotix>
edgar-rft: it was a fun game
<AeroNotix>
to try to find the smallest bit of code that would segfault a Lisp implementation
<AeroNotix>
p.hoe won the game
<AeroNotix>
(not wanting to tag because it's 2.30am for him)
Inline has quit [Ping timeout: 256 seconds]
charles` has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
StevePerkins has joined #lisp
Jesin has joined #lisp
lambdanon has quit [Remote host closed the connection]
galex-713 has quit [Ping timeout: 272 seconds]
charles` has quit [Remote host closed the connection]
shifty has joined #lisp
StevePerkins has quit [Quit: Leaving]
Oladon has quit [Quit: Leaving.]
yitzi has quit [Quit: yitzi]
ennn has quit [Ping timeout: 258 seconds]
StevePerkins has joined #lisp
DGASAU has quit [Remote host closed the connection]
DGASAU has joined #lisp
iamFIREcracker has joined #lisp
iamFIREcracker has quit [Ping timeout: 256 seconds]
leo_song has quit [Ping timeout: 256 seconds]
v3ga has quit [Ping timeout: 246 seconds]
v3ga has joined #lisp
kreyren__ has joined #lisp
Oladon has joined #lisp
ennn has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
kreyren_ has quit [Ping timeout: 240 seconds]
ennn has quit [Ping timeout: 260 seconds]
Kaisyu has joined #lisp
jesse1010 has quit [Ping timeout: 244 seconds]
leo_song has joined #lisp
toorevitimirp has joined #lisp
iamFIREcracker has joined #lisp
StevePerkins has quit [Ping timeout: 244 seconds]
iamFIREcracker has quit [Ping timeout: 260 seconds]
iissaacc has joined #lisp
ennn has joined #lisp
AeroNotix has quit [Quit: WeeChat 2.9]
ennn has quit [Ping timeout: 265 seconds]
devon has joined #lisp
Stanley00 has joined #lisp
v3ga has quit [Ping timeout: 272 seconds]
Jeanne-Kamikaze has joined #lisp
Oladon has quit [Quit: Leaving.]
iamFIREcracker has joined #lisp
iamFIREcracker has quit [Ping timeout: 256 seconds]
Alfr has joined #lisp
Alfr_ has quit [Ping timeout: 240 seconds]
aartaka has joined #lisp
todun has joined #lisp
v3ga has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
<beach>
Good morning everyone!
<lacedaemon>
good morning beach
lacedaemon is now known as fe[nl]ix
aartaka has joined #lisp
mindCrime has quit [Ping timeout: 244 seconds]
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #lisp
Stanley|00 has joined #lisp
Stanley00 has quit [Ping timeout: 256 seconds]
bjorkintosh has quit [Quit: Leaving]
iamFIREcracker has joined #lisp
Stanley|00 has quit [Read error: Connection reset by peer]
Stanley00 has joined #lisp
bjorkintosh has joined #lisp
iamFIREcracker has quit [Ping timeout: 246 seconds]
TwoNotes has quit [Quit: Leaving]
iissaacc has quit [Remote host closed the connection]
iissaacc has joined #lisp
space_otter has joined #lisp
manicennui has quit [Quit: Connection closed for inactivity]
akoana has left #lisp ["Leaving"]
toorevitimirp has quit [Ping timeout: 258 seconds]
toorevitimirp has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
<HiRE_>
The other day someone mentioned SBCL is not as efficient as other lisp implementations. I don't really want to get into a flame war but are things like allegro really that much better?
<HiRE_>
I've noticed this sort of trend with other older languages...for example ADA and forth. The paid implementations are stellar compared to others.
<HiRE_>
Mostly just looking for a small compare/contrast for my own understanding (i use sbcl)
<HiRE_>
of course the "efficient" term here is very vague. I believe they meant performance-wise.
Bourne has quit [Ping timeout: 256 seconds]
<White_Flame>
I think that was beach's comment that SBCL's multimethod dispatch isn't as optimized as a new strategy might be
<White_Flame>
SBCL is basically going to be the fastest of the open source lisps
dominic34 has quit [Ping timeout: 244 seconds]
<HiRE_>
are the pay to play versions of CL really that much better?
<HiRE_>
I suppose there's an added component of premium support that helps too...I digress.
<White_Flame>
yeah, they have much larger included libraries & tooling
<HiRE_>
Ah, so its a MATLAB vs Gnu...number thingy argument
<White_Flame>
I don't know if their compilers make code any faster than SBCL; back in the mid-2000s when I was using allegro it ended up being slower than sbcl
iamFIREcracker has joined #lisp
<HiRE_>
How did you like allegro? The tooling actually seems pretty nice. Not that I could afford it lol. Even the student licenses are expensive.
<beach>
Just to be clear, my remark was not about SBCL vs Allegro. I know next to nothing about Allegro and LispWorks in terms of performance. My remark was about a technique SBCL is using that was good a few decades ago and that may no longer be so good.
<beach>
The SBCL garbage collector is probably another such feature to examine for possible impovements.
<HiRE_>
beach: didnt mean to single you out. I couldn't remember who said what and I've heard it quite a lot so I figured I would ask.
<White_Flame>
you've heard SBCL is slower than other CL implementations a lot?
<White_Flame>
because I haven't
aartaka has joined #lisp
<HiRE_>
Just from guys who've used commercial implementations
iamFIREcracker has quit [Ping timeout: 256 seconds]
<beach>
I was under the impression that the code generated by SBCL/Python is generally the fastest among all existing implementations.
<HiRE_>
Interesting. That would be consistent with the benchmark game...if that even matters.
<aeth>
Afaik, SBCL is generally 3x to 5x slower than C or C++, so there are lots of places where it can improve, e.g. vectorization/SIMD. In fact, that's probably the main source of performance losses.
todun has quit [Quit: todun]
<aeth>
But among CLs, it doesn't win every benchmark (e.g. iirc ECL has faster bignums), but it's usually at least about 3x faster than the other implementations
<beach>
aeth: You can't really compare those languages that way. As I have pointed out, it is impossible to write a C++ program that is both fast and modular.
<HiRE_>
I suppose a good question to ask is how does SBCL generate a binary? Does it copy a runtime to it or directly generate bytecode?
<HiRE_>
assembly**
<aeth>
beach: Right. Language benchmarks are generally about how good of a FORTRAN languages are because these things are the easiest to benchmark (which is funny because now C++ tends to beat FORTRAN at its own game, finally)
<aeth>
beach: But SBCL can still mostly compete in this area.
aartaka has quit [Read error: Connection reset by peer]
<Bike>
HiRE_: i don't know what "copy a runtime to it" means, but sbcl generates machine code.
<no-defun-allowed>
Forgive my ignorance, but what fraction of programs are definitely bound by number churning?
<HiRE_>
yeah im not using the right words.
<HiRE_>
I had meant something like SBCL doing what something like python -> exe would do (copy an entire runtime to the executable) or generate machine code.
<HiRE_>
You answered my question though
<aeth>
no-defun-allowed: I'd say quite a lot of programs, maybe most of the programs where performance actually matters, are either floating point or string processing.
<no-defun-allowed>
SBCL generates machine code and installs it into the running process; I don't think that dumps out an executable unless you save-lisp-and-die.
<aeth>
HiRE_: it copies the entire runtime to the executable and generates machine code. It's not either/or. Compiled languages can have large runtimes (SBCL is one).
<Bike>
HiRE_: a dumped sbcl executable will include runtime support code, but it's not a bytecode interpreter or anything. more like a really big libc.
<no-defun-allowed>
I think of the programs I made to go fast, only one (the video effects processor) is particularly reliant on number crunching.
<aeth>
HiRE_: Note that a CL application probably includes a full compiler with it, unless it's a commercial Lisp, in which case they probably want to protect the compiler for business reasons more than wanting to save RAM.
<no-defun-allowed>
An object storage node, not so much, but I guess a regular expression engine is poster child string processing.
<HiRE_>
Ah I see. The reason I even mentioned it is some of the slowdown could be the indirection. C might generate a syscall directly whereas something with a runtime might involve more instructions. I thought that might explain some of the slowdown.
<no-defun-allowed>
If I'm matching a string against a regular expression, what would require a syscall?
<aeth>
HiRE_: afaik, there is a bit of indirection. (foo ...) will look up the function namespace of the symbol 'foo, for whatever package that foo happens to be in
<aeth>
So you can redefine foo and as long as foo isn't inline, then it will look at (and thus call) the redefined foo
<HiRE_>
no-defun-allowed: probably not. I was thinking about a "hello world" I apologize.
<aeth>
HiRE_: but benchmarks aren't benchmarking function call overhead, they're benchmarking stuff like matrix multiplication
<no-defun-allowed>
Number processing also doesn't usually need syscalls; but filesystem access does, and I hate it, because when I go to profile my node, it's spending a lot of time checking for symlinks.
<HiRE_>
aeth: agreed. And programming language benchmarks aren't perfect either. Despite turing completeness the language can have a different intention that improves some aspects of its performance over others.
<aeth>
Oh, and ime (with running TIME) a generic function (method) call in SBCL is 10x slower than a function call, but only on the first call... since it's doing dynamic dispatch and then probably caching it.
<aeth>
(assuming most of the added overhead of a trivial function as DEFUN vs DEFMETHOD is the dispatch)
<beach>
HiRE_: As I said, comparing code generated from a Common Lisp compiler to that of something like C++ for some small benchmark isn't useful. If you try to write a significant application in C++, there just isn't any way you can make it both fast and modular, and that usually means it is not fast. Plus, it is still vulnerable to pointer bugs. Common Lisp is just a much better choice, not matter the benchmarks.
ennn has joined #lisp
<HiRE_>
It is truly fascinating to me something like Mezzano exists. It really is a good support for the CL is just as good as C++ argument.
<no-defun-allowed>
Furthermore, both my RE engine and node software make good use of runtime compilation, which is much more difficult C or C++.
<beach>
HiRE_: Sort of. Except that C++ is not particularly good at all.
<no-defun-allowed>
I don't feel like there has to be very much of an argument.
<aeth>
no-defun-allowed: and along those lines, pretty much every Common Lisper takes advantage of "hot loading" code during development, something that's impressive to a C++ programmer.
<HiRE_>
I'm not even a C++ programmer and hot loading code is impressive to me.
<HiRE_>
Erlang is another example that allows that type of thing.
<HiRE_>
Good example of what I will coin "spaceship proofing" a language :P
<no-defun-allowed>
The former is quite funny on ECL, because it passes a function with a whole bunch of gotos and array loads, and the C compiler spits out some glorious code slightly faster than SBCL somehow. The downside is you have to wait for a C compiler!
ennn has quit [Ping timeout: 272 seconds]
ramHero has joined #lisp
davepdotorg has joined #lisp
<aeth>
beach: There's nothing stopping a CL implementation from competing in numeric benchmarks, though.
<aeth>
Maybe bounds checking, but there are ways around that, and if the length is known at compile time (and e.g. DECLAREd as part of the array type), then bounds checking can safely removed even with safety on.
<borei>
hi all
<borei>
noticed discussion about performance :-)
<no-defun-allowed>
Hello borei
<aeth>
hi borei
dominic34 has joined #lisp
<borei>
it's key thing for me as im moving my number-cruncher from C++ to lisp (SBCL).
<no-defun-allowed>
I cheat and optimize for (safety 0), as I'm sure that my generated code will do bound checking, but the compiler might take too long to traverse the giant TAGBODY form it makes.
<borei>
i did linear-algebra first as it is core part of my application. for matrix multiplication it's pretty close to C/C++ perfomance
<borei>
spline calculation (recursive functions) im getting approx 50% of C performance.
<borei>
graphics - OpenGL based, visually no lags, scenes has big number of vertexes.
davepdotorg has quit [Ping timeout: 272 seconds]
<aeth>
no-defun-allowed: (safety 0) basically makes no difference in my code because I include the length as part of the type, so almost all bounds checking is removed already, with safety on.
<borei>
so bottom line - lisp can provide pretty high performance even to aggressive to CPU apps
kreyren__ has quit [Remote host closed the connection]
<aeth>
The disadvantage with relying on the type to remove bounds checking, of course, is that something either has to be inline or the type has to be declared
<aeth>
s/something either/either something/
<borei>
critical parts can be easily implemented as CFFI library
<no-defun-allowed>
If it's not easy to compile at runtime, then regular expressions are one place Lisp may be faster than C.
<no-defun-allowed>
*at runtime in C or whatever other language you compare to
skapata has joined #lisp
<aeth>
borei: 50% of C? Interesting. Sounds like that's fast enough for ray tracing. (Not that real time ray tracing that's new to GPUs... I mean, fully ray traced scenes on the CPU.)
<White_Flame>
the main C regex library does do machine code byte generation, but I'm not sure if it's optimized
<White_Flame>
and of course, it'd have to know your CPU platform
<no-defun-allowed>
Byte code or machine code?
<White_Flame>
machine code
<White_Flame>
makes a byte array and casts to a function pointe
<White_Flame>
r
<no-defun-allowed>
That kinda compiler. Which library is that?
<borei>
aeth: yep i measured B-Spline calculations, lisp was x2 slower then C
skapata has left #lisp [#lisp]
<White_Flame>
pcre
<no-defun-allowed>
I see.
<borei>
maybe not enough optimization on C side, i was trying to match the code logic.
<borei>
especially i was impressed on matrix multiplications - actually it was buying factor to go to lisp
<aeth>
Yes. Imo, saying "ignore the benchmarks" really undersells what CL can do.
<aeth>
CL was designed to win at benchmarks. Contrast with e.g. most Schemes.
<borei>
btw, got my first rados (ceph) client implementation - also very happy about results.
orivej has joined #lisp
<borei>
well it's CFFI wrapper, but still.
<White_Flame>
and yeah I think it's just concatenating predefined pieces of asm together, and doesn't do a compiler pass on top of that, so a CL implementation could still beat it
<no-defun-allowed>
White_Flame: sljit/ has the JIT, right?
<White_Flame>
yes, that's the code generators, while the src/ directory calls into it to concatenate the bits
Stanley|00 has joined #lisp
toorevitimirp has quit [Ping timeout: 260 seconds]
<White_Flame>
and of course, it's way more complex than a lisp version would be :-P
<no-defun-allowed>
If I wanted to be smug, I would say my engine is 2/3 the size of the x86_64 compiler backend, but it only knows regular things and not submatching, matching starts and ends of lines, character groups, etc.
toorevitimirp has joined #lisp
Stanley00 has quit [Ping timeout: 244 seconds]
Bike has quit [Quit: leaving]
iamFIREcracker has joined #lisp
<White_Flame>
of course, there's sljitNativeX86_64.c, but also sljitNativeX86_common.c, and those are I guess just the code emitters; it's the parent level that does the actual "compilation" of the regex to the code emitter calls
Jeanne-Kamikaze has quit [Ping timeout: 272 seconds]
iamFIREcracker has quit [Ping timeout: 265 seconds]
Oladon has joined #lisp
Stanley00 has joined #lisp
gravicappa has joined #lisp
Stanley|00 has quit [Ping timeout: 265 seconds]
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life has joined #lisp
StevePerkins has joined #lisp
ex_nihilo has joined #lisp
StevePerkins has quit [Ping timeout: 240 seconds]
iamFIREcracker has joined #lisp
schweers has joined #lisp
Necktwi has quit [Ping timeout: 256 seconds]
iamFIREcracker has quit [Ping timeout: 240 seconds]
bocaneri has joined #lisp
Necktwi has joined #lisp
jonatack has quit [Quit: jonatack]
Fare has joined #lisp
quazimod1 has quit [Ping timeout: 258 seconds]
quazimodo has joined #lisp
Bourne has joined #lisp
ggole has joined #lisp
quazimodo has quit [Ping timeout: 272 seconds]
iamFIREcracker has joined #lisp
quazimodo has joined #lisp
Oladon has quit [Quit: Leaving.]
ggole has quit [Read error: Connection timed out]
ggole has joined #lisp
ennn has joined #lisp
jonatack has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
treflip has joined #lisp
borei has quit [Ping timeout: 256 seconds]
ennn has quit [Ping timeout: 258 seconds]
davepdotorg has joined #lisp
jonatack has joined #lisp
epony has quit [Ping timeout: 258 seconds]
davepdotorg has quit [Ping timeout: 272 seconds]
iissaacc has quit [Ping timeout: 240 seconds]
aartaka has joined #lisp
random-nick has joined #lisp
todun has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
ljavorsk has joined #lisp
treflip has quit [Ping timeout: 260 seconds]
treflip has joined #lisp
galex-713 has joined #lisp
iissaacc has joined #lisp
devon has quit [Ping timeout: 265 seconds]
<scymtym>
no-defun-allowed: you could use (integer 0 #.array-dimension-limit) (or ALEXANDRIA:ARRAY-INDEX) instead of FIXNUM as the type of array indices. also, if i'm reading your generated code right, the declared type for the input is VECTOR. at least on SBCL a more precise type such as (and simple-string (not (vector nil))) can produce better code (you would have to handle non-simple strings and (vector nil) in some prologue, of course)
davepdotorg has joined #lisp
<no-defun-allowed>
scymtym: That could help; though usually the high-level interface will pick the most specific type for the input vector.
<aeth>
interestingly, Alexandria defines it as, roughly, (integer 0 (#.(1- array-dimension-limit))) instead of (integer 0 #.array-dimension-limit)
<aeth>
I didn't even know you could do that.
<scymtym>
no-defun-allowed: you mean the high-level interface coerces the input to the most suitable array type?
<aeth>
(typep 3 '(integer 0 3)) is T and (typep 3 '(integer 0 (3))) is NIL, so apparently parenthesizing the integer makes it exclusive rather than inclusive.
<no-defun-allowed>
Er, it compiles code specialised for the most suitable array type.
<scymtym>
aeth: i suggested the inclusive version because loop variables sometimes go one step beyond the indexable range
<aeth>
yes, particularly in LOOP, although I think that's actually UB and depends on how it's implemented (but the obvious way will go one over and stop there, since it's more efficient than testing before incrementing and then incrementing)
davepdotorg has quit [Ping timeout: 272 seconds]
bilegeek has quit [Ping timeout: 244 seconds]
<scymtym>
i didn't mean CL:LOOP variables specifically as no-defun-allowed's loop manages the input position "manually"
<aeth>
Not like it will matter on a 64-bit system since you'll run out of memory at the edge case far before you get there, though
<aeth>
A lot of people see #. as unnecessary. A lot of the time, it's needed in types, if you don't define them, but if you DEFTYPE and name them, then you can just use ` and ,
bilegeek has joined #lisp
<aeth>
The only place where I currently use #. is where I want to build up literal sequences, which is fairly rare.
<aeth>
(Even that can be replaced, this time with DEFMACRO.)
<no-defun-allowed>
Well, that loop goes one beyond the indexable range.
orivej has quit [Ping timeout: 260 seconds]
todun has quit [Ping timeout: 240 seconds]
davsebamse has quit [Ping timeout: 264 seconds]
Cymew has quit [Quit: Konversation terminated!]
dmr0x80 has joined #lisp
dmr0x80 has quit [Client Quit]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
pve has joined #lisp
Cymew has joined #lisp
todun has joined #lisp
davsebamse has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
pve has quit [Ping timeout: 260 seconds]
pve has joined #lisp
supercoven has joined #lisp
aartaka has joined #lisp
scymtym has quit [Ping timeout: 272 seconds]
karlosz has quit [Quit: karlosz]
Krystof has joined #lisp
aartaka has quit [Ping timeout: 256 seconds]
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
epony has joined #lisp
scymtym has joined #lisp
space_otter has quit [Ping timeout: 258 seconds]
aartaka has joined #lisp
rgherdt has joined #lisp
treflip has quit [Ping timeout: 260 seconds]
treflip has joined #lisp
treflip has quit [Client Quit]
hendursa1 has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
funnel has quit [Ping timeout: 240 seconds]
gko_ has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
davepdotorg has joined #lisp
ennn has joined #lisp
heisig has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
todun has quit [Quit: todun]
bilegeek has quit [Quit: Leaving]
ennn has quit [Ping timeout: 256 seconds]
cosimone has joined #lisp
Inline has joined #lisp
Fare has quit [Ping timeout: 244 seconds]
rogersm has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
Lycurgus has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 258 seconds]
davepdotorg has quit [Remote host closed the connection]
ayuce has quit [Remote host closed the connection]
ayuce has joined #lisp
davepdotorg has joined #lisp
ex_nihilo has quit [Quit: Leaving]
jesse1010 has joined #lisp
cyberbanjo has joined #lisp
flazh has quit [Ping timeout: 256 seconds]
copec has quit [Ping timeout: 264 seconds]
datajerk has quit [Ping timeout: 258 seconds]
galex-713 has quit [Ping timeout: 244 seconds]
hvxgr has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
copec has joined #lisp
datajerk has joined #lisp
jonatack has quit [Read error: Connection reset by peer]
orivej has joined #lisp
hvxgr has joined #lisp
ennn has joined #lisp
iissaacc has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 240 seconds]
ennn has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
hiroaki has joined #lisp
davepdotorg has quit [Remote host closed the connection]
<beach>
phoe: Isn't it supposed to start in 3 minutes?
<beach>
Did I get the time wrong?
<phoe>
beach: it is starting
<beach>
Ah, there it is.
ennn has joined #lisp
ennn has quit [Ping timeout: 260 seconds]
Bourne` has joined #lisp
aartaka_d has quit [Ping timeout: 256 seconds]
Bourne has quit [Ping timeout: 265 seconds]
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
orivej has joined #lisp
davepdotorg has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
davepdotorg has quit [Ping timeout: 244 seconds]
random-nick has quit [Ping timeout: 272 seconds]
iAmDecim_ has joined #lisp
dvdmuckle has quit [Ping timeout: 240 seconds]
contrapunctus has left #lisp ["Disconnected: closed"]
kaftejiman has joined #lisp
contrapunctus has joined #lisp
galex-713 has joined #lisp
jurov_ has joined #lisp
yitzi has joined #lisp
jurov has quit [Ping timeout: 240 seconds]
Volt_ has joined #lisp
aartaka has joined #lisp
makomo has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
iAmDecim_ has quit [Ping timeout: 272 seconds]
ljavorsk has quit [Ping timeout: 264 seconds]
davepdotorg has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
iAmDecim_ has joined #lisp
orivej has joined #lisp
hydan has quit [Quit: Connection closed for inactivity]
<phoe>
OK, OLM#9 is done and I'm uploading the video to YT.
<phoe>
beach: I'll mention in the video description that the SETF MACRO FUNCTION needs to be there on the proper slide.
<beach>
Thanks.
datajerk has quit [Ping timeout: 260 seconds]
copec has quit [Ping timeout: 240 seconds]
davepdot_ has joined #lisp
<phoe>
beach: should it be (setf (macro-function name) ...)? or quasiquoted in some way?
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
davepdot_ has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdot_ has joined #lisp
iAmDecim_ has quit [Ping timeout: 240 seconds]
davepdotorg has quit [Ping timeout: 272 seconds]
yottabyte has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
larsen has joined #lisp
<heisig>
Has someone already written an ASSOCF function that works like ASSOC, but always returns a suitable cons?
<heisig>
Meaning if the key is not found, it pushes (cons key nil) to the place that is the second argument and returns that cons.
copec has quit [Ping timeout: 240 seconds]
copec has joined #lisp
<heisig>
If not, I will have to deal with DEFINE-SETF-EXPANDER. I was hoping I could avoid that.
<phoe>
heisig: alexandria has SETF ASSOC-VALUE that is kinda like that
ennn has joined #lisp
pve has joined #lisp
Stanley00 has quit []
<heisig>
phoe: Thanks! It offers no way to access the cons directly, but maybe I can work around that.
gjvc has quit [Quit: Lost terminal]
random-nick has quit [Ping timeout: 256 seconds]
ennn has quit [Ping timeout: 260 seconds]
copec has quit [Ping timeout: 246 seconds]
copec has joined #lisp
<phoe>
if you want to access the cons cell, then you could try a combo of CL:ASSOC and SETF A:ASSOC-VALUE
ober has quit [Ping timeout: 258 seconds]
random-nick has joined #lisp
devon has joined #lisp
jonatack has joined #lisp
dvdmuckle has joined #lisp
<heisig>
Turns out ASSOC-VALUE works just fine in my case, since it is SETFable. That is almost as good as having the cons :)
<ebrasca>
Hi
pve has quit [Remote host closed the connection]
<beach>
Hello ebrasca.
pve has joined #lisp
_jrjsmrtn has quit [Ping timeout: 260 seconds]
ennn has joined #lisp
__jrjsmrtn__ has joined #lisp
Bourne` has quit [Ping timeout: 260 seconds]
<bhartrihari>
Hello. What is supposed to be the init file name for CCL? I have code for initializing quicklisp in .cclrc but that doesn't seem to load quicklisp.
<Josh_2>
doesn't quicklisp do that for you?
<Josh_2>
when you install
<phoe>
nope, it doesn't
<Josh_2>
it does for sbcl
<phoe>
oh wait, you mean
<phoe>
(QL:ADD-TO-INIT-FILE)
<Josh_2>
yes
<phoe>
this should add it there
<phoe>
and print the filename too
<phoe>
CCL has a different file name
<bhartrihari>
I installed it with sbcl
<phoe>
then load setup.lisp and issue ql:add-to-init-file
<bhartrihari>
Maybe I can just copy the initializing code from. sbclrc?
<phoe>
sure, that's the manual way
<phoe>
ql:add-to-init-file will do it all for you
<bhartrihari>
Is the name supposed to be .cclrc?
<bhartrihari>
Thanks though.
Bike has joined #lisp
shifty has quit [Ping timeout: 244 seconds]
<bhartrihari>
Ah, no. It's .ccl-init.lisp
<devon>
See ~/quicklisp/quicklisp/impl-util.lisp init-file-name
kaftejiman has quit [Remote host closed the connection]
mokulus has quit [Quit: WeeChat 2.9]
heisig has quit [Quit: Leaving]
ft has quit [Ping timeout: 246 seconds]
ft has joined #lisp
narimiran has quit [Ping timeout: 272 seconds]
luckless has quit [Ping timeout: 240 seconds]
iAmDecim_ has joined #lisp
copec has quit [Ping timeout: 264 seconds]
luckless has joined #lisp
galex-713 has quit [Remote host closed the connection]
galex-713 has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
devon has quit [Ping timeout: 260 seconds]
schweers has quit [Ping timeout: 244 seconds]
copec has joined #lisp
srhm has joined #lisp
Bourne has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
iAmDecim_ has quit [Ping timeout: 272 seconds]
akkad has joined #lisp
johnjay has quit [Ping timeout: 244 seconds]
aartaka_d has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
ennn has left #lisp ["ERC (IRC client for Emacs 26.3)"]
aartaka has quit [Ping timeout: 260 seconds]
epony has quit [Remote host closed the connection]
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
epony has joined #lisp
treflip has joined #lisp
flazh has joined #lisp
makomo has quit [Quit: WeeChat 2.8]
<ebrasca>
Can I make ~% to output CRLF instead of CR or LF?
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
davepdot_ has joined #lisp
aartaka_d has quit [Read error: Connection reset by peer]
sjl_ has joined #lisp
flazh has quit [Ping timeout: 256 seconds]
flazh has joined #lisp
davepdotorg has quit [Ping timeout: 246 seconds]
aartaka has joined #lisp
johnjay has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
manicennui has joined #lisp
EvW has joined #lisp
<phoe>
ebrasca: not really, use a flexi-stream to output the proper kind of newline
<phoe>
FORMAT is the wrong abstraction level to solve this problem
aartaka has quit [Read error: Connection reset by peer]
AmatureProgramme has joined #lisp
vgmind has joined #lisp
rumbler31 has joined #lisp
epony has quit [Remote host closed the connection]
pve has quit [Quit: leaving]
devon has joined #lisp
aartaka has joined #lisp
devon has quit [Ping timeout: 264 seconds]
epony has joined #lisp
<mseddon>
beach: enjoyed part 3, thanks for making it
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
ted_wroclaw has joined #lisp
iAmDecim_ has joined #lisp
flazh has quit [Quit: flazh]
<beach>
mseddon: Pleasure. Glad you liked it.
flazh has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
Fare has joined #lisp
iAmDecim_ has quit [Ping timeout: 265 seconds]
EvW has joined #lisp
secretmyth has joined #lisp
gko_ has quit [Ping timeout: 240 seconds]
gravicappa has quit [Ping timeout: 256 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
gravicappa has joined #lisp
gxt has quit [Remote host closed the connection]
gxt has joined #lisp
iAmDecim_ has joined #lisp
<sjl_>
beach: I enjoyed it too. Also I would be very interested in a presentation about how a CL compiler works (you mentioned in one of the early slides that might be a possibilty if enough folks were interested).
<beach>
sjl_: Thanks. I guess I have to think about such a thing a bit more seriously.
<beach>
I would have to come up with the right level of abstraction.
<beach>
Otherwise, I'll drown in implementation details .
rgherdt has quit [Remote host closed the connection]
iAmDecim_ has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 240 seconds]
bubo has joined #lisp
davepdot_ has quit [Remote host closed the connection]
<bubo>
(Tell me if that's not the right place for general help questions)
<jackdaniel>
it is an OK place, but it would be helpful if you had mentioned what's the bug
<jackdaniel>
because I don't have a package osc
<Josh_2>
whats wrong?
<beach>
The unwind-protect form looks wrong.
<bubo>
Allright. There is one dependency, the OSC package. It parses a list into an OSC message to be sent with usocket
<Josh_2>
there is no protected clause thats true
Volt_ has quit [Ping timeout: 240 seconds]
<bubo>
The encoding-bundle (the central piece really) does work, and returns without error
<jackdaniel>
you probably want (unwind-protect (socket-send) #|cleanup forms start|# (format t "closing") (socket-close)) as noted by beach and Josh_2
<bubo>
However, when using this function, there is a very strange and never seen before error message that goes like: fell through ETYPECASE expression
<jackdaniel>
please paste somewhere a full error message
<Josh_2>
encode-buffer returns a byte array?
<bubo>
Allright, let me paste the error message on pastebin
<jackdaniel>
right, calling type-of is not super useful in this case
<bubo>
I'll try that and update you asap
* eta
usually uses (concatenate '(vector (unsigned-byte 8)) <input-array>) for that
<eta>
but that's probably not very efficient
CrazyEddy has quit [Ping timeout: 244 seconds]
orivej has joined #lisp
<bubo>
If I understand correctly, you ask me to replace (socket-send <this> (length <this>)) in the func?
<Josh_2>
To replace <this> with the newly created octet array
Cymew has quit [Ping timeout: 246 seconds]
<bubo>
What should be the argument of socket-close? Same as before?
<bubo>
Oh, nevermind. I guess it works now, let me run a quick test to find out if everything is ok
<Josh_2>
you should fix your (unwind-protect ..) form as well
<Josh_2>
because you don't have a cleanup
vgmind has quit [Remote host closed the connection]
iAmDecim_ has joined #lisp
<bubo>
It looks like the message is sent, because the server receives it and complains about it :o. But that's definitely a progress
<Josh_2>
yay!
<bubo>
the current unwind looks like this: (unwind-protect (progn (socket-send socket buffer (length buffer)) (format t "blabla") (socket-close socket)))
<Bike>
probably the socket-close is supposed to be the cleanup?
<phoe>
SOCKET-CLOSE should be in the cleanup forms
rogersm has quit [Quit: Leaving...]
iAmDecim_ has quit [Ping timeout: 265 seconds]
<bubo>
Everything works as expected now! Thanks for your help!
<bubo>
It's my first deep-dive into both CL and networking, love the language so far.
<beach>
Congratulations!
<phoe>
bubo: you use some sort of slime or sly or other toolkit, right?
<Josh_2>
very cool bubo!
<bubo>
phoe: Yes, Doom Emacs / Sly
<phoe>
bubo: perfect
davepdotorg has joined #lisp
Necktwi has quit [Ping timeout: 256 seconds]
Necktwi has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
m_v_m has joined #lisp
<m_v_m>
Hello all. I am quite new in a lisp world. I would like to use Lisp binding to leveldb. Everything is cool but I really don't know how to use it. The main thing is the class db there. I can not use it as a (make-instance 'leveldb:db). There is an error: "The symbol ~S is not external in the ~A package.". Any ideas why?
<phoe>
_death: he's probably right, the symbol DB should be exported if it names a class
<phoe>
m_v_m: that's not the error, just its format string; you likely get something like "The symbol LEVELDB::DB is not external in the LEVELDB package."
<phoe>
the instance is created via the function LEVELDB:OPEN and that symbol is exported
<_death>
m_v_m: you're supposed to use leveldb:open or leveldb:with-open-db
<phoe>
still, it should be possible to CHECK-TYPE the type of DB
imai has joined #lisp
<_death>
phoe: correct
<m_v_m>
_death: are you the owner of the repo?
<_death>
yes
<m_v_m>
I see that the last commit has been made some time ago. Is it not maintained anymore? Or (which is quite common in lisp world) so well writen then you dont need to do anything there ? :D
<_death>
I don't use it nowadays, but don't see why it should not work (assuming leveldb interface didn't change..).. patches are still welcome
narimiran has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
aartaka has quit [Read error: Connection reset by peer]
<m_v_m>
Ok, my last question before implementation. Should it be possible to search values by their prefixes? like ("dog----123123" "cat----123213") give me all "dogs" by (get "dog") ? (or something like that).
<_death>
you can use leveldb:map for that, with the right seek argument
<m_v_m>
thank you!
aeth has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
ebrasca has quit [Remote host closed the connection]
Bumble has joined #lisp
Bumble has quit [Client Quit]
Bourne has quit [Ping timeout: 260 seconds]
alfonsox has quit [Remote host closed the connection]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
aartaka has joined #lisp
Bumble has joined #lisp
m_v_m has quit [Remote host closed the connection]
alfonsox has joined #lisp
Bumble has left #lisp [#lisp]
Bumble has joined #lisp
CrazyEddy has joined #lisp
Bumble has left #lisp [#lisp]
davepdotorg has joined #lisp
imai has quit [Quit: WeeChat 2.3]
<treflip>
What is the best way to work with Prolog in CL? I've read PAIP a long time ago and its part on embedded prolog was very impressive. Finally, I have a use case where I need to call an embedded or inferior Prolog from CL, but I don't know which approach is better. Or maybe I'm wrong and I don't need any Prolog at all :D
galex-713 has joined #lisp
davepdotorg has quit [Ping timeout: 240 seconds]
gaqwas has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
cosimone has quit [Read error: Connection reset by peer]