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

The X1 does offer the OneLink+ docking station and soon will offer a TB3 docking station.

comment 9y ago · link · parent

I upvoted you. I agree that shipping non-ECC ram with a Xeon is at best unconventional.

comment 9y ago · link · parent

I disagree it is always trivial to work around. Typically trampolines are used, but these have a large efficiency hit, up to 1000 times slower. Not a problem in many scenarios, but clearly not good for e.g. a concurrency monad. For your pipeline example, you gave a trivial statically determined one. Try an example where each function decides the transistion (tail calls the next one). This is of course also what my Monad and CPS examples in essence do.

Regarding your comments on replacing function composition with data structures. In essence, this is what trampolining does. But it does have a performance cost and is not appropriate in all cases. IIRC correctly the performance of "Extensible Effects" is still an outstanding issue. Incidently, the primary author of that work, Oleg K, has published a lot of work in which he seeks to avoid intermediate data with "finally tagless".

comment 9y ago · link · parent

No, I have been disputing the following parent claim:

> The idea that TCO is needed to "fully" leverage anything is silly.

I provided two examples, monads and CPS transforms, which require TCO to fully leverage in a strict language. But really any example where functions are dyamically composed as a pipeline needs TCO to avoid leaking stack. Your examples of a couple of test libraries in Clojure hardly constitute evidence that TCO is of limited utility.

comment 9y ago · link · parent

I have already stated that it is quite possibly not a problem for Clojure, although this hasn't stopped all the downvotes I keep getting (which doesn't leave me with a good impression of Clojure users). My point is that, despite the claims of the parent post, TCO is needed for many advanced functional programming techniques.

comment 9y ago · link · parent

Yes absolutely, I'd be trading stack for heap.

comment 9y ago · link · parent

No Clojure does not have TCO, due to the JVM. It allows you to manually optimise self-recursion via recur. This is not enough for many advanced FP techniques, such as CPS. For example, using CPS and TCO, I can traverse a tree in constant stack space.

I agree with the parent that lack of TCO in Clojure is probably not an issue for most.

comment 9y ago · link · parent

Perhaps TCO is not required for idiomatic Clojure, but for advanced functional programming using e.g. Monads or CPS, TCO is absolutely necessary in practice.

comment 9y ago · link · parent

It's a shame there is no mention of ATS, which also attempts safe systems programming usings an advanced type system.

comment 9y ago · link · parent

From a security perspective, C is inadequate. This is the biggest issue facing our use of the language currently.

comment 9y ago · link · parent

My example would probably be the work of Phil Bagwell. IMHO the biggest issue with Linked-lists is they do not support parallelism, they are inherently sequential.

comment 9y ago · link · parent

The context here is of course persistent data structures. Linked-lists permit very efficient structural sharing.

comment 9y ago · link · parent

You can create a persistent ordered container that has both prepend and append in amortised constant time; and concatenate in log time.

comment 9y ago · link · parent

It's true that they have a high constant factor, but I think it's too harsh to say they are not useful. One could also say that linked-lists don't match the memory model of real hardware.

comment 9y ago · link · parent

A nice summary. I'd also like to mention Don's talk again, which I feel should be added to the talk list, regarding the production Haskell we have at SCB: https://skillsmatter.com/skillscasts/9098-haskell-in-the-lar...

comment 9y ago · link · parent

It's true that in the UK, the vast majority of us drive manuals for no other reason than to maintain our practice at driving manuals.

comment 9y ago · link · parent

There are certainly newer domain specific languages that fit your criteria such as Go. It can be verbose due to its lack of expressivity and its syntax. But simplicity to me is more about semantics. Should a successor to Javascript or PHP feature the same equality table or even be Turing complete?

There are general purpose languages that enable people to author complex programs because they have terse syntax and are highly expressive. In such cases the programs are complex but the languages are often semantically simple and consistent (e.g. Haskell).

I certainly do not agree in languages like C++, where for example they are attempting to combine the semantics of runtime memory management with the lambda calculus.

comment 9y ago · link · parent

QA is lacking in MacOS too. Lots of tweets about bugs with the latest Macs with touch bars.

comment 9y ago · link · parent

I mostly agree with this. But nobody is "forcing" anything, one can still use Haskell and avoid the e.g. infamous (and non-idiomatic) lens library. But just as you haven't given up on lenses, I also don't agree with the wholesale rejection of ideas based on imperfect implementations, which is what prompted my comment.

comment 9y ago · link · parent

Completely agree. I should have better worded my post.

comment 9y ago · link · parent

I don't think anyone is intentionally ignoring them, just accepting the present reality of hardware designed for C. When Intel finally start selling reduceron hardware graph reduction for my Haskell, I'll be the first in line.

comment 9y ago · link · parent

Yes I have. But my context was modern mainstream hardware. We won't convince anyone on the merits of functional programming by pointing out the existence these old machines. My argument was "have your cake and eat it too", use FP and low-level languages together.

comment 9y ago · link · parent

Nice write up. I'm not sure "Lispified" assembly language really counts as functional programming though. It suggests a layering approach that I suggested originally. Of course, Lisps ubiquitous linked-list and dynamic types are issues for efficient compilation that are not shared by every functional language. The Mirage project is having a lot of success writing a lot of low-level code in OCaml.

comment 9y ago · link · parent

Scala has never properly supported HKTs though. When I last tried it, there were multiple open issues, e.g. the partial application of type parameters. So I really don't buy the argument that Scala scores a point over F# due to HKTs. If you want HKTs, use Haskell.

comment 9y ago · link · parent

Many people use the exact same argument to dismiss the entire functional programming field.

comment 9y ago · link · parent

How many device drivers have ever been written in Lisp? I'm not necessarily advocating C as the best way to write high performance, non-allocating code either.

comment 9y ago · link · parent

I don't believe many are advocating functional programming as a replacement for hand-crafted C, but it is a good alterative to imperative high-level languages which often make big performance sacrifices but offer only small improvements in reliability and abstraction/composition. I absolutely believe the correct way to build software is with language layers. Ideally using FP or declarative languages where you can. Python gets this partially right by using C libraries for all its performance critical work. C++ is IMHO the wrong approach, a jack of all trades and a master of none.

comment 9y ago · link · parent

It's still a process that loses the best applicants. The fact that they don't realise this or don't care, doesn't make a good public impression.

comment 9y ago · link · parent

To be honest, likely Arm is fast enough for most people. My experience of Intel's mobile hardware is that it is noisy, hot and overpriced. I only browse the web and edit text on my laptop, yet I have to suffer fan noise and heat whenever various background processes decide they need lots of CPU (e.g. windows update). I never used to consider alternatives because Intel had great Linux support, this isn't true anymore with regard to their mobile parts.

comment 10y ago · link · parent

Yes the critique is from an educational perspective. Many, especially in academia, view syntactic abstraction as a method of last resort, so it doesn't feature in the courses. So one might ask why then suffer the syntax of scheme if macros are never used?
1
596061
69