HNHacker News
TopNewBestAskShowJobs

DonPellegrino

462 karma · joined November 21, 2012

submissionscomments
DonPellegrino··on Learning Haskell as a non-programmer (2014)
In my opinion you're seeing it wrong. The beauty of FP is that from your code's point of view there is no mutation. Everything is immutable, everything is clean and beautiful. But then the compiler is able to tell that your variable that's used as an argument to a tail-recursive function is actually being redefined on every recursive call and treats it as a mutable variable in the output assembly. Similar ideas are applied throughout those languages.

For example, in OCaml you have the notion of "functional record updates". Basically you update structs by getting a whole copy back with the modified fields changed accordingly. Under the hood though, what you get is just the changes and the other fields point to the original struct.

Basically there is a difference between what your code says and what the compiler outputs, but in the end the result is the same, the compiler is just smart enough to rewrite it for you. You're right that it's further from the computer, but only for what you type in your editor. I highly recommend the book Functional Data Structures (it's on Amazon) if these sort of brilliant compiler optimizations interest you.

DonPellegrino··on The infernal semicolon (2012)
The desugar'd version should be

  let () = ...
instead of

  let _ = ...
DonPellegrino··on AMD Discloses Architecture Details of High-Performance “Carrizo” System-on-Chip
Impressive what they manage to do on 28nm compared to Intel.
DonPellegrino··on Markov Chains Explained
Markov chains are fun and relatively simple. I wrote one that generates Reddit comments from other Reddit comments, you can try it here: http://simongrondin.name/files/reddit.html and the code (really dirty, sorry, I wrote the whole thing in 30-45 minutes iirc) is here: https://github.com/SGrondin/reddit-markov-chains/blob/master...
DonPellegrino··on Friends Don't Let Friends Clap on One and Three: A Backbeat Clapping Study
No it's not, the "stomps" are halves.
DonPellegrino··on How Google Works
I was under the impression that the work load at Google is so heavy that it is almost impossible to get "20% time" anymore. During what time did you work on your idea? Are they freeing you of all responsibilities to build your prototype or do they expect you to do it in your free time and then donate it to the company?

Thanks, I'm very curious about this aspect of Google's culture.

DonPellegrino··on France ditches the name ISIS, replacing it with a label the group hates
Apparently part of the reason they hate it is that it sounds like complete gibberish to arabic speakers and the abbreviation is usually said in a very derogatory tone of voice.
DonPellegrino··on Ask HN: I have to analyze 100M lines of Java – where do I start?
check out https://github.com/facebook/pfff
DonPellegrino··on Facebook's std::vector optimization
I would also like expanations, because Facebook actually has a good reputation when it comes to their compiled languages engineers. Their C++ and D engineers built HHVM/Hack, their OCaml engineers built some great analysis tools and much of the supporting code for the HHVM/Hack platform, etc., the list goes on, so I'd like to know why someone would want to avoid their C++ library based on the "Facebook" name only.
DonPellegrino··on Typographic Programming Language
Woah, just imagine the endless metaprogramming capabilities!
DonPellegrino··on Impossible Engineering Problems Often Aren't
Be VERY careful with this sort of advice: "Infrequent user actions can lead to complex server actions."

Malicious users use that knowledge to craft disproportionally powerful DOS attacks. Your site is as vulnerable as the most CPU-expensive feature.

At the very least, rate limit those features.

DonPellegrino··on Service drains competitor's Adwords budget
I don't tunnel HTTP/HTTPS requests to doubleclick.net at all to begin with (I use a whitelist for HTTP/HTTS), but if someone were to do too many DNS requests for the same domain in a short period of time I drop those requests as it means the Source IP I'm seeing is actually the IP of the victim of a DNS Amplification attack and sending them the response would make me a participant in that attack.
DonPellegrino··on Service drains competitor's Adwords budget
This reminds me of a nasty attack I learned about recently. I run http://unblock.us.org, a DNS/anti-censorship server. Unblock does tunneling for censored websites.

There are scripts out there that scan the whole internet for servers that accept HTTP and HTTPS requests to proxy. Those scripts are set up to simultaneously HTTP(S) GET tons of doubleclick.net etc. URLs to get the site owner kicked off Google Ads. I can imagine the black hat hackers selling their services for anyone willing to hurt a competitor's income.

Obviously my server detects those attacks and blacklists them right away, but I was shocked at the ease of carrying that kind of attack. One day I really need to blog about all the shocking stuff going on online that I learned about by running a public service.

DonPellegrino··on The Benefits of Failing at French
The author hits an important point. I'm a native French speaker and speak to anglophones trying to improve their french everyday and the overwhelming majority gets distracted if they don't get the noun genders right, pick the right verb tenses and all sorts of things like that. They hesitate mid-sentence trying to remember the rules and get it perfectly instead of just saying "Tommy hitted me" like in the article. As soon as they start hesitating, they freeze and switch back to English.

I can't emphasize how important it is to just keep going. The point of language is to get the message across. The details like verbs and genders will come with practice and to practice, you need to use the positive feedback loop that getting the message across generates.

DonPellegrino··on Microjs: JavaScript Micro-Frameworks and Micro-Libraries
Super cool idea and implementation! My tiny library is right up your alley, feel free to add it: https://github.com/SGrondin/bottleneck
DonPellegrino··on Netflix replies to Verizon cease and desist letter
AT&T can choose to throttle specific services.
DonPellegrino··on Atom Is Now Open Source
You should read the README before whining. Linux and Windows are also supported.

https://github.com/atom/atom

DonPellegrino··on Wikipedia redesign
Use return instead of rewrite.

    server {
        listen 80;
        server_name www.website.tld;
        return 301 http://website.tld$request_uri;
    }
DonPellegrino··on Show HN: A different approach against online censorship
According to my traffic stats, there's a few people in China using it and tunneling "stuff" over it. I don't know which sites, but I know that it's being used there successfully.
DonPellegrino··on Show HN: A different approach against online censorship
Tunneling the Youtube webpage and flash player is tiny, tunneling the video itself isn't. The video is loaded from googlevideo.com and the Turkish government forgot to block that one...

But yeah, if it becomes popular enough I'm ready to look into ways to pay for more servers and a whole lot more bandwidth.

DonPellegrino··on Show HN: A different approach against online censorship
Read my response to willvarfar. If you have ideas and suggestions on how to deal with that problem, I'm all ears!
DonPellegrino··on Show HN: A different approach against online censorship
That's fantastic, thank you very much!
DonPellegrino··on Show HN: A different approach against online censorship
VPN traffic and VPN providers aren't even seriously targeted in pretty much every oppressive country I can think of. The authorities know that there'll always be a way to pass data through short of scealing the whole country off the internet. The goal is to lower the entrance cost by making a service that combines the speed of VPNs with the no cost aspect of TOR.

If it ever gets enough traction to end up on some government's radar (and keep in mind that VPNs and TOR are hugely popular and mostly left alone), then I'm hoping there'll be enough people running their own servers with the code I open sourced to mitigate that.

DonPellegrino··on Show HN: A different approach against online censorship
I'd like some feedback about the idea and implementation. If you've got any ideas to make it better, I'd love to hear them.

The code is also on Github: https://github.com/SGrondin/unblock.us.org

DonPellegrino··on A List of JavaScript Tools and Libraries
Nice list, I've used most of those tools at the previous startup I worked at. Shameless plug: You might find this tool I wrote useful in plenty of situations: https://github.com/SGrondin/bottleneck
DonPellegrino··on What it's like to use Haskell
Basically, catch SIGINT, then stop listening to a socket/port. Finish all current requests and exit. The "watcher" parent process will restart the process with the new executable. Repeat for all other processes listening to the socket/port.
DonPellegrino··on Google’s suggestion for a better infinite scroll?
My friends and I were heavy Wave users back in college. It was simply the best tool available by combining chat, Google docs and forums into a single tool. It was slow at first, but after the first 6 months of improvements it became progressively very responsive.
DonPellegrino··on The Internet Sucks: Or, What I Learned Coding X-Wing vs. TIE Fighter (1999)
I disagree. Even back in 2005-2006 - almost a decade ago!, in Guild Wars pvp, it was possible to interrupt a 1 second spell with a 1/4 second one, leaving you with 750ms for human reaction time and latency.
DonPellegrino··on Managing Node.js Callback Hell with Promises, Generators and Other Approaches
I'd like to mention my favorite tool to deal with Callback Hell: Streamline, a JavaScript (and CoffeeScript) language extension that can compile to either 1) callback spaghetti 2) Node-fibers or 3) generator code. It basically writes the mess for you. It lets you focus on the higher order concepts and provides configurable parallel array operations as well as many other convenient features. The callback "error parameter" is thrown as an exception to be caught with a basic try/catch. I highly recommend that any Node and JS enthusiast give it a try.

https://github.com/sage/streamlinejs

DonPellegrino··on The Only Interview Question That Matters
Good article, terrible link-baity title.
← PreviousPage 2 of 3Next →