Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions

mqudsi on most sites.
Submissions

comment 3y ago · link · parent

I actually disagree. I assume every law is subject to "at the discretion of the DA/judge" (or whoever is in charge). Do you think everyone needs to account for every emergency circumstance possible in every law? In real life, there's the law and then there are mitigating circumstances.

(A few years ago I could have said "we don't get ticketed by an AI that only follows the rules it was given." Well, we do now in many places and that's a problem.)

comment 3y ago · link · parent

I think the police and ambulance examples are interesting. To me, they're clear and blatant violations of the rule. To be sure, I certainly think it's ok that they broke the rule, but they still broke the rule. Yet some (45% of respondents) clearly think the rule wouldn't apply to them in the first place?

comment 3y ago · link · parent

I think Postgres could learn to write to a raw block devices (instead of over a fs) before jumping to this step.

comment 3y ago · link · parent

If you consider a firecracker app to be like a unikernel (just not integrated into one binary) then it’s certainly lighter weight than a Docker image.

comment 3y ago · link · parent

Great site. Some feedback:

* Main search (bottom center, not top right) taking over the screen when you click on desktop is terrible ux

* Should support some fuzzy search or misspelling tolerance, e.g. Cuzco for Cusco

* Valencia, Spain gives a 500 error

* No keyboard bindings when searching to navigate up/down between the matching results (e.g. type in 'Valencia' and I expect I can use the down key to choose which of the three results)

comment 3y ago · link · parent

Ulid is an ordered UUID canonically rendered in not Base36 but Crockford's Base32 (to make it easier to read then write or read aloud or parse and error correct).

comment 3y ago · link · parent

Curious as to people’s experience with Svelte (or SvelteKit) for making so-called “native” apps via Electron/Taurus/etc?

(I believe the new 1Password app is powered by Svelte.)

comment 3y ago · link · parent

Would SvelteKit be a better comparison then?

comment 3y ago · link · parent

There absolutely is an epidemic of troll answers on Reddit but not on programming subs, presumably precisely because of the aforementioned reasons. The kind of person that knows the actual answer (or has sufficient background knowledge to BS a believable answer) is the kind of person that won't post a troll answer in a programming sub. The kind of person that will post a troll answer won't have the requisite background knowledge and will be immediately "outed" and downvoted on the more legitimate (not r/all) subs, and eventually be discouraged from trying.

ChatGPT is immune to this organic feedback loop.

comment 3y ago · link · parent

Yes, but it's not just that there's only "a chance" that the collision is avoided - that would be enough if it was actually just a random probability (after all, everything about hashing and collisions - in the best textbook case - is just chance). The problem is that there are methods for obtaining what we call "seed-independent collisions" where by analyzing the hashing algorithm itself you can actually determine a priori values that will collide regardless of the seed.

If you have half an hour to spare, I really recommend you take the time to read this: http://emboss.github.io/blog/2012/12/14/breaking-murmur-hash...

comment 3y ago · link · parent

Really no. I’ll quote myself replying to another HN comment:

> If you go to ChatGPT and just ask it, you’ll get the equivalent of asking Reddit: a decent chance of someone writing you some fan-fiction, or providing plausible bullshit for the lulz.

I disagree. A layman can’t troll someone from the industry let alone a subject matter expert but ChatGPT can. It knows all the right shibboleths, appears to have the domain knowledge, then gets you in your weak spot: individual plausible facts that just aren’t true. Reddit trolls generally troll “noobs” asking entry-level questions or other readers. It’s like understanding why trolls like that exist on Reddit but not StackOverflow. And why SO has a hard ban on AI-generated answers: because the existing controls to defend against that kind of trash answer rely on sniff tests that ChatGPT passes handily.. until put to actual scrutiny.

comment 3y ago · link · parent

Seeding is kind of a hack. It doesn’t guarantee you’ll avoid a (or even the same) collision, and quite a few “popular” hashes only change the output (but don’t change whether or not there is a collision) when you change the seed.

Thanks for the article, though!

comment 3y ago · link · parent

Yeah, I was really into that before there was even a cross-compiler/cross-platform syntax for declaring TLS values in C++ but have since “upgraded” to avoiding TLS altogether where possible. The quality of the implementations vary greatly from compiler and platform to compiler and platform, you run into weird issues with thread_at exit if they’re not primitive types, they run afoul of any fibers/coroutines/etc that have since become extremely prevalent, and a few other things.

comment 3y ago · link · parent

I approve of the use of relative metrics, Austin! Just be prepared for mmhash4 to be a few megabytes in size ;)

comment 3y ago · link · parent

> Many states are pushing for tag fees based upon the average revenue per gas/disel vehicle per year without regard to those vehicles MPG. Given that a lot of EVs are replacing high MPG vehicles, the formulations are incredibly unfair.

Is it, though? Does the taxation rate matter more than the total collected per year distributed by the number of users? If you aren’t counting/won’t count miles driven, this seems like a fair alternative. The idea isn’t to tax 21 cents a gallon - that’s the implementation detail - the idea is to collect $xx billion a year to (ostensibly) pay for transportation related costs.

To use a logical proof instead, assume all cars are converted to EV with the flick of a wand. Do you think your proposal would seriously last? The same amount (modulo some percentage) needs to be collected to pay for whatever costs are relying on that tax to be funded. The rate (not the total price) has to go up for EV users.

Now if gas at the pump included an explicit carbon tax then absolutely, that shouldn’t be ported over to the rate EV users are charged.

comment 3y ago · link · parent

Great intro to hashing but if the concept of mmhash3’s seed is going to be brought up I think it’s only natural to mention its design limitations and why you still need something actually ddos resistant like SIP hash (even if we don’t get into the details of the latter).

Also, it’s important to distinguish between hashing, hashing, and hashing. That is, hashing to map input to buckets, hashing to obscure the original string, and hashing to find similarities in the input data. They’re all called hashing but they have different (and conflicting!) requirements. There’s a reason you want mmhash3 to be fast but scrypt to be slow, and a reason why you want mmhash3 to avalanche but certainly don’t want your perceptual hashing algo of choice to do the same.

comment 3y ago · link · parent

> Adding entire tables just doesn't seem worth it for this use case alone.

If you peek at a particular table often enough and it has a crazy enough enum to maybe justify making your life a little easier, what you can do is add a table just for debug purposes and use a view that maps the int to it, but otherwise only use the direct int:enum cast in your app/orm/etc. thereby not paying any runtime cost for foreign keys or integrity checking.

comment 3y ago · link · parent

It sure sounds like a bug to me, too! Is there an upstream bug id? I’d imagine dump/restore should “just work” with anything that can be done in postgres oob.

comment 3y ago · link · parent

Most ORMs or just DALs can automate step 3 for you. If you’re using a strongly typed language with any type of ffi support, you’ll probably already have native cast from int to enum available (unless you’re using rust where that’s considered unsafe by default).

comment 3y ago · link · parent

I have a two-liner shell script that turns a csv into a virtual SQLite db (./to_sql.sh foo.csv) and lets me use the full power of SQLite. Usually that’s enough for my purposes, but I do use pgsql‘s copy from csv to generate tables representing foreign data imported from a csv (say census info or NAICS occupation codes).

comment 3y ago · link · parent

Well C# is strongly typed so that’s punted to the CLR type system (assuming you’re not using raw sql to insert values via other means/frontends) - but it isn’t too hard to forcibly to cast a raw int to an enum in C# which doesn’t actually contain a definition with that integral value (unlike in even stronger typed languages eg in rust where it’s a lot more work).

I “manually” add a check constraint (via EF, so it’s not so much manual as it is “remember to copy and paste this in your db.cs) to assert the value is greater than or equal to zero and less than the number of inhabitants in the enum, but this fails if you manually code the enum values (eg for flags, legacy interop, etc).

comment 3y ago · link · parent

If you run postgres under WSLv1 (now available on Server Edition as well), the WSL subsystem handles processes and virtual memory in a way that has been specifically designed to optimize process initialization as compared to the traditional Win32 approach.

comment 3y ago · link · parent

Because global variables can be confined to individual cpp files, exclusively visible in that compilation unit. It makes them far easier to reason with than hoisting them to the "global and globally visible" option if you just use a gargantuan struct. Which is why a more invasive refactor might be required.

comment 3y ago · link · parent

> which (aside from making VM development more complicated) significantly increases lock traffic and thus runtime costs, which noticeably impacts single-threaded performance, which is of major import.

I don't think that's a fair characterization of the trade offs. Acquiring uncontended mutexes is basically free (and fairly side-effect free) so single-threaded performance will not be noticeably impacted.

Every large C project I'm aware of (read: kernels) that has publicly switched from coarse locks to fine-grained locks has considered it to be a huge win with little to no impact on single-threaded performance. You can even gain performance if you chop up objects or allocations into finer-grained blobs to fit your finer-grained locking strategy because it can play nicer with cache friendliness (accessing one bit of code doesn't kick the other bits of code out of the cache).

comment 3y ago · link · parent

It kind of is in rust now, with module-level documentation given its own specific AST representation instead of just being a comment at the top of the file (a file is a module).

comment 3y ago · link · parent

> solvable without a full switch to a threaded model (eg. by having pooling built-in and session-state-aware).

Yeeeeesssss, but solving that is solving the hardest part of switching to a threaded model. It requires the team to come terms with the global state and encapsulating session state in a non-global struct.

comment 3y ago · link · parent

What percentage of a non-negligible amount of fresh water pumped/dumped into the ocean is returned to the freshwater ecosystem/loop given, say, 10 years?

comment 3y ago · link · parent

Our free Oem Key Tool [0] will retrieve the key encoded in the MDSM firmware table for Windows 8, 10, and 11, if anyone needs such facilities.

[0]: https://neosmart.net/OemKey/

1769.

Why Daniel Ellsberg tried to get prosecuted near his life’s end(nytimes.com ↗)

3 points · by ComputerGuru · 3y ago · 1 comment

comment 3y ago · link · parent

Stolen tools being sold on the blackmarket != tools being sold with government knowledge and permission.

Maybe there are actual examples, but this isn't one of them.

1
585960
277