jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
mwnaylor has quit [Remote host closed the connection]
mwnaylor has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
NotThatRPG has joined #commonlisp
jonatack has joined #commonlisp
mosin has joined #commonlisp
jonatack has quit [Ping timeout: 246 seconds]
<fengshaun> is there a limit to what can be done at compile-time with macros? I tried to embed an asset into the final binary and it seems like I could read a file and dump the contents all at compile time with the macro and assign the resulting string to a parameter and use it.
<fengshaun> I haven't looked into how djula does its memory-store though
<fengshaun> I guess the question is: does the compiler have access to (or uses) a full cl environment that can run any cl code?
<bike> fengshaun: the compiler can evaluate arbitrary code, sure. sometimes the environment in the sense of what variables are available etc is different, but you have access to all standard functions and variables and such.
<fengshaun> nice, so as long as information is available at compile time, then it can be used. awesome, thanks!
<fengshaun> any pointers on when eval-when is appropriate vs a macro? I can't think of when eval-when would be useful
<bike> frequently, eval-when is useful when you want to make functions etc available to macro expanders
<fengshaun> oh alright, for both compile and runtime, thanks!
<aeth> if you're doing a really fancy macro, it's usually easier to just do everything in compile time functions, which return lists
<aeth> `(foo ,bar) is conceptually simple, but it gets tricky with size... but each function called from that macro can still consist of basically just things like `(foo ,bar)
<mosin> aeth bike can you guys give code examples?
phantomics_ has quit [Read error: Connection reset by peer]
spdegabrielle has quit [Quit: Connection closed for inactivity]
phantomics has joined #commonlisp
<bike> mosin: sure. eclector has this elaborate table set up in an eval-when and then used subsequently in a macrolet https://github.com/s-expressionists/Eclector/blob/master/code/reader/tokens.lisp#L38-L114
<ixelp> Eclector/code/reader/tokens.lisp at master · s-expressionists/Eclector
<aeth> on the more trivial toy example side of things, nothing's stopping you from doing something like this (inside of an eval-when) for use in macros: ,(defun add (&rest rest) `(+ ,@rest)) ,(add 'x 'y 'z)
<ixelp> (defun add (&rest rest) `(+ ,@rest)) => ADD, and then (add 'x 'y 'z) => (+ X Y Z)
<aeth> of course, for toy examples, you don't really see the point vs just using quasiquote directly
<aeth> but pretty much any extension of that sort of concept may have a use in macros
screwlisp has quit [Ping timeout: 248 seconds]
istewart has joined #commonlisp
NotThatRPG has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonatack has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
jonatack has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 272 seconds]
jonatack has joined #commonlisp
markb1 has quit [Ping timeout: 246 seconds]
ixelp has quit [Ping timeout: 244 seconds]
ixelp has joined #commonlisp
semz has quit [Quit: ZNC 1.8.2+deb2ubuntu0.1 - https://znc.in]
jonatack has quit [Ping timeout: 252 seconds]
mosin has quit [Ping timeout: 246 seconds]
semz has joined #commonlisp
markb1 has joined #commonlisp
ixelp has quit [Ping timeout: 246 seconds]
ixelp has joined #commonlisp
jonatack has joined #commonlisp
markb1 has quit [Ping timeout: 248 seconds]
emaczen has joined #commonlisp
markb1 has joined #commonlisp
dim` has joined #commonlisp
dim has quit [Ping timeout: 268 seconds]
dim` is now known as dim
decweb has quit [Quit: Konversation terminated!]
decweb has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
JuanDaugherty has joined #commonlisp
Pixel_Outlaw has quit [Remote host closed the connection]
markb1 has quit [Ping timeout: 272 seconds]
markb1 has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
chomwitt has joined #commonlisp
stanrifkin has joined #commonlisp
Ruby has quit [Ping timeout: 248 seconds]
Ruby has joined #commonlisp
markb1 has quit [Ping timeout: 268 seconds]
robin_ has joined #commonlisp
robin has quit [Read error: Connection reset by peer]
bpanthi977 has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
thuna` has joined #commonlisp
bpanthi977 has quit [Ping timeout: 246 seconds]
markb1 has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
decweb has quit [Quit: Konversation terminated!]
King_julian has joined #commonlisp
JuanDaugherty is now known as ColinRobinson
markb1 has quit [Ping timeout: 246 seconds]
<fengshaun> that's cool, haven't hit a scenario where I'd feel the need yet, but I'm only 1 week into cl :S
<fengshaun> looks very powerful though
<aeth> yes because you could e.g. write a similar function that selects the function to call based on the number of arguments in the rest variable instead of hard coding +
<aeth> things like that could be clearer in a function than inside of the macro itself
emaczen has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
thuna` has quit [Ping timeout: 246 seconds]
<beach> fengshaun: If you are a Common Lisp newbie, you might want to join #clschool where people hang out specifically to answer newbie questions.
ghodawalaaman has quit [Quit: Ping timeout (120 seconds)]
ghodawalaaman has joined #commonlisp
<fengshaun> thanks, I've joined #clschool. I don't ask questions often though, usually clhs is enough
<beach> I see.
<fengshaun> I should setup an offline indexed copy of clhs for fast access at some point
<fengshaun> even better, integrate it into emacs
pve has joined #commonlisp
shka has joined #commonlisp
thuna` has joined #commonlisp
edgar-rft has joined #commonlisp
mishoo has joined #commonlisp
shawnw has joined #commonlisp
edgar-rft` has quit [Ping timeout: 260 seconds]
King_julian has quit [Ping timeout: 244 seconds]
markb1 has quit [Ping timeout: 248 seconds]
King_julian has joined #commonlisp
veqq1 has joined #commonlisp
ColinRobinson is now known as JuanDaugherty
<JuanDaugherty> there are things to know that arent in the hyperspec
<JuanDaugherty> but you'll learn them in the proper time
<beach> The Common Lisp HyperSpec is an HTML version of the standard, but the standard certainly omits lots of things to know, because it is not meant to be a pedagogical document.
veqq has quit [Ping timeout: 248 seconds]
veqq1 is now known as veqq
<beach> So things that have to do with conventions and preferences are often not stated.
<beach> As a person implementing a Common Lisp system, you are just supposed to know.
<JuanDaugherty> which is the spec target audience
<beach> Mainly people implementing Common Lisp systems.
markb1 has joined #commonlisp
<beach> JuanDaugherty: That's why we need a language reference manual, which is being worked on here: https://github.com/lisp-docs/cl-language-reference
<ixelp> GitHub - lisp-docs/cl-language-reference: Common Lisp New Language Reference
tjbw has joined #commonlisp
tjbw has quit [Client Quit]
jon_atack has quit [Ping timeout: 248 seconds]
[1]X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
[1]X-Scale is now known as X-Scale
jonatack has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
[1]X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
[1]X-Scale is now known as X-Scale
veqq1 has joined #commonlisp
tjbw has joined #commonlisp
veqq has quit [Ping timeout: 248 seconds]
veqq1 is now known as veqq
<JuanDaugherty> beach, ty
<beach> yaw
JuanDaugherty is now known as ColinRobinson
tjbw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mgl has joined #commonlisp
markb1 has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #commonlisp
tjbw has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
Th30n has quit [Read error: Connection reset by peer]
Th30n has joined #commonlisp
veqq has quit [Ping timeout: 252 seconds]
markb1 has joined #commonlisp
bpanthi977 has joined #commonlisp
theBlackDragon has quit [Remote host closed the connection]
bpanthi977 has quit [Ping timeout: 276 seconds]
ingeniot has joined #commonlisp
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
tjbw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ColinRobinson has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
kdlv has quit [Quit: The Lounge - https://thelounge.chat]
zwr has quit [Ping timeout: 244 seconds]
qsaiyan has joined #commonlisp
treflip has joined #commonlisp
<fengshaun> beach, thanks
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale has joined #commonlisp
<beach> fengshaun: Sure.
mivanchev has joined #commonlisp
<mivanchev> hey, does anyone know how to initialize a defcstruct?
<mivanchev> does it define a constructor of some sort?
<beach> See the MAKE-DOOR example on this: https://novaspec.org/cl/f_defstruct page.
<ixelp> defstruct | Common Lisp Nova Spec
<jackdaniel> beach: DEFCSTRUCT is a CFFI operator, note the fourth letter
<beach> Oh, sorry.
<jackdaniel> mivanchev: no, you need to provide your own initialization code
<mivanchev> jackdaniel, yes but in _what_ for
<mivanchev> form
<jackdaniel> to allocate it (but not initialize) you may use with-foreign-object
<mivanchev> I see some examples of a plist being used as an initializer
<jackdaniel> and initialization by using with-foreign-slots I think
<mivanchev> "By default, convert-from-foreign (and also mem-ref) will make a plist with slot names as keys, and convert-to-foreign will translate such a plist to a foreign structure"
<jackdaniel> oh, then there you have, a constructor :)
<jackdaniel> fwiw I find it very informative to check out the implementation of various cffi operators to see how they work and how to use them
<jackdaniel> M-. is your friend in that case
<mivanchev> I'm a vim person but we also have introspection :)
<jackdaniel> oh, you are one of them ;-)
<jackdaniel> jokes aside, introspection is your friend
markb1 has quit [Ping timeout: 244 seconds]
tjbw has joined #commonlisp
[1]X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
[1]X-Scale is now known as X-Scale
markb1 has joined #commonlisp
mivanchev has quit [Remote host closed the connection]
ingeniot has quit [Ping timeout: 240 seconds]
markb1 has quit [Ping timeout: 248 seconds]
qsaiyan has quit [Quit: The Lounge - https://thelounge.chat]
markb1 has joined #commonlisp
treflip has quit [Remote host closed the connection]
chomwitt has quit [Ping timeout: 252 seconds]
pranav has quit [Read error: Connection reset by peer]
smlckz- has quit [Read error: Connection reset by peer]
Guest47 has joined #commonlisp
tjbw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjbw has joined #commonlisp
mosin has joined #commonlisp
[1]X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 272 seconds]
[1]X-Scale is now known as X-Scale
dlowe has joined #commonlisp
ingeniot has joined #commonlisp
pranav has joined #commonlisp
theBlackDragon has joined #commonlisp
chomwitt has joined #commonlisp
pve has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
vardhan has joined #commonlisp
markb1 has quit [Ping timeout: 265 seconds]
markb1 has joined #commonlisp
mgl_ has joined #commonlisp
dlowe has quit [Remote host closed the connection]
mgl has quit [Ping timeout: 265 seconds]
jon_atack has joined #commonlisp
dlowe has joined #commonlisp
dlowe has quit [Read error: Connection reset by peer]
dlowe has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
emaczen has joined #commonlisp
dlowe has quit [Remote host closed the connection]
JuanDaugherty has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
ingeniot has quit [Ping timeout: 240 seconds]
markb1 has joined #commonlisp
decweb has joined #commonlisp
JuanDaugherty is now known as ColinRobinson
as_ has joined #commonlisp
thuna` has quit [Ping timeout: 252 seconds]
pve has joined #commonlisp
cage has joined #commonlisp
tjbw has quit [Ping timeout: 252 seconds]
markb1 has quit [Ping timeout: 268 seconds]
bpanthi977 has joined #commonlisp
markb1 has joined #commonlisp
chomwitt has quit [Quit: WeeChat 3.8]
bpanthi977 has quit [Remote host closed the connection]
Th30n has quit [Read error: Connection reset by peer]
bpanthi977 has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
mosin has quit [Ping timeout: 260 seconds]
emaczen has quit [Remote host closed the connection]
markb1 has joined #commonlisp
mala has quit [Read error: Connection reset by peer]
mala has joined #commonlisp
markb1 has quit [Ping timeout: 272 seconds]
cage has quit [Quit: rcirc on GNU Emacs 30.1]
surabax has joined #commonlisp
varjag has joined #commonlisp
markb1 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 252 seconds]
NotThatRPG has joined #commonlisp
Guest47 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bpanthi977 has joined #commonlisp
ColinRobinson has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
Guest47 has joined #commonlisp
yitzi has joined #commonlisp
NotThatRPG has quit [Quit: Textual IRC Client: www.textualapp.com]
NotThatRPG has joined #commonlisp
bpanthi977 has quit [Ping timeout: 268 seconds]
markb1 has quit [Ping timeout: 248 seconds]
zwr has joined #commonlisp
varjag has quit [Read error: Connection reset by peer]
markb1 has joined #commonlisp
kyoji has quit [Quit: ZNC 1.9.1 - https://znc.in]
kyoji has joined #commonlisp
treflip has joined #commonlisp
yitzi has quit [Ping timeout: 260 seconds]
markb1 has quit [Ping timeout: 252 seconds]
veqq has joined #commonlisp
King_julian has quit [Read error: Connection reset by peer]
King_julian has joined #commonlisp
yitzi has joined #commonlisp
markb1 has joined #commonlisp
yitzi has quit [Ping timeout: 245 seconds]
parjanya has joined #commonlisp
bpanthi977 has joined #commonlisp
khinsen has joined #commonlisp
ingeniot has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
bpanthi977 has quit [Read error: Connection reset by peer]
bpanthi978 has joined #commonlisp
yitzi has joined #commonlisp
as_ has quit [Quit: as_]
bpanthi978 has quit [Ping timeout: 252 seconds]
as_ has joined #commonlisp
bpanthi977 has joined #commonlisp
markb1 has quit [Ping timeout: 272 seconds]
mgl_ has quit [Ping timeout: 252 seconds]
yitzi has quit [Ping timeout: 265 seconds]
NotThatRPG has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bpanthi977 has quit [Remote host closed the connection]
bpanthi977 has joined #commonlisp
markb1 has joined #commonlisp
markb1 has quit [Ping timeout: 244 seconds]
vardhan has quit [Ping timeout: 276 seconds]
bpanthi977 has quit [Ping timeout: 252 seconds]
mrcom has joined #commonlisp
kevingal has joined #commonlisp
markb1 has joined #commonlisp
treflip` has joined #commonlisp
kyoji has quit [Quit: ZNC 1.9.1 - https://znc.in]
treflip has quit [Ping timeout: 268 seconds]
markb1 has quit [Ping timeout: 252 seconds]
kyoji has joined #commonlisp
yitzi has joined #commonlisp
markb1 has joined #commonlisp
ingeniot has quit [Quit: Client closed]
markb1 has quit [Ping timeout: 260 seconds]
ingeniot has joined #commonlisp
mgl_ has joined #commonlisp
markb1 has joined #commonlisp
skeemer has joined #commonlisp
Polar_Phoenix has quit [Ping timeout: 260 seconds]
bpanthi977 has joined #commonlisp
Polar_Phoenix has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
wbooze has quit [Quit: Leaving]
bpanthi977 has quit [Ping timeout: 268 seconds]
pve has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
yitzi_ has joined #commonlisp
yitzi has quit [Read error: Connection reset by peer]
markb1 has quit [Ping timeout: 272 seconds]
bpanthi977 has joined #commonlisp
bpanthi978 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 265 seconds]
bpanthi978 is now known as bpanthi977
markb1 has joined #commonlisp
bpanthi977 has quit [Ping timeout: 260 seconds]
NotThatRPG has joined #commonlisp
triffid has quit [Quit: triffid]
markb1 has quit [Ping timeout: 260 seconds]
cage has joined #commonlisp
bjorkintosh has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
triffid has joined #commonlisp
shawnw has quit [Ping timeout: 276 seconds]
treflip`` has joined #commonlisp
treflip` has quit [Ping timeout: 276 seconds]
treflip`` has quit [Read error: Connection reset by peer]
treflip`` has joined #commonlisp
hernan604 is now known as HER
HER is now known as hernan604
hernan604 is now known as hernan
hernan is now known as hernan604
as_ has quit [Quit: as_]
cage has quit [Remote host closed the connection]
wbooze has joined #commonlisp
tam has joined #commonlisp
treflip`` has quit [Ping timeout: 246 seconds]
cage has joined #commonlisp
shawnw has joined #commonlisp
Fade has quit [Ping timeout: 246 seconds]
yottabyte has joined #commonlisp
bpanthi978 has joined #commonlisp
ingeniot has quit [Quit: Client closed]
Fade has joined #commonlisp
bpanthi978 has quit [Ping timeout: 244 seconds]
King_julian has quit [Ping timeout: 272 seconds]
bpanthi977 has joined #commonlisp
King_julian has joined #commonlisp
bpanthi977 has quit [Ping timeout: 244 seconds]
bpanthi977 has joined #commonlisp
younder has quit [Ping timeout: 248 seconds]
zxcvz has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 30.1]
mishoo has quit [Ping timeout: 252 seconds]
ebrasca has joined #commonlisp
markb1 has quit [Ping timeout: 252 seconds]
jon_atack has quit [Ping timeout: 248 seconds]
markb1 has joined #commonlisp
wbooze has quit [Read error: Connection reset by peer]
markb1 has quit [Ping timeout: 252 seconds]
shawnw has quit [Ping timeout: 268 seconds]
zxcvz has quit [Quit: zxcvz]
markb1 has joined #commonlisp
jonatack has joined #commonlisp
attila_lendvai has joined #commonlisp
Fade has quit [Ping timeout: 276 seconds]
Guest47 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
markb1 has quit [Ping timeout: 252 seconds]
King_julian has quit [Ping timeout: 276 seconds]
markb1 has joined #commonlisp
Alfr is now known as Guest5522
Guest5522 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
yitzi_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Pixel_Outlaw has joined #commonlisp
attila_lendvai has quit [Ping timeout: 248 seconds]
cow_2001 has quit [Quit: ✡]
jonatack has joined #commonlisp
rendar has quit [Ping timeout: 246 seconds]
prokhor-zhakarov has joined #commonlisp
cow_2001 has joined #commonlisp
prokhor-zhakarov has quit [Ping timeout: 252 seconds]
shka has quit [Quit: Konversation terminated!]
markb1 has quit [Ping timeout: 252 seconds]
dlowe has joined #commonlisp
akoana has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
markb1 has joined #commonlisp
jonatack has joined #commonlisp
markb1 has quit [Ping timeout: 265 seconds]
skeemer has quit [Ping timeout: 245 seconds]
markb1 has joined #commonlisp
skin has joined #commonlisp
Fade has joined #commonlisp
krjst has quit [Quit: bye]
NotThatRPG has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonatack has quit [Ping timeout: 244 seconds]
mgl_ has quit [Ping timeout: 265 seconds]
[1]X-Scale has joined #commonlisp
X-Scale has quit [Killed (NickServ (GHOST command used by [1]X-Scale!~ARM@83.223.250.17))]
[1]X-Scale is now known as X-Scale
krjst has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
markb1 has quit [Ping timeout: 252 seconds]
zwr has joined #commonlisp
krjst has quit [Quit: bye]
jonatack has joined #commonlisp
markb1 has joined #commonlisp
chiselfuse has quit [Ping timeout: 264 seconds]
chiselfuse has joined #commonlisp
markb1 has quit [Ping timeout: 265 seconds]
shawnw has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
krjst has joined #commonlisp
markb1 has joined #commonlisp
jonatack has joined #commonlisp
usagi_mimi has quit [Ping timeout: 244 seconds]
NotThatRPG has joined #commonlisp
skin has quit [Ping timeout: 252 seconds]
usagi_mimi has joined #commonlisp
krjst has quit [Quit: bye]
NotThatRPG has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kevingal has quit [Ping timeout: 248 seconds]
krjst has joined #commonlisp
krjst has quit [Client Quit]
krjst has joined #commonlisp
usagi_mimi has quit [Ping timeout: 244 seconds]
markb1 has quit [Ping timeout: 246 seconds]
krjst has quit [Quit: bye]
krjst has joined #commonlisp
kevingal has joined #commonlisp
usagi_mimi has joined #commonlisp
markb1 has joined #commonlisp
usagi_mimi has quit [Ping timeout: 260 seconds]
kevingal has quit [Ping timeout: 252 seconds]
<veqq> beach: You are amazin
<veqq> How does it differ from the Nova Spec?
markb1 has quit [Ping timeout: 244 seconds]
rtypo has joined #commonlisp