News for hackers. Stuff that matters.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by smabie on Wednesday June 17, 2020 @04:26AM (#23549131)
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.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by ashtonkem on Wednesday June 17, 2020 @10:57AM (#23552179)
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.

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by trevyn on Wednesday June 17, 2020 @11:07AM (#23552317)
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.

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by dunefox on Wednesday June 17, 2020 @12:12PM (#23553067)
Something like this? http://shenlanguage.org/

The idea seems pretty damn intriguing.

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by fulafel on Thursday June 18, 2020 @01:25AM (#23560035)
Datalog is very much alive in Clojure, there are many implementations and you pick between in-memory and disk based ones.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by G4BB3R on Wednesday June 17, 2020 @05:02AM (#23549334)
Is it a deeper rabbit hole than FP? Could you give some links or good array language names?
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by 4ad on Wednesday June 17, 2020 @05:23AM (#23549452)
APL, K, J.

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

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by tosh on Wednesday June 17, 2020 @05:41AM (#23549558)
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by zerr on Wednesday June 17, 2020 @05:37AM (#23549542)
How about some CRUD app examples? :)
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by grovehaw on Wednesday June 17, 2020 @05:48AM (#23549600)
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
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by zerr on Wednesday June 17, 2020 @10:15AM (#23551652)
Thanks! Btw, what would be the open source alternative (of APL) that is popular and used in production?
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by jetti on Wednesday June 17, 2020 @11:15AM (#23552410)
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.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by zerr on Wednesday June 17, 2020 @02:16PM (#23554734)
> you are going to be paying for Dyalog

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

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by jetti on Thursday June 18, 2020 @12:57AM (#23559919)
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.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by yumaikas on Wednesday June 17, 2020 @10:41AM (#23551986)
Probably J, if I had to guess. I'm unaware of how much production use it has.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by dnautics on Wednesday June 17, 2020 @12:14PM (#23553106)
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.

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by the_optimist on Wednesday June 17, 2020 @01:34PM (#23554184)
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.

Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by mseepgood on Wednesday June 17, 2020 @05:51AM (#23549620)
Wolfram Language / Mathematica, MATLAB, R
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by smabie on Wednesday June 17, 2020 @03:09PM (#23555436)
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.
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by jnxx on Wednesday June 17, 2020 @05:34AM (#23549522)
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.)
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by MichaelMoser123 on Wednesday June 17, 2020 @05:21AM (#23549441)
what would you add to awk so that it would make a big difference?
Re:Robpike/Lisp: Toy Lisp 1.5 interpreter in Go by yiyus on Wednesday June 17, 2020 @09:45AM (#23551286)
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.