Hacker Newsnew | past | comments | ask | show | jobs | submit | stettberger's commentslogin

I had quite some fun implementing this at a very lovely lake in Sweden, while my colleagues were attending GPCE.


That's absolutely hilarious, and a pretty fun hack.

By the way, if I understood you correctly, this sentence

> I'm still missing 5 opcodes (MULS, MULSU, FMUL, FMULS, FMULSU), but until now I did not encounter a C file, the AVR-GCC emits these opcodes.

could be rewritten as

> There are 5 opcodes that are not implemented (MULS, MULSU, FMUL, FMULS, FMULSU), as I have not yet encountered a C file for which AVR-GCC emits these opcodes.


The classic AVR instruction set does not include multiplication, you have to be targeting a device that supports AVRe+, such as an ATmega rather than an ATtiny. Try adding -mmcu=avr5 and it will show up pretty quick. Example: https://godbolt.org/z/x951M8fn8

Edit: nice work author, I love it!


> rather than an ATtiny

The new ATtiny 0/1/2-series parts are full AVRxt cores with a few instructions removed due to lack of need for large memory access. The classic terminology differentiating product lines isn't particularly useful anymore. ATtiny can multiply now.


> I had quite some fun implementing this at a very lovely lake in Sweden

Was there a wonderful telephone system and many interesting furry animals?


You would not believe it, but I just created (this week) a Latex TikZ library that helps me to create templates / journal inserts for the use case of handwritten notes. Although I believe in DIN A5 paper, it might be useful for someone:

https://github.com/stettberger/notebook


How can I get the columns at the bottom, above the page number? Is that possible?


Sure that is directly possible without further tinkering:

\notebookpage{todo={[bottom,draw]3},fill dotted,paginate}

This will create a dotted page with 3x2 todo notes at the bottom. The todo fields are surrounded by a box (draw), and the page is paginated.


Perfect! Thank you.


And I won't tell you whether the material is required to pass the exam or not!


Some of my students had to idea to implement the solutions in Rust, but this will require a bit more of an effort...


That is very cool! Do you have a link to that implementation? I would be very interested in the problems that arise when you want to provide a rock solid implementation of this.


Hi! Author of DynamicScope<T> here.

Regarding threads: It is correct that the current version of the template has a problem with multi-threaded programs. However, as adding 'thread_local' to the global variable is sufficient to solve the problem, I did not mention this in the original post. However, I updated the blog post in this direction. Furthermore, I added a (run-time) check that ensures that you use DynamicScope<T> only with thread_local.

Regarding Lambdas: I don't think there is a problem here. Dynamically scoped variables promise to return that value that is the most currenly bound in the current execution context. As the resolution is done on dereferencing, this is the exact behavior that DynamicScope<T> provides. This means that a lambda does not (lexically) catch the value of the dynamically-scope variable at definition time, but at the execution time of the lambda.


Sweden, Too much time, Masterthesis was submitted.


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.


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.


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.


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.


I've always thought of LaTeX as more of a superset, but I see where you are coming at (I've read the TeXbook)


Next step is a Ringworld?


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: