soegaard2
2019-2-11 10:57:13

?!?


martin.saurer
2019-2-11 11:50:52

@martin.saurer has joined the channel


johnstonskj
2019-2-11 16:36:50

@johnstonskj has joined the channel


pezi_pink
2019-2-11 16:37:27

hello all, I would like to use the \| and \|\| literals in my language, therefore I do not want the reader to read them as pairs and fail when they are “mismatched”. Is there a switch somewhere to help with this? do I need to make a change to the readtable ? thanks.


samth
2019-2-11 16:38:51

@pezi_pink do you want them to be delimiters? or to work like normal letters? or something else?



pezi_pink
2019-2-11 16:39:28

I am using them as datum-literals in some expressions


pezi_pink
2019-2-11 16:41:41

@alexknauth thanks, I see you are making changes to the readtable. I will try to emulate this behavior


alexknauth
2019-2-11 16:43:37

Or I could expose the make-no-vert-bar-readtable function from it, could you use that?


pezi_pink
2019-2-11 16:46:43

well, it is only a couple of lines of code in my #lang, I would rather not have a dependency for it (if that is what you were suggesting?) I will link to your repo in the comments of course.


pezi_pink
2019-2-11 17:01:22

cool, I got it working. you can use \|\| and \| in the lang, and in the expander layer I quote them out using \\|\\| and it is working as expected. thanks for the quick response !


alexknauth
2019-2-11 17:03:20

I’m curious, what #lang are you working on?


andreiformiga
2019-2-11 17:05:51

prolog uses \|


andreiformiga
2019-2-11 17:06:11

but not \|\|, I think


pezi_pink
2019-2-11 17:09:41

@alexknauth my last one was this, a racket powered 6502 assembler. https://github.com/pezipink/asi64 the one I am working on now is a source-to-source Verilog compiler for programming FPGAs. it’s basically Verilog with a bunch of nicer constructs, compiler help with things like exhaustive checking on enums, data truncation warnings, and of course, racket macros.


pezi_pink
2019-2-11 17:09:50

hopefully do something with clock signals as well


soegaard2
2019-2-11 18:11:30

soegaard2
2019-2-11 18:11:58

Suddenly gets an itch to write a c64 demo.


pezi_pink
2019-2-11 18:21:45

@soegaard2 thanks! check out the game I am writing here https://github.com/ChipmunkHand/TriangleCat/tree/master/src you can do all kinds of cool stuff now you have all of racket in the assembler. it has a SID file loader, sprite loaders using the output format of some sprite tool, a metadata tile system generator, a state machine generator, even an expression compiler that lets you write nested if / then / else and compiles switch statements into lookup tables for you. sky’s the limit! it is much more fun to write 6502 with all that power behind you :wink:


soegaard2
2019-2-11 18:25:33

This looks great.


soegaard2
2019-2-11 18:25:59

Pretty easy to make, sine tables:


soegaard2
2019-2-11 18:26:00

:cosine (data (for/list ([x (in-range 0 365 5)]) (bitwise-and (exact-round (* (cos (deg->rad x)) 63)) #xFF)))


pezi_pink
2019-2-11 18:26:02

it is basically the most powerful assembler ever, not really through my own doing so much :slightly_smiling_face:


soegaard2
2019-2-11 18:26:57

I am struggling to remember which assembler I used back in the day.


pezi_pink
2019-2-11 18:28:31

be sure to let me know if you build anything with it! I would love to see it


pezi_pink
2019-2-11 18:29:06

it can count cycles for you as well, if you are into demo programming


soegaard2
2019-2-11 18:29:13

Nifty.


pezi_pink
2019-2-11 18:30:25

I am hoping to extend it to the 65816 and SNES programming later this year. always wanted to program the SNES


soegaard2
2019-2-11 18:31:42

Never tried programming a SNES.


krismicinski
2019-2-11 20:38:52

This reminds me of this thing called “bedrock”, which was a Coq project where they were using “macros” to generate verified C code.


krismicinski
2019-2-11 20:39:30

Of course the macros were really Coq syntax that then compiled down using some complicated thing to theorems about a powerful separation logic, but the idea of like “macro assembly is C” was interesting to me.


samth
2019-2-11 20:45:33

@krismicinski I think they’re still doing that


krismicinski
2019-2-11 20:45:53

Yes, I think they are still doing this too, but I haven’t followed it at all. But it’s definitely a different thing than actual macros iirc


pezi_pink
2019-2-11 20:58:06

@krismicinski I find the notion of building languages as macros over an assembler quite fascinating. I have used this style in many of my projects now, it is great to have complete freedom to build up as many or little higher level abstractions as you like, seamlessly


pezi_pink
2019-2-11 20:58:53

I have also seen the Coq thing, theorem provers are not really my cup of tea, though.


thilking
2019-2-12 05:49:39

@thilking has joined the channel