phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
adip has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Lord_of_Life_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
robdog has joined #lisp
wilfredh has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 264 seconds]
uint has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 245 seconds]
akater has joined #lisp
dddddd has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
charh has quit [Ping timeout: 258 seconds]
charh has joined #lisp
karlosz has quit [Quit: karlosz]
nicdev has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
akoana has quit [Ping timeout: 246 seconds]
varjag has joined #lisp
Josh_2 has joined #lisp
akoana has joined #lisp
ym555 has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<jcowan> Cygwin treats .lnk files as if they were really symlinks, but most Windows programs don't understand them at all.
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
<jasom> I seem to recall someone saying that NTFS support symlinks, but it not being exposed at the OS layer.
robdog has quit [Ping timeout: 264 seconds]
nicdev has joined #lisp
robdog has joined #lisp
akoana has left #lisp [#lisp]
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<Ukari> I notice that simply use a (funcall (lambda () ...)) to wrap outside seems won't effect the excute time , https://plaster.tymoon.eu/view/1228
<jasom> Ukari: that will depend on the implementation and optimization settings
robdog_ has joined #lisp
<jasom> also, FWIW funcall is not required to call a lambda, ((lambda () ...)) is valid. A lot of people use the funcall to make it more clear though (as two open parens looks an awful lot like one).
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
pjb has quit [Remote host closed the connection]
robdog has joined #lisp
pjb has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
pjb has quit [Remote host closed the connection]
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
pjb has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
DGASAU has quit [Read error: Connection reset by peer]
pjb has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 264 seconds]
pjb has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
robdog has joined #lisp
pjb has quit [Ping timeout: 246 seconds]
<Ukari> in my package `foo`, there is a method `bar`, and the symbol `bar` is not exported.
<Ukari> but when I `:import-from :foo :bar`in package `foo-test`, and try to use method `(bar)`, it works?!
<Ukari> I was thought that if a symbol `bar` is not export, it must needs to be import by `:import-from :foo ::bar`
robdog has quit [Ping timeout: 255 seconds]
<gilberth> Ukari: DEFPACKAGE is only concerned about the _name_.
<Ukari> so a symbol which is not exported could also be import into another package?
<gilberth> Ukari: You also could have said "BAR". Or #:BAR for that matter, what I like most.
<gilberth> Ukari: Yes.
<Ukari> oh
<Ukari> thanks, gilberth, I guess that export is designed for (:use )
<Ukari> so it is meaningless for (:import-from)
<gilberth> Ukari: Correct. :import-form is not meaningless.
<gilberth> At times you only want to import a few symbols. But those use cases are. Usually, you export your "interface"/"API" and just use that package from another.
<gilberth> are rare, even.
<gilberth> Accessing non-exported symbols from other packages is bad style though.
<Ukari> I am used to use import-from to import a exported symbol from other packages, and only use (:use ) for package :cl, because it shows a clear dependency
<gilberth> Well, that is not like most people do that. As you pointed out: exporting a symbol goes with using a package.
robdog has joined #lisp
dale has quit [Quit: dale]
robdog has quit [Ping timeout: 264 seconds]
<gilberth> Hacking is about communication with the next hacker, who will read the code, also. And that next hacker could as well be me in 20 years. When I see :import-from in a DEFPACKAGE, I wonder: Why?!
zagura has quit [Ping timeout: 246 seconds]
<gilberth> _Because_ it could be used to import non-exported symbols, which is pretty bad.
robdog has joined #lisp
<Ukari> if there is not a explicit :import-from in defpackage, the next hacker might don't know where a function he never seems before comes from, especially when he read the code in github
<gilberth> This argument has some truth.
robdog has quit [Ping timeout: 264 seconds]
<gilberth> But readers will scratch their head. At least I would do.
vilivulpine has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
<gilberth> Ukari: And then you do not use :import-from for the COMMON-LISP package and list all 978 symbols.
robdog has joined #lisp
rumbler31 has joined #lisp
<Ukari> yes, i use (:use :cl) for package 'common-lisp', and in package foo-test, i will also use (:use fiveam) for a test framework
<gilberth> This is cute. The write at exactly 5:00 and call the package like that.
robdog has quit [Ping timeout: 252 seconds]
wanz has joined #lisp
robdog has joined #lisp
slyrus_ has quit [Remote host closed the connection]
slyrus_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Remote host closed the connection]
jkordani has quit [Read error: Connection reset by peer]
marvin2 has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
wanz has quit [Quit: wanz]
dale has joined #lisp
robdog has joined #lisp
Nomenclatura has joined #lisp
robdog_ has joined #lisp
Oladon has joined #lisp
karlosz has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 258 seconds]
karlosz has quit [Quit: karlosz]
nanoz has joined #lisp
robdog has joined #lisp
wanz has joined #lisp
ChuckleBerry has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
ChuckleBerry has quit [Client Quit]
ggole has joined #lisp
robdog has joined #lisp
charh has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 264 seconds]
karlosz has joined #lisp
vtomole has joined #lisp
charh has joined #lisp
robdog has joined #lisp
madrik has quit [Remote host closed the connection]
_whitelogger has joined #lisp
Arcaelyx_ has joined #lisp
Arcaelyx has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 252 seconds]
rippa has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #lisp
wanz has quit [Quit: wanz]
vtomole has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
wanz has joined #lisp
milivoj has quit [Quit: milivoj]
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
Autolycus has joined #lisp
Oladon has quit [Quit: Leaving.]
slightlycyborg has joined #lisp
robdog has joined #lisp
<slightlycyborg> Hello. I am doing serial stuff. I need to convert a Lisp int which represents a 2 byte signed short into a list of 2 lisp ints that represent the bytes
<Nomenclatura> serial like killer or serial like captain crunch?
sauvin has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<edgar-rft> clhs ldb
<edgar-rft> slightlycyborg: ^^
<slightlycyborg> Anyway. 20->'(0 14), -20->'(255 236)
aeth has quit [Ping timeout: 268 seconds]
<slightlycyborg> Ok. Cool
aeth has joined #lisp
aeth has quit [Ping timeout: 255 seconds]
aeth has joined #lisp
FreeBirdLjj has joined #lisp
robdog has joined #lisp
Autolycus has quit []
<slightlycyborg> I cant figure out how LDB works
<slightlycyborg> or what a byte spec is
nanozz has joined #lisp
<slightlycyborg> Ok. so a byte isn't 8 bits
<slightlycyborg> It is user specifiable. Odd name
nanoz has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 264 seconds]
Nomenclatura has quit [Quit: q]
robdog has joined #lisp
akater has quit [Ping timeout: 256 seconds]
akater has joined #lisp
<verisimilitude> Bytes aren't always eight bits, slightlycyborg.
<verisimilitude> They're still not.
robdog has quit [Ping timeout: 264 seconds]
<verisimilitude> What LDB lets you do is get a section of an INTEGER and have it right-justified.
<verisimilitude> You should also look into MASK-FIELD, which doesn't right-justify the result.
<verisimilitude> Would you like an example?
<verisimilitude> (ldb (byte 4 2) #xFF) => 15
<verisimilitude> (mask-field (byte 4 2) #xFF) => 60
Arcaelyx_ has quit [Ping timeout: 250 seconds]
dale has quit [Quit: dale]
beach has joined #lisp
<beach> Good morning everyone!
ym555 has quit [Quit: leaving...]
robdog has joined #lisp
milanj has joined #lisp
robdog has quit [Ping timeout: 257 seconds]
Adamclisi has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
robdog has joined #lisp
myrkraverk has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 252 seconds]
fckit has joined #lisp
beach has quit [Ping timeout: 245 seconds]
nanozz has quit [Ping timeout: 250 seconds]
myrkraverk has joined #lisp
ravenousmoose has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
myrkraverk has quit [Ping timeout: 255 seconds]
slightlycyborg has quit [Ping timeout: 255 seconds]
random-nick has joined #lisp
themsay has quit [Ping timeout: 255 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wanz has quit [Quit: wanz]
defaultxr has quit [Ping timeout: 255 seconds]
_whitelogger has joined #lisp
myrkraverk has joined #lisp
uint has joined #lisp
wanz has joined #lisp
myrkraverk has quit [Ping timeout: 244 seconds]
kushal has quit [Read error: Connection reset by peer]
cantstanya has quit [Write error: Connection reset by peer]
akater has quit [Remote host closed the connection]
kushal has joined #lisp
akater has joined #lisp
Aruseus has joined #lisp
dddddd has joined #lisp
karlosz has quit [Quit: karlosz]
varjag has joined #lisp
robdog has joined #lisp
Mings has joined #lisp
cantstanya has joined #lisp
varjag has quit [Ping timeout: 255 seconds]
wanz has quit [Quit: wanz]
robdog has quit [Ping timeout: 258 seconds]
lumm has joined #lisp
lumm has quit [Client Quit]
schjetne has quit [Ping timeout: 240 seconds]
lumm_ has joined #lisp
makomo has joined #lisp
<makomo> morning
frodef has joined #lisp
wanz has joined #lisp
wigust has joined #lisp
myrkraverk has joined #lisp
JetJej has joined #lisp
lumm has joined #lisp
adip has joined #lisp
lumm_ has quit [Ping timeout: 258 seconds]
<adip> Hi, could you explain what's wrong with this example? https://ideone.com/1i1fEv Why does compiler complain about undefined variable n ?
pjb has joined #lisp
<adip> nevermind, it works D:
<JetJej> Gremlins, no doubt.
robdog has joined #lisp
robdog_ has joined #lisp
<adip> that's what happend when you try to learn something in the middle of the night D:
robdog has quit [Ping timeout: 252 seconds]
themsay has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
<no-defun-allowed> adip: did you learn your formatting rules while asleep?
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<adip> no-defun-allowed: I've learned some. What's wrong with that example other than wront variable in third line?
robdog has joined #lisp
<no-defun-allowed> We always seperate arguments with spaces, regardless of context.
<no-defun-allowed> (defun foo(x)...) and (if(bar)...) are incorrect.
<adip> ok
test1600 has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<no-defun-allowed> And well, unless your goal is to make people retch, it's usually a good idea to make sure your code is formatted well. Not only is it a sign of politeness, it also makes people usually quicker to respond as they can read nicely formatted code easier.
<makomo> adip: if you're using Emacs + SLIME, just run "slime-reindent-defun" to indent the top-level form you're currently in
robdog has joined #lisp
<no-defun-allowed> https://lisp-lang.org/style-guide/ is a little long, but has good examples.
<JetJej> Or you could make it as ugly as possible for a laugh.
ravenousmoose has joined #lisp
<no-defun-allowed> "...unless your goal is to make people retch..."
<adip> JetJej: everybody already laughs at lisp parentheses, you couldn't make it worse ;)
<JetJej> Just try me. B)
<no-defun-allowed> I don't think you know where you are, adip.
<no-defun-allowed> "Everyone" here uses a decent editor that makes paren matching very easy.
robdog has quit [Ping timeout: 264 seconds]
<pjb> ((((+ a b)))) is not lisp. But ((((a+b)))) is C.
<no-defun-allowed> Sure, parens have very precise and consistent positions.
<adip> next serious question, Is there a step by step debug mode for sbcl or clisp? something similar to gdb?
<pjb> adip: cl-stepper.
<adip> no-defun-allowed: that was a joke
<no-defun-allowed> adip: I don't care. It's not very funny.
<adip> pjb: more like *(*(*(ptr+i)+j)+k)
<JetJej> https://ideone.com/c4aZVw It is me. I am the big lisp.
<no-defun-allowed> What the fuck?
robdog has joined #lisp
<adip> it kinda works :D. One last question, for now. How can I make my f function to actually return calculate value... https://ideone.com/hZ3zYc
zagura has joined #lisp
varjag has joined #lisp
robdog_ has joined #lisp
<no-defun-allowed> I think the function FC should return Z or Y, not X.
robdog has quit [Ping timeout: 258 seconds]
Zaab1t has joined #lisp
<adip> makes sense, thx
<adip> that was stupid D:
robdog_ has quit [Ping timeout: 250 seconds]
test1600 has quit [Quit: Leaving]
milivoj has joined #lisp
robdog has joined #lisp
dddddd has quit [Remote host closed the connection]
DGASAU has joined #lisp
beach has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
vlatkoB has joined #lisp
lumm has quit [Ping timeout: 255 seconds]
nowhereman has quit [Read error: Connection reset by peer]
vlatkoB has quit [Read error: Connection reset by peer]
lumm has joined #lisp
vlatkoB has joined #lisp
wxie has joined #lisp
im0nde has quit [Quit: im0nde]
edgar-rft has quit [Ping timeout: 250 seconds]
lucasb has joined #lisp
robdog has joined #lisp
MingsPing has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 246 seconds]
Mings has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #lisp
MingsPing has quit [Ping timeout: 250 seconds]
marvin3 has joined #lisp
beach has quit [Ping timeout: 246 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
Essadon has joined #lisp
Essadon has quit [Max SendQ exceeded]
Essadon has joined #lisp
wanz has quit [Quit: wanz]
wanz has joined #lisp
FreeBirdLjj has joined #lisp
nowhereman has joined #lisp
wxie has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
_whitelogger has joined #lisp
Lord_of_Life_ has joined #lisp
robdog has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
ravenousmoose has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
scymtym has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
vilivulpine has quit [Remote host closed the connection]
robdog_ has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
elderK has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
xkapastel has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
monokrom has joined #lisp
jmercouris has joined #lisp
<jmercouris> so in a defpackage you can export a bunch of symbols, that's fine when you load a package
<jmercouris> however when you C-c C-c on that form twice it will complain
<jmercouris> how can you export more symbols from a package when you've already loaded a package?
<jmercouris> or for example, if you delete an export symbol in the defpackage it will complain
scymtym has joined #lisp
vlatkoB has quit [Ping timeout: 255 seconds]
_whitelogger has joined #lisp
<pjb> jmercouris: don't intern the symbols you will be using!
<jmercouris> easier said than done :D
<pjb> jmercouris: (in-package "BAR") (defpackage foo (:use cl) (:export foo1 foo2)) interns the symbols bar::foo, bar::cl, bar::foo1 bar::foo2. If you then (use-package "FOO"), then bar::foo1 and bar::foo2 collide with foo:foo1 and foo:foo2!
<jmercouris> I don't know what symbols I'll be using until I start programming
hhdave has joined #lisp
<jmercouris> try this (defpackage :xyz (:export :fish)), then evaluate (defpackage :xyz (:export :salmon))
<pjb> Indeed, it's easier. In defpackage, all the symbols are actually symbol name designators, ie. string designators, so you can use characters, symbols, keywords, or just strings!
<jmercouris> it'll complain, no collison
<pjb> (defpackage "FOO" (:use "CL") (:export "FOO1" "FOO2"))
<pjb> Now, if you change the export list, yes, you will have to resolve the inconsistencies.
<pjb> Use the provided restarts.
<pjb> For example, you could first (delete-package "XYZ"), but when doing so, you might get the debugger invoked with restarts about what to do for the packages that used the old package.
<pjb> I have a com.informatimago.common-lisp.cesarum.package:delete-packages that recursively deletes a packages and all its dependent packages…
<pjb> The point here is that you are mutating a lisp image. defpackage is not designed specifically for package mutation: using it on a package that already exists gives the implementation dependent effects you are seeing. Instead of using package macros, use package functions such as export import use-package unuse-package to mutate the lisp image.
robdog has joined #lisp
<pjb> OR, use asdf to load the packages.lisp file once to define the package once, and reboot a fresh lisp image when you change the package.
<pjb> OR, deal with the manual restarts,
<pjb> OR, wrap your second defpackage in a handler-bind that will select the right restarts automatically.
<pjb> Note that you need either an AI, or using input to specify the right restarts to select automatically!
<pjb> using user input
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
<Xach> jmercouris: It would be nice to have something that did "make the package definition be exactly this"
* Xach ponders making slime do that
<pjb> Well, you can use com.informatimago.common-lisp.lisp-reader.package:defpackage
<jmercouris> Yes, it would be nice :D
<jmercouris> pjb: why not submit a PR to slime if you have the code for it?
<pjb> It's not a slime problem.
<jmercouris> pjb: an AI?
<jmercouris> yeah, but it could be a swank extension couldn't it
<jmercouris> swank does some stuff to the lisp image when it gets the idea of re-evaluating a form containing a defpackage
abhixec has joined #lisp
schjetne has joined #lisp
robdog has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robdog has quit [Ping timeout: 252 seconds]
wanz has quit [Quit: wanz]
robdog has joined #lisp
dddddd has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 240 seconds]
ravenousmoose has joined #lisp
Josh_2 has joined #lisp
hhdave has quit [Quit: hhdave]
p_l has quit [Read error: Connection reset by peer]
p_l has joined #lisp
robdog has joined #lisp
nowhereman has quit [Ping timeout: 258 seconds]
izh_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlatkoB has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
q3d has joined #lisp
Arcaelyx has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
ravenousmoose has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
jprajzne has joined #lisp
Oladon has joined #lisp
fckit has quit [Quit: Leaving]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robdog has joined #lisp
avicenna has quit [Ping timeout: 264 seconds]
robdog has quit [Ping timeout: 252 seconds]
avicenna has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
robdog has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
Ukari has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
makomo has quit [Quit: WeeChat 2.2]
ravenousmoose has joined #lisp
<flip214> If I need a function on the host and in javascript, how can I tell Parenscript to provide both?
<flip214> a (PS (DEFUN ...)) results in a string that's to be sent to the client only, right?
<Bike> well, on the host it's a different function, yeah?
<Bike> parenscript isn't exactly the same as lisp.
<flip214> Bike: well, things like (AREF) and (1+) etc. are the same, for many practical purposes.
<flip214> I hope that I don't need to use reader macros like #. to achieve that!
<Bike> sure, i mean they could have the same source code but they're not actually the same
robdog has joined #lisp
<Bike> you might as well just write the defun twice, i figure
<Bike> or do some nonsense with #. or macros to avoid actually having it twice in the text, yeah
<flip214> with the same source?
<flip214> ouch
<Bike> i mean, if you have (defun foo (x) x), that's fine in both parenscript and the host, but they go through different compilers, no?
myrkraverk has quit [Ping timeout: 250 seconds]
<flip214> well, of course I can read the source file at compile time to get the javascript string, and let it be read via ASDF as usual
<Bike> and end up as different kinds of code.
<flip214> Bike: I've got some functions (and a few constants etc.), and I need to have them both in the server and the client.
jpsa has joined #lisp
<flip214> what's the "right" way to achieve that?
<Bike> just have the code twice, i think. there's like, hardly any relation to having code in parenscript and having it in the host.
<Bike> i haven't worked with parenscript that much, but i think that's the deal
<flip214> vsedach isn't here, and hasn't been for some time, I believe
jpsa has quit [Client Quit]
CCDelivery has joined #lisp
Ukari has joined #lisp
Oladon has quit [Quit: Leaving.]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ravenousmoose has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
robdog has joined #lisp
myrkraverk has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
robdog has joined #lisp
akoana has joined #lisp
gxt has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 250 seconds]
myrkraverk has quit [Ping timeout: 250 seconds]
jprajzne has quit [Quit: jprajzne]
klltkr has joined #lisp
myrkraverk has joined #lisp
robdog has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
Arcaelyx has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
myrkraverk has quit [Ping timeout: 244 seconds]
lumm has quit [Quit: lumm]
lumm has joined #lisp
lumm has quit [Remote host closed the connection]
lumm has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
lumm has quit [Remote host closed the connection]
gxt has joined #lisp
lumm has joined #lisp
orivej has joined #lisp
myrkraverk has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
myrkraverk has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 250 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aeth has quit [Ping timeout: 250 seconds]
aeth has joined #lisp
<fiddlerwoaroof> I believe there's a surprising amount of overlap between parenscript/lisp that makes it somewhat feasible to share code between the languages
<Xach> red
robdog has joined #lisp
hiroaki_ has joined #lisp
<fiddlerwoaroof> flip214: one thing you could do is put all the common functions into their own files, include them with asdf and then serve them with a handler that loads them at runtime (or compile-time via macros)
<fiddlerwoaroof> something like: (ps:ps (asdf:find-component (asdf:find-system :fwoar-lisputils) "hash-functions"))
<fiddlerwoaroof> you'd have to make sure that you have defined a JS "runtime" that conforms to your expectations, though
<fiddlerwoaroof> (I'd also want tests to catch drift between the JS runtime and CL...)
milanj has quit [Quit: This computer has gone to sleep]
robdog has quit [Ping timeout: 252 seconds]
aeth has quit [Ping timeout: 255 seconds]
aeth has joined #lisp
robdog has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 252 seconds]
DGASAU has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
ravenousmoose has joined #lisp
robdog has joined #lisp
dale has joined #lisp
robdog has quit [Ping timeout: 258 seconds]
karlosz has joined #lisp
DGASAU has joined #lisp
aeth has quit [Ping timeout: 255 seconds]
aeth has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DGASAU has quit [Read error: Connection reset by peer]
robdog has joined #lisp
aeth has quit [Ping timeout: 255 seconds]
ravenousmoose has joined #lisp
aeth has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sz0 has joined #lisp
robdog has joined #lisp
<borodust> hi Xach, any news about PGP support for quicklisp dists? are there a rough ETA around?
actuallybatman has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 252 seconds]
DGASAU has joined #lisp
random-nick has joined #lisp
DGASAU has quit [Read error: Connection reset by peer]
jb__ has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
jb__ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
lucasb has joined #lisp
DGASAU has joined #lisp
nicdev has quit [Ping timeout: 250 seconds]
myrkraverk has joined #lisp
robdog has joined #lisp
DGASAU has quit [Ping timeout: 255 seconds]
robdog has quit [Ping timeout: 264 seconds]
myrkraverk has quit [Ping timeout: 244 seconds]
hiroaki_ has quit [Ping timeout: 252 seconds]
Oladon has joined #lisp
sariyar_ has joined #lisp
klltkr has quit [Ping timeout: 258 seconds]
klltkr has joined #lisp
<buffergn0me> flip214: it me, new nick, but it's true I have only started hanging out on IRC again recently
<buffergn0me> For Parenscript, it all depends on how and where you put the resulting JS
adip has quit [Ping timeout: 250 seconds]
<buffergn0me> You can have a macro that takes a defun (or a body of code) and returns it as-is for CL, and generates the appropriate code to say "also compile these forms with PS and put the result wherever JS is supposed to go"
<buffergn0me> Or you can have a separate file(s) for shared code, that just goes in the ASDF definition, and then also gets compiled with PS with whatever tooling you have set up to compile/concatenate/serve etc JS
nicdev has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nly has joined #lisp
nicdev has quit [Remote host closed the connection]
nicdev has joined #lisp
ravenousmoose has joined #lisp
rumbler31 has joined #lisp
nly has left #lisp [#lisp]
<Grue`> sharing code between Lisp and Javascript? Sounds like the job for cl-clojure-template ;)
<ecraven> does anyone know of a short overview of how setf works or is implemented exactly?
<Grue`> (assuming the code is supposed to generate HTML(
<ecraven> thanks!
vlatkoB has quit [Remote host closed the connection]
<Grue`> interestingly setq also uses setf expansions, because a symbol-macro can expand into a generalized reference
<ecraven> hm.. so defsetf "just" associates the setter with a getter, and the macro expansion of setf then uses that setter?
wigust has quit [Quit: ZNC 1.7.2 - https://znc.in]
myrkraverk has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<flip214> buffergn0me: do you have an example? didn't see that kind of code sharing in the docs.
<Bike> ecraven: defsetf and define-setf-expander and so on fundamentally just define how setf forms macroexpand
<Bike> so yeah, associate setters with getters
<flip214> in ITERATE, can I have some more variables stepped with a generator automatically? something like this:
<flip214> (ITERATE (generate element in list and el-car = (car element) and el-cdr = (cdr element)) ... (next element))?
<Grue`> ecraven: there can be "setf expanders" defined for various functions, and also there exist functions named "(setf foobar)" that are also used by setf
dtw has quit [Ping timeout: 264 seconds]
dtw has joined #lisp
<Grue`> ecraven: http://clhs.lisp.se/Body/05_ab.htm this should be a complete list of how setf decides what to do with its first argument
<ecraven> Grue`: great, thank you!
<buffergn0me> flip214: (defmacro shared-code (&body body) `(progn ,@body (setf *ps-forms* (append ',body *ps-forms*))))
<Inline> fuggers
<Inline> (cffi-sys:%foreign-funcall "sqrtf" (:float 16.0 :float)) that's how it is called
<buffergn0me> flip214: Then you can (ps* *ps-forms*) in whatever HTTP request handler you have
<Inline> the documentation example call is like (%foreign-funcall "sqrtf" :float 16.0 :float)
<Inline> it's wrong
<Inline> bah
elderK has quit [Quit: Connection closed for inactivity]
<Grue`> looks more like %foreign-apply
<Inline> (name args &key library convention)
<flip214> buffergn0me: yeah, I was afraid that something like this is necessary ;/
<buffergn0me> flip214: Or write them to a file. Or put them into an in-memory cache and serve them up under a unique URI with long-lived HTTP cache headers
<ecraven> nice (setf (values ...) ..) CL really has it all
<pjb> (let (q r) (setf (values q r) (truncate 10 3)) (values q r)) #| --> 3 ; 1 |#
<buffergn0me> flip214: Is there another way to do it?
<Grue`> that's just multiple-value-bind, isn't it
<pjb> multiple-value-bind creates a scope too.
<pjb> (multiple-value-bind (q r) (truncate 10 3) (values q r)) == (let (q r) (setf (values q r) (truncate 10 3)) (values q r))
<Grue`> iirc (loop for (values a b) = ... ) doesn't work which is annoying
<pjb> (defmacro multiple-value-bind ((&rest vars) expression &body body) `(let (,@vars) (setf (values ,vars) ,expression) ,@body))
<pjb> (loop for (a b) = (multiple-value-list …) …)
<Grue`> that's extra consing on every iteration!
notzmv has joined #lisp
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
<pjb> Grue`: Are you crazy?
<flip214> buffergn0me: no, sorry. the basic logic is sound. I just hoped that parenscript already includes something like that shared-code macro.
josemanuel has joined #lisp
<Grue`> the whole point of multiple values is to avoid consing so multiple-value-list should be used only as last resort
<flip214> buffergn0me: I guess I'll generate the string for JS by reading some source file during compile-time -- that way I can avoid the extra outer macro.
<flip214> thanks for your help!
<buffergn0me> flip214: I could not figure out a way to support all the possible use cases: multiple forms in multiple files of mixed, inlined, or separate code have to go to multiple arbitrary output places (dynamic handlers, cached static handlers, files, things that have nothing to do with a web server)
<buffergn0me> flip214: NP. That sounds like a clean way to do it
<flip214> I would have hoped for a (parenscript:next-defuns-into *some-js-functions) (parenscript:defun ...)
<flip214> via a compiler-let or so -- with a similar usage to a reader macro.
frodef has quit [Ping timeout: 268 seconds]
edgar-rft has joined #lisp
jmercouris has quit [Remote host closed the connection]
selwyn has joined #lisp
robdog has joined #lisp
<PuercoPop> One thing about the streams API in CL I never quite understand is how I create a custom one. Say I'm trying to open a binary-stream that I can read from in FIFO order what I write into. Or even just write to an array. What I'm currently doing is writing and read from a file but that isn't quite what I want. Is writing my own graystream the way to go?
<pjb> PuercoPop: you cannot within the ANSI CL standard (unless you re-implement this CL API in an extensible way, cf. com.informatimago.vfs).
<Grue`> yes, gray streams is the only way
<pjb> PuercoPop: on the other hand, you can use the de-facto standard of Gray Streams, which is implemented by most implementations.
<buffergn0me> flip214: I have not heard of COMPILER-LET before. CLtL2 already lists it as removed
<buffergn0me> flip214: You can do something like that by modifying the value of *parenscript-stream* in an eval-when in PS code
<PuercoPop> pjb: I'm fine with SBCL-specific code. I'm already using the sb-posix package
<PuercoPop> pjb: that's your virtual file-system system right? Thanks I'll checkout
<pjb> PuercoPop: flexi-streams or com.informatimago.clext.pipe for examples.
<PuercoPop> Grue`: I feared so, k. Wanted to make sure if there was a simpler way around it
<pjb> PuercoPop: yes. But it's not complete. One day I will implement it using gray-streams.
<no-defun-allowed> when Gray Streams are usable, they are much more likely to "just work" with other CL code
shka_ has quit [Ping timeout: 250 seconds]
<flip214> buffergn0me: I still need to provide my own LISP+JS-DEFUN macro -- but that's okay. I'll play around a bit.
robdog_ has joined #lisp
<_death> Gray streams are not the only way.. https://gist.github.com/death/5356be28dc3332caa189c91880fe12c6
robdog has quit [Ping timeout: 264 seconds]
<PuercoPop> I'm thinking I can use a pipe, mkfifo worst case.
<pjb> _death: I'd agree. Just note that the gray stream itself could be defined more correctly.
<pjb> PuercoPop: sure. But be careful, when using pipes, you need multiple-threads, because I/O are blocking.
<pjb> And pipes are not stores, even if they have a buffer.
defaultxr has joined #lisp
<PuercoPop> _death: I look into simple-streams
<pjb> The only problem is that simple-streams are not as "standard" as gray-streams.
<_death> yep
<PuercoPop> pjb: I don't blocking will be an issue, its for the test suite
<flip214> wasn't there something like POP for a string with a fill-pointer?
<_death> vector-pop
<pjb> vector-pop vector-push vector-push-new
<pjb> strings are vectors.
<fiddlerwoaroof> _death: hmm, my inclination would be to have the decompressing stream always return octets and then wrap that with a flexi-stream
<pjb> vector-push-extend, not -new. Only for adjustable-arrays.
<_death> fiddlerwoaroof: inefficient.. and flexi-streams is inefficient by itself as well
<fiddlerwoaroof> Sure, but in most cases the overhead isn't going to be a proble
<fiddlerwoaroof> And, when it is, you're probably going to want to avoid generic functions altogether.
<_death> also, that weird use of (vector (unsigned-byte 8)) .. ugh
robdog_ has quit [Ping timeout: 264 seconds]
<_death> anyway, the issue is deeper than that use-case.. it should really be a lesson about design of protocols
<PuercoPop> pjb: I'm not worried about writing portable code, the xcb library I'm wriiting is SBCL only
<_death> one for user and another for extender
<fiddlerwoaroof> yeah, that's how AMOP is designed
jmercouris has joined #lisp
<jmercouris> how can I return the FIRST non-nil value from a loop body?
Arcaelyx has joined #lisp
<jmercouris> eg. (loop for item in items do (some-operation)), when some-operation returns a non-value
<fiddlerwoaroof> Hmm, something with thereis?
<jmercouris> immediately return
<flip214> jmercouris: THEREIS
<pjb> nope.
<fiddlerwoaroof> (loop for x ... until x thereis x)
<jmercouris> I'm not sure what works
<jmercouris> or at least I don't see the mechanics
<flip214> fiddlerwoaroof: no UNTIL
<_death> so I feel that Gray streams is not part of CL is a good thing, and that also touches on arguments for further standardization...
<flip214> jmercouris: (loop for x in list thereis (test x))
<fiddlerwoaroof> flip214: yeah, I always forget about the exact way thereis works :)
<pjb> Oops, yes, thereis works: (loop thereis (let ((x (random 10))) (if (evenp x) nil x))) #| --> 1 |#
<fiddlerwoaroof> clhs 6.1.4
<jmercouris> flip214: so (test x) is a predicate? can't just be a truthy value?
<pjb> I tried it on a boolean, so I thought it only returned nil or t, but it returns the value.
<jmercouris> has to be a function or a symbol?
robdog has joined #lisp
<jmercouris> I'll play with it, thanks
<flip214> jmercouris: you can also have (loop ... THEREIS some-sense)
<fiddlerwoaroof> flip214: that will return the value of (test x), right?
orivej has quit [Ping timeout: 255 seconds]
<PuercoPop> You could use (some #'test list)
<fiddlerwoaroof> to return the corresponding x value, you need UNTIL (test x) thereis x
<flip214> fiddlerwoaroof: right -- the non-NIL value that THEREIS sees is returned
<jmercouris> okay so (test x) is my (some-operation)
<jmercouris> that's just fine
<flip214> fiddlerwoaroof: then I'd do IF (test x) (RETURN x)
<jmercouris> man fuck wordpress
<jmercouris> there, I said it on record
<jmercouris> I hope people read this in the future
<fiddlerwoaroof> flip214: or when (test x)...
<flip214> jmercouris: "No manual entry for <bleep>" ;)
<fiddlerwoaroof> hmm, you need return, not thereis in that case, because the X might be true
<fiddlerwoaroof> ... X might be nil
<flip214> fiddlerwoaroof: no, the X might be false ;)
<jmercouris> that's fine with me, it is okay
<jmercouris> if there is no value, there is no value, I am no magician, I can't fix everything wrong with this database
<flip214> jmercouris: why not (OR value (format nil "~36r" (RANDOM (expt 36 10))) to get around that?
ebrasca has quit [Read error: Connection reset by peer]
<jmercouris> to get around which issue specifically?
ebrasca has joined #lisp
<flip214> missing values in the DB
<jmercouris> lol just put random values in there
<jmercouris> I'd prefer false :D
robdog has quit [Ping timeout: 252 seconds]
<fiddlerwoaroof> Are you trying to repair a corrupt WP installation(
<fiddlerwoaroof> ?
<jmercouris> No lol
<jmercouris> I am doing a migration to a complete lisp rewrite of a wordpress site
<jmercouris> and my goodness woocommerce, stores orders as, let me blow your mind, wordpress posts
<jmercouris> how do you know the information about the order? obviously that would be in the wordpress post meta table
<jmercouris> which of course has the columns post_id, meta_key, meta_value
<jmercouris> I'm not even joking, they couldn't be fucking bothered to make an orders table
<no-defun-allowed> oh lovely
robdog has joined #lisp
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<fiddlerwoaroof> well, the problem with a lot of these things is that the underlying platform isn't an ecommerce platform
<jmercouris> I know, they put an LS1 on a bicycle
<fiddlerwoaroof> so the extensions just shoehorn their stuff into the existing data structures.
<jmercouris> I'm not blaming the team, it doesn't make me any less annoyed though
<fiddlerwoaroof> I had to maintain a drupal/ubercart/mess for a while
<jmercouris> They have more than enough money to do a clean rewrite and migration for woocommerce..
<fiddlerwoaroof> My impression is that WP is more sane than Drupal 6
<jmercouris> Drupal is literally a war crime
Aruseus has quit [Remote host closed the connection]
<fiddlerwoaroof> Woocommerce doesn't provide some sort of XML "export all information" functionality?
<fiddlerwoaroof> Maybe some GDPR compliance plugin, or something?
<jmercouris> man I wish I had asked you beforehand
<jmercouris> that is a very good question
<jmercouris> I'm too deep into this though, and I need stripe data to perform a smooth transition anyway
<jmercouris> plus, this is running woocommerce last updated like 1.5 years ago
<jmercouris> I don't imagine the update will go smoothly
<jmercouris> I trust my lisp code more than some php some anonymous user wrote
robdog has quit [Ping timeout: 258 seconds]
<fiddlerwoaroof> :)
ebrasca has quit [Remote host closed the connection]
rumbler31 has quit [Remote host closed the connection]
troydm has joined #lisp
karlosz has quit [Quit: karlosz]
mathrick_ is now known as mathrick
karlosz has joined #lisp
Grue` has quit [Remote host closed the connection]
Grue` has joined #lisp
<dxtr> fiddlerwoaroof: ecommerce platforms aren't much better, honestly
<dxtr> I used to work as a developer in ecommerce
<jmercouris> I don't discriminate, I dislike prestashop and magento equally
<jmercouris> I'm planning on writing an ecommerce platform in CL
<jmercouris> just wondering if there is even a market for it
<jmercouris> of course this is after finishing the Next campaign goals...
robdog has joined #lisp
<dxtr> I thought about it multiple times but I figured it simply wasn't worth it. So much stuff that has to be done and has to be done right (e.g. the ability to customize the tax rules in every way imaginable for every jurisdiction and situation)
<fiddlerwoaroof> dxtr: yeah, I also worked with Sylius (avoiding Magento) and that was a different sort of nightmare
<jmercouris> I am not looking to usurp these platforms, I was thinking about writing a *very simple* ecommerce system
pfdietz_ has quit [Ping timeout: 256 seconds]
<jmercouris> where you could write your own tax calculation system
<fiddlerwoaroof> jmercouris: there isn't really such a thing
izh_ has left #lisp [#lisp]
<jmercouris> fiddlerwoaroof: what doesn't exist?
<fiddlerwoaroof> I thought about that too, but there are a number of hard-ish boring problems any ecommerce system has to solve
<fiddlerwoaroof> to be viable
<jmercouris> we have a team, would you like to work on this?
<pjb> jmercouris: something like viaweb, then.
<jmercouris> a modern day viaweb, sure
<fiddlerwoaroof> jmercouris: maybe, it would depend on a number of other factors, though
<jmercouris> with performance and customizability as its selling point
<pjb> May you have the energy to develop it!
<jmercouris> fiddlerwoaroof: messaged you
robdog has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof> jmercouris: I'd love to write CL for my day job
actuallybatman has joined #lisp
<jmercouris> fiddlerwoaroof: Yes, that's why I sent you a private message
<no-defun-allowed> say what, there's CL jobs again?
josemanuel has quit [Quit: leaving]
sariyar_ has quit [Quit: Connection closed for inactivity]
<dxtr> Apparently
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 258 seconds]
random-nick has quit [Ping timeout: 250 seconds]
abhixec has quit [Ping timeout: 250 seconds]
frodef has joined #lisp
Oladon has quit [Quit: Leaving.]
robdog has joined #lisp
selwyn has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
peterhil` has joined #lisp
robdog_ has joined #lisp
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
peterhil has quit [Ping timeout: 258 seconds]
robdog has quit [Ping timeout: 252 seconds]
Arcaelyx_ has joined #lisp
Arcaelyx has quit [Ping timeout: 255 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
peterhil` has quit [Read error: Connection reset by peer]
nowhereman has joined #lisp
peterhil has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
wigust has joined #lisp
robdog has joined #lisp
vilivulpine has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
jmercouris has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
akater has quit [Remote host closed the connection]
akater has joined #lisp
pfdietz has quit [Quit: Page closed]
robdog_ has quit [Ping timeout: 264 seconds]
jfb4 has joined #lisp
comborico1611 has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 257 seconds]
robdog has joined #lisp
<nydel> hello all
phenoble has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]