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/>
mmontone has quit [Ping timeout: 240 seconds]
rkazak has quit [Ping timeout: 265 seconds]
dino_tutter has quit [Ping timeout: 272 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
notzmv has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
markb1 has quit [Ping timeout: 276 seconds]
mala has quit [Read error: Connection reset by peer]
mala has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
markb1 has joined #commonlisp
rkazak has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
rkazak has quit [Ping timeout: 252 seconds]
contrapunctus has joined #commonlisp
crook has joined #commonlisp
<crook> Hi
<crook> I am a beginner but I have an idea: to make a programming language like lisp but it is compiled to another programming language. E.g. (if test x y) would compile if test {x} else {y}. How would you normally go about this? Make a set of macros or write a whole ast traverser or something else?
crook has quit [Remote host closed the connection]
<aeth> it's incredibly straightforward... you just have each function write to *standard-output*
<aeth> macro and special form, too
rkazak has joined #commonlisp
reb has joined #commonlisp
notzmv has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
zlqrvx has quit [Quit: %quit%]
zlqrvx has joined #commonlisp
random-nick has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
notzmv has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 276 seconds]
<beach> aeth: I am not sure the sarcasm worked.
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
robin has quit [Quit: Leaving]
decweb has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 276 seconds]
rkazak has joined #commonlisp
notzmv has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
<beach> aeth: And you could have been a bit more helpful.
rkazak has joined #commonlisp
olnw has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
rkazak has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
robin has joined #commonlisp
rkazak has joined #commonlisp
mgl has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
<phoe> minion: memo for mmontone: you got the order wrong, SIGNAL/ERROR goes through condition handlers first, only then it invokes the debugger, from where the restart can be selected. You can possibly invoke a restart from a handler, but I don't yet know enough of your program logic to see if that's feasible for you
<phoe> welp, minion isn't here
amb007 has quit [Ping timeout: 260 seconds]
pkal has quit [Read error: Connection reset by peer]
pkal has joined #commonlisp
jrx has joined #commonlisp
rkazak has joined #commonlisp
zwr has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
zwr has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
<beach> phoe: Try Colleen.
<beach> ::notify phoe hello
<Colleen> beach: Got it. I'll let phoe know as soon as possible.
varjag has joined #commonlisp
<phoe> thanks
<Colleen> phoe: beach said 5 minutes, 1 second ago: hello
<phoe> ::notify mmontone you got the order wrong, SIGNAL/ERROR goes through condition handlers first, only then it invokes the debugger, from where the restart can be selected. You can possibly invoke a restart from a handler, but I don't yet know enough of your program logic to see if that's feasible for you
<Colleen> phoe: Got it. I'll let mmontone know as soon as possible.
mishoo has joined #commonlisp
<beach> phoe: Colleen can also do CLHS and MOP.
edgar-rft` has joined #commonlisp
msv has quit [Remote host closed the connection]
edgar-rft_ has quit [Ping timeout: 246 seconds]
dajole has quit [Quit: Connection closed for inactivity]
pve has joined #commonlisp
wacki has joined #commonlisp
rkazak has joined #commonlisp
jrx has quit [Remote host closed the connection]
jrx has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
mari-estel has joined #commonlisp
jrx has quit [Remote host closed the connection]
jrx has joined #commonlisp
jrx has quit [Remote host closed the connection]
JuanDaugherty has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
rkazak has joined #commonlisp
dino_tutter has joined #commonlisp
utis has joined #commonlisp
utis has quit [Client Quit]
rkazak has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
mari-estel has quit []
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
Alfr has quit [Remote host closed the connection]
jonatack has quit [Read error: Connection reset by peer]
Alfr has joined #commonlisp
jonatack has joined #commonlisp
AetherWind has joined #commonlisp
rkazak has joined #commonlisp
random-nick has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
Thermoriax has quit [Quit: brb]
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
tarafa has joined #commonlisp
tarafa has left #commonlisp [ERC 5.6.1-git (IRC client for GNU Emacs 31.0.50)]
rkazak has quit [Ping timeout: 264 seconds]
<phoe> https://plaster.tymoon.eu/view/4689#4689 - how can this be improved? in particular, I want to avoid the newline between #. and the form
* phoe is still considering the pretty printer to be scary
robin has quit [Quit: Leaving]
<_death> use prin1?
<phoe> that gives me "#."
<phoe> or do you mean instead of pprint?
<_death> I mean instead of pprint
<phoe> yep, that works, but I also want to know how to make it work *while* keeping the pprint call
<_death> ::clhs pprint
<ixelp> CLHS: Function WRITE, PRIN1, PRINT, PPRINT...
Thermoriax has joined #commonlisp
<phoe> ok, I guess it's time to take a proper dive into 22.2.1
<_death> is the page referenced not sufficient?
<phoe> nope, because it seems I shouldn't need the pprint call there, I should instead refer to the global value of *PRINT-PRETTY* instead... somehow
<phoe> there are holes in my knowledge, better patch them properly
rkazak has joined #commonlisp
terrorjack4 has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
rkazak has quit [Ping timeout: 260 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #commonlisp
rkazak has joined #commonlisp
decweb has joined #commonlisp
pranav has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 248 seconds]
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 272 seconds]
alfiee has quit [Quit: WeeChat 4.5.0]
alfiee has joined #commonlisp
rkazak has joined #commonlisp
msv has joined #commonlisp
AetherWind has quit [Quit: leaving]
yaneko has quit [Quit: parting]
yaneko has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
pranav has joined #commonlisp
rkazak has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
d4ryus has quit [Ping timeout: 246 seconds]
rkazak has joined #commonlisp
d4ryus has joined #commonlisp
bike has quit [Ping timeout: 246 seconds]
rkazak has quit [Ping timeout: 260 seconds]
<aeth> beach: I could have been more helpful, but the user had already left, so I just left a bit of a hint of my thoughts rather than fully forming them in case someone else has a similar problem.
<beach> Oh, I see.
<aeth> It's not sufficient because you need to be aware of the side effects of writing to *standard-output* so e.g. you can't put it in one big FORMAT since you'd want the stuff in the middle (in another function call) to print before the stuff at the end, but after the stuff before it at the beginning
<aeth> But it is the right direction and quite simple, if it works for you (you have to wind up with the semantics of the target language, not of the host Lisp)
<aeth> e.g. (+ x y z) => "x + y + z" is a fairly straightforward task (using with-output-to-string) and properly writing for recursion as I described means you can do (+ x (* y z) w) and get "(x + (y * z) + w)" and at this point keeping it simple just means having unnecessary but syntactically valid parenthesis unless you want to be able to remove them
<aeth> This isn't entirely impractical because sometimes you need to generate such languages (e.g. GLSL for shaders) from s-expressions. Although personally I've moved to generating SPIR-V, which isn't an option for shaders everywhere (unless you want to potentially decompile SPIR-V into textual shaders rather than going the straight s-expression to textual shader route).
<aeth> For GLSL, the most annoying thing is that the straightforward approach as described means you have to have manifest static typing like the target, GLSL, because any kind of type inference probably means having some more knowledge of the target language so now you've gone from one week to over a month.
<aeth> For JavaScript, I'm guessing that the most annoying thing becomes the impedance mismatch because the most naive and direct approaches would permit JavaScript's nonsense like (+ "foo" 42)
acdw has left #commonlisp [smell ya later]
<aeth> Both platforms now offer a more direct alternative (SPIR-V and WASM)
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
mari-estel has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
<aeth> But there's basically no issue with turning s-expressions directly into source code (but it won't give you Common Lisp), and there are cases of interacting with someone else's DSL where that's what you need to do, at least if you don't want to mix 4 syntaxes within one program.
<aeth> ^ And that's why I held back a more complete answer when the person asking already left... because it's now just a wall of text into the void unless someone finds this on the public IRC logs.
IPmonger_ has joined #commonlisp
<beach> crook can be pointed to the logs, should there be a return.
IPmonger_ has quit [Remote host closed the connection]
rkazak has joined #commonlisp
IPmonger has joined #commonlisp
Oladon1 has quit [Read error: Connection reset by peer]
bike has joined #commonlisp
ello has quit [Quit: ZNC 1.9.1 - https://znc.in]
ello has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
mari-estel has quit []
rkazak has joined #commonlisp
IPmonger has quit [Quit: Textual IRC Client: www.textualapp.com]
wobbol has quit [Ping timeout: 252 seconds]
JuanDaugherty has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
dajole has joined #commonlisp
gdsg has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
rkazak has joined #commonlisp
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
tuck has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
shka has quit [Quit: Konversation terminated!]
shka has joined #commonlisp
Thermoriax_1 has joined #commonlisp
Pixel_Outlaw has joined #commonlisp
Thermoriax has quit [Ping timeout: 260 seconds]
rkazak has joined #commonlisp
reb has quit [Remote host closed the connection]
reb has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
hirez has quit [Ping timeout: 246 seconds]
Thermoriax_1 is now known as Thermoriax
amb007 has joined #commonlisp
IPmonger has joined #commonlisp
varjag has joined #commonlisp
wacki1 has joined #commonlisp
mishoo has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 244 seconds]
wacki1 has quit [Quit: Leaving.]
attila_lendvai_ has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
wacki1 has joined #commonlisp
attila_lendvai has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pve has quit [Quit: leaving]
rkazak has joined #commonlisp
varjag has quit [Remote host closed the connection]
varjag has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
varjag has quit [Ping timeout: 244 seconds]
IPmonger has quit [Quit: Textual IRC Client: www.textualapp.com]
tuck has quit [Remote host closed the connection]
mgl has quit [Ping timeout: 252 seconds]
tuck has joined #commonlisp
kiyafirs has joined #commonlisp
dino_tutter has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
wacki1 has quit [Quit: Leaving.]
rkazak has quit [Ping timeout: 246 seconds]
ebrasca has quit [Remote host closed the connection]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 276 seconds]
cercopith has joined #commonlisp