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

If true, that would be to the detriment of our industry. The systems produced by that generation were typically simpler and more reliable than what we have now.

comment 9y ago · link · parent

They could have used "Scheme" with angled brackets instead of parens, which would have made it look much more like an extension of HTML.

comment 9y ago · link · parent

If you must write your HTML parser in C/C++, then you should expect buffer overruns.

comment 9y ago · link · parent

Having only a single port on one side is indeed a horrible idea; and the MacBook is in no way an entry-level machine (at well over a thousand dollars). Try and step out of the RDF.

comment 9y ago · link · parent

You have your personal annecdotes and I have my own. We will have to agree to disagree.

comment 9y ago · link · parent

It's been a few years since I last read this. Beautifully written, with great metaphors.

comment 9y ago · link · parent

You brought Haskell into the debate (along with many other topics) and I didn't get the impression it was in a positive light, hence my reply.

There isn't really anything more to debate. Your position appears to be that such details are "uninteresting", even for an aspiring high-level language like Python, because there are harder problems to solve. I suspect many academics would disagree, which I infer from their language designs.

comment 9y ago · link · parent

You sound very defeatist. There is world of difference between how much useful mathematics there is in Haskell compared to Python.

comment 9y ago · link · parent

I respectively disagree. I use types for rapid prototyping. Often I write out the type signatures first, type-check the high-level compositions and then fill in the implementations later.

comment 9y ago · link · parent

In practice I do not see it being any more "multi-paradigm" than e.g. Haskell is. It just conflates the imperative and declarative subsets, meaning that a lambda is not really a lambda etc

comment 9y ago · link · parent

I hope you are right. It's spreading all over the industry I work in and the schools want to teach it to my kids.

comment 9y ago · link · parent

In the UK, algebra is first introduced using the equality operator, often with pictures of weight scales and weights, which students are asked to balance. Then they are introduced to a concise notation for this, e.g.:

  1 + x = 3
Simplification comes later; and it often involves moving terms from one side of the relation to the other, which isn't possible with an assignment operator.

I have no doubt that beginners soon learn any different meaning of "=" over time, but why reuse the operator in the first place? Is it really making it "easier" for the beginner? At least with BASIC the context switch was easier as it was strictly imperative. Python tries to mix in more declarative concepts.

The misuse of the equality operator is only one minor detail, but if people care so little about such details, how can they be trusted to look after the more important ones?

comment 9y ago · link · parent

It was before my time, but ALGOL used ":=" long before BASIC existed. The point is that academics have repeatedly not used "=" for assignment for successive new languages over many decades. Clearly they care, even if you do not.

comment 9y ago · link · parent

I wasn't arguing against imperative semantics. I was trying to point out that Python abuses notation and conflates paradigms; and so perhaps may not be the best teaching language. Both Haskell and OCaml make very good imperative languages, but are much more explicit about what's going on. Assignments are clear to see (using "<-") and one must explicitly declare a mutable reference, rather than the Python default of everything is mutable.

comment 9y ago · link · parent

I never said mutating a variable is confusing. I said repurposing the equality operator is potentially confusing, especially for children. Pascal used ":=" to mean assignment, long before Python existed.

comment 9y ago · link · parent

I learnt BBC Basic before my high-school algebra and was certainly confused by the different meanings. Don't concern yourself with tail recursion if you are still learning FP, it's just an optimisation, nothing to do with semantics. Python doesn't have it and few people care. What do you want to do with the numbers 1..100? A for loop doesn't give me any hints, which is part of its problem.

comment 9y ago · link · parent

The syntax is trying to look friendly and familiar, but ultimately it's an abuse of a standard mathematical notation that has meant something else for hundreds of years. The original meaning, an equality relation, is still being taught to high-school children today, typically before python is forced upon them.

comment 9y ago · link · parent

Haskell and OCaml are also 90's languages. The rise of Python at the expense of safer, typed, faster, more principled languages makes me very sad for the state of our industry. I do not even believe it is the best choice for teaching programming to children. It heavily mixes and conflates higher-level ideas like lambdas and list comprehensions with imperative programming and mutation (the assignment syntax "x=x+1" must be especially confusing to high-school kids). It also throws in "object-oriented programming" constructs into the mix too.

comment 9y ago · link · parent

I've been using ZFS on Linux for the past year on a home server. It has worked beautifully and is very simple to use. More importantly it is considered stable. I would certainly not trust btrfs with my data, it simply isn't finished and at this point may never be.

comment 9y ago · link · parent

So Dart hasn't really incorporated any lessons from 20 years of Java, has it? Google's answer to Tony Hoare's billion-dollar mistake is... "The Elvis operator"?

comment 9y ago · link · parent

I'm not sure I like your clothing analogy, it implies that Haskell deliverables are somehow restricted in functionality, which isn't true. The "style" that Haskell prohibits is hiding side-effects and mutable state behind something that pretends to be a function. If you are honest and upfront about what you are doing, i.e. you fully understand what you are doing, then Haskell has no problem letting you do it.

comment 9y ago · link · parent

I disagree. Languages like Haskell are much less tolerant of terrible code, which is a large part of the reason why beginners struggle with it.

I work with other peoples Haskell code daily; and some of this code has been written by domain experts. Nevertheless, Haskell mostly forces them into line. Our competitors use Python because it is superficially "easy", I can only imagine what horrors they must be dealing with.

comment 9y ago · link · parent

I wasn't suggesting they have a performance impact for this particular project.

I'm asking why choose C++ for Thrill if you want essentially non-deterministic automatic memory management and lambdas. Performing e.g. map fusion as you describe is common place for functional language compilers. For example, the vector array library in Haskell has been doing this since 2008.

My hypothesis is that your high-performance implementation could be realised using safer (and I would argue more appropriate) functional languages.

comment 9y ago · link · parent

The JVM was obviously never designed for functional programming. I would like to see something like Thrill built in Haskell or OCaml, both of which generate efficient native code, support unboxed arrays and have metaprogramming/staging facilities that go beyond templates. GHC Haskell even has declarative rewrite rules for compile-time fusion.

I'm still not convinced C++ is necessary to outperform Spark, especially as high-level features like reference counting and lambdas are being used.

comment 9y ago · link · parent

The Actor Model is imperative. The "send" command is updating state as a side-effect, just like POKE from my old ZX81.

comment 9y ago · link · parent

AOP is just a modern take on the joke COMEFROM instruction from 1971. It is not a programming paradigm.

comment 9y ago · link · parent

AFAIK no one uses Objects in OCaml as the module system is sufficiently powerful. The Mirage project is a good example of using OCaml module functors to specialise components.

comment 9y ago · link · parent

F# uses .NET classes and objects for a module system, so your use of Objects for "services" is not surprising. An OCaml programmer is much less likely to miss Objects and DI frameworks, as OCaml has a powerful module system (i.e. module functors).

Free Monads can reify an effectful computation, giving flexibility on how it is interpreted. But they are not really a substitute for a good module system.

comment 9y ago · link · parent

Most mainstream languages don't even have sum types, but have to encode them via other means (enums, tags, inheritance). They are not necessarily the best choice for modelling data, just your preferred choice.

comment 9y ago · link · parent

Yes and Ethereum's imperative approach didn't work out so well. There many FP shops looking at Blockchain. E.g. IOHK which are using Haskell.
1
575859
69