jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
foojin has joined #lisp
holycow has quit [Quit: Lost terminal]
__rumbler31 has joined #lisp
mathZ has joined #lisp
schjetne has quit [Ping timeout: 240 seconds]
__rumbler31 has quit [Ping timeout: 256 seconds]
python476 has quit [Ping timeout: 240 seconds]
doanyway has quit []
mlf|2 has joined #lisp
figurehe4d has joined #lisp
mflem has quit [Ping timeout: 240 seconds]
sshirokov has quit [Ping timeout: 264 seconds]
sbryant has quit [Ping timeout: 240 seconds]
zachk has quit [Quit: Leaving]
Rawriful has quit [Quit: WeeChat 1.4]
markong has quit [Ping timeout: 256 seconds]
swflint has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
uint has quit [Remote host closed the connection]
DataLinkDroid has quit [Ping timeout: 240 seconds]
DataLinkDroid has joined #lisp
dented42 has joined #lisp
clintm has quit [Read error: Connection reset by peer]
sbryant has joined #lisp
schjetne has joined #lisp
fikka has joined #lisp
swflint has quit [Ping timeout: 240 seconds]
DataLinkDroid has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
swflint has joined #lisp
eli_oat has joined #lisp
Kundry_Wag has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
eli_oat has quit [Remote host closed the connection]
swflint has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 260 seconds]
swflint has joined #lisp
d4ryus1 has joined #lisp
__rumbler31 has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
d4ryus has quit [Ping timeout: 260 seconds]
DataLinkDroid has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
schjetne has quit [Ping timeout: 240 seconds]
__rumbler31 has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Chream_ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
schjetne has joined #lisp
dddddd has quit [Remote host closed the connection]
figurehe4d has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
FreeBirdLjj has quit [Read error: Connection timed out]
FreeBirdLjj has joined #lisp
damke has quit [Ping timeout: 264 seconds]
mathZ has quit [Remote host closed the connection]
dented42 has joined #lisp
quazimodo has quit [Ping timeout: 264 seconds]
schjetne has quit [Ping timeout: 260 seconds]
__rumbler31 has joined #lisp
quazimodo has joined #lisp
dented42 has quit [Client Quit]
Petit_Dejeuner is now known as [REDACTED]
[REDACTED] is now known as Petit_Dejeuner
__rumbler31 has quit [Ping timeout: 268 seconds]
fisxoj has joined #lisp
eli_oat has joined #lisp
eli_oat has quit [Client Quit]
eli_oat has joined #lisp
quazimodo has quit [Ping timeout: 264 seconds]
warweasle has joined #lisp
Cymew has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
rumbler31 has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
schjetne has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
Oladon1 has quit [Quit: Leaving.]
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
schjetne has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 240 seconds]
arescorpio has joined #lisp
Cymew has joined #lisp
iqubic has joined #lisp
rumbler31 has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
thuffir has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 264 seconds]
scymtym has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
Cymew has joined #lisp
Fare has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
pierpa has quit [Quit: Page closed]
eli_oat has quit [Quit: Leaving.]
Cymew has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 268 seconds]
voidlily has quit [Ping timeout: 276 seconds]
Fare has quit [Ping timeout: 248 seconds]
pierpal has quit [Ping timeout: 264 seconds]
asarch has joined #lisp
al-damiri has quit [Quit: Connection closed for inactivity]
Fare has joined #lisp
schjetne has joined #lisp
voidlily has joined #lisp
fikka has joined #lisp
pierpal has joined #lisp
Fare has quit [Ping timeout: 248 seconds]
Pixel_Outlaw has joined #lisp
pierpal has quit [Client Quit]
pierpal has joined #lisp
schjetne has quit [Ping timeout: 264 seconds]
Mutex7 has joined #lisp
jlarocco has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
ukari has joined #lisp
rumbler31 has joined #lisp
damke has quit [Ping timeout: 264 seconds]
pierpal has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
ukari has quit [Ping timeout: 256 seconds]
warweasle has quit [Quit: Leaving]
rumbler31 has quit [Ping timeout: 240 seconds]
Oladon has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 248 seconds]
damke has joined #lisp
karswell has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
<beach> Good morning everyone!
fikka has joined #lisp
schjetne has joined #lisp
rumbler31 has joined #lisp
dented42 has joined #lisp
Fare has joined #lisp
figurehe4d has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
Fare has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
figurehe4d has quit [Quit: Leaving]
schjetne has quit [Ping timeout: 256 seconds]
thuffir has joined #lisp
sauvin has joined #lisp
jlarocco has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
asarch has quit [Ping timeout: 256 seconds]
wigust has joined #lisp
Oladon has quit [Quit: Leaving.]
arescorpio has quit [Quit: Leaving.]
Fare has joined #lisp
schjetne has joined #lisp
Bike has quit [Quit: Lost terminal]
EvW has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
mlf|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
dented42 has quit [Quit: Textual IRC Client: www.textualapp.com]
pierpal has joined #lisp
schjetne has quit [Ping timeout: 264 seconds]
doanyway has joined #lisp
damke_ has joined #lisp
vlatkoB has joined #lisp
damke has quit [Ping timeout: 264 seconds]
dented42 has joined #lisp
<phoe> Hey beach!
dented42 has quit [Client Quit]
khisanth__ is now known as Khisanth
ebzzry has quit [Read error: Connection reset by peer]
ebzzry has joined #lisp
Mutex7 has quit [Quit: Leaving]
fourier has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
stacksmith has quit [Ping timeout: 265 seconds]
jlarocco has quit [Remote host closed the connection]
rippa has joined #lisp
pierpal has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
schjetne has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
zxcvz has joined #lisp
t0adst00l has joined #lisp
energizer has quit [Disconnected by services]
energizer has joined #lisp
energizer has quit [Remote host closed the connection]
energizer has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
pierpal has joined #lisp
<beach> scymtym: For Second Climacs, I want the reader to return parse-results, or as I call them in Second Climacs "wad"s. A wad is a nested data structure that contains source positions corresponding to the start and the end of the thing that was read, and also a list of children, which are also wads. And the children are represented as a list of wads in the order that they were read.
charh has quit [Quit: zZzZZz]
doanyway has quit [Remote host closed the connection]
angavrilov has joined #lisp
<beach> Furthermore, non-expressions are included, so that there are comment wads, etc.
<beach> I need to program Eclector to return wads.
<beach> I have several options:
<beach> 1. Just do it.
<beach> 2. Add the possibility for Eclector to return wads, just the way it can now return CSTs.
wxie has joined #lisp
<beach> The thing is complicated by the fact that in Second Climacs I ultimately want CSTs as well.
Arcaelyx has joined #lisp
johnvonneumann has joined #lisp
<beach> So then, for solution 1 I can convert wads to CSTs. Just drop the non-expressions and apply a similar technique that Eclector itself uses to construct a CST from a bunch of children.
<beach> With solution 2, there are two sub-options:
<beach> 2.1 Use solution 1, but include it in the Eclector repository.
<beach> 2.2 Use solution 2, and factor the code so that there is no duplication, i.e. build the CSTs from the wads.
<beach> scymtym: Any suggestions?
rumbler31 has joined #lisp
<beach> The thing is complicated by the fact that, for Second Climacs, I want to make the parser incremental. I guess I need to think about the interaction between the cache manager and the reader. It is entirely possible that it can not be turned incremental with solution 2.
wxie has quit [Read error: Connection reset by peer]
<phoe> beach: for an incomplete expression, is it possible that you return a "special" wad at the end of each list of children that is used as a mark that this expression is incomplete?
<phoe> I imagine that for an incomplete expression "(1 2 3" it could be a list resembling (#<WAD 1> #<WAD 2> #<WAD 3> #<EOF-WAD>) or something similar.
<beach> I do that. It is called EOF-WAD.
<phoe> If a list contains an EOF-WAD, then the expression is incomplete, but you can nonetheless return the parse result.
<phoe> Hah!
<beach> Yes, I do need to improve it so that there are several types of EOF-WADs
<phoe> And if you can return a parse result, then you should be able to make your parser incremental nonetheless.
<beach> One would be an incomplete list, one and incomplete token, etc.
<beach> It's not clear...
<beach> The wad-reader would need to be a generic function.
<beach> That way, I can define and :AROUND method that consults the cache.
rumbler31 has quit [Ping timeout: 264 seconds]
<beach> It would not call CALL-NEXT-METHOD if there is a wad in the cache.
<beach> I guess it can work.
<phoe> Oh, right.
schjetne has quit [Ping timeout: 264 seconds]
nika has joined #lisp
earl-ducaine has joined #lisp
<beach> The reason I am asking all this is that such a wad reader could be useful in situations other than Second Climacs, and if so, it ought to be in a separate system.
<beach> Anyway, time to go do something else.
<beach> I'll read any remarks when I get back.
pierpal has quit [Read error: Connection reset by peer]
<flip214> beach: for me "wad" is a datafile for Doom ;)
vap1 has quit [Quit: Leaving]
vaporatorius has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
shka_ has joined #lisp
schjetne has joined #lisp
fisxoj has quit [Quit: fisxoj]
<beach> I see. Well, PARSE-RESULT turned out to be too long, so I had to choose something shorter.
milanj_ has quit [Quit: This computer has gone to sleep]
Pixel_Outlaw has quit [Quit: Leaving]
thuffir has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
lnostdal has joined #lisp
FreeBirdLjj has joined #lisp
schjetne has quit [Ping timeout: 240 seconds]
ChrisOei has joined #lisp
lnostdal has quit [Ping timeout: 264 seconds]
DataLinkDroid has quit [Ping timeout: 240 seconds]
lnostdal has joined #lisp
rumbler31 has joined #lisp
DataLinkDroid has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
lnostdal has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
milanj_ has joined #lisp
schjetne has joined #lisp
makomo has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
lnostdal has joined #lisp
ravi__ has joined #lisp
ravi has quit [Ping timeout: 264 seconds]
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
lnostdal has quit [Ping timeout: 260 seconds]
Fare has quit [Ping timeout: 248 seconds]
iqubic` has joined #lisp
iqubic` has left #lisp [#lisp]
schjetne has quit [Ping timeout: 240 seconds]
iqubic has quit [Ping timeout: 255 seconds]
lonjil has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
rumbler31 has joined #lisp
Xach has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Ping timeout: 260 seconds]
varjag has joined #lisp
eschatologist has quit [Ping timeout: 276 seconds]
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
Quetzal2 has joined #lisp
eschatologist has joined #lisp
energizer has quit [Ping timeout: 240 seconds]
schjetne has joined #lisp
cage_ has joined #lisp
jmercouris has joined #lisp
light2yellow has joined #lisp
fourier has quit [Ping timeout: 264 seconds]
schjetne has quit [Ping timeout: 264 seconds]
damke has joined #lisp
puchacz has joined #lisp
puchacz has quit [Client Quit]
damke_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
fikka has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
ravi has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
ravi__ has quit [Ping timeout: 248 seconds]
Karl_Dscc has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
schjetne has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
fikka has joined #lisp
pierpal has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<jmercouris> anyone know where Shinmera has been? He's active on github but not on IRC
fikka has joined #lisp
<scymtym> beach: i will have to think about this more, but i have an initial impression. i mentioned before that i would like to turn the eclector-concrete-syntax-tree code into two parts: 1) a protocol for constructing parse results 2) a client of that protocol that constructs CSTs. my impression is that such a protocol (modulo omissions that become apparent when it is used) would be sufficient for the three clients i am aware of: 1) the CST
<scymtym> client 2) the second climacs client 3) my toy-lisp client
schjetne has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 240 seconds]
<pjb> jmercouris: you mean, Shinmera has been programming, instead of chatting? Anathema!
igemnace has joined #lisp
svillemot has quit [Quit: Reboot]
ravi__ has joined #lisp
fikka has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi has quit [Ping timeout: 276 seconds]
ravi__ has quit [Max SendQ exceeded]
svillemot has joined #lisp
ravi__ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
markong has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
fikka has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
<jackdaniel> jmercouris: he is on irc, ust gave up on #lisp (at least temporarily)
fikka has quit [Ping timeout: 264 seconds]
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
* edgar-rft always thought that chatting is like literate programming
clintm has joined #lisp
Ven`` has joined #lisp
wxie has joined #lisp
Ven` has joined #lisp
fikka has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
schjetne has joined #lisp
Ven`` has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 248 seconds]
orivej has joined #lisp
milanj_ has quit [Ping timeout: 264 seconds]
schjetne has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
pierpal has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 256 seconds]
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wxie has quit [Read error: Connection reset by peer]
t0adst00l has quit [Ping timeout: 255 seconds]
wxie has joined #lisp
wxie has quit [Client Quit]
<beach> scymtym: OK, sounds good. Let's discuss this at some point.
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 264 seconds]
alecigne has joined #lisp
alecigne has left #lisp [#lisp]
EvW1 has joined #lisp
schjetne has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
Satou has joined #lisp
rumbler31 has joined #lisp
jsjolen has joined #lisp
__rumbler31 has joined #lisp
makomo has joined #lisp
schjetne has quit [Ping timeout: 248 seconds]
__rumbler31 has quit [Ping timeout: 264 seconds]
lnostdal has joined #lisp
Bike has joined #lisp
zaquest has quit [Quit: Leaving]
jsjolen has quit [Remote host closed the connection]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
dddddd has joined #lisp
pierpal has joined #lisp
ravi__ has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
jeosol has quit [Ping timeout: 260 seconds]
python476 has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
schjetne has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
random-nick has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
moei has quit [Quit: Leaving...]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Bronsa has joined #lisp
CrazyEddy has quit [Remote host closed the connection]
Satou has quit [Quit: Cya soon guys!]
Josh_2 has joined #lisp
fikka has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
wigust- has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #lisp
schjetne has quit [Ping timeout: 268 seconds]
wigust has quit [Ping timeout: 256 seconds]
asarch has joined #lisp
fikka has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
TCZ has joined #lisp
EvW1 has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
sjl has quit [Quit: WeeChat 1.9.1]
jmercouris has quit [Ping timeout: 264 seconds]
sjl has joined #lisp
jmercouris has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schjetne has joined #lisp
TCZ has quit [Quit: Leaving]
fikka has joined #lisp
Fare has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has joined #lisp
ukari has joined #lisp
pillton has quit [Ping timeout: 240 seconds]
schjetne has quit [Ping timeout: 268 seconds]
Rawriful has joined #lisp
fikka has joined #lisp
Kevslinger has joined #lisp
<ukari> is there any consensus or principle about function api design? There are two ways and which is better ? multiple returned values, or (list (cons :key1 xx) (cons :key2 xx) (cons: key3 xx))
<White_Flame> multiple values are very common
himmAllRight has joined #lisp
<White_Flame> now, if those keys are optional, then you might want to return that and descructure
fikka has quit [Ping timeout: 264 seconds]
charh has joined #lisp
<pfdietz> I suggest a preference for :key arguments.
<phoe> Ukari: it depends™
damke has joined #lisp
<phoe> what is your function going to return?
<phoe> I mean, what is its purpose?
<ukari> I am used to use closure as a simple object system
<jackdaniel> if function returns multiple values use multiple values, that way you don't cons unnecessarily
<jackdaniel> (my opinion™)
damke_ has quit [Ping timeout: 264 seconds]
<Bike> i wonder if implementations cons in (multiple-value-call (lambda (&key ...) ...) ...)
<jackdaniel> you don't need the lambda there
<jackdaniel> because you return the result of calling it (when you cal lthe function)
<jackdaniel> just saying
<Bike> what?
<jackdaniel> also progn is implicit in defun
<Bike> oh not me
<jackdaniel> Ukari: ↑ (not Bike :)
<ukari> what is calling it? the lambda it returned is what need to call
<Bike> it's called immediately
<Bike> so it's pointless
<jackdaniel> (defun hash () ((lambda () 3))) is the same as (defun hash () 3)
<Xof> speaking of consing
<Bike> (defun hash () (let ((storage)) ...)) would work the same
<jackdaniel> compiler may even strip the lambda
<Bike> also, if you want an object i recommend actually construting an object
<Bike> no need to be coy
<jackdaniel> yup
CrazyEddy has quit [Remote host closed the connection]
<jackdaniel> and an opinionated advice: use #'(lambda …) to return lambda
<ukari> you are right
<jackdaniel> though it is semantically the same (because lambda is a macro)
<Bike> this isn't even more efficient, you cons up three closures, whereas you only need zero closures
<ukari> I thought you were talking about lambdas in return
<jackdaniel> well, in your situation (if you really need these lambdas inside), just do (defun hash () (let (storage) (values #'(…) #'(…) #'(…))))
<Xof> I am having difficulty building an implementation of case using a jump table without consing at runtime (and, worse, doing O(n) initialization at runtime). I wonder if I'm missing something or if that is indeed the best I can do
fikka has joined #lisp
<Bike> what do you have to cons at runtime?
<ukari> in values #'(...)... way, if i want to call :set or :get, the code need to provide a exact position
<Xof> Bike: closures
<Bike> for what?
<Xof> (let ((x 1)) (case y (:foo (1+ x)) (:bar (+ x 2))))
<jackdaniel> Ukari: whenever you remember that first is init, second is set and third is get, or that you remember that there is assoc :init, assoc :set and assoc :get still makes you remember *things* as a programmer
<Xof> if I rewrite that to (funcall (aref table (lookup y))) ; approximately
damke has quit [Ping timeout: 264 seconds]
<Xof> then my table functions are in general closures
<Bike> oh i thought you meant an actual jump table
<Xof> (defun foo (x) (case y (:foo (1+ x)) (:bar (+ x 2))))
<Xof> yeah, fair enough
<Bike> which obviously you can't do without special support
<ukari> jackdaniel, but if i need to add another :setFoo, i must add it to the last position or it will mess up the code before
<Xof> ok, that's the "obviously" I was looking for, thanks
<jackdaniel> Ukari: for me thsi programming style is unreadable anyway, when I want functions I define them with names and provide argument to them
<Bike> i mean, an "actual" jump table is like having a GO special operator that evaluates its argument
<Bike> but that doesn't exist in lisp
<Xof> the good news is that means I can forget about my case-using-perfect-hashes, at least for now, and move on to find-restart-using-perfect-hashes
<Xof> since restart-bind does O(n) initialization anyway
<Bike> well you could still get implementation support and do it
<Bike> i think phkuong played with computed goto in sbcl
<jackdaniel> Ukari: eventually (if I really must) I can always define dynamic variable and create dynamic context for these functiosn with let, that way I have only one thing to carry in the application instead of n functions
<Xof> it certainly sounds like the kind of thing he would have played with
fikka has quit [Ping timeout: 260 seconds]
<jackdaniel> Ukari: I admit that these advices are very opinionated, but you have asked about opinions ;)
shka_ has quit [Quit: Konversation terminated!]
<ukari> show me the example about `define dynamic variable and create dynamic context for these functiosn with let`, it sounds interesting
<phoe> (let ((*some-sorta-thing* 42)) (foo))
Naergon has quit [Ping timeout: 268 seconds]
<phoe> where (defun foo () (frobnicate *some-sorta-thing*))
<jackdaniel> (defvar *foo*) (defun init () (setf *foo* (make-hash-table))) (defun ukari-get () (gethash …)) (ukari-set () (setf (gethash …)))
<jackdaniel> now (let ((*foo* nil)) (init) (ukari-set …) (ukari-get …))
<jackdaniel> in body of this let form *foo* is bound to nil, outside this let form *foo* is not bound at all
ravi__ has joined #lisp
fikka has joined #lisp
ravi__ has quit [Max SendQ exceeded]
shka_ has joined #lisp
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
<ukari> it seems not work well if I need two or more instance
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
<jackdaniel> we could go on with improving your hack, but readable solution is to have argument to your set/get functions
fikka has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
<jackdaniel> and as many variables as many instances you need (and work from there)
<pjb> Ukari: I would distinguish inner-loop functions from public API functions. The later, notably if they're intended to be invoked from the REPL, as commands, can have all kinds of sophisticated argument parsing, including &key and others (eg. catching additionnal arguments or list of arguments after the last &key, which is not parsed by default). But for internal functions, it may be better to use more plain lambda-lists, with only
damke has joined #lisp
<pjb> mandatory arguments. Avoiding notably &rest.
ravi__ has quit [Max SendQ exceeded]
<jackdaniel> having dynamic context, or even worse – floating anonymous functions, makes your program hard to analyze
<pjb> Ukari: and for results, multiple-values are probably the fastest way to return multiple values, even if you put a lot of NILs there for optional results.
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
schjetne has joined #lisp
Oladon has joined #lisp
ravi__ has joined #lisp
damke_ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
<ukari> pjb, thank you for advice
fikka has joined #lisp
ravi__ has joined #lisp
Nubi has joined #lisp
damke has quit [Ping timeout: 260 seconds]
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
DemolitionMan has joined #lisp
u0_a183 has joined #lisp
ravi__ has quit [Max SendQ exceeded]
fikka has quit [Ping timeout: 268 seconds]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
pierpal has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
Bronsa has quit [Ping timeout: 240 seconds]
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
fikka has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
ravi__ has quit [Max SendQ exceeded]
l2y has joined #lisp
ravi__ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
ravi__ has quit [Max SendQ exceeded]
ravi__ has joined #lisp
light2yellow has quit [Ping timeout: 264 seconds]
schjetne has quit [Ping timeout: 248 seconds]
l2y has left #lisp [#lisp]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
asarch has quit [Remote host closed the connection]
grumble has quit [Read error: Connection reset by peer]
grumble has joined #lisp
schjetne has joined #lisp
raynold has joined #lisp
<ukari> (iterate (for i in '(1 2 3 4)) (print i)), why this code tells 'The variable I is unbound'
nowhere_man has quit [Ping timeout: 276 seconds]
schjetne has quit [Ping timeout: 255 seconds]
<phoe> Ukari: (ql:quickload :iterate) (use-package :iterate)
<phoe> ITERATE is not a part of standard Common Lisp.
<ukari> oh, : p
<Josh_2> Don't iterate, loop.
<phoe> Don't loop, do.
<Josh_2> Yeh :D
<phoe> Don't do, TAGBODY+GO. Don't TAGBODY+GO, recur. Don't recur, iterate.
<Josh_2> Don't do, do*
<phoe> (defmacro don (thing &rest forms) (declare (ignore thing)) `(do ,@forms))
<phoe> (don't ((x 0 (1+ x))) ((> x 10)) (print x))
cage_ has quit [Remote host closed the connection]
cage_ has joined #lisp
asarch has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
<foojin> jackdaniel: In your answer to Ukari, what did you mean by "floating anonymous functions"?
mflem has joined #lisp
<phoe> a (lambda (...) ...) somewhere in code
<phoe> nothing worse in a stacktrace than a nameless lambda
<jackdaniel> foojin: he had "function factory", so I assume he were going to use them
<jackdaniel> exactly 3x number of instances of his "hash"
<ukari> phoe, why, for efficiency or debug info?
<phoe> Ukari: debuggability
<jackdaniel> each of them was not named, and I assume he would want to store them *somewhere*
<phoe> efficiency-wise there should be no difference
<jackdaniel> so there is a lot of variables storing functions without a name
<jackdaniel> generally I meant this
<ukari> nameless lambda don't make global name confit but defun does, or it needs package name provided
<foojin> jackdaniel: Ah, so it's just about passing them around so that it becomes difficult to know where did they come from.
<phoe> Ukari: do you really need to generate code for each single hash element that you have?
<jackdaniel> Ukari: I suspect you are a beginning CL programmer. I may be wrong, but if it is a case, you may learn a lot by following simple advices
<phoe> and each single hash value is going to have a completely separate function that is going to be called?
<jackdaniel> it is easier to maintain N variables with your "instances" and use directly gethash/setf gethash, then to maintain 3xN functions doing that for you
<jackdaniel> if you have more complicated behavior, you maintain objects in variables and you specilize generic functions on their classes
<ukari> maybe i could store nameless lambda in a static way and pass varibale into it, like (let ((set (lambda (store) (lambda () ...)))) (defun hash () (list (cons :set (funcall set store)))))
energizer has joined #lisp
<jackdaniel> etc, that is something what people do, because it works and it provides easy structure of your program to follow
<jackdaniel> but I think you are not interested in following this "nonsense", so I'm getting back to my Saturday ;-) see you \o
<phoe> Ukari: grab a CLOS tutorial, read it and use it. You're going in a direction that is rarely used (because better mechanisms exist) and insanely hard to debug.
fourier has joined #lisp
<phoe> Your "closures as a simple object system" slowly stops being simple.
damke_ has quit [Ping timeout: 265 seconds]
brendyn has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
cage_ has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #lisp
<ukari> i find a not-independent generator in this code, (iterate (for el in '(1 2 3 4)) (generate i from 1) (print (next i))). is there any standrad about independent generator?
frgo has joined #lisp
<ukari> sth might works like (iterate (for i in generator) (print i))
<phoe> Ukari: I think the only piece of manual for ITERATE is https://common-lisp.net/project/iterate/doc/index.html
jlarocco has joined #lisp
Oladon has quit [Quit: Leaving.]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
<Fare> Ukari: if you're heavy into functional style and going below the object system, Scheme might be more for you than CL.
<phoe> ^
<python476> hey there
fikka has quit [Ping timeout: 264 seconds]
<python476> any of you ever seen a PCB lisp DSL ?
<python476> even primitive
<python476> PCB as in electronics layout
schjetne has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
Oladon has joined #lisp
<fourier> not exacly lisp question but rather slime/sly, but how to get the last value returned in repl? like (sly-inspect "*") always inspects nil
<p_l> python476: I have only seen complete GUI design programs
<Fare> fourier: you need * in the thread of the REPL ?
<fourier> Fare: yes apparently
fikka has joined #lisp
<fourier> what I want is to call sly's graphical inspector on *. but it always inspects nil :(
damke has joined #lisp
<rme> (defparameter *foo* *), then inspect *foo*
<fourier> yes this works, but kinda ugly
<rme> (swank:inspect-in-emacs *)
damke_ has quit [Ping timeout: 264 seconds]
<rme> there's always a way
<python476> p_l: danke
<python476> I think it's time for a lisp pcb compiler
<python476> after all SICP has a circuit DSL
<python476> we just need a SICP-circuit-to-plane dsl, wish dsssl support for fanciness
<python476> :cough:
fikka has quit [Ping timeout: 264 seconds]
<Fare> rme: what's the funding situation of CCL?
<p_l> python476: pretty sure Cadence SKILL can be used like DSL
<rme> Fare: The funding situation is not good. I have done a little paying work for about 1.5 clients.
<rme> I can self-fund some work on it, but not forever.
light2yellow has joined #lisp
schjetne has quit [Ping timeout: 268 seconds]
<Fare> :-/
<phoe> rme: do you have any kind of patreonfundme website set up?
pierpal has joined #lisp
<Josh_2> ^^
<ukari> how to parse a syntax keyword in defmacro?
<edgar-rft> python476, is this what you're looking for? <https://www.cliki.net/ICanCAD>
milanj has joined #lisp
light2yellow has quit [Client Quit]
<ukari> oh, i know
<rme> phoe: No, I haven't set up anything like that.
<phoe> rme: please do! I believe I'm not the only person who'd want to chip in.
<rme> Thank you, phoe. I know there are generous people out there like you, but I have some doubts about whether crowdfunding is suitable for sustaining funding for a software system like CCL.
fikka has joined #lisp
<Fare> I have fond memories of working with CCL. A few issues, too, but overall minor. Not sure how things changed since Gary retired (how is he?)
<phoe> rme: I honestly don't think it's going to sustain CCL but I nonetheless want to throw my two cents at it the moment I have a chance.
<phoe> Other than hacking at it, that is.
<rme> Fare: Gary sent me email the day before the ELS started to wish me luck on me talk.
<fourier> that was extremely energetic and inspiring talk though
<rme> He's mentioned to me before that he thinks about getting back on the net, but I don't know much more than that.
<phoe> fourier: +1
<rme> fourier: Thanks. I believe every word I said.
fikka has quit [Ping timeout: 256 seconds]
<Fare> (I still believe ITA did the wrong call on dividing its attention between SBCL and CCL, but that is one of the least mistakes made there)
CrazyEddy has quit [Remote host closed the connection]
<Fare> I miss working in Lisp --- and most importantly, with Lispers.
stnutt has quit [Ping timeout: 276 seconds]
<Fare> Happily, I am working with a Lisper now, though not in Lisp.
fikka has joined #lisp
<mfiano> Fare: What are you working in if not Gerbil?
stnutt has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
loginoob has joined #lisp
dddddd has quit [Remote host closed the connection]
CrazyEddy has joined #lisp
aindilis has joined #lisp
moei has joined #lisp
<Fare> mfiano: at Legicash, we use OCaml.
<Fare> other project (still ongoing, but I am less involved) is still in Gerbil Scheme.
stnutt has quit [Ping timeout: 276 seconds]
random-nick has quit [Read error: Connection reset by peer]
doanyway has joined #lisp
stnutt has joined #lisp
Oladon has quit [Quit: Leaving.]
fikka has joined #lisp
<fourier> what is your opinion on ocaml ?
<Fare> Well, I was raised on OCaml back at $almamater
schjetne has joined #lisp
nika has quit [Quit: Leaving...]
<Fare> coming back to it, I find I enjoy having decent type inference to help me. The syntax is annoying. The build system story is in disarray though with a good solution in sight (jbuilder / dune); the metaprogramming story is well, quite unsatisfying though not quite as bad as Java.
<jmercouris> Fare: I think you managed to find one of the only OCaml jobs in existence
<Fare> I made it.
<Fare> I'm the technical co-founder.
<jmercouris> Ah, then you could have just as easily made it Lisp
<jmercouris> what drove your decision?
<Fare> No, we really needed types.
<jmercouris> Do you care to elaborate?
<Fare> working with cryptocurrencies, with our claim being that we use formal methods.
<jmercouris> Ah, well
<Fare> There is a Scheme backend to Coq, though.
<Fare> So that's the fallback plan to me if OCaml gets too messy / stunted.
fikka has quit [Ping timeout: 260 seconds]
<Fare> Types do help a lot with prototyping. And library support for pure functional programming.
<jmercouris> Do they? I'm not so sure
<rme> I've always sort of been interested in ML and OCaml, but I've never used either for anything real.
<jmercouris> you are a much more experienced developer than me though, so maybe with time I'll achieve some level of enlightenment in this regard
<fourier> why ocaml and not haskell ?
<Fare> I do find that OCaml is a bit awkward in that anything serious requires using modules which require one more level of complexity compared to other things. I miss the seamless ad hoc polymorphism of Scala or Haskell.
<Fare> The object system of OCaml is not very well integrated.
<Fare> fourier, because we wanted to work with Tezos (shelved for now) which uses OCaml, and we still want to use with Coq, which has much better OCaml than Haskell support.
<fourier> ah I see
<jmercouris> Fare: so, what does yoru company do exactly?
<jmercouris> are you at liberty to say?
<jmercouris> s/yoru/your
<Fare> Also, unless I had an expert Haskell partner, I wouldn't feel comfortable using Haskell. OCaml lets you easily escape to plain old imperative style, so I know I can fallback to the bad old ways if needed.
fikka has joined #lisp
<jmercouris> imperative is the bad old ways? what are you some prolog master :D?
<Fare> prolog is way too imperative for me. Did you mean Mercury?
<Fare> (Does Mercury still exist?)
<jmercouris> prolog is way too imperative, that's a statement I never thought I would hear :D
<jmercouris> interesting business you have there
<jmercouris> I take it you are funded because you have some advisors
LiamH has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<Fare> jmercouris, the two are not synonymous.
<Fare> Although they are correlated.
<p_l> Fare: Mercury still exists
<Fare> yup, mercurylang.org
fikka has joined #lisp
<jmercouris> sure, anyone that's serious about a business is usually using an advisor as an avenue to investment
<jmercouris> at least serious about a "startup", whatever that means
<jmercouris> Fare: how long do you anticipate until your product is operational?
<Fare> about a year.
<Fare> if fully funded
<Fare> that would be beta net.
<jmercouris> So what's the majority of that time?
<jmercouris> what do you need the funding for?
<Fare> building the software and proof infrastructure.
Kundry_Wag has joined #lisp
<jmercouris> how many developers do you want to hire?
<jmercouris> if you don't want to talk about it, feel free to stop me at any time
<jmercouris> or if anyone is annoyed by this being off-topic as well...
<jackdaniel> --> #lispcafe
<jmercouris> I first looked for Fare's username in lispcafe
<jackdaniel> ask him to join, maybe he is interested in non-lisp discussion ;-)
* Fare joins #lispcafe
<loginoob> I am a beginner, have only read 6 chapters of CL:a gentle introduction. Should i also learn to write tests to my programs or that should be learned later?
<Fare> ocaml is just lisp with a bad syntax and a semi-usable type system.
<jmercouris> loginoob: Tests aren't super critical, plus there is no "de-facto" testing framework in CL
<Fare> actually, the original CAML was written in Lisp. LeLisp.
<jmercouris> loginoob: something cool to do might be to write your own testing suite
<jackdaniel> loginoob: desiging tests for your application is essential, but not so important for learning excercises
<jmercouris> loginoob: there's a chapter about it in practical common lisp
pierpal has quit [Ping timeout: 248 seconds]
random-nick has joined #lisp
pierpal has joined #lisp
<jmercouris> it could be a cool way to learn, and write some very basic tests
<jackdaniel> loginoob: tool you use to write tests is a secondary choice, we have multitude of testing frameworks but a little number of tests written
<Fare> even cooler than designing your own test suite, is not doing it and helping cleanup the test library situation.
Kundry_W_ has joined #lisp
<jmercouris> well, a standard will not emerge unless a leader emerges
<phoe> loginoob: I suggest that you try reading the code for 1AM and trying to use it for your first tests.
<jackdaniel> creating new test framework won't help picking the leader ,) I fully agree with Fare
<phoe> it's a test framework that fits on a single page of paper and is therefore dead simple to understand.
<phoe> though, honestly, you don't need no test framework to write tests in Lisp
<jmercouris> jackdaniel: it's not about picking the leader, it's about learning CL...
<phoe> (defun test-simple-math () (assert (= 4 (+ 2 2))) (assert (= 9 (* 3 3))) ...)
<jackdaniel> then why did you mention that? :)
<jmercouris> I thought it would combine both of the user's goals
<jmercouris> 1. learning how to write tests, 2. learning common lisp
<phoe> because 1AM is a fun wrapper around DEFUN that also takes case of collecting all tests for the purpose of running them together.
<jackdaniel> I fail to comprehend this logic, but whatever ;] /me departs
<phoe> so I can call (RUN) and boom, they all get run.
<jmercouris> just like that :)
Kundry_Wag has quit [Ping timeout: 248 seconds]
<phoe> just a matter of convenience and my silly customs.
<loginoob> I guess i should focus on learning CL and worry about tests after i become intermediate
<loginoob> otherwise i would be lost
fikka has quit [Ping timeout: 248 seconds]
<MichaelRaskin> A long file with assert's and comments can go a long way
<jmercouris> loginoob: that's a good idea
<loginoob> will try to do some simple asserts
<loginoob> thank you
Kundry_W_ has quit [Remote host closed the connection]
<phoe> loginoob: simple asserts should do for now
Kundry_Wag has joined #lisp
<loginoob> will do surely
CrazyEddy has quit [Remote host closed the connection]
stacksmith has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has joined #lisp
Mutex7 has joined #lisp
schjetne has quit [Ping timeout: 256 seconds]
loginoob has left #lisp [#lisp]
Hello__ has joined #lisp
<fourier> first learn the language, tests you will need then you are about to write some library/app in it
fikka has quit [Ping timeout: 260 seconds]
dessm has joined #lisp
fikka has joined #lisp
python476 has quit [Ping timeout: 256 seconds]
Fare has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
Kundry_W_ has joined #lisp
python47` has joined #lisp
pierpal has quit [Client Quit]
pierpal has joined #lisp
schjetne has joined #lisp
lyding has joined #lisp
DemolitionMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
lnostdal has quit [Ping timeout: 276 seconds]
dddddd has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fourier has quit [Read error: Connection reset by peer]
wigust- has quit [Ping timeout: 276 seconds]
lnostdal has joined #lisp
DemolitionMan has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
<foojin> How can variable capture occur in the following example macro from "On Lisp": (defmacro cap2 (var) ‘(let ((x ...) (,var ...)) ...)) ?
<foojin> Is it incorrect just because passing x to it would be a LET error?
schjetne has quit [Ping timeout: 264 seconds]
<Bike> what's in the dots
<foojin> It's not specified. I suppose that whatever's in there, it contains instances of ",var".
<phoe> foojin: (let ((x 42)) (cap2 x)) is an error
<phoe> because you have multiple LET bindings for the same variable
vlatkoB has quit [Remote host closed the connection]
<foojin> phoe: Wouldn't your example expand to nested LETs? BTW that's what I meant when I wrote about a "LET error".
<foojin> phoe: Ah, I see. Even if they're nested, the inner one is incorrect.
<phoe> foojin: exactly.
<phoe> Nested LETs, second of which is malformed.
shrdlu68 has joined #lisp
* phoe goes to get his nightly garbage collection
<foojin> So, if one were to suppose that only correct (non-malformed) expansions will occur, there's no way for x to be captured, is it?
<clintm> phoe: (sb-ext:gc :full t)?
<shrdlu68> phoe: More like indexing.
<p_l> shrdlu68: well, it's GC, compression, reindexing
<edgar-rft> clintm, is this the same as (sb-ext:gv :empty nil) ?
<edgar-rft> *(sb-ext:gc :empty nil)
<edgar-rft> damn, jokes with typos suck :-(
<clintm> edgar-rft: I'm not sure, but I know where to find out.
<clintm> hehe
<shrdlu68> p_l: I've been thinking about the language-agnostic-syscalls thing, reading up on kernel hacking, procf, etc.
<shrdlu68> Hit a snag when I considered threading.
doanyway has quit []
d4ryus1 is now known as d4ryus
angavrilov has quit [Remote host closed the connection]
<phoe> foojin: also depends
<phoe> you might hit a reverse capture
<phoe> (let ((x 42)) (cap2 y (+ x 100))) may return something else than 142
<phoe> because this might expand to (let ((x 42)) (let ((x 8080) (y 3)) (+ x 100)))
<phoe> and therefore ;=> 8180
<shrdlu68> How do I know which packages are being :used in current package?
<phoe> shrdlu68: programmatically or interactively?
<shrdlu68> Either.
<phoe> shrdlu68: inspect the package object, it should have a use list
<phoe> oh wait
schjetne has joined #lisp
<phoe> clhs package-use-list
<shrdlu68> Ah, so :cl-user :uses :sb-ext, which is why I've always been able to call gc without the sb-ext: prefix.
<phoe> shrdlu68: yes, the use list for CL-USER is implementation-defined.
<phoe> on CCL, it also uses the :CCL package methinks, and so on.
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
<pjb> foojin: more precisely, it's because in (let ((x 42)) (cap2 x)) we want the x in (cap2 x) to refer to the x bound by let. but the macro cap2 could expand to (let ((x 33 #|for example|#)) '(list x)) #| --> (list 33) |# where is bound in the inner let. This is not inherently wrong. It's just a matter of specifications of the cap2 macro, and of general expectations ("style") in CL.
fikka has quit [Ping timeout: 264 seconds]
hjek has joined #lisp
<foojin> phoe: The question was somewhat ambiguous, with dots instead of actual code, so I assumed there were no comma substitutions there. Otherwise that situation would surely be possible.
<pjb> foojin: If you are defining a specific DSL, perhaps it's meaningful for the x in (cap2 x) to be refering something else than outside bindings. But if not in this case, it's generally expected that the in a form such as (let ((x 42)) (cap2 x)) the x in (cap2 x) be a lexical reference to the lexical binding.
hjek has quit [Client Quit]
<pjb> It's often better to let the user specify the name of the inner variables, when he can also provide bodies or expressions refering them: (let ((x 42)) (cap2 (x) x)) would then read similarly to (let ((x 42)) (let ((x 33)) x)) and there would be no contraried expectation: it would be clear, lexically, that cap2 establishes a new binding for x.
<pjb> And if the user wants to use the outer x, this allows him to write (let ((x 42)) (cap2 (y) (+ x y))).
puchacz has joined #lisp
<puchacz> hi, how to read file to array of octets pls?
<phoe> puchacz: alexandria:read-file-into-byte-vector
<pjb> shrdlu68: I have this in my common.lisp rc file: (mapc (lambda (package) (unuse-package package "COMMON-LISP-USER")) (delete (find-package "COMMON-LISP") (copy-seq (package-use-list "COMMON-LISP-USER"))))
<puchacz> phoe: thanks
<pjb> shrdlu68: so my CL-USER is the same in all implementations, and I can write conforming code even in CL-USER.
<shrdlu68> puchacz: Alexandria has a function for that.
<foojin> pjb: I totally forgot about the "expectations" thing. It would indeed be quite strange for an inserted binding to get in the way (as shown in your first example).
<pjb> puchacz: (subseq (com.informatimago.common-lisp.cesarum.file:binary-file-contents "/etc/passwd") 0 10) #| --> #(35 35 10 35 32 85 115 101 114 32) |#
<shrdlu68> puchacz: alexandria:read-file-into-byte-vector
<phoe> shrdlu68: ha! I was first
trocado has joined #lisp
<puchacz> :)
<shrdlu68> puchacz: Or just open the file with :elment-type (unsigned-byte 8)
<pjb> foojin: this is why it's not wrong per-se. It all depends on the specification of the macro. For example, anaphoric macros establish an implicit binding to IT.
<shrdlu68> phoe: Didn't see that :(
<phoe> shrdlu68: <3
JuanDaugherty has joined #lisp
<puchacz> shrdlu68: nah, I prefer to have it wrapped as a function
<pjb> the type is evaluated, so it must be quoted: :elment-type '(unsigned-byte 8)
<shrdlu68> Yep.
<pjb> And since unsigned-byte is exported from CL, you cannot fbind it.
python47` has quit [Read error: Connection reset by peer]
janivaltteri has joined #lisp
<phoe> wait, fbind?
<phoe> you can put it in a flet
<pjb> define a function or macro with the same name.
<pjb> Nope, definitely not in flet or labels!
<pjb> Because CL operators can be open-coded.
python476 has joined #lisp
<phoe> (flet ((unsigned-byte (x) `(unsigned-byte ,x))) (unsigned-byte 8))
<pjb> flet-ing or labels-ing them would be ineffective.
<pjb> This is not conforming.
<phoe> yes it is
<phoe> If an external symbol of the COMMON-LISP package is not defined as a standardized function, macro, or special operator, it is allowed to lexically bind it as a function (e.g., with flet), to declare the ftype of that binding, and (in implementations which provide the ability to do so) to trace that binding.
<shrdlu68> pjb: That's cool.
<phoe> The fact that the above is completely pointless is a different thing
<pjb> phoe: Oh, right, in the exceptions.
<pjb> That's funny.
<phoe> pjb: I know, right?
<phoe> But this is why we can (let ((function ...)) ...), too.
<pjb> This is a strong exception for the implementations, because the default rule is that implementations can define functions for those symbols. But then they cannot use directly those functions in macroexpansions, because that could be wrapped in a flet/labels that would shadow them…
<phoe> pjb: sure thing that they can define functions on them, BUT
<phoe> these functions cannot be in form (defun unsigned-byte ...)
<pjb> why not?
<phoe> because with the symbol UNSIGNED-BYTE being exported, that would mean that the symbol UNSIGNED-BYTE is now globally fbound.
<phoe> And it must NOT be globally fbound because there is no standard function CL:UNSIGNED-BYTE in the standard.
<phoe> clhs unsigned-byte
<pjb> but 11.1.2.1.2 pt. 2 is generally explained saying that implementations may do just that.
fikka has joined #lisp
<varjag> anyone here uses hyperspec-lookup with safari?
<pjb> Notice that in the exception it's not said "if the exported symbol is fbound or not" but "if the expected symbol is DEFINED by the standard as a function."
<varjag> browse-url doesn't seem to open file:// urls for me
<phoe> Hmmm.
<varjag> http works fine
<pjb> varjag: I use Safari as navigator when working on MacOS.
<pjb> file:// works too, such as file:///opt/local/share/doc/lisp/HyperSpec-7-0/HyperSpec/Body/m_ignore.htm
<varjag> yeah they do work in broswer
<phoe> pjb: I see.
<varjag> but emacs' browse-url drops them shomehow
<pjb> (after: sudo port install lisp-hyperspec)
<phoe> It's nonetheless weird for me that the standard would permit a thing like #'UNSIGNED-BYTE.
<phoe> Since that's obviously non-portable code.
<pjb> phoe: not really. This allows implementations to use functions to represent things such as types.
<pjb> Perhaps we should be happy that no implementation use such trick.
<phoe> pjb: sure, but that's non-portable.
<varjag> so M-x hyperspec-lookup works for me if i set the root to a web adress, but not with the local hyperspec repo
<pjb> It's hidden, it's an implementation detaila.
<phoe> Well. As long as it's inside the implementation, I don't care.
<phoe> But if it leaks outwards, it's just weird to me.
<pjb> varjag: works for me. You'll have to debug it.
<pjb> phoe: Yes.
<phoe> The standard lists all symbols that are exported from the CL package.
<phoe> I wonder if it has any constrains about whether some of these symbols must/must not be bound/fbound/macrobound.
fikka has quit [Ping timeout: 264 seconds]
<phoe> I mean, if the list of all fbound external CL symbols is not permitted to be extended by the implementation above the bare minimum.
<phoe> That's an interesting thing to check... tomorrow.
* phoe exhausts his heap, game over.
<pjb> Good night. (you may have some surprise checking that).
schjetne has quit [Ping timeout: 268 seconds]
slyrus1 has joined #lisp
fikka has joined #lisp
slyrus1 has quit [Quit: slyrus1]
fikka has quit [Ping timeout: 264 seconds]
pillton has joined #lisp
asarch has quit [Quit: Leaving]
CrazyEddy has joined #lisp
trocado has quit [Ping timeout: 248 seconds]
Kundry_W_ has quit [Remote host closed the connection]
kotrcka has joined #lisp
puchacz has quit [Quit: Konversation terminated!]
shrdlu68 has left #lisp [#lisp]
puchacz has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 268 seconds]
schjetne has joined #lisp
brendyn has joined #lisp
zachk has joined #lisp
<ebrasca> Can I get negative number in 2's complement and in binary?
earl-ducaine has quit [Remote host closed the connection]
<ukari> is (defstruct ship ..) must use a 'make-ship' to make a instance? Is there anything like (make-instance 'ship ) also works ?
lnostdal has quit [Ping timeout: 260 seconds]
<Josh_2> Hmm I wonder when Fare is gonna come back, there is some questionable English on his site
slyrus1 has joined #lisp
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
fikka has joined #lisp
Quetzal2 has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
<nirved> ebrasca: use ldb
<White_Flame> or logand
LiamH has quit [Quit: Leaving.]
<White_Flame> Ukari: there's an option to defstruct as to what to name the constructor
damke has quit [Ping timeout: 264 seconds]
<White_Flame> so you can dispatch through your own tools if you want
fikka has quit [Ping timeout: 264 seconds]
Murii has quit [Ping timeout: 240 seconds]
logc has joined #lisp
<pjb> ebrasca: it's not clear what you're asking.
<pjb> ebrasca: the answer is definitely: YES. But we don't know what you want.
<ebrasca> I like to have binary of negative number.
<ebrasca> For b instruction of power9.
schjetne has quit [Ping timeout: 264 seconds]
lnostdal has joined #lisp
<ebrasca> I am porting mezzano to talos II.
Kundry_Wag has joined #lisp
<pjb> What about: (ldb (byte 32 0) -1) #| --> 4294967295 |#
<White_Flame> (logand -1 #xffff) => 65535. not sure what else you want
<White_Flame> (also not sure which compiles faster, check the disassembly ;) )
<ebrasca> It is 24 bits relative address
Kundry_W_ has joined #lisp
<pjb> Notice that since you're asking for number: (ldb (byte 32 0) (round (realpart #c(-3.0 0.0)))) #| --> 4294967293 |#
sshirokov has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
zachk has quit [Changing host]
zachk has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
sz0 has joined #lisp
CrazyEddy has quit [Remote host closed the connection]
fikka has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
janivaltteri has quit [Quit: leaving]
DemolitionMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
fikka has quit [Ping timeout: 240 seconds]
jmercouris has joined #lisp
yeahyeahwhatever has joined #lisp
fikka has joined #lisp
<theemacsshibe[m]> Hello
fikka has quit [Ping timeout: 256 seconds]
logc has quit [Quit: logc]
fikka has joined #lisp
CrazyEddy has joined #lisp
sauvin_ has joined #lisp
yeahyeahwhatever has quit [Quit: Leaving]
sauvin has quit [Ping timeout: 240 seconds]
sauvin_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 268 seconds]
sauvin has joined #lisp
python476 has quit [Ping timeout: 248 seconds]
random-nick has quit [Read error: Connection reset by peer]
slyrus1 has quit [Quit: slyrus1]
Pixel_Outlaw has quit [Quit: Leaving]
CrazyEddy has quit [Remote host closed the connection]
Kundry_W_ has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #lisp
schjetne has joined #lisp
fikka has joined #lisp
schjetne has quit [Ping timeout: 256 seconds]
CrazyEddy has quit [Ping timeout: 256 seconds]
brendyn has quit [Ping timeout: 264 seconds]
Fare has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
epony has left #lisp ["PART"]
pierpa has joined #lisp
fikka has joined #lisp
CrazyEddy has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
mejja has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
oleo has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Khisanth has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
trocado has joined #lisp
schjetne has joined #lisp
fikka has quit [Ping timeout: 240 seconds]