enrio has quit [Read error: Connection reset by peer]
enrio has joined #lisp
iridioid has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
ljavorsk__ has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
ebrasca` has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
iridioid has quit [Ping timeout: 276 seconds]
iridioid has joined #lisp
makomo has joined #lisp
arma_ has quit [Quit: arma_]
arma_ has joined #lisp
Harag has quit [Quit: Harag]
scymtym_ has joined #lisp
iridioid has quit [Ping timeout: 246 seconds]
scymtym has quit [Ping timeout: 250 seconds]
myrkraverk has quit [Ping timeout: 265 seconds]
iridioid has joined #lisp
iridioid has quit [Ping timeout: 245 seconds]
<lukego>
Is anybody else using ql2nix (https://github.com/bradleyjensen/ql2nix) to snapshot quicklisp distributions with nix or is it just me? I'm noticing that some packages aren't happy living on read-only filesystems and trying to figure out a fix/workaround.
<Shinmera>
That would be some of my packages.
<lukego>
seems like it's mostly packages that want to do some code generation and store the results on disk. I'm hoping it will be enough to ASDF:LOAD-OP them on a read/write filesystem and then transport the files onto read-only later. Or will they want to always be able to read/write their source dirs?
<lukego>
(and if always read-write next question is whether it needs to be persistent)
iridioid has joined #lisp
<Shinmera>
For the packages I control they either do their caching on first load, or whenever the user requests it.
<Shinmera>
From the top of my head, those would be qt-libs, uax-9, uax-14. There might be more, I don't quite remember.
iridioid has quit [Ping timeout: 245 seconds]
<phoe>
lukego: I remember Xach mentioning this issue some time ago for packages that require write access to their own directory. Most notably it was CL-UNICODE I think.
<Shinmera>
Question: there is the DECLARATION declaration, which allows you to declare custom declarations symbols. My question is this: how would I now process these declarations if they appear in a top-level context?
<phoe>
lukego: in general, you cannot do that, since Lisp code can write stuff into asdf:system-relative-pathname at any time.
<Shinmera>
phoe: don't even need asdf, just compile-file-pathname/load-pathname.
<phoe>
Shinmera: was about to write that one.
<phoe>
lukego: in practice, most systems *should* be happy with read-only access after they are compiled and built. At this point, if RW access is required, I'd try to file a bug so the system uses some temporary directories or configuration paths instead.
iridioid has joined #lisp
<phoe>
Shinmera: process? As in, do you want to be able to (DECLAIM (FROBNICATE FOO BAR BAZ))?
<Shinmera>
yes
<Shinmera>
I want to run code when that is done.
<phoe>
And you would like this declaration to have concrete side effect---
<phoe>
Impossible in pure ANSI CL. You'd need some mechanism to hook into the declaration system of each implementation.
<Shinmera>
I can do it if I have a macro that controls a body wherein this declaration may occur
<Shinmera>
But not at top-level, obviously.
<Shinmera>
I was afraid of that
<phoe>
Yes, but you can't do it at toplevel. The only thing standard ANSI CL can do is ignore these declarations.
<Shinmera>
just weird that DECLARATION exists at all given it's pretty useless if you can't react to it.
<phoe>
Shinmera: every Lisp implementation is allowed ignore *ALL* declarations aside from notinline, optimize safety and two more I think.
<phoe>
So, in pure theory, e.g. DECLARE CONNECTED from qtools should be freely ignorable in standard CL.
<phoe>
And it isn't - it has concrete side effects.
<Shinmera>
it's ignored because it never reaches the compiler.
<Shinmera>
oh hey, cltl2 has define-declaration which seems to be what I want.
<lukego>
phoe, Shinmera: Seems like in this case the package gets a (QL:QUICKLOAD ...) before being transported onto read-only. Seems like that should trigger an ASDF:LOAD-OP right? I'm surprised there is more generated stuff being done after this.
<Shinmera>
It should.
iridioid has quit [Ping timeout: 250 seconds]
<phoe>
lukego: ASDF:LOAD-OP should compile everything, yes.
iridioid has joined #lisp
<jackdaniel>
in principle compile-op compiles everything, load-op may use pre-existing artifacts
shifty has quit [Ping timeout: 252 seconds]
smaster has joined #lisp
Duuqnd_ has joined #lisp
<phoe>
OK, to be correct - LOAD-OP may invoke COMPILE-OP if something is not compiled, but after LOAD-OP the system is sure to have been compiled and loaded
shifty has joined #lisp
Duuqnd has quit [Disconnected by services]
khisanth__ has joined #lisp
Duuqnd_ is now known as Duuqnd
iridioid has quit [Ping timeout: 276 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<lukego>
OK maybe I need to start digging in on a package-by-package basis and see what it is trying to do when it errors on r/o fs
khisanth_ has quit [Ping timeout: 245 seconds]
smaster has quit [Ping timeout: 265 seconds]
Duuqnd_ has joined #lisp
theruran has quit [Quit: Connection closed for inactivity]
smaster has joined #lisp
gxt has joined #lisp
Duuqnd has quit [Ping timeout: 276 seconds]
<phoe>
lukego: that's the way to go, sadly. There are no general rules that can be applied here to help you.
<lukego>
I suppose that my "nuke them from orbit" option would be to setup some kind of read-write overlay/temp file system but let's see if it comes to that.
<lukego>
I'm looking at CL-UNICODE .asd now and seeing :perform (load-op (o c) (symbol-call :cl-unicode '#:create-source-files)) and wondering if it generates *every* time loaded?
<phoe>
lukego: nope. It generates only if it hasn't been compiled.
<phoe>
If the compiled files exist, then LOAD-OP only loads the compiled binaries.
<phoe>
But, let me look at that function to verify...
<lukego>
those smarts are in ASDF or CL-UNICODE? I don't see them in the latter at least
smaster has quit [Ping timeout: 240 seconds]
<phoe>
welp
<phoe>
it seems like CL-UNICODE does *not* cache anything and always loads from scratch
<lukego>
maybe it should generate into a tmp folder in that case
<phoe>
or move this into COMPILE-OP instead
<jackdaniel>
phoe: if you specialize load-op to do something more, then it will be done at each load
<phoe>
there is no need to generate this every time the system is loaded, only every time it is compiled
<phoe>
jackdaniel: yes, I see now
<jackdaniel>
banzai
<phoe>
my question, though, is - can't CL-UNICODE cache the results of its compilation, probably by only generating and dumping the data in COMPILE-OP instead of LOAD-OP?
m00natic has joined #lisp
<lukego>
lemme see how to coax ql2nix to override the standard quicklisp version of cl-unicode with a local one that moves this from LOAD-OP to COMPILE-OP..
<phoe>
lukego: no idea if a fix that trivial won't break its load-time mechanisms though
<phoe>
but worth a try
smaster has quit [Ping timeout: 240 seconds]
<jackdaniel>
phoe: that dependency is present only when input files are not present
<jackdaniel>
see the method component-depends-on
atgreen has joined #lisp
smaster has joined #lisp
<edgar-rft>
https://edicl.github.io/cl-unicode/ says "CL-UNICODE builds parts of its source code automatically the first time it is compiled. This is done by parsing several Unicode data files which are included with the distribution and might take some time. This happens only once." but don't ask me if and how it works.
<jackdaniel>
as I said, method component-depneds-on checks if files are present
<jackdaniel>
if not, then it injects a dependency on cl-unicode/build
<jackdaniel>
so it is generated only on the first load (unless the .lisp source files get wiped out for some reason before next load)
<phoe>
jackdaniel: ugh, I see
<jackdaniel>
on the first operation which depends on prepare-op to be specific
<phoe>
ASDF is complex stuff
<phoe>
but then it means that cl-unicode only dumps the new .lisp files on the first call to load-op
<jackdaniel>
or compile-op or whichever op which depends on prepare-op
<phoe>
does it mean that the dependency is *not* injected on calls to compile-op?
<jackdaniel>
ditto
smaster has quit [Ping timeout: 252 seconds]
Duuqnd_ has quit [Quit: Leaving]
<phoe>
ASDF manual: "compile-op depends on prepare-op which itself depends on a load-op of all of a component’s dependencies"
<phoe>
so compile depends on prepare depend on load - I got the order all wrong, welp
<phoe>
except prepare depends on load of the dependencies
<phoe>
so the dumping code is in its proper place
ravenousmoose has joined #lisp
smaster has joined #lisp
madand has left #lisp ["Changed major mode"]
madand has joined #lisp
eschatologist has quit [Excess Flood]
eschatologist has joined #lisp
ravenousmoose has quit [Ping timeout: 250 seconds]
ark has quit [Ping timeout: 250 seconds]
<phoe>
so I don't get what is the problem with ql2nix in that case - by the time cl-unicode is compiled, all cl-unicode/build FASLs are in their proper places
ark has joined #lisp
<jackdaniel>
afaict lukego was only asking if it generates them every time, not stated that it does
<phoe>
OK - in that case there should be no problem whatsoever
smaster has quit [Ping timeout: 265 seconds]
<lukego>
I'm a little confused but I should note that I don't see the files present on the read-only file system. So the problem is consistent with jackdaniel being correct about the files not being regenerated unnecessarily - root problem might be that they failed to be created earlier for some reason and that's why they're being created now.
lxbarbosa has joined #lisp
<lukego>
thanks for pointing this out jackdaniel. I'm rusty at reading system definition files. I saw :cl-unicode/build system and just assumed that was one of the dependencies, but now as you say I see that it's only conditionally a dependency.
<jackdaniel>
sure
<Shinmera>
for define-declaration, is there a way to determine whether the declaration occurs as a top-level declaration or within a function body?
smaster has joined #lisp
<Shinmera>
Or, better yet, how would I retrieve the current function the declaration is expanded in?
igemnace has quit [Quit: WeeChat 2.6]
<phoe>
if that is possible, then you'd need to query the environment object
<Shinmera>
yes, but my question is how
<phoe>
the current function - what exactly do you mean?
<phoe>
I could do (lambda () (declare (frob)) ...)
<phoe>
what is that you want to be able to access?
<Shinmera>
I was hoping that for top-level functions I could gain access to the function name.
varjag has joined #lisp
smaster has quit [Ping timeout: 240 seconds]
smaster has joined #lisp
<phoe>
Shinmera: I don't think this is possible with declarations alone.
<phoe>
Especially because SETF FDEFINITION exists.
<Shinmera>
just because that exists doesn't mean the implementation isn't going to have named function objects, or the name available during compilation of a defun
<Shinmera>
you can always clobber the definition, but I don't care about that case.
natarajs has joined #lisp
<phoe>
Oh wait a second. Named function objects do exist.
shifty has quit [Ping timeout: 250 seconds]
shifty has joined #lisp
<phoe>
But I have no idea how to retrieve the function name from inside SB-IMPL::NAMED-LAMBDA.
<Shinmera>
you probably can't
<Shinmera>
anyway, it just would have made what I'm trying slightly nicer. No big deal.
smaster has quit [Ping timeout: 246 seconds]
lxbarbosa has quit [Remote host closed the connection]
jonatack has quit [Read error: Connection reset by peer]
<lukego>
Oh hm... my ignorance of both quicklisp and ql2nix is staring me in the face here... maybe it only does the ASDF:LOAD-OP for discovery purposes and then uses a quicklisp "bundle" API to make the actual package, which might skip the load step
<lukego>
Yes that's my working hypothesis now: that this tool is using ASDF:LOAD-OP to discover dependencies, then creating a "bundle" with ql:bundle-systems, then putting that bundle onto a read-only file system. But the generated artifacts for e.g. CL-UNICODE are being lost when creating the bundle.
gravicappa has joined #lisp
<lukego>
So maybe I just need to add another load-op after the bundle is created but before it is migrated onto read-only fs
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
lxbarbosa has quit [Ping timeout: 276 seconds]
<lukego>
So the question now is, given a quicklisp bundle directory, how do I force load all the systems in that bundle
atgreen has quit [Ping timeout: 240 seconds]
ljavorsk__ has joined #lisp
ljavorsk_ has quit [Ping timeout: 250 seconds]
flip214 has quit [Ping timeout: 246 seconds]
flip214 has joined #lisp
ark has quit [Ping timeout: 250 seconds]
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
gravicappa has quit [Remote host closed the connection]
gravicappa has joined #lisp
<shka__>
good day!
<shka__>
i have an unusual question: i would want to access and manipulate numpy arrays from CL
<shka__>
any idea how to do that?
rippa has joined #lisp
Bike has joined #lisp
<_death>
py4cl?
cosimone has joined #lisp
<shka__>
hmm, nope
smaster has joined #lisp
<Shinmera>
shka__: figure out the memory layout, use cffi.
<shka__>
Shinmera: yeah, I am thinking about it right now
Kevslinger has joined #lisp
wiselord has quit [Read error: Connection reset by peer]
cosimone has quit [Quit: Quit.]
smaster has quit [Ping timeout: 246 seconds]
wiselord has joined #lisp
retropikzel has joined #lisp
Lycurgus has joined #lisp
lottaquestions has joined #lisp
FreeBirdLjj has joined #lisp
atgreen has joined #lisp
cosimone has joined #lisp
natarajs has quit [Ping timeout: 260 seconds]
cosimone has quit [Client Quit]
<lottaquestions>
Hi all, I inserted a breakpoint in a function using (break), and it worked as expected. However, once I was done with the breakpoint, I deleted it from the code and recompiled the whole buffer, C-c C-k, and the breakpoint kept being hit. I tried other options like M-x slime-eval-region, and even C-c C-c to compile the toplevel form, but the
<lottaquestions>
breakpoint is still stubbornly there. Any ideas of how I can delete it?
cosimone has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
cosimone has quit [Client Quit]
scymtym_ has quit [Remote host closed the connection]
earl-ducaine has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
<phoe>
lottaquestions: was it a function and not a macro?
<lottaquestions>
it was a function
davepdo__ has joined #lisp
<lukego>
maybe the function object was captured with #'foo? in that case seems tricky, have to work out where the reference would be stashed
<lottaquestions>
but that is being called through cl-ppcre:regex-replace-all
<lottaquestions>
yes the function object is captured using '#foo
<lukego>
maybe recompile the cl-ppcre:regex-replace-all usage in case that has expanded into code that captured the old definition?
<lukego>
you need to rerun th at code that does #'foo and make it tak the new function object
<lukego>
(and consider changing it to just 'foo if you want to indirect through the symbol to always use the current function definition in the future)
<lottaquestions>
aahhh as in restart the frame that has cl-ppcre:regex-replace-all...
<lukego>
if you're in the debugger maybe you can patch the function object in the stack frame but that's beyond my ken..
FreeBirdLjj has joined #lisp
davepdotorg has quit [Ping timeout: 265 seconds]
cosimone has joined #lisp
<lottaquestions>
well, that's what I would want to be able to do when I grow up :-)
shifty has quit [Ping timeout: 252 seconds]
heisig has quit [Quit: Leaving]
shifty has joined #lisp
<lottaquestions>
meantime, I will restart the frame, and also convert from #'foo to 'foo
<lukego>
another fun solution would be to hit the BREAK, get a reference to the old function object in the inspector, and then rewrite the heap to replace all pointers to the old function object with the new one. but I don't know how to do that either :) likely sbcl has some internal API for it..
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<lottaquestions>
yeah, that would be fun. I know how to do somewhat similar things in gdb and C, and woudn't mind getting to the same skill level with sbcl
manualcrank has joined #lisp
amerlyq has joined #lisp
retropikzel has quit [Quit: Leaving]
LiamH has joined #lisp
ljavorsk__ has quit [Ping timeout: 240 seconds]
monokrom has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
dddddd has joined #lisp
smaster has joined #lisp
clothespin_ has quit [Ping timeout: 252 seconds]
<trittweiler>
Clearly slime needs an interactive hex-editor of the dissasembly of function objects :)
<trittweiler>
lukego: Are you aware of sbcl's 20th birthday celebration in vienna in roughly 2 weeks, and if so, are you going to join?
<shka__>
wow, it is?
<shka__>
awesome!
<shka__>
happy birthday :-)
smaster has quit [Ping timeout: 252 seconds]
q9929t has joined #lisp
<lukego>
g'day trittweiler :) I'd love to make that but don't think I will.
<lukego>
I'd love to do it as a day-trip but I don't think that's realistic
<lukego>
I'm totally tying myself in knots with this ql2nix problem now. I've made a new version that hopefully works, but it seems to be failing with the same error, and much earlier than makes sense, so I'm wondering if the new "working" one is trying to bootstrap from the old broken one for some reason
Odin- has quit [Quit: "What does this button do?"]
Kundry_Wag has joined #lisp
<lukego>
oh, I see, I'm an idiot :). I have been working in *shell* instead of a real shell and now I remember that I started this Emacs session in a shell environment that had the broken lisp setup. So I've been fighting that old version while thinking I'm fighting the new one. (isn't nix-shell great?)
shifty has quit [Ping timeout: 240 seconds]
EvW1 has quit [Quit: EvW1]
EvW1 has joined #lisp
<Xach>
lukego: happy to help with any quicklisp problems
<lukego>
Xach: Thanks! Just now what I want to do is force each system in a Quicklisp bundle to be loaded. That's because some packages need to do extra init on the first load and I want that to happen now (before I copy them onto a read-only file system.) Is groveling system-index.txt for names to pass to REQUIRE a reasonable solution?
<phoe>
lukego: remember that some systems may fail to load if their foreign dependencies are not loaded.
<phoe>
or, rather
Josh_2 has quit [Ping timeout: 245 seconds]
<phoe>
if they try to load the foreign libs but they do not exist
<lukego>
I'm able to declare foreign libs as dependencies here so long as I can identify them. (McCLIM is complaining it can't find truetype fonts but I'm putting that to one side for now.)
<lukego>
somehow feels dirty to (intern (string-upcase (pathname-name (pathname line-from-system-index.txt))) :keyword) but this is not the time to be squeamish..
<lukego>
I mean to turn /foo/bar.asd into :BAR for REQUIRE
<Xach>
lukego: yes, that's reasonable.
<Xach>
why require?
Kundry_Wag has quit [Remote host closed the connection]
<lukego>
what's the alternative?
<Xach>
I'd expect asdf:load-system
Zanitation has joined #lisp
<Xach>
which would take a pathname-name just fine
sjl_ has joined #lisp
Kundry_Wag has joined #lisp
<lukego>
ah that sounds better
ark has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
<lukego>
oh hey it works )
<lukego>
\o/
Kundry_Wag has joined #lisp
<lukego>
thanks all for the helpful nudges
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
pfdietz has joined #lisp
<pjb>
lukego: you don't need to call pathname, it's called automatically by pathname-name when given a namestring.
<pfdietz>
In twitter I am told that writing seven lines of CL is "on the verge" of reimplementing the language. The things one learns.
<lukego>
it it too onomatopoeiac to write (loop for /some/system.asd = (read-line in nil) ...) ?
<White_Flame>
I think it's kind of cute, if different. I don't see any problem with it
<White_Flame>
as long as you don't need |s around your symbol, go for it
<lukego>
thanks :)
dilated_dinosaur has quit [Remote host closed the connection]
<phoe>
pfdietz: where?
mfiano2 has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
davepdo__ has quit [Quit: Leaving...]
<Xach>
ams got banned once or twice for such nonsense on #lisp
davepdotorg has joined #lisp
<phoe>
I need more context
<Xach>
phoe: pfdietz's suggestion to use *macroexpand-hook* to work around a problem with code that can't be directly modified was met with "well then i may as well rewrite common lisp"
<Xach>
this is all in the public record on the Twitter
Kundry_Wag has joined #lisp
froggey has joined #lisp
<phoe>
I want to see the man who can rewrite Common Lisp in seven lines of code
<Bike>
well it's not like the syntax requires newlines anywhere...
<phoe>
so now we have people complaining that SBCL does not implement the spec
<phoe>
and people complaining that SBCL implements the spec
<Xach>
some galaxy brain stuff
<Xach>
lukego: i don't know exactly how i feel about loop variables that look like pathnames but i am feeling something
dale_ has joined #lisp
dale_ is now known as dale
<phoe>
well, /home/phoe/Projects/Lisp/foo/foo.asd is a perfectly valid symbol name in Lisp
ISDCTPSI is now known as FJMSX
FJMSX is now known as fjmsx
fjmsx is now known as fjMSX
fjMSX is now known as FoxyJohnMSX
FoxyJohnMSX is now known as JohnTheFoxy
karswell has joined #lisp
<Shinmera>
So a brief test shows that a top-level invocation of a declaration defined with cltl2:define-declaration does not actually get invoked at all on SBCL. If I use the same declaration as part of a function definition it does get invoked. Am I missing something or is that expected behaviour?
vibs29 has joined #lisp
<Bike>
what do you mean top-level invocation? like a declamation/proclamation?
<Shinmera>
yes
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<Bike>
cltl2 doesn't seem to mention this specifically, but it refers to it in the context of augment-environment, which wouldn't be used with a proclamation.
<Shinmera>
So there's just no way to add a declamation that does anything useful?
<Bike>
not based on my quick reading here, but if it did work for proclamations too that seems fine
<Shinmera>
sigh
<Bike>
i don't know if sbcl is prepared to do that, though. looking at the implementation, user declarations augment the lexenv, but that's not where proclamations go
<Bike>
i'm sure it's doable somehow though
smaster has joined #lisp
<Bike>
changing sbcl i mean.
<Shinmera>
If it ain't portable I ain't using it.
slyrus_ has joined #lisp
<Shinmera>
And given that this seems acceptable behaviour I think I'm out of luck.
<Shinmera>
To give context: I'd like to register functions to be automatically invoked when a change happens elsewhere in my system. Being able to use a declaration for that would have been really nice.
gravicappa has quit [Ping timeout: 250 seconds]
<Shinmera>
But given that I can't do proclamations, nor get the function name from a declaration being expanded, the only way to do it would be annoying for the user.
jonatack has joined #lisp
slyrus has quit [Ping timeout: 252 seconds]
<Bike>
well, i think you could change implementations to have it work for proclamations, if only because cltl2 is used infrequently enough that they won't mind modifications
smaster has quit [Ping timeout: 240 seconds]
ebrasca` is now known as ebrasca
<Shinmera>
I don't think I'm patient enough to lobby for that to happen, nor to implement it myself.
cosimone has quit [Quit: Terminated!]
enrio has quit [Ping timeout: 240 seconds]
jonatack_ has joined #lisp
xkapastel has joined #lisp
lucasb has joined #lisp
jonatack has quit [Ping timeout: 245 seconds]
gravicappa has joined #lisp
random-nick has joined #lisp
bitmapper has joined #lisp
dilated_dinosaur has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
smaster has joined #lisp
gareppa has joined #lisp
enrio has joined #lisp
smaster has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
q9929t has quit [Quit: q9929t]
<pfdietz>
I like *macroexpand-hook*. Using it to layer changes onto a code base, without changing that code, can be quite useful. Rejection made me sad. :(
Lord_of_Life has quit [Client Quit]
JohnnyL has joined #lisp
Mandus has quit [Ping timeout: 252 seconds]
bitmapper has quit [Read error: Connection reset by peer]
bitmappe_ has joined #lisp
JohnnyL has quit [Quit: leaving]
Zanitation has quit [Quit: WeeChat 2.6]
Mandus has joined #lisp
Zanitation has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
brettgilio has quit [Ping timeout: 245 seconds]
EvW1 has quit [Ping timeout: 246 seconds]
smaster has joined #lisp
smaster has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
fanta1 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
davepdotorg has quit [Remote host closed the connection]
m00natic has quit [Remote host closed the connection]
brown121408 has quit [Remote host closed the connection]
hhdave has quit [Quit: hhdave]
Kundry_Wag has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
warweasle has joined #lisp
eddof13 has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
Kundry_Wag has joined #lisp
ravenousmoose has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
ravenousmoose has quit [Ping timeout: 250 seconds]
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
bitmappe_ has quit [Remote host closed the connection]
ebrasca has quit [Remote host closed the connection]
bitmapper has joined #lisp
varjag has quit [Client Quit]
varjag has joined #lisp
raghavgururajan has joined #lisp
bitmapper has quit [Ping timeout: 240 seconds]
smaster has joined #lisp
gareppa has quit [Quit: Leaving]
zaquest has quit [Quit: Leaving]
smaster has quit [Ping timeout: 276 seconds]
Kundry_Wag has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Ping timeout: 265 seconds]
raghavgururajan has quit [Read error: Connection reset by peer]
madage has quit [Remote host closed the connection]
scymtym_ has quit [Ping timeout: 246 seconds]
<Bike>
some day i should find an explanation of what "compose" means in this kind of thing
<LdBeth>
Bike: it means literally like #'compose in CL
warweasle has quit [Quit: later]
<LdBeth>
the higher order function that take two functions and compose them together
raghavgururajan has quit [Read error: Connection reset by peer]
<Bike>
it really doesn't
<Bike>
what functions are involved when you're talking about C macro names
<Bike>
there might be some, but it's not obvious to me, that's all
<LdBeth>
Well this talk is specific for those who view macro as functions that rewrite terms
madage has joined #lisp
<LdBeth>
Obviously C preprocessor cannot be extended by defining functions
v0|d has joined #lisp
Codaraxis has quit [Ping timeout: 240 seconds]
<Bike>
i'm talking about uh, slide 7-1. i don't understand what it would mean for assert and MAXLIMIT to compose. i mean if nothing else is assert is taking a form that has a MAXLIMIT form in it, it's not a direct composition, but what would a direct composition mean then if you have compound forms
Remavas has quit [Ping timeout: 276 seconds]
<Bike>
i don't know if i'm missing something obvious or what
Bike has quit [Quit: Bike]
<LdBeth>
Until 7-1 it’s all about introduction to new comers. Jump ahead to 8 to see what is macro compose
eddof13 has quit [Quit: eddof13]
EvW has joined #lisp
gareppa has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
gareppa has quit [Remote host closed the connection]
jsgrant- has joined #lisp
gareppa has joined #lisp
eddof13 has joined #lisp
Kundry_Wag has joined #lisp
jsgrant- has quit [Client Quit]
Remavas has joined #lisp
smazga has quit [Quit: leaving]
Kundry_Wag has quit [Ping timeout: 252 seconds]
<phoe>
> macros written in a continuation-passing style (CPS)
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<copec>
I've never actually found myself really needing continuations for anything, but they are awesome.
<LdBeth>
copec: nope, paul graham only talks CPS and macro individually. Combining CPS and macro has become interests only after 2000 in Daniel Friedman’s article
<copec>
I read it a decade ago, but iirc he builds up a macro system for continuations in CL, although I can't recall if it is actually CPS
lucasb has quit [Quit: Connection closed for inactivity]
ravenousmoose has joined #lisp
<LdBeth>
Here’s the article. It makes a disclaimer that On Lisp implements call/cc with macro but not to be confused with the notation of cps style macro
eddof13 has quit [Ping timeout: 265 seconds]
ravenousmoose has quit [Ping timeout: 252 seconds]
Bike has joined #lisp
amerlyq has quit [Quit: amerlyq]
theruran has joined #lisp
<copec>
This is interesting
FJMSX is now known as fj
fj is now known as fjmsx2
EvW has quit [Ping timeout: 252 seconds]
fjmsx2 is now known as Mammoth_New_Zurb
Mammoth_New_Zurb is now known as Mammoth_Zurbagan
FennecCode has joined #lisp
gareppa has quit [Quit: Leaving]
kobain has joined #lisp
kobain has quit [Excess Flood]
kobain has joined #lisp
kobain has quit [Excess Flood]
kobain has joined #lisp
kobain has quit [Excess Flood]
kobain has joined #lisp
lxbarbosa has joined #lisp
18WAA1MU8 has joined #lisp
jmercouris has joined #lisp
<jmercouris>
I see that the SBCL repository is roughly ~91% CL
<jmercouris>
I assume therefore that most of the functions and implementation is implemented in CL
lottaquestions has quit [Remote host closed the connection]
<jmercouris>
so my question is, what is the minimum amount of functions you need to write to bootstrap a CL implementation?
<phoe>
jmercouris: 0 is the absolute minimum
<jmercouris>
do multiple implementations share the same "CL" core?
<phoe>
you can generate the whole binary from Lisp, including what is currently generated from C as the "kernel"
<jmercouris>
phoe: are you talking about using CL to compile CL?
<jmercouris>
okay, fair enough, this is true
<jmercouris>
but let's say I was trying to port CL to run on a new language called Potato
<phoe>
which includes directly interfacing with the OS using Lisp, writing the required assembly using Lisp, actually assembling it using Lisp, doing GC using Lisp and so on
<jmercouris>
how many functions would I need to write in Potato to build CL on top of it?
<phoe>
what do you mean, to build CL?
<jmercouris>
yes
<phoe>
which implementation?
<jmercouris>
to make my equivalent Potato Common Lisp
<phoe>
a completely new one? you choose, you can do anything between 0% and 100%
<jmercouris>
A completely new implementatino
<phoe>
then it's your choice
<jmercouris>
how could I wrote 0 Potato functions?
<phoe>
it's simple, just write all of CL without using Potato whatsoever
<jmercouris>
I don't see how that's possible, ultimately something has to go through the Potato compiler
<Xach>
jmercouris: in the 80s, there was a plan to separate the spec into "blue pages" and "yellow pages", where "blue" was the core, and "yellow" was built on that core, where blue was much smaller and yellow was all the convenience stuff.
<jmercouris>
what would be the smallest amount of functions necessary to produce a language?
<jmercouris>
how could one make a most portable language that can be bootstrapped really easily?
<jmercouris>
from what I understand, this is a topic of significant research, so I'm not expecting a hard answer here
<jmercouris>
Xach: you're talking about Clasp?
<phoe>
depends on the language that you want to produce
<Xach>
jmercouris: yes.
<jmercouris>
phoe: Let's say we wish to produce CL
<drmeister>
These are really, really hard questions for Common Lisp.
<phoe>
in case of CL, it's complicated - CL is a sizeable language even when it comes to its basics upon which the rest can be built
<jmercouris>
do you have any idea of the minimum number of functions? can we calculate it?
<Xach>
Anyone making a "new" lisp these days has a lot of public domain source code they can reuse that is relatively portable, but it's not neatly divided into core+library.
<jmercouris>
drmeister: how close is Clasp to distribution and usage as an implementation?
<phoe>
in theory you can bootstrap multiple operators off each other
<phoe>
you could for instance emulate PROGV and LET and LET* using only lambdas and such
<phoe>
CATCH/THROW and TAGBODY/GO are obvious control flow operators that are hard to construct otherwise
<jmercouris>
phoe: but can we calculate what the minimum is? is it discoverable?
<drmeister>
jmercouris: It's been ready for distribution as a Common Lisp implementation for several months.
<phoe>
jmercouris: obviously it is, yes - the list of all symbols of CL package is public and we can align them into a directed graph that shows what can be implemented using what.
<jmercouris>
I don't think it is obvious
<phoe>
for instance, all of CLOS, LOOP, FORMAT can be non-primitive and done in CL.
<phoe>
that's a sizeable chunk of the whole standard.
<jmercouris>
how could we align them into a directed graph without manually trying to implement all of CL in all of CL?
<jmercouris>
how would we know if a function is compostable using something in the spec?
<phoe>
some of them will need to be primitives
ljavorsk has joined #lisp
<jmercouris>
I think this problem is infinitely harder than you imagine it to be
<phoe>
no, why?
<phoe>
we start with all operators needing to be built-in
<jmercouris>
the goal is to figure out THE MINIMUM amount of functions not written in CL
<phoe>
and then discover which ones can actually be implemented using other operators
<jmercouris>
that's the thing though, can those functions be further reduced to a set of functions?
<phoe>
that needs to be figured out
<jmercouris>
for example, could I write only 3 functions in potato that can be combined to produce all the "primitives" I need?
Mammoth_Zurbagan has quit [Quit: Leaving]
<phoe>
the concrete numbers will depend, but I think my algorithm is sane
earl-ducaine has quit [Ping timeout: 276 seconds]
<Xach>
PEEK, POKE, and HALT should do it
<jmercouris>
what if we slightly extended our spec with a couple of Lisp functions, could we get away with only two Potato functions?
<phoe>
just list all the operations and then try to reduce them
<Xach>
I believe Henry Baker has a paper on this topic too
ljavorsk has quit [Read error: Connection reset by peer]
<jmercouris>
drmeister: how did you decide what to implement in C++ for Clasp? I see it is a much bigger proportion of C++ than SBCL is C
<phoe>
yes, exactly this one
smaster has joined #lisp
<phoe>
it lists multiple transforms, for instance IF to LAMBDA, LET to LAMBDA and so on
<Xach>
it's a nice read on thinking about how to determine if something is "more primitive" than something else.
<jmercouris>
Can it easily be implemented as an algorithm?
<drmeister>
We need to bootstrap from a C++ compiler. So I wrote whatever I needed to bootstrap in C++ until I can start using Common Lisp code during the booting phase.
<jmercouris>
Or would someone need to manually go through every functions and reduce them?
<jmercouris>
s/function/functions
<drmeister>
I also cribbed a lot from ECL - so if ECL implemented something in C I tended to implement that thing in C++.
<White_Flame>
jmercouris: I think your "I want to implement CL on top of Potato" is a bit off. You don't need to build CL on top of Potato. You can implement CL directly talking to the asm interfaces of the OS, bypassing Potato
earl-ducaine has joined #lisp
<copec>
bootstrapping is fun
<jmercouris>
White_Flame: I'm not trying to implement CL ontop of Potato, this is a purely theoretical conversation
<drmeister>
ECL was my roadmap and caffeine was my copilot.
<_death>
if Potato is CL, then you can get by with writing 0 functions in non-CL
<White_Flame>
jmercouris: right, but SBCL for instance isn't "built on top of C" inasmuch as it only uses C for some bootstrapping and low level runtime support
<jmercouris>
CL can be said to be a bit potato sometimes
<copec>
drmeister had a specific goal to have a realistic interface to C++
<White_Flame>
compiled CL functions in SBCL are not C functions, so I would say that does not count as "built on top of C", as it's no longer C that's running
smaster has quit [Ping timeout: 276 seconds]
<copec>
SBCL only uses C as the ABI container
frgo has quit [Ping timeout: 250 seconds]
frgo_ has joined #lisp
<White_Flame>
things that I would consider "built on top of C" would be a C-based interpreter, a macro/function suite that allows you to program in the sublanguage from right within C, which expands to C code, or a Lang->C converter a la ECL
<copec>
The SBCL bootstrap process is a work of art
clothespin has joined #lisp
<copec>
Essentially all of the compilation to machine code (Or internal object code I suppose you could say) is done by CL based code, only the interface between that and the OS is in C
<White_Flame>
and technically that C layer is unnecessary, just easier to do it that way in a OS with a C API
<jmercouris>
any CLs that are bootstrapped directly off of some sort of assembler?
<phoe>
CCL contains a fair share of assembly in its kernel, as well as some C.
<White_Flame>
I don't quite see why one would bother
<phoe>
also ^
<White_Flame>
although Symbolics common lisp probably counts as CL+asm all the way down
EvW has joined #lisp
sjl_ has quit [Ping timeout: 240 seconds]
<copec>
You could say they all trace their lineage back to a lisp image that was bootstrapped from ASM
<jmercouris>
its not about why one would bother, its simply a question
<White_Flame>
not sure if it compiles to an intermediate zetalisp or whatever first
<copec>
SBCL has an assembler internally in it jmercouris
<White_Flame>
depends on what "bootstrapped" means
<logicmoo>
one trick i am doing in WAM-CL is coding soemthning in prolog by hand.. hten translating ECL lisp src to Prolog to replace what i wrote in prolog by hand.. eventually will have no hand written Prolog code
<logicmoo>
(the onl;y reason it was written by hand at least once was for bootstrapping)
jeosol has quit [Remote host closed the connection]
<copec>
I asked beach if they had a strict subset of CL that SICL was implemented with, but the answer is nay. So it can be really confusing until you remember that once it has compiled itself enough times, the less optimized code gets replaced
EvW has quit [Ping timeout: 250 seconds]
<logicmoo>
i assume the compiler for SICL is written in Lisp
jfb4 has quit [Ping timeout: 240 seconds]
<logicmoo>
wam-cl compiler is written in Prolog so it doesnt self improve :(
jfb4 has joined #lisp
<copec>
so that it DOESN'T?
<copec>
heh
<logicmoo>
but i am happy still
<logicmoo>
hrm perhaps not actualyl improve by suuch a process
<logicmoo>
erm not any do
* logicmoo
was thinking they did
makomo has quit [Quit: WeeChat 2.4]
<copec>
SICL is CL written in CL using all the modern knowledge of implementing a CL, according to my understanding
<copec>
Clasp is essentially enough of a CL written in C++, using the LLVM libs, to build SICL
<copec>
and subsequently rebuild itself, replacing those bootstrapping parts
<jmercouris>
copec: interesting link
smaster has joined #lisp
lxbarbosa has quit [Remote host closed the connection]
ravenousmoose has joined #lisp
EvW1 has joined #lisp
ljavorsk has joined #lisp
ravenousmoose has quit [Ping timeout: 250 seconds]
Codaraxis has joined #lisp
Zanitation has quit [Quit: WeeChat 2.6]
18WAA1MU8 has quit [Remote host closed the connection]
ljavorsk has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
brettgilio has quit [Ping timeout: 276 seconds]
ljavorsk has joined #lisp
<copec>
Also, Clasp has C++ objects working with a dynamic garbage collecting memory allocator, and drmeiste is a chemistry guy, not a cs guy
<copec>
he is one of those super-achievers
Kundry_Wag has quit [Ping timeout: 265 seconds]
mindthelion has joined #lisp
pfdietz has quit [Remote host closed the connection]
techquila has quit [Ping timeout: 240 seconds]
<edgar-rft>
Structure and Interpretation of Chemistry Programs (still to be written by drmeister)
ljavorsk has quit [Read error: Connection reset by peer]
<copec>
ahaha
wiselord has quit [Read error: Connection reset by peer]
wiselord has joined #lisp
<pjb>
jmercouris: sbcl shares some with cmucl. ecl shares some with kcl. ccl shares some with mcl.
<pjb>
jmercouris: basically, forks.
jmercouris has quit [Ping timeout: 240 seconds]
<pjb>
jmercouris: there's no defined or unique kernel to CL. beach's programming sicl using the whole CL. You could theorically implement a CL using only the 35 special operators. Or just lambda. It's a silly question with no answer.