Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He also implemented an APL-like interpreter in Go: https://github.com/robpike/ivy


The presentation he gave on it is lovely.

https://www.youtube.com/watch?v=PXoG0WX0r_E


Personally, I find that one much more interesting. Before I was familiar with array languages, I hoped that functional programming and lisp would become the new zeitgeist of software development. Now, I think that array languages have the most promise in revolutionizing the discipline. While it probably wont happen, I wouldn't complain if array languages became the defacto norm for most new applications.


I always get the feeling that a lot of languages would be well served by having an APL or prolog implementation added as a library or macro; this would let teams leverage these tools down in the core of their application without having to compromise on how they create APIs.

Closest I’ve seen to this was core.logic in the Clojure community, but it appears to be dead.


Rust is working on chalk, which claims to be “Prolog-ish”: https://github.com/rust-lang/chalk/blob/master/README.md

It’s being used in rust-analyzer (the leading language server) today, and is likely to be used in the compiler in the future. Not really intended to be general-purpose, but an interesting datapoint. And could evolve to be more general, knowing the Rust community.


Something like this? http://shenlanguage.org/

The idea seems pretty damn intriguing.


Datalog is very much alive in Clojure, there are many implementations and you pick between in-memory and disk based ones.


Is it a deeper rabbit hole than FP? Could you give some links or good array language names?


APL, K, J.

Game of life in APL: https://www.youtube.com/watch?v=a9xAKttWgP4



How about some CRUD app examples? :)


Dyalog is an APL vendor, they also offer a non-commercial license and high quality documentation. They have a case study of a school management system that is a record keeping system [0]. [0] https://www.dyalog.com/case-studies/education.htm


Thanks! Btw, what would be the open source alternative (of APL) that is popular and used in production?


There is a GNU implementation of APL (https://www.gnu.org/software/apl/). Not sure if it is used in commercial applications or not. I would imagine that if you are doing commercial work with APL you are going to be paying for Dyalog.


> you are going to be paying for Dyalog

Not really. As I see APL is ISO standardized and there are many implementations.


There are many implementations but not as many that are active (here is a brief list https://en.wikipedia.org/wiki/APL_(programming_language)#Mod...). Dyalog provides more than just a interpreter/compiler but an entire development environment.


Probably J, if I had to guess. I'm unaware of how much production use it has.


If you want something in between, i'd suggest Julia, which has taken a lot of array programming concepts and ported them into a functional language, so you can get the ideas without going so far down the rabbit hole that everything is an array.

The problem though might be that those ideas (like Julia's broadcast) are so seamlessly integrated into it's functional paradigm that you won't "really" know which parts are parts where you've been tricked into doing array programming.


jsoftware.com

- GPL license - Extremely well-documented - General purpose - Runs on any platform - 64-bit - C-like performance for many operators - Interpreted, interactive development environment - Package manager - Near-zero boilerplate

https://www.jsoftware.com/books/pdf/easyj.pdf

"Array language" describes a pretty generic syntax format wherein an operator acts on multiple inputs. Functional programming is a style that nests nicely with arrange languages. If you know "R," just think of lapply. It's like lapply everywhere, but without the lapply syntax. Every function is vectorized.

People who aren't formally trained on loops or object-oriented programming tend to pick this up more easily. That said, you can do OOP and loops in J if you want to.


Wolfram Language / Mathematica, MATLAB, R


No, not really, None of these are what I'm talking about when referring to "array languages". I'm talking about APL and its descendants, j, kdb+/q, k, etc.


I think a lot of these ideas have gone into Python's Numpy, for example. But I believe these are useful for the domain of signal processing and numerical computation, and not that well suited for general problems. (You might be interested in Racket which is a Scheme relative that has very good support for both domains.)


what would you add to awk so that it would make a big difference?


I would not call awk an array language. Arrays are essential in awk, but it lacks array operations. For example, in an array language, you add two arrays a and b, element by element, with a+b, while in awk you need a loop. Moreover, you do not have direct map and reduce operations, and again you need loops.

As a fan of both awk and array languages, I think that an nsl-awk would be a really interesting project.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: