Skip to content

Commit e03747e

Browse files
author
L. Grondin
committed
Merge branch 'master' of github.com:perl6/perl6-examples
Conflicts: rosalind/cons-grondilu.pl
2 parents 2689d5c + efeec43 commit e03747e

File tree

394 files changed

+5514
-2502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+5514
-2502
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.so
2+
html/*.html
3+
html/categories
4+
categories/rosalind/lcsq.o
5+
categories/wsg/beginner-2008/firstlines.out

99-problems/README

Lines changed: 0 additions & 33 deletions
This file was deleted.

README

Lines changed: 0 additions & 59 deletions
This file was deleted.

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Perl 6 Examples
2+
3+
This is intended to be a repository for all kinds of Perl 6 examples.
4+
5+
All examples should work for any full implementation of Perl 6.
6+
7+
If an example needs an implementation specific version then it should end in
8+
.implementation. For example, if you are making an example that only works
9+
on Rakudo, it should end in .rakudo.
10+
11+
If you want to contribute, just ask! The quicker choice is to use IRC: join
12+
#perl6 in Freenode and you'll be welcome.
13+
14+
15+
Please use POD (mostly this template
16+
https://github.com/perl6/perl6-examples/blob/master/template_pod) when
17+
adding a new example.
18+
19+
## Goals
20+
21+
1. Compile a list of open source Perl 6 examples
22+
2. Help different implementations of Perl 6 test out their code in a less
23+
testy and more fun manner `;)`
24+
25+
26+
## What you can find here
27+
28+
29+
| Directory | Description |
30+
|--------------------|------------------------------------------|
31+
|best-of-rosettacode | The best of the rosettacode.org examples |
32+
|99-problems | Based on lisp 99 problems |
33+
|cookbook | Cookbook examples |
34+
|euler | [Answers for Project Euler](http://projecteuler.net) |
35+
|games | Games should go in here :) |
36+
|interpreters | Language or DSL interpreters |
37+
|module-management | Module management |
38+
|parsers | Example grammars |
39+
|perlmonks | Answers to perlmonks.org questions |
40+
|rosalind | Bioinformatics programming problems |
41+
|shootout | [The Computer Language Benchmark Game](http://shootout.alioth.debian.org/) |
42+
|tutorial | Tutorial examples |
43+
|wsg | Answers for Winter Scripting Games |
44+
|bin | utility scripts |
45+
|lib | utility modules |
46+
|doc | out-of-script documentation |
47+
|other | all other |
48+
49+
Since you have a commit-bit (if not then talk to the folks at #perl6 on
50+
irc.freenode.net) feel free to commit your changes to the main repository.
51+
No need to submit a pull request!
52+
53+
## Building the examples documentation
54+
55+
To build the examples documentation web pages, simply run the `htmlify.p6`
56+
script in the base directory:
57+
58+
$ perl6 htmlify.p6
59+
60+
After the pages have been generated, you can view them on your local
61+
computer by starting the included `app.pl` program:
62+
63+
$ perl app.pl daemon
64+
65+
You can then view the examples documentation by pointing your web browser at
66+
http://localhost:3000.
67+
68+
## License Information
69+
70+
"Perl 6 Examples" is free software; you can redistribute it and/or modify it
71+
under the terms of the Artistic License 2.0. (Note that, unlike the
72+
Artistic License 1.0, version 2.0 is GPL compatible by itself, hence there
73+
is no benefit to having an Artistic 2.0 / GPL disjunction.) See the file
74+
LICENSE for details.

TODO

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
17:35 < moritz> [ptc]: bonus points for adding some sort of test suite (can
2+
be just storing results from one run, and then comparing on the next run),
3+
and only HTML-rendering those that pass the tests

app.pl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env perl
2+
3+
use Mojolicious::Lite;
4+
5+
app->static->paths(['html']);
6+
7+
get '(*dir)/:file' => sub {
8+
my $self = shift;
9+
my $dir = $self->param('dir');
10+
my $file = $self->param('file');
11+
return $self->redirect_to("/$dir/$file.html");
12+
};
13+
14+
get '(*dir)/' => sub {
15+
my $self = shift;
16+
my $dir = $self->param('dir');
17+
return $self->redirect_to("/$dir.html");
18+
};
19+
20+
get '/' => sub {
21+
my $self = shift;
22+
return $self->redirect_to('/index.html');
23+
};
24+
25+
app->start;

best-of-rosettacode/24-game.pl

Lines changed: 0 additions & 74 deletions
This file was deleted.

best-of-rosettacode/README

Lines changed: 0 additions & 6 deletions
This file was deleted.

best-of-rosettacode/TODO

Whitespace-only changes.

best-of-rosettacode/accumulator-factory.pl

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)