Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.38 KB

screenplay.org

File metadata and controls

62 lines (43 loc) · 1.38 KB

demo screenplay

j demo

NB. Hello, world! Welcome to JPrez!
NB. https://github.com/tangentstorm/jprez

NB. This pane is the editor.

+/p: i.10 NB. sum of the first 10 primes.
. ?i.10 NB. first n?X?ten natural numbers?
i.10 NB. first ten natural numbers
. ^bbbwwbK?primes?<<<<<<? ?0?p: ?
p: i.10 NB. first ten primes
. ^0?+/ ?$bbbK?their sum?<<<<<<<<<? ?$
+/ p: i.10 NB. their sum
. ?p:2342?
p:2342 NB. the 2,342nd prime
. ?p:^_:?XX?:_1 ()?<?20807?
p:^:_1 (20807) NB. which prime is that prime?

j-kvm demo

first slide

'sx sy' =. % 50 32 [ 'w h' =. 240 80
mb =: |.|:8-+/2>|(z+*:)^:(<8) z =: (}:sy*i:-:h) j./~ 1-~ sx * (<.w%_3)+i.w
pal =: (3#256)#: dfh;.1' 0 ffffff ffd21d b28f00 400fe8 1d2799 000055 000033'
pal vm mb

line-by-line demo

NB. having installed J from http://jsoftware.com/
install'github:tangentstorm/j-kvm@work'

Hello, and welcome to my demo.

once it’s loaded

Here’s how you load the “viewmat” part of j-kvm.

Viewmat is short for “view matrix” and comes with J, but here we are adapting it to work in the terminal.

load 'tangentstorm/j-kvm/vm'

Here’s a boolean matrix:

vm ~:/\^:(<32) 32#1  NB. sierpinski triangle

Here’s one with multiple values:

vm i. 5 5            NB. normal viewmat colors