HNHacker News
TopNewBestAskShowJobs

harrison_clarke

316 karma · joined March 23, 2013

submissionscomments
harrison_clarke··on Practical UX for startups surviving without a designer
those menus started to slip a long time ago. they got larger, less organized, and got lazier about mentioning the keyboard shortcut. the new MS paint does a good blend of that style and a newer look

the current text editor trend of having a "command palette" is pretty nice. it's got a hard job to do, with the sheer number of commands and extensibility to add more, but search is pretty good for discoverability (as long as people name/tag/describe the commands well)

harrison_clarke··on I stopped everything and started writing C again
i never really understand why these get compared. i wouldn't expect that much overlap in the audiences

zig seems like someone wanted something between C and "the good parts" of C++, with the generations of cruft scrubbed out

rust seems like someone wanted a haskell-flavoured replacement for C++, and memory-safety

i would expect "zig for C++" to look more like D or Carbon than rust. and i'd expect "rust for C" to have memory safety and regions, and probably steal a few ocaml features

harrison_clarke··on What makes code hard to read: Visual patterns of complexity (2023)
you have this backwards: reusing code couples the code. copy+paste uncouples code

if you have two functions, they're not coupled. you change one, the other stays as-is

if you refactor it so that they both call a third function, they're now coupled. you can't change the part they have in common without either changing both, or uncoupling them by duplicating the code

(you often want that coupling, if it lines up with the semantics)

harrison_clarke··on Anti-Schelling points and waiting for my barista-made coffee
i don't think i've ever seen a cafe do that (unless you count mcdonald's as a cafe). even the starbuck's thing of using your name is rare, but others have picked it up

most cafes i've been in, the queue is usually short enough that the barista knows who ordered what. at peak times, they can't keep track of it, though, so the customers keep track themselves and it usually works well enough that nobody is going to optimize it

harrison_clarke··on Anti-Schelling points and waiting for my barista-made coffee
this is the other solution: it doesn't really matter if the queue is a bit out of order, if they all get the same thing with little delay
harrison_clarke··on Anti-Schelling points and waiting for my barista-made coffee
in the case of drink orders, there's a slight benefit to ordering something unique (at least unique within the queue you're standing in). you don't have to remember your place in line, or negotiate with someone else about who was there first

the space of possible drink orders isn't so large that you'll be collision-free by default (like UUIDs), so there's some incentive to guess what other people will order, and adjust your order to avoid collisions

harrison_clarke··on Body Doubling
office hours is something i consider a positive, when looking at a job. i get that i could/should solve those things on my own, but it requires executive function and i'd much rather outsource some of it

with both the social and the walking thing, i find it easy to get stuck in a negative feedback loop, where not doing it makes it harder to do it. having a work-mandated minimum walk and social time prevents stalling, making it easier to maintain the habits outside of work as well

this perspective might be flavoured by being neurospicy, though. presumably, if i wasn't prone to stalling my habits that way, it'd be less appealing to tie them to a job or shcool or whatever else

(i currently work remote, though. office is positive, but not positive enough to outweigh the salary difference of working for a local company)

harrison_clarke··on Optimistic Locking in B-Trees
a u16 can address it, which is nice. it's also the minimum virtual address allocation on windows. not sure if either of those are the reason, in this case
harrison_clarke··on Introducing command And commandfor In HTML
C# has COMEFROM, too: https://github.com/dotnet/roslyn/blob/main/docs/features/int...

they make it cumbersome to use by hand, but not impossible

harrison_clarke··on Math Academy pulled me out of the Valley of Despair
the "smart" kids do seem to have those skills, though. either that, or they're being tutored on the side, or they just require fewer examples to get it

whatever the case is, i think the idea behind skipping grades is that the kid isn't learning much in the classes they're in. they may not learn much in the next level either, but it allows the school to test that they've learned what they were supposed to (from class or elsewhere), while wasting less of the student and teacher's time

that said, testing out seems like it'd be better than forcing the kids to sit through yet another math class, even if it's one level higher. more time to touch grass, or read in the library, etc.

harrison_clarke··on Math Academy pulled me out of the Valley of Despair
a lot of school is redundant, and the courses are often non-sequential

skipping chapters of a novel doesn't work very well, but it works great for the encyclopedia, and pretty well for a lot of textbooks

it's also not that hard to use khan academy or wikipedia to fill in the gaps, if you did miss something

harrison_clarke··on Canada proposes 100% tariffs on Tesla
[flagged]
harrison_clarke··on Framework's first desktop is a strange–but unique–mini ITX gaming PC
i think the thing that got me was that people wrote articles comparing this thing to a laptop GPU, and i didn't read far enough to notice. normally, people compare desktop stuff to desktop stuff, and laptop stuff to laptop stuff

i haven't bought a laptop gpu since ~2008. from what i remember, they used to at least put "mobility" in the name, or throw and 'm' after the number, or something

harrison_clarke··on Framework's first desktop is a strange–but unique–mini ITX gaming PC
well, that's a hostile naming scheme

from the specs, a mobile 4070 looks like its basically a 4060 ti, underclocked to ~60%

harrison_clarke··on Framework's first desktop is a strange–but unique–mini ITX gaming PC
a quick search told me that this thing's GPU (8060s) is comparable to a 4070

from what i can tell, a 4070 alone is ~$750. this thing is apparently $799 for the CPU+GPU+RAM+motherboard all soldered together ($300 more for case+PSU+SSD)

if the CPU+RAM+motherboard are costing me $50, i don't really care if i have to throw them out along with the GPU

harrison_clarke··on Framework's first desktop is a strange–but unique–mini ITX gaming PC
would have been cool to know about this a month ago

i just built a mini ITX gaming PC for a friend, and this one looks pretty good for quality/$. good enough that i wouldn't be surprised if these get snapped up and re-sold for more than the sticker price

i think it makes more sense to think of it as a high-end console, given that basically everything is soldered, though

harrison_clarke··on I built an app to stop me doomscrolling by touching grass
fun idea

i'm not going to see any grass for another few months, unless i travel somewhere warmer, though

harrison_clarke··on Why I'm writing a Scheme implementation in 2025: Async Rust
rust is definitely better than other languages for refcounting, since you don't pay for it on reads
harrison_clarke··on After 20 years, math couple solves major group theory problem
that guy is arguably causing branding problems for less powerful autistic people
harrison_clarke··on Why I'm writing a Scheme implementation in 2025: Async Rust
you could do it in rust with Arc<T>.get_mut

if you're implementing the clojure data structures, you wouldn't use a cell inside. semantically, they're immutable, and the operations on them all return copies that share nodes with the old one. if you know the old one won't be used, you can cheat and mutate it instead

the issue with using Arc for these data structures is that it's a fatter pointer (costs memory, causes cache pressure), and it requires atomics/fences. they also generate a ton of garbage in typical use-cases (unless you can do the mutation optimization). languages with a compacting GC also usually get a faster allocator

it's basically ideal conditions for a GC to outperform reference counting

harrison_clarke··on Fun with C++26 reflection: Keyword Arguments
C99 spec, section 6.5.2.5: https://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf

> 6. The value of the compound literal is that of an unnamed object initialized by the initializer list. If the compound literal occurs outside the body of a function, the object has static storage duration; otherwise, it has automatic storage duration associated with the enclosing block.

it's valid until the end of the block. so, if the function returns the pointer, you can even use that until the end of the block

there's actually an example in the spec, on that page:

> drawline(&(struct point){.x=1, .y=1}, &(struct point){.x=3, .y=4});

harrison_clarke··on Why I'm writing a Scheme implementation in 2025: Async Rust
there's no reason you couldn't do a clojure in rust

but the main implementation benefits from GC and making it easy to call host (java) methods. as far as i know, the core clojure data structures are kinda hard if you don't have a GC

harrison_clarke··on Fun with C++26 reflection: Keyword Arguments
i believe this is standard since c99

you do have to cast it, though: `foo((vec2){.x=2, .y=2})`

the oldest MSVC on godbolt also accepts it, so it should be very portable as long as you're not using some embedded compiler from the mid 90s

a related fun thing is that you can pass it by pointer, and the lifetime will extend until the function is done:

`foo(&(vec2){ .x=2, .y=2 })`

harrison_clarke··on Fun with C++26 reflection: Keyword Arguments
i think it's neat that you can do that

i'm going to stick to C, to prevent it from compiling, though

harrison_clarke··on Personal Software Is Becoming a Trend
a possible hack for that: write personal software to help you write the OSS project
harrison_clarke··on The Inevitability of the Borrow Checker
something i'd like to see in a borrow checker (which i think causes problems in rust, because of the "leaking is safe" thing. which sounds like it could be a difficult hole to plug in language design):

in rust, &mut means "this pointer points to an initialized value, and will point to an initalized value at the end of scope"

i wish it also had &in, &out, and &tmp, for "initialized->uninitialized", "uninitialized->initialized", and "uninitialized->uninitialized"

harrison_clarke··on The Inevitability of the Borrow Checker
i think of it like having rust's rules, but you only get one (implicit) lifetime variable

(that's probably wrong in some subtle ways)

harrison_clarke··on The inevitability of the borrow checker
you can stack allocate with just `struct` in C#. if you put a struct in a local variable, it'll be on the stack

`ref struct` allows that struct to contain refs, and disallows putting it on the heap (so, you can't have an array/list of ref structs, and a class or a normal struct can't have a ref struct field)

harrison_clarke··on Meta torrented & seeded 81.7 TB dataset containing copyrighted data
in my experience, taxi quality varies wildly depending on where you are

in bay area, it absolutely makes sense to invent uber, because the taxis were awful. and in vancouver (canada), they're also awful, and deserve the disruption: they would often tell you it'd be a 40 minute wait, and then just not show up

taxis in new york were and continue to be totally fine. you just stand outside and get in ~20 seconds later, with no hassles or apps. i've been in an uber/lyft a handful of times in nyc, but they're just worse (possibly cheaper, but the subway also gives them stiff competition, and i don't care that much if i'm in enough of a hurry to take a cab)

harrison_clarke··on Meta torrented & seeded 81.7 TB dataset containing copyrighted data
shouldn't there be a lot of political will from the traditional hotels and taxis, and their lawyers? i can see that the answer is "no", but i don't know why

especially with hotels, i would have expected there to be small enough oligopoly to overcome the freerider problem (taxis are more regional, so i don't expect them to be able to fight an (inter)national company very easily)

plus the president owning a hotel chain

← PreviousPage 2 of 4Next →