Live data from Hacker News

In Praise of APL: A Language for Lyrical Programming (1977)

jsoftware.com

51–60 of 60 posts

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#51
post #37
post #18

Now that I feel the bite from my sedentary lifestyle on my bum, I'm more and more attracted by the idea of a language taking 1/10th the typing compared to what's typical today. However, afaict languages following APL's suit specialize in math, so I wonder if the approach could be adapted to more general kind of coding. Even though the set of short symbols has to be limited, don't we currently have a few dozen often-r…

> However, afaict languages following APL's suit specialize in math, so I wonder if the approach could be adapted to more general kind of coding. I use k/q regularly, and I'm not using it for "math". The compact notation creates value in helping you make correct programs. See [1] and [2] specifically. [1]: https://news.ycombinator.com/item?id=8476294 [2]: https://news.ycombinator.com/item?id=8476702 You can write C i…

If you rewrote [3] to use cleaner variable naming, perhaps the readability would improve?

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#54
post #32

Earlier quoted context omitted.

I think you're just bad at reading pointfree notation, tbh, which is not a particularly interesting commentary on OCaml or Haskell. Lots of things lend themselves well to pointfree style, and if you do not see them it is because of your own horizons. You can write OCaml/Haskell with names like doesFileExist when you need to.

"You can write OCaml/Haskell with names like doesFileExist when you need to." You can, but it's rarely done in practice. This is a cultural issue more than a language issue. OCaml/Haskell programmers just seem to prefer much shorter, more math-like names than Lisp programmers do. For me this makes a huge difference when reading through code written by the community. Lisp is just much more immediately understandable t…

Interestingly, I noted I tended to use one letter variables when writing in Ruby, and the longest, most descriptive possible variable's names when writing in C#; And Ruby, I think I have read somewhere, is somewhat close to lisp. There is the readability of the language itself to weight in too, when its easy to see the important stuff, you can name the important stuff with short names. And there is the most important, what are you writing about; Strangely I always remember to myself that the only important goal is to write the slowest, most natural language, and above all, most natural/daily-life/ELI5 Logic. But always end with the logic looking like pure math notation, like if I looked at it not knowing it was me who wrote, would think is unreadable Dark Magic Math, and I end with it having zero Math or CS formal training (only highschool), so maybe it's inescapable.

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#55
"Above all, remember what we must provide is a pou sto to last the student for 40 years, not a handbook for tomorrow’s employment."

At least around here, this strikes a nerve. Especially 40 years later. All of the colleges in town prep for the local market of tech rather than the fundamentals that may be advantageous overall and potentially financially more so out of market. I know stellar remote and small / mid size shop engineers in this part of the south, but by and large the schools are completely myopic about this and perpetuate the microcosm of low paid enterprise focused sweatshop cubework. I realize to paint it with such language is hyperbole but it's certainly not the exception to the rule.

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#56
post #44
post #37

Earlier quoted context omitted.

> However, afaict languages following APL's suit specialize in math, so I wonder if the approach could be adapted to more general kind of coding. I use k/q regularly, and I'm not using it for "math". The compact notation creates value in helping you make correct programs. See [1] and [2] specifically. [1]: https://news.ycombinator.com/item?id=8476294 [2]: https://news.ycombinator.com/item?id=8476702 You can write C i…

Node.js is not the thing to compare C web servers performance to. Like, it's so much not the thing, it goes beyond funny and wraps around to sad. Let me refer you to the TechEmpower framework benchmarks: https://www.techempower.com/benchmarks/#section=data-r17&hw=... Look at the language column there, you'll be surprised.

Here's fasthttp running on my machine (best of three):

    $ wrk -t2 -c90 -d9s http://localhost:8080/plaintext
    Running 9s test @ http://localhost:8080/plaintext
      2 threads and 90 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency   831.78us  364.48us   7.56ms   70.19%
        Req/Sec    40.55k     3.31k   48.04k    74.44%
      726417 requests in 9.01s, 87.98MB read
    Requests/sec:  80603.64
    Transfer/sec:      9.76MB
which I got by checking out https://github.com/TechEmpower/FrameworkBenchmarks.git, disabling the mysql connection, and running frameworks/Go/fasthttp's ./server-mysql (which is what the benchmark script seems to do). I thought this would be easier than getting dash running the TechEmpower results.

and here's dash running with the kdb networking disabled (best of three):

    $ wrk -t2 -c90 -d3s 'http://127.0.0.1:8080/?f=204&k=hi&v=1'
    Running 3s test @ http://127.0.0.1:8080/?f=204&k=hi&v=1
      2 threads and 90 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency   787.72us  213.62us   3.49ms   71.85%
        Req/Sec    44.82k     3.04k   60.44k    83.61%
      271946 requests in 3.10s, 16.08MB read
    Requests/sec:  87671.23
    Transfer/sec:      5.18MB
My laptop isn't a beefy "Dell R440 Xeon Gold + 10 GbE" -- this is just a loopback test, but it's already disinclined me to spend any more time on it; Fasthttp definitely is impressive how close it gets, but dash is still faster.

And comparing a 100 line C program to hundreds or thousands of lines of go or C or Java is a bit pointless. If the 100 lines of C doesn't do what you want, I'll throw it away and write a different 100 lines. That's what brief programs get you.

NB: I would have tried ulib but it wouldn't even build on my laptop.

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#58
post #21
post #7

Earlier quoted context omitted.

I think KDB might be what you’re looking for. It’s very efficient and widely used in finance. It’s pretty expensive, but I believe you can use it for personal use for free (there might be a single core restriction I think). As an aside, KDB devs make bank, like salaries >500k

I've always been curious how people get into this. I've been interested in KDB ever since I read http://archive.vector.org.uk/art10501320 , but it's not exactly a language they teach in college or you'd pick up in independent study. Do people just apply to fintech places with relevant experience and then get training for kdb?

The latter. Like everything else in finance, you have to learn on the job. The good news is that since no one who hasn't worked on Wall St (and even most who have) knows anything about the industry (and that the talent pool is pretty small compared to Silicon Valley, at least for non shit-analyst jobs), they are willing to accept people who don't know much, providing you have the basic chops (basic calculus, statistics, and good programming skills).

I really wish more programmers would get into the industry, since the status quo is pretty terrible. The financial industry needs more quantitative folks so we can kill off the dinosaurs of the "greed is good"/pre-decimalization world :)

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#59
post #7
post #2

I can imagine that a fork of GNU APL, re-written in FORTRAN with multi-threaded and maybe distributed computing support, would be an amazing mathematical tool. Something that's super fast and scales really well, and makes mathematical operations really easy.

I think KDB might be what you’re looking for. It’s very efficient and widely used in finance. It’s pretty expensive, but I believe you can use it for personal use for free (there might be a single core restriction I think). As an aside, KDB devs make bank, like salaries >500k

[deleted]

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#60
post #21
post #7

Earlier quoted context omitted.

I think KDB might be what you’re looking for. It’s very efficient and widely used in finance. It’s pretty expensive, but I believe you can use it for personal use for free (there might be a single core restriction I think). As an aside, KDB devs make bank, like salaries >500k

I've always been curious how people get into this. I've been interested in KDB ever since I read http://archive.vector.org.uk/art10501320 , but it's not exactly a language they teach in college or you'd pick up in independent study. Do people just apply to fintech places with relevant experience and then get training for kdb?

I have no idea about it, but Kx Systems have a YouTube playlist updated this year, "Introduction to kdb+ and q" -

https://www.youtube.com/playlist?list=PLypX5sYuDqvrwBD2EMWad...

Post reply on HN