Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions

Submissions

comment 9y ago · link · parent

This looks great. And being written in OCaml, it probably has less bugs than the official clients do.

comment 9y ago · link · parent

At least Lenovo provide a choice. If you want a mobile Xeon workstation with 64GB ram, they sell it.

comment 9y ago · link · parent

Those buttons are for the nipple not the trackpad. The trackpad otherwise is like an Apple trackpad.

comment 9y ago · link · parent

TLS depends on crypto and the mirage team implemented it using OCaml. It supports low-level intrinsics for timing attack resistance. See: https://github.com/mirleft/ocaml-nocrypto

comment 9y ago · link · parent

How is the deployment of a high-level runtime different from libc? Both can be statically-linked if required.

comment 9y ago · link · parent

It's called abstraction. It's a good thing when trying to build correct software.

comment 9y ago · link · parent

One approach would be do design an embedded DSL for implementing cryto algorithms. And then a compiler for this DSL into C or LLVM.

In fact, I believe something along the lines of this has already been done: https://cryptol.net

comment 9y ago · link · parent

OCaml was used recently by the MirageOS folks to implement a better TLS than OpenSSL.

comment 9y ago · link · parent

Portability is not black or white. Macros are essentially selecting different code depending on the platform. A good high-level language would not need to do this.

comment 9y ago · link · parent

> You provided absolutely no context to go with what was quoted

Not explicitly, but I never said configuring or using i3 was simple. It is a very valid point, but is does not refute the fact that i3 is itself simple.

> You made no indication that your recommended replacement offers no way to hot plug a monitor, connect to the internet, or even launch an arbitrary application

I should have written more originally yes, but I have since given my recommendations for these. So why bring it up again?

> Making this sort of recommendation is throwing the user headfirst into a painful situation likely to give them an extremely negative impression of i3.

This is Hackernews and I was replying to knowledgeable posters. I think it is safe to assume they will look into it first without getting into a "painful situation".

Although you do raise some good points, I feel it is your posts that have given an overly negative impression of i3.

comment 9y ago · link · parent

You are quoting me out of context. I originally said i3 is simple in a reply to a post complaining about KDE and GNOME, both of which are hugely complex installations of numerous libraries and services. So complex in fact, that they cannot be made to work reliably. Granted i3 provides substantially less functionality, but this comes from being simple.

Your examples above are mostly common configuration issues, easy to find with Google. Even a Windows user would likely need to Google many things (e.g. disabling forced updates, privacy settings, registry hacks).

I'm also skeptical that Gnome or KDE will make it significantly easier to solve such configuration issues. Do they even allow settings to be easily moved to another machine? Unfortunately Linux in general will always need some tweaking to work with specific hardware.

comment 9y ago · link · parent

For the pieces you mention, I use tlp, connman and xrandr. Yes they have a small learning curve and I wouldn't recommend them to everyone, but they are stable and not likely to change (whereas Apple/Microsoft/Redhat are constantly reinventing their UIs).

Building out a desktop environment from ones own choice of components is much more aligned with the Unix philosophy.

comment 9y ago · link · parent

Try something simple like i3

comment 9y ago · link · parent

I agree that his advice will be difficult to follow in less expressive languages.

> So a library to organise the code which interacts with other libraries? Sounds an awful lot like a framework to me?

The domain/purpose does not alter the framework/library distinction according to his definition.

comment 9y ago · link · parent

> points he makes really don't translate to the software engineering world

His advice is in the context of functional programming languages. F#, Scala and even Haskell and OCaml are now very much part of the software engineering world (albeit a small part).

> How do you organise the interaction of libraries? You can do it yourself but you will have to follow some sort of pattern to organise the code

Because libraries compose, there's nothing to prevent a library on top of all these others libraries to accomplish this. If you have to repeat yourself with "patterns", your language of choice is failing you.

comment 9y ago · link · parent

I would argue that Async in F# is just a library. Async tasks are essentially just functions that are composed using the more general "workflow" syntax. The final composite Async must be explicitly run with a choice of scheduler.

I suspect Libraries-not-frameworks is only advice for those using sufficiently expressive languages. So probably not appropriate advice for JavaScript.

comment 9y ago · link · parent

I think the Elm folks are playing a waiting game. There are alternatives to type-classes such as the proposed modular implicits for OCaml.

comment 9y ago · link · parent

> Moreover, if you invoke these functions multiple times they will produce different results

No this isn't true! Again, you clearly do not yet understand Monads. Please read Phil Wadler's paper.

What you have successfully demonstrated, is that the JavaScript snippets you have been advocating are not sufficient to understand Monads.

comment 9y ago · link · parent

These functions do not perform IO, they return IO actions that can be further composed. They are invoked from other functions that also return IO actions, again no IO is actually performed until the top-level final composite action is run by the runtime.

All composition of IO actions is performed with full referential transparency and adherence to the Wikipedia definition.

comment 9y ago · link · parent

Haskell is used to wire-up the IO actions, they are then delivered to the runtime via the main definition. The runtime performs the IO actions.

comment 9y ago · link · parent

> As soon as you have side-effects (an IO is a side-effect) you can through your assumptions about "strict conformation to definition" out of the window

Again, you are unfortunately quite wrong. You do not understand the IO Monad. No IO is ever performed in any code written inside the IO monad (unless using unsafePerformIO).

Please take some time to fully understand Haskell before criticising it so openly on a public forum. Perhaps then it might not all seem rather pointless.

comment 9y ago · link · parent

Now you have the condescending tone! However, it appears you don't understand the IO monad. Programming using the IO monad is pure functional programming with full referential transparency. Please read Phil Wadler's paper, you will not understand this from that JavaScript snippet. The only backdoors are escape hatches like unsafePerformIO which are used for low-level libraries and FFI, they can be disabled with pragmas and/or compiler switches.

It is much harder to stay true to that definition using the other languages, multi-paradigm or not. That is why Haskell is so often mentioned in the context of FP.

comment 9y ago · link · parent

Agreed in general, but equality is so fundamental that I could forgive any built-in support. Even Haskell has "deriving Eq" built-in for example.

comment 9y ago · link · parent

Only Haskell strictly conforms to that definition. None of your other examples do.

comment 9y ago · link · parent

This is not really a definition of a Monad. For example, there's no mention of the Monad laws.

Monads are a very general and powerful abstraction that are not adequately described by your example. My advice to anyone is to read Phil Wadler's seminal paper, it is very easy to read.

comment 9y ago · link · parent

You are misquoting me. I said steering others away from the original source of work to an interior source (incomplete at best) is anti-intellectualism.

I do not mean to be condescending, but I feel very strongly about this.

comment 9y ago · link · parent

You certainly would need a PhD to fully understand Monads from that small JavaScript snippet. The Haskell link you gave gives Phil Wadler's original paper as the first link. It is easy to read, explains everything beautifully and full of many examples. Learn some basic Haskell for no other reason than to read seminal papers such as these. To favour some random JavaScript hacker on the internet and steer others away from the original work is anti-intellectualism.

comment 9y ago · link · parent

What definition of FP are you using? Because if it's just first-class functions, even Visual Basic has this now.

comment 9y ago · link · parent

It we would be easy to add simple built-in constraints for things like equality, without jumping all the way to full-blown type classes. This would be a very minimal change to the type checker and should not require a rewrite.

comment 9y ago · link · parent

Good points. I also swap Ctrl and Alt on both sides, using my thumbs for Ctrl. Using the opposite hand to press the modifier is analogous to how a touch typist uses the shift keys. For desktop use, I now use a Kinesis keyboard, again with symmetrical modifiers but all as thumb keys.
1
535455
69