News for hackers. Stuff that matters.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by userbinator on Monday October 13, 2014 @10:28AM (#8448830)
That reminds me of this, a slightly bigger AVR emulating an ARM SoC running Linux:

http://dmitry.gr/index.php?r=05.Projects&proj=07.+Linux+on+8...

Emulate that system instead, and now you can theoretically boot a Linux system inside of TeX.

Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by stettberger on Monday October 13, 2014 @10:30AM (#8448836)
I already considered that, but until now i did not implement many peripheral devices. But when implemented those, it should be possible. But at the moment i'm rather thinking of an VHDL netlist emulator in TeX.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by apricot on Monday October 13, 2014 @11:18AM (#8449021)
In the 1990s, when I was in college, I wrote a 6502 emulator in a text editor macro language (the text editor was QEdit, a DOS editor that was popular at the time). It was completely useless but a lot of fun.

There was a very low hard limit on the number of jumps (32, if I recall correctly) that complicated things. I eventually had to resort to a two step process, first translating 6502 code to a simpler virtual machine (using and abusing the find-and-replace command), and then executing that simpler code.

Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by msarnoff on Monday October 13, 2014 @02:10PM (#8449792)
I wonder if this could be modified to control actual hardware? It looks the `\write18` command can be used to execute shell commands if LaTeX is run with the `--shell-escape` option. So in theory you could intercept all writes to the GPIO control registers and use a shell command to send bytes over the serial port to a physical MCU (or something like the SparkFun SPI Shortcut.)

Imagine a LaTeX document that, when processed, reads a series of measurements from a sensor over the serial port, then renders nice graphs directly to a PDF! :)

Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by MechSkep on Monday October 13, 2014 @08:00PM (#8451278)
I was looking for this workflow for my research, and ended up going with an ipython notebook.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by SeanLuke on Monday October 13, 2014 @08:33AM (#8448425)
To be pedantic: this code is largely in TeX, not LaTeX.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by stettberger on Monday October 13, 2014 @08:46AM (#8448466)
This is true, but largly in TeX and only Parts of it in LaTeX is still LaTeX. But you're right, I did use only a few rudimentary features.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by SeanLuke on Monday October 13, 2014 @09:54AM (#8448708)
I think this is the minority view of LaTeX: it's built on top of and is a subset of TeX, not a superset. No one would ever consider \def to be LaTeX for example.

Not to denigrate what you produced of course.

Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by RBerenguel on Monday October 13, 2014 @03:41PM (#8450188)
I've always thought of LaTeX as more of a superset, but I see where you are coming at (I've read the TeXbook)
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by Extigy on Monday October 13, 2014 @09:57AM (#8448715)
This is mental and I love it.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by grundprinzip on Monday October 13, 2014 @09:22AM (#8448588)
Nice work, though I liked the dataref package even more!
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by stettberger on Monday October 13, 2014 @10:11AM (#8448758)
The dataref package is intended to be useful (and it acutally is). Avremu was only a long trip in sweden without internet, an editor and a reference manual.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by f137 on Monday October 13, 2014 @03:34PM (#8450160)
We need more of this.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by dsugarman on Monday October 13, 2014 @12:35PM (#8449388)
this is cool and you seem obviously intelligent, have you considered making something people want?
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by marvy on Monday October 13, 2014 @01:31PM (#8449633)
sometimes, cool is enough :) I might actually want this though. C is much more convenient than TeX to code in, and yet sometimes you have no choice. Until now.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by xg15 on Monday October 13, 2014 @10:49AM (#8448907)
why?
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by stettberger on Monday October 13, 2014 @11:28AM (#8449072)
Sweden, Too much time, Masterthesis was submitted.
Re:Show HN: Avremu – An 8-Bit Microcontroller in Pure LaTeX by adhambadr on Monday October 13, 2014 @09:48AM (#8448681)
"Are you insane? Not that anybody knows of."

hahaha that cracked me up, especially that i actually considered the possibility when i read the title.