attila_lendvai has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
FreeBirdLjj has joined #lisp
Chream_ has joined #lisp
mishoo_ has quit [Ping timeout: 240 seconds]
pagnol has quit [Ping timeout: 265 seconds]
Devon has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
Chream_2 has joined #lisp
Chream_ has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Quit: Leaving.]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
rumbler31 has joined #lisp
Devon has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
dieggsy has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Remote host closed the connection]
Chream_ has joined #lisp
heurist has quit [Ping timeout: 248 seconds]
heurist has joined #lisp
Chream_2 has quit [Ping timeout: 265 seconds]
dieggsy has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
FreeBirdLjj has joined #lisp
jack_rabbit has joined #lisp
heurist` has joined #lisp
pmc_ has quit [Quit: Leaving]
heurist has quit [Ping timeout: 264 seconds]
wxie has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
Chream_2 has joined #lisp
smurfrobot has joined #lisp
Chream_ has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 248 seconds]
fittestbits has quit [Quit: Leaving.]
fittestbits1 has joined #lisp
Chream_ has joined #lisp
Chream_2 has quit [Ping timeout: 240 seconds]
JuanDaugherty has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
Chream_2 has joined #lisp
<JuanDaugherty>
i don't get the point of the debian distribution of slime
eschatologist has quit [Ping timeout: 264 seconds]
eschatologist has joined #lisp
Chream_ has quit [Ping timeout: 268 seconds]
Chream_2 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
dieggsy has quit [Ping timeout: 276 seconds]
Chream_ has joined #lisp
Rawriful has quit [Quit: WeeChat 1.4]
python476 has joined #lisp
smurfrobot has joined #lisp
python476 has quit [Remote host closed the connection]
python476 has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
Chream_2 has joined #lisp
Chream_ has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Chream_ has joined #lisp
Chream_2 has quit [Ping timeout: 255 seconds]
dieggsy has joined #lisp
FreeBirdLjj has joined #lisp
markong has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #lisp
Arcaelyx has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
smurfrobot has quit [Remote host closed the connection]
iqubic has joined #lisp
arescorpio has joined #lisp
whoman has joined #lisp
FreeBirdLjj has joined #lisp
wxie has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
asarch has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #lisp
marusich has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
Arcaelyx_ has joined #lisp
Arcaelyx has quit [Ping timeout: 252 seconds]
zooey has quit [Ping timeout: 255 seconds]
d4ryus1 has joined #lisp
zooey has joined #lisp
nowhereman_ has joined #lisp
Oladon has joined #lisp
smurfrobot has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
d4ryus has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
<iqubic>
Why is this channel so quiet. Are people out partying on Friday night?
<asarch>
Can you define a new function and then, immediately, call it?
<White_Flame>
party like you're living a jargon file entry!
damke has quit [Ping timeout: 264 seconds]
<White_Flame>
asarch: yes
<asarch>
How?
<White_Flame>
defining a function mutates the current Lisp image
<White_Flame>
(defun foo (x) (+ x 3))
smurfrobot has quit [Ping timeout: 240 seconds]
<White_Flame>
(foo 3) => 6
<JuanDaugherty>
asarch yeah of course
<White_Flame>
or, if you mean an anonymous function, for some reason?
FreeBirdLjj has joined #lisp
<JuanDaugherty>
it's the essential nature of lisp
<White_Flame>
((lambda (x) (+ x 3)) 3)
<White_Flame>
although that's equivalent to (+ 3 3), so having a function there that's called doesn't make a lot of sense
<JuanDaugherty>
it might not be the fastest version though
<asarch>
((DEFUN FOO () (FORMAT T "Hello, world!"))?
* JuanDaugherty
facepalms
<White_Flame>
asarch: you can either evaluated (defun foo ...) right in the REPL, or you could edit a source code file by inserting that DEFUN with emacs/SLIME and load it in. Both methods will immediately have your function available to call.
<White_Flame>
asarch: you have 1 extra layer of parens
<asarch>
I can (defun foo () (format t "Hello, world!"))
<asarch>
And then just (foo)
<White_Flame>
and you don't need to type in uppercase. The reader auto-upcases text internally when reading symbols
<White_Flame>
yes
lerax has quit [Ping timeout: 252 seconds]
<asarch>
Sorry, that was a paste from SLIME
<asarch>
Sorry
<White_Flame>
ah, k
<asarch>
How could I do the same on a single line. Declare and call the new function
<White_Flame>
there's also the #clnoobs channel, which might be more appropriate for this level of question
<White_Flame>
(defun foo () ...) (foo) ?
<White_Flame>
lisp doesn't care much about whitespace
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<asarch>
I thought I could something a la JavaScript: (function foo () {...})();
<asarch>
Thank you White_Flame
<asarch>
Thank you very much :-)
<asarch>
I think I will go to that channel for my next question
<White_Flame>
asarch: that's the equivalent of ((lambda ...) ..params)
<White_Flame>
which is kidn of pointless
<White_Flame>
the only reason people do that in JS is so that their "var"s are contained
<White_Flame>
so it's a hack to get around JS weaknesses
<asarch>
I know, but if I declare a lambda function, how could I call it later?
<White_Flame>
you can just do a plain (let ((a 1) (b 2)) (format t "~a ~a~%" a b)) to scope in Lisp
<White_Flame>
defun
<White_Flame>
lambda is just an anonymous function
<White_Flame>
defun is basically lambda + put it in a symbol's function slot
<White_Flame>
sort of similar to var foo = function ...; vs function foo () ...
<asarch>
Because I could do in the first 5 lines of my code: (defun foo () ...) (foo), and then later in the line #1000 recall foo: (foo)
<White_Flame>
line numbers don't matter
<asarch>
How could I recall a lambda function in the line # 1000
<White_Flame>
you can call (foo) after (defun foo ...) has been executed, and you can manually mung with ordering
<asarch>
?
<White_Flame>
JS is a very, very weak language when it comes to scoping & controlling source code ordering
<White_Flame>
so you really don't have to worry about a ton of stuff that JS makes you worry about
<White_Flame>
(of course, later versions of JS are cleaning things up, but your examples are kinda oldschool JS)_
<White_Flame>
so a lot of "How do I do <some JS thing>?" will be answered with "You don't need to"
<asarch>
That was my second question :'-(
<asarch>
How could I store (defun foo () (...)) into a variable?
<White_Flame>
I'm answering in #clnoobs
fikka has quit [Ping timeout: 248 seconds]
<asarch>
Thank you
<asarch>
I'll go that place
asarch has left #lisp ["Leaving"]
wxie has joined #lisp
smurfrobot has joined #lisp
nowhereman_ has quit [Ping timeout: 248 seconds]
nowhereman_ has joined #lisp
<iqubic>
Should I join #clnoobs?
chenbin has joined #lisp
<stacksmith>
If you have to ask, YES!
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
damke has joined #lisp
smurfrobot has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
chenbin has quit [Remote host closed the connection]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chenbin has joined #lisp
daniel-s has joined #lisp
FreeBirdLjj has joined #lisp
fikka has joined #lisp
Cymew has joined #lisp
SaganMan has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
python476 has quit [Ping timeout: 240 seconds]
<k-hos>
what if I ask if you should join #clnoobs
Cymew has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
<Bike>
you don't have to ask that
<k-hos>
:>
Cymew has joined #lisp
<stacksmith>
It's what's known as a 'rhetorical question'.
chenbin has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 264 seconds]
chenbin` has joined #lisp
Cymew has joined #lisp
FreeBirdLjj has joined #lisp
chenbin` has quit [Remote host closed the connection]
milanj has quit [Quit: This computer has gone to sleep]
Cymew has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
safe has joined #lisp
FreeBirdLjj has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
iqubic has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
deng_cn has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<JuanDaugherty>
on the debian vs slime, the time came when all the debian cl things were completely removed
pjb has quit [Ping timeout: 255 seconds]
<SaganMan>
Good Morning!
krwq has joined #lisp
<krwq>
hey, why does this code produce warning that *foo* is undefined? (defun foo () (defvar *foo* 0) (incf *foo*))
<Bike>
the defvar is not run at compile time, so the compiler doesn't know that *foo* is special as it compiles the incf
<Bike>
in general, you should not have defvar inside a function body
<krwq>
Bike: I need construct like this for a macro
<krwq>
Bike: so that I can define a lock which is used only in one place
<Bike>
having a macro expand into a defvar is different
<krwq>
Bike: how do I approach this then?
<Bike>
if you need a special variable that's only used in one place, you don't need to use defvar, either
<Bike>
i don't understand your problem well enough to give you an approach
<krwq>
Bike: how do I do it?
<Bike>
could you explain exactly what you'd like to do?
<krwq>
scenario is following: I want a macro which makes a non complicated place thread safe, i.e.: (defun pformat (control-string &rest args)
<krwq>
(apply #'format t control-string args)))
<krwq>
(with-single-use-lock
<krwq>
I'm currently implementing this as: (defmacro with-single-use-lock (&body body)
<krwq>
(bt:with-lock-held (,lock)
<krwq>
(defvar ,lock (bt:make-lock))
<krwq>
`(progn
<krwq>
(with-gensyms (lock)
<krwq>
,@body))))
<Bike>
mm, so you want one lock per call site
<krwq>
yes, I'd prefer not to do anything like pdefun wrapped with let
<krwq>
I mean pdefun doing something like (let (defun ...))
<Bike>
alright, for that i think you should do something a bit unusual
schoppenhauer has quit [Ping timeout: 276 seconds]
<iqubic>
I have a few questions about slime. There are a few places where the docs are woefully inadequete. 1) What does the STRING argument do in (slime-eval-print-last-expression STRING) and 2) What does the PREFIX argument do in (slime-eval-last-expression-in-repl PREFIX). I'm trying to call these from my init.el, but I can't because these are required arguments.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<drmeister>
If I have three lists '(a b c) '(d e) '(f g) and I want every combination of the first, second and third lists - what is that called? Outer-product? Cross-product? Is there a CL function to do this?
<drmeister>
I think I ask this every six months and then forget the answer.
<drmeister>
(sigh)
FreeBirdLjj has joined #lisp
fikka has joined #lisp
<beach>
I don't know what it is called, and there is no standard function to do that. You will have to write it yourself.
eschatologist has quit [Ping timeout: 264 seconds]
dddddd has quit [Remote host closed the connection]
Arathnim has quit [Quit: leaving]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Pixel_Outlaw has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
damke has joined #lisp
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
panji has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
asarch has joined #lisp
<asarch>
In PCL, chapter 8 there is a paragraph: "Common Lisp doesn't support macros so every Lisp programmer can create their own variants of standard control constructs any more than C supports functions so every C programmer can write trivial variants of the functions in the C standard library." Is it correct?
<asarch>
"Common Lisp doesn't support macros..." <- ?
asarch has quit [Quit: Leaving]
Devon has joined #lisp
FreeBirdLjj has joined #lisp
fikka has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
JohnnyL has joined #lisp
<stacksmith>
Nah, it's like "I don't work hard so my kids will waste my money" - does not mean that I don't work hard. Just unfortunate turn of phrase.
<stacksmith>
The point is that although you could change standard constructs, it does not mean that that's what macros are for.
terpri has quit [Ping timeout: 248 seconds]
<White_Flame>
I don't post information on #lisp so that people who already left miss it
<White_Flame>
my protip is to always use tab-completion on nicks to ensure they're still on
<stacksmith>
I don't crap in my pants just to make a point!
ahungry has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
borei has quit [Ping timeout: 240 seconds]
JuanDaugherty has quit [Ping timeout: 256 seconds]
Devon has quit [Ping timeout: 240 seconds]
vlatkoB has joined #lisp
Arcaelyx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<panji>
My understanding about metaclass is not that good, so i always wondering when the right time to use metaclass?
<panji>
Until now, I don't understand what kind of case need using metaclass? :(
JohnnyL has quit [Quit: leaving]
BitPuffin has joined #lisp
ThUnD3R256 has joined #lisp
thinkpad has quit [Quit: lawl]
FreeBirdLjj has joined #lisp
ThUnD3R256 has left #lisp ["Leaving"]
thinkpad has joined #lisp
ThUnD3R256 has joined #lisp
ThUnD3R257 has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ThUnD3R257 has quit [Remote host closed the connection]
<|3b|>
panji: using funcallable-standard-class gives you an object you could pass to things expecting a function
ThUnD3R256 has quit [Client Quit]
ThUnD3R256 has joined #lisp
krwq has joined #lisp
<panji>
same thing like method right? eql-specializer? or it is different?
<|3b|>
not really
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<panji>
hmm still confusing.
<|3b|>
for example if you wanted something you could pass to mapcar, you could use a funcallable instance
<|3b|>
more like a closure than a method
<|3b|>
also, if that is your code, don't use EQ to compare numbers
<jackdaniel>
funcallable instances are a cool concept, because you can have slots and stuff in them, also you may specialize on them if you subclass this metaclass
ThUnD3R256 has quit [Client Quit]
<|3b|>
well, even if it isn't your code, don't do that :)
ThUnD3R256 has joined #lisp
Devon has joined #lisp
<panji>
ah, it is my code.. i just thing about eq when i wrote that,
<panji>
what should i use then?
<|3b|>
EQ is specified to not work on numbers or characters, I would just always use EQL instead of EQ
<panji>
noted. :)
<jackdaniel>
panji: if it's numbers, then = (and if its floats – <=)
<|3b|>
if you know it is numbers (and want error if it isn't), and might be different types of numbers, use =
ThUnD3R256 has quit [Client Quit]
ThUnD3R256 has joined #lisp
<|3b|>
(eql 1 1.0)=>NIL (= 1 1.0)=>T
<|3b|>
(eql 1 t)=>NIL (= 1 t)=>error
FreeBirdLjj has joined #lisp
Devon has quit [Ping timeout: 255 seconds]
<panji>
but if i want exact test, is it right to use eq?
<|3b|>
if you know you aren't comparing numbers or characters, it is OK to use EQ
<jackdaniel>
panji: no, because 1 is not necessarily eq to 1 (i.e it may be stored in the pointer - immediate type)
Kevslinger has quit [Quit: Connection closed for inactivity]
<panji>
oh, i see.. i thought value is always store in same pointer. my bad.
<|3b|>
and since that's the only difference between EQ and EQL, it is easier to just always use eql (other people disagree, and think you should use EQ if you know it is safe)
<jackdaniel>
it is nicely discussed in pcl, but the gist of it is what |3b| said
<|3b|>
the idea is that EQ compares "identity", but numbers don't have any specific "identity" in CL terms
<|3b|>
where "identity" usually translates to something like "pointer" at implementation level, and numbers might for example exist only in a register so have nothing to point at
FreeBirdLjj has quit [Ping timeout: 255 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
FreeBirdLjj has joined #lisp
Ven`` has joined #lisp
vtomole has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
safe has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #lisp
shrdlu68 has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
fikka has joined #lisp
schoppenhauer has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #lisp
vtomole has quit [Quit: Page closed]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
pjb has joined #lisp
pjb is now known as Guest22498
fikka has quit [Ping timeout: 240 seconds]
Guest22498 is now known as pjb`
fikka has joined #lisp
FreeBirdLjj has joined #lisp
pjb` is now known as pjb
schoppenhauer has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
DeadTrickster has quit [Remote host closed the connection]
manualcrank has quit [Quit: WeeChat 2.0.1]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
markong has joined #lisp
DeadTrickster has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
shka has joined #lisp
nirved has joined #lisp
FreeBirdLjj has joined #lisp
earl-ducaine has quit [Remote host closed the connection]
Devon has joined #lisp
thinkpad has quit [Ping timeout: 276 seconds]
th1nkpad has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<panji>
|3b|: I added more test about mapcar you talk earlier (in https://gist.github.com/epanji/c93fea8ed9f7adaafb0a782f877dcc1b), and i still can't satisfy my curiosity about advantage using funcallable versus method. Maybe I should play around with it more often. :)
deng_cn has quit [Read error: Connection reset by peer]
th1nkpad is now known as thinkpad
<|3b|>
panji: i mean as first argument of mapcar
<|3b|>
the function
Devon has quit [Ping timeout: 256 seconds]
deng_cn has joined #lisp
fikka has joined #lisp
<panji>
Is funcallable instance can have parameters? i don't know about that.
mishoo_ has joined #lisp
wxie has quit [Quit: AtomicIRC: The nuclear option.]
<beach>
panji: Yes, it is a function, but it can have other slots just like a standard object.
<panji>
|3b|: maybe i just don't know the right case to implement what you means. Anyway thanks. :)
fikka has quit [Ping timeout: 260 seconds]
wigust has joined #lisp
<beach>
panji: You can't pass a method to functions like MAPCAR.
<p_l>
beach: a specific method, yes. But GFs are fine IIRC?
<panji>
beach: what about this? (mapcar #'method instances) is it allowed?
<beach>
What is #'method?
<beach>
Sure, if you have a function that is named METHOD, you could do that.
DeadTrickster has quit [Read error: Connection reset by peer]
<beach>
But if by #'method you mean a method, then no. You can't pass a method to function like MAPCAR.
<panji>
beach: in my case i create method named calculate in the link above.
<p_l>
... can you even get a reference to a method to pass it there?... wait, yes, you can, through MOP...
<beach>
panji: When you do DEFMETHOD, unless you have an explicit DEFGENERIC for the same name, you implicitly create a generic function with the same name, and that generic function is what becomes the result of #'method.
DeadTrickster has joined #lisp
<beach>
er, I mean #'calculate.
<beach>
panji: So you are not passing a method to MAPCAR, you are passing a generic function named CALCULATE.
<panji>
beach: so, it is actually generic function. hmm... i see... noted
<beach>
Try typing #'calculate to the REPL and look at the result.
<beach>
panji: Do you take remarks on your code?
<panji>
beach: I don't understand remarks.
<beach>
Would you like me to tell you how I think your code could be improved?
<panji>
beach: yes.
fikka has joined #lisp
<beach>
It is better to use slot accessors than to use slot-value and with-slots. Accessors are generic functions so they can participate in a protocol, whereas slots are implementation details that should be hidden.
milanj has joined #lisp
<beach>
It would be simpler to use :INITFORM than :DEFAULT-INITARGS with the slots in AREA.
<beach>
If you want your code to be portable across implementations, you can use the system CLOSER-MOP rather than the implementation-specific sb-mop.
<beach>
These days, I :USE only the COMMON-LISP package. I use explicit package prefixes for other symbols. If you :USE packages that may evolve, such evolution may break your code in the future, because a new version of such a package might export a symbol with a name that you also need from a different package.
fikka has quit [Ping timeout: 240 seconds]
<panji>
beach: I know about closer-mop, but it is just experiment code, so i don't think about compatibility. Thanks.
thinkpad has quit [Ping timeout: 260 seconds]
ThUnD3R256 has quit [Read error: Connection reset by peer]
thinkpad has joined #lisp
pagnol has joined #lisp
fikka has joined #lisp
DeadTrickster has quit [Read error: Connection reset by peer]
jameser has joined #lisp
DeadTrickster has joined #lisp
<jackdaniel>
panji: experimenting based on good abstractions builds good habits
<jackdaniel>
(so it will be easier for you to pick c2mop when you use it in "real" code)
shifty has joined #lisp
wxie has joined #lisp
<panji>
jackdaniel: Ok. Thanks :)
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
krwq has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 265 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #lisp
jameser has quit [Client Quit]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
lnostdal has quit [Remote host closed the connection]
lnostdal has joined #lisp
jameser has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
damke has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Josh_2 has joined #lisp
thinkpad has quit [Quit: lawl]
shrdlu68 has quit [Ping timeout: 268 seconds]
JuanDaugherty has joined #lisp
thinkpad has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 248 seconds]
red-dot has joined #lisp
chrnybo has joined #lisp
Murii has joined #lisp
<Josh_2>
Is there a library that has bindings to Windows functions like mouse pointer position?
Tobbi has joined #lisp
<pjb>
Josh_2: just use CFFI to call directly MS-Windows API. It works nicely. Microsoft has a nice documentation website.
<Josh_2>
alrighty thanks. I thought that might be the case
<Josh_2>
I've never used CFFI so that'll be a learning experience
damke_ has joined #lisp
<Shinmera>
Josh_2: What do you want to do with the position?
<Josh_2>
Well I want to make some software that lets me share my mouse/keyboard across my Gentoo install and Windoge
raynold has quit [Quit: Connection closed for inactivity]
<Josh_2>
And use threading etc so that I can use it for my Uni coursework work
damke has quit [Ping timeout: 264 seconds]
Karl_Dscc has joined #lisp
<Josh_2>
Not sure if it is something that is going to be very difficult.
damke_ has quit [Ping timeout: 264 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
fikka has joined #lisp
random-nick has joined #lisp
panji has left #lisp [#lisp]
nika has quit [Quit: Leaving...]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<JuanDaugherty>
what's Windoge?
<Josh_2>
Windows
<JuanDaugherty>
ah
<JuanDaugherty>
well i essentially have tnat now. looking at a 36 desktop fvwm pager, don't have a dos vnc session right now
pjb has quit [Read error: Connection reset by peer]
<JuanDaugherty>
so if i used guacamole or any of a plethora of other things could share it with others in a browser
<JuanDaugherty>
and this is way way off topic
<JuanDaugherty>
as to whether there's a cl binding to whatever currently replaces win32, i would guess not but not with confidence
<JuanDaugherty>
i.e. not in the free lisps
<JuanDaugherty>
prolly a path to it though
<Josh_2>
vnc seems like a nice solution, although it seems more like X forwarding with SSH
<JuanDaugherty>
vnc is an X server but it does run on windows
<JuanDaugherty>
only the windows native gui is what that thing
<JuanDaugherty>
it used to be win32 and wouldn be surprised if it was win64 now but doubt that, again with little confidence
<JuanDaugherty>
50/50 it's win64
python476 has joined #lisp
<JuanDaugherty>
lisp wants to be on unix
terrorjack has quit []
<JuanDaugherty>
the free ones anyway
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
terrorjack has joined #lisp
<JuanDaugherty>
doesn't slime show up on the main menu bar anymore? it executes fine but there's no slime menu when I have a lisp file open
<ludston>
JaunDaugherty: It shows up for me
<ludston>
JuanDaugherty: You have a hard name to spell
<JuanDaugherty>
ah good, just wanted to know if i needed to adjust expectations
<JuanDaugherty>
most people use disambig
<JuanDaugherty>
or nick completion igess would be better term
<JuanDaugherty>
if your client supports it
<JuanDaugherty>
and yeah prelude d un midi une jaun is common
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
wxie has joined #lisp
Rawriful has joined #lisp
* JuanDaugherty
*is what that thing is
EvW has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
igemnace has joined #lisp
pjb has joined #lisp
Murii has quit [Ping timeout: 260 seconds]
damke_ has quit [Ping timeout: 264 seconds]
damke has joined #lisp
fikka has joined #lisp
orivej has joined #lisp
rippa has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
varjag has joined #lisp
smokeink has quit [Ping timeout: 264 seconds]
kobain has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Bike has joined #lisp
dieggsy has joined #lisp
dddddd has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
fikka has joined #lisp
igemnace has quit [Ping timeout: 256 seconds]
antgreen has joined #lisp
igemnace has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
knicklux has joined #lisp
zooey has quit [Ping timeout: 255 seconds]
zooey has joined #lisp
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
antgreen has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
orivej has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
BitPuffin has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
fikka has joined #lisp
deng_cn has joined #lisp
shifty has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
asarch has joined #lisp
josemanuel has joined #lisp
moei has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
igemnace has quit [Ping timeout: 256 seconds]
milanj has quit [Quit: This computer has gone to sleep]
igemnace has joined #lisp
Ven`` has joined #lisp
attila_lendvai has joined #lisp
Murii has joined #lisp
wxie has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 240 seconds]
Baggers has joined #lisp
Baggers has quit [Client Quit]
fikka has joined #lisp
milanj has joined #lisp
lnostdal has quit [Ping timeout: 255 seconds]
hvxgr has quit [Ping timeout: 264 seconds]
solyd has joined #lisp
solyd has quit [Client Quit]
lnostdal has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
schoppenhauer has quit [Ping timeout: 276 seconds]
schoppenhauer has joined #lisp
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
smurfrobot has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
Ukari has joined #lisp
antgreen has joined #lisp
EvW1 has joined #lisp
pagnol has quit [Ping timeout: 252 seconds]
_mjl has quit [Quit: WeeChat 1.9.1]
milanj has quit [Quit: This computer has gone to sleep]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #lisp
Ven`` has quit [Client Quit]
pagnol has joined #lisp
pagnol has quit [Quit: Ex-Chat]
Ven`` has joined #lisp
lnostdal_ has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
asarch has quit [Quit: Leaving]
lnostdal has quit [Ping timeout: 255 seconds]
rumbler31 has joined #lisp
fikka has joined #lisp
_mjl has joined #lisp
lnostdal_ has quit [Ping timeout: 255 seconds]
makomo has joined #lisp
drewc_ is now known as drewc
random-nick has quit [Quit: quit]
random-nick has joined #lisp
lnostdal_ has joined #lisp
sunwukong has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
nosefouratyou has joined #lisp
AxelAlex has joined #lisp
iqubic has quit [Remote host closed the connection]
JohnnyL has joined #lisp
makomo has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
Ukari has quit [Remote host closed the connection]
orivej has joined #lisp
Oladon has joined #lisp
nowhereman_ has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
Devon has joined #lisp
Tobbi has quit [Remote host closed the connection]
kobain has quit [Ping timeout: 256 seconds]
Tobbi has joined #lisp
aindilis has quit [Ping timeout: 255 seconds]
ante_ has joined #lisp
ante_ is now known as Cymew
yates has joined #lisp
knicklux has quit [Ping timeout: 248 seconds]
yates has left #lisp ["rcirc on GNU Emacs 25.3.1"]
Arcaelyx has joined #lisp
smurfrobot has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<mfiano>
drmeister: Hello
smurfrobot has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 248 seconds]
safe has joined #lisp
<mfiano>
drmeister: It depends, really. Do you mean combinations or permutations? Are repetitions allowed? Are the inputs always guaranteed to be "sets"? etc
<mfiano>
drmeister: Depending on your answers, it can be a Cartesian product, combination, permutation, permutation with repetitions (different), the "Power set", etc
dddddd has quit [Remote host closed the connection]
JuanDaugherty has quit [Ping timeout: 255 seconds]
makomo has quit [Quit: WeeChat 1.9.1]
attila_lendvai has quit [Quit: Leaving.]
Arathnim has joined #lisp
python476 has quit [Read error: Connection reset by peer]
ckonstanski has quit [Remote host closed the connection]
Cymew has quit [Quit: Konversation terminated!]
pseudonymous_ has joined #lisp
nowhere_man has joined #lisp
nowhereman_ has quit [Ping timeout: 240 seconds]
AxelAlex has quit [Ping timeout: 268 seconds]
JuanDaugherty has joined #lisp
fikka has joined #lisp
makomo has joined #lisp
EvW1 has quit [Ping timeout: 255 seconds]
mlf has joined #lisp
mishoo__ has joined #lisp
mishoo_ has quit [Ping timeout: 256 seconds]
jonh has left #lisp ["WeeChat 0.4.2"]
fikka has quit [Ping timeout: 260 seconds]
knicklux has joined #lisp
python476 has joined #lisp
terpri has joined #lisp
fikka has joined #lisp
smurfrobot has joined #lisp
raynold has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
milanj has joined #lisp
richardjdare has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fikka has quit [Ping timeout: 268 seconds]
ThUnD3R256 has joined #lisp
makomo has quit [Ping timeout: 276 seconds]
ThUnD3R256 has quit [Read error: Connection reset by peer]
ThUnD3R256 has joined #lisp
AxelAlex has joined #lisp
fikka has joined #lisp
AxelAlex has quit [Ping timeout: 248 seconds]
moonfght has joined #lisp
smasta has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
moon_ has joined #lisp
moonfght has quit [Remote host closed the connection]
EvW has joined #lisp
Devon has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
knicklux_ has joined #lisp
zotan has quit [Ping timeout: 240 seconds]
d4ryus1 is now known as d4ryus
attila_lendvai has quit [Ping timeout: 268 seconds]
zotan has joined #lisp
hiroaki has joined #lisp
elazul has joined #lisp
Devon has joined #lisp
vlatkoB has quit [Remote host closed the connection]
fikka has joined #lisp
hiroaki has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
aindilis has joined #lisp
Devon has quit [Ping timeout: 264 seconds]
moon_ has quit [Remote host closed the connection]
Baggers has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Pixel_Outlaw has joined #lisp
megeve has joined #lisp
makomo has joined #lisp
BitPuffin has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has quit [Client Quit]
drcode has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
void_gazer has joined #lisp
<drmeister>
Hi mfiano - thank you - it was the cartesian product that I was looking for. This function does the job nicely.
<Bike>
i wonder why the difference... i suppose because those ones can reuse the sequence
* sjl
wishes those were called do-* instead of map-*
<Bike>
but most do- things are macxros. how terrible
<sjl>
true. not sure what a better naming scheme would be
arbv has quit [Ping timeout: 255 seconds]
<phoe>
a better naming scheme would be a Lisp-2 instead of Lisp-1
<sjl>
but it always confuses me that some of the map-* ones collect the results of the function you pass and others dont
<Bike>
it's confusing, yes
<sjl>
well, map-permutations returns nil, map-combinations returns the sequence you pass it, and map-product returns a list of the results
arbv has joined #lisp
<phoe>
wtf
<phoe>
why does the first one return nil
eug_venalainen has quit [Read error: Connection reset by peer]
<shrdlu68>
It doesn't collect the output.
<phoe>
neither does MAPC, and it returns its input
<random-nick>
maybe they should be called mapc-*
<sjl>
map-derangements returns the original sequence as well
<sjl>
oh fun, map-permutations sometimes returns nil only if you permute the entire sequence, but returns the original sequence if you permute a subsequence of it
<sjl>
s/sometimes //
nowhereman_ has joined #lisp
fikka has joined #lisp
<phoe>
why
<sjl>
hah, if you pass it a one-element sequence though, it returns the result of your function :)
<sjl>
because the return is just an implementation detail right now
<sjl>
it depends on which branch you go down
<phoe>
So it isn't mean to return anything meaningful, correct?
<sjl>
I believe so
nowhere_man has quit [Ping timeout: 265 seconds]
Karl_Dscc has quit [Remote host closed the connection]
<phoe>
should be specified in the docstring then
<phoe>
attila_lendvai: what do you think?
fikka has quit [Ping timeout: 248 seconds]
megeve has quit []
<sjl>
patch sent, maybe it'll get merged and be slightly less confusing now
<stacksmith>
Could someone clarify CLHS eval description "The evaluator expands macro calls as if through the use of macroexpand-1"... Why is it limited to 1 level of expansion?
Ven`` has joined #lisp
<Bike>
because the algorithm is more complicated. for example, it can do compiler macroexpansion too
<stacksmith>
it being what?
kolko has quit [Ping timeout: 256 seconds]
<Bike>
the evaluator
<phoe>
can you do define-compiler-macro for macros?
<Bike>
it might also be emphasizing that *macroexpand-hook* is still used, and stuff
<Bike>
phoe: yes
<phoe>
or would it be sorta pointless?
<phoe>
oh, hm
<Bike>
i don't know why you would, but you can
ryanbw has quit [Ping timeout: 240 seconds]
<stacksmith>
a compiler macro for macro-function... interesting.
shka has joined #lisp
<stacksmith>
However, if eval is limited to 1 level of macroexpansion, would it not behave differently from compiling identical code?
<Bike>
it's not limited
<phoe>
stacksmith: remember that eval normally operates recursively
bigfondue has quit [Ping timeout: 252 seconds]
<Bike>
it says it works like macroexpand-1 does, but it doesn't say it can't do that more than once
<phoe>
if you have (+ (foo) (bar)) then eval first starts evaluating the whole call, but then since it's a function call, it must evaluate its arguments
<phoe>
and if (foo) and (bar) are macros then they're expanded
<phoe>
otherwise eval wouldn't work
<stacksmith>
Does eval invoke eval on non-self-evaluating forms?
<phoe>
no
<phoe>
oh wait
<Bike>
well, it might?
<phoe>
what do you mean, non-self-evaluating forms?
DeadTrickster has quit [*.net *.split]
antgreen has quit [*.net *.split]
scymtym has quit [*.net *.split]
kini has quit [*.net *.split]
mfiano has quit [*.net *.split]
msb has quit [*.net *.split]
jackdaniel has quit [*.net *.split]
Posterdati has quit [*.net *.split]
Patzy has quit [*.net *.split]
Walex has quit [*.net *.split]
em has quit [*.net *.split]
joga has quit [*.net *.split]
lemoinem has quit [*.net *.split]
sword has quit [*.net *.split]
fdfdf has quit [*.net *.split]
borodust has quit [*.net *.split]
vsync has quit [*.net *.split]
Aritheanie has quit [*.net *.split]
gingerale has quit [*.net *.split]
Murii has quit [*.net *.split]
dieggsy has quit [*.net *.split]
kajo has quit [*.net *.split]
dirb has quit [*.net *.split]
mhitchman[m] has quit [*.net *.split]
ben3 has quit [*.net *.split]
Firedancer has quit [*.net *.split]
pmden has quit [*.net *.split]
reu has quit [*.net *.split]
wladz_ has quit [*.net *.split]
parseval has quit [*.net *.split]
galdor has quit [*.net *.split]
<Bike>
not really specified whether it calls itself recursively, or something else, or what
<Bike>
it's irrelevant, as long as the behavior is as specified there's no problem
rippa has quit [*.net *.split]
splittist has quit [*.net *.split]
Jach[m] has quit [*.net *.split]
jibanes has quit [*.net *.split]
kozy has quit [*.net *.split]
ym has quit [*.net *.split]
johs has quit [*.net *.split]
bailon has quit [*.net *.split]
sigjuice has quit [*.net *.split]
mikaelj has quit [*.net *.split]
sshirokov has quit [*.net *.split]
sthalik has quit [*.net *.split]
Cthulhux has quit [*.net *.split]
deba5e12 has quit [*.net *.split]
<stacksmith>
phoe: CLHS 3.1.2.1.3 A form that is neither a symbol nor a cons is defined to be a self-evaluating object.
Ven`` has quit [Ping timeout: 240 seconds]
saki has quit [Ping timeout: 260 seconds]
<stacksmith>
Bike: why is it relevant to mention that eval acts as if it does a macroexpand-1?
<Bike>
macroexpand hook and stuff, i guess
<Bike>
doesn't seem like an important thing to worry about, really
<stacksmith>
BIke: yes. Thanks
<stacksmith>
Bike: not important at all. I just don't like not understanding things.
<Bike>
reasonable
Jach[m] has joined #lisp
kozy has joined #lisp
rippa has joined #lisp
splittist has joined #lisp
sigjuice has joined #lisp
ym has joined #lisp
sshirokov has joined #lisp
bailon has joined #lisp
jibanes has joined #lisp
Cthulhux has joined #lisp
mikaelj has joined #lisp
johs has joined #lisp
sthalik has joined #lisp
deba5e12 has joined #lisp
<stacksmith>
Sometimes not understanding seemingly trivial things leads to terrible problems in the 'internal model' of how things work.
<phoe>
stacksmith: oh, right
<Bike>
well, as concerns your comment about compile/eval divergences, those are pretty strictly laid out
<phoe>
I have no idea. It wouldn't affect them anyway.
Ven`` has joined #lisp
shrdlu68 has quit [Ping timeout: 276 seconds]
<phoe>
You can't define any macros on self-evaluating objects, hence evaluating them can have no side effects.
fikka has quit [Ping timeout: 268 seconds]
<phoe>
So even if EVAL is called on them, you can't really notice it.
<stacksmith>
phoe: got it.
<phoe>
So theoretically an implementation would be allowed to optimize away such calls when it notices that it would have no effect anyway.
<phoe>
Or, for simplicity, it could call eval on them anyway just to have it immediately return.
<phoe>
Dunno.
hvxgr has joined #lisp
msb has joined #lisp
kini has joined #lisp
drcode has quit [Ping timeout: 240 seconds]
ryanbw has joined #lisp
<stacksmith>
Anyway, thanks for your answers.
antgreen has joined #lisp
DeadTrickster has joined #lisp
mhitchman[m] has joined #lisp
Murii has joined #lisp
scymtym has joined #lisp
ben3 has joined #lisp
Posterdati has joined #lisp
mfiano has joined #lisp
fdfdf has joined #lisp
dieggsy has joined #lisp
dirb has joined #lisp
jackdaniel has joined #lisp
lemoinem has joined #lisp
Firedancer has joined #lisp
Patzy has joined #lisp
kajo has joined #lisp
sword has joined #lisp
Walex has joined #lisp
reu has joined #lisp
pmden has joined #lisp
joga has joined #lisp
borodust has joined #lisp
vsync has joined #lisp
gingerale has joined #lisp
wladz_ has joined #lisp
galdor has joined #lisp
parseval has joined #lisp
em has joined #lisp
Aritheanie has joined #lisp
cryptomarauder has quit [Ping timeout: 240 seconds]
ArthurAGleckler[ has quit [Ping timeout: 240 seconds]
equalunique[m] has quit [Ping timeout: 240 seconds]
RichardPaulBck[m has quit [Ping timeout: 240 seconds]
plll[m] has quit [Ping timeout: 252 seconds]
kfdenden[m] has quit [Ping timeout: 248 seconds]
dirb has quit [Ping timeout: 255 seconds]
mhitchman[m] has quit [Ping timeout: 255 seconds]
Jach[m] has quit [Ping timeout: 256 seconds]
CharlieBrown has quit [Ping timeout: 260 seconds]
katco[m] has quit [Ping timeout: 260 seconds]
kammd[m] has quit [Ping timeout: 260 seconds]
hiq[m] has quit [Ping timeout: 276 seconds]
hdurer[m] has quit [Ping timeout: 276 seconds]
saki has joined #lisp
makomo_ has joined #lisp
fikka has joined #lisp
JuanDaugherty has joined #lisp
JuanDaugherty has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 264 seconds]
attila_lendvai has quit [Quit: Leaving.]
fikka has quit [Quit: leaving]
fikka has joined #lisp
bigfondue has joined #lisp
<phoe>
I just imagined the ability to define macros on self-evaluating objects
<phoe>
every time you evaluate the number 42, a random file is deleted on your computer as a side effect
<phoe>
this idea gives me the creeps
<Bike>
mh, make-load-form is a bit like that.
<Bike>
though not for standard things like numbers.
<phoe>
yep
<stacksmith>
Here is another one: CLHS 3.4.4.1 Destructuring lambda-lists starts with "Anywhere in a macro lambda list where a parameter name can appear, and where ordinary lambda list syntax (as described in Section 3.4.1 (Ordinary Lambda Lists)) does not otherwise allow a list, a destructuring lambda list can appear in place of the parameter name"... Does this imply that &rest parameter may be a destructuring lambda-list?
<Bike>
yes
<Bike>
it is rare to do, of course
sunwukong has quit [Ping timeout: 256 seconds]
<stacksmith>
I don't think I've ever encountered it... Is it any different from using &whole and destructuring in required parameters?
<stacksmith>
Hmm. Forget &whole, just destructuring in required parameters?
<Bike>
well, it would deconstruct the argument list itself, i suppose
eschatologist has quit [Ping timeout: 264 seconds]
pseudonymous_ has quit [Quit: Leaving]
<stacksmith>
Bike: example: (defmacro foo (a &rest (b c))) as opposed to (defmacro bar (a (b c)))? Is there any difference?
<Bike>
oh, yes
eschatologist has joined #lisp
<Bike>
(foo 1 2 3) is valid for the first but not the second, (foo 1 (2 3)) is valid for the second but not the first
<Bike>
it's the rest LIST being destructured, see
<stacksmith>
(defmacro foo (a &rest ((b c)))) as opposed to (defmacro bar (a (b c))) then. I think I see.
<Bike>
you could understand them as (defmacro foo (a &rest s) (destructuring-bind (b c) s ...)) and (defmacro foo (a s) (destructuring-bind (b c) s ...))
porky11 has joined #lisp
jmercouris has joined #lisp
<stacksmith>
What about &whole?
<Bike>
What about it?
<stacksmith>
Can it destructure?
<Bike>
I guess so.
<stacksmith>
&environment?
<Bike>
oh, actually, whole and rest are specifically laid out
<Bike>
environment... i suppose cannot be destructured.
Petit_Dejeuner has quit [Ping timeout: 240 seconds]
<Bike>
what the environment object is is a mystery, so it couldn't reasonably be destructured.
<stacksmith>
"&environment is followed by a single variable..." Forgive my ignorance, but what does the environment look like? Is it a list?
<stacksmith>
You are way ahead
<Bike>
it is a mystery. you, the programmer, cannot manipulate it
<Bike>
the implementation is allowed to have environment objects be whatever they want
<Bike>
the only thing programmers can do with them is pass them to functions (e.g. macroexpand-1)
<stacksmith>
So it's an opaque object you can pass
<Bike>
yes.
<phoe>
yes
<stacksmith>
Damn, you got me again.
<Bike>
as examples, on sbcl it's a structure object (so it couldn't be destructured), while on ecl last i checked it's an alist.
<Bike>
messing with them is messing with internals.
<Bike>
in fact, the standard goes so far as to give them dynamic extent, meaning that it's not allowed to keep them after the macro is done expanding.
<phoe>
and you can't return them because of this
<stacksmith>
Interesting. I think that covers all lambda-list-keywords that have no init-forms...
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phoe>
not really
<stacksmith>
?
<phoe>
they're lexical by default I think
<phoe>
where environments have dynamic scope
<Bike>
huh?
<phoe>
wait
<phoe>
I am confusing things
<phoe>
I should go to sleep instead of confusing things
<Bike>
good night
<stacksmith>
72 hours is my limit
<stacksmith>
Anyway - thanks again.
random-nick has quit [Read error: Connection reset by peer]
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 264 seconds]
hhdave_ is now known as hhdave
Murii has quit [Quit: WeeChat 1.4]
aindilis has quit [Remote host closed the connection]
<stacksmith>
Bike: last question on the topic... Is (lambda foo (&rest rest &key a b c)) identical to (lambda (bar &rest (&key a b c))?
<Bike>
you can't destructure in an ordinary lambda list.
<stacksmith>
I mean in a macro. Let me try again (defmacro foo (&rest rest &key a b c)) vs (defmacro bar (&rest (&key a b c)))
<Bike>
well, the former binds a variable called 'rest', but otherwise i think they'd be the same.
<stacksmith>
right.
shka has quit [Ping timeout: 248 seconds]
aindilis has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Xal has joined #lisp
hhdave_ has joined #lisp
Ven`` has joined #lisp
<stacksmith>
Bah, apparently I am not done here... CHLS 3.4.4.1.2 : each element of &key may be a ."..or a list of a list of a keyword and a destructuring pattern, an optional initialization form, and an optional supplied-p variable.". In this context, what can a destructuring pattern be?
<stacksmith>
I am having trouble envisioning it... I've seen single symbols and assumed it was just a way to change the name of the binding inside...
<Bike>
well, like in the lambda list (a (&key x) &rest r) the (&key x) is a destructuring pattern.
<Josh_2>
I'm trying to read from /dev/mouse1 which is a 32bit integer (I believe) using read-line/read-byte doesn't work and I'm not sure how to specify 32 bit unsigned int as the type spec to (with-open-file ..
<stacksmith>
Could you give me an example of something more complicated than ..&key ((:x localx))
<Josh_2>
Also am doing it in Terminal which is no fun xD
<Bike>
stacksmith: &key ((:x (z w)))
<Bike>
by the way, if it's not clear, i've never seen any of this stuff you're asking about in real code
<stacksmith>
Josh_2 try (unsigned-byte 32)?
<Bike>
Josh_2: :element-type
EvW has quit [Remote host closed the connection]
<Josh_2>
yah I tried that :element-type '(unsigned-byte 32)
EvW has joined #lisp
<Josh_2>
" #<SB-SYS:FD-STREAM for "file /dev/mouse1" {100416FCE3}> is not a character input stream."
<Josh_2>
I am using read-line, I will try read-byte
<Bike>
oh, well, read-line isn't going to work with a byte stream.
<Bike>
you can use read-byte and read-sequence.
<Josh_2>
Okay read-byte is doing something
<stacksmith>
Bike: in your example, what does that mean? Does it mean that :x (1 2) is a valid argument that will bind z=1 and w=2?
<stacksmith>
Bike: that is incredible...I never thought of it. I am so happy I asked! Bike: I truly appreciate you putting up with my nonsense.
<Bike>
no problem
<Josh_2>
(loop :do .. should loop infinitely no?
<stacksmith>
Bike: Shouldn't it be (foo :x (1 2))
<Josh_2>
or (loop :do (read-byte stream))?
orivej has quit [Ping timeout: 256 seconds]
<Bike>
yes, mistpaste.
<Bike>
Josh_2: read-byte will signal an error on eof, but otherwise yeah.
varjag has quit [Ping timeout: 256 seconds]
<Josh_2>
hmm
<Josh_2>
I'm wondering why it isn't working... and I'm using the wrong device.
<Bike>
well, i don't know how /dev/mouse1 works, but it might not be an infinitely long file.
<Josh_2>
Well as you scroll it prints new, so when I cat /dev/mouse1 it appears to be infinite
<Josh_2>
mouse0 sorry
<stacksmith>
Josh_2: it is problematic to read from a device in terms of portability... You should look at evdev or something like that..
<Bike>
what if your mouse is still, though?
<Josh_2>
Okay I will
fuulispfuu has joined #lisp
<aeth>
Hmm... specialization-store inlining in SBCL only appears to work when either type declarations are used for a variable or THE is used in the call itself. No other thing seems to work, like THE in a LET variable definition or CHECK-TYPE of a variable before the function call, or just relying on type inference based on all of the type information being available because the make-foo is inline.
<stacksmith>
Josh_2: the name of the active mouse device may be just about anything..
<Josh_2>
Yep you are right.
<Bike>
aeth: obviously not. it's just a macro, it doesn't have access to type inference.
<stacksmith>
Josh_2: And the device may not be accessible unless you are a superuser...
<Josh_2>
Well I tried X but I need to get the raw mouse movement even if I am still moving the mouse against the edge of the screen
<aeth>
Bike: It doesn't have any access to type information unless made explicit, though?
<Bike>
right.
<Bike>
THE can be seen from the form. type declarations are stored in the environment, so it can get at those.
<Bike>
the other stuff you talk about is nothing anybody knows about at macroexpansion time.
<stacksmith>
Josh_2: my experience is: the lower you go into the OS expecting things to be simple, the more insane it gets. Keyboard and mouse drivers in linux are prime examples of absolute insanity.
hhdave has quit [Quit: hhdave]
<Josh_2>
yah :O is there an evdev library in CL?
smurfrobot has quit [Remote host closed the connection]
<stacksmith>
aeth: I am always bothered by things like (when (integerp q) (incf q)) and sbcl complains that it doesn't know the type of q...
<stacksmith>
Josh_2: are you sure there is no way to coax X into giving you the information?
varjag has joined #lisp
<aeth>
stacksmith: Integer issues are mainly because there are two very different kinds of integers, fixnum and bignum. And it can even go beyond that in implementations. You can e.g. store (unsigned-byte 64)s fine in arrays in SBCL even if they're larger than the fixnum size, and SBCL will handle them in an optimized way just like double-floats.
fuulispfuu has quit [Ping timeout: 260 seconds]
<stacksmith>
aeth: my example was unfortunate... pick a type that's not ambiguous...
<Bike>
it probably won't complain on single float or something
<Bike>
with fixnum itll still complain since it doesn't know if it has to drop to bignum arithmetic for the result
<Bike>
arithmetic is hard.
<stacksmith>
(and (symbolp foo) (member (the symbol foo) list)) required the...
<Bike>
ha? member?
<Bike>
what's the complete code?
<aeth>
Bike: The annoying thing about floats is if you have a typecase that includes short-float and long-float in addition to single-float and double-float (for completeness), SBCL will complain that the short-float and long-float are unreachable (because they're synonymous in SBCL)
<Bike>
yes, the float type collapsing is a bit difficult.
<aeth>
(Assuming you order them single-float double-float long-float short-float or something)
<Josh_2>
stacksmith: hmm I'm not sure, if I only needed a position then that would be fine, but I believe I need some sort of movement information straight from the mouse that I can translate into movement
knicklux has quit [Quit: Leaving]
varjag has quit [Ping timeout: 255 seconds]
knicklux_ has quit [Quit: Leaving]
<aeth>
s/synonymous/equivalent to single-float and double-float respectively/
<aeth>
(In case someone wants to nitpick, which is fairly common in IRC.)
<stacksmith>
Bike: that's pretty much verbatim... What is the problem?
<Bike>
well, i mean, i was wondering if i could try it myself locally.
<Bike>
and the problem is i'd expect sbcl to get that.
<stacksmith>
(defun bar (symbol list) (declare (optimize (speed 3) (safety 0) (debug 0))) (member symbol list))
<stacksmith>
; note: unable to
<stacksmith>
; (NOT NUMBER))
<stacksmith>
; can't tell whether the first argument is a (OR FIXNUM SINGLE-FLOAT
<stacksmith>
; due to type uncertainty:
<stacksmith>
; optimize
smurfrobot has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jmercouris>
stacksmith: use a pastebin
<stacksmith>
Darn, now it works. It was giving me problems earlier, deeper in code... Perhaps it was another issue...
<Bike>
Er, I don't understand. I get the note with that code, but if i have (and (symbolp symbol) (member symbol list)) it goes away.
<Bike>
Oh.
<stacksmith>
Let me look into that..
<jmercouris>
I'm thinking about breaking apart my GUI into a "native" application (e.g. cocoa with objective-c, gtk with c) that communicates via socket back and forth with a lisp core, is this a stupid, or a smart idea?
<Bike>
And yes, don't paste more than one line into irc at a time, please.
<jmercouris>
and if the idea is smart, is there a better form of IPC in Lisp than sockets (for some library or support reason)?
<Bike>
it's not my area, but i think sockets are usual. slime/swank use sockets, of course
<jmercouris>
I figured sockets were fine
kfdenden[m] has joined #lisp
Jach[m] has joined #lisp
CharlieBrown has joined #lisp
dirb has joined #lisp
mhitchman[m] has joined #lisp
equalunique[m] has joined #lisp
hdurer[m] has joined #lisp
cryptomarauder has joined #lisp
plll[m] has joined #lisp
ArthurAGleckler[ has joined #lisp
RichardPaulBck[m has joined #lisp
hiq[m] has joined #lisp
<jmercouris>
so thank you for confirming
katco[m] has joined #lisp
<jmercouris>
the big doubt I have is whether this idea will be smart or stupid in the long term as GUI changes will have to result in protocol extension etc
moei has quit [Quit: Leaving...]
<jmercouris>
and I guess my lisp core will have to exec the other program as a "backend"
<jmercouris>
and both the lisp core and the gui will have to act as client and server as events will need to propagate in both directions
<stacksmith>
Bike: it failed to optimize in my code, possibly because the value checked with symbolp is an accessor... I guess SBCL can't tell the type even though symbolp just got it.
<Shinmera>
jmercouris: What would be the benefit of this
dddddd has joined #lisp
<jmercouris>
Shinmera: I don't have to rely on implementation bindings to create interfaces, I can use any technology as long as it is capable of communicating via sockets
hhdave has joined #lisp
<jmercouris>
Shinmera: For example, in CCL, I can't use wkwebview because ffigen hasn't been updated to create new bindings for it yet, and thus I have to use an older version
<jmercouris>
or rather, a deprecated version, webview
<stacksmith>
Josh-2: unless you really need a stream of mouse data that's off-bounds, you could keep track of positions and figure out a derivative when it hits the edge. Perhaps that's enough?
<Shinmera>
jmercouris: I thought the point of your project was that it is in lisp
<Shinmera>
having 50% of it not lisp seems to defeat the point
<jmercouris>
Shinmera: Yeah, but why must the GUI itself be in Lisp?
<Shinmera>
not to mention that it would add a lot of complexity.
<jmercouris>
It would add a ton of complexity, that is for sure
<jmercouris>
I've been thinking about this for a couple months
<jmercouris>
but a crash in the GUI would not crash the lisp core
<jmercouris>
for example
eschatologist has quit [Ping timeout: 264 seconds]
<jmercouris>
All of the functionality would still be available in Lisp, just in some sort of adapter that connects via a Socket
<jmercouris>
We'd probably have some sort of next-gui object that we'd issue commands to, and recieve commands from, and none of the core would change
<Bike>
stacksmith: access...? so your code is different
<jmercouris>
Shinmera: Also, I think the ratio we'd have here is something more like 90-10. The GUI program would only need to be very simple
hhdave has quit [Client Quit]
richardjdare has quit [Quit: Leaving]
eschatologist has joined #lisp
nowhere_man has joined #lisp
<jmercouris>
Shinmera: also the point of the project is that it is extensible in lisp, not that it is in lisp. It could have been a c program like emacs :D
<jmercouris>
almost was
<jmercouris>
and of course that it is easily extensible
<jmercouris>
anyways, more to think about
<jmercouris>
goodnight
nowhereman_ has quit [Ping timeout: 260 seconds]
smurfrobot has quit [Remote host closed the connection]
nirved has quit [Quit: Leaving]
jmercouris has quit [Ping timeout: 260 seconds]
kundry_wag has quit [Remote host closed the connection]