6 ms·
He also implemented an APL-like interpreter in Go: https://github.com/robpike/ivy https://github.com/robpike/ivy
by mseepgood 6y ago
He also implemented an APL-like interpreter in Go: https://github.com/robpike/ivy https://github.com/robpike/ivy
- smabie 6y agoPersonally, 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.
- G4BB3R 6y agoIs it a deeper rabbit hole than FP? Could you give some links or good array language names?
- 4ad 6y agoAPL, K, J. Game of life in APL: https://www.youtube.com/watch?v=a9xAKttWgP4 https://www.youtube.com/watch?v=a9xAKttWgP4
- zerr 6y agoHow about some CRUD app examples? :)
- grovehaw 6y agoDyalog 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 https://www.dyalog.com/case-studies/education.htm
- zerr 6y agoThanks! Btw, what would be the open source alternative (of APL) that is popular and used in production?
- yumaikas 6y agoProbably J, if I had to guess. I'm unaware of how much production use it has.
- jetti 6y agoThere is a GNU implementation of APL (https://www.gnu.org/software/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.
- zerr 6y ago> you are going to be paying for Dyalog Not really. As I see APL is ISO standardized and there are many implementations.
- jetti 6y agoThere are many implementations but not as many that are active (here is a brief list https://en.wikipedia.org/wiki/APL_(programming_language)#Modern_implementations https://en.wikipedia.org/wiki/APL_(programming_language)#Mod...). Dyalog provides more than just a interpreter/compiler but an entire development environment.
- tosh 6y agorabbit hole k: https://web.archive.org/web/20131006150020/http://www.kuro5hin.org/story/2002/11/14/22741/791 https://web.archive.org/web/20131006150020/http://www.kuro5h... https://queue.acm.org/detail.cfm?id=1531242 https://queue.acm.org/detail.cfm?id=1531242 https://shakti.com/ https://shakti.com/
- mseepgood 6y agoWolfram Language / Mathematica, MATLAB, R
- smabie 6y agoNo, 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.
- dnautics 6y agoIf 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.
- the_optimist 6y agojsoftware.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 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.
- MichaelMoser123 6y agowhat would you add to awk so that it would make a big difference?
- yiyus 6y agoI 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.
- jnxx 6y agoI 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.)
- ashtonkem 6y agoI 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.
- trevyn 6y agoRust is working on chalk, which claims to be “Prolog-ish”: https://github.com/rust-lang/chalk/blob/master/README.md 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.
- dunefox 6y agoSomething like this? http://shenlanguage.org/ http://shenlanguage.org/ The idea seems pretty damn intriguing.
- fulafel 6y agoDatalog is very much alive in Clojure, there are many implementations and you pick between in-memory and disk based ones.
- fishbacon 6y agoThe presentation he gave on it is lovely. https://www.youtube.com/watch?v=PXoG0WX0r_E https://www.youtube.com/watch?v=PXoG0WX0r_E