array
bqn-libs
array | bqn-libs | |
---|---|---|
6 | 1 | |
45 | 45 | |
- | - | |
0.8 | 6.9 | |
about 1 year ago | 5 months ago | |
Kotlin | ||
MIT License | BSD Zero Clause License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
array
-
Ngn/k (free K implementation)
In some of the example programs written in KAP (my APL derivative), I tried to write it in a style that makes people unfamiliar with the array style more comfortable.
This code could of course have been written in a style similar to some of the more extreme examples, and they would have been significantly shorter in that case.
https://github.com/lokedhs/array/blob/master/demo/advent-of-...
-
Why would a Java prime sieve run at only half its speed _some_ of the times?
This issue isn't directly related to BitSet. I have observed the same thing in my programming language interpreter that runs on the JVM (well, it's written in Kotlin multiplatform so it runs on JS and Natively as well).
I start the interpreter and measue the time it takes to all all then numbers below 1000000000.
The first time I run it after starting the interpreter it always takes 1.4 seconds (within 0.1 second precision). The second time I measure the time it takes 1.7, and for every invocation following that it takes 2 seconds.
If I stop the interpreter and try again, I get exactly the same result.
I have not been able to explain this behaviour. This is on OpenJDK 11 by the way.
If anyone wants to test this, just run the interpreter from here: https://github.com/lokedhs/array
To run the benchmark, type the following command in the UI:
time:measureTime { +/⍳1000000000 }
- Is APL Dead?
- Symbolic Programming
-
Try APL
I'm the opportunity to mention my project that implements a language that is inspired by, and is mostly compatible with APL. It has some major differences, such as being lazy evaluated and providing support for first-class functions.
It also supports defining syntax extensions which is used by the standard library to provide imperative syntax, which means you can mix traditional APL together with your familiar if/else statements, etc.
At this point there isn't much documentation, and the implementation isn't complete, so I'm not actually suggesting that people run out to try it unless they are really interested in APL. I just took this opportunity since APL is mentioned so rarely here.
https://github.com/lokedhs/array
There is an example of a graphical mandelbrot implementation in the demo directory, that may be interesting.
-
Why am I wasting time on EndBASIC?
This post mirrors my feeling on this topic as well. Just like the author, I'm also working on a programming language which will not be used by a lot of people.
In fact, having a lot of users would make things complicated as I would have to stop making incompatible changes if I want to try something new.
Designing your own programming language is such a nice hobby, and something I believe a lot of programmers do. In fact, I would like to see links to other people's programming languages, just to see what people are playing around with at the moment.
Here is my project: https://github.com/lokedhs/array
bqn-libs
-
Ngn/k (free K implementation)
Languages with multidimensional arrays (APL, BQN, J, but not K) have trouble with dicts because an index into an array is a list of numbers, and an index into a dict is an arbitrary value. Many primitives, and especially selection, are designed around lists of numbers and don't transfer to dicts. In K, where the index into a list is one number, there's still a requirement that the keys in a dict all have the same level of nesting, but this isn't bad in practice. BQN will eventually have hashmaps implemented as in a more mainstream/conventional way, as objects. There's a model at https://github.com/mlochbaum/bqn-libs/blob/master/hashmap.bq... .
I don't think studying the compiler is a very good way to learn BQN, but I would like to write up parts of it (limited by time and motivation of course). I did some chat sessions on this sort of compilation during early development; see the links at the bottom of https://mlochbaum.github.io/BQN/implementation/ .
What are some alternatives?
BQN - An APL-like programming language. Self-hosted!
Kbd - Alternative unified APL keyboard layouts (AltGr, Backtick, Compositions)
ride - Remote IDE for Dyalog APL
PDP_11_Simulator - PDP11 Simulator written in APL
ngn-apl - An APL interpreter written in JavaScript. Runs in a browser or NodeJS.
kona - Open-source implementation of the K programming language
j-prez
kerf1 - Kerf (Kerf1) is a columnar tick database and time-series language for Linux/OSX/BSD/iOS/Android. It is written in C and natively speaks JSON and SQL. Kerf can be used for trading platforms, feedhandlers, low-latency networking, high-volume analysis of realtime and historical data, logfile processing, and more.
jelm - Extreme Learning Machine in J
aoc2017 - ngn/k
json - A tiny JSON parser and emitter for Perl 6 on Rakudo
julia - The Julia Programming Language