Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
piaste
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
81 ms
·
901.
▲
by
piaste
10y ago
A pretty straightforward solution is to have all your extensible options, etc., but also provide a few static objects with all options set to a working default. Use those objects for the hello world, or change the options you need to change
902.
▲
by
piaste
10y ago
> So what you'll have to do is tell your teammates to not use nulls, and instead make proper use of option etc, and then you're back to avoiding NREs by conventions, not by the compiler helping you out. Am I incorrect in this?
903.
▲
by
piaste
10y ago
In C#, null is just one possible value of the regular type Foo. The compiler cannot tell whether you have started returning null where you previously only returned non-null values, nor can it tell whether you've handled those null valu
904.
▲
by
piaste
10y ago
Let's do the black sheep joke: "There is at least one HN account, used by at least one person, who claims to believe he went to Spain and did not get robbed."
905.
▲
by
piaste
10y ago
Yup. 'Minified', for fun: let a s=Map.toSeq>>Seq.sortBy s>>Seq.toArray let m f=Map.map(fun _->f) printfn"%A"(a(fun(n, _)->Array.findIndex((=)n)o)(m(m(a fst)>>a fst)(JsonConvert.Des
906.
▲
by
piaste
10y ago
Code golf? Code golf! let o = [|"Genesis"; "Exodus"; "Leviticus"; "Numbers"; "Deuteronomy"; "Joshua"; "Judges"; "Ruth"; "1 Samuel"
907.
▲
by
piaste
10y ago
In F# you'd normally use a type provider for this kind of work, but for the sake of exercise: type Chapter = Map<int, string> type Book = Map<int, Chapter> type Bible = Map<string, Book> le
908.
▲
by
piaste
10y ago
Personally - this is a question of individual preference, though - I do not mind the OS boot time itself very much (to a degree). Whether the system takes ten seconds or two minutes from reset/power-on to the login screen does not mak
909.
▲
by
piaste
10y ago
That's like saying "why bother with hyperlinked text? Just put your URLs in a footnote".
910.
▲
by
piaste
10y ago
Handle bars?
911.
▲
by
piaste
10y ago
Pretty disappointing that it relies so much on comments. You can write an arbitrary 'polyglot' program in any N languages that have incompatible comment delimiters: just write the same program in each language and wrap it in the c
912.
▲
by
piaste
10y ago
I am a layman to devops. By "ephemeral container data" do you mean temporary files created by the service, temporary files created by the OS / other applications, or something else?
913.
▲
by
piaste
10y ago
Yeeeeeah, that's kinda like saying you can get your drugs from a police evidence locker. You only need __one__ burglar or rotten cop! It happens all the time! Why do we need dealers or legal distribution anyway? Plus you're contra
914.
▲
by
piaste
10y ago
You only need _one_ power user to disable the lock-in mechanism or to discover the security holes. After that, every user benefits even if they themselves cannot do such things. Of course open source projects also suffer from bugs and incom
915.
▲
by
piaste
10y ago
Right? What a pointless life. Who could possibly enjoy it? Now excuse me for the brevity, I have an awesome game of Candy Crush to finish. I think I'll get a new high score. Bloop bloop !
916.
▲
by
piaste
10y ago
That's true, but I would argue it's counterbalanced by modern apps being (for the most part) always online. While we have more control over what data they can access, there are far worse things they can do with the data we do choo
917.
▲
by
piaste
10y ago
GNU seems to agree with you, since they categorised the right to redistribute on its own as freedoms 2 (original) and 3 (modified). Of course, they also "consider [all non-free software] equally unethical", so from their point of
918.
▲
by
piaste
10y ago
I never quite got why GNU decided to consider the freedom to access the source code and the freedom to modify it as a single bullet point. To me, they're fundamentally distinct concepts, and furthermore the former is VASTLY more import
919.
▲
by
piaste
10y ago
items.First()?.Data I think this one doesn't do anything because .First() will throw on an empty collection. The rest of your samples look fine to me though.
920.
▲
by
piaste
10y ago
Ah, but you always have another choice. You can always surrender. Now, sure, you might be unwilling to surrender, and willing to risk a global nuclear war, over a direct invasion of your homeland. But what about, say, a covert invasion of a
921.
▲
by
piaste
10y ago
Nitpick: everything you say is probably correct, but such performant C programming is also the very opposite of a "minimalistic and terse style". Which one is more minimalistic, 'new Foo' or a collection of various custo
922.
▲
by
piaste
10y ago
Or alternatively (esprit de l'escalier): "Sorry, I do not negotiate with terrorists."
923.
▲
by
piaste
10y ago
> "OK, we can do that. But we have a policy of always making the lowest possible offer to candidates who won't share their compensation information. I just want the best for you." "OK, you can do that. But I have a po
924.
▲
by
piaste
10y ago
Slight aside: please don't abuse the Elvis operator like that (by using it on every single nullable reference), it could easily grow into a widespread anti-pattern that makes debugging harder. My rule of thumb is that ?. is OK to use w
925.
▲
by
piaste
10y ago
Without banking technology, a bank can still be a bank and provide its distinctively unique services, just slower. It worked for the Templars, and they didn't even have double-entry bookkeeping. Without Uber technology, Uber would not
926.
▲
by
piaste
10y ago
Yes, I was referring to the subject at hand - human achievement / technology / innovation - not making a universal statement about everything that may have limits. But I can see how my post could read that way. I'll make that
927.
▲
by
piaste
10y ago
This is some of the shallowest, most misleading insight I've ever read. "Human achievement will probably reach a limit at some point" is effectively an empty statement. Even if you could take its truth for granted, it is comp
928.
▲
by
piaste
10y ago
VSCode uses comments for every line in its settings.json file. I guess they figured it may not be correct JSON, but since they aren't sending those particular JSON files anywhere it doesn't matter?
929.
▲
by
piaste
10y ago
Also plugging Websharper ( http://websharper.com/ ) which is a full web framework that includes a F# to JS compiler to write the client-side part of the code. Though you can use just the compiler inside a regular ASP.NET MVC
930.
▲
by
piaste
10y ago
Twitter is roughly a brazillion times better known than HN.
More ›