blacklightis a general-pupose multithreading concatenative stack-based programming language with first-class queues and objects with delegation.
Program state is stored in a simple set of stacks.
Code reuse through vectors of operations and object slots.
blacklight is awesome, here's a few reasons why:
- easy to use builtin parallelism through native multithreading
- data structures are thread-safe by default
- native queue type for inter-thread communication
- stack-oriented programming
- concatenative programming
- objects with delegation
- great for MapReducing, ETLing, and general data processing
newq newq ;; create send and receive queues [ [ deq ;; will block if the queue is empty n-to-cv rot swap enq ;; convert number into a cv (string) and send back swap ;; reorder queues so we can loop without confusion ] loop ;; using loop since it goes forever ] work ;; start new thread and swap the queues swap ;; bring send queue to top 1 enq 2 enq 3 enq 4 enq ;; send some numbers to be converted 0 [ 1 add ] [ 1000 eq ] until drop ;; give the main thread busywork swap q-to-v ;; get contents of receive Q as V print ;; display contents of V