Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

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

Submissions

comment 7y ago · link · parent

Lambda calculus is a lot simpler than Python. It bares a striking similarity to Gentzens natural deduction rules and is essentially isomorphic to it. It is also very well studied and its properties are well known. Hence it makes an excellent basis for a programming language. The idea that Lambda calculus was discovered and not invented was recently entertained by Phil Wadler. Given his academic credentials, I think we can assume he knows what he is talking about.

comment 7y ago · link · parent

I think the title is tongue-in-cheek. Clearly the future is Python and JavaScript.

comment 7y ago · link · parent

That programmers are becoming more interested in maths and the mathematics of program construction can only be a good thing. As someone clearly interested in maths, I am surprised you seek to attack them as "cults". I just see enthusiasm, no different to how folks have enthused about object-oriented programming for decades.

As Brian Goetz (Java Chief Architect) has said, Java will never become Haskell, but it will continue to take ideas from it. So even Oracle is drumming up interest in functional programming. About time I say, industry has been neglecting ideas from functional programming for too long.

comment 7y ago · link · parent

At my UK state school in the 80s, they had a similar policy for musical instruments. They only gave music lessons to those that already were having private lessons (!)

comment 7y ago · link · parent

Because most statically typed languages allow us to define our own types, add type signatures to constrain etc. Dependently typed languages also allow types to depend on values. Inference is useful, but only one aspect of static typing.

comment 7y ago · link · parent

"Dynamic typing" is really just case analysis at runtime. Every static language is capable of dynamic typing, it's not some feature that statically typed languages lack. A dynamic language is really just a static language with one type.

comment 7y ago · link · parent

> Not automatically coercing values is all that strong typing means.

It's at best a colloquial term and it's misleading to non-technical management.

comment 7y ago · link · parent

My point is that your marketing is misleading. Use "strong dynamic types" if you must, but for Python, it would be more accurate to say "strongly tagged".

comment 7y ago · link · parent

The word "type" has a specific meaning in maths/logic, which is not the same as that used by the "dynamic" languages community.

Professor Bob Harper of CMU would refer to Python as unityped, i.e. having a single type: https://existentialtype.wordpress.com/2011/03/19/dynamic-lan...

comment 7y ago · link · parent

Type means statically typed unless you qualify it with your own nomenclature "dynamic". Please don't hijack the mathematical definition of type.

comment 7y ago · link · parent

I believe that marketing Python as "strongly typed" has the potential to confuse rather than educate. Python still crashes at runtime with these errors. It has nice error messages, but it still crashes, potentially in production. If you want to create your own "types", you'll have to add your own runtime checks. It's much more sane than JavaScript, but it's not strongly typed like Haskell. Python does not automatically coerce some built-in runtime values, that's it.

comment 7y ago · link · parent

In my industry, the companies that have standardised on Python and consequently now have large Python codebases are not very productive environments anymore. Perhaps they were once, for the first few people, in the first few months. It's no surprise that the Python community has now started to try and retrofit types.

comment 7y ago · link · parent

To understand the hate, you have to realise that no one likes being forced into using a particular technology. Especially one that is more of a lowest common denominator and ignores much of the progress in programming language research over the last 40-50 years (e.g. expressive static type systems, and Python still markets itself as "strongly typed").

comment 7y ago · link · parent

Not until the libraries get built. They didn't exist for Python either until fairly recently in the history of all these languages.

comment 7y ago · link · parent

> I really enjoy working with python over any other language.

I assume you mean, "over any other language I have tried" ?

As someone with a mathematical background myself, I am always surprised at how many data scientists and quants are ignoring more mathematically principled languages like F#, OCaml and Haskell.

comment 7y ago · link · parent

I am more productive in a language with an expressive type system (e.g. Haskell) than one without. Thinking about types not only guides me towards a working solution quickly, but the checker catches all my minor mistakes. In Haskell, you can actually defer all type errors to runtime if you want to. But I have never felt this makes me more productive.

comment 7y ago · link · parent

The issues discussed in that link, such as concurrency, lack of atomicity and failure are all factors that make bi-directional sync a hard problem. Yes POSIX provides few guarantees and so that burden rests on the application code above. The formal model must consider the race conditions and failure modes, it is not "the easy part". I do acknowledge there is a modelling gap to overcome and some problems with POSIX, but I disagree that its the hardest part of the problem.

comment 7y ago · link · parent

That's really the job of the filesystem to protect against corruption using checksums. ZFS will do this and hopefully more will follow. I suppose a file sync tool could detect a change of contents with no change of mtime, but that would be expensive.

comment 7y ago · link · parent

I disagree. POSIX, although somewhat dated, has provided a good enough abstraction layer for filesystems and OSs. My proof of this is the number of different and successful filesystems for Unix/Linux. If the abstraction didn't work, everyone would be forced to use the same filesystem.

The issues and subtleties are with bidirectional sync. It is not "the easy part". Dropbox didn't get it right in the past, we have no proof they have it right now.

comment 7y ago · link · parent

> there's a million fiddly things to get right, and Unison hasn't had that much usage

Unison is the only bidirectional sync tool that I trust to get the details right. It is backed by a formal model with various proofs of correctness. Such models are also easily representated in OCaml; which I can assure you is more than a fine language, especially if one cares about correctness. Dropbox has struggled to get these details correct in the past (see the paper "Mysteries of DropBox", by Unison's author Professor Benjamin Pierce). TLDR, Pierce teaches these Python hackers how to fix their broken code.

comment 7y ago · link · parent

Yes Java has many issues, but writing complex GUI apps in plain C in this day and age is the wrong thing to do. The early Gnome founders learned this the hard way which led to Mono, which at least had automatic memory management. I fear this OS is destined to become like Samsung Tizen, which is riddled with security holes. It's not as if we don't have excellent libre languages, e.g. Rust and OCaml.

I applaud the open nature of this phone, but using the Gnome stack looks to me like a mistake.

comment 7y ago · link · parent

My time is not free

comment 7y ago · link · parent

To quote Dijkstra, testing shows the presence, not the absence of bugs. If you want to actually prove the absence of these classes of bugs then you need a static type system.

comment 7y ago · link · parent

It's a nice error message, but it's a runtime error, it might not happen until weeks into production. It's technically just a crash with a useful error message. "strict typing that enforces type declarations" is generally called static typing, and does not necessarily always require annotations or declarations. It spots such errors at compile time using static analysis.

comment 7y ago · link · parent

What language are you going to try and improve? Add static types to Python? Or make Java purely functional? Often one needs to start again. Mirth looks much better than most.

comment 7y ago · link · parent

I was making the point that this would never get to Emacs mainline. But sure, no reason why it couldn't end up in a fork, but the fork is not going to give you the same "taste of freedom" ;)

comment 7y ago · link · parent

Quoting the Emacs web site:

"To improve the use of proprietary systems is a misguided goal. Our aim, rather, is to eliminate them. We include support for some proprietary systems in GNU Emacs in the hope that running Emacs on them will give users a taste of freedom and thus lead them to free themselves."

comment 7y ago · link · parent

I've been working on my own encrypted and de-duplicated backup solution using libsodium. It's early days and progress is slow with limited spare time, but it works well enough for my own use already. I wanted to avoid any closed source or even lesser-used open-source encryption.

https://github.com/willtim/Atavachron

comment 7y ago · link · parent

I respect this position, but we must also recognise that it makes Go less of a general purpose language (as is often claimed) and more a domain-specific language (with the domain being systems/network programming).

comment 7y ago · link · parent

Why not allow call-by-name parameters to functions? That would enable library authors to build whatever error handling conveniences they wanted. This feature dates all the way back to ALGOL-60.
1
353637
69