rumbler31 has quit [Remote host closed the connection]
<aeth>
What I do is I create a struct with the desired type as the car slot type and (or that-struct-type null) as the cdr slot type. This has several drawbacks. For one, it's about a 30% speed penalty in SBCL and probably either worse performance and/or without the type guarantees in other implementations. Also, you lose the ability to use the list and sequence functions, and when you define your own versions they're not generic.
<aeth>
The advantage, though, is that I know it's a proper list that can only hold foos, and that check is (probably) O(1).
<aeth>
I could have a second version that is (or foo the-custom-struct-type null) in both the car and cdr for trees. Of course, then you lose the ability to quickly know if something is a proper list or not.
<oni-on-ion>
aeth: can be optional? ie. debug compile
<aeth>
oni-on-ion: I don't want it to be optional.
<aeth>
I iterate over it once, to load it. Performance doesn't matter. Making sure the user didn't pass in garbage does.
<oni-on-ion>
ok uh i just said that because i assumed performance mattered
<oni-on-ion>
not sure why you would mention "30% speed penalty" then ????
rozenglass has quit [Remote host closed the connection]
<aeth>
It is still a drawback
<aeth>
The performance penalty means I'd only ever use it in an interface, not internally.
<aeth>
i.e. to make sure that the correct data is passed in from the API
<oni-on-ion>
ok so it matters and doesnt matter
<oni-on-ion>
im going to assume caffeine
<aeth>
You can use types for performance and you can use types for correctness. This is a clear case, at least in its current CL implementation, where it's only for correctness, not for performance.
<oni-on-ion>
i dont feel that those are different unless there is an imperceivable and overarching design flaw
<oni-on-ion>
i was asking if it were possible to have that extra level of safety there to check and make sure on types of a list, optionally
<oni-on-ion>
but i will learn this another way
Oladon has quit [Quit: Leaving.]
<aeth>
You could do it by writing a macro that becomes either list or foo-list (and similarly car or foo-car, etc., for all list functions) based on a global flag. Probably not a good idea.
<oni-on-ion>
okay. i will leave good/bad as subjective or entirely context-dependant
<aeth>
You probably don't want two entirely different functions/macros (e.g. dolist vs. do-foo-list) running on two entirely different data structures that are supposed to behave the same way, one in development and one in production.
smokeink has joined #lisp
robotoad has quit [Max SendQ exceeded]
<jcowan>
Hence universal polymorphism in ML-family languages
noark9 has quit [Quit: noark9]
warweasle has joined #lisp
<oni-on-ion>
hmmm
<oni-on-ion>
jcowan: not in lisp/scheme? julia can
noark9 has joined #lisp
robotoad has joined #lisp
oni-on-ion has quit [Quit: WeeChat 1.9.1]
oni-on-ion has joined #lisp
noark9 has quit [Quit: noark9]
Essadon has quit [Quit: Qutting]
robotoad has quit [Max SendQ exceeded]
igemnace has joined #lisp
pierpal has joined #lisp
pierpal has quit [Client Quit]
pierpal has joined #lisp
robotoad has joined #lisp
rumbler31 has joined #lisp
robotoad has quit [Ping timeout: 246 seconds]
robotoad has joined #lisp
Roy_Fokker has quit [Quit: Leaving]
robotoad has quit [Quit: robotoad]
meepdeew has joined #lisp
arescorpio has joined #lisp
papachan has quit [Quit: WeeChat 2.2]
dddddd has quit [Remote host closed the connection]
esrse has joined #lisp
dented42 has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
kristof has joined #lisp
slyrus1 has joined #lisp
Kevslinger has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
eagleflo has quit [Ping timeout: 240 seconds]
eagleflo has joined #lisp
jonatan has quit [Ping timeout: 240 seconds]
jonatan has joined #lisp
zfree has quit [Quit: zfree]
zfree has joined #lisp
zfree has quit [Client Quit]
zfree has joined #lisp
Cthyga has joined #lisp
arescorpio has quit [Quit: Leaving.]
minion has quit [Remote host closed the connection]
specbot has quit [Write error: Broken pipe]
minion has joined #lisp
specbot has joined #lisp
ryan_vw has joined #lisp
adam4567 has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
robotoad has joined #lisp
Cthyga has quit [Quit: Leaving]
rumbler31 has quit [Remote host closed the connection]
<beach>
Good morning everyone!
<oni-on-ion>
good morning beach
hifitim has quit [Remote host closed the connection]
rumbler31 has joined #lisp
dale has quit [Quit: dale]
xkapastel has joined #lisp
<emaczen>
A CFFI pointer passed to a function just copies the address right?
<no-defun-allowed>
yes, it'd be the same address
patche has quit [Ping timeout: 245 seconds]
<emaczen>
is bt:make-thread using POSIX threads?
<kristof>
depends on the implementation
<kristof>
for sbcl, yes
<emaczen>
ccl>
<emaczen>
what about ccl?
<kristof>
*shrug*
<|3b|>
ccl and sbcl are native OS threads as far as i know (so posix where applicable)
<|3b|>
though probably more precise to say bt:make-thread uses the implementations thread lib, which is then posix (or whatever) threads
rumbler31 has quit [Remote host closed the connection]
asarch has quit [Quit: Leaving]
smokeink has quit [Remote host closed the connection]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robotoad has quit [Quit: robotoad]
vlatkoB has joined #lisp
ealfonso has joined #lisp
_whitelogger has joined #lisp
dented42 has joined #lisp
Fare has joined #lisp
robotoad has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has joined #lisp
_whitelogger has joined #lisp
robotoad has quit [Quit: robotoad]
<ealfonso>
is there a way to ignore a specific undefined variable warning? I'm using an undefined variable SOME-DEFAULT as a keyword default, with the idea that the keyword must be either provided explicitly, or SOME-DEFAULT must be bound at compile time via something like COMPILE-LET (which I'm aware is not portable). this all works well except for the undefined variable warning
<jackdaniel>
no, but you may (defun foo (&key (bar (or (boundp 'some-default) (error "required")))) …)
frgo has quit [Ping timeout: 244 seconds]
kristof has joined #lisp
robotoad has joined #lisp
<pillton>
ealfonso: Why are you doing what you are doing?
<ealfonso>
I tried wrapping my defun over a let but if I do that COMPILE-LET stops replacing the symbols
<jackdaniel>
ealfonso: what you are doing sounds very unusual - it is a strong indicator that you are aiming at your own foot atm
makomo has joined #lisp
ryan_vw has quit [Ping timeout: 264 seconds]
<ealfonso>
pillton I'm trying to make defintions of rest api endpoints more concise by allowing compile-time scopes of certain variables, like http-method, default query parameters, depaginator on/off. I really like the way it looks and it is more readable and clear than using a custom macro
kristof has quit [Ping timeout: 264 seconds]
<jackdaniel>
you say that wrapping definition in compiler-let is more clear than having (say) a macro define-endpoint ? hmm
<ealfonso>
wish I could provide an example but cannot yet. btw emacs lisp does have let-when-compile, and compiler-let was once part of CL
smokeink has joined #lisp
* pillton
is confused.
<ealfonso>
jackdaniel if I have 10 :get endpoints and 10 :post, I can just bind a default METHOD kw fallback at compile time to :get within the scope of the 10 get endpoints, to :post within the scope of the post ones, etc
<jackdaniel>
macros work with special bindings too
<ealfonso>
it can get more complex too, say 7 of those :get endpoints involve depagination, I can compiler-let the depaginator around those 7, still within the scope of the 10 :get endpoints, so I only need to specify what changes as opposed to repeating all the arguments for each endpoint
<jackdaniel>
whatever suits you. I'm just saying that it looks very bad from the outside
frodef has joined #lisp
Oddity has quit [Ping timeout: 276 seconds]
<jackdaniel>
using: a) non standard machinery, b) in a non-standard way; to achieve something what may be easily achieved with macros which are a) part of the standard, b) standard technique
<ealfonso>
I considered special bindings but I don't want to make every macro argument a special var. I am using macros
igemnace has quit [Remote host closed the connection]
<ealfonso>
but as far as I know customizing variables through let-binding is pretty standard, this is just the same concept applied macros at compile time. IMO it's unfortunate that COMPILER-LET was removed from the spec: http://www.lispworks.com/documentation/lw50/CLHS/Issues/iss066_w.htm but it was once part of it
rumbler31 has joined #lisp
<ealfonso>
emacs lisp does have let-when-compile. the suggested workaround for COMPILER-LET in that discussion was to use macrolet, or symbol-macrolet, but I found that to be more confusing and less readable than COMPILER-LET, which SBCL does "provide" in some way
shrdlu68 has joined #lisp
<ealfonso>
anyway, thanks for the feedback
<ealfonso>
s/applied/applied to/
rumbler31 has quit [Ping timeout: 272 seconds]
igemnace has joined #lisp
DGASAU has joined #lisp
Oddity has quit []
Oddity has joined #lisp
detectiveaoi has quit [Quit: Leaving...]
<phoe>
flip214: I sent a mail your way.
orivej has joined #lisp
frodef has quit [Ping timeout: 244 seconds]
Inline has quit [Read error: Connection reset by peer]
marusich has joined #lisp
Folkol has joined #lisp
lemoinem has quit [Ping timeout: 246 seconds]
ggole has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
ealfonso has quit [Ping timeout: 240 seconds]
shka_ has quit [Ping timeout: 244 seconds]
lemoinem has joined #lisp
robotoad has quit [Quit: robotoad]
kajo has joined #lisp
makomo has quit [Ping timeout: 244 seconds]
kajo has quit [Ping timeout: 244 seconds]
shrdlu68 has quit [Ping timeout: 244 seconds]
scymtym has quit [Ping timeout: 252 seconds]
flamebeard has joined #lisp
adam4567 has quit [Remote host closed the connection]
makomo has joined #lisp
shifty has joined #lisp
varjag has joined #lisp
fikka has joined #lisp
hiroaki has joined #lisp
<splittist>
morning #lisp
holycow has joined #lisp
frgo has joined #lisp
astalla has joined #lisp
<jdz>
Good morning!
nirved has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
elfmacs has joined #lisp
scymtym has joined #lisp
astalla has quit [Ping timeout: 264 seconds]
nly has quit [Read error: Connection reset by peer]
<Xof>
beach: I don't know!
<Xof>
beach: some of the features in CMU/Spice Lisp were student projects. That might imply that there are other student projects that weren't successful / didn't make it in
bitch has joined #lisp
pierpal has quit [Ping timeout: 246 seconds]
fikka has quit [Ping timeout: 244 seconds]
pierpal has joined #lisp
fikka has joined #lisp
jochens has joined #lisp
nly has joined #lisp
jochens_ has joined #lisp
nostoi has joined #lisp
jochens has quit [Ping timeout: 240 seconds]
megalography has joined #lisp
pierpal has quit [Quit: Poof]
frodef has joined #lisp
pierpal has joined #lisp
nostoi has quit [Client Quit]
frgo has joined #lisp
marusich has quit [Quit: Leaving]
joga has joined #lisp
space_otter has quit [Remote host closed the connection]
<beach>
Xof: OK, not a big deal.
frgo has quit [Ping timeout: 244 seconds]
pierpal has quit [Read error: Connection reset by peer]
rixard has quit [Ping timeout: 260 seconds]
pierpal has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
frgo has joined #lisp
megalography has left #lisp [#lisp]
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #lisp
rixard has joined #lisp
orivej has joined #lisp
astalla has joined #lisp
frgo has quit [Remote host closed the connection]
heisig has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
zfree has quit [Quit: zfree]
fikka has quit [Ping timeout: 252 seconds]
holycow has quit [Quit: leaving]
frgo has joined #lisp
papachan has joined #lisp
igemnace has quit [Ping timeout: 244 seconds]
Lycurgus has joined #lisp
nowhereman_ has joined #lisp
fikka has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
lumm has joined #lisp
nowhereman_ has quit [Ping timeout: 252 seconds]
hhdave has joined #lisp
Fare has quit [Ping timeout: 244 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
lumm has quit [Remote host closed the connection]
razzy has joined #lisp
emaczen has quit [Read error: Connection reset by peer]
orivej has joined #lisp
frgo has quit [Remote host closed the connection]
brandonz has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
thinkpad has quit [Ping timeout: 252 seconds]
thinkpad has joined #lisp
fikka has joined #lisp
frgo has joined #lisp
brandonz has joined #lisp
akovalenko has quit [Remote host closed the connection]
frgo has quit [Ping timeout: 244 seconds]
elderK has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 264 seconds]
shka_ has joined #lisp
razzy has quit [Ping timeout: 264 seconds]
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 246 seconds]
BouncyMike has joined #lisp
fikka has joined #lisp
razzy has joined #lisp
<shka_>
good day
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
asymptotically has joined #lisp
frgo has joined #lisp
eminhi has joined #lisp
Essadon has joined #lisp
lnostdal has quit [Ping timeout: 252 seconds]
Folkol has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
jochens_ has quit [Ping timeout: 252 seconds]
BouncyMike has quit [Ping timeout: 264 seconds]
anewuser has quit [Ping timeout: 276 seconds]
elfmacs has quit [Ping timeout: 264 seconds]
frgo has quit [Ping timeout: 252 seconds]
elfmacs has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
frgo has joined #lisp
shka_ has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
m00natic has joined #lisp
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
esrse has quit [Ping timeout: 244 seconds]
pierpal has quit [Read error: Connection reset by peer]
frgo has joined #lisp
eschatologist has quit [Ping timeout: 240 seconds]
nowhereman_ has joined #lisp
eschatologist has joined #lisp
DGASAU has quit [Ping timeout: 252 seconds]
frgo has quit [Ping timeout: 252 seconds]
hiroaki has quit [Ping timeout: 252 seconds]
nowhereman_ has quit [Ping timeout: 245 seconds]
cylb has joined #lisp
Bike_ has joined #lisp
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
jochens has joined #lisp
scymtym has quit [Ping timeout: 264 seconds]
eminhi_ has joined #lisp
eminhi_ has quit [Client Quit]
eminhi has quit [Ping timeout: 245 seconds]
frgo has joined #lisp
Lycurgus has quit [Ping timeout: 252 seconds]
noark9 has joined #lisp
xkapastel has joined #lisp
warweasle has joined #lisp
noark9 has quit [Quit: noark9]
noark9 has joined #lisp
Kaisyu has joined #lisp
sjl has joined #lisp
frodef has quit [Ping timeout: 272 seconds]
zfree has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
noark9 has quit [Quit: noark9]
noark9 has joined #lisp
doubledup has quit [Remote host closed the connection]
DGASAU has joined #lisp
elfmacs has quit [Ping timeout: 244 seconds]
zfree has quit [Quit: zfree]
moei has joined #lisp
shakdwipeea has joined #lisp
rumbler31 has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
<shakdwipeea>
Hi guys, I have some confusion in keywords. What is the difference b/w => :|title|, :EXTERNAL and => :TITLE, :EXTERNAL
<Bike>
by default the reader capitalizes everything
<beach>
shakdwipeea: The first one has a lower-case name. Not the others.
fikka has joined #lisp
<Bike>
so if you give it "title" it'll produce a symbol with symbol-name of "TITLE"
<luis>
shakdwipeea: it's worth figuring out this symbol confusion you're experience, but apropos JSON parsing you might consider using a parser that doesn't convert JSON keys to keywords. I like http://marijnhaverbeke.nl/st-json/
<shakdwipeea>
So i need a way to make the symbol I get from get-slots to be small-case .. Is that possible ?
<Bike>
you probably want to do it the other way
<Bike>
on the one hand, you have your slot names. on the other, the user data
<Bike>
just upcase the user data before interning it and there you go
<Bike>
if i'm reading this correctly
<shakdwipeea>
yeah that should probably work.. let me try
<pfdietz>
When you define your slot names, use escaping and make them lower case? You can make the accessors have upper case names, so they don't have to be escaped in user code.
<Bike>
which i'm possibly not, because it looks like you're calling INTERN on the slot name symbols
fikka has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
<shakdwipeea>
pfdietz: this worked I can escape the slot names and getf works fine
<shakdwipeea>
Thanks guys
<pfdietz>
User code should not be working with slot names anyway, in most cases.
<pfdietz>
(exception: adding methods for slot-unbound)
steiner has left #lisp ["ERC (IRC client for Emacs 26.1)"]
flazh has quit [Ping timeout: 252 seconds]
scymtym has quit [Remote host closed the connection]
flazh has joined #lisp
scymtym has joined #lisp
milanj has joined #lisp
dddddd has joined #lisp
orivej has joined #lisp
cylb has quit [Remote host closed the connection]
igemnace has joined #lisp
cylb has joined #lisp
papachan has quit [Quit: WeeChat 2.2]
smokeink has quit [Remote host closed the connection]
frodef has joined #lisp
robotoad has joined #lisp
jcowan has quit [Quit: Connection closed for inactivity]
robotoad has quit [Quit: robotoad]
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anewuser has joined #lisp
slac-in-the-box has joined #lisp
<slac-in-the-box>
(hello)
<beach>
Hello slac-in-the-box.
<beach>
slac-in-the-box: Are you new here? I don't recognize your nick.
<slac-in-the-box>
yes... I am old noob... I get older, but I'm still a noob.
<beach>
I see.
<slac-in-the-box>
I just discoverred irssi built in to slackware, so am exploring
<beach>
OK.
<slac-in-the-box>
So far with lisp, I have used clsql, cl-ncurses, ltk, and inferior-lisp
Lycurgus has joined #lisp
dueyfinster has joined #lisp
<beach>
inferior-lisp as in the Emacs mode?
<slac-in-the-box>
and I'm currently messing with cl-ncurses, which has a bug in one of it's tests: keyok-test.lisp
v0|d has joined #lisp
<slac-in-the-box>
I think it's different than emacs mode... I get to it with (ql:quickload "inferior-lisp")
<slac-in-the-box>
then I usually give it a let struture that formats a command, like a long rsync command with lots of --excludes , and executes the command... basically the equivalent of a shell script, except using lisp :)
<slac-in-the-box>
brb
slac-in-the-box has quit [Quit: leaving]
emar has quit [Quit: WeeChat 2.2]
slac-in-the-box has joined #lisp
<slac-in-the-box>
like this: (ql:quickload "inferior-shell")
<slac-in-the-box>
and that has been helpful for not having to type out long rsync commands, or similar
<slac-in-the-box>
and that has been helpful for not having to type out long rsync commands, or similar
<jackdaniel>
slac-in-the-box: please use paste services fur multiline snippets
<jackdaniel>
for*
<slac-in-the-box>
thanks... checking into it
<jackdaniel>
thank you
heisig has quit [Remote host closed the connection]
emar has joined #lisp
nly has quit [Read error: Connection reset by peer]
nly has joined #lisp
<luis>
slac-in-the-box: a good rule of thumb regarding indentation is to never have line break immediately after an opening parenthesis, and to not have closing parenthesis all alone in a line.
scymtym has quit [Ping timeout: 250 seconds]
flamebeard has quit []
<slac-in-the-box>
thanks luis...
<pfdietz>
I have seen lisp code that treats closing parens like } in C. One per line, cascading back toward the left margin. I do not become happy.
<beach>
It's awful.
johnjay has joined #lisp
<shka_>
where there are worse things, but honestly it makes me wonder, how anybody came to idea that this is reasonable way to write
<ggole>
Because they're used to that formatting in C-family languages
glv has joined #lisp
anamorphic has joined #lisp
rippa has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
<slac-in-the-box>
sometimes there are lot more s-expressions in that let; having that one poor form, was helping my eyes find there way around... first time I subjected any code to peer review, lol... the cascading parenthesis, one per line, is hard for the eyes to trace and a nightmare... but sometimes the s-expressions in the let bindings have additional functions in them, causing more closing parenthesis at end of
<slac-in-the-box>
line, so that it's hard to tell which line is last s-expression of the let bindings... so I was leaving that one by myself as an optical clue... I'm sure your eyes get used to the proper community consented code structure... but that single closing parenthesis has helped me find my way through let structure... which is simple... but I'm noob, and need it like a crutch
<beach>
Or, you could use the right tools for the job.
<oni-on-ion>
^_^/
<slac-in-the-box>
are there better tools than emacs?
<luis>
slac-in-the-box: that's a good choice. 👏
Guest13389 has quit [Ping timeout: 246 seconds]
nly has quit [Excess Flood]
nly has joined #lisp
nly has quit [Excess Flood]
benbit has joined #lisp
<slac-in-the-box>
good, luis, because my wall is full of emacs shortcuts in permanent marker, like graphiti...
<beach>
You need SLIME though.
<cgay>
slac-in-the-box: I suspect what they're trying to say is that you could get used to editing by s-expressions rather than line-by-line. It takes some time to get used to but for Lisp it sure makes things easier.
<cgay>
Also, correct identation goes a long way...
<luis>
slac-in-the-box: The force is strong with you.
nly has joined #lisp
nly has quit [Client Quit]
jcowan has joined #lisp
nly has joined #lisp
<flip214>
phoe: I answered your mail. Should I write an SMS that I wrote an IRC message, too? ;)
<beach>
Yes, and give him a call about the SMS.
<slac-in-the-box>
I modidfied the advocacy.lisp file in cl-ncurses/tests and when I load it with sbcl --load "ncursesapp.lisp" the colorful front end I'm working on comes up... but when I am in slime, and I try (load "ncursesapp.lisp") it evaluates to T, but the colorful front end never appears... so I'm still trying to figure out slime
cage_ has joined #lisp
Guest13389 has joined #lisp
anamorphic has quit [Quit: anamorphic]
rozenglass has joined #lisp
frgo has quit [Remote host closed the connection]
<Xach>
you can't use slime and ncurses together in the same terminal or window.
Fare has joined #lisp
anamorphic has joined #lisp
<slac-in-the-box>
thanks Xach: I had been wondering about that.
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Zaab1t has joined #lisp
nowhereman_ has joined #lisp
nopolitica has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
beach has quit [Disconnected by services]
beach has joined #lisp
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dueyfinster has joined #lisp
frgo has joined #lisp
<sjl>
vlime+ncurses+sbcl works perfectly in neovim's terminal, fwiw
Inline has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
noark9 has quit [Quit: noark9]
noark9 has joined #lisp
scymtym has joined #lisp
<luis>
sjl: looking at vlime's screencast, it looks like maybe SBCL is running within neovim's terminal (this would be similar to SLIME/Emacs's *inferior-lisp* buffer). Does it have an additional REPL like slime-repl too?
<sjl>
luis: Vlime itself doesn't. Essentially what I do is: run the vanilla SBCL process in a neovim terminal, then from within that start the swank server, then connect to it via Vlime
<sjl>
So I get the vanilla SBCL repl in a terminal on its own, and then everything Vlime provides is separate from that
<sjl>
(by "vanilla SBCL" I mean essentially "rlwrap sbcl" so not really vanilla I guess, maybe "chocolate" would be a better term for it)
<luis>
Oh, OK. You could run the SBCL process in a terminal then connect with Emacs into it in similar way. BTW, Vlime looks cool. At the very least, it's useful for people who haven't (yet) joined the church of Emacs.
<sjl>
Yep
nly has quit [Ping timeout: 245 seconds]
jruchti has quit [Quit: jruchti]
lyf[kde] has joined #lisp
lyf[kde] has quit [Remote host closed the connection]
lyf[kde] has joined #lisp
lyf[kde] has quit [Remote host closed the connection]
jruchti has joined #lisp
Fare has quit [Ping timeout: 244 seconds]
frgo has joined #lisp
anewuser has quit [Read error: Connection reset by peer]
jochens has quit [Remote host closed the connection]
papachan has joined #lisp
jochens has joined #lisp
<johnjay>
does anybody else understand emacs indentation rules for lisp code?
<slac-in-the-box>
usually when it's inconsistent, and a new line is not indenting to where I think it should, it is because I made an error and forgot a ) or " somewhere above... the inconsistency points out my error
jochens has quit [Ping timeout: 252 seconds]
frodef has quit [Ping timeout: 244 seconds]
noark9 has quit [Quit: noark9]
<johnjay>
hrm. so if I try to indent the body of the varlist in a let statement and it's on multiple lines it changes it so it's all on one line
<johnjay>
e.g. (let ( (a b) (c d) ) BODY) where (a b) and (c d) were on multiple lines
hhdave has quit [Ping timeout: 245 seconds]
<johnjay>
hrm it's actually pretty smart. when i made those variable names much longer it doesn't force it all one one line
<White_Flame>
johnjay: the only inconsistency is whether or not SLIME knows whether a sexpr position is a &body slot or not
<White_Flame>
if it's a &body, it indents by 2 spaces. Else, it aligns to the 2nd slot of the list
<johnjay>
White_Flame: can you pastebin an example? also sorry if this is a dumb question but does SLIME have different indent rules than lisp mode?
<johnjay>
ok
<White_Flame>
it's a runtime decision. SLIME connects to the running lisp image, and asks about any known macro definition for a head you're indenting
<White_Flame>
if you're offline, or haven't loaded in your macros, it won't have that knowledge and will indent all borkedly
<White_Flame>
via assuming everything is a data list
noark9 has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
varjag has joined #lisp
nopolitica has quit [Ping timeout: 245 seconds]
jmercouris has joined #lisp
asymptotically2 has joined #lisp
asymptotically has quit [Disconnected by services]
asymptotically2 is now known as asymptotically
<Xach>
johnjay: what do you mean by "try to indent the body"? What do you run for that?
* Xach
is lagged behind
pjb has joined #lisp
jmercouris has quit [Ping timeout: 252 seconds]
<johnjay>
Xach: C-M-q
<cgay>
I've always found C-M-q (indent-sexp) to be equivalent to hitting tab on every line of the form (except the first). Is your C-M-q bound to something else?
smasta has joined #lisp
m00natic has quit [Remote host closed the connection]
<johnjay>
C-M-q runs the command indent-pp-sexp (found in lisp-interaction-mode-map), which is an interactive compiled Lisp function in ‘lisp-mode.el’.
<johnjay>
i'm not sure, i always highlight and hit C-M-q, so tabbing each line might do the same thing?
emaczen has joined #lisp
vlatkoB has quit [Remote host closed the connection]
frodef has joined #lisp
noark9 has quit [Quit: noark9]
glv has quit [Quit: Leaving]
kajo has joined #lisp
astalla has quit [Ping timeout: 240 seconds]
nopolitica has joined #lisp
didi has joined #lisp
<cgay>
hmm, I can't seem to get indent-pp-sexp to do what you described. not sure what's going on.
johnjay has quit [Ping timeout: 256 seconds]
<didi>
When I try to compile function `function-foo' inside SLIME, I get the error "Objects of type FUNCTION can't be dumped into fasl files.": https://paste.debian.net/hidden/65fff43e . I'm trying to sorta emulate macro PUSHNEW. What is happening?
<Bike>
ok so first, you probably want (fn '#'+)
<didi>
Oh.
<didi>
Noice. Silly me.
<didi>
Thank you, Bike.
<Bike>
now without that, try (macroexpand '(macro-foo)) to see the problem
<Bike>
it'll be something like (FUNCALL #<FUNCTION +>)
<didi>
Indeed.
<Bike>
which means that you're telling compile-file to put the actual function object into the fasl
rozenglass has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
<Bike>
but yeah the '#' thing is weird.
jmercouris has joined #lisp
frgo has joined #lisp
* didi
nods
<Bike>
i think alexandria has this macro as (setf assoc-value)
<Bike>
there's even more macrology around it, though
<Bike>
maybe not...
zxcvz has joined #lisp
<jackdaniel>
there is
<jackdaniel>
alexandria defines setf expansions for operations like this
<Bike>
yeah it's just im looking at the pastebin and wondering if i understood what it does
<jackdaniel>
ah
graphene has joined #lisp
frodef has quit [Ping timeout: 252 seconds]
warweasle has joined #lisp
lemoinem is now known as Guest91541
Guest91541 has quit [Killed (asimov.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
graphene has quit [Remote host closed the connection]
umpc has quit [Ping timeout: 264 seconds]
graphene has joined #lisp
ggole has quit [Quit: ggole]
orivej has quit [Ping timeout: 252 seconds]
smasta has joined #lisp
umpc has joined #lisp
nly has joined #lisp
mejja has joined #lisp
astalla has joined #lisp
smasta has quit [Read error: Connection timed out]
smasta has joined #lisp
veinofstars has quit [Ping timeout: 264 seconds]
veinofstars has joined #lisp
<didi>
Bike: Thank you, but it wouldn't work for my case. What I want is to have mapping between keys and values, and if I already have a mapping, I want the value.
<Bike>
ah.
<didi>
The use of a function for parameter `new-fn' is because I don't want to generate values that I won't use. I learned it can waste lots of resources by using function's GETHASH parameter DEFAULT.
milanj has quit [Quit: This computer has gone to sleep]
<shka_>
didi: yeah, new-fn is how i do this
frodef has joined #lisp
nowhereman_ has quit [Ping timeout: 240 seconds]
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
graphene has quit [Remote host closed the connection]
sakalli__ has joined #lisp
dueyfinster has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<sjl>
is there a reason (funcall (constantly foo)) couldn't/shouldn't be compiler macro'ed away to just foo?
<sjl>
or am I missing something
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bike>
nothing comes to mind.
shka_ has quit [Ping timeout: 252 seconds]
frodef has quit [Ping timeout: 240 seconds]
makomo has joined #lisp
<sjl>
use case: I have an a-star search function that takes a heuristic function as an argument. the searching function itself is inlined. It would be nice if lisp could turn (+ score (funcall heuristic target)) into (+ score 0) when heuristic is (constantly 0), so it would just degenerate to dijkstra
<sjl>
but checking (disassemble (lambda () (funcall (constantly 0)))) in SBCL doesn't seem to do what I want.
jmercouris has quit [Ping timeout: 272 seconds]
<sjl>
I guess for completeness you could translate (funcall (constantly value) ...args...) to `(progn ,@args value)
<sjl>
since the args would still need to be evaluated.
cyraxjoe has joined #lisp
<Bike>
well TECHNICALLY you have to evaluate value first, and s
<sjl>
oh, true. (prog1 ,value ,@args)
cyraxjoe has quit [Client Quit]
<sjl>
Hm, for SBCL it would be enough to compiler macro constantly into a lambda. (disassemble (lambda () (funcall (lambda (&rest args) 0)))) doesn't actually funcall
<Bike>
huh, i thought it already did so
angavrilov has quit [Remote host closed the connection]
<sjl>
not unless I'm reading this disassembly wrong...
<Bike>
no i don't see one
<pjb>
sjl: depends on whether foo is a variable, or if it's a symbol-macro. Or if there is a reader macro on #\f.
<pfdietz>
Bug report filed at lauchpad.
cage_ has quit [Quit: Leaving]
<Bike>
i mean you just expand it into (let ((#:sym foo)) (lambda (&rest args) (declare (ignore args)) foo)), i think that's fine basically anywhere
<Bike>
er, #:sym in there
<Bike>
obvs
<sjl>
yeah
<pjb>
sjl: when you have (funcall heuristic target)heuristic is not (constantly 0). It's bound to: #<Compiled-function ccl::constant-ref (Non-Global) #x30200239EA8F>.
nly has quit [Read error: Connection reset by peer]
frodef has joined #lisp
nly has joined #lisp
lumm has joined #lisp
orivej has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
<anamorphic>
Is there a way to determine the argument list of a function at runtime? e.g. (a-func :callback #'(lambda (foo bar) ...)) and inside a-func, I can get at the argument list foo bar
<ferada>
hi all, could anyone tell me how cl-test-grid installs dependency C libraries, assuming it does that itself?
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pjb>
ferada: have a look at the asd file; that may be in it.
kajo has joined #lisp
DGASAU has quit [Remote host closed the connection]
<ferada>
sorry, i mean for the test cases, not for cl-test-grid itself
<pjb>
Well, it could still be in the asd, if the dependency is installed when you compile or load the tests. If they're installed when you run them, then probably they fork commands with run-program. You may try to grep for it.
dented42 has joined #lisp
<ferada>
can't find a hit for libgtk, so i'm guessing not
sjl has quit [Quit: WeeChat 2.3-dev]
Fare has joined #lisp
<phoe>
flip214: nope, you're good
smasta has joined #lisp
<didi>
ferada: I am unaware of any ASDF system installing C libraries.
<didi>
Actually, I would be surprised if an ASDF system installed anything.
emaczen has quit [Ping timeout: 246 seconds]
rumbler31 has joined #lisp
asymptotically has quit [Quit: Leaving]
astalla has quit [Ping timeout: 240 seconds]
papachan has quit [Quit: WeeChat 2.2]
Jesin has quit [Remote host closed the connection]
nirved has quit [Quit: Leaving]
emdeesee has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
Bike has joined #lisp
frodef has quit [Ping timeout: 246 seconds]
kajo has joined #lisp
<ferada>
didi: exactly, so where are the C libraries coming from for Lisp systems that require them?
<ferada>
i mean is it just using a distribution with default installations or so?
<didi>
ferada: I think so.
warweasle has joined #lisp
shifty has joined #lisp
lumm has joined #lisp
lumm has quit [Remote host closed the connection]
anewuser has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
Fare has quit [Ping timeout: 240 seconds]
Jesin has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
cyraxjoe has joined #lisp
anamorphic has quit [Quit: anamorphic]
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
nly has quit [Ping timeout: 272 seconds]
rumbler31 has quit [Ping timeout: 246 seconds]
lumm has joined #lisp
nly has joined #lisp
Demosthe1ex is now known as Demosthenex
smasta has joined #lisp
noark9 has joined #lisp
lumm has quit [Ping timeout: 244 seconds]
noark9 has quit [Client Quit]
lumm has joined #lisp
Kaisyu has joined #lisp
<jasom>
didi: qtools installs Qt automatically
DGASAU has joined #lisp
<jasom>
s/Qt/the smoke modules for Qt
Oladon has joined #lisp
rumbler31 has joined #lisp
ryan_vw has joined #lisp
nly has quit [Ping timeout: 240 seconds]
mathrick_ has quit [Ping timeout: 250 seconds]
mathrick_ has joined #lisp
lumm has quit [Read error: Connection reset by peer]