HNHacker News
TopNewBestAskShowJobs

quelltext

1,004 karma · joined November 21, 2016

submissionscomments
quelltext··on Oracle Contributing GraalVM Community Edition Java Code to OpenJDK
I think that's the piece that got me and grand-GP maybe confused.

You are writing a GC in Java, yes but have access to low-level memory abstractions/interfaces, right?

Whereas I was initially wondering how to write a GC in "pure Java" that doesn't have access to low-level memory interfaces.

Does it make sense why I was asking, now? Or am I still not getting it?

To be clear, Java the language is Java, I'm not going to argue that it's not Java because of special primitives / interfaces available to write the GC here, but it is not what most people would think of when considering the limitations of the runtime everyone's using.

quelltext··on No safe efficient ways to do three-way string comparisons in Go
It doesn't go into why, it's just a statement.
quelltext··on No safe efficient ways to do three-way string comparisons in Go
Yes, I mentioned that that's basically what it says. But why would you tell people to actively duplicate code? It's like "I don't get what this type of function does and have to look it up all the time, better to have everyone inline this so it's clearer".

To be fair, I agree that seeing bad examples of its use shown by one of the other folks here, some could have been avoided by them being forced to inline, but funnily those examples still exist despite the desires of the function author.

Nothing was achieved here.

quelltext··on No safe efficient ways to do three-way string comparisons in Go
> so the documentation is trying to talk them out of...

What documentation though? There's an internal comment but it's not documentation and it's not really arguing against the use of this type of comparison (just against use of the implemented function).

If the documentation for this function went on along the lines of "we discourage the use of 3 way compares as we consider it an antipattern, do X instead, there's literally no reason to ever use 3 way compares, we know it, here's why..." maybe, but it doesn't.

Now, maybe 3 way comparison is not common but it is a distinct operation with known optimization opportunities. I wouldn't readily claim that the operation is not needed by anyone.

quelltext··on No safe efficient ways to do three-way string comparisons in Go
> If people really need the extra performance, they'll use unsafe to create byte slices backed by the strings, and then use bytes.Compare

...and thus very likely end up with buggy code.

quelltext··on No safe efficient ways to do three-way string comparisons in Go
The native binary operators aren't a three way compare though.

The author seems to assume nobody needs a three way compare, which I feel is assuming a bit too much.

In particular because it is there because someone is using/needing it already.

Basically their comment actually says that everyone who does need a three way compare should just re-implement what they wrote there (and maybe they'll make sure everyone's code is optimized later). Sounds pretty bizarre to me to discourage code reuse. And if three way compares are a pattern they want to discourage in the first place it should be elaborated on in documentation.

quelltext··on No safe efficient ways to do three-way string comparisons in Go
> Basically no one should use strings.Compare

Others have already talked about the performance aspect but I'm just baffled at the comment basically saying nobody should use this function anyway.

I expect the need for 3-way compares isn't that uncommon, why tell people not to use it?

It's great to have this idea that the compiler should optimize all comparison situations but a) it doesn't yet and b) people still want a 3-way compare function anyway.

Basically it's saying "don't use a function at all", or even "write your own copies of this function". Even if the compiler one day becomes smart enough to optimize you still end up with tons of code duplication if people followed the advice.

And for people who care about performance it means they'll use a 3rd party library or implement their own "optimizations" that might not be effective or even buggy.

Literally nobody is benefiting from this.

What's the point of providing this function but actually thinking nobody should use it, in a comment no less instead of documentation?

Now, there may be other reasons, e.g. the author thinking 3-way compare is a bad pattern in the first place. If argued well, maybe I could agree. But that argument isn't made here.

I'm also not saying they needed to optimize this off the bat. A comment saying "we don't think there is a big demand yet, will optimize when we see the demand" would've been acceptable.

quelltext··on Oracle Contributing GraalVM Community Edition Java Code to OpenJDK
Digging through that code might be a bit challenging. Do you happen to have a link to a paper/documentation on this? Or maybe some rough explanation how it works (that goes beyond the short summary you provided)

Java doesn't provide a primitive to deallocate memory. So while I can see how for instance allocation a huge chunk / big array could be allocated and you represent objects in there don't you end up with a situation where your process will always occupy a fixed amount memory? Might not need to be fixed. You might also be able to extend more but how would you free that again?

quelltext··on We Burned Down Players’ Houses in Ultima Online
What's the reason?
quelltext··on When the push button was new, people were freaked
> Children are less computer-literate than ever.

Is there any evidence for this?

Is it a definition issue?

My grandparents and some people in my parents' circle of friends are not computer-literate. And by that I mean they don't know how to use double click, what a file or browser is, or even how to use a touch focused device. They are utterly unfamiliar with the abstractions and UIs computing devices afford.

Even in my generation many kids didn't have PCs or devices with interfaces more complex than an NES until later in high school.

That is different today from what I've observed. It's true that for many the first computer is not always a PC as I would have had, but a smartphone or a tablet. But does it matter? They are able to harness the power of computing devices to get things done.

Needing to know how computers work internally, or making use of traditional computers with mice, keyboards and monitors on a desk, these things were never really the definition of "computer-literate".

quelltext··on When the push button was new, people were freaked
The task was impossible because they gave them light bulbs that simply cannot light up with a low V battery.

The one scene where a student appears to succeed (this clip is spliced in after the segment where the professor says "it's not the case [it's not a trick question]") is not with the light bulb they were given (they essentially say "here, I can show you, see, with a small bulb I would do this and it works", laughing which to me indicates they didn't get it done with the initially given large bulb).

But maybe not? Maybe they were given several bulbs to choose from. And yeah some people clearly didn't figure out the basics ("I need two wires"). The others, unclear, they showed short cuts of them fumbling around (possibly after failing a few times) but they might have already tried the right approach before that.

The core issue with the video is that it doesn't establish a base line. What is it they expected from the students? That they identified they cannot do it with just any bulb or any battery before saying yes? I don't think so, based on the professor interview that really seems to imply that the folks should know how to do it (and get it done).

If there was a way to do it they should have shown. They just go on to folks saying "see, we need to teach the basics better" and I still don't know how it connects to the "experiment".

The way it stands it really does seem to be designed to make the graduates fail the test without making clear (to the viewer at least) what the test really was.

I mean at this point I'm not even clear if the reporters were the stupid ones not realizing it cannot be done. Again, they didn't show it. It's more likely they did actually make it impossible / pose a trick question.

I am not doubting the professor as much. They probably conducted an actual experiment that showed a significant number of subjects (was it MIT grads though) weren't able to accomplish it despite feasibility. It's just that the adhoc on-video tests there seem to provide a false hook into the story, like all these types of on the street interviews.

quelltext··on Twilio CEO announces 11% in 'Anti-Racist' focused layoffs
Pretty common I think.

Not only hiring. A coworker was blocked from organizing some technical community event because among the 5 speakers who applied to present only one was "x".

I get the sentiment behind such quotas but it's not always realistic. I think a fair way to look at it is, if the environment is such that "x" are discouraged from participation then it needs fixing. But it should be easy for the diversity team to go identify such an issue and tell the organizers to fix that rather than saying "meet quota or no event".

For hiring, it's fine to look at numbers and identify a skew pattern and to look into why it may exist and how to counter, but just asking for percentage alone is not helpful.

quelltext··on My employee refuses to lie to customers – but that’s our policy
> Should I start subtly managing her out?

What does that mean? Last time I heard this it was in the context of firing, or rather preparing conditions to simplify the process.

Is it a euphemism for making their work life difficult so they are likely quit on their own (e.g. assign only difficult customers to her)?

Or is it more about establishing conditions that allow firing that are unrelated to the protected class aspect (e.g. assign all non cancellation tickets, than dismiss because they cannot keep up with the load)?

Whatever it is "managing out" just sounds shady.

quelltext··on A small Stripe fraud story
> In your production environment, this value should always be false. If the variable is set to true in production, you risk exposing sensitive configuration values to your application's end users.

It's still a footgun. It's pretty clear that this shouldn't be done, so why allow it this easily?

In prod it should emit a log message saying "you cannot do that. if you really, need to follow these steps: <something cumbersome like placing a file somewhere with some dedicated end date for debug mode, or scoping rules>"

quelltext··on A small Stripe fraud story
The article states:

> The environment configured on the live site was actually set to production, but the configuration also has APP_DEBUG=true set which is why a 500 server error response was giving such neat and useful output.

It should be easy to add additional safeguards / warnings to prevent this combination from being set.

quelltext··on A small Stripe fraud story
The title is a bit misleading.

It's not wrong. Someone used a leaked API key to do card testing. That explains why someone might be interested in the API key. However, the bigger part of the story is that Laravel or whatever framework they used has a dangerous footgun that can easily lead to exposing secrets.

quelltext··on Ask HN: Location based pay is killing my motivation, how do others handle it?
So, like full of homeless people and litter? No, thank you.
quelltext··on IMDB deleted all negative user reviews for The Rings of Power
Do we need spoilers here? Didn't know that was Gandalf.

Aside from that I agree, so far TRoP has been close to or better than expected. I'm not sure what people expected here but at any rate it's too early. You would't want to judge LotR based only on the initial chapter either.

quelltext··on Difficulties of providing a crypto payment system on your website
I mean, it's currency. Trading currency is pretty old, so I doubt anyone was surprised here.
quelltext··on I've been designing a language since 2009 – friends and I implemented a beta
Not really. Like, I would't use Zen personally and it's fair for Zig to highlight their concerns, but still none of this is stealing, and seems more like a petty disagreement, the cause of many forks on other projects in history.
quelltext··on Accounting For Developers, Part I
The main issue was that at the time the "Effect on balance by account type" figure was reversed / incorrect, and so the example was just not making sense. Reading on further and again I realized it was not the example but that figure that was wrong. I see that you fixed that now. Thanks.
quelltext··on Accounting For Developers, Part I
I think the figure / chart in "Effect on balance by account type" is wrong / flipped. It says that debits decrease debit normal account balance which doesn't match the text description or subsequent examples.
quelltext··on I've been designing a language since 2009 – friends and I implemented a beta
They seem to have a good write up to explain that: https://zen-lang.org/zig/

Also: forking /= stealing

quelltext··on Let websites framebust out of native apps
Was curious what they say about it but the link didn't seem to have anything on custom headers.
quelltext··on AI generated, command whatever you want. It will generate mind-blowing images
I for one will wait for secondary sources and if this is so great I might end up creating a Discord account. But not just to check out for myself if it's cool or not.
quelltext··on Million: less than 1kb virtual DOM that is fast
So, is this a replacement backend for JSX? Or what is it actually? Is ot tied into React (is React's virtual DOM implementation pluggable by design?)?

I don't quite get how a framework can be described as "it's a virtual DOM that's fast". I kind of get what they mean, but is there no better term? E.g. "virtual DOM engine", "virtual DOM runtime", "virtual DOM renderer", maybe?

quelltext··on How far can you go by train in 5h?
Huh?

How can metropolitan France be larger than the entirety of Germany?

quelltext··on TIFU by using Stripe as a payment processor for my small business
https://help.gumroad.com/article/260-your-payout-settings-pa...

Gumroad itself uses Stripe, it seems so if Stripe decides to hold funds it's likely Gumroad will just forward that experience to you.

quelltext··on How to do distributed locking (2016)
Fencing tokens might be fine to prevent data corruption but they don't suffice to guarantee mutual exclusion.

For instance, if you need to deal with an external API and you need to avoid the same request going out twice and you have logic that could in theory lead to that, e.g. via concurrent retry mechanisms, at least once semantics, etc.

What's the solution for ensuring code execution under mutual exclusion in a distributed system?

quelltext··on I've been abusing HTTP Status Codes in my APIs for years
They can still send bodies, which is where GP said the message should be.
← PreviousPage 4 of 14Next →