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

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


On the other hand it would be easier to just avoid Haskell.


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.


Yes, why not have max and pow as objects?

`max` and `pow` can either run eagerly (as functions) or they can run lazily and allow for interesting lazy things. For example, if you put them into a lazy object graph, you could perform optimizing measures.

Check this out:

1/2 * 2/1 == 1

Would you actually calculate each intermediate result of that expression? Or would you just reduce the fraction? Should 1/2 be exectuted and yield 0.5 immediately, or could it be useful to have them hang around some more? FP vs. OOP is the difference of understanding / as "Please divide 1 by 2 now" vs "That IS a fraction; one half".

> There is no need to force every peg into a coalgebra hole.

True, but how awesome would it be if I did that anyway :D

Regarding `max` and `pow` as objects: Yegor Bugayenko argues for a similar thing in his book "Elegant Objects".


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.


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...


Kitty


Kitty also has their own custom protocol for images. That's exactly what they try to accomplish in this discussion thread, to get one common protocol which is used by all modern terminals. The developer of Kitty is also in there.


You can set these settings using a user.js file, so you don't have to reconfigure everything over and over again.


Yep, if you don't want to use Sync, user.js is an alternative. It's also helpful for sharing settings across multiple profiles. (For the latter, I do wish there was support for including other files...)

There is a user.js project on github[1] maintained by ghacks.net community members that provides a source of documentation for many settings. It's also useful as a way to monitor new and deprecated settings.

[1]: https://github.com/ghacksuserjs/ghacks-user.js


thanks for this!! Hope this will solve my main annoyance with Firefox: sometimes I change Linux distro and then I lose all of my firefox settings, ("sync" would be better and keep flags changed by the users, but I don't think that the FF devs bother about it)


Uh didn't know that, I'll have to redo my `about:config` tweaks in that format.


Why does the code look like a copy-pasted mess? Kudos for making it open, though...


Thanks I guess... We always review PRs


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!


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...


Most QR codes are use to open a website and you do get a prompt for that at least on iOS so I don't see an issue there.


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

Search: