Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lokedhs
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
lokedhs
4mo ago
Dyalog APL, along with other modern array languages that are related to it can all do imperative programming with loops etc. There are certainly valid arguments that you hive certain things up when moving to an array language, but loops are
2.
▲
by
lokedhs
5mo ago
Thanks, that makes sense. I guess most CSV data you see in the real world do have headers. Perhaps I was looking too much about thr default CSV export format from Excel, focusing on making sure it can always be parsed. And Excel doesn'
3.
▲
by
lokedhs
5mo ago
I see. Kap tries to be as generic as possible, so assuming that the table has headers doesn't feel right. If the table dont have headers, and the reader assumes it does, then you'll potentially silently lose the first row of data.
4.
▲
by
lokedhs
5mo ago
The string to specify the column types is not a terrible idea. Does it have other configuration options, like whether or not to assume the first row is the headers, or specifying the separator character?
5.
▲
by
lokedhs
5mo ago
That wouldn't help much. People who don't use these languages doesn't understand that what makes the language different isn't the syntax. There are plenty of dialects that use English words instead of symbols (check out
6.
▲
by
lokedhs
5mo ago
Which would have been fine. In fact, if you read the notes from the very first implementation of APL you'll find that it was noted that they considered the lack of proper flow control as a gap that needed to be filled later. Yet, even
7.
▲
by
lokedhs
5mo ago
That list is incomplete. Those are things that Lisp invented but is now commonplace. What it also invented but rather few languages also support is the capability of metaprogramming, being able to treat code as data.
8.
▲
by
lokedhs
5mo ago
This is a good article to understand the thinking behind array languages in general, and APL in particular. However, I disagree with some points made. In particular, this one: > Some people say the most important issue at hand is to impr
9.
▲
by
lokedhs
5mo ago
To be fair, most languages in use today are just FORTRAN with diffrent syntax. Both Lisp and array language programmers are sadly somewhat rare.
10.
▲
Finding Words Using Kap
(blog.dhsdevelopments.com)
1 points
by
lokedhs
2y ago
|
0 comments
11.
▲
by
lokedhs
2y ago
Interesting observation. The fundamental syntax of Kap is the same as APL. The imperative style is added on top, and isn't really the way you'd normally write code. The examples were written that way in order to make a point the t
12.
▲
An imperative introduction to array programming
(blog.dhsdevelopments.com)
1 points
by
lokedhs
2y ago
|
2 comments
13.
▲
by
lokedhs
2y ago
That depends on the specific code. Some code is written to be agnostic to the rank, while others make certain assumptions. In my code I'd sometimes write assertions in the beginning of a function to not only ensure it's called wit
14.
▲
by
lokedhs
2y ago
Just because you can write everything on one line without any spaces doesn't mean you should. You can ofcourse removethe capability to do thatand you'll effectively force the programmer to write more venous code, but then its stre
15.
▲
by
lokedhs
2y ago
It's likely a combination of both. It's certainly possible to write Kap in a much more condensed form. But things like if-statements and hash maps does allow for a more imperative style.
16.
▲
by
lokedhs
2y ago
You're not wrong. It's very easy to get that impression when trying to learn the array languages. It's very easy for someone who's used these languages for a long time to look at a problem, and say "why did you use
17.
▲
by
lokedhs
2y ago
"More efficiently"? Maybe. It opens up a new way to think about solutions to problems. Sometimes those solutions are more efficient, and sometimes they are just different. It's a useful thing to learn though. And dare I say i
18.
▲
by
lokedhs
2y ago
The short answer is yes. There have been many presentations on this topic that tries to explain it in various ways. The problem is that most people who are unfamiliar with APL usually don't see the larger picture, and you need to learn
19.
▲
by
lokedhs
3y ago
It's not sort. In Kap, sort down is ∨. The grade functions returns a sorted index. Basically ⍒ 3 1 2 1 1 returns 0 2 1 3 4. So yes, it performs a sort, but it returns an index that can be used to later look up the respective elements.
20.
▲
by
lokedhs
3y ago
I am the author by the way. The intent wasn't really to try to sell the language. The language is what it is, but the thing I wanted to highlight was that the entire solution (language combined with the user interface) provides a bette
21.
▲
by
lokedhs
3y ago
Well, it's for the JVM, JS or Linux native. :-) Point taken about the tutorials. It's still a work in progress.
22.
▲
by
lokedhs
3y ago
That was not the point of the statement. The argument (possibly poorly phrased) was the there are people people out there that are comfortable with manipulating arrays of numbers than there are programmers who are capable of writing a Java
23.
▲
by
lokedhs
3y ago
I'd argue it's partly because of tradition. If you look at early APL code, including Iverson's earliest papers, it's written with pretty much zero spaces (well, except for where spaces are required). A lot of APL program
24.
▲
by
lokedhs
3y ago
Original author here. Kap is inspired by APL which was very popular back in the day (70's and 80's), and has remained popular within certain segments. There is still enough interest in it to support at least one conference. There
25.
▲
by
lokedhs
3y ago
Nothing stops you from writing the same in Kap: ∇ quadraticRoots (a;b;c) { root1 ← ((-b)+√(b⋆2)-(4×a×c)) ÷ (2×a) root2 ← ((-b)-√(b⋆2)-(4×a×c)) ÷ (2×a) root1 root2 } This is exactly the same code, converted to
26.
▲
by
lokedhs
3y ago
Are any of these cars available outside the US? From what I've been able to tell, US regulations are much weakest in this regard which is possibly why there are so many words cars there.
27.
▲
by
lokedhs
3y ago
The old Mini had that. I remember seeing it in the 80's.
28.
▲
by
lokedhs
3y ago
Author here. The purpose of the post was not to be a tutorial for the language. Just like any other powerful tool, you have to learn it, and this article was not the right place to put a language tutorial. I thank you for your feedback and
29.
▲
Array Languages vs. the Curse of the Spreadsheet
(blog.dhsdevelopments.com)
7 points
by
lokedhs
3y ago
|
3 comments
30.
▲
by
lokedhs
3y ago
Given a function F that accepts an argument x and returns y, its inverse is another function which, when passed y will return x. For dyadic functions, the incerse argument is always the right side one. So negation is its own inverse. So the
More ›