6Computes the result of `2^a`, producing an atom.
21 ++ bex :: binary exponent
46Produces an atom from a list `b` of length-value pairs `p` and `q`,
47where `p` is the length in bloqs of size `a`, and `q` is an atomic
53`a` is a block size (see `++bloq`).
55`b` is a `++list` of length value pairs, `p` and `q`.
67 |= [a/bloq b/(list [p=@ q=@])]
70 (mix (end a p.i.b q.i.b) (lsh a p.i.b $(b t.b)))
75 > `@ub`(can 3 ~[[1 1]])
77 > `@ub`(can 0 ~[[1 255]])
79 > `@ux`(can 3 [3 0xc1] [1 0xa] ~)
81 > `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
83 > `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
84 0x23.000a.0000.0000.00c1
85 > `@ux`(can 3 ~[[1 'a'] [2 'bc']])
94Concatenates two atoms, `b` and `c`, according to bloq size `a`, producing an
100`a` is a block size (see `++bloq`).
114 ++ cat :: concatenate
117 (add (lsh a (met a b) c) b)
135 > `@ub`(cat 3 256 255)
136 0b1111.1111.0000.0001.0000.0000
137 > `@ub`(cat 2 256 255)
138 0b1111.1111.0001.0000.0000
149Slices `c` blocks of size `a` that are `b` blocks from the end of `d`.
154`a` is a block size (see ++bloq).
170 |= {a/bloq {b/@u c/@u} d/@}
171 (end a c (rsh a b d))
180 > `@t`(cut 3 [0 3] 'abcdefgh')
182 > `@t`(cut 3 [1 3] 'abcdefgh')
184 > `@ub`(cut 0 [0 3] 0b1111.0000.1101)
186 > `@ub`(cut 0 [0 6] 0b1111.0000.1101)
188 > `@ub`(cut 0 [4 6] 0b1111.0000.1101)
190 > `@ub`(cut 0 [3 6] 0b1111.0000.1101)
200Produces an atom by taking the last `b` blocks of size `a` from `c`.
205`a` is a block size (see `++bloq`).
223 (mod c (bex (mul (bex a) b)))
241 > `@ux`(end 3 2 'abc')
243 > `@t`(end 3 2 'abc')
253Produces an atom by repeating `c` for `b` blocks of size `a`.
258`a` is a block size (see `++bloq`).
272 ++ fil :: fill bloqstream
279 $(d (add c (lsh a 1 d)), n +(n))
287 > `@t`(fil 5 10 %ceeb)
288 'ceebceebceebceebceebceebceebceebceebceeb'
289 > `@t`(fil 4 10 %eced)
291 > `@tas`(fil 4 10 %bf)
292 %bfbfbfbfbfbfbfbfbfbf
301Produces an atom by left-shifting `c` by `b` blocks of size `a`.
306`a` is a block size (see `++bloq`).
323 (mul (bex (mul (bex a) b)) c)
338 0b1111.1111.0000.0000
349Computes the number of blocks of size `a` in `b`, producing an atom.
351`a` is a block size (see `++bloq`).
365 $(b (rsh a 1 b), c +(c))
388Concatenates a list of atoms `b` using blocksize `a`, producing an atom.
393`a` is a block size (see `++bloq`).
395`b` is a `++list` of atoms.
405 ++ rap :: assemble nonzero
407 |= {a/bloq b/(list @)}
415 > `@ub`(rap 2 (limo [1 2 3 4 ~]))
417 > `@ub`(rap 1 (limo [1 2 3 4 ~]))
419 > (rap 0 (limo [0 0 0 ~]))
421 > (rap 0 (limo [1 0 1 ~]))
431Produces an atom by assembling a list of atoms `b` using block size `a`.
436`a` is a block size (see `++bloq`).
438`b` is a list of atoms.
448 ++ rep :: assemble single
450 |= {a/bloq b/(list @)}
455 (con (lsh a c (end a 1 i.b)) $(c +(c), b t.b))
460 > `@ub`(rep 2 (limo [1 2 3 4 ~]))
462 > (rep 0 (limo [0 0 1 ~]))
464 > (rep 0 (limo [0 0 0 1 ~]))
466 > (rep 0 (limo [0 1 0 0 ~]))
468 > (rep 0 (limo [0 1 0 1 ~]))
470 > (rep 0 (limo [0 1 0 1 0 1 ~]))
482Produces a list of atoms from the bits of `b` using block size `a`.
487`a` is a block size (see `++bloq`).
499 ++ rip :: disassemble
504 [(end a 1 b) $(b (rsh a 1 b))]
533Right-shifts `c` by `b` blocks of size `a`, producing an atom.
538`a` is a block size (see `++bloq`).
552 ++ rsh :: right-shift
555 (div c (bex (mul (bex a) b)))
578 > `@t`(rsh 3 1 'abc')
580 > `@ux`(rsh 3 1 'abc')
590Switches little endian to big and vice versa: produces an atom by
591reversing the block order of `b` using block size `a`.
597`a` is a block size (see `++bloq`).
609 ++ swap |=({a/bloq b/@} (rep a (flop (rip a b)))) :: reverse bloq order
632Computes the base-2 logarithm of `a`, producing an atom.
647 ++ xeb :: binary logarithm
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list