Readit News logoReadit News
ascar commented on New Date("wtf") – How well do you know JavaScript's Date class?   jsdate.wtf... · Posted by u/OuterVale
wiseowise · 2 months ago
Why wouldn’t “false” be true? It’s a non-empty string.
ascar · 2 months ago
yea that's an odd example to pick. expecting type conversion to add meaning to strings is a programmer problem not a language problem. really comes down to developers not thinking about types and their meaning anymore.

there are plenty of javascript examples that are actually weird though, especiall when javascript DOES apply meaning to strings, e.g. when attempting implicit integer parsing.

ascar commented on GitHub Git Operations Are Down   githubstatus.com/incident... · Posted by u/hunkins
eru · 8 months ago
I actually don't care whether it's centralised or decentralised, or who's managing it.

But you are right that I want reliable and easy-to-use services. And centralisation is often one way to go there.

As an interesting counterpoint: Git itself is decentralised and replaced centralised services like Subversion. And that made git easier to use, especially easier to get started with: no need for a server, no need to be online, just do `git init` in any old directory.

A GitHub-clone could be more decentralised, but they'd need to use that decentralisation to drive those other features that people actually care about day to day.

ascar · 8 months ago
And a `git remote add name url` and you are setup to use another remote server.
ascar commented on GitHub Git Operations Are Down   githubstatus.com/incident... · Posted by u/hunkins
__MatrixMan__ · 8 months ago
I was imagining something a bit more disastrous than that. A big enough solar flare could take parts of the planet offline for months. Years if they can't source enough replacement transformers. There are also political reasons that countries go offline.

Then it'll be up to the nerds who manage to cobble together their own distributed version of everything--even if it's a significantly reduced definition of everything.

ascar · 8 months ago
Even if that's a concern in a doomsday scenario, self-hosting gitlab is super easy and a good (some would argue better) alternative.
ascar commented on Ask HN: How do you backup your Android?    · Posted by u/Openai2
ur-whale · 8 months ago
> The only data I care about on the phone already gets backed up by Google and is then exported regularly via Google Takeout.

Are you using Google Authenticator?

If so, how do you backup your secrets?

ascar · 8 months ago
It has an export function that you can scan from an old phone. And I kept the setup keys in my keepass database.

On top of that now Google backs those up for you too.

ascar commented on Four billion years in four minutes – Simulating worlds on the GPU   davidar.io/post/sim-glsl... · Posted by u/diggan
swayvil · a year ago
>written entirely in GLSL fragment shaders

What's the language for that?

(The music is pretty cliche. Maybe it was written by AI)

ascar · a year ago
Not sure if that's actually your question, but GLSL is the language https://en.m.wikipedia.org/wiki/OpenGL_Shading_Language
ascar commented on I found a 1-click exploit in South Korea's biggest mobile chat app   stulle123.github.io/posts... · Posted by u/stulle123
wiseowise · a year ago
How could client deliver messages to the wrong recipient? Why would client have messages for user outside of the one logged in anyway?
ascar · a year ago
Seems like a rather easy thing to go wrong in the client, no?

User sends message via client. Client fumbles the recipient id. Message ends up at the wrong recipient.

Examples: incorrect recipient ID attached to contact in list where users selects recipient. Buggy selection of multiple targets in the selection UI due to incorrect touch event handling. Incorrect deletion of previously selected and then deselected recipient from recipient array of multitarget message. Or if working low level even a good old off by one error and reading out of bounds data for the recipient list (though that one hopefully should trigger a faulty send request due to other stuff no longer matching). There is endless examples.

The server can't really safeguard against the client providing a legitimate send request even though the user intended to send it to another recipient.

ascar commented on My VM is lighter (and safer) than your container (2017)   dl.acm.org/doi/10.1145/31... · Posted by u/fanf2
bluGill · a year ago
Most of that effort should be sharable. if you know you will only have one python process you can get rid of a lot of cruft. If you know you will be running in a VM then you only need the driver for the network interface the VM provides not every network interface every designed (often including ones that your hardware doesn't even physically support). So while there is serious time investment it isn't nearly as much as it would be to write a competitor to linux.
ascar · a year ago
I'm not sure if I missed a bit here, but I have some colleagues doing research on unikernels for HPC and the point is that this unikernel is running directly on the hardware or hypervisor and not inside another VM. The unikernel is effectively a minimal VM and the network stack is one of the things they struggle the most with due to sheer effort.
ascar commented on Using ARG in a Dockerfile – beware the gotcha   qmacro.org/blog/posts/202... · Posted by u/todsacerdoti
kaliszad · a year ago
That is what you get when people reinvent the wheel and lifetimes/ scopes are implicit. Docker could've used something like JSON5 [0] for their configuration format to make the lifetimes explicit. Another time when easy won over simple. [1]

[0] https://json5.org/ [1] https://www.youtube.com/watch?v=SxdOUGdseq4

ascar · a year ago
JSON for something that essentially mirrors a shell installation process? Feels like you are trying to reinvent things with a golden hammer, not like actually making it easier.
ascar commented on AI programming tools should be added to the Joel Test   blog.waleson.com/2024/04/... · Posted by u/jtwaleson
srcreigh · a year ago
Yeah, sorry for the snark. I was mostly referring to how the comment I replied to said they hadn’t actually used GPT for coding, but had lots of ideas about its limitations etc.
ascar · a year ago
If you read closely I am not talking about the limitations of GPT, but about the limitations of the developer having to fix code of others (GPT essentially being another developer). I guess it depends on the complexity of the problem. A lot of stuff is very easy to review and for me other stuff needs more time to understand than it did to write.
ascar commented on AI programming tools should be added to the Joel Test   blog.waleson.com/2024/04/... · Posted by u/jtwaleson
kyleyeats · a year ago
But why are you pushing errors to production? You know you're allowed to fix the LLM's code output, right?

If a robot could paint your house, but made three small errors, would you refuse to use it? Or would you just fix the three small errors by painting over them?

There's some kind of John Henry complex going on in this AI discussion.

ascar · a year ago
You're working under the assumption that you will be able to find the errors. I personally found reviewing code always way harder than writing it and we already push tons of bugs to production in written+reviewed code.

u/ascar

KarmaCake day3784March 21, 2018View Original