This file contains 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
# Neat Perl6 DRY idiom | |
# | |
# suppose you want to work with named values in a string | |
# or data structure, and you want to keep the variable | |
# names the same as the field/key names. | |
# sample data using a hash just to kep things simple | |
my %data = :fee(42), :fie<FIE>, :foo<FOO>, :fum(True); | |
# DRY idiom: |
This file contains 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
Update: the patch to eliminate most topic ensconses on inlined | |
immediate blocks turned out to be pretty simple. It is at | |
https://github.com/skids/rakudo/tree/inline_topic. With those | |
gome there is little reason to do optimizations specifically | |
on while loops. | |
...with the caveat that there may be some way for a topic bind | |
to appear in inlined immediate block which I am not aware of. | |
But... it does at least pass all spectests, including the ones |
This file contains 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
So there I was asking myself why we have so much nqp code cropping up in | |
the rakudo core... what prevents rakudo from producing as efficient opcodes | |
from Perl6 source for even basic things like ifs and whiles? Just how | |
much performance are we gaining, anyway? Let's take the case of while | |
versus nqp::while:. Typical results for two comparable busy loops on | |
my machine are: | |
``` |
This file contains 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
This document is to feel around the edges of adding support for | |
ad-hoc certificate handling and extended invalid | |
certificate handling when using EAP-PEAP-* methods | |
Current state of affairs: | |
AFAIK only one client supplicant that can claim any level of market share, | |
wpa_supplicant, currently supports configuring EAP-PEAP 802.1x | |
authentication to both use an inner method such as MSCHAPc2 and also | |
at the same time provide a client certificate. Note that this does not |
This file contains 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
# This file is for developers wishing to quickly test | |
# modifications to Perl6's internal grammars/actions. | |
# | |
# Just copy the rules/actions you want to play with from | |
# src/Perl6/Grammar.nqp and src/Perl6/Actions.nqp | |
# into the appropriate class below. | |
# | |
# Every time you modify, execute (assuming you have it in /tmp/): | |
# "nqp --target=mbc --output=/tmp/nqpslang.moarvm --encoding=utf8 /tmp/nqpslang.nqp" | |
# |
This file contains 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
$ cd /tmp/ | |
$ cat > nqpmod.nqp | |
use nqp; | |
sub nqpsub(*@foo) is export { nqp::say("OHAI nqpsub") }; | |
$ nqp --target=mbc --output=/tmp/nqpmod.moarvm --encoding=utf8 /tmp/nqpmod.nqp | |
$ NQP_LIB=/tmp/ nqp -e 'use nqpmod; nqpsub();' | |
OHAI nqpsub |
This file contains 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
TLDR: | |
https://github.com/skids/rakudo/tree/rolevolution3 | |
... is a spectest-passing branch of rakudo with: | |
A) Working diamond role composition | |
B) A solution to Ovid's complaint about role method overrides | |
...but the code needs a bit of work. |
This file contains 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
connections { | |
swan { | |
pools = students | |
remote { | |
id = %any | |
auth = eap-radius | |
} | |
include swanctl_swan.conf |
This file contains 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
SOLVED: there was an old type=transport statement leftover on the initiator, Thermi++ | |
Strongswan rw to strongswan responder | |
I *think* this problem is on the responder side. I've tried all sorts of | |
little alterations and tweaks and still get a TS_UNACCEPT which appear in | |
the logs to be due to no selectors for the remote being present in the | |
configuration at the point when selectors are narrowed. |
This file contains 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
sub d ( | |
$obj, | |
Int :$i = 2, | |
Int :$j = 0, | |
Bool :$c = True, | |
Int :$x = 50, | |
Bool :$g = False, | |
Bool :$m = True ) | |
{ say "$i/$j/$c/$x/$g/$m"; } d(42,:!m); |
NewerOlder