Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ainar-g
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
54 ms
·
541.
▲
by
ainar-g
8y ago
Yeah, that bothers me as well. Especially knowing that Go was in many ways inspired by Wirthian languages, in which a module is, well, a module.
542.
▲
by
ainar-g
8y ago
1. IIRC you should be able to do go get example.com/repo@branch-1 2. Something like go mod edit -replace example.com/repo@version=example.com/fork@version It seems like the second command doesn't understand
543.
▲
by
ainar-g
8y ago
Oh, I see now. Yeah, trying to make assert output a dynamically constructed message does seem like a PITA.
544.
▲
by
ainar-g
8y ago
I mostly agree with you, but I would like to make something clear. >I'm also tempted to say that if you need to use GDB to figure out where your tests have failed exactly your framework is not particularly user friendly. Am I missin
545.
▲
by
ainar-g
8y ago
I would be more radical and add them as a part of the language, the way map is now. AFAIK, Wirthian languages like Pascal and Oberon all have sets as built-ins, with +, -, and * operators defined on them, and Go is heavily inspired by them.
546.
▲
by
ainar-g
8y ago
No it wouldn't. There are already built-in generic types like map[K]V and slices. If the Go Team wanted, they could easily add built-ins like option[T] and result[T]. But in Go 1.0 they would stand out like a sore thumb, because the st
547.
▲
Book Offers Peek into Nixon's Mind (2000)
(nytimes.com)
1 points
by
ainar-g
8y ago
|
0 comments
548.
▲
Why Startups Fail? A Data Analysis by Autopsy
(autopsy.io)
1 points
by
ainar-g
8y ago
|
0 comments
549.
▲
by
ainar-g
8y ago
For those wondering, "Роскомнадзор" is Russia's "Censorship Agency", Roskomnadzor[1]. If you are wondering, why is there a Censorship Agency in a country whose Constitution explicitly bans censorship[2], well... Let
550.
▲
by
ainar-g
8y ago
The Tor Project is invaluable in countries like Russia, where the gov. can block literally millions of IPs just to get rid of one pesky messaging app. Now that I think about it, people using it should probably donate more to the project. Al
551.
▲
by
ainar-g
8y ago
This is very similar to Strugatsky Brothers' Roadside Picnic[1], a book which inspired, among other things, Andrey Tarkovskiy's film Stalker and the S.T.A.L.K.E.R. video game franchise. [1] https://en.wikipedia.org/
552.
▲
by
ainar-g
8y ago
I've recently upgraded from Ubuntu 16.04.5 to 18.04.1. The built-in Night Light functionality is actually OK. A little bit too red for my taste, but it does what it should.
553.
▲
by
ainar-g
8y ago
This might be just my "ignorance", but am I the only one who thinks that "where" actually hurts readability? I mean, it's not a problem when it's just a few lines, but when you have a lot of code, and you have
554.
▲
by
ainar-g
8y ago
>Bug densities are largely constant across languages I would like a citation on that. I remember there being a study on how several groups of students would solve a problem in C, Go, and Rust. I can't find the link unfortunately, bu
555.
▲
by
ainar-g
8y ago
If you're talking about nil, then yes, I would really like Go to never have it. But the other validations are more about contracts. Preconditions, to be precise. Yes, I know that a sufficiently advanced type system (dependent types?) c
556.
▲
by
ainar-g
8y ago
Notice how OP had to add a check after verifying two pointers against nil. A junior developer could've easily skipped it, and, if tests only go through happy paths or are non-existent, deploy it somewhere where it would explode in runt
557.
▲
by
ainar-g
8y ago
This looks neat, but I would not call it clear. In cases where I need to check many conditions and return, I would simply use a conditional switch (and also use exact error values instead of generated ones): switch { case transfer ==
558.
▲
by
ainar-g
8y ago
Looks pretty good. I see someone has been reading "The Error Model" by Joe Duffy, eh? The example I would like to see is the one that shows the language's object-orientedness and message-passing. Something like "public
559.
▲
Type Punning, Strict Aliasing, and Optimization (2013)
(blog.regehr.org)
1 points
by
ainar-g
8y ago
|
0 comments
560.
▲
by
ainar-g
8y ago
As a professional gopher, don't. Just a few months ago I replaced an almost 100-line Go "script" with two lines in the Makefile. The fact that Go is great for big projects doesn't automatically make it good for everythin
561.
▲
by
ainar-g
8y ago
I wonder, why is it NonZeroU8, NonZeroU16, etc instead of something like NonZero<u8>, NonZero<u16>, etc? In theory, in the future, when Rust supports constants as template arguments, one might even add a const argument, the valu
562.
▲
by
ainar-g
8y ago
The System 1 Masterbrand Icon is GitLab[1]. The System 2 Masterbrand Icon is the flag of Phoenix, AZ[2]. Both seem very bland and generic to me. I wanted to like them, I really did, but those are just... extremely unoriginal. [1] https:&#x
563.
▲
by
ainar-g
8y ago
I agree. His neural networks series[1] was a real eye-opener for me, and whenever someone wants to know how they work, I point them to the playlist. [1] https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_6700...
564.
▲
by
ainar-g
8y ago
It's _Russ_ Cox, not Ross. Can the admins change the title?
565.
▲
by
ainar-g
8y ago
Sigh. If only FreeCol[1] had more activity. The last patch was in 2015, and IIRC it's still hosted on SourceForge. [1] http://www.freecol.org
566.
▲
by
ainar-g
8y ago
So far, I get a feeling that vendoring will be a second-class citizen in the world of modules. Unfortunately, I will not be surprised if the team considers removing the support entirely in a future release. I just hope that a viable alterna
567.
▲
by
ainar-g
8y ago
See "go help modules". Modules and vendoring When using modules, the go command completely ignores vendor directories. By default, the go command satisfies dependencies by downloading modules from their sources and usi
568.
▲
by
ainar-g
8y ago
I am eagerly awaiting the arrival of the module system, but please note, that it's still experimental, so not all fun and rainbows. As of now, the Go issue tracker still has 53 open issues with the "modules" label[1], and Go
569.
▲
by
ainar-g
8y ago
>I don't see Haskell as uber language. If I want super correct code, speed and I'm okay with using a more complex language, then there is Rust – which is probably more correct than Haskell and faster, too. But it doesn't e
570.
▲
by
ainar-g
8y ago
>That's why I would like to see a pure HTML cross-platform web browser. With nice proportional fonts and good support for media. I assume you are not using Firefox? Then you should, because it has Reader View mode, which removes all
More ›