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]
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]