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
| Index: configure.in | |
| =================================================================== | |
| RCS file: /sources/oleo/oleo/configure.in,v | |
| retrieving revision 1.96 | |
| diff -u -r1.96 configure.in | |
| --- configure.in 5 Jul 2011 06:08:43 -0000 1.96 | |
| +++ configure.in 26 Mar 2017 08:51:35 -0000 | |
| @@ -84,10 +84,6 @@ | |
| LIBS="-L/usr/local/lib $LIBS " | |
| fi |
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
| dec : decc.o deccc.o | |
| g++ decc.o deccc.o -o dec | |
| decc.o : decc.c | |
| gcc -c decc.c | |
| deccc.o : deccc.cc | |
| g++ -c deccc.cc | |
| .PHONY : clean |
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 perl6 | |
| grammar ofg { # oleo file grammar | |
| token TOP { <line>+ } | |
| token line { (<cell> || <other>) \n } | |
| token rest { \N+ } | |
| token cell { 'C;' <col>? <row> 'K' <rest> } |
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
| https://rakudo.perl6.org/downloads/star/ | |
| PERL6_NCURSES_LIB=libncursesw.so.6 # now set in ~/repos/redact/docs/dotfiles/env/perl6.env | |
| perl Configure.pl --prefix=$HOME/.local --backend=moar --gen-moar | |
| make | |
| make install | |
| perl6 --version | |
| This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda | |
| implementing Perl 6.c. |
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 Grammar::Debugger; | |
| grammar CopybookGrammar { | |
| token TOP { {say "at TOP" } <data-description-entry-top> <data-description-entry>* <ws0> } | |
| #token data-description-entry-top { <ws0> '01' <ws1> <data-name> <ws0> '.' } | |
| #token data-description-entry { <ws1> <level-num> <ws1> <data-name> <ws1> 'pic' <ws1> <picture-string> <ws0> '.' } | |
| token data-description-entry-top { \s* '01' \s+ <data-name> \s* '.' } | |
| token data-description-entry { <ws1> <level-num> \s+ <data-name> \s+ 'pic' \s+ <picture-string> <dot> } | |
| #rule phrase { <TOP> <word> '.' } | |
| token dot { { say "found dot" } <ws0> '.' } |
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 NativeCall; | |
| # http://www.perlmonks.org/?node_id=989766 | |
| our sub c_close(int32) returns int32 is native is symbol('close') { * } | |
| our sub c_fork() returns int32 is native is symbol('fork') { ... }; | |
| our sub c_pipe(CArray[int32]) returns int32 is native is symbol('pipe') { ... } | |
| our sub c_puts(Str) is native is symbol("puts") { * } | |
| our sub c_read(int32, CArray[uint8], size_t) returns ssize_t is native is symbol('read') { *} | |
| our sub c_wait(int32 is rw) is native is symbol('wait') { * } | |
| our sub c_waitpid(int32, Pointer, int32) returns int32 is native is symbol('waitpid') {*}; |
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
| # Blogged about here: | |
| # https://mcturra2000.wordpress.com/2016/12/14/perl6-needs-more-sigils/#comment-1702 | |
| my @a1 := 4, 5 ,6; | |
| say @a1; | |
| #say(@a1.rotate(1)); | |
| # or equivalently | |
| # | |
| # Φ in vim is C-k F* (Unicode U+03A6) |
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
| [mcarter@vivo rakudo-star-2016.11]$perl Configure.pl --prefix=$HOME/.local --gen-moar | |
| You can now use 'make' to build Rakudo. | |
| After that, 'make test' will run some tests and | |
| 'make install' will install Rakudo. | |
| #PROBLEM | |
| make install | |
| panda depends on File::Find, Shell::Command, JSON::Fast, File::Which |
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
| 001000 IDENTIFICATION DIVISION. | |
| 001010 PROGRAM-ID. ustr. | |
| 002000 ENVIRONMENT DIVISION. | |
| 003000 DATA DIVISION. | |
| 003020 WORKING-STORAGE SECTION. | |
| 01 input-string pic x(30). | |
| 01 ptr-last-field pic 99. |
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
| set i 0 | |
| proc accept {chan addr port} { ;# Make a proc to accept connections | |
| global i | |
| puts "$addr:$port says $i [gets $chan]" ;# Receive a string | |
| puts $chan goodbye ;# Send a string | |
| close $chan ;# Close the socket (automatically flushes) | |
| set i [expr 1 + $i] | |
| } ;# | |
| socket -server accept 12345 ;# Create a server socket | |
| vwait forever ;# Enter the event loop |