Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pubby
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
pubby
4y ago
I think it's possible LLVM-MOS gets into mainline LLVM eventually. The devs have done a good job getting all the kinks ironed out. BTW, mysterymath, one of the most prominent LLVM-MOS contributors, left this comment on their current co
62.
▲
by
pubby
4y ago
Since it combines register allocation with instruction spilling is innate - there isn't a special spilling phase. Spilled variables are assigned ram addresses after code generation occurs at link time, with the most frequently used goi
63.
▲
by
pubby
4y ago
FWIW the custom language is very close to C, and the examples are pretty much a 1-1 transposition. I agree with you though on a different note. It's dubious to compare compilers by benchmarking them, because tests are highly arbitrary
64.
▲
by
pubby
4y ago
From a quick skim of Massalin's paper, they seem similar in how they generate combinations of instructions and prune, but different in other areas. Superoptimizer spews out every combination of instruction (even invalid ones) in a sear
65.
▲
Explaining my fast 6502 code generator
(pubby.games)
217 points
by
pubby
4y ago
|
49 comments
66.
▲
by
pubby
4y ago
You need to take Wirth's law into consideration.
67.
▲
by
pubby
4y ago
There is a cost: subroutine calls get wrapped in something called a trampoline, and some data is duplicated across multiple banks. You would do both of these things in assembly language too, and could even do it more optimally, but it'
68.
▲
by
pubby
4y ago
LLVM and GCC are great at optimizing until the last leg of the race where they convert IR to assembly code. Their back-ends were designed for modern systems, not the ancient 6502, and so getting them to work involves kludges and clever hack
69.
▲
by
pubby
4y ago
I think it helps that I'm not working as a software developer right now, so I have more energy for coding projects. (I'd like to write software professionally, but no company responds to my applications.) Regarding time, I have th
70.
▲
by
pubby
4y ago
Yeah, external bugs suck, but usually there's workarounds. > Is this because you draw attention to an unfinished project, get distracted by feature requests or praise, or something else? If you get a bad reaction, you'll be dem
71.
▲
by
pubby
4y ago
There's no built-in support for that, but you can still do it. Nowadays flash memory is used rather than battery stuff, but the idea remains the same.
72.
▲
by
pubby
4y ago
Motivation was sporadic. I'd have a few weeks of intense focus, followed by months of inactivity. The nice thing about compilers it that 90% of their code is interesting, so there was always something fun worth coming back to. Besides,
73.
▲
by
pubby
4y ago
I like 6502 assembly a whole lot, but there's definitely limitations to it at scale. Multi-byte arithmetic is a chore, bank switching is a pointless time sink, and managing local variables makes me want to pull my hair out. Those were
74.
▲
by
pubby
4y ago
There's standardized names for the graphics registers. The convention for the sound registers is to use the address itself, as there are lots of sound registers and each does multiple things.
75.
▲
by
pubby
4y ago
For languages with significant whitespace, mixing tabs and spaces can be very error prone. It can look like two lines of code have the same indentation, but if the compiler's tab width doesn't match yours it would not parse correc
76.
▲
by
pubby
4y ago
That was the original plan, but I veered off to focus on doing one system really well. I figured if some company wanted to sponsor a port, I could do it, but otherwise I'd direct people to other compilers like LLVM-MOS. I do think it&#
77.
▲
Show HN: NESFab – Programming language for making NES games
(pubby.games)
298 points
by
pubby
4y ago
|
90 comments
78.
▲
by
pubby
4y ago
I'm kinda confused about what you said regarding free(). The linked Github page has a free(), but it doesn't appear to be a NOOP.
79.
▲
by
pubby
4y ago
Two fun facts about kidney stones: 1) Roller coasters help dislodge and pass kidney stones because of their high-intensity jerky motions. 2) Although calcium supplements increase the risk of kidney stones, dietary calcium seems to reduce it
80.
▲
by
pubby
4y ago
This strategy is low-risk but also low-reward. The most successful people in life often gain expertise in some specific, changing area, then get extremely lucky to have it pan out. I think of the Admiral Chester Nimitz. All of his peers stu
81.
▲
by
pubby
4y ago
This article downplays the theft problem. Too many Hyundais were shipped without immobilizers and this kills the brand's image.
82.
▲
by
pubby
4y ago
Plastic is useful for being an insulator so it's used in electronics a lot.
83.
▲
by
pubby
4y ago
I've been dumpster diving several times. Dumpsters with food tend to be awful - they smell, have flies, mold, and grease everywhere. If you want free food, just go to a programmer meetup and eat their free pizza.
84.
▲
by
pubby
4y ago
Is it typical for trains to be custom made? For some reason I had imagined them to be made like cars
85.
▲
by
pubby
4y ago
I'm coming from a c++ and functional perspective but this seems very counter intuitive to me. Can you explain why they're bad? My assumption was it's easier to reason about objects the less they share.
86.
▲
by
pubby
4y ago
Gosh, Britain doesn't have two shower heads per shower (one hot, one cold), does it? I know they do that for taps.
87.
▲
by
pubby
4y ago
Location: Missouri, USA Remote: Yes Willing to relocate: After 6+ months of remote Technologies: C, C++, Javascript, Haskell Résumé/CV: On request Email: patrickjordanbene@gmail.com Good with compilers, optimization,
88.
▲
by
pubby
4y ago
Pretty sure it is. https://en.m.wikipedia.org/wiki/Food_irradiation
89.
▲
by
pubby
4y ago
> how was the communities' desire not implicitly understood? IMO it's common for people at the top of a hierarchy to be out of touch with those on the bottom. It takes dedication to stay in touch, but even with effort a bigwig
90.
▲
by
pubby
4y ago
In a somewhat-related area, Alan Kay viewed object-oriented programming as cells (objects) and their transport proteins (messages). Like biology, the system is a big ugly mess, but it's made up of tiny self-contained units that can han
More ›