News for hackers. Stuff that matters.
Re:A look at the J language: the fine line between genius an... by scottlocklin on Monday August 17, 2020 @10:14AM (#24187404)
The TSDB is now called 'jd'[0] FWIIW. Funny, I've been using J on and off since then and I'm still not sure if it's genius or insane. It, along with the other APLs, is definitely its own thing, just as much as Lisp is (my previous favorite weird language was Yann LeCun and Leon Bottou's "Lush,"[1] which I continue to think is an amazing design). Once you get a little bit proficient at it, you finally realize what an actually high level programming language could be.

I think it's an idea whose time has come in some ways: hardware is more array-like than ever. J has evolved a lot from 806 to the present 902 beta; lots of performance increases from moving away from the single core paradigm (where it excelled anyway). Lots more to unlock there as well, and some interesting J-based startups brewing[2]. I also think it's one of the best user communities I know of.

Oh yeah, Art's new language Shakti[3] should probably be mentioned. Lots of people excited about this.

[0]https://code.jsoftware.com/wiki/Jd/Overview

[1]http://lush.sourceforge.net/

[2] https://www.monument.ai/ for example

[3] https://shakti.com/

Re:A look at the J language: the fine line between genius an... by marmaduke on Monday August 17, 2020 @03:48PM (#24191154)
I started with Lush a long time ago before being obliged to switch to MATLAB and then C.

Recently I have been trying to learn Futhark which is a ML like language generating parallel code (E.g. OpenCL or CUDA) from pure functional code with nested array structures. I find this exciting because when using the GPU with a thin layer like OpenCL directly, you have to write kernels from scratch without much abstraction possible. Higher level APIs like PyTorch or Jax give you easy ways to flexibly structure the computation but you just have to hope for kernel fusion. In Futhark this is in principle explicit and well handled.

ISPC is another example of a C like language where SIMD style parallelism is unambiguous while staying relatively high level.

Re:A look at the J language: the fine line between genius an... by scottlocklin on Monday August 17, 2020 @04:10PM (#24191438)
Yeah, I've been looking for some higher level way of taking advantage of GPUs. Pascal Jasmin wrote a doodad for J talking to Arrayfire, but I never got it to work properly.

https://github.com/Pascal-J/Jfire

Lush: it just felt comfy for a data science workflow. No DB adapters, or even real csv readers, but you could do whatever you needed in the interpreted language and go pretty fast with the compiled bits. Still feels like the future.

Re:A look at the J language: the fine line between genius an... by p1esk on Monday August 17, 2020 @04:01PM (#24191331)
If your primary interest is in parallel code that runs on a GPU, and not autograd features of Pytorch/Jax, take a look at CuPy: https://cupy.dev/
Re:A look at the J language: the fine line between genius an... by dTal on Monday August 17, 2020 @04:33PM (#24191701)
That's extremely cool. Julia has something very similar, in the form of CuArrays [0].

I do wish we had some better cross-platform solutions though, instead of cementing nVidia's hegemony. There's no technical reason why GPGPU should be any more difficult on AMD hardware.

[0] https://github.com/JuliaGPU/CuArrays.jl

Re:A look at the J language: the fine line between genius an... by marmaduke on Tuesday August 18, 2020 @03:32AM (#24196126)
OpenCL was pretty good in this a few years ago. I had some kernels which ran across AMD and Nvidia GPUs as well as many core Xeon systems without changing anything. To squeeze the highest performance out, you still had to tune for the device, but it was a great start.

Now, all vendors seem to have dropped support for OpenCL, though it will live on nicely in PortableCL, which implements it atop LLVM, allowing it to target anything LLVM does, which finally goes further to achieve the open-ness the original standard aspired to, than the vendors themselves at the time.

Re:A look at the J language: the fine line between genius an... by eigenspace on Monday August 17, 2020 @05:29PM (#24192394)
> I do wish we had some better cross-platform solutions though, instead of cementing nVidia's hegemony. There's no technical reason why GPGPU should be any more difficult on AMD hardware.

Then look no further than GPUCompiler.jl. Tim factored out all the platform agnostic parts of CUDA.jl (successor of CuArrays.jl and CudaNative.jl) into GPUCompiler.jl and that is now being used by the AMDGPU.jl package. It works today!

Re:A look at the J language: the fine line between genius an... by dTal on Monday August 17, 2020 @06:51PM (#24193208)
Thanks! I had hit some of those pages before, but their ontology isn't immediately obvious, so thanks for the clarification. In particular I've definitely looked at AMDGPU.jl recently, but as the page says: "not all features (and especially performance) are up to par with CUDA.jl" - hence my impression of AMD being a second-class citizen. Still, it's great that we have anything at all, and I'm extremely grateful for the hard work of those in the Julia community. It's a remarkable achievement.
Re:A look at the J language: the fine line between genius an... by eigenspace on Monday August 17, 2020 @11:51PM (#24195072)
> In particular I've definitely looked at AMDGPU.jl recently, but as the page says: "not all features (and especially performance) are up to par with CUDA.jl" - hence my impression of AMD being a second-class citizen.

That just takes developer time to fix. Currently it’s basically just a one-man show.

Re:A look at the J language: the fine line between genius an... by marmaduke on Monday August 17, 2020 @04:15PM (#24191500)
Right, but does CuPy fuse kernels? I can’t find anything in the docs about it.
Re:A look at the J language: the fine line between genius an... by p1esk on Monday August 17, 2020 @04:21PM (#24191566)
Not sure, but you can write your own cuda kernels inline if you want to.
Re:A look at the J language: the fine line between genius an... by smartmic on Monday August 17, 2020 @03:45PM (#24191122)
The user community is really outstanding. Just have a look on https://stackoverflow.com/questions/tagged/j

Questions are answered in no time, the folks are very friendly and treat everyone on eye level. A great role model for any programming language / software communities!

Re:A look at the J language: the fine line between genius an... by the_optimist on Monday August 17, 2020 @06:02PM (#24192741)
Monument has had great experiences with J. It is fast, runs everywhere, and it is great for data handling and algorithmic dev.

Monument runs on an extended version of J that is implicitly parallel, which enables devs to focus on math rather than optimizing C code.

Re:A look at the J language: the fine line between genius an... by reallymemorable on Tuesday August 18, 2020 @01:29PM (#24201536)
Yes -- it runs super fast!
Re:A look at the J language: the fine line between genius an... by 7thaccount on Monday August 17, 2020 @10:55AM (#24187884)
I'm still waiting for Shakti to have more info on their site. As on now, it seems like it is more tailored for Art's traditional clients of banks and not the common engineer.
Re:A look at the J language: the fine line between genius an... by jloveless on Monday August 17, 2020 @10:59AM (#24187925)
See shakti.sh for downloads and some minimal .d (docs)