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
diff --git a/ufo b/ufo | |
index ddcfd58..9755c47 100755 | |
--- a/ufo | |
+++ b/ufo | |
@@ -11,7 +11,7 @@ elsif 'lib' !~~ :d { | |
exit; | |
} | |
-my @module-files = grep { $_ }, split "\n", qx[find lib -name \*.pm]; | |
+my @module-files = grep { $_ }, split "\n", qx[find lib -name \*.pm -or -name \*.pm6]; |
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 v6; | |
# module OSUtils; | |
# Removed 'is export's | |
multi sub cwd() { | |
Q:PIR { | |
$P0 = root_new ['parrot';'OS'] | |
push_eh cwd_catch |
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
diff --git a/ufo b/ufo | |
index bcdf016..5c0c51f 100755 | |
--- a/ufo | |
+++ b/ufo | |
@@ -1,5 +1,7 @@ | |
#!/usr/bin/env perl6 | |
+#use OSUtilsOrSomething; | |
+ | |
my $binary = 'perl6'; |
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 v6; | |
role Keyed[*@keys] is Associative { | |
my %index; | |
submethod BUILD() { | |
for @keys.kv -> $i, $v { | |
%index{$v} = $i; | |
} | |
} |
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
diff --git a/src/glue/run.pir b/src/glue/run.pir | |
index 3ff1a93..1da169c 100644 | |
--- a/src/glue/run.pir | |
+++ b/src/glue/run.pir | |
@@ -105,6 +105,12 @@ of the compilation unit. | |
$P2 = '&CREATE_HASH_FROM_LOW_LEVEL'(env) | |
set_hll_global '%ENV', $P2 | |
+ # Set up $*OSNAME | |
+ .local pmc osname |
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 v6; | |
role Finalizable[Callable $finalizer] { | |
method finalize() { | |
$finalizer(); | |
} | |
} | |
multi sub infix:<do>(Finalizable $finalizable, Callable $callable) { | |
# XXX should call $callable in caller's context |
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
role ListExtension { | |
multi method take($num as Int) { | |
@(self)[^$num]; | |
} | |
multi method takewhile($condition) { | |
gather for @(self) -> $item { | |
$item ~~ $condition ?? take $item !! last; | |
} | |
} |
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
javascript:(function(){prompt('Download%20Link',decodeURIComponent(/hqURL%2522%253A%2522(.+?)%2522/.exec(document.body.innerHTML)[1].replace(/%255C/g,'')));})(); |
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
require 'formula' | |
# Nethack the way God intended it to be played: from a terminal. | |
# This build script was created referencing: | |
# * http://nethackwiki.com/wiki/Compiling#On_Mac_OS_X | |
# * http://nethackwiki.com/wiki/Pkgsrc#patch-ac_.28system.h.29 | |
# and copious hacking until things compiled. | |
# | |
# The patch applied incorporates the patch-ac above, the OS X | |
# instructions from the Wiki, and whatever else needed to be |
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
require 'formula' | |
# Nethack the way God intended it to be played: from a terminal. | |
# This formula is based on Nethack formula. | |
# The patches in DATA section are shamelessly stolen from MacPorts' jnethack portfile. | |
class Jnethack <Formula | |
url 'http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/nethack-343-src.tgz' | |
homepage 'http://www.nethack.org/index.html' |