I hereby claim:
- I am TimothyXL on github.
- I am tmtvl (https://keybase.io/tmtvl) on keybase.
- I have a public key whose fingerprint is A1A1 D150 F96A 4C54 DE67 87FD F50A F328 D9D1 E635
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
First make sure that you have the following tools and libraries installed on your system:
innoextract
, unzip
, 7z
, tar
, unrar
(to extract the game files)
For the nwmovies, nwlogger, nwuser and nwmouse tools, you will need the 32-bit version of these libraries, including their development headers (-dev or -devel packages):
Greetings everyone, today we'll be taking an infrastructural script and port it from Perl 5 to Perl 6. This article is based on a pair of posts by James Clark, which you can find here:
This script is used to create and verify MD5 sums. These are 128-bit values that can be used to verify data integrity. While MD5 has been proven to be insecure in protecting against malicious actors, it is still useful for detecting on-disk corruption.
The Perl 6 ecosystem is growing and contains a variety of tools that are either ported from the Perl 5 CPAN, or are replacements. I'll walk through a few aspects of the original script and my port and show why I make some specific changes. Hopefully this will encourage you to go out and port your own little scripts.
{ | |
"riddlejs": { | |
"ext": "js", | |
"template": "", | |
"hasInterpreter": true, | |
"entrypoint": "index.js", | |
"hasLanguageServer": true, | |
"icon": "https://repl.it/public/images/languages/nodejs.svg", | |
"category": "Hidden", | |
"hasProjectMode": true, |
Raku is a really nice language. Versatile, expressive, fast, dwimmy. The only problem I sometimes have with it is that it can be a little slow. Fortunately that can easily be solved by the NativeCall interface, which makes it easy to call C code in your Raku program. Now, as nice as C is, it is a rather old language with some limitations. A newer language that can fill its niche is known as Rust. I'll show some examples of having Raku talk to Rust.
Rust code can be called from other languages using the FFI standard. FFI stands for "Foreign Function Interface" and allows you to export a Rust library as a standard shared library (a .so file on Linux or .dll on Windows). This is done by adding the following section in your Cargo.toml:
#!/usr/bin/env raku | |
use v6; | |
sub memoize-walk (Code $calc --> Code) { | |
my Int @cache; | |
return sub (Int $n --> Int) { | |
return @cache[$n] if @cache[$n]; | |
my Int $result = $calc($n); |
say sub ($f, $x, $y) { | |
return $f($x, $y, $f); | |
}(sub ($x, $y, $f) { | |
if $x < 2 { | |
return $y; | |
} | |
else { | |
return $f($x - 1, $x * $y, $f); | |
} | |
}, |