phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
dacoda has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
copec has quit [*.net *.split]
ecraven has quit [*.net *.split]
whartung has quit [*.net *.split]
d_run has quit [*.net *.split]
dim has quit [*.net *.split]
SyrupThinker has quit [*.net *.split]
housel has quit [*.net *.split]
pent has quit [*.net *.split]
tehidiot has quit [*.net *.split]
chewbranca has quit [*.net *.split]
spal has quit [*.net *.split]
drmeister has quit [*.net *.split]
flip214 has quit [*.net *.split]
v88m has quit [Read error: Connection reset by peer]
ecraven has joined #lisp
pent has joined #lisp
tehidiot has joined #lisp
chewbranca has joined #lisp
SyrupThinker has joined #lisp
drmeister has joined #lisp
dim has joined #lisp
spal has joined #lisp
SyrupThinker is now known as Guest58215
splittist has quit [Ping timeout: 272 seconds]
copec has joined #lisp
splittist has joined #lisp
dale has quit [Quit: dale]
housel has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
Arcaelyx has quit [Quit: Arcaelyx]
Arcaelyx has joined #lisp
whartung has joined #lisp
^ is now known as uplime
v88m has joined #lisp
banjiewen has quit [Ping timeout: 245 seconds]
sz0 has quit [Ping timeout: 252 seconds]
banjiewen has joined #lisp
sz0 has joined #lisp
linli has joined #lisp
linli has quit [Ping timeout: 246 seconds]
marusich has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
Guest58215 is now known as SyrupThinker
SyrupThinker is now known as Guest2168
Lord_of_Life_ is now known as Lord_of_Life
dale has joined #lisp
<LdBeth> good morning
Necktwi has quit [Ping timeout: 245 seconds]
<ck_> Good morning, LdBeth
<LdBeth> antonv: CCL provides process-interrupt function so you can let the hanging thread call (break) to inspect it in debugger.
<LdBeth> bexx: I use sly
<bexx> LdBeth: do you miss any functionality from slime?
<ober> is there something > slime/swank now?
mindCrime_ has joined #lisp
<antonv> LdBeth: thank you
<LdBeth> bexx: the main reason I use sly is I can use mouse click on the printed object to inspect it. slime doesn't provide such functionality unless load some contrib. other than that, I just need symbol completion and xref, and an interface to debugger.
<ober> ahh lem
<bexx> Oh I use the completion a lot
<bexx> Maybe in the future I can try sly
<bexx> Thanks LdBeth!
<LdBeth> lem is not very defferent from terminal emacs, except it does better in some corner cases (since I don't like electron.js and never tried the gui)
<LdBeth> (oh and the default config C-h does backspace and backspec does delete is confusing)
dacoda has quit [Ping timeout: 250 seconds]
<antonv> LdBeth: how to you think, if CCL waits int a system call, process-interrupt probably won't work?
<ober> installing npm stuff is painful in comparison to roswell imho
<aeth> roswell is pretty painful imo
<aeth> I'd love something that assumes you already have a Common Lisp installed (most Linux distros ship several, and other OSes have binaries) and you just want to try out other implementations or newer/older versions of the same implementation. That would greatly simplify things.
dddddd has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
sjl has quit [Ping timeout: 252 seconds]
<LdBeth> antonv: the document says it will immediately return even while waiting a system call becasue this function is implemented with POSIX signal
<ober> well, js makes sense as at least it's a scheme
<ober> /s
<LdBeth> f
<aeth> "JS is Scheme" is funny because they started looting ideas from Haskell/Scheme/etc. to justify that meme that was clearly false when it started.
<aeth> In 10-20 years no one will notice.
<ober> it's a horrible language written by a homophobe.
stacksmith has joined #lisp
<Oladon> Ah, tribalism...
<ober> unhandled dependency on lem. wish there was a way to downcase all the cl errors
Kundry_Wag has quit [Ping timeout: 246 seconds]
<stacksmith> G'day. What should (quote (function foo)) evaluate to? I was under the assumption that quote suppresses evaluation of 'thing'...
torbo has joined #lisp
<LdBeth> stacksmith: (function foo), you intuition is right
<stacksmith> Well, not according to SBCL.
<Bike> yes according to sbcl
<Bike> (equal '(function foo) (list 'function 'foo)) => T
<stacksmith> Hmm. Mine reports #'foo
<Bike> that's correct
<Oladon> That's the same thing
<Bike> #'foo is just short for (function foo)
<Oladon> stacksmith: #' is syntactic sugar
<Bike> printed as well as read
<LdBeth> stacksmith: you see sbcl print #'foo is because sbcl pretty print (function foo) to #'foo
<LdBeth> (car (quote (function foo))) => FUNCTION
<Bike> note that if you enter #'foo what's printed is something like #<FUNCTION FOO> instead
<Bike> (i mean, assuming it's not undefined)
<stacksmith> I had a macro that worked on cffi bindings, and it looked like it converted one of defcfun parameters, (function :pointer) to #':pointer...
<stacksmith> that is :pointer there
orivej has quit [Ping timeout: 248 seconds]
<stacksmith> ":pointer"
<stacksmith> damn.
<LdBeth> stacksmith: you type '(function foo) and repl prints #'foo
<stacksmith> that kind of blows. Not all data containing the word function in car is meant to be executed...
<Bike> it's just a printing thing.
<stacksmith> Yeah, I see.
<Bike> try (setf *print-pretty* nil)
<Bike> then '#'foo's result will print as (FUNCTION FOO)
<LdBeth> actually this doesn't work for clisp and ccl.
<stacksmith> I get it, but I do not like it.
<LdBeth> no we need a implementation independent pretty printer that does code walking :D
<stacksmith> Or a good codewalker
<Bike> if ccl doesn't want to pay attention to printer variables that's its problem
<stacksmith> Or a pretty printer that does not fuck with quoted data.
t58 has quit [Quit: Night All]
<Oladon> stacksmith: So rewrite it?
<Bike> the pretty printer doesn't know anything about quotation
<Bike> it just gets the list FUNCTION FOO
<Bike> oh, and i suppose you can alter the pprint dispatch table to not print it like that even with *print-pretty* true
<LdBeth> macrolet doesn't get things wrong, but maybe they're lazy when writing the pprinter
<LdBeth> Actually I pretty curious if function/macro calls can be distingusihed from variable and literal symbol at read time
<LdBeth> or if this process can be factored out from compiler
<Bike> what?
ltriant has quit [Ping timeout: 245 seconds]
<stacksmith> ahem. Symbols are symbols.
<Bike> they sure are
anewuser has joined #lisp
linli has joined #lisp
linli has quit [Ping timeout: 246 seconds]
zulu-inuoe has quit [Quit: Leaving]
Guest2168 is now known as SyrupThinker
SyrupThinker is now known as Guest62229
ltriant has joined #lisp
Lycurgus has quit [Quit: Exeunt]
moei has joined #lisp
ltriant has quit [Ping timeout: 258 seconds]
pliniker has joined #lisp
pliniker has quit [Client Quit]
ltriant has joined #lisp
kushal has quit [Quit: ZNC 1.7.3 - https://znc.in]
kushal has joined #lisp
ltriant has quit [Ping timeout: 248 seconds]
ltriant has joined #lisp
igemnace has joined #lisp
ltriant has quit [Ping timeout: 245 seconds]
moei has quit [Ping timeout: 252 seconds]
ltriant has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
ltriant has quit [Ping timeout: 246 seconds]
dale has quit [Quit: dale]
dacoda has joined #lisp
scottj has joined #lisp
hackware has quit [Remote host closed the connection]
nowhere_man has joined #lisp
torbo has quit [Remote host closed the connection]
igemnace has joined #lisp
actuallybatman has quit [Ping timeout: 244 seconds]
vlatkoB has joined #lisp
akoana has left #lisp ["Leaving"]
ltriant has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
Bike has quit [Quit: Lost terminal]
dacoda has quit [Ping timeout: 268 seconds]
slyrus_ has joined #lisp
mindCrime_ has quit [Ping timeout: 252 seconds]
slyrus__ has quit [Ping timeout: 246 seconds]
<beach> Good morning everyone!
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
anewuser has quit [Quit: anewuser]
actuallybatman has joined #lisp
brandonz has quit [Quit: WeeChat 2.3]
frgo has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
esrse has joined #lisp
antonv has quit [Ping timeout: 248 seconds]
nirved_ has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
wigust has quit [Read error: Connection reset by peer]
wigust has joined #lisp
Arcaelyx has quit [Ping timeout: 258 seconds]
JohnMS_WORK has joined #lisp
marusich has quit [Remote host closed the connection]
ltriant has quit [Quit: leaving]
bendersteed has joined #lisp
karlosz_ has joined #lisp
Kundry_Wag has joined #lisp
nowhereman has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 244 seconds]
nowhereman has joined #lisp
Necktwi has joined #lisp
byronkatz has quit [Quit: Going offline, see ya! (www.adiirc.com)]
frgo has joined #lisp
scottj has left #lisp [#lisp]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
notzmv has quit [Ping timeout: 246 seconds]
Necktwi has quit [Ping timeout: 245 seconds]
jprajzne has joined #lisp
hiroaki has quit [Ping timeout: 258 seconds]
notzmv has joined #lisp
nowhereman has quit [Ping timeout: 252 seconds]
nowhere_man has joined #lisp
donotturnoff has joined #lisp
nirved has joined #lisp
frgo has quit [Remote host closed the connection]
jlarocco has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 245 seconds]
bendersteed has quit [Ping timeout: 245 seconds]
rippa has joined #lisp
scymtym has joined #lisp
frgo has joined #lisp
<splittist> morning beach
igemnace has quit [Ping timeout: 244 seconds]
ebrasca has joined #lisp
Guest62229 has quit [Quit: WeeChat 2.4]
SyrupThinker has joined #lisp
shrdlu68 has joined #lisp
igemnace has joined #lisp
q3d has joined #lisp
hhdave has joined #lisp
q3d has quit [Remote host closed the connection]
<beach> Hey splittist.
hhdave has quit [Client Quit]
shrdlu68 has quit [Ping timeout: 252 seconds]
hhdave has joined #lisp
nicball has joined #lisp
atgreen has quit [Ping timeout: 258 seconds]
shrdlu68 has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
atgreen has joined #lisp
q3d has joined #lisp
q3d has quit [Remote host closed the connection]
q3d has joined #lisp
chip2n has joined #lisp
libre-man has quit [Ping timeout: 244 seconds]
Kundry_Wag has joined #lisp
mingus has joined #lisp
cosimone has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
Necktwi has joined #lisp
libre-man has joined #lisp
<pjb> stacksmith: you're right, quote prevents the evaluation of its argument that is returned as-is. However this is not what matters in '#'foo or '#P"foo"; compare: (first '#'foo) #| --> function |# (first '#P"foo") #| ERROR: The value #P"foo" is not of the expected type list. |#
<pjb> stacksmith: what matters is that #'x READS as the list (CL:FUNCTION x) while #P"foo" READS as a PATHNAME, not a list!
q3d has quit [Ping timeout: 252 seconds]
<pjb> stacksmith: then, what you do with the list or the pathname is your problem. You may quote them, (but since pathnames are self-evaluating, the quote would be useless with them).
<Godel[m]> Why does sbcl say that is is a bad thing to be a type specifier? Here's the warning `; bad thing to be a type specifier: (FIXNUM 0 8)`
<pjb> Godel[m]: because it's non-conforming.
<Godel[m]> what is non-conforming to what?
<pjb> fixnum is a conforming type specifier. (integer 0 8) is a conforming type specifier. (fixnum 0 8) is not. (only sbcl understands it).
vutral has quit [Remote host closed the connection]
<pjb> Godel[m]: to the Common Lisp specification.
<pjb> Godel[m]: check the definitions from conformance to conforming program: http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_c.htm
<pjb> Godel[m]: it's the key to the contract between CL programs and CL implementations.
<Godel[m]> Thanks
<Godel[m]> Let me try with other implementations and see whether they accept it or not.
esrse has quit [Ping timeout: 245 seconds]
<pjb> Godel[m]: abcl returns nil, ecl t, sbcl warns, and ccl and clisp signal an error.
<pjb> As you can see, anything can happen with non-conforming programs.
<Godel[m]> ccl issues a warning for me. But runs the function while ignoring the declaration (I guess).
<pjb> Godel[m]: exercise to the reader: find the implementation that will launch a missile on your approximate geolocation.
<pjb> Godel[m]: that's the point of non-conformance, you cannot even count on the same behavior between different versions of the same implementation!!! Version 1.12-dev (v1.12-dev.4-4-gd9740256) DarwinX8664
<Godel[m]> lol
<Godel[m]> mine is 1.11.5
chip2n has quit [Remote host closed the connection]
zotan has quit [Ping timeout: 252 seconds]
notzmv has quit [Remote host closed the connection]
zotan has joined #lisp
shrdlu68 has quit [Ping timeout: 245 seconds]
capitaomorte has joined #lisp
nicball has quit [Ping timeout: 245 seconds]
scymtym has joined #lisp
nicball has joined #lisp
nicball has quit [Remote host closed the connection]
JohnMS has joined #lisp
capitaomorte has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
JohnMS_WORK has quit [Ping timeout: 252 seconds]
nicball has joined #lisp
nicball has quit [Remote host closed the connection]
flamebeard has joined #lisp
flamebeard has quit [Remote host closed the connection]
cyraxjoe has quit [Read error: Connection reset by peer]
cyraxjoe has joined #lisp
vutral has joined #lisp
orivej has joined #lisp
vutral has quit [Remote host closed the connection]
nicball has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
nicball has quit [Ping timeout: 246 seconds]
vutral has joined #lisp
nicball has joined #lisp
vutral has quit [Remote host closed the connection]
cosimone has quit [Quit: WeeChat 2.3]
nicball has quit [Remote host closed the connection]
nicball has joined #lisp
vutral has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
zagura has quit [Ping timeout: 268 seconds]
mpcjanssen has left #lisp ["WeeChat 1.9.1"]
zagura has joined #lisp
nicball has quit [Ping timeout: 252 seconds]
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
nicball has joined #lisp
nicball has quit [Remote host closed the connection]
nicball has joined #lisp
dddddd has joined #lisp
libre-man has quit [Ping timeout: 245 seconds]
libre-man has joined #lisp
Kundry_Wag has joined #lisp
nullman has quit [Remote host closed the connection]
nullman has joined #lisp
Kundry_Wag has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 252 seconds]
nicball has quit [Remote host closed the connection]
m00natic has joined #lisp
xkapastel has joined #lisp
capitaomorte has joined #lisp
atgreen has quit [Ping timeout: 276 seconds]
libre-man has quit [Ping timeout: 245 seconds]
vutral has quit [Remote host closed the connection]
Lycurgus has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
vutral has joined #lisp
scymtym has joined #lisp
nicball has joined #lisp
hackware has joined #lisp
nicball has quit [Ping timeout: 245 seconds]
nicball has joined #lisp
jonh has joined #lisp
nicball has quit [Ping timeout: 248 seconds]
orivej has quit [Ping timeout: 268 seconds]
libre-man has joined #lisp
nicball has joined #lisp
orivej has joined #lisp
q3d has joined #lisp
nicball has quit [Ping timeout: 248 seconds]
nicball has joined #lisp
amerlyq has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
nicball has quit [Ping timeout: 272 seconds]
actuallybatman has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
LiamH has joined #lisp
nicball has joined #lisp
nicball has quit [Ping timeout: 252 seconds]
nicball has joined #lisp
Bike has joined #lisp
nicball has quit [Ping timeout: 258 seconds]
<Bike> i have a question about recursive types and subtyping. Under the usual rule, when you test subtypep for a recursive type, you expand it and then work under the assumption that that subtypep is true. But then #1=(cons t #1#) is a subtype of NIL, whereas I would think of it as the type of circular lists. does anyone know my conceptual issue here?
atgreen has joined #lisp
q3d has quit [Remote host closed the connection]
steiner has joined #lisp
<jackdaniel> I had a similar question a few years back. I don't remember details, but the conclusion was that one would have to define Y-combinator(?) and I've just dropped the topic after a while
<jackdaniel> I think it was about a proper-list type (which is not part of the ansi standard)
<Bike> yeah, i'm talking about an extension to the type system of course
<pjb> Bike: recursive type specifiers are non-conforming.
<Bike> yeah, i'm talking about an extension to the type system of course
<pjb> Bike: NIL has no subtype.
<Bike> itself
<Bike> for example, (cons nil) is a subtype of nil
<Bike> because it is nil
pfdietz has joined #lisp
<pjb> #1=(cons t #1#) vs. circular lists ⚛︎💣😱💥
<lieven> nil is the empty type, null is the type containing nil
<pjb> (cons nil) is the type of (nil . nil) which is not of type nil.
<pjb> Bike: Please regain normalcy! WAKE UP!!!
<pfdietz> A shame there's no standard ⊥ symbol.
<Bike> (nil . nil) is a (cons null null), which is a completely different type
<pfdietz> SBCL does take that character, though.
<Bike> (and integer cons) is also a subtype of nil
Kundry_Wag has joined #lisp
<pfdietz> although subtypep is not standardly required to recognize that
<Bike> sure. it still is.
<pfdietz> The standard gets into trouble in at least one place by not carefully distinguishing between "subtype" and "recognizable subtype".
<pjb> Bike: ah right. You're confusing me. Yes (cons nil) = nil. Ok.
Lord_of_Life has quit [Ping timeout: 245 seconds]
<pjb> Bike: why are you introducing (cons nil)?
<Bike> introducing?
<pjb> talking of
<Bike> as an example of a type that is a subtype of nil by virtue of being nil
<pfdietz> Anyway, subtypep can be hard, especially on things with cons types. SBCL still has bugs in that.
<pjb> Ok, but it's a triviality. Of course nil is its own subtype.
<pjb> Bike: NIL has no other subtype than itself.
karlosz has quit [Quit: karlosz]
karlosz_ is now known as karlosz
<Bike> yes
<Bike> do i need to rephrase my question
<pjb> I don't see that #1=(cons t #1#) is a subtype of NIL.
karlosz_ has joined #lisp
Lord_of_Life has joined #lisp
<pjb> #1=(a . #1#) is an element of #1=(cons t #1#)
t58 has joined #lisp
<Bike> based on the recursive subtype rule, the determination goes like this: (subtypep '#1=(cons t #1#) nil) = (subtypep (cons t r) nilI) assuming (subtypep r nil) is true = (subtypep r nil) assuming (subtypep r nil) is true = true
<Bike> uh, plus some quotes in there i guess
orivej has joined #lisp
<Bike> this rule also lets you determine things like that proper-list is a subtype of itself, which i think is obvious
karlosz_ has quit [Client Quit]
<pfdietz> Hmm. I see nothing in the standard that requires type specifiers to not have circularity.
<Bike> deftype expansions have to terminate
<Bike> i guess i'm not doing that
karlosz_ has joined #lisp
<Bike> still, i wouldn't expect any actual implementation to have recursive types like this. you can think of it as me talking about a library that i wrote in lisp that implements a type system that's kind of like the lisp type system
<Bike> since that is in fact true
vutral has quit [Remote host closed the connection]
<scymtym> the other obvious (and maybe more standard) choice would be a new compound type specifier syntax (rec x (cons t x))
nicball has joined #lisp
<Bike> that's what i actually did, as it happens
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
t58 has quit [Read error: Connection reset by peer]
t58 has joined #lisp
jprajzne has quit [Quit: Leaving.]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
nicball has quit [Ping timeout: 272 seconds]
manualcrank has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
nicball has joined #lisp
nicball has quit [Ping timeout: 252 seconds]
capitaomorte has quit [Ping timeout: 260 seconds]
cosimone1 has joined #lisp
nicball has joined #lisp
cosimone has quit [Ping timeout: 252 seconds]
nicball has quit [Ping timeout: 246 seconds]
nicball has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
q3d has joined #lisp
nicball has quit [Remote host closed the connection]
nicball has joined #lisp
ring has joined #lisp
chip2n has joined #lisp
ring has quit [Remote host closed the connection]
vutral has joined #lisp
ring has joined #lisp
nicball has quit [Ping timeout: 245 seconds]
ring has quit [Remote host closed the connection]
ring has joined #lisp
saravia has joined #lisp
q3d has quit [Remote host closed the connection]
ring has quit [Remote host closed the connection]
ring has joined #lisp
ring has quit [Remote host closed the connection]
pfdietz has quit [Ping timeout: 260 seconds]
ring has joined #lisp
cosimone has joined #lisp
cosimone1 has quit [Read error: Connection reset by peer]
Adamclisi has joined #lisp
v88m has quit [Ping timeout: 252 seconds]
ring has quit [Ping timeout: 248 seconds]
libre-man has quit [Ping timeout: 248 seconds]
cosimone has quit [Quit: WeeChat 2.3]
scymtym has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
vutral has quit [Remote host closed the connection]
cosimone has joined #lisp
Arcaelyx has joined #lisp
Adamclisi has quit [Quit: Leaving]
ring has joined #lisp
varjag has joined #lisp
libre-man has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
Adamclisi has joined #lisp
Inline has joined #lisp
FreeBirdLjj has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
dale_ has joined #lisp
mn3m has joined #lisp
dale_ is now known as dale
frgo_ has joined #lisp
vutral has joined #lisp
ring has quit [Ping timeout: 272 seconds]
frgo has quit [Ping timeout: 258 seconds]
frgo_ has quit [Ping timeout: 246 seconds]
rotty has joined #lisp
atgreen has quit [Ping timeout: 272 seconds]
ring has joined #lisp
shka_ has joined #lisp
atgreen has joined #lisp
spainisnotequal has joined #lisp
capitaomorte has joined #lisp
Lycurgus has quit [Quit: Exeunt]
v88m has joined #lisp
ym555 has joined #lisp
ring has quit [Ping timeout: 248 seconds]
ring has joined #lisp
kuribas has joined #lisp
<kuribas> how do I turn a 32 bit unsigned number in a 32 bit signed number?
<kuribas> coerce doesn't work
<pjb> (if (< n (expt 2 31)) n (- n (expt 2 32)))
<pjb> (let ((n #x7fffffff)) (if (< n (expt 2 31)) n (- n (expt 2 32)))) #| --> 2147483647 |#
<pjb> (let ((n #x80000000)) (if (< n (expt 2 31)) n (- n (expt 2 32)))) #| --> -2147483648 |#
<pjb> (let ((n #xffffffff)) (if (< n (expt 2 31)) n (- n (expt 2 32)))) #| --> -1 |#
<kuribas> thanks, that should work
ring has quit [Ping timeout: 268 seconds]
<pjb> kuribas: and for fun, have a look at: https://www.informatimago.com/articles/ffn=-n/index.html
atgreen has quit [Ping timeout: 252 seconds]
steiner has quit [Ping timeout: 258 seconds]
spainisnotequal has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
<kuribas> that does insert some useless instructions in my otherwise efficient routine.
<TMA> kuribas: (dpb x (byte 32 0) (- (ldb (byte 1 31) x)))
ring has joined #lisp
moei has joined #lisp
<kuribas> which is supposed to be part of a fast inner loop
<kuribas> I don't get why make-double-float takes a signed int, instead of an unsigned int
<pjb> (disassemble (compile nil (lambda (n) (if (< n (expt 2 31)) n (- n (expt 2 32)))))) and (disassemble (compile nil (lambda (x) (dpb x (byte 32 0) (- (ldb (byte 1 31) x)))))) have the same length!
<pjb> The version with IF might be faster, (each branch is shorter than the other version), but the version with dpb might be better for cryptographic operations (since there's no branch).
ring has quit [Ping timeout: 272 seconds]
<kuribas> pjb it's larger than (ldb (byte 32 0) x)
<kuribas> which I want, if it weren't for sb-kernel:make-double-float taking a signed number instead of an unsigned one.
vutral has quit [Remote host closed the connection]
kuribas has quit [Remote host closed the connection]
NickBusey has joined #lisp
ring has joined #lisp
ring has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
karlosz_ is now known as karlosz
aedb has joined #lisp
jasom has quit [Ping timeout: 246 seconds]
xkapastel has joined #lisp
bendersteed has joined #lisp
bendersteed has quit [Ping timeout: 244 seconds]
bendersteed has joined #lisp
bendersteed has quit [Remote host closed the connection]
mindCrime_ has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
Arcaelyx has quit [Read error: Connection reset by peer]
Arcaelyx has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
hhdave has quit [Quit: hhdave]
Arcaelyx has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
dmiles has quit [Ping timeout: 245 seconds]
vutral has joined #lisp
Arcaelyx has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
Arcaelyx has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
aedb has quit [Remote host closed the connection]
dmiles has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
vutral has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
sjl has joined #lisp
argoneus has joined #lisp
Arcaelyx_ has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
chip2n has quit [Read error: Connection reset by peer]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
Arcaelyx_ is now known as Arcaelyx
karlosz_ has joined #lisp
karlosz_ has quit [Client Quit]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
Adamclisi has quit [Quit: Leaving]
vutral has joined #lisp
mindCrime_ has quit [Ping timeout: 258 seconds]
mn3m has quit [Ping timeout: 258 seconds]
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
nanoz has joined #lisp
atgreen has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
edgar-rft has quit [Quit: Leaving]
void_pointer has joined #lisp
<void_pointer> I have a couple questions about CL style and best practices with regards to making objects. Specifically functions meant to make them.
<void_pointer> I have a kind of object that I want to make constructing functions for.
edgar-rft has joined #lisp
<void_pointer> The different slots require a lot of validation to make sure they are all consistent with each other, so my code has a lengthy stretch of code to do just that.
aedb has joined #lisp
gravicappa has joined #lisp
lxpz has left #lisp ["WeeChat 2.3"]
<void_pointer> But a lot of it is redundant between my different constructing functions. I've managed to separate some of it out into its own utility function
NickBusey has quit [Read error: Connection reset by peer]
atgreen has quit [Ping timeout: 268 seconds]
<void_pointer> But I still have a lot of code duplication because I want each constructiong function to have appropriate restarts to change function arguments until they are valid.
<dlowe> you don't want to validate in an initialize-instance method?
vutral has joined #lisp
<void_pointer> And I can't seem to avoid duplicating the restarts code, even if some of the constructing functions use other ones underneath the hood (in fact, they have to disable the restarts of the one underneath the hood it seems to avoid inconsistencies)
NickBusey has joined #lisp
<void_pointer> dlowe: just realized, I didn't say what kind of objects these are. I am working with structs. But, if I was working with classes, I would still run into a similar issue, just with initialize instance at the bottom. It would be able to do the validation, but the issue is that how it would offer to correct things with restarts would potentially bypass the logic of the function using make-instance.
vutral has quit [Remote host closed the connection]
Folkol has quit [Read error: Connection reset by peer]
<void_pointer> My object has parameters A, B, C, D, E, and F. The problem is for some methods of construction; B is derived from A but not others, C and D and E sometimes determine F but not always (they can sometimes be derived from F). I want to have different constructing functions for these different scenarios, but I feel like I am duplicating too much code and there must be a better way.
donotturnoff has quit [Remote host closed the connection]
<void_pointer> Or perhaps I am trying too hard to offer comprehensive restarts to fix any potential invalid input.
Folkol has joined #lisp
donotturnoff has joined #lisp
<dlowe> Is your intention that the user handle these restarts in the debugger?
<sjl> If you paste some example of the duplicated code, it might be easier for us to understand.
<void_pointer> dlowe: yes
<dlowe> maybe you could just have one RETRY restart that takes multiple key arguments and combines the set ones with the original arguments
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
donotturnoff has quit [Remote host closed the connection]
donotturnoff has joined #lisp
<void_pointer> sjl: it would be a lot to paste and it is in a bit of a mess right now due to trying to solve this problem. It is probably a good idea for me to get it somewhere where it can be seen, though.
<void_pointer> dlowe: that could work
<dlowe> RETRY-WITH-ARGS maybe
<void_pointer> sjl: right now, I have one that is sort of the lowest level where all parameters are given as arguments and it just checks that they are valid and has restarts. The next constructing function calls it but has to re-implement a portion of its logic and replace all of its restarts (some with the same functionality all because the code needs to resume higher in the tree)
m00natic has quit [Remote host closed the connection]
sjl has quit [Ping timeout: 252 seconds]
<aeth> void_pointer: well, structs changes everything
donotturnoff has quit [Ping timeout: 245 seconds]
<aeth> For defstruct you want to turn "defstruct foo" into "defstruct (foo (:constructor %make-foo))" and then do all of the validation in the %make-foo, which will not be exported from your package, if that's possible
vutral has joined #lisp
sjl has joined #lisp
<aeth> s/validation in the %make-foo/validation in the caller of %make-foo/
<void_pointer> aeth: I did do the %make-foo trick. That one is internal and not exported. I have made my own make-foo but make-foo-from-bar and stuff like that is leading to a lot of duplication
vutral has quit [Remote host closed the connection]
<aeth> void_pointer: you could try making it in three layers, and doing everything in an elaborate middle function
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
actuallybatman has joined #lisp
Folkol_ has joined #lisp
Folkol has quit [Ping timeout: 246 seconds]
hiroaki has joined #lisp
mindCrime_ has joined #lisp
pfdietz has joined #lisp
themsay has quit [Read error: Connection reset by peer]
sauvin has quit [Ping timeout: 252 seconds]
themsay has joined #lisp
<void_pointer> I went and cleaned it up a bit and put it on my github so the problem is easier to see
<void_pointer> Code is all in https://github.com/frejanordsiek/numericl/blob/master/docs/numericl.org, which is done in literate programming style with org-mode. Searching for "(defun make-view" will get one straight to it.
<void_pointer> As for what I am working on, I am trying to make a CL library that has some of the functionality of numpy, but rather than aiming to match the API, I am focussing on replicating the capabilities of numpy's ndarray object (called a view in my library for now, though should probably rename).
vutral has quit [Remote host closed the connection]
<void_pointer> I ran into the code duplication once I started to work on constructors that made views full of all zeros or all ones and found I had to duplicate most of the machinery in make-view just like I did in make-view-full.
<Bike> you're using (subtypep type t) to check if type is a type specifier, but an implementation doesn't have to check validity, so that might not work
<aeth> ah, a library called "numericl" explains why you'd be using structs
dale has quit [Quit: dale]
<void_pointer> Bike: that is good to know. thank you
<Bike> (also, the error message is kind of confusing, since all types are subtypes of t)
<void_pointer> aeth: actually, I am using structs rather than classes because ANSI CL structs allow the slots to be made readonly while ANSI CL does not provide such an option for classes. I am going to a lot of trouble to validate the slots and don't want them to get messed up afterwards (unfortunately, I still have to worry about the internal contents of lists and vectors getting changed).
nanoz has quit [Ping timeout: 245 seconds]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
<Bike> it also kind of depends on what you mean by validity; (subtypep (gensym) t) can be true but (upgraded-array-element-type (gensym)) signal an error
<void_pointer> Bike: you are right, it should be something more like "element-type doesn't seem to be a typespec, which was ~a"
<Bike> yeah
<Bike> you can use :reader to not provide writer functions for a standard-object
<Bike> if you keep the slot names unexported, the user changing it with (setf slot-value) is a foot-shoot situation
themsay has quit [Ping timeout: 245 seconds]
<void_pointer> yes, but (setf (slot-value
<void_pointer> or with-slots
dale has joined #lisp
<Bike> still need the slot names for that.
ym555 has quit [Ping timeout: 252 seconds]
themsay has joined #lisp
<void_pointer> Bike: is that in reference to needing the package prefix in the symbol outside of the package it was defined in?
<Bike> sure.
<Bike> i mean, the user can rewrite the object, but your api has no such capability.
<Godel[m]> Hi, how can I specify to quicklisp what dist to use? Like, quicklisp instead of ultralisp...
atgreen has joined #lisp
<void_pointer> Bike: that is true
ym555 has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
<pjb> void_pointer: validation code is code like any other code. a validation function is a function like any other function. subject to factoring etc.
themsay has quit [Ping timeout: 268 seconds]
vutral has joined #lisp
<Xach> Godel[m]: there are a bunch of functions to manage what dists are visible and used
<Xach> Godel[m]: do you have both installed?
vutral has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 245 seconds]
<void_pointer> pjb: I got some of it separated out into a process-dimensions-strides-offset function that checks some things and generates some of the slots. Maybe I can do a bit more with some of the other things. The restarts have me pretty stumped though, mainly because in things like make-view-full; if say dimensions is changed, then the whole underlying array may need to be regenerated
cosimone has joined #lisp
vutral has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
<Godel[m]> Xach: Yes, I have both installed. For now, I just uninstalled ultralisp and installed from quicklisp.
<Godel[m]> Thanks, I'll look at the docs.
mindCrime_ has quit [Ping timeout: 252 seconds]
<Xach> Godel[m]: ha ha ha. sorry :(
mindCrime_ has joined #lisp
<Xach> Godel[m]: there are no docs. sorry
themsay has joined #lisp
<Xach> Godel[m]: ql-dist is the package for managing dists, though. ql-dist:enable and ql-dist:disable are helpful, as well as ql-dist:preference for setting one object before another when considering what to use.
<Godel[m]> Xach: Thanks. This worked as well `(ql-dist:disable (ql-dist::make-dist-from-file "~/.roswell/lisp/quicklisp/dists/ultralisp/distinfo.txt"))`
<Godel[m]> I see a lot of docstrings though...
mindCrime_ has quit [Ping timeout: 272 seconds]
gravicappa has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Xach> Godel[m]: (ql-dist:dist "ultralisp") should find it in a more terse way and not use ::s
<Godel[m]> I see.
chip2n has joined #lisp
<Xach> Maybe. I don't know what roswell might do in there.
cosimone has joined #lisp
vlatkoB has quit [Remote host closed the connection]
vutral has quit [Remote host closed the connection]
pfdietz has quit [Remote host closed the connection]
Bike has quit [Remote host closed the connection]
capitaomorte has quit [Remote host closed the connection]
hackware has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
Bike has joined #lisp
<aeth> void_pointer: you could probably use the MOP to ensure that
<void_pointer> aeth: Yes. Hmm, that is probably how it is done for structs in many implementations
<Bike> use the mop for what
sdumi has joined #lisp
vutral has joined #lisp
<aeth> Bike: to enforce read-only
<Bike> standard-instance-access exists
<aeth> If you're working with slots with :type for numerical code you'll absolutely get more optimizable code with defstruct though afaik so structs still might make sense in the domain
<aeth> I'm not sure if any implementations currently take :read-only into account, though
<aeth> (for potential optimizations)
xkapastel has quit [Quit: Connection closed for inactivity]
Folkol_ has quit [Read error: Connection reset by peer]
sjl has quit [Ping timeout: 246 seconds]
Folkol has joined #lisp
<void_pointer> aeth: well, just checked. SBCL certainly doesn't even on (safety 3)
pauljb has joined #lisp
<Bike> doesn't optimize?
<void_pointer> Bike: doesn't take :read-only into account even when (safety 3). Also; CCL, ECL, CMUCL, ABCL, and CLISP don't either
<aeth> well CLISP doesn't do anything optional in the standard that might make your life easier ime
<aeth> I'm surprised you can even make octet arrays in CLISP
<void_pointer> at least when using slot-value.
<pauljb> hi folks...has anyone ever set up "portacle" on a windows platform? I am getting an exception: An exception occurred in context #.(SB-SYS:INT-SAP #X0022CE00): #.(SB-SYS:INT-SAP #X0022DCA0). (Exception code: 1722)restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Return from the exception handler 1: [USE-VALUE] Try a po
<pauljb> rt other than 223 2: [ABORT ] Exit debugger, returning to top level.0] 1Enter port (defaults to 224): 9999debugger invoked on a SB-WIN32:EXCEPTION in thread#<THREAD "main thread" RUNNING {10012A0613}>: An exception occurred in context #.(SB-SYS:INT-SAP #X0022CE00): #.(SB-SYS:INT-SAP #X0022DCA0). (Exception code: 1722)Type HELP for debugger hel
<pauljb> p, or (SB-EXT:EXIT) to exit from SBCL.restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Return from the exception handler 1: [USE-VALUE] Try a port other than 9999 2: [ABORT ] Exit debugger, returning to top level.(SB-KERNEL:HANDLE-WIN32-EXCEPTION #.(SB-SYS:INT-SAP #X0022CE00) #.(SB-SYS:INT-SAP #X0022DCA0))0] o
<pauljb> DEBUG optimization quality. RESTART-FRAME Restart execution of the current frame, if this frame is for a global function which was compiled with a sufficiently high DEBUG optimization quality. SLURP Discard all pending input on *STANDARD-INPUT*. (This can be useful when the debugger was invoked to handle an error in deeply nest
<Bike> i don't understand, how do you expect it to take it into account, beyond not defining a writer?
<pauljb> ed input syntax, and now the reader is confused.)(The HELP string is stored in *DEBUG-HELP-STRING*.)0] Not currently single-stepping. (Use START to activate the single-stepper)0] ; in: ; COND ((IGNORE-ERRORS (FUNCALL 'REQUIRE "asdf") ; (FUNCALL (READ-FROM-STRING "asdf:version-satisfies") ;
<pauljb> (FUNCALL (READ-FROM-STRING "asdf:asdf-version")) ; "2.019")) ; (PUSH ; (PATHNAME ; "c:/Users/PAUL.PaulBeykirch-PC/Desktop/portacle/all/emacsd/elpa/sly-20190109.2208/slynk/") ; (SYMBOL-VALUE (READ-FROM-STRING "asdf:*central-registry*"))) ; (FUNCALL (READ-FROM-STRI
<pauljb> NG "asdf:load-system") :SLYNK) ; (FUNCALL (READ-FROM-STRING "slynk:start-server") ; "c:/Users/PAUL~1.PAU/AppData/Local/Temp/sly.5996")); (PROGN DEBUG); ; caught WARNING:; undefined variable: COMMON-LISP:DEBUG; ; compilation unit finished; Undefined variable:; DEBUG; caught 1 WARNING conditiondebugger invoked
<pauljb> on a UNBOUND-VARIABLE in thread#<THREAD "main thread" RUNNING {10012A0613}>: The variable DEBUG is unbound.Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Retry using DEBUG. 1: [USE-VALUE ] Use specified value. 2: [STORE-VALUE] Set specified value
<pauljb> and use it. 3: [ABORT ] Reduce debugger level (to debug level 1). 4: Try a port other than 9999 5: Exit debugger, returning to top level.((LAMBDA (#:G455)) #<unused argument>) source: (PROGN DEBUG)0[2] 0] * Process inferior-lisp finished(cond ((ignore-errors (funcall (quote require) "asdf") (funcall (read-from
<pauljb> -string "asdf:version-satisfies") (funcall (read-from-string "asdf:asdf-version")) "2.019")) (push (pathname "c:/Users/PAUL.PaulBeykirch-PC/Desktop/portacle/all/emacsd/elpa/sly-20190109.2208/slynk/") (symbol-value (read-from-string "asdf:*central-registry*"))) (funcall (read-from-string "asdf:load-system") :slynk) (funcall (read-from-string "slynk:
<Bike> jesus
<pauljb> start-server") "c:/Users/PAUL~1.PAU/AppData/Local/Temp/sly.5996")) (t (progn (load "c:/Users/PAUL.PaulBeykirch-PC/Desktop/portacle/all/emacsd/elpa/sly-20190109.2208/slynk/slynk-loader.lisp" :verbose t) (funcall (read-from-string "slynk-loader:init")) (funcall (read-from-string "slynk:start-server") "c:/Users/PAUL~1.PAU/AppData/Local/Temp/sly.5996")
<pauljb> )))This is SBCL 1.4.16, an implementation of ANSI Common Lisp.More information about SBCL is available at <http://www.sbcl.org/>.SBCL is free software, provided as is, with absolutely no warranty.It is mostly in the public domain; some portions are provided underBSD-style licenses. See the CREDITS and COPYING files in thedistribution for more info
<pauljb> rmation.WARNING: the Windows port is fragile, particularly for multithreadedcode. Unfortunately, the development team currently lacks the timeand resources this platform demands.* WARNING: redefining EMACS-INSPECT (#<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>) in DEFMETHODSLYNK's ASDF loader finished.debugger invoked on a SB-WIN32:EXCEPTION in thread#<T
<pauljb> HREAD "main thread" RUNNING {10012A0613}>: An exception occurred in context #.(SB-SYS:INT-SAP #X0022CE00): #.(SB-SYS:INT-SAP #X0022DCA0). (Exception code: 1722)Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Return from the exception handler 1: [USE-VA
<aeth> woah
<pauljb> why did that happen?!
<Bike> void_pointer: i don't understand, how do you expect it to take it into account, beyond not defining a writer?
<aeth> use a pastebin
<Bike> pauljb: because you posted your whole whatever into irc. don't do that
<pauljb> my bad...I used alt-w in emacs on a small region and pasted here
<White_Flame> I'm surprised freenode didn't do a flood kick
<pauljb> idky it pasted that much
pfdietz has joined #lisp
<aeth> My client warns me when it's more than 3 or 5 lines (I forget which)
<pauljb> ok so its not allot;;;im using portacle , https://portacle.github.io/#use, and got a exception when the inferior lisp connects, the error is:
<ck_> aah, the joy of MICROS~1
<pauljb> debugger invoked on a SB-WIN32:EXCEPTION in thread#<THREAD "main thread" RUNNING {10012A0613}>: An exception occurred in context #.(SB-SYS:INT-SAP #X0022CE00): #.(SB-SYS:INT-SAP #X0022DCA0). (Exception code: 1722)
<void_pointer> Bike: well, wasn't sure what to expect. I am still relatively new to CL so I don't have much of a feel for how implementations actually do stuff behind the scenes, their limitations, etc.
<aeth> pauljb: that looks like foreign code has an issue
orivej has quit [Ping timeout: 268 seconds]
<pauljb> i tried supplying different values, listed locals...not sure what sure what is wrong
<pauljb> k, Mike
<pauljb> well....so you means windows internal stuff?
<Bike> void_pointer: you said implementations don't take :read-only into account. clearly you are testing something testable, i'm just curious what that is
sjl has joined #lisp
<aeth> Bike: maybe direct slot access?
<Bike> why speculate when i can ask
cosimone has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
shka_ has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
capitaomorte has joined #lisp
nowhere_man has joined #lisp
amerlyq has quit [Quit: amerlyq]
[6502] has joined #lisp
bendersteed has joined #lisp
vutral has quit [Remote host closed the connection]
szmer has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
vutral has joined #lisp
capitaomorte has quit [Ping timeout: 260 seconds]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
chip2n has quit [Read error: Connection reset by peer]
<luis> (off-topic) Any JIRA and/or Confluence users around?
<luis> (please PRIVMSG, I have questions :-))
aedb has quit [Remote host closed the connection]
Bike has quit [Quit: Bike]
orivej has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
cosimone has joined #lisp
nowhere_man has quit [Ping timeout: 248 seconds]
bendersteed has quit [Read error: Connection reset by peer]
LiamH has quit [Quit: Leaving.]
hhdave has joined #lisp
<ober> luis: yes I have both a jira and confluence app written in lisp
hhdave has quit [Quit: hhdave]
ebrasca has quit [Remote host closed the connection]
capitaomorte has joined #lisp
karlosz_ has joined #lisp
emacsomancer has quit [Ping timeout: 248 seconds]
semz has joined #lisp
edgar-rft has quit [Ping timeout: 272 seconds]
emacsomancer has joined #lisp
Bike has joined #lisp
bendersteed has joined #lisp
vutral has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
notzmv has joined #lisp
sjl has quit [Ping timeout: 258 seconds]
sjl has joined #lisp
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
bendersteed has quit [Remote host closed the connection]
vutral has joined #lisp
capitaomorte has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: WeeChat 2.4]
vms14 has joined #lisp
vutral has quit [Remote host closed the connection]
pauljb has quit [Ping timeout: 260 seconds]
ltriant has joined #lisp
<vms14> how should I properly read from an mp3 file and send it to the client with hunchentoot?
<vms14> I'm using the easy handler/acceptor
<vms14> I want to read it with open and read-sequence
<vms14> but, will read-sequence fill the entire array if it's an adjustable array?
<ioa> ober do you have any open source for your jira and confluence app? I would be very interested.
<pjb> vms14: be sure to use a binary file.
<pjb> read-sequence doesn't change the sequence properties.
<vms14> then how I read the entire mp3 file and store it in a vector?
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
<pjb> vms14: you don't want to do that.
<pjb> vms14: mp3 can be big.
<vms14> pjb: I want to serve it because it's part of the html page
<ioa> thanks, luis
<vms14> so the browser tries to load the mp3 making another request every time the html loads
<ober> it's gerbil scheme, not cl
<ioa> scheme! :) <3
<vms14> but idk how to serve it, the only thing I know I could do is to use hunchentoot to serve files from a folder
<vms14> anyway I'd like to learn how to make it manually
<pjb> vms14: something like: (loop :with fpv = (make-array 4096 :element-type '(unsigned-byte 8) :fill-pointer t) :do (setf (fill-pointer fpv) (progn (setf (fill-pointer fpv) (array-dimension fpv 0)) (read-sequence fpv input))) (write-sequence fpv output) :while (= (fill-pointer fpv) (array-dimension fpv 0)))
<ioa> i'm as familiar with scheme as with cl, but a nice chance to read some scheme
<ioa> i'm NOT! as familiar with scheme as with cl :)
dacoda has joined #lisp
<ober> it scheme jim, but not as we know it
<ober> working on a cl layer to run the same code
saravia has quit [Remote host closed the connection]
wxie has joined #lisp
<ober> and it outputs org-mode
<ober> docs are a bit lacking
<ioa> org-mode is good
Kundry_Wag has joined #lisp
<ober> have elisp wrappers I can add to the repo
<pjb> vms14: otherwise (subseq (com.informatimago.common-lisp.cesarum.file:binary-file-contents #P"~/sound/mp3/jean-michel-jarre/equinoxe--1978/01--equinoxe-pt-1.mp3") 0 10) #| --> #(73 68 51 3 0 0 0 0 9 10) |#
<vms14> nah
<pjb> vms14: but this assumes you can make arrays as big as the MP3.
<vms14> that's what I wanted
<pjb> Even 4096 above is optimistic.
<ioa> ober: that would be very useful, elisp is closer to cl than (gerbil) scheme
<vms14> the thing is I have an adjustable array
<vms14> but idk if read-sequence will make it grow
<vms14> like format does
<pjb> It won't.
<pjb> You have to adjust it before.
<pjb> But happily, file-length works nicely on binary file-streams.
<vms14> so I should know the size of the file before creating the array
<vms14> and make the array as big as the file is
<pjb> Yes.
<vms14> yeah I understand why you're warning me about this
<vms14> the file can be big and fuck everything
<vms14> thanks for the help pjb <3
Kundry_Wag has quit [Ping timeout: 272 seconds]
random-nick has quit [Ping timeout: 252 seconds]
vutral has joined #lisp
actuallybatman has left #lisp ["ERC (IRC client for Emacs 26.2)"]
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
akoana has joined #lisp
wxie has quit [Ping timeout: 252 seconds]
kajo has joined #lisp
<ober> ioa: pushed etc/jira.el they work but need some cleanup
ym555 has quit [Ping timeout: 246 seconds]
ym555 has joined #lisp
vutral has joined #lisp
<vms14> guys you tried a web browser written in lisp?
Kundry_Wag has joined #lisp
<vms14> I wanted to install closure browser to see it, but no way, I see there are more, like next-browser
<vms14> it seems interesting to have a browser written in lisp in order to learn lisp and play around
vutral has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 258 seconds]
vutral has joined #lisp
dacoda has quit [Ping timeout: 246 seconds]
vutral has quit [Remote host closed the connection]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
void_pointer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
vutral has joined #lisp
vutral has quit [Remote host closed the connection]
vutral has joined #lisp