Better HN
topnewbestaskshowjobs
Log inSign up

johnwbyrd

186 karma · joined Aug 30, 2014 (12y ago) · 28 submissions

Submissions

comment 6mo ago · link · parent

I'll just leave this here

https://www.llvm-mos.com

comment 1y ago · link · parent

I'm surprised, and a little disappointed, that no one in this thread has mentioned parsing expression grammars (https://en.wikipedia.org/wiki/Parsing_expression_grammar) which are a much more human-friendly form of grammar for real-world parsing tasks.

comment 2y ago · link · parent

Yes, but I'm concerned about the number of existing browser engines that have fallen by the wayside, as the project founders have become exhausted. The scope of such a project is incredibly easy to underestimate, and it has only ever gotten larger.

Some examples: https://www.reddit.com/r/browsers/comments/124kphe/what_do_y...

comment 2y ago · link · parent

Thank you Plop, but nowadays we have a profusion of blessings, including VenToy, iVenToy, and netboot.xyz.

comment 2y ago · link · parent

ME: How can I get you to fuck off and leave me alone?

META AI: I understand that you may be frustrated, but I'm here to help and provide information. I am not capable of taking offense or feeling emotions, but I want to assure you that my purpose is to assist and provide helpful responses. If you have any specific questions or topics you would like to discuss, I am here to help. If you would like to take a break from our conversation, I understand, and you can always come back when you are ready. Please feel free to ask me any questions or clarify how I can assist you further.

There you have it. Meta AI is a stalker.

comment 2y ago · link · parent

Fun project, but fairly old news at this point.

comment 2y ago · link · parent

What I want is a dollar for every evangelist and every early adopter that has told me that the ?R explosion is right around the corner. I have worked in the game industry for 30 years and would be well retired by now, had I made my money by listening to people tell me how ?R would be mainstream in Just A Few Years Now. The tech industry NEVER tires of telling that story and hearing it. Yet it never, ever, EVER happens as a mainstream product.

comment 2y ago · link · parent

Classic premature optimization, assuming that hardware functions must be revealed in language features. If you can't get your integers closed under addition from the get-go, what hope do you have of writing a secure programming language?

comment 2y ago · link · parent

We don’t need any more computer languages. Still, you will run right off and invent another one. Let me guess, your amazing new language uses IEEE-754 math and fixed-precision integers. Your amazing new language is broken.

https://www.quora.com/What-are-some-things-that-only-someone...

comment 3y ago · link · parent

https://www.youtube.com/watch?v=2lW3WHPtmKo

comment 3y ago · link · parent

Seems like your problem is more with the venerable 6502 itself rather than the compiler. Most of that assembly code is spent calculating the offsets inside the Ball struct, which must be done at 16 bits of resolution in every case. The compiler's using the indirect indexed (zero page address with Y offset) 6502 addressing mode to get at all the fields in your struct. It has placed all the variables in zero page, so no instruction is more than two bytes long; additionally, the code in question is entirely linear, with no JSRs or other subroutines. Note in particular how it efficiently uses DEY/INY pairs of one byte instructions to get at low and high bytes of 16-bit memory. Hand-written assembly might be speedier, but not by much and still deal with all the corner cases that your generated code does. "While writing Apple BASIC for a 6502 microprocessor I repeatedly encountered a variant of Murphy's Law. Briefly stated, any routine operating on 16 bit data will require at least twice the code that it should." -Steve Wozniak

comment 3y ago · link · parent

The loading screen reports 130 BogoMIPS, but remember that it's emulating the timer as well, so the number is meaningless.

comment 3y ago · link · parent

Says you. llvm-mos generates surprisingly efficient 6502 code given its age and maturity. Don't take my word for it, try some experiments with it on godbolt.

comment 3y ago · link · parent

Yes, if you use an REU, which is a correctly contemporary memory upgrade for the C64.

comment 3y ago · link · parent

Onno Kortman has taken semu, a minimal RISC-V emulator, and cross-compiled it with llvm-mos, an LLVM port to the MOS 6502 processor, in order to run Linux on the Commodore 64. Kortman writes: "The screenshots took VICE a couple hours in 'warp mode' to generate. So, as is, a real C64 should be able to boot Linux within a week or so."

16.

Linux on a Commodore 64(github.com ↗)

227 points · by johnwbyrd · 3y ago · 93 comments

comment 5y ago · link · parent

Your assumptions are correct.

comment 5y ago · link · parent

Disclaimer: I'm working on llvm-mos.

https://llvm-mos.org/wiki/Rationale

comment 8y ago · link · parent

Other than permuting itself, what did it do that was sophisticated? Code morphing viruses have been around for a very long time, much longer than 2000. Simple replication does not constitute sophistication. Even my brother in law does that.

comment 8y ago · link · parent

I hadn't read the book when I wrote the article. I tried to get all the salient facts in, with as few words as possible. "Omit needless words" - Wm. Strunk.

comment 8y ago · link · parent

Yeah, you understand exactly what I was trying to convey when I wrote the article. Thanks.

comment 8y ago · link · parent

In Kaspersky's defense, they have started making their source code auditable for certain customers. Kaspersky is well aware of how they are perceived as a company, and they are aware that if anyone ever traces any of their activities back to the KGB, it's game over for them. I can't pretend I trust Kaspersky 100%, but I can see why others might.

comment 8y ago · link · parent

That is an utterly braindead assertion.

I wrote the quoted article about Stuxnet. And I've helped write multiple operating systems.

Your argument not an argument. It's just a random assertion with no technical knowledge of either Stuxnet or how to write an operating system.

Stuxnet specifically took advantage of Windows's lack of sophistication in order to replicate.

comment 11y ago · link · parent

Do we just not teach lex and yacc anymore? Or any other LALR type parser generation system?

25.

More Git koans(johnbyrd.org ↗)

5 points · by johnwbyrd · 11y ago · discuss

comment 12y ago · link · parent

I've heard it said, "We work eighty hours a week so we don't have to work forty hours a week." Me, I do it because I have a particular vision, and I think that the world would be better off if that vision actually existed. Can't do that while working for a bank.

comment 12y ago · link · parent

Show me a programmer who is trying to reoptimize the STL, and I'll show you a programmer who is about to be laid off.

The guy who tried this at EA didn't last long there.

comment 12y ago · link · parent

If you're spending a lot of time changing the size of a std::vector array, then maybe std::vector isn't the right type of structure to begin with...