- Modern feel
- No archaic syntax or keywords besides the parentheses
- No over-use of the word ‘def’ (defmacro, defun, defgeneric, etc.)
- Strong text manipulation out of the box for terminal scripting purposes
- Fast
- JIT compiled with Julia-style method monomorphisation
- Macros!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head1 Updater | |
A class that houses the data and processes required to correctly deal with the updater yaml file. | |
=over 4 | |
=cut | |
package Updater; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.30; | |
use warnings; | |
use constant VERBOSE => 0; # set to 1 if you want to print intermediate messages. | |
package Player { | |
use Moo; # OOP library, don't ask. | |
# the name of the player | |
has name => (is => 'ro'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# autoupdate.pl | |
# copyright 2021 Nikolaj Lepka <[email protected]> | |
use v5.28; | |
use strict; | |
use warnings; | |
use autodie; | |
use Term::ANSIColor qw(:constants); | |
use Carp; | |
use Getopt::Long; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# woman | |
# copyright 2021 Nikolaj Lepka <[email protected]> | |
use v5.30; | |
use warnings; | |
use autodie; | |
use Pod::Usage; | |
use Getopt::Long; | |
GetOptions ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# russian-roulette.pl | |
# copyright 2020 Nikolaj Lepka <[email protected]> | |
use v5.30; | |
use warnings; | |
use autodie; | |
use List::Util 'sum'; | |
use constant { | |
# The revolver's capacity. A standard revolver holds 6 rounds. | |
CYLINDER_CAPACITY => 6, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.30; | |
use warnings; | |
use autodie; | |
use Time::localtime; | |
=head1 LICENCE | |
Copyright (c) 2020, Nikolaj Lepka <[email protected]> | |
Redistribution and use in source and binary forms, with or without |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.28; | |
use warnings; | |
no warnings qw(experimental::smartmatch); | |
use List::Util qw(sum); | |
my $debug; | |
my $die_notation = qr/ | |
(?<count>\d*) | |
d(?<faces>\d+) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
=for comment | |
Copyright 2020 Niko Lepka | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun mk-klist (args) | |
"takes a plist of data and returns a keyed alist as its result. | |
i.e. an alist where the first element is a :keyword" | |
(assert (evenp (length args)) (args) | |
"arglist ~a is not even" args) | |
(loop :for (k v) :on args :by #'cddr | |
:do (check-type k keyword) | |
:collect (cons k v))) | |
(defun node (name &rest attrs) |