Xach changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/>
william1_ has joined #lisp
Shinmera has quit [Remote host closed the connection]
Shinmera has joined #lisp
wxie has joined #lisp
william1_ has quit [Ping timeout: 268 seconds]
<HiRE> so I ran into a problem with common lisp maybe someone can help?
<no-defun-allowed> What problem?
<HiRE> so I'm on chapter 3 on the database part where he introduces save-db
icer has joined #lisp
<HiRE> and it has this command `if-exists: :supercede`
<HiRE> **:if-exists
<HiRE> in SBCL it doesnt seem to compile 1s let me get the error
<HiRE> ; :SUPERCEDE conflicts with its asserted type
<HiRE> ; (MEMBER :ERROR :NEW-VERSION :RENAME :RENAME-AND-DELETE :OVERWRITE :APPEND
<HiRE> ; :SUPERSEDE NIL).
<HiRE> I read the handling of types section in the SBCL manual but it just left me more confused :(
<no-defun-allowed> You made a typo. It should be :SUPERSEDE.
<HiRE> oh..jesus
<oni-on-ion> D=
<HiRE> thank you
<no-defun-allowed> The book uses :SUPERSEDE too.
icer has left #lisp [#lisp]
<HiRE> yeah you're right. Apparently I can't read.
<Odin-> Which book is that?
<no-defun-allowed> You can think of the type (MEMBER items ...) as meaning the provided value has to be one of the provided items.
<no-defun-allowed> Practical Common Lisp.
<Odin-> Ah.
<Odin-> open.
<HiRE> oh, yeah I was confused because of the ending NIL
<no-defun-allowed> HiRE: That isn't a command either, it is an argument to WITH-OPEN-FILE.
torvis has joined #lisp
<HiRE> got it - much appreciated
<HiRE> sorry for asking such a stupid question
<HiRE> sigh
<no-defun-allowed> Providing :IF-EXISTS NIL to OPEN will just have it return NIL if the file exists already, which I don't think is used too much as signalling a condition is more appropriate.
<Odin-> I don't think there's anyone who's never missed an obvious typo in code.
<Odin-> At least not if they've done any significant coding.
<Odin-> ... is that too many negations?
<HiRE> made sense to me haha
<HiRE> Is it more idiomatic to put each closing paren on a new line, or all packed in at the end?
holycow has quit [Quit: Lost terminal]
<torvis> I'm using portacle/sbcl and quicklisp and a dependency on iolib/grovel fails with:
<torvis> Error while trying to load definition for system iolib from
<torvis> c:/Users/eric/portacle/all/quicklisp/dists/quicklisp/software/iolib-v0.8.3/iolib.asd:
<torvis>
<torvis> pathname
<torvis> error while parsing arguments to NIL DESTRUCTURING-BIND:
<torvis> odd number of elements in keyword/value list: (:PATHNAME)
<torvis> I'm fairly new to CL, any idea/ponters on what could have gone wrong?
<fe[nl]ix> torvis: iolib doesn't work on Windows
<_death> maybe it should have #-unix "unsupported-platform"
<_death> which could be a file containing (error "Unsupported platform, patches welcome") or something
<torvis> Aha. Thanks! I'll switch to a linux box.
wxie1 has joined #lisp
wxie has quit [Ping timeout: 268 seconds]
wxie1 is now known as wxie
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
EvW1 has joined #lisp
turona has quit [Ping timeout: 252 seconds]
turona has joined #lisp
<torvis> @_death so, I added:
<fe[nl]ix> torvis: also, on Linux you need to install a C library named libfixposix
lottaquestions has quit [Ping timeout: 265 seconds]
wxie has quit [Ping timeout: 260 seconds]
<torvis> fe[nl]ix: ok, thanks. I see the git repo.
<fe[nl]ix> what distribution do you use ?
adolby has quit [Ping timeout: 260 seconds]
lottaquestions has joined #lisp
<torvis> ubuntu these days
adolby has joined #lisp
<fe[nl]ix> I provide a repository with libfixposix
<fe[nl]ix> the Debian_Old repository works with Ubuntu 16.04 LTS
<fe[nl]ix> if you want a more recent one you can replace Debian_Old with just Debian
varjag has quit [Ping timeout: 260 seconds]
<torvis> the script looks like it worked
<torvis> i am on 16.04 LTS
cods has quit [Ping timeout: 268 seconds]
<physpi> Good things to read to become a better cl developer?
<physpi> Also, any allegro devs here?
<Xach> physpi: cl-ppcre source is good reading
<Xach> physpi: no allegro devs here
<Xach> physpi: practical common lisp and paradigms of ai programming are good books (and free to read)
<physpi> starred @ Xach
<physpi> I've read most of pcl I think
<physpi> And I definitely should read paradigms of ai programming.
<_death> the clhs
<Xach> cltl2 is a funner read if you keep in mind that it is not the final standard
<_death> yes, it's a great book by itself
<Xach> spec/clhs is drier but also worth studying
<physpi> Do any of you use static type checking @ compile time
<physpi> I heard sbcl will do it.
<torvis> fe[nl]ix: thanks. the install succeeded.
random-nick has quit [Ping timeout: 268 seconds]
<Xach> physpi: yes, you don't have to do anything special to get sbcl's help on that topic. it can issue more warnings if you make more promises via type declarations.
<physpi> Cool!
<physpi> Allegro does not do that AFAIK.
<HiRE> so with keyword arguments - once you specify &key everything after that is treated as a keyword?
<Xach> i only use allegro for quicklisp testing so i'm not sure what it might offer in that regard
<Xach> HiRE: yes
<HiRE> ah cool
<Xach> HiRE: but it can get more complex
<HiRE> yeah im just finishing up chapter 3 of PCL
<HiRE> he mentions he glossed over a lot of detail
<physpi> HiRE: you can do &rest after &key
<Xach> for example (defun foo (&key ((:hey you) *guys*)) ...) looks for the keyword :HEY in calls, binds it to the value YOU in the body of the function, and if it's not passed, uses the value from *GUYS*
<physpi> and &allow-other-keys
<physpi> or something like that
<Xach> physpi: incorrect
<physpi> Whoops.
<Xach> physpi: &rest must precede &key
<physpi> :(
<physpi> Sorry. losing mind
<HiRE> wow that does get more complicated
<Xach> HiRE: not a common pattern but nice to have when you really need it
<_death> you could also have you-suppliedp there, which introduces another variable whose value is true if the argument was supplied and false otherwise
<HiRE> His use of chained ands for where is nice
<HiRE> however I am confused - if the keyword variable isnt supplied that branch of the and statement is NIL right? So wouldn't that invalidate all other branches?
<HiRE> I mean obviously (select (where :artist "Joe's band")) works fine - just trying to reason out the way the and is breaking down
<HiRE> ah wait, I think I see it now
<_death> if, say, TITLE is not supplied, its default value is NIL, so the alternative branch of the IF is evaluated, in this case the form T, which evaluates to T, which is not NIL therefore true
<HiRE> the `t` is in the false half of the if statement, so if it isn't supplied it just defaults true
<HiRE> yep
<HiRE> haha
<HiRE> just realized it. Still getting used to reading lisp ifs
<HiRE> you guys were right this book is great
<gabc> It's Practical Common Lisp you're talking about?
torvis has quit [Ping timeout: 240 seconds]
srandon111 has quit [Quit: leaving]
<HiRE> gabc: yeah
<HiRE> usually I'll learn a language by doing practice problems but since lisp is so different I figured learning from first principles was the best idea
<HiRE> its been a long time since I've read a decent programming book
<gabc> Yeah it's good :)
<gabc> I use it now as a reference when I want something clear for details (like &key and &optional or `loop')
slyrus__ has joined #lisp
<aeth> HiRE: Imo tThe main distinction besides the syntax that makes it different is that nearly everything is an expression that returns a useful value
<aeth> s/tThe/the/
<HiRE> aeth: yeah its a really nice idea. The result is very clean. At least as far as I've seen from chapter 3 the code is remarkably clean.
<HiRE> and intuitive (once you learn the syntax)
slyrus_ has quit [Ping timeout: 258 seconds]
wxie has joined #lisp
<gabc> Just keep in mind that the cleanliness is not actually true and that you need to know when it isn't as to avoid pitfalls
<gabc> (It's not that bad, just like.. a thing to keep in mind)
<Odin-> The Lisp 1.5 manual makes for some ... interesting reading when your chief exposure to Lisp is modern CL code.
sauvin has quit [Ping timeout: 240 seconds]
sauvin has joined #lisp
<HiRE> hah
<HiRE> haha
<HiRE> man these are ancient manuscripts
Oladon has quit [Quit: Leaving.]
anewuser has joined #lisp
clothespin has joined #lisp
<clothespin> how do you turn off gc in sbcl?
<Xach> clothespin: I think you can do that by doing (setf (sb-ext:bytes-consed-between-gcs) <some very large number>)
<Xach> #sbcl could say for sure - it is not something i have personally tried.
<clothespin> thanks! I'll try it.
<HiRE> clothespin: you could also look at the programming language benchmark game. They use SBCL and iirc they run it without a gc
holycow has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
karlosz has quit [Quit: karlosz]
Arcaelyx has quit [Quit: Arcaelyx]
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wxie has joined #lisp
bmansurov has left #lisp ["Later"]
smokeink has joined #lisp
william1_ has joined #lisp
william1_ has quit [Ping timeout: 268 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
nowhere_man has joined #lisp
monok has joined #lisp
mono has quit [Ping timeout: 268 seconds]
papachan has quit [Quit: Leaving]
bitmapper has quit [Ping timeout: 268 seconds]
Odin- has quit [Ping timeout: 268 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
Necktwi has joined #lisp
dddddd has quit [Ping timeout: 260 seconds]
phlim has quit [Quit: WeeChat 2.4]
phlim has joined #lisp
_whitelogger has joined #lisp
gravicappa has joined #lisp
sveit has quit [Ping timeout: 245 seconds]
banjiewen has quit [Ping timeout: 245 seconds]
sgithens has quit [Ping timeout: 245 seconds]
gjnoonan has quit [Ping timeout: 245 seconds]
entel has quit [Ping timeout: 245 seconds]
White_Flame has quit [Quit: No Ping reply in 180 seconds.]
entel has joined #lisp
pent has quit [Ping timeout: 245 seconds]
physpi has quit [Ping timeout: 245 seconds]
CommanderViral1 has quit [Quit: ZNC 1.7.1+deb1+bionic1 - https://znc.in]
CommanderViral has joined #lisp
White_Flame has joined #lisp
tfb has quit [Ping timeout: 245 seconds]
gjnoonan has joined #lisp
sgithens has joined #lisp
chewbranca has quit [Read error: Connection reset by peer]
splittist has quit [Ping timeout: 245 seconds]
banjiewen has joined #lisp
chewbranca has joined #lisp
splittist has joined #lisp
tfb has joined #lisp
mason has quit [Ping timeout: 245 seconds]
dkrm has quit [Ping timeout: 245 seconds]
pent has joined #lisp
mason has joined #lisp
hydan has quit [Read error: Connection reset by peer]
hydan has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
housel has quit [Ping timeout: 245 seconds]
dkrm has joined #lisp
physpi has joined #lisp
oni-on-ion has joined #lisp
XachX has quit [Ping timeout: 245 seconds]
sveit has joined #lisp
samebchase has quit [Ping timeout: 264 seconds]
<beach> Good morning everyone!
karlosz has joined #lisp
adolby_ has joined #lisp
adolby has quit [Ping timeout: 268 seconds]
samebchase has joined #lisp
housel has joined #lisp
rumbler31 has quit [Remote host closed the connection]
DataLinkDroid has quit [*.net *.split]
XachX has joined #lisp
decent-username has joined #lisp
FreeBirdLjj has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
anewuser has quit [Quit: anewuser]
narimiran has joined #lisp
_whitelogger has joined #lisp
torvis has joined #lisp
xkapastel has joined #lisp
ggole has joined #lisp
torvis has quit [Ping timeout: 260 seconds]
oni-on-ion has quit [Ping timeout: 248 seconds]
oni-on-ion has joined #lisp
akoana has left #lisp ["Leaving"]
<p_l> beach: Good Morning
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 268 seconds]
jfb4_ has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
jfb4 has quit [Ping timeout: 268 seconds]
Bike has quit [Quit: Lost terminal]
wxie has joined #lisp
jfb4 has joined #lisp
jfb4_ has quit [Ping timeout: 268 seconds]
raghavgururajan has joined #lisp
karlosz has quit [Quit: karlosz]
adolby_ has quit [Ping timeout: 265 seconds]
mathrick has quit [Ping timeout: 260 seconds]
wxie has quit [Quit: wxie]
wxie has joined #lisp
wxie has quit [Ping timeout: 258 seconds]
quazimodo has quit [Ping timeout: 268 seconds]
quazimodo has joined #lisp
quazimodo has quit [Ping timeout: 258 seconds]
vlatkoB has joined #lisp
quazimodo has joined #lisp
holycow has quit [Quit: Lost terminal]
toorevitimirp has joined #lisp
torvis has joined #lisp
wxie has joined #lisp
<smokeink> https://paste.ofcode.org/kYr5SRgtsJsAP56jnSYTC7 adventures in debugging in slime and without slime. Any idea how to solve this mystery ?
<pjb> HiRE: it wasn't such a stupid question. Some older lisp systems would have given a better error message, suggesting you use :supersede instead…
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
shka_ has joined #lisp
<smokeink> ; the issue: stepping when break is reached in (bt:make-thread #'f) doesn't work in SLIME and doesn't work in the console either. How to make it work?. theoretically it should work because (f) in SLIME (a non-main thread), as well as in the console (main thread), works (can be stepped). there is no -apparent- reason (bt:make-thread #'f) shouldn't be steppable
vlatkoB_ has joined #lisp
torbo has quit [Remote host closed the connection]
vlatkoB has quit [Ping timeout: 268 seconds]
wxie has quit [Quit: wxie]
wxie has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
_whitelogger has joined #lisp
wxie has joined #lisp
<jackdaniel> bt:make-thread returns
<jackdaniel> new thread which starts is a side effect, not a control flow branch
<ym> Is there Emacs mode for showing car (function/macro name or just first element) of a list, when point (cursor) is after closing parenthesis?
wxie has quit [Client Quit]
wxie has joined #lisp
<ggole> There's a thing for showing that when you *type* the closing ), but not a mode
<smokeink> jackdaniel: so what
wxie1 has joined #lisp
<ym> ggole, didn't mentioned this. Nice tick. Thanks.
wxie has quit [Ping timeout: 260 seconds]
wxie1 is now known as wxie
<ym> s/mentioned/notices/
<ym> Damn.
<ym> English is harder then lisp.
<Shinmera> *than
<pjb> ym: M-x customize-variable RET blink-matching-paren RET
<jackdaniel> smokeink: so there is not swank context for the thread to work with sldb
<smokeink> then how come swank catches the break ?
<jackdaniel> via set-break-hook
<jackdaniel> or maybe with one of signal handlers?
<jackdaniel> not sure, but there are ways to achieve taht
<jackdaniel> s/taht/that/
<smokeink> ok, you might be right
<jackdaniel> I'm guessing, if you are sceptical then try to debug sldb
<smokeink> I certainly will, to see what the hell is going on
<jackdaniel> maybe when break is caught outside the swank debugging environment it should create one?
wxie has quit [Ping timeout: 265 seconds]
wxie has joined #lisp
wxie has quit [Ping timeout: 268 seconds]
wxie has joined #lisp
wxie has quit [Client Quit]
wxie has joined #lisp
wxie has quit [Ping timeout: 245 seconds]
varjag has joined #lisp
toorevitimirp has quit [Read error: Connection reset by peer]
toorevitimirp has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
torvis` has joined #lisp
akrl` has quit [Remote host closed the connection]
akrl` has joined #lisp
torvis has quit [Ping timeout: 268 seconds]
fitzsim has quit [Remote host closed the connection]
adam4567 has joined #lisp
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
grabarz has joined #lisp
grabarz has quit [Client Quit]
decent-username has quit [Ping timeout: 246 seconds]
narimiran has quit [Ping timeout: 268 seconds]
torvis` has quit [Read error: Connection reset by peer]
Retropikzel has joined #lisp
Retropikzel has quit [Client Quit]
Retropikzel has joined #lisp
imherentlybad has joined #lisp
william1_ has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
imherentlybad has quit [Quit: WeeChat 2.6]
cosimone has joined #lisp
imherentlybad has joined #lisp
random-nick has joined #lisp
<smokeink> I want to write a function that transforms some code (checks the cdr of each subtree and when it encounters certain symbols, replaces them with some data). Should I write it all by hand or should I use a code walker? what are code walkers used for?
<no-defun-allowed> A code walker is used when one has to respect lexical scoping while replacing code.
adam4567 has quit [Remote host closed the connection]
<pjb> (defun foo (some-code) (subst '(some data) 'certain-symbol some-code)) #| --> foo |# (foo '(if certain-symbol (print 'certain-symbol))) #| --> (if (some data) (print '(some data))) |#
<no-defun-allowed> For example, it might be okay to substitute X in (+ x 2) but the client would expect a their own value for X in (let ((x 4)) (+ x 2))
<pjb> smokeink: yes, you need to code walk. (foo '(list certain-symbol (let ((certain-symbol 2)) (+ certain-symbol certain-symbol)))) #| --> (list (some data) (let (((some data) 2)) (+ (some data) (some data)))) |#
<no-defun-allowed> And, yeah, as pjb says, for respecting the meanings of symbols in special forms too.
imherentlybad has quit [Quit: WeeChat 2.6]
decent-username has joined #lisp
Odin- has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
<smokeink> I need to replace only symbols at certain positions, for example in (* * *) I'd like to replace only the 2nd and 3rd '* . I was thinking to improve #'trec from http://lib.store.yahoo.net/lib/paulgraham/onlisp.lisp , to make it record the current position for each leaf
<smokeink> Then i want to make something more complicated : for symbols starting with i! to add (declare (ignorable ...)) at the right position , so I need this ability to modify things at certain positions in the tree
cods has joined #lisp
<smokeink> I'll do it just for some simple cases
<smokeink> I was curious if there are utilities to assist such tasks. why do people write so many macroexpand-dammit, macroexpand-all code walkers?
<smokeink> *portable code walkers
dddddd has joined #lisp
atgreen has joined #lisp
cosimone has quit [Quit: Terminated!]
nowhere_man has joined #lisp
<Inline> morning
<smokeink> morning
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
toorevitimirp has quit [Ping timeout: 260 seconds]
raghavgururajan has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
kajo has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
rwcom5 has joined #lisp
rwcom has quit [Ping timeout: 268 seconds]
rwcom5 is now known as rwcom
quazimodo has quit [Ping timeout: 265 seconds]
quazimodo has joined #lisp
Krystof has joined #lisp
ebrasca has joined #lisp
asdf_asdf_asdf has joined #lisp
Retropikzel has quit [Quit: Vision[0.10.3]: i've been blurred!]
ljavorsk has joined #lisp
Bike has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
ljavorsk has quit [Ping timeout: 260 seconds]
xkapastel has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
trittweiler has quit [Read error: Connection timed out]
trittweiler has joined #lisp
fitzsim has joined #lisp
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
scymtym has quit [Ping timeout: 268 seconds]
scymtym has joined #lisp
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 268 seconds]
asdf_asdf_asdf has joined #lisp
trittweiler has quit [Ping timeout: 268 seconds]
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
Nilby has joined #lisp
shifty has quit [Ping timeout: 268 seconds]
Necktwi has quit [Ping timeout: 268 seconds]
smokeink has quit [Ping timeout: 260 seconds]
Necktwi has joined #lisp
lemoinem is now known as Guest82989
Guest82989 has quit [Killed (weber.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
shka_ has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
shka_ has quit [Remote host closed the connection]
Lord_of_Life_ has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
quazimodo has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
Kundry_Wag has quit [Remote host closed the connection]
shka_ has joined #lisp
_whitelogger has joined #lisp
grabarz has joined #lisp
grabarz has quit [Client Quit]
Odin- has quit [Ping timeout: 258 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
lemoinem has quit [Read error: Connection reset by peer]
ebrasca has quit [Remote host closed the connection]
lemoinem has joined #lisp
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 265 seconds]
brown121407 has quit [Ping timeout: 258 seconds]
brown121407 has joined #lisp
Retropikzel has joined #lisp
Odin- has joined #lisp
krid has joined #lisp
Retropikzel has quit [Ping timeout: 245 seconds]
raghavgururajan has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
narimiran has joined #lisp
william1_ has quit [Ping timeout: 265 seconds]
raghavgururajan has quit [Read error: Connection reset by peer]
grabarz has joined #lisp
mathrick has joined #lisp
kajo has joined #lisp
rumbler31 has joined #lisp
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
heisig has joined #lisp
nowhere_man has quit [Ping timeout: 265 seconds]
smokeink has joined #lisp
brown121407 has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
pfdietz63 has joined #lisp
<pfdietz63> smokeink: the problem is that it's not possible to portably write a code walker that works in all cases.
<pjb> For some value of all cases.
<pjb> The proof it's possible to write a portable (conforming) code walker, is the existance of actual compilers written in conforming Common Lisp, such as eg. sicl.
<pfdietz63> See quickdocs.org/agnostic-lizard/ for a recent in depth attempt.
<pfdietz63> pjb: you need to be able to update environments, which is not standardized.
<pjb> There are no environments!!!
wheelsucker has joined #lisp
<pjb> How something that doesn't exist could prevent you to do something?
<pfdietz63> So, how do you code walk macrolets and macros that take &enivornment arguments.
<pjb> If you need it, just implement it.
<pjb> pfdietz63: by noting that you cannot do anything with environments, but pass them to macroexpand.
<pjb> pfdietz63: therefore you can give your macros and macrolets whatever you want, (and catch it back when it calls your macroexpand).
<pjb> Ok, I may accept the argument that as for a lot of other things, once you start, you have to implement your own CL to do it… But it is not an argument proving impossibility.
wheelsucker has quit [Client Quit]
whiteline has quit [Read error: Connection reset by peer]
whiteline has joined #lisp
<pfdietz63> Raskin says it's not fully possible: https://users.mccme.ru/raskin/code-walking-slides.pdf
<pfdietz63> I do not consider layering another CL on top of your CL to be a workable solution.
<pjb> pfdietz63: the existance of sbcl is proof it's possible.
<pjb> (sbcl can be compiled by any conforming CL implementation).
<pjb> pfdietz63: note the difference between workable and possible…
<pjb> pfdietz63: also, note the very important specification item of a code walker: you want to interpret conforming code in a conforming way. You don't necessarily want to interpret it the way the implementation interprets it. The code walker can provide its own standard macros (and macros for special operators).
<pfdietz63> You have wasted my time with a silly pedantic argument.
<pjb> pfdietz63: if you use impossible specifications, of course it will be impossible! If you use reasonable specifications, it'll be very possible.
<pjb> If you find this pedantic, it's your problem.
rumbler31 has quit [Remote host closed the connection]
<beach> I should examine the argument by MichaelRaskin and see whether it is correct. I suspect he is making assumptions that might sound reasonable but that are not necessarily correct.
<pjb> For example, he wants to call macroexpand-all outside of the lexical context, or without rebuilding it. This is a silly specification.
<pjb> or specifying it should be a function…
<edgar-rft> apropos pedantic: pfdietz63 said it's not possible to portably write a code walker that works in all cases. Please note that "all casess" includes all impossible cases.
<pjb> If you want a function, then you can code-walk only toplevel forms.
heisig has quit [Quit: Leaving]
rumbler31 has joined #lisp
<pfdietz63> I have written code where macroexpand-1 is called manually, in macros. It's not an unreasonable thing to do. A particular macro style uses macrolets to pass information down to nested macro forms, in the envirornment.
<pfdietz63> If you want your code walker to leave the macrolets in the code, you can't do it in general.
<pfdietz63> You can write a code walker that fully expands everything and removes all macrolets and symbol-macrolets, I think. But if you (say) want a code walker that allows manipulation of the code closer to the source level, and gives something that's not fully expanded, it can't work portably in general.
<pfdietz63> Actually... I'm not even sure one can do that. What does the code walker do when it gets to a macrolet?
<pfdietz63> I am talking about doing this in the lisp one is given, not doing a "Lisp is Turing complete so I can layer an entire new implementation on it that does what I want".
rumbler31 has quit [Remote host closed the connection]
karlosz has joined #lisp
<pfdietz63> One way to add that constraint is that it must handle macros that are "opaque", in the sense that for those macros all you can do with them is macroexpand them. You cannot go and recompile them yourself.
<pfdietz63> That means you cannot reimplement your own version of environments; those opaque macros need the system environment.
sugarwren has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
ggole has quit [Quit: Leaving]
karlosz has quit [Ping timeout: 260 seconds]
raghavgururajan has joined #lisp
asarch has joined #lisp
asdf_asdf_asdf has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
efm has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
lucasb has joined #lisp
easye`` has joined #lisp
efm has joined #lisp
easye` has quit [Remote host closed the connection]
sugarwren has quit [Ping timeout: 246 seconds]
asdf_asdf_asdf has quit [Ping timeout: 245 seconds]
Odin- has quit [Ping timeout: 258 seconds]
earl-ducaine has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
karlosz has joined #lisp
jfb4 has quit [Ping timeout: 240 seconds]
jfb4 has joined #lisp
cosimone has joined #lisp
asdf_asdf_asdf has joined #lisp
DataLinkDroid has joined #lisp
<HiRE> Is there any material difference between `return` and `return-from` in a function?
<HiRE> hm maybe `return` is only used in loops or something?
<jackdaniel> HiRE: both are used to return from a block. return-from is used to return from a named block, while return is equivalent to (return-from nil :result) (that is to return from block named NIL)
brettgilio has joined #lisp
<jackdaniel> functions have implicit block with their name
<HiRE> ah okay interesting, thank you
<HiRE> asdf_asdf_asdf: I am reading that chapter. In ANSI Common Lisp Graham used `return`, PCL seems to like `return-from`
<jackdaniel> HiRE: if you want to look up some operator, it is worth to check out l1sp.org (note that second character is a digit)
<HiRE> thats why I asked
<asdf_asdf_asdf> I didn't know that either. Also thanks.
<jackdaniel> it gives you link to the standard specification, pcl and some other resources
<HiRE> oh awesome I just bookmarked it
<jackdaniel> don't forget to thank Xach for creating it ,)
<pfdietz63> (setf foo) functions have an implicit block named foo.
<asdf_asdf_asdf> What creating, link send.
<jackdaniel> pfdietz63: interesting, I didn't know that!
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sugarwren has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
pjb has quit [Ping timeout: 252 seconds]
madage has quit [Remote host closed the connection]
grabarz has joined #lisp
My_Hearing has joined #lisp
My_Hearing has quit [Client Quit]
pjb has joined #lisp
krisfris1 has joined #lisp
rumbler31 has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
smokeink has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
torbo has joined #lisp
shka_ has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Remote host closed the connection]
turona has quit [Ping timeout: 252 seconds]
turona has joined #lisp
jfb4 has quit [Ping timeout: 265 seconds]
jfb4_ has joined #lisp
asdf_asdf_asdf has joined #lisp
brettgilio has quit [Ping timeout: 240 seconds]
bitmapper has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
madage has joined #lisp
stux|RC-only has quit [Quit: Aloha!]
gareppa has joined #lisp
juliusdeane has joined #lisp
<juliusdeane> Are there any nixos users here who know how to get SBCL to find C libraries (eg libffi and libSDL)?
krid has quit [Ping timeout: 268 seconds]
narimiran has quit [Quit: leaving]
smokeink has joined #lisp
<asdf_asdf_asdf> juliusdeane, look round #sbcl channel.
<juliusdeane> asdf_asdf_asdf alright
Kundry_Wag has joined #lisp
xuxuru has joined #lisp
Oladon has joined #lisp
gareppa has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 258 seconds]
stux|RC-only has joined #lisp
xuxuru has quit [Quit: xuxuru]
Kundry_Wag has joined #lisp
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
Lycurgus has joined #lisp
kajo has quit [Ping timeout: 246 seconds]
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<smokeink> Finally figured out how to enable stepping in threads.
<smokeink> Under slime:
<smokeink> (sb-thread:make-thread (lambda () (swank/backend:call-with-debugger-hook *debugger-hook* #'anyfunction))) ; thank you luis.
<smokeink> note that this gives a half as short backtrace than when we directly call #'anyfunction.
<smokeink> In a console without slime:
<smokeink> (bt:make-thread (lambda () (handler-bind ((sb-ext:step-condition #'sb-impl::invoke-stepper)) (anyfunction))))
<smokeink> also thank you jackdaniel for sharing your insight. Funny that for this simple question one of the answers I got in #sbcl was "just pretend that the debugger in sbcl doesn't exist."
<smokeink> One small issue with this console only version though: after each step sbcl calls (sb-thread:release-foreground) https://github.com/sbcl/sbcl/blob/master/src/code/debug.lisp#L983 (as the manual says: "If a background thread enters the debugger, selecting any restart will put it back into the background before it resumes.") why is that??!?? now because of this, when debugging, after every step we have to call (bt:thread-yield))
raghavgururajan has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Remote host closed the connection]
davisr_ has quit [Quit: Leaving]
<smokeink> *half as short, nicer backtrace. it's a "feature"
<smokeink> 5 years ago: https://bugs.launchpad.net/sbcl/+bug/1514211 "Essential part of problem is that stepper indeed does not work in threads without handler-bind installed. I'm sure this should be described in the manual, but there is no single word about it. I suggested a fix for the problem, but it took half a day for me to figure out what was the problem.Please do not ignore this report."
grabarz has joined #lisp
Lycurgus has joined #lisp
slyrus__ has joined #lisp
Lycurgus has quit [Remote host closed the connection]
slyrus_ has quit [Ping timeout: 265 seconds]
sabrac has quit [Quit: Konversation terminated!]
vlatkoB_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
gravicappa has quit [Ping timeout: 265 seconds]
juliusdeane has quit [Ping timeout: 268 seconds]
sugarwren has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
dale has joined #lisp
asdf_asdf_asdf has quit [Remote host closed the connection]
gioyik has joined #lisp
krisfris1 has quit [Ping timeout: 240 seconds]
krisfris1 has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life has joined #lisp
mathrick has quit [Ping timeout: 240 seconds]
jibanes has quit [Ping timeout: 240 seconds]
mathrick has joined #lisp
jibanes_ has joined #lisp
earl-ducaine has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Inline has quit [Quit: Leaving]
rumbler31 has quit [Remote host closed the connection]
<earl-ducaine> I'm trying to get get the :qt system to load under latest quicklisp. (asdf:system-source-directory 'qt)
<earl-ducaine> I'm running into some issues which after some investigation seem to be caused by GCC not being able to include <smoke/qtcore_smoke.h>
<earl-ducaine> has anybody used the qt system recently? Dev seems to still be active.
mathrick has quit [Ping timeout: 268 seconds]
gioyik has quit [Ping timeout: 268 seconds]
<earl-ducaine> I seem to recall being stumped by this exact error several years ago.
Kundry_Wag has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 260 seconds]
<phoe> earl-ducaine: I suggest (ql:quickload :qt-libs)
<phoe> that'll download a precompiled version of qt4
<earl-ducaine> phoe: ql'ing :qt-libs worked! but :qt still fails. Was :qt-libs supposed to make :qt work. or were you suggesting I use that system instead of :qt.?
<phoe> earl-ducaine: I suggest that you drop using :qt and use :qt-libs instead
<phoe> AFAIK the former requires all the qt4 libs and headers available on your computer so it can compile some C++ stuff locally
<phoe> and the latter doesn't
krisfris1 has quit [Ping timeout: 260 seconds]
Khisanth has quit [Ping timeout: 265 seconds]
<earl-ducaine> phoe: ah. Thanks for the additional info. Unfortunately, :qt is a dependancy in another system that I'm trying to use.
gioyik has joined #lisp
slyrus_ has joined #lisp
holycow has joined #lisp
<phoe> earl-ducaine: welp. What is it?
Khisanth has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
bitmapper has quit []
monok has quit [Remote host closed the connection]
mathrick has joined #lisp
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
Kundry_Wag has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
Oladon has quit [Quit: Leaving.]
orivej has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 265 seconds]
rumbler31 has joined #lisp
william1_ has joined #lisp
tiwEllien has joined #lisp
wxie has joined #lisp
william1_ has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
karlosz has quit [Ping timeout: 260 seconds]
KahMue has joined #lisp
shifty has joined #lisp
rumbler31 has quit [Remote host closed the connection]
KahMue has left #lisp [#lisp]
wxie has quit [Ping timeout: 268 seconds]
decent-username has quit [Ping timeout: 246 seconds]
Nilby has quit [Read error: Connection reset by peer]
xkapastel has joined #lisp