News for hackers. Stuff that matters.

swolchok

Re:Weird Lexical Syntax on Saturday November 02, 2024 @11:45AM (#42027063)
> C++ templates have a similar issue

TIL! I went and dug up a citation: https://blog.reverberate.org/2013/08/parsing-c-is-literally-...

Re:Were RNNs All We Needed? on Thursday October 03, 2024 @03:45PM (#41734217)
paper is paywalled; just logging into Medium won't do it
Re:Steve Yegge Joins as Head of Engineering of Sourcegraph on Tuesday October 04, 2022 @04:10PM (#33086029)
I loved it when I was younger, but I had trouble recommending it more recently because its tone is adjacent to personally attacking people who like Java.
Re:Everything Is Broken: Shipping Rust-Minidump at Mozilla on Thursday June 16, 2022 @12:33PM (#31768026)
Ugh. You are right, and that's sad.
> you can't trust that your enums have a value inside their interval

If you don't set the underlying type, assigning a value that doesn't match an enumerator via `static_cast` is undefined behavior. See https://en.cppreference.com/w/cpp/language/enum . (Doing weird pointer casting things is also undefined behavior per the strict aliasing rule, though, come to think of it, I'm not sure whether memcpying an out-of-range value into an enum through the "reinterpret_cast to `char*`" loophole is undefined behavior.)

The source displayed at the bottom if this page clearly shows it's just extrapolating from numbers that are older than 2020.
Re:Architecture of the Playstation on Wednesday June 23, 2021 @03:51PM (#27609209)
> Max Payne ran on a PIII @1GHZ with 128 of RAM

There was a port to the original Xbox, which had only 64 MB of RAM!

Re:The Sad Truth About C++ Copy Elision on Saturday April 03, 2021 @11:04AM (#26681599)
> without knowing how the code was built

The article links out to Compiler Explorer (https://godbolt.org/), which shows the exact compiler version and options and lets you play with different ones. It shouldn’t matter which compiler — the standard prohibits optimizing this.

Re:How to Read ARM64 Assembly Language on Monday March 15, 2021 @11:41AM (#26467289)
Is there a reason that the inner save and restore must be separate? Why couldn’t peephole optimization remove them?
Re:How to Read ARM64 Assembly Language on Monday March 15, 2021 @02:03AM (#26463018)
I had hoped that this article wouldn’t require x86 assembly fluency to read; it really is a “port” of my prior article on x86-64 assembly. I wrote it because mobile developers, at least, probably care more about ARM64 than x86-64. Is there anything I can do to make this article similarly approachable to the x86-64 one?
Re:How to Read ARM64 Assembly Language on Monday March 15, 2021 @12:52AM (#26462751)
I haven't tried this, don't work for Amazon, and only just found out, but https://aws.amazon.com/ec2/graviton/ says that "Until June 30th 2021, all new and existing AWS customers can try the t4g.micro instances free for up to 750 hours per month". t4g.micro instances are Graviton, which is ARM64. Note that 31 days is only 744 hours. Buyer beware, though: https://aws.amazon.com/ec2/instance-types/ only says the free trial is until March 31, 2021.
Re:How to Read Assembly Language on Sunday March 14, 2021 @01:22PM (#26456963)
Re:How to Read Assembly Language on Tuesday March 02, 2021 @12:21PM (#26317715)
> Scott Wolchok writes it

I didn’t write it, I just copied the compiler output from Godbolt so that the article could be read on mobile, where Godbolt’s UI doesn’t work so well and switching tabs back and forth is difficult.

Re:How to Read Assembly Language on Tuesday March 02, 2021 @10:32AM (#26316297)
I’d be happy to port the article to ARM64 if there was sufficient demand for that, but I think it’s still fairly niche among developers, right? (Apple, recent Android, niche server environments?)

Are you talking about ARM64 or ARMv7?

Re:How to Read Assembly Language on Tuesday March 02, 2021 @01:15AM (#26312388)
Thanks! Fix should deploy momentarily.

This is what I get for duplicating the examples across Godbolt and the post itself. It was originally 3D for no particular reason and I cut it to keep things short.

Re:Pico-8: Enabling more than 16 colors on the screen on Sunday June 28, 2020 @02:10AM (#23667044)
Pico-8 was included in the recent Bundle for Racial Justice and Equality (https://itch.io/b/520/bundle-for-racial-justice-and-equality) from itch.io. That bundle was huge and very popular, so you may own it without realizing.
The condition is known as "brain fog". For example: https://www.healthline.com/health/brain-fog#causes

I've also seen common cold listed as a potential cause, which definitely jibes with my experience.

Re:Nestur: NES Emulator in Rust on Monday January 06, 2020 @04:49PM (#21973768)
Re:42 is found to be the sum of three cubes on Friday September 06, 2019 @04:10PM (#20899438)
2^109 nanoseconds is still 150,000 times older than the universe. If you do manage to get a trillion computers, you can now solve the problem in twenty thousand years. It's still intractable.
Re:ICFP Programming Contest 2019 on Friday June 21, 2019 @02:27PM (#20245112)
I personally don't care for the navigation/optimization problem style of challenge that ICFP usually does, but I still check the problem yearly to see if it's back to being in the style of the 2006 ICFP (http://www.boundvariable.org/). (This year is not.)
Re:Where Has the Magic Gone? on Wednesday June 19, 2019 @03:59PM (#20226768)
I think of this attitude as being a stereotype of mathematicians. "I've already proved that a solution must exist; finding it is just drudgery." Perhaps the author would enjoy branching into one of the more theoretical branches of the discipline, like theory of computation, cryptography, or mathematics proper?
Re:Green threads explained in 200 lines of Rust on Wednesday June 12, 2019 @04:58PM (#20169259)
FWIW, there is POSIX-specified functionality (swapcontext and friends) for changing the user thread context: http://pubs.opengroup.org/onlinepubs/009695399/functions/swa...
Re:Compiling C to WebAssembly Without Emscripten on Sunday June 02, 2019 @03:10PM (#20077349)
> -O3

If size is really important, you probably want to try -Os (optimize for size) and -Oz (try harder to optimize for size, including at the expense of CPU) as well.

> LTO

If your project gets big enough that -flto results in unacceptable link times, try -flto=thin.

Re:Apple App Store Principles and Practices on Wednesday May 29, 2019 @02:35PM (#20043748)
Isn't the cost $99 per year per developer account, not $99 per year per app?
Re:The world might run out of people on Wednesday February 06, 2019 @07:37PM (#19101819)
> pay will sky rocket

Why do you think that this will entirely fail to incentivize prospective retirees to work for more total years of their lives in order to benefit from increased pay?

Re:The world might run out of people on Wednesday February 06, 2019 @11:19AM (#19096409)
> Inflation will eat most of your savings

What? This is why investment advice for retirement generally revolves around allocation into stocks and bonds while leaving only an emergency fund plus regular expenses in more liquid assets like savings accounts. Inflation will only eat your savings if you fail to invest. If you want to talk about risk, well, inflation is why a total failure to accept risk is extremely risky!

PICO-8 limits the textual size of your input Lua file, so I'd imagine that it might be possible to squeeze more content into your game with a small interpreter and packed binary format represented as a printable string.

Older »