11Computes the result of `2^a`, producing an atom.
26 ++ bex :: binary exponent
51Produces an atom from a list `b` of length-value pairs `p` and `q`,
52where `p` is the length in bloqs of size `a`, and `q` is an atomic
58`a` is a block size (see `++bloq`).
60`b` is a `++list` of length value pairs, `p` and `q`.
72 |= [a/bloq b/(list [p=@ q=@])]
75 (mix (end a p.i.b q.i.b) (lsh a p.i.b $(b t.b)))
80 > `@ub`(can 3 ~[[1 1]])
82 > `@ub`(can 0 ~[[1 255]])
84 > `@ux`(can 3 [3 0xc1] [1 0xa] ~)
86 > `@ux`(can 3 [3 0xc1] [1 0xa] [1 0x23] ~)
88 > `@ux`(can 4 [3 0xc1] [1 0xa] [1 0x23] ~)
89 0x23.000a.0000.0000.00c1
90 > `@ux`(can 3 ~[[1 'a'] [2 'bc']])
99Concatenates two atoms, `b` and `c`, according to bloq size `a`, producing an
105`a` is a block size (see `++bloq`).
119 ++ cat :: concatenate
122 (add (lsh a (met a b) c) b)
140 > `@ub`(cat 3 256 255)
141 0b1111.1111.0000.0001.0000.0000
142 > `@ub`(cat 2 256 255)
143 0b1111.1111.0001.0000.0000
154Slices `c` blocks of size `a` that are `b` blocks from the end of `d`.
159`a` is a block size (see ++bloq).
175 |= {a/bloq {b/@u c/@u} d/@}
176 (end a c (rsh a b d))
185 > `@t`(cut 3 [0 3] 'abcdefgh')
187 > `@t`(cut 3 [1 3] 'abcdefgh')
189 > `@ub`(cut 0 [0 3] 0b1111.0000.1101)
191 > `@ub`(cut 0 [0 6] 0b1111.0000.1101)
193 > `@ub`(cut 0 [4 6] 0b1111.0000.1101)
195 > `@ub`(cut 0 [3 6] 0b1111.0000.1101)
205Produces an atom by taking the last `b` blocks of size `a` from `c`.
210`a` is a block size (see `++bloq`).
228 (mod c (bex (mul (bex a) b)))
246 > `@ux`(end 3 2 'abc')
248 > `@t`(end 3 2 'abc')
258Produces an atom by repeating `c` for `b` blocks of size `a`.
263`a` is a block size (see `++bloq`).
277 ++ fil :: fill bloqstream
284 $(d (add c (lsh a 1 d)), n +(n))
292 > `@t`(fil 5 10 %ceeb)
293 'ceebceebceebceebceebceebceebceebceebceeb'
294 > `@t`(fil 4 10 %eced)
296 > `@tas`(fil 4 10 %bf)
297 %bfbfbfbfbfbfbfbfbfbf
306Produces an atom by left-shifting `c` by `b` blocks of size `a`.
311`a` is a block size (see `++bloq`).
328 (mul (bex (mul (bex a) b)) c)
343 0b1111.1111.0000.0000
354Computes the number of blocks of size `a` in `b`, producing an atom.
356`a` is a block size (see `++bloq`).
370 $(b (rsh a 1 b), c +(c))
393Concatenates a list of atoms `b` using blocksize `a`, producing an atom.
398`a` is a block size (see `++bloq`).
400`b` is a `++list` of atoms.
410 ++ rap :: assemble nonzero
412 |= {a/bloq b/(list @)}
420 > `@ub`(rap 2 (limo [1 2 3 4 ~]))
422 > `@ub`(rap 1 (limo [1 2 3 4 ~]))
424 > (rap 0 (limo [0 0 0 ~]))
426 > (rap 0 (limo [1 0 1 ~]))
436Produces an atom by assembling a list of atoms `b` using block size `a`.
441`a` is a block size (see `++bloq`).
443`b` is a list of atoms.
453 ++ rep :: assemble single
455 |= {a/bloq b/(list @)}
460 (con (lsh a c (end a 1 i.b)) $(c +(c), b t.b))
465 > `@ub`(rep 2 (limo [1 2 3 4 ~]))
467 > (rep 0 (limo [0 0 1 ~]))
469 > (rep 0 (limo [0 0 0 1 ~]))
471 > (rep 0 (limo [0 1 0 0 ~]))
473 > (rep 0 (limo [0 1 0 1 ~]))
475 > (rep 0 (limo [0 1 0 1 0 1 ~]))
487Produces a list of atoms from the bits of `b` using block size `a`.
492`a` is a block size (see `++bloq`).
504 ++ rip :: disassemble
509 [(end a 1 b) $(b (rsh a 1 b))]
538Right-shifts `c` by `b` blocks of size `a`, producing an atom.
543`a` is a block size (see `++bloq`).
557 ++ rsh :: right-shift
560 (div c (bex (mul (bex a) b)))
583 > `@t`(rsh 3 1 'abc')
585 > `@ux`(rsh 3 1 'abc')
595Switches little endian to big and vice versa: produces an atom by
596reversing the block order of `b` using block size `a`.
602`a` is a block size (see `++bloq`).
614 ++ swap |=({a/bloq b/@} (rep a (flop (rip a b)))) :: reverse bloq order
637Computes the base-2 logarithm of `a`, producing an atom.
652 ++ 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