|
Internet Janitor posted:Fun side note: my goofy K projects gained enough recognition to land me an interview with a large consulting firm whose backend systems are written in K. NYC has a J meetup, of all things. Be sure to check it out. I went a few times when I lived there, it was one of the stranger meetup communities, in a totally awesome way. I have nothing to add, but really appreciate this thread. I was really interested in the APL family a few years ago, particularly J. I don't do anything with my (limited) strange and arcane knowledge, but blowing people's mind with hooks and forks is a great party trick amongst programmers.
|
# ? Jun 13, 2016 17:18 |
|
|
# ? May 13, 2024 11:12 |
|
I need help from someone more fluent in APL than I am lol I've been looking up where the mathproglangy convention of treating the dot product as the same as matrix multiplication came from and it seems like APL was a big influence. http://stackoverflow.com/questions/20424228/how-come-x-in-apl-works-for-both-matrices-and-vectors/20704876#20704876 So there's this answer and I wanted to know what part of the code corresponds to these 2 steps: "cut A into slices along its last axis, do the same with B along its first axis" Also if anyone could tell me how these particular operations are done in one of the more modern variants like K or Q.
|
# ? Jun 13, 2016 17:57 |
|
I'll be sure to check out that J meetup, SFF- thanks for the heads-up. As for matrix multiplication I think the K formulation is pretty easy to explain. To begin with, dot product is very simple: the sum of multiplying two items. This works equally well for vectors or matrices thanks to K's conforming rules. code:
code:
code:
code:
code:
code:
|
# ? Jun 13, 2016 18:33 |
|
Congrats, IJ. I figure you were bound to be approached eventually because you keep releasing 'weird little side projects' that are really polished.
|
# ? Jun 13, 2016 21:18 |
|
Symbolic Butt posted:I need help from someone more fluent in APL than I am lol It looks like he skipped over how he broke up A and B each into a vector of vectors. It was with the enclose operations (the ⊂ commands on the first line). The [x] direct which axis of the matrix to do the enclose along. Although I'm not sure why he uses a zilde and a 1 for axes, it should be a 1 and a 2 (different flavor of APL maybe?)
|
# ? Jun 16, 2016 03:13 |
|
Internet Janitor posted:Fun side note: my goofy K projects gained enough recognition to land me an interview with a large consulting firm whose backend systems are written in K. niiiiiiiiiiiiice Gettin dat bux.
|
# ? Jun 17, 2016 14:08 |
|
Congratulations on the job! I've become involved in writing an APL compiler targeting GPU execution. As a result, I figured I should probably get some more experience with APL by itself. Is there a nice way to write stencils? Currently we do it by a mess of concatenations and transposes, for example here, for the core of a 2D stencil: pre:iter ← { temp ← ⍵ m1 ← (⍉1↓⍉temp),row 1⍴0 m2 ← (row 1⍴0),⍉¯1↓⍉temp x ← (m1 + m2) - c1 × temp n1 ← ⍉(⍉1↓temp),col⍴0 n2 ← ⍉(col⍴0),⍉¯1↓temp y ← (n1 + n2) - c2 × temp delta ← (step ÷ Cap) × (power + (y ÷ Ry) + (x ÷ Rx) + (amb_temp - temp) ÷ Rz) temp + delta }
|
# ? Jun 20, 2016 03:32 |
|
Athas posted:Congratulations on the job! Two things i noticed: -You can use the [x] modifier on ↓ (e.g. ↓[1] and ↓[2]) to control whether you drop the first row or column from the matrix, instead of doing all those transpose operations.↓[1] will drop by rows, and ↓[2] by columns -If you're appending a row or column that is a single value to a matrix, you don't need to add it as a vector. You just need to concatenate the value of interest with the matrix using the , function (and again, you can control whether you append as a row or column by using the [x] modifier on ,). So, matrix,0 will add a whole column of zeros to the right of the matrix, and 0,matrix will add it to the left. No idea if this will make it faster, but it will be easier to read.
|
# ? Jun 21, 2016 02:32 |
|
Oh yeah, that'll make it nicer. I wonder if it's supported by our parser. Won't do anything for performance, but we're already close to hand-written code anyway.
|
# ? Jun 21, 2016 11:42 |
|
Stumbled across this on HN: Dyalog APL v15.0 Free for Non-Commercial Use Dyalog posted:To make it easier for students, researchers and others who would like to experiment with Dyalog APL to get started, we are making Educational, Personal and Non-Commercial use of Dyalog APL completely free. Low-cost support contracts will be available for GBP150 per year, as they are today. The non-commercial system is a fully functional 64-bit Unicode interpreter, except on the Raspberry Pi where it remains a 32-bit application.
|
# ? Jul 1, 2016 21:33 |
|
You still have to fill out a form and wait for someone to approve it if you want to try it out. There is an "unregistered" version, but only for Windows. Why do they make it so hard to try it out? It's interesting that there's been so relatively many array programming posts on HN recently.
|
# ? Jul 1, 2016 22:07 |
|
They know anyone willing to learn APL is also willing to jump through some hoops. :/ I hadn't actually tried to get it yet, that is pretty dumb. Athas posted:It's interesting that there's been so relatively many array programming posts on HN recently. HN seems to do everything in spurts. Maybe array languages are finally going to get big because concurrency is becoming so important.
|
# ? Jul 1, 2016 22:13 |
|
taqueso posted:HN seems to do everything in spurts. Maybe array languages are finally going to get big because concurrency is becoming so important. Are any of the array languages particularly parallel in practice? I noticed Dyalog added futures recently, which is something you could find in any old procedural language.
|
# ? Jul 1, 2016 22:14 |
|
Athas posted:Why do they make it so hard to try it out? I've had a conversation to this effect with a number of K programmers, as well as discussing the need for more accessible documentation, and the response is basically, "eh, people will find vector languages on their own; they always have." It's a bit frustrating. The main thing I'm learning is that the isolation and obscurity of these language communities is at least partly intentional.
|
# ? Jul 2, 2016 02:11 |
|
Internet Janitor posted:I've had a conversation to this effect with a number of K programmers, as well as discussing the need for more accessible documentation, and the response is basically, "eh, people will find vector languages on their own; they always have." It's a bit frustrating. The main thing I'm learning is that the isolation and obscurity of these language communities is at least partly intentional. Obscurity has some benefits. Knowing an obscure language at all can be used as a signal that you're better than the typical Java[Script] programmer. Using an obscure language would also filter out anyone unwilling to learn it from your hiring process. You trade that typically for a good standard library and ease in hiring.
|
# ? Sep 12, 2016 13:01 |
|
Ever wanted a pocket calculator that could understand K expressions? ...No? Well, er... you can have one anyway: Try it live- I've mainly tested the layout on my iPhone SE, so on larger devices it should still be usable. If the window/browser has a landscape aspect ratio it will instead display a full keyboard. Still tinkering a bit with the layouts. The pl and ps functions are extensions for this oK frontend which plot a line graph or plot a scatterplot, respectively, because it just didn't seem complete if it couldn't function as a graphing calculator. Internet Janitor fucked around with this message at 18:34 on Oct 16, 2016 |
# ? Oct 16, 2016 18:32 |
|
Is there official K documentation somewhere? Something more like a book than a reference card. e: Is this it? http://code.kx.com/mkdocs/reference/ taqueso fucked around with this message at 17:03 on Dec 22, 2016 |
# ? Dec 22, 2016 16:53 |
|
taqueso posted:Is there official K documentation somewhere? Something more like a book than a reference card. That reference really does cover pretty much everything, the language is not large. This is the read if you want to get more of a sense of KDB+ generally though: http://code.kx.com/wiki/JB:QforMortals2/contents
|
# ? Dec 22, 2016 17:16 |
|
The K2 Reference Manual is a bit out of date (kdb+ ships on top of K4), but largely still relevant, and it's fairly exhaustive and well-written. I used it as my primary reference when writing the initial revision of oK. edit: Unrelated, but I've done a bit of work on oK Mobile recently- see the docs for details on spiffy new features. I'm pleased to note that several of my coworkers have started using it as a desk calculator. Internet Janitor fucked around with this message at 00:51 on Dec 23, 2016 |
# ? Dec 23, 2016 00:47 |
|
Happy holidays, everyone.
|
# ? Dec 25, 2016 15:46 |
|
|
# ? May 13, 2024 11:12 |
|
I've been tinkering with parsing techniques lately, culminating in writing a parser combinator library in K. I may try using a similar approach in JS to simplify oK's parser. Here's a parser for Bencode: code:
|
# ? Mar 18, 2017 04:14 |