News for hackers. Stuff that matters.

wfdctrl

Re:Kosmonaut: web browser from scratch in Rust on Saturday August 15, 2020 @04:41PM (#24172198)
Yes! I like the original idea of HTML, where the client chooses the styling not the website. That way the web cloud be completely consistent, just pure information.
You don't get scared when you read stuff about Haskell because you know what most the fancy words mean
You can get the same effect if you model the expression as a free algebra (ADT). You can then simplify the terms in the same way. The paper: "The design of a pretty printing library", by Hughes, explains this nicely.

The main difference is that algebras are more natural in FP and coalgebras in OOP, but they can mostly do the same things, just a bit differently. Actually you can also do algebras in OOP as well (visitor pattern) and coalgebras is FP.

Basically my point was that you should use the simplest abstraction that gets the job done. Even if you implemented max and pow as objects, for your specific use case, you would probably just call the pure functions inside.

Thank you for the book recommendation.

Why not make max or pow an object then? If you can model something as a pure function, then it should be a function. You can always add memorization later, if needed. OOP is fundamentally different from FP, objects are not just higher order functions, they are also coalgebras. There is no need to force every peg into a coalgebra hole.
Re:A Sad Day for Rust on Friday January 17, 2020 @11:58AM (#22076442)
If you don't understand how opensource works don't use it. If you paid nothing you are not a client and nobody owes you anything...
Re:A calculator for the Terminal that renders beautiful math on Sunday January 12, 2020 @06:58AM (#22025877)
Kitty
Re:Switching from Chrome to Firefox on Monday December 30, 2019 @08:53AM (#21913314)
You can set these settings using a user.js file, so you don't have to reconfigure everything over and over again.
Re:OnlyKey: Open-Source Alternative to YubiKey on Thursday December 26, 2019 @03:06PM (#21886300)
Why does the code look like a copy-pasted mess? Kudos for making it open, though...
Giving the world free access to information is a Russian plot to make the world a better place. We need to put a stop to it immediately!
Re:How Facebook Avoids Ad Blockers on Tuesday December 03, 2019 @02:59AM (#21690681)
Signal
If the app you are using to scan the QR code doesn't ask you for permission before opening the web page that's the problem with the app not the QR code...
Re:NPM Bans Terminal Ads on Friday August 30, 2019 @11:35AM (#20839599)
What about a completely pointless "support the project" license? So you basically chip in for the maintenance, but don't get any additional rights?
Re:Top publishers sue Audible for copyright infringement on Friday August 23, 2019 @05:34PM (#20782846)
Well, technically it's a derivative work, they have every right to sue.