I ported the simplex noise algorithm to straightforward Kap. The result can be s...

@loke@functional.cafe

I ported the simplex noise algorithm to straightforward Kap. The result can be seen here. Interestingly enough, when I ported that to Dyalog APL (that version is almost identical) the Dyalog version runs twice as slow.

I'm not trying to make some grandiose claims with regards to Kap performance (I'm going a bit further into this in an earlier blog post) but I do want to make the claim that Kap is fast enough for real work, in particular the kinds of work for which it was designed (interactive data manipulation tool, for usecases where you may have otherwise used a spreadsheet).

And since I'm doing a brain dump, this reminds me of a youtube ad I saw (the beginning of). It was some ai generated slop ad where someone was made fun of with the statement "you're still using Excel?". Presumably they were selling some ai thing. They all do.

This made me want to make an ad for Kap, with the same kind of setup but they say "hah, are you resorting to ai for this? Why not take the time to learn something faster and guaranteed correct, and you can save your tokens?". We're not making enough fun of people who actively refuse to learn anything.

Anyway, back to the original topic. If anyone looked at the Kap code above and felt it didn't look enough like how your typical APL code should look like, I did get some help by two very smart people in the Matrix room (they are unfortunately not on the Fediverse as far as I know) to create a more optimised version. In addition to being a lot shorter, it's also about 30% faster. Code here.

#kap #apl #programming