Skip to content

Instantly share code, notes, and snippets.

View ingydotnet's full-sized avatar

Ingy döt Net ingydotnet

View GitHub Profile
I'm leaning towards this syntax. % is an inix operator and always separated by
whitespace:
<a>* % <b> - zero or more <a> separated by <b>
<a>+ % <b> - one or more
<a>+ %% <b> - one or more, optional trailing b
<a>2+ % <b> - two or more
<a>2-5 % <b> - two to five
<a> % <b> - possible synonym for <a>* % <b>
ingy@thinkingy:~/src/mo-pm$ git clone [email protected]:ingydotnet/mo-pm.git
Cloning into mo-pm...
remote: Counting objects: 1071, done.
remote: Compressing objects: 100% (494/494), done.
remote: Total 1071 (delta 557), reused 1059 (delta 549)
Receiving objects: 100% (1071/1071), 127.41 KiB, done.
Resolving deltas: 100% (557/557), done.
ingy@thinkingy:~/src/mo-pm$ cd mo-pm/
ingy@thinkingy:~/src/mo-pm/mo-pm$ prove -l
t/build.t ............. Can't locate object method "foo" via package "Gorch" at t/build.t line 12.
ingy@thinkingy:~/src/mo-pm$ perl xt/benchmark.pl 3000000 mo moo mouse
Benchmark: timing 3000000 iterations of 1) Mo 0.25, 2) Moo 0.00901, 3) Mouse 0.93...
1) Mo 0.25: 9 wallclock secs ( 9.18 usr + 0.00 sys = 9.18 CPU) @ 326797.39/s (n=3000000)
2) Moo 0.00901: 15 wallclock secs (15.36 usr + 0.00 sys = 15.36 CPU) @ 195312.50/s (n=3000000)
3) Mouse 0.93: 11 wallclock secs (11.73 usr + 0.00 sys = 11.73 CPU) @ 255754.48/s (n=3000000)
Benchmark: timing 10000000 iterations of 1) Mo 0.25, 2) Moo 0.00901, 3) Mouse 0.93...
1) Mo 0.25: 7 wallclock secs ( 6.64 usr + 0.00 sys = 6.64 CPU) @ 1506024.10/s (n=10000000)
2) Moo 0.00901: 1 wallclock secs ( 1.75 usr + 0.00 sys = 1.75 CPU) @ 5714285.71/s (n=10000000)
3) Mouse 0.93: 3 wallclock secs ( 1.99 usr + 0.00 sys = 1.99 CPU) @ 5025125.63/s (n=10000000)
Benchmark: timing 10000000 iterations of 1) Mouse 0.93, 2) Mo 0.25, 3) Moo 0.00901, 4) Moose 2.0205...
1) Mouse 0.93: 3 wallclock secs ( 2.62 usr + 0.00 sys = 2.62 CPU) @ 3816793.89/s (n=10000000)
2) Mo 0.25: 8 wallclock secs ( 7.41 usr + 0.00 sys = 7.41 CPU) @ 1349527.67/s (n=10000000)
3) Moo 0.00901: 2 wallclock secs ( 3.36 usr + 0.00 sys = 3.36 CPU) @ 2976190.48/s (n=10000000)
4) Moose 2.0205: 9 wallclock secs ( 9.38 usr + 0.00 sys = 9.38 CPU) @ 1066098.08/s (n=10000000)
ingy@thinkingy:~$ cat foo.pl
use YAML::XS qw'LoadFile DumpFile';
use Hash::Merge 'merge';
use Template::Toolkit::Simple;
use IO::All;
my $stash = merge(
LoadFile('b.yml'),
LoadFile('a.yml'),
);
sudo apt-get install haskell-platform libncurses-dev libperl-dev
cabal update
cabal install Pugs
--- !ingy-report
- Got Pugs.hs on github under perl6 org
- Commits are being reported
- Added Makefile support to Pugs.hs for build and install:
- Works pretty fast for tweak and make cycles
- Pugs from scratch builds in 1m45s using ghc6.12
- Pugs outperforms niezca by 2 orders of magnitude on intense math :)
- Working with moritz++ on p6eval bot for pugs:
- With cron automated building
- Pegex::Pegex::Emitter::Perl6Rules
Just a note...
I would avoid conflating Perl 6 modules to Rakudo or Parrot. Perl 6 is only a language specification (kinda
like C++ 98), not a language implementation. It has many implementations (none of which are called Perl 6),
and Rakudo is just one. If you are going to package modules for the Perl 6 specification, you should do so
without regard to any particular implementation.
Cheers, Ingy
After a clean purge/install of haskell-platform on ubuntu natty (using apt-get):
ingy@thinkingy:~$ mv .cabal/ cabal-old2
ingy@thinkingy:~$ cabal update
Config file path source is default config file.
Config file /home/ingy/.cabal/config not found.
Writing default configuration to /home/ingy/.cabal/config
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.