Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ainar-g
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
47 ms
·
481.
▲
by
ainar-g
8y ago
Re. Go. I've turned this code into a Go benchmark and run it with both the default cmd/compile (1.11) and gccgo (8.2.0). cmd/compile: BenchmarkFib-4 1 16530409619 ns/op PASS ok command-line-argument
482.
▲
by
ainar-g
8y ago
That is compiler compatibility. I am talking about language-level compatibility. Yes, you can continue compiling v3 code with a v4 compiler with a flag, but if you compile your v3 code without a flag, your code may fail to compile. So while
483.
▲
by
ainar-g
8y ago
>Swift 3 -> 4 code is compatible Is this really true? Looking through 4.0 release notes I see some incompatible changes like: SE-0164 Remove final support in protocol extensions SE-0160 Limiting @objc inference If your code c
484.
▲
by
ainar-g
8y ago
My memory might fail me, but I thought Swift 4 was supposed to be "the last major breakage"? Swift has a new major revision every year. Compare this to Go (no major revisions after 6 years, probably a backwards-compatible major re
485.
▲
by
ainar-g
8y ago
I mean, he was 73 at the time. Having lived a long life, making a small but noticeable difference in the world, I think he had the full right to say "Ah, screw it, I'm done." after receiving the diagnosis.
486.
▲
by
ainar-g
8y ago
Sure. In Go, this was one of the details that cemented my love for the language. Imagine you have a multiline list, sorted alphabetically. strs = [ "a", "b", "c" ] If you don't have a
487.
▲
by
ainar-g
8y ago
This is indeed very sane. One thing I personally would change is making a trailing comma in multiline lists obligatory, like in Go. I hope this gains traction, so that I could use it in my projects without people being upset about "som
488.
▲
A Cat Meme Photographer from a Century Ago
(saturdayeveningpost.com)
122 points
by
ainar-g
8y ago
|
53 comments
489.
▲
Analysis API: modular static analysis for Go
(docs.google.com)
2 points
by
ainar-g
8y ago
|
0 comments
490.
▲
by
ainar-g
8y ago
What I meant is, when did they start the switch, and which versions have already switched.
491.
▲
by
ainar-g
8y ago
When did they switch to Clang? The about:buildconfig of my Developer Edition (Ubuntu) shows GCC 6.4.0, without -flto obviously. On a related note, I wish they would add the information about the Rust compiler used to compile the components
492.
▲
by
ainar-g
8y ago
I recall reading somewhere that the code of SQLite also has some UB. Which makes me wonder, if they use runtime sanitizers, like ASan, UBSan, etc.
493.
▲
The Language Strangeness Budget (2015)
(words.steveklabnik.com)
2 points
by
ainar-g
8y ago
|
0 comments
494.
▲
by
ainar-g
8y ago
IIRC, fasthttp only supports a subset of HTTP. This may or may not be a deal-breaker for some people.
495.
▲
by
ainar-g
8y ago
Re. syntax. I don't understand, why can't they just make _Ptr an attribute like _Atomic, and provide a header <stdchecked.h>. That is, #include <stdchecked.h> void read_next(int *b, int idx, checked int *out) {
496.
▲
How Am I Not Burned Out?
(medium.com)
1 points
by
ainar-g
8y ago
|
0 comments
497.
▲
by
ainar-g
8y ago
WAT 3 and WAT 10 were surprising for me. WAT 3 becomes less surprising when you consider that a method on a pointer can be called and can return a valid result even if the pointer is nil. WAT 10 just seems inconsistent. I said this before,
498.
▲
by
ainar-g
8y ago
Thanks! This is very valuable advice to me.
499.
▲
by
ainar-g
8y ago
This may be a rather intrusive question, so I don't really expect an answer, but how is the market for commercial static analysis tools? I am asking because I was thinking about creating such tools myself in the future, preferably goin
500.
▲
by
ainar-g
8y ago
>Most styleguides really do benefit from rationales. Just stating something ex cathedra sounds rather patronizing. The author kind of explained their justification in their blog post[1]: >It beggars belief how many readers claim to
501.
▲
by
ainar-g
8y ago
>Where possible avoid simply using "id" as the primary identifier for the table. I wonder what is the reasoning behind this? To escape the ambiguity during joins? >Designs to avoid >EAV (Entity Attribute Value) tables—use
502.
▲
SQL Style Guide
(sqlstyle.guide)
59 points
by
ainar-g
8y ago
|
16 comments
503.
▲
by
ainar-g
8y ago
I think they meant literal generation of files based on templates. Basically sed 's/T/int/g' file@T.go > file@int.go Some people do that, I guess.
504.
▲
by
ainar-g
8y ago
Depends on the environment, I guess. I've been programming Go professionally for over 3 years, and I've never used such "templates" for generic types. As I've said in another thread, I've had a need for sum typ
505.
▲
Measuring errors vs. exceptions in Go and C++
(science.raphael.poss.name)
2 points
by
ainar-g
8y ago
|
0 comments
506.
▲
by
ainar-g
8y ago
>B) does this count as generics? I think "generic programming" is more about generic algorithms than it is about data structures. Because without generic functions, generic data structures are less useful. Can you create a ne
507.
▲
Musl 1.1.20 released
(openwall.com)
2 points
by
ainar-g
8y ago
|
0 comments
508.
▲
by
ainar-g
8y ago
Yeah. I always try to include some context with my errors, so the only actual uses for check/handle I have is handle err { log.Fatal(err) } in quick "scripts". And even there I should probably provide more context. All
509.
▲
by
ainar-g
8y ago
Even if you do use arbitrary precision arithmetic and count nanoseconds, the heat death of the universe is more likely to occur before your number takes 1KiB of RAM.
510.
▲
by
ainar-g
8y ago
Right, thanks. My estimate was closer to 200 because I was thinking of Go's time.Time.UnixNano method[1], which returns undefined results when used before the year 1678 or after the year 2262. But yeah, if you count since the system re
More ›