Live data from Hacker News

Advanced programming languages (2009)

matt.might.net

191–200 of 208 posts

Re: Advanced programming languages (2009)

#191

Earlier quoted context omitted.

I am so freaking excited about Scala Native. I haven't been so genuinely excited and enthusiastic about something for such a long time, but Scala Native is so awesome. I feel like turning Scala into a cross-platform language is the best idea possible. I'd love to see Scala someday be able to just dump out WebAssembly, or JVM bytecode, or LLVM IR, or whatever the next "hip" format is, while keeping the language the sa…

The size of the Javascript generated by Scala.js alone makes it a non starter for serious projects.

Cedric, how does a 45KB js file make Scala a non-starter?

Re: Advanced programming languages (2009)

#192
post #15

Earlier quoted context omitted.

Jane Street Capital's Yaron Minsky once said that contrary to popular belief hiring for OCaml developers was easier because the signal to noise ratio in the OCaml community is so much better than other, more approachable languages. He would send a job post to the OCaml mailing list, get 15 responses, interview 10 people, bring five onsite and ultimately hire three new people. I don't have direct experience with this,…

> Jane Street Capital's Yaron Minsky once said that contrary to popular belief hiring for OCaml developers was easier No one will ever admit publicly they are having a hard time hiring because of poor technical choices, that would be suicide.

Cedric, do you have inside information of Jane Streets hiring difficulties or is it just speculation?

Re: Advanced programming languages (2009)

#193
post #44

I don't know much about Scala but Erlang/Elixir fits quite good to the description as well: > Scala is the programming language I use for tasks like writing web servers or IRC clients.

Scala has a very well-regarded implementation of Erlang's actor system. I have personally seen it handle hundreds of thousands of requests spun off as lightweight threads.

I still don't quite understand the point of actor-model concurrency systems running on runtimes that can't perform pre-emptive scheduling, but I guess 80% of a solution is better than none at all.

Re: Advanced programming languages (2009)

#194

Earlier quoted context omitted.

PL theorists don't get own the definition of what "type" means. Type pervades computing. A directory is a different type from a file or character device. A JPEG is a different file type from a PNG. You have MIME types in your e-mail. An ICMP packet is a different type from a TCP datagram. Machine language instruction sets have types: pointers, signed and unsigned words of various sizes, floating-point values. "Type"…

A PL theorist would note that most of the time when people talk about ‘types’, that they really mean ‘classes’, and that all of those things your mentioned would be considered to be the latter. Types are rather the elements of your program that correspond directly to logical propositions (which your program proves to be true).

In software engineering, programs are usually not constructed to prove anything; this claim is just the consequence of an equivalence between logic and static typing (Curry-Howard). Programming languages do not make very good logic systems in spite of the isomorphism. They are not designed to be expressive that way. The logic system exhibited by the type system is geared toward proving trivialities about the program: mainly that its run-time translation won't misuse data. Plus it supports certain devices like polymporphism and pattern matching and whatnot.

Now instead of writing a useful program, we can exploit the type system for doing logic in a separate domain, detached from the program. The proof occurs as a byproduct when we compile the program.

Somehow we encode, for instance, the "all men are mortal; Socrates is a man; therefore Socrates is mortal" argument into types and write the corresponding code. Then when the code compiles, it verifies: yes, the argument is valid. At that point, we throw the program away. What (if anything) that program does is irrelevant; its types have proven the modus ponens as it passed through the compiler, thus quod erat demonstrandum.

That is supposedly what type is all about in a very narrow, myopic branch of computer science.

Re: Advanced programming languages (2009)

#195
post #121

Earlier quoted context omitted.

Once you have had real Hindley-Milner Scala feels painfully primitive. Just go straight to OCaml.

Or go to F# and enjoy the vast universe of .NET.

To be fair Scala does have access to the Java ecosystem

Re: Advanced programming languages (2009)

#196
post #142

Earlier quoted context omitted.

I'm really intrigued by your last point that "Artificial Intelligence is because metaprogramming is easier in homoiconic languages." Can you elaborate on this? Why are or what about homoiconic lnagunages make them more suitable for metaprogramming and AI in general? Thanks

I don't think this is actually true for most of what people do with AI right now. Machine learning these days is something where you want strong, native machine level support for numeric programming on matrices. Possibly with GPU support. So a lisp based language wouldn't really help you much in the current environment. If what you want is a system that rewrites itself, then you definitely want homoiconicity. It also…

Thanks, sure, this makes sense given the origins of LISP. Cheers.

Re: Advanced programming languages (2009)

#197

What about javascript? Could that be a decent language to get into functional programming? It's definitely mainstream enough.

You're lucky you didn't get voted down -5, with the Type Police out and about.

I like ES5 (would be ES6, but for IE support...) Javascript, but it is a bit light on the immutability aspect, given the environment and problem set it usually runs in.

Check out the "Ramda.js" library for JS (http://ramdajs.com/0.21.0/index.html). There's some good concepts put to use there. (although I have my own version of "currying" implemented at work, as I like to sometimes have "0 arity" functions for event handlers -- but those types of "functions" aren't particularly "pure")

Re: Advanced programming languages (2009)

#198
post #189

Earlier quoted context omitted.

Yeah, these tens of kilobytes of JS next to those ten badly compressed 600kB jpgs are really killing it.

this isn't a fair comparison. It fails to account for what happens after the files are downloaded, which is where overall js code size has an outsized effect.

I think people have been including jQuery just fine for the last decade.

Re: Advanced programming languages (2009)

#199
post #186

Earlier quoted context omitted.

I had gnu apl installed (along with emacs mode:). APL and it's siblings are amazing, tiny, expressive, light.. lot to love. Juts nothing as mind bending as; say lambda calculus. Didn't know FL/FPr were arrow-like. Didn't even know they were implemented .. I thought Backus quit because of IO. Lots of people are suggesting the Idris/Agda road .. I guess I have my answer.

As far as FL/FP/FPr go, http://www.call-with-current-continuation.org/fp/ is the most mature and complete implementation I'm aware of. There's #proglangdesign on freenode where a bunch of us have been on an array language/function-level streak lately. Some people there might be aware of more.

brilliant , I didn't know about the ccc impl nor the IRC chan. I know some folks that might be interested.

Re: Advanced programming languages (2009)

#200

> It's untyped, which makes it ideal for web-based programming and rapid prototyping. Given its Lisp heritage, Scheme is a natural fit for artificial intelligence. Why does being untyped and having a Lisp heritage make Scheme suitable for these three tasks?

Web based is because JSON is always easier with dynamic types. Rapid prototyping is because it requires less explicit up front design due to dynamic types. Artificial Intelligence is because metaprogramming is easier in homoiconic languages.

Why is JSON easier with dynamic types? In my experience, there's always a schema of some kind.
Post reply on HN