<pjb>
saturn2: note: compile-file takes a key output-file parameter that must be pathname designator, ie. that can be a file stream. As such, it will create a fasl file.
<pjb>
It is unfortunate that it wouldn't just write the fasl data to the stream, whatever kind it would be, since LOAD can take a non-file stream.
<pjb>
If that was the case, you could use a Gray stream to some memory buffer.
<pjb>
Perhaps your implementation has an extension that allows it to write to the output-file stream without creating a new file (ie. considering it as a stream, and not as a pathname designator).
<saturn2>
it seems like an unfortunate arbitrary limitation, but creating a temporary file isn't a big deal in practice
<Bike>
i think saturn2 is talking about getting the code to be compiled from memory, rather than writing the compiled fasl to memory
<saturn2>
yes
<saturn2>
i could envision uses for the other thing too, though
<pjb>
saturn2: that said, with Gray stream, you can also implement file-stream backed by memory storage, so nothing is lost, in implementations that have Gray streams (ie. almost all of them).
<jmes>
Sometimes when I MAKE-INSTANCE, I get an #<unknown pointer object, ...> back. Is there some obvious reason why this might be?
<pjb>
these kinds of objects are general foreign. What kind of class are you trying to instanciate?
<pjb>
in general
<jmes>
I have some class inheriting from SEQUENCE, but IIRC it has happened before with a simple "subclass" of T
<jmes>
pjb: not sure if that answers your question
<pjb>
Perhaps it's specific to #sbcl? I've never seen this kind of results in ccl.
<jmes>
The class I'm having an issue with now does have a slot containing an array of cl-autowrap foreign wrapper objects. It's just weird to me that I'm 2 layers removed from the foreign stuff yet make-instance given me an unkown pointer
<pjb>
Indeed.
<pdietz>
sequence is not required to be a standard-class. It could be a builtin-class. make-instance will error when invoked on a builtin-class.
<pdietz>
Although sbcl does some funky stuff with sequences.
<jmes>
Right, I'm using trivial-extensible-sequences which I think smooths some of the weirdness out, but I'm not sure.
<pdietz>
In sbcl, sequence is a standard-class.
amb007 has joined #commonlisp
<pdietz>
That thing you're getting back may just be a consequence of a print method? Do class-of on it.
<jmes>
Good call, let me try that
<jmes>
Though the issue initially came up when method combination couldn't find a matching method for unknown pointer.
amb007 has quit [Ping timeout: 246 seconds]
<jmes>
Hmm, CLASS-OF gives the right class, but it still complains about failing to find a method for unknown pointer.
<jmes>
I'll poke around more, then try my luck in #sbcl, thanks guys.
<Bike>
jmes: that happens if you inherit from sequence but not standard-object, iirc
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<jmes>
Bike: Well I'll be! I wouldn't have figured that out... It seems to be working after I add standard-object as a superclass. Thanks a bunch!
azimut has quit [Ping timeout: 258 seconds]
<pdietz>
Is that mentioned in the sbcl manual? (goes to look)
amb007 has joined #commonlisp
<pdietz>
Yes. "A minimal sequence subclass has to specify standard-object and sequence as its superclasses"
<Bike>
no problem. i think that bit me a few times.
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
pjb has quit [Ping timeout: 264 seconds]
pdietz has quit [Quit: Client closed]
srji has quit [*.net *.split]
srji has joined #commonlisp
motherhucker has joined #commonlisp
eddof13 has joined #commonlisp
pdietz has joined #commonlisp
<pdietz>
Perhaps that should be checked for.
motherhucker has quit [Ping timeout: 246 seconds]
motherhucker has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
Spawns_Carpeting has joined #commonlisp
tyson2 has joined #commonlisp
eddof13 has joined #commonlisp
motherhucker has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
motherhucker has joined #commonlisp
amb007 has joined #commonlisp
mfiano has quit [Quit: WeeChat 3.6]
amb007 has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pdietz has quit [Ping timeout: 244 seconds]
mfiano has joined #commonlisp
motherhucker has quit [Ping timeout: 260 seconds]
akoana has joined #commonlisp
eddof13 has joined #commonlisp
vn36_ has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
eddof13 has joined #commonlisp
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drbluefall has joined #commonlisp
drbluefall has quit [Remote host closed the connection]
yottabyte has quit [Ping timeout: 252 seconds]
yottabyte has joined #commonlisp
vn36_ has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
dre has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
rgherdt has joined #commonlisp
igemnace has joined #commonlisp
aartaka has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
overclucker has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
overclucker has joined #commonlisp
011AAAHGN has joined #commonlisp
ttree has quit [Ping timeout: 246 seconds]
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
_cymew_ has joined #commonlisp
011AAAHGN has quit [Ping timeout: 260 seconds]
Lycurgus has joined #commonlisp
Posterdati has quit [Read error: Connection reset by peer]
<Josh_2>
I only want certain restarts to be available based on the class of the condition
aartaka has quit [Ping timeout: 260 seconds]
<shka>
phoe: i will reach you out when i actually figure out what i want
<Josh_2>
I assume I can just use the :test key but from the clhs page for with-condition-restarts I think that does what I want
<phoe>
that's :TEST or :TEST-FUNCTION specified when binding the restart
<Bike>
Josh_2: with-condition-restarts works with a particular condition object. if you want a whole type you'll want :test
<phoe>
there is also the troll code snippet (with-condition-restarts (make-condition 'condition) (compute-restarts) (error "haha")) that you should not use in a slime REPL
<shka>
phoe: but yeah, i think that i meant debugger
<phoe>
then it's with-condition-restarts, yeah
aartaka has joined #commonlisp
<phoe>
(with-condition-restarts (make-condition 'condition) (compute-restarts) (error "haha")) actually associates all restarts with a fresh condition object, so they do not appear when the debugger is entered with another condition
<phoe>
if you use a known condition object instead of (m-i 'c) and custom-tailor the list of restarts to only contain restarts you want to associate, you can hone this down from being a troll code snippet to something useful with a nested debugger
aartaka has quit [Read error: Connection reset by peer]
<Josh_2>
I only want certain restarts available at runtime, I guess I could use :test though
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
<Josh_2>
I'll see how I feel about it, I only have 1 example of this, but with generics you can implement the system once and leave the specialization for later :sunglasses:
<prokhor__>
beach: sry, wrong channel :)
Noisytoot has quit [Remote host closed the connection]
amb007 has joined #commonlisp
Noisytoot has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
eddof13 has joined #commonlisp
<Josh_2>
Guess it didn't work
<Josh_2>
one of those things
<shka>
phoe: thanks, i need to take a look at this with a fresh mind, i am tired right now
ttree has joined #commonlisp
tyson2 has joined #commonlisp
<jasom>
I saw earlier discussions of CL running in WASM; I think the best bets will be compiling to bytecode and running the bytecode on WASM. WASM is just too different from a CPU to reuse any traditional CL compiler.
MajorBiscuit has quit [Ping timeout: 255 seconds]
<jackdaniel>
jasom: ecl builds for wasm that way
amb007 has joined #commonlisp
<jackdaniel>
it is possible to cross compile whole cl program though
aartaka has joined #commonlisp
<jasom>
jackdaniel: oh I didn't know ecl supported cross-compilation at all. Is stack-rewinding through some emscripted approved way like setjmp?
<jackdaniel>
yes; play with turtleware.eu/static/ecl/ecl.html
<jackdaniel>
stack is emulated wholesale
<jackdaniel>
via asyncify
knusbaum has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
aartaka has quit [Ping timeout: 246 seconds]
MajorBiscuit has joined #commonlisp
igemnace has quit [Remote host closed the connection]
MajorBiscuit has quit [Ping timeout: 255 seconds]
<Josh_2>
The argument to (restart-case ... :test (lambda (<thisn>) ...)) is the condition thats signalled?
pjb has joined #commonlisp
<Josh_2>
Do I have to pass the condition as an argument to invoke-restart for this to be the case? I am trying to use #'typep to check the type of the condition in order to activate/deactivate the restart, but they are never activated