p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
gxt has quit [Remote host closed the connection]
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
gxt has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #lisp
ldb has joined #lisp
ldb has quit [Client Quit]
Oladon has joined #lisp
wxie has joined #lisp
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
Lord_of_Life has joined #lisp
catchme has joined #lisp
SGASAU` has quit [Remote host closed the connection]
SGASAU` has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
SGASAU` has quit [Remote host closed the connection]
Jesin has joined #lisp
gxt_ has joined #lisp
agam has joined #lisp
SGASAU` has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
gxt has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
mangul has joined #lisp
agam has quit [Ping timeout: 256 seconds]
shangul has quit [Ping timeout: 264 seconds]
noobineer has joined #lisp
bitmapper has quit [Ping timeout: 272 seconds]
orivej_ has quit [Ping timeout: 272 seconds]
pjb has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
jesse1010 has joined #lisp
<jesse1010> why lisp over c++?
noobineer has quit [Read error: Connection reset by peer]
<ober> jesse1010: it predates c++
<ober> jesse1010: see #clasp, you can have both, Lisp, and C++
noobineer has joined #lisp
gxt_ has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
mangul has quit [Ping timeout: 260 seconds]
<jesse1010> thank you
<jesse1010> but in general, why is lisp so great?
<solrize> jesse1010, it's completely different, lisp is a forerunner of today's scripting languages but with much more serious implementations
Kaisyu has joined #lisp
<jesse1010> what does lisp allow me to do, that makes it so special?
twelvemonkeys has joined #lisp
orivej has quit [Read error: Connection reset by peer]
orivej has joined #lisp
noobineer has quit [Read error: Connection reset by peer]
noobineer has joined #lisp
<solrize> um, what languages do you use now?
<jesse1010> c++
buffergn0me has quit [Ping timeout: 260 seconds]
<solrize> do you use anything like python or javascript?
<jesse1010> no
noobineer has quit [Read error: Connection reset by peer]
<xristos> do you enjoy writing c++?
<solrize> ok. i would say that with lisp (or python, or to some extent JS), 1) you don't have to worry about allocating and reclaiming memory, because the language handles that for you; 2) you don't have to worry much about pointer errors and core dumps, because the language traps most errors when they happen and tells you what went wrong, instead of silently corrupting something; 3) there is nowhere near as much boilerplate needed to get anything done
noobineer has joined #lisp
<aeth> Lisp rarely directly competes with C++. The people who didn't need high-performance, realtime, etc., mostly moved to Java and C# decades ago. That's why any language aiming at C++ programmers these days has no GC. Everyone else moved on.
<solrize> so basically you can write code more productively but you take an efficiency hit, in both cpu usage and memory consumption. lisp (unlike python) has good compilers so the cpu hit is not that bad, though the memory footprint still is larger
mangul has joined #lisp
agam has joined #lisp
<solrize> yeah that's a good point, java took over the gc-able segment of c++ users
<solrize> anyway if languages interest you as a subject, then definitely try lisp or some dialects of it
<solrize> mitpress.mit.edu/sicp is a good book to read
<aeth> solrize: Another thing you get in pretty much every language that's not C or C++ is runtime safety, sort of your point #2. Sure, a C/C++ compiler will try to catch everything and vomit up dozens of lines of an error message if it finds something, but that's limited to runtime.
<aeth> e.g. most languages do array bounds checking if it cannot prove at compilation time that the array access is in bounds. There goes like half of your C++ bugs unless you run everything through valgrind after every change.
<aeth> s/that's limited to runtime/that's not available at runtime/
agam has quit [Ping timeout: 256 seconds]
<jesse1010> can lisp be used as object oriented?
abhixec has joined #lisp
pjb has joined #lisp
<jesse1010> thanks
<jesse1010> i wonder about GUI abilities, I guess I could use wxwidgets with c++ then connect to a LISP service app
<solrize> aeth yeah, that's what i mean, there are runtime checks. also jesse1010: lisp has a very fancy OOP system called CLOS, goes way beyond c++'s OOP but imho these days it's less interesting than it once was, since OOP has gone out of style
<aeth> solrize: There aren't necessarily runtime checks. The difference is safe by default vs. fast by default. I'd wager that most code needs to be safe, not fast.
<jesse1010> are there any OS's written in Lisp?
<solrize> jesse1010, yes that's been done a few times, the lisp machine (it was lisp-specialized down to the hardware) being the most notable example
<jesse1010> by the looks of it, would you say LISP is one of the easier languages to write an OS in?
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
Jeanne-Kamikaze has joined #lisp
karlosz has quit [Quit: karlosz]
<aeth> jesse1010: The point of a Lisp is that language extensions look the same as language built-ins because of the uniform syntax. You can't write your own for () { } loop in most languages (although a few probably let you).
<aeth> jesse1010: So while Lisp itself isn't a language for writing operating systems, you're free to add extensions to make it into one.
<aeth> (It just probably won't be portable code afterwards.)
Lycurgus has joined #lisp
<aeth> In particular, assembly languages are representable pretty easily in s-expression form, which helps with OSes and compilers.
Oladon has quit [Quit: Leaving.]
<aeth> But s-expressions are just as capable of expressing XML/HTML/etc., which is generally more useful for modern programmers.
<solrize> jesse1010, OS's are usually about precise control of machine resources, so lisp isn't great for that
<jesse1010> why not?
<Jeanne-Kamikaze> I think wasm/web-assembly is actually written in a lisp.
<aeth> Jeanne-Kamikaze: iirc, it just has an s-expression form to read it
<aeth> solrize: The worst case scenario is that you lose access to most of the standard library in the OS kernel
<aeth> But it's totally doable.
<jesse1010> yeah I would be ok breaking from everything
<aeth> And even C's standard library isn't available inside of Linux iirc
* Lycurgus .oO( boy somebody sure stepped in it)
<aeth> It's probably a bit easier in C because you can provide your own malloc-replacement.
<jesse1010> I would be writing my own assembler/compiler before the OS
<aeth> I think that's what Mezzano does, although it uses SBCL to bootstrap. https://github.com/froggey/Mezzano
Necktwi has joined #lisp
buffergn0me has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
<ober> well the kernel has many of the things it needs.
<ober> for memory management, allocation, and not doing division
<aeth> Right, the kernel reinvents many of the things that it needs, no matter what language it's written in.
karayan has joined #lisp
<aeth> But in a language with real macros and uniform syntax, you don't even notice.
<aeth> You might not even notice you're using different things if it's as simple as (:use :kernel) instead of (:use :cl) in the package definition. Well, until you try to use something that isn't defined.
<jesse1010> what are your recommendations for LISP guy apps?
libertyprime has joined #lisp
<aeth> GUI?
<aeth> Well, there are different ways to make a GUI, such as using the web browser, making a pseudo-GUI in the terminal, using a toolkit, or even using a 3D API like OpenGL with something like SDL.
<aeth> There's a Lisp-native GUI toolkit called CLIM. An open source implementation is here: https://github.com/McCLIM/McCLIM/
<aeth> Qt bindings also exist. Iirc, I think the Gtk ones are problematic.
<aeth> As for graphical OS stuff, you'd want ot talk to froggey about Mezzano. https://github.com/froggey/Mezzano/blob/master/doc/screenshot1.png
[mark] has joined #lisp
<aeth> There are a lot of OpenGL-based stuff, mostly for games, e.g. https://borodust.org/projects/trivial-gamekit/ or https://github.com/vydd/sketch
<aeth> And finally, if you're on macOS, you can use CCL to integrate with Apple's Objective-C macOS APIs. And on any OS, you can embed ECL within a graphical C or C++ program.
wxie has quit [Remote host closed the connection]
zaquest has joined #lisp
<jesse1010> aeth: thank you!
<jesse1010> going to bed, thanks for all the help everyone
jesse1010 has quit [Ping timeout: 256 seconds]
Lycurgus has quit [Quit: Exeunt]
buffergn0me has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
catchme has quit [Quit: Connection closed for inactivity]
shifty has joined #lisp
EvW has joined #lisp
gaqwas has joined #lisp
SGASAU`` has joined #lisp
wxie has joined #lisp
SGASAU` has quit [Ping timeout: 256 seconds]
jasom has joined #lisp
dmiles has quit [Read error: Connection reset by peer]
dmiles has joined #lisp
<beach> Good morning everyone!
<solrize> hey beach where are you, that it's morning there?
<solrize> and good morning ;)
shifty has quit [Ping timeout: 246 seconds]
<beach> UTC+2 as always.
<beach> ... in the summer.
<solrize> nice
[mark] has left #lisp ["Konversation terminated!"]
[mark] has joined #lisp
agam has joined #lisp
Oladon has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
akoana has left #lisp ["Leaving"]
agam has quit [Ping timeout: 272 seconds]
<markasoftware> What are some tools for generating html documentation for my system?
<no-defun-allowed> Staple?
<markasoftware> that seems reasonable, thanks
agam has joined #lisp
jeosol has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
agam has left #lisp ["ERC (IRC client for Emacs 26.3)"]
SGASAU`` has quit [Remote host closed the connection]
SGASAU`` has joined #lisp
SGASAU`` has quit [Ping timeout: 258 seconds]
SGASAU`` has joined #lisp
Necktwi has quit [Quit: leaving]
narimiran has joined #lisp
<ober> now that 64bit is free on all platforms... it's hard to not push the lw
<beach> What do you mean? I don't understand.
<no-defun-allowed> lw = LispWorks?
<beach> And what does it mean to "push" it?
mangul has quit [Remote host closed the connection]
* no-defun-allowed should test LispWorks on the Raspberry Pi.
<no-defun-allowed> Or not, the time limit would prohibit myself from using it to run a server.
mangul has joined #lisp
<ober> I mean Harlequin lisp, yes lw
<ober> true
epony has joined #lisp
<solrize> lw = harlequin? i didn't know that
<solrize> and it's free now?
<ober> their free version is all platforms/64bit now, that's all same timeout though as pointed out above
gravicappa has joined #lisp
wxie has joined #lisp
ngqrl has joined #lisp
SGASAU``` has joined #lisp
SGASAU`` has quit [Ping timeout: 256 seconds]
SGASAU``` has quit [Remote host closed the connection]
SGASAU``` has joined #lisp
<p_l> They made a new personal release?
<p_l> Cause maybe two weeks ago it was still stuck at 6.1 32bit
<p_l> Looks like they put up 7.1,will have to check asap
wxie has quit [Ping timeout: 256 seconds]
SGASAU``` has quit [Ping timeout: 258 seconds]
sauvin has joined #lisp
jonatack has joined #lisp
mangul has quit [Ping timeout: 260 seconds]
Lycurgus has joined #lisp
vegai has joined #lisp
<ober> 7.1.2 64bit is up now
<p_l> indeed it works, even an arm64 version is up
<ober> unsure the timeout value.
<ober> and arm64 has threads!
sauvin is now known as Sauvin
<ober> 5 hours
jonatack has quit [Ping timeout: 272 seconds]
Oladon has quit [Quit: Leaving.]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
jonatack has joined #lisp
sdumi has joined #lisp
kbtr has joined #lisp
slyrus has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
madage has joined #lisp
sdumi has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
jonatack has quit [Ping timeout: 264 seconds]
wxie has joined #lisp
epony has quit [Quit: reconfig]
shangul has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
abhixec has quit [Quit: leaving]
bebop has joined #lisp
Lycurgus has quit [Remote host closed the connection]
X-Scale` has joined #lisp
X-Scale` is now known as X-Scale
bhartrihari has left #lisp ["Disconnected: closed"]
epony has joined #lisp
<easye> Mornin' Europe. "fasl" is an acronym for "Fast system loader" or "fast system loading"? Stylistically, should "fasl" be capitalized as "FASL"?
bhartrihari has joined #lisp
<phoe> "(which is in LispWorks's FASL or Fast Load format)"
<phoe> that's the version I've heard
Jeanne-Kamikaze has quit [Quit: Leaving]
<ober> some use fasl. some use fasl64u
themasterx-ahmad has joined #lisp
<themasterx-ahmad> hi
<ober> hello
<ober> hey Phoe see privmsg please
<beach> Hello themasterx-ahmad.
<easye> Ok, I seem to be definitely confused on the "system" part.
epony has quit [Remote host closed the connection]
<easye> Still, there is something incongruous about calling a file containing a compiled representation a "fast loader".
<ober> and how trivial is it to decompile the fasl back to lisp code?
<themasterx-ahmad> so you guys ! are you all working viusal lisp ?
<beach> easye: I don't think it's "loader", I think it's "fast loadING"
<easye> ober: that varies by implementation. Usually one uses CL:DISASSEMBLE interactively to inspect results.
<ober> yeah
bhartrihari has left #lisp ["Disconnected: closed"]
<easye> beach: that makes a little more sense.
<ober> easye: yeah, but asm
bhartrihari has joined #lisp
<beach> themasterx-ahmad: I am not sure I understand your question.
<easye> ober: ah, yeah, there is no generalized way to reverse the transformation.
<phoe> themasterx-ahmad: what do you mean, visual lisp?
<beach> ober: You can't get the source back. It has been at least "minimally compiled", so the macros are gone.
<ober> a lot of systems still don't automatically compile-file
<themasterx-ahmad> ok , lisp is programing language for autoCAD
<ober> clisp had pretty easy to parse fasl I thought
<beach> themasterx-ahmad: Oh, this channel is dedicated to Common Lisp.
<beach> Not Autolisp.
<themasterx-ahmad> ah sorry i didn't read well
random-nick has joined #lisp
<beach> ober: Even so, the FASL has to be minimally compiled, which means that macros are expanded already.
pjb has joined #lisp
<ober> yeah we did that as some of us have generators hooked up to uncle john, and he's spinning so fast in his grave that CL took the lisp name for itself, we never have to pay those evil corporations for power again!
<beach> ober: Interestingly, SICL takes that restriction literally, and the SICL FASL contains the abstract syntax tree of the code after the macros have been expanded.
<ober> nice
<ober> but that's much more a scheme right?
<beach> ... which means that FASLs are largely independent of the backend.
<ober> or was it LISPs
<ober> lisp in small pieces
epony has joined #lisp
<beach> ober: What is your question about?
<beach> ober: Oh, maybe you are confusing SICP and SICL.
<beach> minion: Please tell ober about SICL.
<minion> ober: 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
<ober> you're right.
<beach> themasterx-ahmad: So is Autolisp the reason you came here, or are you interested in Lisp in general?
<beach> PCL says "fasl" means "fast-load file".
<easye> "fast-load file" is at least a noun.
<themasterx-ahmad> beach autolisp
themasterx-ahmad has left #lisp [#lisp]
<beach> That settles that.
jonatack has joined #lisp
<p_l> easye: fast load
<p_l> nothing else, because "systems" weren't a thing when FASL was defined
pve has joined #lisp
shka_ has joined #lisp
<easye> The interesting (?) thing about the use of the term "FASL" is that it doesn't appear to have been "carefully defined" in the CLHS.
Posterdati has joined #lisp
<phoe> correct
<phoe> it came from practice, not from the standard
<easye> But the use of fasl must have been practice that could have been standardized, as the only (?) place it occurs in CLHS is in an example about CMUCL <http://www.lispworks.com/documentation/HyperSpec/Body/f_merge_.htm>
benjamin1 has joined #lisp
<easye> "fasl" should be synonymous with "compiled on-disk representation" which is always an imprecise mouthful.
<easye> Was there ever a "slow loading compiled representation"?
libertyprime has quit [Ping timeout: 265 seconds]
<easye> Anyways, enough navel-gazing. Onto some CONS...
libertyprime has joined #lisp
<p_l> easye: both plain source files and FASL files are loadable with LOAD, and this the origin for FASL - early load would mean parsing, any kind of compilation etc. Adding FASL meant that you could reload the same content much faster
<p_l> and that was in quite resource constrained times
<beach> And since we are less constrained these days, I just took the restriction literally, so the SICL fasl is just minimally compiled. No more.
<beach> It makes the code MUCH simpler.
<beach> I mean the FASL generator and the loader.
<easye> p_l: so you would advocate that "FASL" be capitalized as an acronym? I observe that like LISP-->Lisp, FASL is more commonly downcased these days.
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #lisp
<p_l> easye: it became its own noun, except when speaking about concrete implementations where it might make a difference
benjamin1 has quit [Ping timeout: 260 seconds]
<p_l> for example, in sentences like "QFASL files are composed of one or more WHACKS, each WHACK is a sequence of 16 bit nibbles which are considered in groups"
libertyprime has quit [Remote host closed the connection]
benjamin1 has joined #lisp
liberliver has joined #lisp
jprajzne has joined #lisp
mathrick has joined #lisp
pmden has joined #lisp
liberliver1 has joined #lisp
Bourne has joined #lisp
liberliver has quit [Ping timeout: 260 seconds]
liberliver1 is now known as liberliver
benjamin1 has quit [Ping timeout: 246 seconds]
mathrick has quit [Remote host closed the connection]
mathrick has joined #lisp
shka_ has quit [Ping timeout: 265 seconds]
<splittist> So what is (was) a FASD ?
gaqwas has quit [Changing host]
gaqwas has joined #lisp
<splittist> FASL Dump, I trhink (to answer my own question)
liberliver has quit [Remote host closed the connection]
<splittist> Or maybe just FASt Dump
liberliver has joined #lisp
benjamin1 has joined #lisp
<phoe> yep
gaqwas has quit [Ping timeout: 256 seconds]
gaqwas has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
toorevitimirp has joined #lisp
jonatack has joined #lisp
mangul has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
shangul has quit [Ping timeout: 258 seconds]
<p_l> fasd was GCL. QCFILE was FASL compiler, yes
liberliver1 has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
kingragworm has joined #lisp
toorevitimirp has joined #lisp
kingragworm has quit [Remote host closed the connection]
liberliver has quit [Ping timeout: 264 seconds]
liberliver has joined #lisp
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
liberliver1 has quit [Ping timeout: 260 seconds]
sdumi has quit [Ping timeout: 246 seconds]
wxie has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
sdumi has joined #lisp
shifty has joined #lisp
ljavorsk has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
karlosz has quit [Quit: karlosz]
<solrize> sicl has 142K LOC of .lisp files
jonatack_ has quit [Quit: jonatack_]
<beach> You might be right.
jonatack has joined #lisp
<solrize> was fasd a lispm thing?
<solrize> oh GCL
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
<p_l> solrize: MIT CADR had FASLs (QFASL) and cold load bands
<solrize> what about that LMI directory linked above--is that better than the CADR code?
<solrize> i see aeth answered me yesterday after i went to bed, saying the cadr emulator busy loops when idle... i guess i have a bare metal server i can let that happen on, especially if it's just 1 core
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
<p_l> solrize: LMI is, afaik, much less diverged from CADR over time, though by the time of late TI Explorer it looked much different (and the general layout of "Q" - words, changed)
<p_l> much less in comparison with symbolics that is
<solrize> how does that stuff compare with what is being used today, in debugging tools etc.?
<p_l> solrize: a total mishmash, and not just in terms of Lisp stuff
mangul has quit [Remote host closed the connection]
<p_l> that said, Lisp machine (all of them - CADR, LMI, TI, Symbolics) had full access across the whole system in high level tooling, which is pretty rare today
<beach> solrize: The tools situation, especially in FLOSS Common Lisp implementations is dismal. But some of us are working to change that.
<solrize> thanks beach yeah that fits the picture i had some years back
<p_l> solrize: if you want to do some archeology, there's CADR, LMI, TI and partial Symbolics emulation available
<solrize> i wonder whether trying to resurrect/port the CADR tools could be of any help, or anyway reimplement the functionality, if the code itself is useless
shifty has quit [Ping timeout: 272 seconds]
<solrize> i never really used those things and i feel like i missed out
<p_l> solrize: CADR tooling is quite primitive compared to later stuff, I believe
<solrize> i've seen them in use and played with them a little but never got familiar with how they worked
<solrize> ic
<p_l> well, primitive to later versions on Lisp Machines - the advantage of lisp all the way up/down/sidewise/widdershins was still there
<no-defun-allowed> Unlikely; I think the lispms have vastly different architecture to C machines.
shifty has joined #lisp
<solrize> no-defun-allowed, well that affects the compilers but the high level code was fairly CL-like
<beach> no-defun-allowed: I don't think that matters much anymore.
<p_l> fortunately we no longer run C machines either
<p_l> PDP-11 died before last PDP-10 was delivered, as it turns out
<solrize> somewhere i have a printed orange nual that i used to read at night
<p_l> so one can argue that lisp CPUs won against C ;)
<solrize> haha
<solrize> nah there's no tag bits any more
<solrize> sparc had that
benjamin1 has quit [Ping timeout: 272 seconds]
<no-defun-allowed> I mean that a decent bit of the debugging software on the CADR might not be so applicable to Common Lisp implementations; but I don't remember what hardware assistance it would have had.
<p_l> solrize: the internals of CADR/3600/Ivory also didn't have tag bits, as they were microcoded ;)
<p_l> solrize: btw, POWER does have tag bits, but that mode is undocumented
<solrize> i remember oracle floating some kind of hardware support for java gc, but no idea if anything happened with it
<solrize> no-defun-allowed, if you mean stuff like hardware breakpoints, most cpus have that now
<p_l> solrize: Oracle is abusing MMU for accelerated GC nowadays by putting tags into high bits (but still keeping pointers canonical)
<solrize> ahh ok... is that sparc specific (if they stlil use sparc at all) or can x86 do it too?
<p_l> that's on amd64 only so far
<p_l> but the mechanism is portable
<solrize> sounds ok
<p_l> so long as you have a wide enough address space
<p_l> Azul had special Java-oriented CPU
<p_l> now they also use MMU tricks with nested page tables
<p_l> on recent-enough amd64
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #lisp
<p_l> Shenandoah just adds an extra forwarding pointer to every object - that's a technique that was used on Lisp machines, but there it used tagged pointers that were natively understood by microcode
<solrize> what cpu did azul use?
<solrize> i think that's what i was thinking of re special hardware
<solrize> shenandoah boxes everything? or just has an extra field used only during gc
<froggey> Shenandoah has ditched the forwarding pointer in recent versions and moved over to using pointer bits like ZGC
<p_l> froggey: oh, that's very recent info for me
<solrize> wow i didn't know there was this much diversity of high end gc's these days
<White_Flame> p_l: what do you mean by the lispms not having tag bits because they're microcoded?
<p_l> White_Flame: I meant it as difference between SPARC tag bit support (which was fully hw) and CADR/LMI/TI/3600/Ivory where it was microcoded affair
<White_Flame> some had 40-bit RAMs, some encoded 4 40-bit words into 5 32-bit hardware RAM words
<White_Flame> ah
<p_l> White_Flame: an unfortunately lost to sands of time paper from Symbolics talked about their treatment of Alpha CPU as microcode engine
shifty has quit [Ping timeout: 256 seconds]
<p_l> White_Flame: CADR, LMI and TI all used 32bit wors
<p_l> *words
<White_Flame> right, the symbolics ones went 40-bit
<p_l> Ivory went 40 bit. 3600 was 36bit
<White_Flame> but still, all still tagged, and dedicated places in the words for tags
<solrize> CADR wasn't 36 bit?
shifty has joined #lisp
<solrize> oh
<solrize> ok
<solrize> 36 + tags?
<p_l> no, 36bit is the whole word, with tags
<solrize> ah ok. and cadr was 32 with tags?
<solrize> i had somehow thought it was 36 but np
<p_l> CADR/LMI/TI used 32bits and included any tags/cdrcode in it
<solrize> ic thanks
<p_l> LMI I believe used 8bits for tags, while TI changed that to 7
pjb has quit [Ping timeout: 260 seconds]
<jackdaniel> I believe that my fridge has 1 bit: on / off switch, I'm not sure if it is tagged
<solrize> do you think it is interesting for more than historical/retro reasons to run one of those systems (in emulation) for a while? i.e. to find inspiration in the tooling and that sort of thing
<jackdaniel> running genera in vm is suposedly very interesting experience
jesse1010 has joined #lisp
<solrize> yeah i mostly meant cadr since the code is out there
<p_l> symbolics ivory emulation is subtly broken, but it has I think the widest selection of non-OS software
<p_l> with everything else you pretty much get the bare bones fresh install of OS and that's it
shifty has quit [Ping timeout: 264 seconds]
shifty has joined #lisp
<solrize> ic. yeah doesn't sound that exciting
<solrize> sicl's gc is very simple unless there's a bunch that i don't see in the gc directory
KingRiver has joined #lisp
<beach> solrize: SICL doesn't exist, so lots of the code is unfinished. If you are interested in its garbage collector, I suggest you read the specification.
<solrize> ah ok
Inline has joined #lisp
<beach> Or you can read any of the 15 or so research papers on new technique we either use or plan to use.
<solrize> thanks, looking at that specification now... are the other papers in the sicl papers directory?
<beach> Yeah.
<solrize> k
<solrize> i guess this looks pretty standard
<beach> What does?
<beach> Also we extracted several modules into independent repositories that are now maintained separately, like Eclector, Trucler, Concrete Syntax Tree. There are more to come.
<solrize> cool
<beach> The first-class global environments code, for instance. And perhaps all of the Cleavir compiler framework some day.
<beach> What looks standard?
<solrize> the description of the global gc looks fairly standard... reading about the nursery gc now
<beach> If you consider a concurrent and parallel non-moving GC as "standard", sure.
<solrize> ghc's is something like that now
<solrize> for a while i think compacting was preferred to non-moving, but this has changed somehow. i'm not up on it
<solrize> as you mention, non-moving helps ffi's
<no-defun-allowed> I would say non-moving collectors are simpler to manage in multiprocessing environments, but I haven't read enough literature on modern collectors.
<solrize> https://github.com/xoofx/gcix here's a portable version of immix
<solrize> no-defun-allowed, jones et al's book is really good but it's not the very latest
<solrize> and i don't know what's been going on since then
<no-defun-allowed> Yeah, I have been reading the Handbook from the university library.
<solrize> it's from 2012
<solrize> yeah that's the one
<solrize> beach, are you one of the sicl developers?
<no-defun-allowed> beach started the SICL project.
<solrize> oh wow nice
<solrize> the sicl doc is impressive
<solrize> looks like this gcix hasn't changed in 6 years
<solrize> no-defun-allowed, perry cheng's phd thesis from the early 2000s is also really good reading
<solrize> about parallel real time gc
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<solrize> are there significant differences between scheme and lisp for compiling and runtime purposes? i don't mean the surface syntax but past that
<beach> First-class continuations in Scheme make things complicated.
jeosol has quit [Remote host closed the connection]
<beach> You either have to allocation invocation records on the heap, or copy the stack to the heap when you do a CALL/CC.
<beach> s/allocation/allocate/
<beach> On the other hand, Scheme doesn't have to bother with generic dispatch.
<beach> ... and the MOP.
<beach> Otherwise, I can't think of any particularly significant differences.
<solrize> thanks
<beach> Sure.
<solrize> yeah i forgot about call/cc
<solrize> this doc is great
jeosol has joined #lisp
pjb` has joined #lisp
KingRiverLee has joined #lisp
gxt_ has joined #lisp
EvW1 has joined #lisp
jeosol53 has joined #lisp
KingRiver has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
sdumi has quit [Ping timeout: 265 seconds]
jeosol has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
jeosol53 has quit [Remote host closed the connection]
sdumi has joined #lisp
ayuce has joined #lisp
Bike has joined #lisp
<solrize> anyway gnite all
<solrize> zzz
<no-defun-allowed> Take care.
benjamin1 has joined #lisp
whiteline_ has joined #lisp
whiteline_ has quit [Remote host closed the connection]
whiteline_ has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
pjb` has quit [Ping timeout: 260 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
amerlyq has joined #lisp
pmden has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
pmden has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
benjamin1 has quit [Ping timeout: 246 seconds]
ech has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
benjamin1 has joined #lisp
dddddd has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
pjb` has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
ngqrl has quit [Quit: Connection closed for inactivity]
orivej_ has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
benjamin1 has quit [Ping timeout: 260 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
milanj has joined #lisp
pjb` has quit [Ping timeout: 265 seconds]
dmiles has quit [Ping timeout: 246 seconds]
EvW1 has quit [Ping timeout: 252 seconds]
Bourne has quit [Ping timeout: 256 seconds]
pfdietz has joined #lisp
pmden has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<pfdietz> "pfdietz: I remember you working with something similar before, could you help us out?" --what was the issue?
<jmercouris> pfdietz: you are quoting yourself?
<jmercouris> or quoting someone addressing you?
<pfdietz> No, quoting phoe
<jmercouris> I see :-)
pmden has joined #lisp
<jackdaniel> "Quotes on the internet are tricky, even if started with a single apostrophe." - Julius Cesar
rogersm has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
<jesse1010> is it possible to put lisp ecl inside of wxwidgets c++?
gxt_ has quit [Ping timeout: 240 seconds]
<jackdaniel> you may use ecl like c libraries
<jackdaniel> so if it is possible to use i.e libfoo.so in wxwidgets c++, then libecl shoudl work just fine
pjb` has joined #lisp
kpoeck has joined #lisp
SGASAU has joined #lisp
<p_l> I haven't tested it recently, but it used to be possible to compile ECL with C++ compiler and then even use inline C++ snippets
wsinatra has joined #lisp
* p_l even did a crazier thing, since he did that with MSVC++
<jackdaniel> yes, but it is not necessary to use lisp from c++ library
<jackdaniel> s/library/application/
Lord_of_Life_ has joined #lisp
Inline has quit [Ping timeout: 260 seconds]
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<phoe> pfdietz: basically, scanning over all quicklisp libraries that contain a particular symbol
Oddity has joined #lisp
<phoe> I'd like to look for set-macro-character and set-dispatch-macro-character because of https://gitlab.common-lisp.net/asdf/asdf/-/issues/31
<pfdietz> The problem is that one can't load all the packages, so one has to cheat.
cosimone has joined #lisp
<pfdietz> I was looking for uses of sbcl internal symbols in various systems.
<Shinmera> The individual talks for ELS2020 are now on YouTube. https://www.youtube.com/watch?v=lqVN1fGNpZw&list=PLA66mD-6yK8yjlJCI0Ay2f2IvvmB9Ktga
<pfdietz> These are either directly referenced, by <package>:[:]<name>, or imported-from/used in defpackages.
<beach> Shinmera: Excellent!
<pfdietz> The former you find by simple grepping, the latter by a ghetto reader that doesn't get *package* right. SBCL now has restarts to keep the reader from aborting when a package prefix isn't found, so it can keep going.
<White_Flame> Shinmera: nice!
gko has joined #lisp
choegusung has joined #lisp
<pfdietz> Other uses for that cheating reader were finding package name collisions https://github.com/pfdietz/find-lisp-package-name-collisions and in ansi-test for reading in fodder expressions for mutational test generation. https://github.com/pfdietz/ansi-test/blob/master/random/mutate.lsp
<kpoeck> Shinmera kudos
gxt has joined #lisp
seok has joined #lisp
<seok> Morning guys
<seok> How do I work with bytestreams?
<seok> byte arrays *
<Bike> you can make a byte array by passing the appropriate :element-type to make-array, and then you can just use aref
<jdz> "Like with any other arrays" is probably not the answer you're looking for?
<Shinmera> I don't know, how /do you/ work with them?
Lord_of_Life has quit [Read error: Connection reset by peer]
<seok> I get the byte from here
<seok> but I'm not sure whether I'm suppose to convert that to string
<seok> I'm guessing it is a byte array of series of ints and floats
<jdz> It looks like an "LZMA compressed data, non-streamed, size 49320".
<seok> They somehow convert this into a csv
<seok> babel:octets-to-string returns illegal utf8 error
Lord_of_Life has joined #lisp
<Bike> a zip file is probably not a valid utf8 string, no
<jdz> seok: You'll get a similar result when you try it on /dev/urandom.
<seok> Oh, is it a zip?
<Bike> jdz said it was LZMA compressed
<Bike> does wherever you're getting this from not document a format?
<seok> Well, I just monitored the network to see how they are providing the data
KingRiverLee has quit [Ping timeout: 256 seconds]
<seok> for normal users you are suppose to download like this https://www.dukascopy.com/swiss/english/marketwatch/historical/
<Bike> okay, well, first things first you have to figure out the format it's in
<seok> but it was a pain to crawl
<seok> Someone wrote a python code to crawl this https://github.com/giuse88/duka/blob/master/duka/core/fetch.py
<seok> It is not working atm, but it doesn't look like a zip format
vaporatorius has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
<Bike> this doesn't look like it interprets at all
<Bike> it just downloads the file
keepzen has joined #lisp
<phoe> pfdietz: I basically need to grep Quicklisp for occurrences of these two strings. That, hopefully, should be enough.
<seok> hm
<phoe> lzma!
orivej_ has quit [Read error: Connection reset by peer]
<phoe> I have a lzma library
<seok> would cl-lzma work?
<seok> phoe: nice!
<phoe> that's the library that I meant, yes
orivej has joined #lisp
<seok> Oh that's yours
EvW has joined #lisp
<phoe> it's a small wrapper over the original lzma library in C
<seok> I will check it out
<jdz> Aww, FFI :(
<seok> do I just use decompress-from-vector ?
<Bike> "No complete natural language specification of the compressed format seems to exist, other than the one attempted in the following text. " oh hell
jprajzne has quit [Quit: Leaving.]
<seok> Hm, so that returned a bigger byte array, so I guess that is working
<Bike> the description on wikipedia is very obvious reverse engineered. sheesh. i'd use ffi too.
<Bike> obviously*
<seok> How do i get the data out of this array?
<Bike> again, that depends on the format of the data, which none of us know.
<Bike> it looks like processor.py does that kind of thing, so maybe you can figure out the format by looking at it.
ljavorsk has quit [Ping timeout: 256 seconds]
<phoe> seok: data out of this array?...
<phoe> what do you mean
<phoe> the array *is* the data
<seok> so I mean
<phoe> you should get a ub8 vector, this is the uncompressed stuff
<phoe> if you want to dump it to file, alexandria:write-byte-vector-into-file
<seok> can I figure out the format from this?
<seok> is it a string?
<phoe> I don't know, you tell me
<seok> How would I find out?
<phoe> if it's a string, then you should be able to convert it via babel
<seok> Yeah, that didn't work
<phoe> I don't know, it's your archive, you should know what's inside
<seok> I'm still looking at the python code to figure it out
<phoe> LZMA has no metadata about files or folders or extensions
<seok> it should be some form of ints and floats
<Bike> what you have is a sequence of bytes. of course you can't figure out just from a sequence of bytes what those bytes represent. that's how we can encode and decode data on computers.
<phoe> LZMA just turns a ub8 vector into a ub8 vector
<phoe> and that rule holds both ways
<jackdaniel> are you sure it is not the other way around? ub8 vector into ub8 vector?
<jesse1010> does lisp have namespaces?
<phoe> might be, I need to read the lzma specification for that
<jackdaniel> it has packages
<jackdaniel> it is more cumbersome than namespaces but gives you some extra perks
<jackdaniel> and plenty of confused new programmers
KingRiverLee has joined #lisp
<seok> Haha
SGASAU` has joined #lisp
refpga has joined #lisp
X-Scale has quit [Ping timeout: 258 seconds]
SGASAU has quit [Ping timeout: 240 seconds]
bitmapper has joined #lisp
X-Scale` has joined #lisp
X-Scale` is now known as X-Scale
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
<seok> Is this the line that parses the bytes? tokens.append(struct.unpack('!IIIff', buffer[i * token_size: (i + 1) * token_size]))
<seok> tokens.append(struct.unpack('!IIIff', buffer[i * token_size: (i + 1) * token_size]))
<seok> Looks like a C struct
<seok> Yes I've been there
<seok> It is a bit over me because I don't know C
<Bike> it's in big endian format. three four byte unsigned integers followed by two four byte single floats.
<seok> Ah i see it
<Bike> you can get successive big endian numbers with aref and shift operations, and then use a library like https://github.com/marijnh/ieee-floats to get floats.
<beach> jesse1010: I think you should bite the bullet and learn to program in Common Lisp. I think you will have some very nice surprises compared to what you are used to.
<jesse1010> thank you, yes I am going to do it
<beach> Great!
<jesse1010> I would like to combine C++ wxwidgets and lisp using UNIX sockets
<jesse1010> so two separate programs and have them communicate
<beach> Hmm, that's different from what I suggested.
<beach> Oh, sure, that can be done.
<jesse1010> what did you suggest? ECL
<jesse1010> I could go that route I suppose
<beach> There are several implementations. If you are going to communicate over a byte stream, you are more free in your choice of Common Lisp implementation.
<beach> ECL would be the choice if you want to embed the Common Lisp code in your existing application.
<jackdaniel> (or if you want to make your CL program available to other unix program as a shared library, or when you target android/ios, I'm sure I could think of more ;)
<jesse1010> could I have the lisp code in a completely different file?
<jesse1010> if I were to embedd it with ECL
<beach> You should probably ask jackdaniel about that. He is the maintainer of ECL.
<jackdaniel> yes, lisp source code is expected to be in a different file than i.e C source code
<jackdaniel> but for pipes you'll have more community support if you stick to sbcl
<jackdaniel> that said you should learn at least basics of Common Lisp before you attempt to "embed" it
<jackdaniel> minion: tell jesse1010 about pcl
<minion> jesse1010: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
dmiles has joined #lisp
<beach> jesse1010: My suggestion was that you learn Common Lisp first, before attempting something like that. You may find that it's a great programming in its own right.
EvW has quit [Ping timeout: 260 seconds]
toorevitimirp has quit [Remote host closed the connection]
paul0 has joined #lisp
<jesse1010> I will do that
<jesse1010> Thank you all for your help. This is a very welcoming place.
<phoe> jesse1010: no problem!
<phoe> feel free to join #clschool as well
<jesse1010> cant seem to find this through google... is it possible to call ASM from lisp?
<beach> That is implementation dependent. But why would you want to do that?
<phoe> in implementation-dependent ways, but yes, if you absolutely need to
<phoe> the question is why
<Bike> does wxWidgets usually need assembler stubs
<beach> Ouch!
<jesse1010> for learning multiple things at once
<jesse1010> I know c allows for calling ASM
<Bike> it doesn't. some implementations of C do.
pjb` has quit [Ping timeout: 252 seconds]
<phoe> you don't want to learn multiple things at once
<Bike> if you want to learn assembler you should probably just learn assembler.
<beach> jesse1010: Believe me, you are much better off learning Common Lisp by itself at first.
<phoe> especially things as different as asm and Lisp
<Bike> if you try to learn assembler via lisp, you will have to learn all of lisp, assembler, and how to mesh assembler and lisp, which is not easy.
<beach> jesse1010: I think you will find that you don't need inlined assembly.
<jmercouris> I can think of literally 0 examples where inlined assembly makes a realistic difference
<jesse1010> ok I guess ill skip the ASM for now
<jmercouris> learning assembly in 2020, unless you are an computer engineer rather than a computer scientist, is pointless
<jackdaniel> so decisively!
<jesse1010> well, I am neither :) just a hobbiest
toorevitimirp has joined #lisp
paul0 has quit [Remote host closed the connection]
paul0 has joined #lisp
<Bike> i forgot C++ (but not C, i don't think) actually does have a standard 'asm' declaration, but how it actually works is totally implementation defined
<jackdaniel> 'pointless excercises are where the human spirit thrives, because there is no incentive which would redirect it' - Julius Cesar, 2020 bc
<jmercouris> 'stop making up quotes jackdaniel' - Abraham Lincoln
<jackdaniel> hm?
<jmercouris> not my words, honest Abe's
toorevitimirp has quit [Remote host closed the connection]
<phoe> 'without pointless exercises, Lisp would not even exist' - Harold Jay Sussman-McCarthy during the keynote speech of 837th ELS in year #.(most-positive-fixnum)
<splittist> there goes phoe flaunting his time machine again
pfdietz has quit [Ping timeout: 245 seconds]
KingRiverLee has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
KingRiverLee has joined #lisp
frgo_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
KingRiverLee has quit [Remote host closed the connection]
KingRiverLee has joined #lisp
gravicappa has quit [Ping timeout: 240 seconds]
pjb` has joined #lisp
aeth has joined #lisp
sdumi has quit [Ping timeout: 265 seconds]
KingOfCSU has joined #lisp
EvW1 has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
KingRiverLee has quit [Ping timeout: 246 seconds]
gxt has joined #lisp
sdumi has joined #lisp
KingOfCSU has quit [Ping timeout: 256 seconds]
jayspeer has joined #lisp
doesthiswork has joined #lisp
Necktwi has joined #lisp
jw4 has joined #lisp
narimiran has quit [Ping timeout: 256 seconds]
rippa has joined #lisp
KingOfCSU has joined #lisp
kpoeck has quit [Remote host closed the connection]
SGASAU has quit [Read error: Connection reset by peer]
EvW1 has quit [Ping timeout: 244 seconds]
SGASAU has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
bebop has quit [Ping timeout: 256 seconds]
H3dn1ng has joined #lisp
ljavorsk has joined #lisp
efm has joined #lisp
ljavorsk has quit [Ping timeout: 256 seconds]
gravicappa has joined #lisp
keepzen has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Snaffu has joined #lisp
<seok> How would I split a long vector into shorter vectors?
<phoe> hah, I just saw someone has a breakage with that
<seok> Do I have to use loop?
<phoe> seok: split, how?
<phoe> by a single-element delimiter?
<phoe> with no delimiters?
<phoe> by a more-than-single-element delimiter?
<seok> #(0 1 2 3 4 5) => (0 1) (2 3) (4 5)
<seok> like this
<phoe> loop + subseq
<phoe> also, these are lists, not vectors
<seok> Wondered if there was a built in
<seok> sure, thanks!
<phoe> not really, since "splitting" is poorly defined
<seok> yup
<seok> guess so
<phoe> you could want to split witout delimiters, like you have
<Bike> we can't give you advice on how to do something if you don't know what that thing is
<phoe> one could want "foo bar baz" to be split on #\Space and give ("foo" "bar" "baz")
<phoe> that's what split-sequence does
<seok> Ya, I've done those with strings
jayspeer has quit [Quit: ERC (IRC client for Emacs 26.3)]
<phoe> one could want "fooAAbarAAbazAA" split on "AA", cl-ppcre does that
<phoe> dunno about generalized vectors though
pmden has quit [Quit: Textual IRC Client: www.textualapp.com]
refpga has quit [Ping timeout: 256 seconds]
zaquest has quit [Ping timeout: 256 seconds]
rgherdt has left #lisp ["Leaving"]
refpga has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
rgherdt has joined #lisp
rgherdt has left #lisp ["Leaving"]
zaquest has joined #lisp
<Kabriel> seok: how about (let* ((a #(0 1 2 3 4 5)) (b (make-array (list 3 2) :displaced-to a))) b)
<Kabriel> -> #2A((0 1) (2 3) (4 5))
orivej_ has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
<seok> @kabriel I have already written it but thanks!
<seok> Wait, I've never seen that
<seok> Wow you can do that?
slyrus_ has joined #lisp
refpga has quit [Ping timeout: 260 seconds]
refpga has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
slyrus has quit [Ping timeout: 246 seconds]
zaquest has quit [Read error: Connection reset by peer]
zaquest has joined #lisp
<seok> hm, why doesn't this work? (defun f (bytes)
<seok> I get error
<seok> .
<Bike> please put long pastes in a pastebin site instead of dumping them into irc
<seok> oops
<seok> it was one line tho
<seok> #<SIMPLE-ERROR "Array element type of :DISPLACED-TO array does not match specified element type" {1002947473}>.
<Bike> well you didn't paste the actual code
<beach> That seems pretty clear.
<seok> the second bit was mistake sorry
<seok> just this
<seok> (defun f (bytes)
<Kabriel> If I have too (which isn't often), I will use :element-type (array-element-type a)
<Kabriel> beach: yes, a very clear error message for sure
<beach> For once! :)
<beach> As oppose to something like "The value nil is not a number" or something similar. :)
<seok> Oh that works!
<Kabriel> beach: why does this matter, because I thought these are all just pointers anyone, which would all be of the same size.
<seok> You are a genius
<Kabriel> s/anyone/anyway/
<seok> guess there was a sort of in-built function
<Kabriel> seok: you are obviously talking to beach
kpoeck has joined #lisp
<beach> Kabriel: If the array is specialized, the elements are not pointers.
orivej_ has quit [Ping timeout: 258 seconds]
refpga has quit [Ping timeout: 240 seconds]
<beach> Kabriel: Specialized arrays exist so that more compact representations can be chosen.
<seok> I don't understand why :element-type is needed though. Why must CL give an error if it cannot ensure type?
orivej has joined #lisp
<beach> seok: What does it mean to "ensure type"?
<seok> Isn't that what the option does?
<seok> The option :element-type
<beach> No, it tells what kind of representation the array has.
<seok> By representation what do you mean?
<seok> the array dimensions? or the type of objects it contains?
<beach> Like I told Kabriel, :ELEMENT-TYPE is not for type checking. It is so that the Common Lisp implementation can choose a different way of storing the elements.
bhartrihari has left #lisp ["Disconnected: closed"]
refpga has joined #lisp
<jackdaniel> it could be used for type inference too
bhartrihari has joined #lisp
<seok> Oh I see
<beach> Like most implementations probably have an element-type of (unsigned-byte 8). This means that the elements are stored as a byte vector, not as pointers to integers.
<seok> A bit
<Kabriel> On a related note, if I have have (defun f (... &key (scale #(1 1 1))) ...) is the array for scale crated on every call to f?
<beach> Nope.
* Kabriel can't type; s/crated/created/
<beach> It is created once at read time.
<Kabriel> does that mean it is a literal and shouldn't be modified?
<beach> Indeed.
<Bike> if you do (scale (make-array ...)) it will make a new one every time, but on the bright side you can modify it
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
<seok> Do I just use math to convert 4 x 8 bytes to integers? or is there an in-built?
refpga has quit [Read error: Connection reset by peer]
<Kabriel> I thought that might be the case. I'm surprised I don't get an error when I do that.
refpga has joined #lisp
pjb` has quit [Ping timeout: 260 seconds]
<jackdaniel> modifying literals have /undefined consequences/
<jackdaniel> it may be, that when you modify data, another invocation to the function will have this modified data as default value
<jackdaniel> and that is indeed usually a case
<jackdaniel> but implementation could conformingly signal an error
<Kabriel> indeed it is for sbcl
<jackdaniel> funnily sbcl has a hack in make-method relying on that - they modify literal cons to do something
<jackdaniel> I don't remember details
<jackdaniel> make-method-lambda that is
rogersm has quit [Ping timeout: 240 seconds]
MCP_ has joined #lisp
<Bike> it's so that the method function's call-next-method can refer to the method when it needs to signal a no-next-method error. it seems nasty
rogersm has joined #lisp
jprajzne has joined #lisp
cosimone has quit [Quit: Quit.]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
cantstanya has joined #lisp
pjb` has joined #lisp
<seok> Hm, it seems I cannot just (aref array i) for multi dimension arrays unlike lists
<seok> Do I have to create a new array and access the whole row for this?
<jackdaniel> row-major-aref
<seok> that only fetches one value in [i, i, i] doesn't it?
<seok> I want to fetch a whole row
<jackdaniel> ah
<jackdaniel> maybe you want a vector of vectors then?
<seok> Yes
<jackdaniel> not multi-dimensional array
<seok> So Kabriel taught me this
<seok> (make-array (list (/ (length bytes) 4 5) 5 4) :displaced-to bytes :element-type (array-element-type bytes))
<seok> So this returns a multi dimension array
<seok> Can I make this return a vector of vectors or list of lists?
twocats has joined #lisp
pjb` has quit [Quit: renaming]
gko has quit [Ping timeout: 272 seconds]
pjb has joined #lisp
twocats has quit [Client Quit]
<pjb> seok: for rows, you can use a displaced array. For columns, you would have to copy them, or use a lazy solution.
efm has quit [Quit: Konversation terminated!]
orivej has quit [Ping timeout: 260 seconds]
<selwyn> by using array-operations' #'aops:split and #'aops:combine, you can convert between multidimensional arrays and vectors of such
orivej_ has joined #lisp
catchme has joined #lisp
<seok> @selwyn oh this must be it!
<selwyn> a word of warning, there are nine different forks of it, and the original is abandoned. i use the one maintained at https://github.com/bendudson/array-operations
<catchme> Hello, What is the best data structure to store lisp symbols? I am using binary tree, but when I use gc, I have to write recursive function to relocate all symbols. https://www.irccloud.com/pastebin/uYgjziI2/
<beach> catchme: That depends on what the operations on your collection are.
<beach> catchme: Like, is it just a set, so you have a MEMBER function and INSERT/DELETE?
KingOfCSU has quit [Ping timeout: 256 seconds]
orivej_ has quit [Ping timeout: 240 seconds]
<beach> catchme: What on earth is that?
<catchme> I need fast access, non-recursive traversal, and, not complicated like hash-table
orivej has joined #lisp
<catchme> I am implementing lisp for a micro-controller and this line causes stack overflow
<beach> You still haven't told me what operations you have on your collection.
shka_ has joined #lisp
<catchme> insert and traversal
<beach> traversal?
<beach> OK, then just store them linearly in a vector, i mean consecutive words.
<catchme> I mean any kind in/post/pre-order traversal
<beach> *sigh*
<beach> Those are defined only on trees.
<beach> What kind of order do you impose on your symbols to make them suitable for a tree?
<catchme> I forgot to mention that symbols won't repeat, so insert would use search to check that symbol is new
<beach> So it seems you assume they are stored in a tree, yet your question suggests that you don't want a tree.
astronavt has joined #lisp
<beach> Oh, so it's a set.
<beach> Why didn't you say so?
<jackdaniel> catchme: are you implementing common lisp?
<beach> Now, a set doesn't define pre/post/in order traversal.
<catchme> beach:
<catchme> my fault
<Bike> how many symbols do you have that there's a stack overflow from a tree traversal? if the tree is balanced a thousand symbols go down like ten at most, right?
<beach> Bike: More importantly, what makes symbols suitable for a tree in the first place?
<beach> I guess ordering them by string< of the names.
<Bike> or some kind of hash, i'd think, yeah.
<beach> But then, I am sorry, a hash table is the best solution anyway.
<catchme> I have only 1024 byte stack and some local variables with recursive function relocate https://www.irccloud.com/pastebin/jkbfVcTg/
ahungry has joined #lisp
<catchme> jackdaniel: yes
cantstanya is now known as frank
<jackdaniel> oh oh! do you have some placeholder repository?
frank is now known as cantstanya
<jackdaniel> thank you
<Bike> could it be a recursion problem? like, if you passed this a keyword, it would have itself as its value, so LispGcRelocate would keep calling itself on line 11.
<catchme> I have not push the last commits
<jackdaniel> "
<jackdaniel> A dialect of lisp1 targeting microcontrollers.
<catchme> I have increased stack to 2048 and it worked!
<jackdaniel> (also, what is noteworthy, you mention that it is forked from ECL yet you claim that the licensie is MIT, what violates the ECL license which is lgpl-2.1+, you may want to fix that)
<catchme> Bike: I have increased stack to 2048 and it worked + I am using gdb to be sure
dale_ has joined #lisp
dale_ is now known as dale
sdumi has quit [Ping timeout: 260 seconds]
<catchme> I have rewritten the code from ECL.
sdumi has joined #lisp
<catchme> jackdaniel: would that still be a violation?
<Bike> well, none of this really looks like ECL to me anyway
<jackdaniel> objects.h definetely retains its structure
<jackdaniel> catchme: http://teem.sourceforge.net/lgpl.html defiens what it means for work to be "derived"
<catchme> jackdaniel: I will read that and would change the license.
<jackdaniel> also, I don't think that you can remove copyright headers like this (when you translate work). but this is offtopic here, so I'll stop at that.
<catchme> I will fix that at night :)
<catchme> I was focusing on correctness, and I used my template project
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
mibr has joined #lisp
narimiran has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #lisp
ech has quit [Ping timeout: 264 seconds]
ljavorsk has joined #lisp
astronavt has quit [Quit: ...]
astronavt has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
gxt_ has joined #lisp
zmt00 has joined #lisp
[mark] has quit [Quit: Konversation terminated!]
<seok> @selwyn thank you, there is aops:sub
<seok> I don't need to convert the array
rogersm has joined #lisp
<selwyn> happy to help
rogersm has quit [Quit: Leaving...]
gaqwas has quit [Remote host closed the connection]
jw4 has quit [Read error: Connection reset by peer]
fourier has joined #lisp
jw4 has joined #lisp
shifty has joined #lisp
<selwyn> seok: may i ask what you are trying to achieve with these multidimensional arrays?
<seok> I am parsing byte arrays
slyrus has joined #lisp
slyrus_ has quit [Ping timeout: 258 seconds]
karlosz has joined #lisp
efm has joined #lisp
<selwyn> cool
gaqwas has joined #lisp
gaqwas has quit [Read error: Connection reset by peer]
milanj has quit [Quit: This computer has gone to sleep]
gaqwas has joined #lisp
nckx has joined #lisp
<seok> hm, how do i concat 4x byte8's to a byte32?
bitmapper has quit [Remote host closed the connection]
gaqwas has quit [Ping timeout: 265 seconds]
bitmappe_ has joined #lisp
fourier has quit [Ping timeout: 260 seconds]
doesthiswork has quit [Quit: Konversation terminated!]
doesthiswork has joined #lisp
<phoe> seok: logior + ash
<phoe> (format nil "#x~8,'0X" (logior (ash 1 24) (ash 2 16) (ash 3 8) (ash 4 0))) ;=> "#x01020304"
bitmappe_ is now known as bitmapper
<seok> Ah i see!
<seok> phoe thank you
Sauvin has quit [Read error: Connection reset by peer]
<pjb> seok: I prefer dpb: (format nil "~8,'0X" (dpb 1 (byte 8 24) (dpb 2 (byte 8 16) (dpb 3 (byte 8 8) (dpb 4 (byte 8 0) 0))))) #| --> "01020304" |#
<phoe> dpb is nice if you have a threading macro, the nestedness is not really nice
<pjb> phoe: you can use a loop.
doesthiswork has quit [Quit: Konversation terminated!]
<phoe> or that, yes, setf with dpb in a loop
doesthiswork has joined #lisp
lucasb has joined #lisp
<pjb> (format nil "~8,'0X" (reduce (let ((pos 32)) (lambda (v b) (dpb b (byte 8 (decf pos 8)) v))) '(1 2 3 4) :initial-value 0)) #| --> "01020304" |#
pi_____ has joined #lisp
pi_____ has left #lisp [#lisp]
<yottabyte> hi all, hopefully a minor mistake, but not sure why this isn't working: https://pastebin.com/eniB99zg
<Bike> your hash table compares values with EQL, and strings aren't EQL unless they're identical
<Bike> try passing :test #'equal ot make-hash-table
<yottabyte> interesting!
ech has joined #lisp
<yottabyte> another question, coming from clojure, you can just do something like (reduce + '(1 2 3)), but in cl you have to do (reduce '+ '(1 2 3)), i.e. quote the function +, why is that? why does clojure require no such identifier? and I could've also done (reduce #'+ '(1 2 3)), what's the difference there and what is that called? #' vs '
<Bike> common lisp has distinct namespaces for variables and functions. #'foo means you look up FOO in the function namespace.
<Bike> the difference between (reduce '+ ...) and (reduce #'+ ...) is that in the former, you're just passing the name of the function, and reduce will then look up the function.
mibr has quit [Quit: mibr]
MCP_ has quit [Quit: Leaving]
doesthiswork has quit [Quit: Konversation terminated!]
MCP_ has joined #lisp
doesthiswork has joined #lisp
MCP_ has quit [Client Quit]
Bit_MCP has joined #lisp
rogersm has joined #lisp
kpoeck has quit [Remote host closed the connection]
cosimone has joined #lisp
karlosz has quit [Quit: karlosz]
troydm has joined #lisp
Bit_MCP has quit [Quit: Leaving]
wsinatra has quit [Quit: WeeChat 2.8]
karlosz has joined #lisp
jonatack_ has joined #lisp
doesthiswork has quit [Quit: Konversation terminated!]
ikki has joined #lisp
jonatack has quit [Ping timeout: 256 seconds]
catchme has quit [Quit: Connection closed for inactivity]
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 264 seconds]
jonatack_ has quit [Quit: jonatack_]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
jonatack has joined #lisp
theseb has joined #lisp
refpga has quit [Read error: Connection reset by peer]
bhartrihari has left #lisp ["Disconnected: closed"]
<yottabyte> Bike: makes sense. so is (reduce #'+ ...) more efficient?
refpga has joined #lisp
orivej_ has quit [Ping timeout: 258 seconds]
bhartrihari has joined #lisp
<Bike> in some sense, but the overhead of looking up a function is probably going to be dwarfed by the actual reduction
orivej has joined #lisp
rogersm has quit [Quit: Leaving...]
<Bike> the name only has to be looked up one time, after all
<Bike> this also means that code that uses #'foo may be insensitive to redefinitions of foo
SGASAU has quit [Ping timeout: 256 seconds]
<yottabyte> why is that?
SGASAU has joined #lisp
<Bike> passing 'foo pretty much forces a runtime lookup, but #'foo doesn't
ldb has joined #lisp
<ldb> good mornig
<Josh_2> Evenin
orivej has quit [Quit: No Ping reply in 180 seconds.]
pjb has quit [Remote host closed the connection]
orivej has joined #lisp
noobineer has quit [Read error: Connection reset by peer]
ldb has quit [Ping timeout: 256 seconds]
<Bike> obscure question time again: why does update-instance-for-redefined-class take initargs? it's not supposed to be called by programmers, and the internal thing that does call it passes no initargs
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<phoe> clhs u-i-f-r-c
<specbot> update-instance-for-redefined-class: http://www.lispworks.com/reference/HyperSpec/Body/f_upda_1.htm
kpoeck has joined #lisp
<phoe> hmm
gaqwas has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<froggey> maybe to mirror update-instance-for-different-class, or possibly just a copy & paste thing that nobody thought too deeply about
<Bike> it does seem like it's just to match the others, but they did put some thought into the initargs, there are the rules for checking validity and stuff
jrx has joined #lisp
ldb has joined #lisp
pjb has joined #lisp
narimiran has quit [Ping timeout: 265 seconds]
jrx has left #lisp [#lisp]
Josh_2 has joined #lisp
ldb has quit [Ping timeout: 246 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
H3dn1ng has quit [Quit: leaving]
ldb has joined #lisp
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
notzmv has joined #lisp
pve has quit [Quit: leaving]
<pjb> yottabyte: note that it's not specified if the function lookup performed by reduce (and other similar functions) is done once or inside the loop. For functions in CL it doesn't make a difference (apart perhaps the speed), but for your own functions (or library), it may mean something different.
<pjb> yottabyte: (declaim (notinline add)) (defun add (a b) (+ a b)) (reduce 'add '(1 2 3 4) :key (lambda (x) (setf (fdefinition 'add) (lambda (a b) (- a b))) x)) #| --> -8 |#
<pjb> or 10. or something else. This code is not conforming.
karayan has quit [Remote host closed the connection]
<pjb> To make it conforming you would have to write: (reduce (lambda (a b) (add a b)) '(1 2 3 4) :key (lambda (x) (setf (fdefinition 'add) (lambda (a b) (- a b))) x)) #| --> -8 |#
<pjb> The indirection forces one choice.
shka_ has quit [Ping timeout: 256 seconds]
karayan has joined #lisp
<phoe> Bike: clhs 4.3.6.2
<phoe> "The generic function update-instance-for-redefined-class also takes any number of initialization arguments. When it is called by the system to update an instance whose class has been redefined, no initialization arguments are provided."
<Bike> yeah.
<Bike> like i said.
<phoe> hmm
<phoe> I mean, yeah, it seems like nothing ever calls u-i-f-r-c with initargs
<phoe> the only place mentioned in the standard is make-instances-obsolete
amerlyq has quit [Quit: amerlyq]
<Bike> make-instances-obsolete only arranges for it to be called. generally it will be actually called somewhere in a discriminating function or the like
<phoe> yes, correct
<phoe> ...but even then, no keyword arguments are passed
<phoe> which is weird
<Bike> i don't think it's weird that it's not passed initargs. liek what would that mean? you can imagine a make-instances-obsolete that can be called with initargs, and then the updater will be called with those initargs, i guess?
<phoe> I guess that would work; that would be a channel of passing information to u-i-f-r-c
<Bike> but if you're actually redefining a class you can just specify an initform and bam
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<phoe> that's correct, I was thinking that such a make-instances-obsolete would be a slightly lower level function than ensure-class though
<phoe> but, that's speculation
ahungry has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
hineios3 has joined #lisp
hineios3 is now known as hineios
hineios has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
ayuce has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 265 seconds]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
<markasoftware> in method combination, is the main difference between :around and :before that before has no next-method?
frgo_ has quit [Remote host closed the connection]
ljavorsk has quit [Ping timeout: 256 seconds]
frgo has joined #lisp
<Bike> also if an around method doesn't call-next-method, the other methods aren't called, but with before they are
<pjb> also, before are called before, while around are called around.
<theseb> phoe: if people only learn python or java or perl or ....they never have a good understanding of programming language theory....lisp provides that
<theseb> because it is so elegant with an understandable core
<theseb> phoe: *that* is the only real lisp "enlightenment"
<theseb> Having said that...I got a similar "enlightenment" when I learned about Turing machines, lambda calculus and Godel's Incompleteness Theorem
<aeth> theseb: The only enlightenment moment I got was with scope, which so many languages do horribly (or mildly) wrong.
<aeth> With Common Lisp (but not Scheme), you have to use things like LET, which makes scope explicit.
<aeth> Well, disregarding &aux, which few people know exists :-p
SGASAU has quit [Remote host closed the connection]
<pjb> markasoftware: https://termbin.com/vd1q
SGASAU has joined #lisp
gaqwas has quit [Ping timeout: 260 seconds]
gaqwas has joined #lisp
SGASAU has quit [Ping timeout: 240 seconds]
SGASAU has joined #lisp
<zulu-inuoe> Bike: Hello! Presumably you are the same person as the author of introspect-environment? If so, I noticed I got a warning today of 'Don't know how to PARSE-COMPILER-MACRO on this SBCL version.'. I'm on 1.5.9, is this version too new/old? If it's too 'new', is there a replacement library you might recommend?
<Bike> yeah, that's me. i haven't touched that library in a while, and parse-compiler-macro has been fragile since sbcl doesn't export it. if you check https://portability.cl/, cl-environments or trivial-cltl2 might be good?
<zulu-inuoe> Okay cool. The code that uses it is a little old, but I remember switching to introspect-environment because it did a better job at normalizing either ftype on `function-information` or `type` on `variable-information`. At least, it gave me more consistent answers
<Bike> i don't mind doing some work on it, i just haven't had much reason to use it myself, so
<zulu-inuoe> Oh no worries. I'll get re-acquainted with the actual code and see if it was just past me being lazy or if there's a simple PR I can send over
<zulu-inuoe> Thanks!
<Bike> sure
<Bike> the problem is just that sbcl changed something internally again, i imagine
gaqwas has joined #lisp
gaqwas has quit [Changing host]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
Josh_2 has quit [Ping timeout: 256 seconds]
SGASAU has quit [Remote host closed the connection]
SGASAU` has joined #lisp
random-nick has quit [Ping timeout: 256 seconds]
catchme has joined #lisp
SGASAU` has quit [Client Quit]
cosimone has quit [Ping timeout: 260 seconds]
SGASAU has joined #lisp
wxie has joined #lisp
ldb has quit [Ping timeout: 260 seconds]
gaqwas has quit [Ping timeout: 246 seconds]
Jesin has quit [Quit: Leaving]
ikki has quit [Quit: Leaving]
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
Jesin has joined #lisp
rumbler31 has joined #lisp
kpoeck has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
ldb has joined #lisp
jeosol has joined #lisp
<emacsomancer> first working version: https://gitlab.com/emacsomancer/volemad - Mullvad WireGuard interface in CL
ldb has quit [Ping timeout: 265 seconds]
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
phantomics_ has joined #lisp
quazimodo has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
pjb has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
malik has joined #lisp