The current project manager as a variety of problems that we would like to solve. These include:
- It combines install with build. Everything is built and installed
USING: kernel io.files io.encodings.binary crypto.xor ; | |
IN: crypt | |
: crypt ( path key -- str ) | |
[ binary file-contents ] dip xor-crypt ; |
module: toandfro | |
define function group | |
(sequence :: <sequence>, | |
n :: <integer>) | |
=> (newseq :: <sequence>) | |
map(method(i) copy-sequence(sequence, start: n * i, end: n * (i + 1)) end, | |
range(below: floor/(sequence.size, n))); | |
end function group; |
: toandfro ( sequence n -- string ) | |
group [ odd? [ reverse ] when ] map-index | |
flip concat >string ; |
module: majority | |
define function winner (votes :: <collection>) | |
let winner | |
= reduce1(method (a, b) if (a.last > b.last) a else b end end, | |
map(method (candidate) | |
pair(candidate, size(choose(curry(\=, candidate), votes))); | |
end, | |
remove-duplicates(votes))); | |
unless (zero?(round/(winner.tail, votes.size))) |
module: split-test | |
define function main(name, arguments) | |
format-out("%d %d\n", | |
size(split("a b c ", " ", remove-if-empty: #f)), | |
size(split("a b c ", " ", remove-if-empty: #t))); | |
exit-application(0); | |
end function main; | |
main(application-name(), application-arguments()); |
module: self-describing-sequence | |
define constant <integer-vector> = limited(<simple-vector>, of: <integer>); | |
define function golomb | |
(golomb-sequence :: <integer-vector>, n :: <integer>) | |
=> (fn :: <integer>) | |
without-bounds-checks | |
when(golomb-sequence[n - 1] = 0) | |
golomb-sequence[n - 1] := %golomb(golomb-sequence, n); |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
using namespace std; | |
int _golomb(vector<int>& golomb_values, int n); | |
int golomb(vector<int>& golomb_values, int n) { | |
if (golomb_values.size() < n) { |
module: byte-vector-test | |
define library byte-vector-test | |
use common-dylan; | |
use io; | |
end library; | |
define module byte-vector-test | |
use common-dylan, exclude: { format-to-string }; | |
use byte-vector; |
benchmark | best* result | dylan | times |
---|---|---|---|
n-body | 16.165 | 162.351 | 10.043365 |
fannkuch-redux | 32.081 | 1301.825 | 40.579315 |
fasta | 3.564 | 74.401 | 20.875701 |
spectral-norm | 6.010 | 156.594 | 26.055574 |
mandelbrot (N=1600) | 0.273 | 3.477 | 12.736264 |
k-nucleotide (N=2.5M) | 3.231 | 159.239 | 49.284742 |
binary-trees | 8.505 | 184.707 | 21.717460 |