freenode/#shirakumo - IRC Chatlog
Search
2:34:42
no-defun-allowed
ACTION uploaded an image: Screenshot_2019-07-12_12-39-45.png (35KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/rrfqWZyCeHCwQJMPcQYtBxah >
2:35:14
no-defun-allowed
currently messing around with writing a Markless renderer for CLIM to teach myself presentations
5:18:10
no-defun-allowed
thanks, probably going to use Markless and CLIM for a frontend for a program I'm working on so that seems pretty logical to make
5:19:29
Shinmera
Also, since you asked about compilers in #sicl, the last few gamedev streams have been about implementing a compiler and vm
5:20:13
no-defun-allowed
yeah, i saw, i've been working on a VM, and i'll have to write something very similar to yours pretty soon
5:22:20
no-defun-allowed
but I asked beach because code generation and backend stuffs still seem like magic, whereas the rest seems approachable
5:25:18
no-defun-allowed
stuff like register allocation uses some graph stuff and generating labels seems hard since you don't know the size of the jump if you're going for smaller code
5:26:52
Shinmera
well the labels thing I did do in my compiler too. you keep them abstract references until you're done and then resolve them to offsets, or adjust them as you reduce code.
5:28:33
Colleen
github.com/Shinmera/leaf/bl... Website (HTML), Title: leaf/optimizers.lisp at master · Shinmera/leaf · GitHub
5:29:10
no-defun-allowed
in my VM everything's pretty much context-free as it's a stack machine so i can just emit one branch, then use the size of that as the offset
5:30:07
Shinmera
in the above system each instruction is annotated with its own absolute index, which can then be used to calculate jump targets easily.
5:36:14
Shinmera
as for register allocation, that can become incredibly complicated if you want to go fast, but a simple strategy is this: each variable is annotated with a location, which can either be a register or a memory address. when allocating variables to registers you just hand the registers out until you run out, each time also giving the register a "time index". once you run out you take the register with the
5:36:16
Shinmera
lowest time index, emit code to push the value to the stack, and change the variable location to that memory address. when you need the variable again, you allocate it anew.
5:41:17
Shinmera
oh hey this is actually public, I forgot https://github.com/Shinmera/ETHZ-CompilerDesign
5:41:17
Colleen
github.com/Shinmera/ETHZ-Co... Website (HTML), Title: GitHub - Shinmera/ETHZ-CompilerDesign: Project for the ETHZ lecture on compiler design
5:49:01
no-defun-allowed
well it's that or i work at a supermarket scanning people's grocieries, which i dislike more
5:51:08
no-defun-allowed
well certainly seems the latter is the only choice at my age without having any past experience
5:56:03
Shinmera
Even then you can: 1. freelance 2. sell independently 3. find a web shop that hires young, etc.
5:56:28
Shinmera
and if you have a bsc. degree a lot of shops will hire you regardless of experience
6:01:40
Shinmera
during uni I occasionally did some work for others, but nothing like a permanent hire