

?!?

@martin.saurer has joined the channel

@johnstonskj has joined the channel

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.

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


I am using them as datum-literals
in some expressions

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

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

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.

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 !

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

prolog uses \|

but not \|\|
, I think

@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.

hopefully do something with clock signals as well


Suddenly gets an itch to write a c64 demo.

@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:

This looks great.

Pretty easy to make, sine tables:

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

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

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

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

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

Nifty.

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

Never tried programming a SNES.

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

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.

@krismicinski I think they’re still doing that

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

@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

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

@thilking has joined the channel