Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
peferron
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
peferron
11y ago
Scale matters.
242.
▲
by
peferron
11y ago
I've been using the Rust playground a lot this week, and I wish it had a history feature - I often closed a tab and later wished I could get the code back. I'm thinking about trying to contribute a localStorage-based history mecha
243.
▲
by
peferron
11y ago
I'm a big fan of static typing, including sum types. But can someone explain to me what's so great here? The highlight of the article is having a unique Action sum type instead of a myriad of separate functions. But the action sti
244.
▲
by
peferron
11y ago
In the short term you are right. However the legal authority to enforce censorship will be established. All it will take is for the Department of Home Affairs to become less incompetent and suddenly things will become very serious. I think
245.
▲
by
peferron
11y ago
Go's philosophy strikes me more as "when many solutions are available, pick the most practical one". In this case, an alternative solution (among others) would be to always allocate a new array when calling `append`. This sol
246.
▲
by
peferron
11y ago
I use `const` instead of `var` almost everywhere and use `let` in the few cases that actually require reassignment.
247.
▲
by
peferron
11y ago
The T-Mobile plan only offers you international data if you pass a credit check. I applied twice, once by phone and once in-person at a store. I got rejected twice. I have excellent credit and suspect the issue is something stupid like my f
248.
▲
by
peferron
11y ago
ITT: French people busy scornfully labelling technically proficient Epitech/42 programmers as "code monkeys" (just ctrl-f for monkey). Meanwhile hackers in the US are too busy building things to care what other people call th
249.
▲
by
peferron
11y ago
The top grandes écoles have the best math/physics students coming in. These students are obviously likely to also be the best math/physics graduates coming out. The only way that wouldn't happen is if the grandes écoles brain
250.
▲
by
peferron
12y ago
A parent post was criticized for being too general, so I'll be extremely specific: cheese from the Whole Foods located at Park Place, San Mateo, California is crap compared to cheese from the cheese shop located on Rue Saint-Hélier, Re
251.
▲
by
peferron
12y ago
Yeah, Babel and the Babel team is great. I got very suspicious of the project after my first experience with it broke perfectly valid code, but after reporting the issue and then another and having them fix it almost immediately they won my
252.
▲
by
peferron
12y ago
You have a very valid point regarding bugs. Transpiler bugs definitely happen. When I first tried using Babel - still named 6to5 then - instead of Traceur, it immediately broke my code because of an incorrect TCO implementation in Babel. Ba
253.
▲
by
peferron
12y ago
Have you actually tried TypeScript? It feels just like writing JavaScript, but with a thin layer of type annotations that bring you the familiar advantages of static typing. It seems to me that JavaScript haters would be better off moving t
254.
▲
by
peferron
12y ago
Reminds me of 7 years back when I was working at a major power generation company. There was a team working on restarting production of completely obsolete analog control equipment for nuclear reactors. The operator wanted to extend the lif
255.
▲
by
peferron
12y ago
From the article: "A GC is necessary to provide memory safety guarantees. [...] For any programs that need heap-style memory allocations, if you want to guarantee memory safety, you need a GC." The main clame to fame of Rust i
256.
▲
by
peferron
12y ago
Why do all threads about Go seem to be full of people who cannot live without generics? Snark aside, feature X is rarely absolutely needed (you can replace your generics by some boilerplate; you can use grep instead of your text editor to p
257.
▲
by
peferron
12y ago
Yes, the ES6 `length` function would return 0 for [undefined, 2, 3]. I hope it was only used as an example in the article and nobody is planning to really use this. (Edit: see sibling comment; the article is already aware of this issue.) An
258.
▲
by
peferron
12y ago
I've been pondering a few style questions recently: 1. When to use 'function' vs '=>'? Leaving aside hoisting and handling of 'this', 'function' and '=>' are usually interchange
259.
▲
by
peferron
12y ago
Yes: const description = ({name: {first, last}, occupation}) => `${first} is a ${occupation}`; Edit: just noticed that `last` is not used, so we can remove it from the destructuring: const description = ({name: {first}, oc
260.
▲
by
peferron
12y ago
Yes, "let" is better than "var". I could also have used a fat arrow in the forEach(). But my point was to list iteration variations, so outside of that I wrote traditional ES5. This illustrates the issue though. "va
261.
▲
by
peferron
12y ago
My biggest issue with the recent additions to the language is that there's now a thousand different ways to do the same thing. Iteration: for (var i = 0; i < y.length; i++) { ... } for (var x in y) { ... } for (var x of y) {
262.
▲
by
peferron
12y ago
This slippery slope is exactly what happened in China. - First, they block a few websites: no big deal, I'll just use a VPN. - Then they block OpenVPN default port: no big deal, I'll just use another port or IPSec. - Then internat
263.
▲
by
peferron
12y ago
You make it sound like what matters most is not actually studying CS but getting a CS degree . Is there something special about getting a degree that would cause a programmer to "never be quite as strong" if they studied CS but
264.
▲
by
peferron
12y ago
QQ's emoticons (the 70-or-so yellow base set plus a few others) are indeed incredible. Somehow, for every single feeling you want to convey at any time of the day, you will find one and exactly one matching icon. It's like the
265.
▲
by
peferron
12y ago
For anyone going through the book and interested in looking up complete implementations, I've implemented quite a few of them in JS and Go: https://github.com/peferron/algo I'm at chapter 14.4 now, so still a
266.
▲
by
peferron
12y ago
Why can't the richest become even richer in China? Which parts of the western infrastructure do they need to grow their own utility and/or wealth?
267.
▲
by
peferron
12y ago
I have four of them in my apartment in Shanghai. They definitely work; I verified it over and over with a laser particle counter. They're loud, but simply running them in the rooms you're not occupying (e.g. in the bedroom during
268.
▲
by
peferron
12y ago
You're right, it doesn't make sense to compare a smaller city surrounded by farmland with one of the biggest urban sprawls in the USA. I posted this under the strong influence of nostalgia :)
269.
▲
by
peferron
12y ago
What bothers me with suburban living in the US is that you give away the convenience of the city and all you get back is a backyard barely big enough for a barbecue. Here's the house where I grew up in France: http://i.imgur
270.
▲
by
peferron
12y ago
Only a subset of rewrites are redirects. A common usecase for rewrites is to change the request URI to make it match another location block in your config, but without returning 301 or 302 or any other redirect code to the client.
More ›