HNHacker News
TopNewBestAskShowJobs

sylvain_kerkour

1,277 karma · joined April 18, 2020

(Ab)using technology for fun & profit. https://kerkour.com
submissionscomments
sylvain_kerkour··on In praise of the European drying rack (2017)
Towels get stiff after air drying because they were too soaked with water.

You should try "spin wash cycle" for 10 mins after washing (not sure about the translation, essorage in French - dewatering).

So you have the best of both worlds: Your towels air dry quickly, and are fluffy, you use far less energy than drying machine, and your towels / clothes are preserved.

sylvain_kerkour··on Ask HN: Is Web3 real or marketing hype?
As far as I know blockchain/crypto/... projects are not structured in a graph-like way like our much loved web.

So web3 is more tree0

sylvain_kerkour··on Ask HN: How should I use my $2000 training budget before end of year?
With all the news about cyberattacks/incidents, it may be a good occasion to learn more about cybersecurity and how cyberattacks are actually performed.

It happens that I wrote a book about Security and Rust :)

https://academy.kerkour.com/black-hat-rust

sylvain_kerkour··on Protected Content, Delete by Date, Device Management and more
While I'm not a fan of Telegram's security model, I have to say that their dedication to create an awesome product is admirable.

EDIT: Just to be clear given the title, I'm not pro DRM, and we can be pro or against auto-removable content, but I just love how they implement features that their users are asking for and the quality of their apps.

sylvain_kerkour··on Show HN: I Wrote a Book about Rust and Security
Hi HN,

Since February I've been working hard to write a book about Security and Rust, the 2 topics I'm working on full-time since 2017 and 2019 respectively.

Why Rust and security?

The world of software is plagued by too many programming languages with too many footguns. You have to choose between fast and unsafe (C, C++…) or slow but mostly safe (Python, Java…).

What if we could have language that is fast, memory safe, provide low-level controls and high-level abstractions? A language that could help us craft everything, from web servers to shellcodes, passing by scanners and Remote Access Tools. All of that while being cross-platform. Sounds too good to be true?

It’s not! Rust is the programming language that meets all these requirements. Of course, there are some pitfalls and a few things to know, but everything is covered in the book.

I've created a special coupon for the launch week that is available until Wednesday, December 8 at midnight: https://academy.kerkour.com/black-hat-rust?coupon=BLACK-HAT-... ;)

Also, I've received a few questions about the tools and services I've used to self-publish the book so I wrote a detailed write-up :) https://kerkour.com/book-self-publishing-pandoc/

sylvain_kerkour··on Signatures: Modern End-to-End Encryption
Hi author here, Happy to see this here :)

The original title of the post was "Signatures: the secret behind Modern End-to-End Encryption" but it seems that HN filtered "the secret behind".

With hindsight it seems that indeed the formulation was a little bit too "clickbaity" so I updated the title to "Signatures: The foundations of modern end-to-end encryption"

sylvain_kerkour··on Signatures: Modern End-to-End Encryption
Good point thanks!

I've updated the conclusion to better reflect that at the end of the day we still have to trust some third-parties, and this is where Open Source comes into play to bring transparency and accountability about what runs on our devices.

sylvain_kerkour··on Ask HN: What to Learn?
I would start with reverse engineering!

Reverse engineering (whether it be web apps, mobile apps or games) gives super powers to those who master it. As nowadays everything is digital and more and more controls are put in place by the monopolies, knowing how to break and modify digital things is primordial.

sylvain_kerkour··on What Language and Framworks to Choose?
From my own experience and the sayings of a Friend who is lead-dev Android, developing for Android is "hair-losing": not only the platform (Android versions) change often, but there are so many different devices with so many different OSes "customized" by the manufacturers that you will spend a lot of time hunting and fixing bug.

The 3 calmest languages I know are Go, Vue.JS and Rust.

Go because it rarely changes, the language is simple and permits to quickly create programs with few bugs. Thanks to its big standard library, the Go ecosystem is relatively stable and there is not a lot of trendy new frameworks to learn every months.

Vue.js on the frontend, like go does not change often, and is relatively opinionated which allows it to be stable and simple to learn (as opposed to react).

Rust for security, embedded development and complex business logic. In contrary to Go and Vue.js it's way harder to master, and thus may fit with your expert personality.

I hope it can help :)

sylvain_kerkour··on Looking for an recent blog post “nobody understands what you mean” or something
https://news.ycombinator.com/item?id=28775517

;)

sylvain_kerkour··on Ask HN: Build your own chat service or buy?
From what I understand you are talking about an chat inside your app, and not a chat for your company (like matrix or Slack).

I would say it depends.

If you know how to implement long polling then making a simple chat is not hard, the hardest part, being certainly the UI, but it can be improved over time. The only thing to remember is to sanitize and check all the input data, as a chat is basically moving untrusted data from user A to user B. A lot of in-house built chat systems are vulnerable to XSS and other injection attacks.

Otherwise, I've never used it, but I believe that a service such as https://pusher.com/ would make it.

sylvain_kerkour··on Ask HN: Are you passionate about your career in software
Hey, For me the worst part was not the job itself (I did ML related stuff) but the environment (commuting, artificial light all day long...).

Since I moved to the (solo) entrepreneurship track I'm way more happy. At first it doesn't pay so you need to have savings, but after some time (depends on the person) you start making a living and you decide what to work on.

Today, half of my time is dedicated to writing software that I genuinely believe have a positive impact on the world (https://github.com/skerkour/bloom), and half of my time is dedicated to writing and sharing (I'm writing a book).

The best thing that I've understood is that even if my primary skills are programming and security related stuff, it doesn't mean I have to code for a living. There are a lot of jobs related to programming that you can switch to.

As a side note, I would add that programming is way too much undervalued in most companies. Programming is very demanding physically and mentally, and if you spend 6hours+ on a chair in front of a screen, you should take a few steps back, and start exercising and leaving the screen a little bit more.

sylvain_kerkour··on Moving a Team from Scala to Golang (2015)
Fixed :)
sylvain_kerkour··on Moving a Team from Scala to Golang (2015)
Hi HN, I found this post really interesting, it's not really about golang per se, but about how to manage complexity when facing challenges.

It's the first time I read a so clear explanation of the tradeoffs software engineers have to make in the real world.

sylvain_kerkour··on How to implement worker pools in Rust
Hello, Author here :)

I did a bad job explaining what I consider to be a worker pool (i.e some kind of class that encourages statefulness and mutable data). My bad, I'll fix that. It's just a question of abstraction.

> what are good practices in Rust when you have different workloads running alongside each other?

Very good question! I will try to add my recommendations at the end of the post tonight.

For the moment, I would say the best practice for this scenario is to use both rayon and a Stream.

The thing is to be careful about how many CPU cores you allocate for the CPU bound tasks and how many for tokio's internal thread pool (it will depend on the workloads).

sylvain_kerkour··on TimescaleDB raises $40M
Great to hear, thank you!
sylvain_kerkour··on TimescaleDB raises $40M
Congrats! I really love the approach they took to deliver value: An extension of an existing rock-solid platform (Postgres) instead of building a new server which would require a lot of time to learn and manage.

Is TimescaleDB suitable to store logs? If yes, how to architect the tables?

sylvain_kerkour··on Ask HN: How do you scale your service worldwide in 2021?
Hi, I faced this situation after a Show HN (https://news.ycombinator.com/item?id=20105567), all I had to do is simply to add a CDN (Cloudflare or AWS Cloudfront) in front of the servers in order to serve the static assets and pages from the CDN, and the API requests by the servers.

If you are not familiar with CDNs yet, learn how works the Cache-Control HTTP header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...) so you can send a different header for API responses than for static assets responses. Then learn how to purge the CDN after each release.

I would recommend to start with Cloudflare as it's cheaper, and easier to use.

A CDN with correct Cache-Control headers and Heroku Autoscaling should bring you very far in term of traffic you can handle.

sylvain_kerkour··on Ethical anti-design, or designing products that people can't get addicted to
A bit dense, but great read nonetheless!

We talk a lot about privacy here on HN, but I'm starting to believe that the most important problem is maybe not privacy, but the addiction generated by those platforms.

Even if they are entangled (because algorithms need out private details to be trained), we could have perfectly private platforms, but still have a lot of people manipulated and addicted.

sylvain_kerkour··on Rust is for Professionals
Do you have a specific language in mind?

Honestly, I don't feel that I spend time managing memory in Rust: I use ARC pointers for long-lived shared object (Database connections pool, mailer...) and otherwise the ownership is pretty straightforward during the lifecycle of a request, data is moved from the top layer (HTTP handlers) to the bottom (Repositories to access Database) and back for the response.

sylvain_kerkour··on Rust is for Professionals
I did a bit of Java and Kotlin for Android development, but never for web APIs so I can't really tell, but one thing I'm sure is that Rust's build system and dependency manager (Cargo) is far more pleasant to use than the experience I had with Java.

Other great things are the ease of packaging with Docker, the low resources usage which helps to keep Heroku's bills small, and the excellent IDE support.

sylvain_kerkour··on Rust is for Professionals
As an indie developer, switching from Go to Rust for web APIs was extremely satisfying. At first there was a productivity loss, but after a few months the productivity was better than Go thanks to Rust's functional features which make it extremely pleasant to write business logic, and the type system catching bugs during development instead of production.

You can read more about the experience here: https://kerkour.com/blog/rust-for-web-development-2-years-la...

The only thing I'm missing is Go's awesome TLS support (with autocert & co).

That being said, I understand your point regarding hiring: a friend of mine totally refuses to learn Rust because the syntax looks not good to him.

sylvain_kerkour··on Ask HN: What's your absolute favorite tech stack, after having tried others?
A few years ago I was Go + GraphQL, but in my experience when your schema is too large it's hard to scale (in terms of code, not performance).

Now I'm using Rust for the backend (its functional aspects make it a perfect choice for writing business logic) which is not REST (more commands oriented, like create_user, create_post, send_email...) and VueJS for the frontend.

Even if it took a little bit of time to learn Rust, I'm extremely satisfied with the productivity of this stack (Far greater than all the other stacks I've experimented)

sylvain_kerkour··on Ask HN: Good Stack for a Single File, Compiled to Binary, Web App?
Even if I'm a big Rust fan and user, what you are describing is exactly the use case that Go is designed for, especially since 1.16 with embed[0].

The big plus is that you can even configure Go to automate TLS certs[1].

[0] https://blog.golang.org/go1.16

[1] https://github.com/skerkour/bloom-legacy/blob/27908e44dd45b3...

sylvain_kerkour··on Bevy 0.5: data oriented game engine built in Rust
Congrats!

For people (like me) who want to see what can be made with bevy, have a look here: https://github.com/bevyengine/awesome-bevy

sylvain_kerkour··on Ask HN: How to sell apps on Linux?
Thank you!

I completely forgot that Steam is not for games only.

sylvain_kerkour··on The biggest threat to Rust's sustainability
Thank you for the heads-up! I missed Reddit's thread as I usually visit social networks only the weekends.

I've bookmarked the page and will for sure read all the comments this weekend, they look very interesting (especially yours, that I've flew over)!

That being said, I stand by my point: Short release cycles are an illustration of The Compound Effect.

> A programming language is a platform. You can't build a thriving ecosystem on top of an unstable platform. We need, as a community, to find a solution to bring calm and focus to Rust, and then we will be able to stabilize and build a great ecosystem of libraries on top of that platform.

> Short release cycles are suitable for products, as you can remove features or UI elements, and thus complexity can decrease over time. But for platforms, it means that you can only add things, as removing parts of a platform will break backward compatibility. Thus complexity may only increase over time.

I would love to see almost "empty releases" in order not to add non-essential features and thus avoid feature bloat.

But then, what is the point of short release cycles if it's not to add features? Wouldn't longer releases cycles make more sense?

sylvain_kerkour··on The biggest threat to Rust's sustainability
Hi author here,

This is just a report of the voices of the people I'm converting to Rust because they are never heard.

The compound effect of small and fast changes is complexity.

Uncontrolled complexity is the thing we want to avoid as it's fatal to any project.

Yes there are editions. But from a newcomer's point of view they only add complexity.

I'm convinced that short release cycle and feature 'bloat' are related. I simply don't want Rust to become the new C++ (which is the feeling of a lot of people).

sylvain_kerkour··on The biggest threat to Rust's sustainability
Hi author here,

Yes this is a piece of opinion, not a scientific measure of anything. This is just a report of the voices of the people I'm converting to Rust because they are never heard.

The compound effect of small additions every 6 weeks is complexity.

Yes there are editions. But from a newcomer's point of view they only add complexity.

Feel free to disagree, but I'm convinced that short release cycle and feature bloat are related. I simply don't want Rust to become the new C++ (which is the feeling of a lot of people).

sylvain_kerkour··on Why I Didn't Open-Source My Second SaaS
Very good read, Thanks!
← PreviousPage 2 of 5Next →