Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jjnoakes
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
70 ms
·
811.
▲
by
jjnoakes
10y ago
I don't think one ever has to rely on undefined behavior. If you think you do, you can usually rewrite your code to avoid it, or rely on implementation defined behavior for specific compilers. And if that is not low level enough, you s
812.
▲
by
jjnoakes
10y ago
Go doesn't support as many platforms as Nim, for one. And Go doesn't give you access to as many system libraries, for a second. There's cgo, of course, but that has its own can of worms. I hear the type systems are fairly dif
813.
▲
by
jjnoakes
10y ago
> That just doesn't jibe with the mental model of C that I had in my head I'm curious, what mental model of sizeof() did you have in your head, and how did it work?
814.
▲
by
jjnoakes
10y ago
Not true for c++ unless you include the compiler and version in your "platform".
815.
▲
by
jjnoakes
10y ago
Which is fine; if you can argue that their experience may not merit top of the range, you just negotiate down a bit...
816.
▲
by
jjnoakes
10y ago
Being up front about it, and opt-in.
817.
▲
by
jjnoakes
10y ago
> there is no cost to SECRET_KEY = os.urandom Only if you generate the key up front and use the same value everywhere. If you just call os.urandom in your app, then the cost is every restart (and every separate server instance) invalidat
818.
▲
by
jjnoakes
10y ago
How is unique_ptr a pain? Just typedef it to something palatable. You must track files by some type already right?
819.
▲
by
jjnoakes
10y ago
If that were my business I'd charge $.01 to a credit card per call. A bit harder to hide anonymously then. Or even charge a one-time $1 to sign up, and then free wake-up calls for the life of the account.
820.
▲
by
jjnoakes
10y ago
LLVM still does (Julia revived it) but last I heard it was only implemented and/or tested for the subset of LLVM IR/bitcode that Julia exercises. My dream is human-readable C as well, which I wouldn't get via LLVM, i.e. a cof
821.
▲
by
jjnoakes
10y ago
Shorter code, since rust is a higher level of abstraction. Safer code, so half of the vulnerabilities wouldn't have existed. Rust's ecosystem (package manager and libraries). Of course you lose portability and you probably appeal
822.
▲
by
jjnoakes
10y ago
It isn't a strength to allow ill-defined programs to silently corrupt your process. If you don't understand what you are writing, either the compiler (rust-like) or the runtime (script-like) should complain. C++ usually does neith
823.
▲
by
jjnoakes
10y ago
Some quick reading of the linked article says this spec provides a few optional, superset features on top of CommonMark, that it did not contain (like tables, etc).
824.
▲
by
jjnoakes
10y ago
Rust has a large ML influence from what I've seen. Pattern matching, restricted mutation, sum and product types, and traits immediately come to mind.
825.
▲
by
jjnoakes
10y ago
But why spend the money to do it from scratch when you can spend less focusing on the pain points? If your users pay you either way, the cheaper option (from a business point of view) is better.
826.
▲
by
jjnoakes
10y ago
Because it is faster and cheaper to get a junior JavaScript developer to bang out a cross platform GUI in electron than it is to get one or more developers together to write a proper cross-platform native application. They cared more about
827.
▲
by
jjnoakes
10y ago
The answer is probably to return a value directly, although it's tough to say without a complete example. But in general, if you have a routine that is creating stuff, and the stuff is meant for the caller to use, you create it in the
828.
▲
by
jjnoakes
10y ago
This only works if invoked by the shell, I believe. If you exec that file directly it will fail unless I'm mistaken (can't test at the moment).
829.
▲
by
jjnoakes
10y ago
Dealing with errors should create noise in the code in proportion to the places where error handling needs to take action. If 90% of your code really is unique, specific action to error conditions, then by all means, this topic isn't f
830.
▲
by
jjnoakes
10y ago
I find a nice way to be reminded of some memories is to have random pictures show up as my desktop or phone background once in a while. I also go back through them and pull out some for use during big lifetime events (10*n birthdays, weddin
831.
▲
by
jjnoakes
10y ago
I can't speak for the person you replied to, but I rely on a product to "store" pictures so I can access them when I'm not at my main computer. I'd like to show them to others using my phone, share them with other c
832.
▲
by
jjnoakes
10y ago
I think I'd want more than multiple return values. I'd also want syntactic sugar to pass errors through to callers, or alternatively, ignore errors and skip future processing and have the error be the result of the future processi
833.
▲
by
jjnoakes
10y ago
> While the headers have existed, they have historically been underutilized and thus poorly maintained. They are human-readable, so even if no tool used them, they still have an effect. Someone might read the header and incorrectly move
834.
▲
by
jjnoakes
10y ago
Again, not defending systemd, but if you have a structured header in your file which is following a standard (even if no one is using your header or that standard yet), and your header is wrong, is it really anyone else's fault but you
835.
▲
by
jjnoakes
10y ago
I'm not defending systemd here, but in general, if your files have standardized headers that indicate the wrong information, how is that anyone else's problem?
836.
▲
by
jjnoakes
10y ago
Being in one or more libraries already obviously doesn't preclude them from being combined together if they are doing similar things in different places...
837.
▲
by
jjnoakes
10y ago
How many lines of code are inside those unsafe blocks, versus in the entire source tree? And how many of those unsafe blocks could be removed and consolidated into libraries, if they are doing similar things?
838.
▲
by
jjnoakes
10y ago
The code does unsafe things in signal handlers (vfprintf, for example), and hides some things in macros that I wouldn't expect to see hidden (like the assignment of the global "argv0" variable, defined in st.c, is assigned in
839.
▲
by
jjnoakes
10y ago
I'm not using quotes to quote anyone. I'm paraphrasing what was said more clearly so you could understand my point better. The quotes are there to separate the paraphrased words being discussed from the words discussing them.
840.
▲
by
jjnoakes
10y ago
> There's nothing willfully misleading about asking a hypothetical question Except the person I replied to wasn't advocating for "asking hypothetical questions", they were advocating for "it doesn't matter i
More ›