Perhaps there is some evidence that people do get excited about free school lunches: Governor Tim Walz’s lunch policy in Minnesota has been a part of the buzz surrounding his recent Vice Presidential nomination.
For me, Naltrexone was an incredible help in reducing cravings in the first few months. I came off it after around six months and no longer need it, though I think many people take it for much longer and there's not much downside to doing so.
I avoided AA due to the quasi-religious aspect, but Smart Recovery meetings helped me in the initial phase (https://www.smartrecovery.org).
I was always concerned about the longer term aspect of replacing alcohol in social settings, and there is still some awkwardness there but non-alcoholic beers have really helped for me. The scene has exploded in recent years and they're really quite good, see Athletic Brewing for some excellent craft non-alcoholic beers (https://athleticbrewing.com). In a social setting you could be drinking one and nobody would have to know. I don't hide it but I'm still glad to have something "special" to drink at an occasion. And I drink them alone too: they fill that role of something to drink when I want to relax, and I enjoy that placebo effect.
The sample code is in a file with special comments at the end of each line specifying which slide numbers it should be revealed on as well as inline commentary to show to the right of the line. Syntax highlighting is provided by Pygments.
I was thinking about open sourcing it, it's actually only approx 200 lines of Python but I think it's quite effective.
I was just thinking that syntax highlighting plus line colors should be fairly easy to do, and doesn't justify paying for such a service. I would be interested to see your solution if you do decide to open source it, especially as you say it is simple - I like elegance :)
Only a small number of instructions in Go assembly are architecture neutral.
avo currently implements the x86 subset of Go assembler. It's definitely possible to add support for additional architectures, but it may be a fairly significant project.
Yes multi-architecture support is definitely something I've had in mind. However I wanted to limit the scope for the initial version, so I could produce a result in a reasonable time and allow me to gauge interest.
> It would be super useful if you could generate the code to memory then execute it directly.
avo was inspired by PeachPy and asmjit, both of which can produce executable code directly. So implementing an assembler in avo is something I have had in the back of my mind. However it wasn't one of my primary goals.
Unfortunately because PeachPy wasn't initially written with Go in mind there are some rough edges and Go features it simply doesn't support. avo hopes to fill this gap for Go programmers.
We actually had Marat come to the Go meetup in Atlanta when he was finishing up his PHD at GT. He had done some preliminary work on SIMD. It was a small meetup ( I think only ~6-7 in attendance) and went over many folks heads, since a lot of people were focused on breaking up Ruby monoliths into Go. SIMD would have been nice, but really we were still reveling in the benefits of getting the hell out of ruby for high-throughput networked services. https://docs.google.com/presentation/d/1MYg8PyhEf0oIvZ9YU2pa...
Author of avo here. While I did really enjoy working on this project, I still fully agree with you.
Go (Plan 9) syntax is not sufficiently different to make it a powerful intermediate representation, hence SSA as you point out. In fact many of the differences are frustrating subtle changes in instruction mnemonics or operand order. This might be okay if there was a canonical instruction database that made all these differences from Intel and AT&T easy to discover. However these exceptions are really recorded in various parts of the golang.org/x/arch/x86 repo. Producing the instruction database for avo was quite a time-consuming process. See:
I've gained a lot more familiarity with the assembler and supporting
infrastructure, so I'm hoping I may be able to contribute to this area of the core Go
project.
Yeah, AT&T syntax has much of the same issues of poor documentation. In particular, operand order is easy to remember for 2-operand instructions: it's reversed in AT&T. But now with SSE and AVX we have 3- or 4-operand instructions, and the AT&T versions sometimes put the operands in (2, 1, 3), sometimes in (3, 2, 1), etc. There's no documentation for this aside from GCC as far as I can tell. :(
It gets to the point where the only source of truth is the Go assembler itself. My test suite takes the avo instruction database and generates a massive assembly file with one line per instruction form, then passes this to `go tool asm`.
Even just mapping between the mnemonics is non-trivial. You want to think that it's just a matter of removing size suffixes from AT&T, but it's sadly not that simple. "movslq" in AT&T maps not to "movsl" or even "movs" in Intel, but "movsxd". How is anybody supposed to figure that out?
https://www.cnbc.com/2024/08/19/universal-free-school-lunche...