Hacker Newsnew | past | comments | ask | show | jobs | submit | Asraelite's commentslogin

The Rust standard library.


No it doesn't. The fact that the article had to say "Maybe Redis for caching" because Postgres can't handle caching at scale shows that Postgres is not a perfect solution. Choosing an alternative database that can do everything you need means simplifying your architecture in the spirit of the article (not to say that MariaDB specifically is the right choice here, I'm not familiar enough with it to comment on that).


> because Postgres can't handle caching at scale

Which is the exact point the article is making. You don't have scale. You don't need to optimize for scale. Just use Postgres on its own, and it'll handle the scale you need fine.


https://tech.nextroll.com/blog/dev/2022/11/11/exploring-mona...

The thing that always makes FP concepts click for me is seeing them explained in a language that isn't Haskell or similar.

I don't know why people are so obsessed with using Haskell for tutorials. Its syntax is a nightmare for newcomers and you can do FP in so many other languages.


For instance, C#:

  public static System.Collections.Generic.IEnumerable<TResult> SelectMany<TSource,TCollection,TResult>(this System.Collections.Generic.IEnumerable<TSource> source, Func<TSource,System.Collections.Generic.IEnumerable<TCollection>> collectionSelector, Func<TSource,TCollection,TResult> resultSelector);
compared to:

  (>>=) :: m a -> (a -> m b) -> m b
Guess which one I googled, and which one I typed from memory.


In your c# sample full namespaces are unnecessary and will add only noise in this context.


Haskell have some syntactic sugar which makes monads nice to use, which is why monads are popular in Haskell.

Explaining monads in JavaScript or C# might show the mechanics but will not show why anyone would actually want to use them, since it just result in overly convoluted code.


I strongly disagree. Monads are used all the time in non-FP languages. Parser combinators are one common example. It's just a programming pattern which gives the benefits of global variables without the downsides. They work perfectly fine without dedicated syntax.

I was very confused about what they were until I saw an article similar to the one I linked, and then I realized that I had actually been using monads all along, I just didn't know they were called that. I think a lot of developers are in the same boat.


I dispute that monads are used “all the time” in non-FP languages. Can you provide some examples?


> I don’t know if anyone building a Pi cluster actually goes into it thinking it’s going to be a cost effective endeavor, do they?

Some Raspberry Pi products are sold at a loss, so I could see how it's in the realm of possibility.


Those are not exclusive to Haskell.

Personally, just from reading the title, I was hoping for an article about the design of type systems in programming languages in general.


I don't understand, "cleaner" and "less dirty" are perfectly synonymous to me. Are they not to you?


Same. If anything, this post taught me that actually, depositing and moving around large sums of money is straightforward.


If that actually works, that's terrifying. Do you know of examples of companies facing legal trouble despite geoblocking efforts?


Not companies, just small individuals who couldn’t afford the legal battle.


That shouldn't matter, I'm just curious if it would actually be sufficient legal grounds for a suit or if it would be dismissed immediately.


It is more than sufficient. The law doesn’t care about “Mississippi IPs”, the spirit of the law is if a person is accessing your website from Mississippi, you must verify their age, regardless of what path they are taking to reach it. Can’t verify where they are from? Then you just verify them anyway, you don’t get to just be lazy because you don’t know your user. If you don’t, there is a case that you are being negligent.


Is that just your opinion or is there case law supporting that?


It's not about cookies specifically, they're just one of the many ways you can be tracked.

You can't realistically block fingerprinting without serious effort, and you can't block your IP without using a VPN (which causes a bunch of other problems with sites not serving you).


  Location: Europe
  Remote: Yes
  Willing to relocate: No
  Technologies: Rust, Nix, TypeScript, Java, Python, C, WASM, WebGL/WebGPU, Assembly
  Website: https://mascully.com (WIP, please excuse the design)
  Résumé/CV: On request
  Email: contact@mascully.com
I'm a full-stack engineer with 8+ years personal experience writing Rust. I think that high performance and correctness doesn't need to come at the cost of development speed, and I've tried to spend my career learning ways to accomplish that. I've dabbled in many different areas and can pick new things up pretty quickly. Professionally I've worked on distributed systems, embedded networking, and scripting integrations. I'm currently trying to learn formal verification.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: