»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
ZoffixWin m: subset ProductNumber of Str where { .chars <= 20 and /^ \d**3 <[-#]>/ }; 00:02
my ProductNumber $num = '333-FOOBAR';
camelia ( no output )
ZoffixWin ~_~
m: subset ProductNumber of Str where { .chars <= 20 and /^ \d**3 <[-#]>/ }; my ProductNumber $num = '333-FOOBAR';
camelia rakudo-moar c8ec5a: OUTPUT«Type check failed in assignment to $num; expected ProductNumber but got Str ("333-FOOBAR")␤ in block <unit> at /tmp/9rFsDWAGrA line 1␤␤»
ZoffixWin m: subset ProductNumber of Str where { .chars <= 20 and $_ ~~ /^ \d**3 <[-#]>/ }; my ProductNumber $num = '333-FOOBAR';
camelia ( no output )
ZoffixWin Why is this so? Doesn't a bare // smartmatch against $_?
skids precedence 00:05
m: say (1 and 2 ~~ /2/)
camelia rakudo-moar c8ec5a: OUTPUT«「2」␤»
skids m: subset ProductNumber of Str where { .chars <= 20 and ($_ ~~ /^ \d**3 <[-#]>/) }; my ProductNumber $num = '333-FOOBAR'; 00:06
camelia ( no output )
skids erm well.
The precedence should be fixed too. 00:07
ZoffixWin The example with $_ works as intended
skids oh.
ZoffixWin But if I omit the explicit $_, it fails. Presumably because it isn't smartmatching against $_
m: $_ = 'foo'; say so /fo/; 00:08
camelia rakudo-moar c8ec5a: OUTPUT«True␤»
ZoffixWin Which it does here :S
ZoffixWin is now more confused than ever.
skids m: say (.chars <= 20 and /^ \d**3 <[-#]>/) 00:10
camelia rakudo-moar c8ec5a: OUTPUT«Method 'chars' not found for invocant of class 'Any'␤ in block <unit> at /tmp/13X87rTKEb line 1␤␤»
skids m: $_ = "jj"; say (.chars <= 20 and /^ \d**3 <[-#]>/)
camelia rakudo-moar c8ec5a: OUTPUT«/^ \d**3 <[-#]>/␤»
skids aha.
the regex is not consdered bare. 00:11
ZoffixWin Ah
skids m: subset ProductNumber of Str where { .chars <= 20 and m/^ \d**3 <[-#]>/ }; my ProductNumber $num = '333-FOOBAR';
camelia ( no output )
ZoffixWin skids++ 00:12
skids, why does adding 'm' make it behave differently tho? 00:13
skids m// is an actual command to run the regex. // is just a regex literal which only runs by virtue of being sunk. 00:14
00:14 cpage_ joined
ZoffixWin Ahh. Thanks. 00:15
skids (or appearing on the lhs of a smartmatch)
Really // only runs at all because perl 5 (and makbe awk?) users will expect that. 00:16
00:17 tardisx joined 00:18 johndau joined 00:20 sofi joined, sofi left, tardisx left 00:23 tardisx joined 00:26 Atik joined, Atik left 00:27 tardisx left
ZoffixWin m: note 'bah'; say 42; subset Foo of Int where { .is-prime }; my Foo $x = 72; 00:32
camelia rakudo-moar c8ec5a: OUTPUT«bah␤42␤Type check failed in assignment to $x; expected Foo but got Int (72)␤ in block <unit> at /tmp/YJslEfF5_K line 1␤␤»
ZoffixWin m: note 'bah'; say 42; subset Foo of Int where { .is-prime or note "Not a prime" }; my Foo $x = 72;
camelia rakudo-moar c8ec5a: OUTPUT«bah␤42␤Not a prime␤»
ZoffixWin Why does using `note` stop further stuff (the 'Type check failed...' message) from being displayed?
Ah, never mind. 00:33
m: note 'bah'; say 42; subset Foo of Int where { .is-prime or do { note "Not a prime"; False } }; my Foo $x = 72;
camelia rakudo-moar c8ec5a: OUTPUT«bah␤42␤Not a prime␤Type check failed in assignment to $x; expected Foo but got Int (72)␤ in block <unit> at /tmp/Q930Vl5GxI line 1␤␤»
ZoffixWin m: my $w = warn 42; my $n = note 42; say [ $w, $n ] 00:34
camelia rakudo-moar c8ec5a: OUTPUT«42 in block <unit> at /tmp/cKzJBKuPM7 line 1␤42␤[0 True]␤»
00:42 sufrostico left 00:44 leont left 00:49 BenGoldberg joined 00:51 perlawhirl joined 00:53 johndau left 00:56 tardisx joined
MadcapJake still struggling with using require :P 00:57
sortiz MadcapJake, You are not alone, I'm struggling with units/packages too. :-) 01:00
01:00 perlawhirl left
MadcapJake m: my \wordmod = (require Test); wordmod::EXPORT::DEFAULT::.keys; 01:01
camelia rakudo-moar c8ec5a: OUTPUT«Could not find symbol '&DEFAULT'␤ in block <unit> at /tmp/GNPhdZ9iJJ line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/GNPhdZ9iJJ line 1␤␤»
01:02 atta joined
MadcapJake m: my \wordmod = (require Test); ::wordmod::EXPORT::DEFAULT::.keys; 01:04
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AxKHA0PYME␤No such symbol 'wordmod::EXPORT::DEFAULT'␤at /tmp/AxKHA0PYME:1␤------> 3uire Test); ::wordmod::EXPORT::DEFAULT::7⏏5.keys;␤»
MadcapJake m: my \wordmod = (require Test); wordmod::.keys.say; 01:05
camelia rakudo-moar c8ec5a: OUTPUT«(&todo_output EXPORT &failure_output &output)␤»
MadcapJake m: my \wordmod = (require Test); wordmod::.kv.say;
camelia rakudo-moar c8ec5a: OUTPUT«(&todo_output sub todo_output () { #`(Sub|83228880) ... } EXPORT (EXPORT) &failure_output sub failure_output () { #`(Sub|83229032) ... } &output sub output () { #`(Sub|83229184) ... })␤»
MadcapJake hmm, guess I didn't need the all-caps stuff :P
hmm, in my own code I'm just getting (EXPORT)... 01:06
01:07 cdg left 01:08 cdg joined, tardisx left
BenGoldberg m: __PACKAGE__.say 01:08
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6WbAs_rKnV␤Undeclared name:␤ __PACKAGE__ used at line 1␤␤»
yoleaux 00:23 EDT <Xliff> BenGoldberg: I'd have to figure out how C++ mangles its functions. That's a task for another day.
MadcapJake I wish there was a Metamodel::PackageHOW doc page 01:11
sortiz m: my \m = (require Test); my \d = ::m::('EXPORT::DEFAULT'); say d::.keys; # This works MadcapJake 01:13
camelia rakudo-moar c8ec5a: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
01:13 cdg left 01:15 tardisx joined 01:18 eam left, eam joined
MadcapJake sortiz: I get «Combination of indirect name lookup and call not supported» when I try that 01:19
sortiz Yep, That is the reason I take the symbol fist in a var (d) , and then use d::.keys. 01:21
*first
MadcapJake Yeah I tried that though and got the same error o_O 01:23
ZoffixWin New blog post: Perl 6 Types: Made for Humans: blogs.perl.org/users/zoffix_znet/20...umans.html 01:26
MadcapJake I got an error that was cut off somehow: «Name ::($modname) is not compile-time known, and can not serve as a»
ZoffixWin: s/felt/fell/ 01:30
(in second para)
ZoffixWin MadcapJake, felt as in feel, not as in fall :) 01:31
I'm almost sure the original is right, though I'm quite drunk right now ^_^
MadcapJake You fall off your bike, you don't feel off your bike though
01:32 dvinciguerra__ left
ZoffixWin MadcapJake, ah, there. Thanks! Fixed :) 01:33
ZoffixWin feels off his bike, just 'cause
MadcapJake ZoffixWin: oh! I didn't notice there were two felt's in the para :P sorry!
ZoffixWin: I feel off my bike most days, I walk or drive most days ;) 01:34
MadcapJake ruined his joke by saying 'most days' twice :P
01:34 molaf left 01:36 Khisanth left, dvinciguerra__ joined
MadcapJake wishes blogs.perl.org had better Perl 6 highlighting :( 01:37
ZoffixWin I heard DrForr might have control over that :P 01:38
kid51 Does someone have the link to Ovid's 2016 Fosdem talk on Perl 6 (slides or text)?
ZoffixWin Yup 01:39
ZoffixWin digs
MadcapJake I can only find the video 01:40
ZoffixWin kid51, video: www.youtube.com/watch?v=hR9UdvxMAbo
kid51 ZoffixWin: Thanks!
ZoffixWin kid51, you can probably get the slides too, if you ask ( twitter.com/ovidperl )
MadcapJake kid51: have you seen ZoffixWin's talk/slides? They're great too! 01:41
geekosaur really wishes someone would consider text versions for those of us who have to work harder to deal with video :/
01:42 tardisx left
ZoffixWin tpm2016.zoffix.com <-- my talk with video linked to on the first slide 01:42
01:42 dvinciguerra__ left
MadcapJake ZoffixWin: great blog post! 01:42
ZoffixWin Thanks.
Actually, this is a better link for my talk because it includes answers to questions asked during it: blogs.perl.org/users/zoffix_znet/20...tions.html 01:43
01:45 ilbot3 left 01:47 molaf joined, kaare_ left 01:48 ilbot3 joined 01:49 Khisanth joined
MadcapJake I don't understand why this package stuff works in a repl but not in my sub :( 01:52
It says that my modules cannot be found when I just did the same operation from a REPL, both using -Ilib so there should be no difference... 01:55
ugexe -I doesnt work with the REPL afaik 02:00
02:07 _z left 02:09 kurahaupo left 02:10 kid51 left, kid51 joined
MadcapJake ugexe: it does for me, I think it's a new thing. 02:12
I just got my module thingy working! 02:13
Now I got a strange error: «Odd number of elements found where hash initializer expected»
kid51 MadcapJake: I followed Zoffix's Toronto talk as he was giving it! 02:14
A miracle of technology!
ZoffixWin \o/
timotimo yawn :|
raiph MadcapJake: you know hash initializers expect a list with an even number of alternating keys and values, right?
MadcapJake the hash is actually an class object that does Associative, but I'm not sure where it's getting the elements number from...
02:15 Herby_ joined
MadcapJake kid51: nice! I didn't realize it was being livestreamed until it was too late :( 02:15
Herby_ Evening, everyone!
raiph hi Herby_
Herby_ \o
raiph and everyone else 02:16
kid51 toronto.pm has been fairly consistent about using Google Hangout, at least for slides
MadcapJake raiph: maybe I just need to avoid using the BUILD shortcut and bind the value to my % container
kid51 I gave a presentation remote for them the previous month
raiph MadcapJake: is this code you've already linked?
MadcapJake raiph: nope, wanted to try and get a working version before releasing it to the internet wolves :P but I may have to git push 02:17
02:22 johndau joined, johndau left
MadcapJake m: my class Quux does Associative { method AT-KEY { $_.say } }; class Bar { has %.quux; submethod BUILD(:%!quux) {} }; my Bar $b .= new :quux(Quux.new); $b.quux<hello> 02:22
camelia rakudo-moar c8ec5a: OUTPUT«Odd number of elements found where hash initializer expected␤ in submethod BUILD at /tmp/WyKdM6b0PT line 1␤ in block <unit> at /tmp/WyKdM6b0PT line 1␤␤»
MadcapJake raiph: ^^
02:22 yqt left, tardisx joined, tardisx left
MadcapJake I feel I may be missing a piece of the Associative puzzle..., I solved the last error by binding «%!hash-attr := %incoming-assoc-obj» 02:26
but now using self{$some-str} inside the object isn't working :(
now that error disappeared by giving the internal hash a type for it's values...strange! 02:28
raiph I wonder if implementing AT-KEY is not enough to make a class behave well enough for this scenario 02:30
m: my class Quux does Associative {}; class Bar { has %.quux; submethod BUILD(:%!quux) {} }; say Quux.new<> 02:31
camelia rakudo-moar c8ec5a: OUTPUT«Quux.new␤»
raiph m: my class Quux does Associative {}; class Bar { has %.quux; submethod BUILD(:%!quux) {} }; say Quux.new<>.elems
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
raiph m: my class Quux does Associative {}; say Quux.new<>.elems # MadcapJake (what would it take to make a Quux.new<> return an empty list?) 02:33
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
02:38 noganex joined 02:41 shinobi-cl joined, noganex_ left
MadcapJake raiph: I almost feel like there should be an ELEMS method 02:43
02:44 Herby_ left, johndau joined 02:45 kid51 left, kid511 joined
raiph m: my class Hashtoo is Hash {}; say Hashtoo.new<>.elems 02:46
camelia rakudo-moar c8ec5a: OUTPUT«0␤»
raiph m: my class Hashtoo does Associative {}; say Hashtoo.new<>.elems
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
raiph MadcapJake: I think that's the issue
sortiz raiph, No, MadcapJake is right, the class need a elems method. 02:47
raiph m: my class Foo is Map {}; say Foo.new<>.elems
camelia rakudo-moar c8ec5a: OUTPUT«0␤»
sortiz m: my class Hashtoo does Associative { method elems { 0 } }; say Hashtoo.new<>.elems 02:48
camelia rakudo-moar c8ec5a: OUTPUT«0␤»
MadcapJake oh you can just overwrite that :P that works! 02:49
raiph: why would Associative role provide one element though?
raiph because any single item is a one element list unless it does something to make that not be so 02:51
sortiz MadcapJake, Associative don't provide one element, is Any.
MadcapJake m: Any.new.elems.say
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
MadcapJake huh
sortiz #perl6 o/ 02:53
raiph goodnight sortiz
m: class Foo does Associative {}; class Bar does Associative is Iterable; say Foo.new<>.elems, Bar.new.elems 02:55
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JVCXugiqWD␤Method 'iterator' must be implemented by Iterable because it is required by a role␤at /tmp/JVCXugiqWD:1␤»
02:59 johndau left
MadcapJake is so close to a working version! 03:01
I can feel it! 03:02
03:06 BenGoldberg left 03:07 BenGoldberg joined 03:11 kid511 left 03:16 kerframil left 03:20 geekosaur left, geekosaur joined
ugexe ZEN-KEY? 03:23
03:30 shinobi-cl left
ugexe m: class A { method ZEN-KEY { } }; A.new{}.elems.say 03:30
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
03:34 sortiz left 03:37 vendethiel joined
MadcapJake ZEN-KEY? 03:39
ugexe i didnt read enough, so i dont think its anything you are interested in. but ZEN-KEY is {} and ZEN-POS is [] 03:42
MadcapJake huh, didn't know that
ugexe m: class A { method ZEN-KEY { say "ZEN-KEY" } }.new{}
camelia rakudo-moar c8ec5a: OUTPUT«ZEN-KEY␤»
ugexe m: class A { method ZEN-POS { say "ZEN-POS" } }.new[] 03:43
camelia rakudo-moar c8ec5a: OUTPUT«ZEN-POS␤»
03:44 vendethiel left 03:55 perlawhirl joined
perlawhirl hi perlers 03:56
timotimo heyo 03:57
perlawhirl is there a funky new way to dispatch to a sub from a variable (or string literal)... or is it just ye olde dispatche table?
timotimo you can .^find_method to get rid of one level of indirection
if you store the result of that, i mean 03:58
perlawhirl ahh, ok... all good... i got nothing against dispatch tables :D
timotimo we might generate a little in-line cache for you when you use a find-method-by-name op 03:59
don't rely on it performing terribly well 04:00
04:02 atta left 04:10 atta joined 04:13 papillion joined 04:17 perlawhirl left, perlawhirl joined 04:19 papillion left 04:20 djbkd joined 04:26 BenGoldberg left 04:27 BenGoldberg joined 04:29 jack_rabbit joined 04:34 molaf left 04:38 Cabanossi left 04:39 Cabanossi joined 04:40 BenGoldberg left 04:50 wamba joined, perlawhirl left 04:51 perlawhirl joined
MadcapJake early alpha of my Perl6-based Forth is about to hit github! 04:52
timotimo cool 04:53
MadcapJake so far I've only tested addition but it seems to work! :) 04:54
github.com/MadcapJake/rabble 04:58
04:59 skids left
timotimo no tests? :P 05:03
m: my @a = 1, 2, 3; @a.push: @a.pop<> xx 2; say @a 05:04
camelia rakudo-moar c8ec5a: OUTPUT«[1 (3 2)]␤»
timotimo aaw
m: my @a = 1, 2, 3; @a.append: ($ = @a.pop) xx 2; say @a
camelia rakudo-moar c8ec5a: OUTPUT«[1 2 2]␤»
timotimo that's even worse :D
MadcapJake Yeah xx is kinda wonky 05:34
"no tests?" geez! ;) 05:35
subtraction is backwards :P 05:37
timotimo it's not wonky. however, escaping thunking isn't trivial :) 05:40
05:44 Hakahme joined 05:46 Hakahme left
MadcapJake I guess I wish this would work: 05:46
m: my @a = [1, 2, 3, 4]; say (@a.pop xx 4);
camelia rakudo-moar c8ec5a: OUTPUT«(4 3 2 1)␤»
MadcapJake huh! it works! lol
timotimo wish granted
MadcapJake lol, now I wonder why that didn't work for me earlier... 05:47
jdv79 m: say "(asd\)f) )" ~~ /\([<!after \\>\)|.]*?\)/
camelia rakudo-moar c8ec5a: OUTPUT«「(asd)」␤»
05:48 domidumont joined
jdv79 how can i get that to capture asd\)f 05:48
timotimo your literal doesn't seem to contain the \ 05:51
05:52 domidumont left
jdv79 oh 05:53
still broke though
timotimo m: say "(asd\\)f) )" ~~ /\([<!after \\>\)|.]*?\)/
camelia rakudo-moar c8ec5a: OUTPUT«「(asd\)」␤»
jdv79 m: say '(asd\)f) )' ~~ /\([<!after \\>\)|.]*\)/ # too g
camelia rakudo-moar c8ec5a: OUTPUT«「(asd\)f) )」␤»
timotimo right, the f doesn't go in
05:53 domidumont joined
jdv79 meh 05:53
m: say '(asd\)f) )' ~~ /\([<!after \\>\)|.]*?\)/
camelia rakudo-moar c8ec5a: OUTPUT«「(asd\)」␤»
jdv79 hmm
timotimo i'm not sure i understand what your code means to do, i.e. what makes (asd\)f a better match than '(and\)f) )' 05:54
jdv79 a non greedy substring that contains its delimiter
well. escaped. 05:55
timotimo ah, you want \) not to count, yeah?
jdv79 yeah
timotimo why is there a ! before the after, then?
jdv79 is that the wrong one? i tried ? too. 05:56
i read the docs - that's where i got it from
timotimo if you have a ?, that'd mean a ) is accepted by the inner thing that gets repeated when it's escaped
if you have a !, it wouldn't be accepted, then you'd fall out of the repetition and match it as the terminal ')' 05:57
jdv79 doc.perl6.org/language/regexes#Loo...assertions
i meant to use ? then
timotimo m: say '(asd\)f) )' ~~ /\([<?after \\>\)|.]*?\)/
camelia rakudo-moar c8ec5a: OUTPUT«「(asd\)」␤»
timotimo m: say '(asd\)f) )' ~~ /\(['\)'|.]*?\)/ 05:58
camelia rakudo-moar c8ec5a: OUTPUT«「(asd\)f)」␤»
timotimo i would have done it like this, tbh
jdv79 yay
thanks
timotimo :) 05:59
06:10 CIAvash joined
MadcapJake why do people have "*" for the version in META6 files? 06:11
06:12 nadim joined 06:14 labster left 06:16 _28_ria joined
timotimo in the early days we didn't have proper versioning for that at all, so there wasn't yet a "right value" to set 06:22
MadcapJake oh gotcha 06:25
06:26 Possum left
MadcapJake ok well speaking of versioning, I fixed a few things and updated the META6, and that's it for v0.1.0! Time for bed then some more tomorrow. 06:26
g'night!
06:26 Possum joined
nadim Good morning, #1 is the code cache triggered by the date of the source or some sort of hashing? 06:32
psch code cache? 06:34
06:34 zakharyas joined
psch you mean module precomp storage? 06:34
nadim yes
timotimo wouldn't a "provides" section have to list every module you want to "use" even from within a module itself? 06:36
psch nadim: $prefix/share/perl6/dist/ has a (presumably) sha1 named file that holds timestamps for the modules in the distribution 06:40
nadim: i'd guess those are install (and thus precomp) time
06:40 sftp left 06:41 sftp joined 06:42 djbkd left
psch nadim: further, CompUnit::PrecompilationRepository checks the timestamp of the path the PrecompilationStore points at 06:42
in method load, that is
06:42 atta left
psch nadim: so, my answer, after a cursory glance, is "timestamp" :) 06:43
nadim Thank you for the thorow investigation :)
weird, git does not restore timestamp but I could swear that the precomp cache is shabby sometimes. last i checkout a branch ran and it worked while I was expecting it to fail, adding a single blank line got me to the expected behavior. 06:47
timotimo i thought we hash file contents 06:48
nadim have ther experirenced similat problems with the cache?
06:48 firstdayonthejob left, atta joined
nadim timotimo: and if it isn't, it should be. timestamps are a receip for failure 06:48
psch "thorow investigation" vOv 06:49
well, the sha1 calls that exist only pass variables named $name or $dist-dir.dir 06:50
in CompUnit{.pm,/*} 06:51
i don't wanna discount that it does actually hash, though, 'cause i'm really just glancing :)
06:52 nakiro joined 06:53 rindolf joined
psch m: class A { has $.a-long-attribute-name; submethod BUILD(:a(:$!a-long-attribute-name)) { } }; A.new(:1a).perl.say 06:57
camelia rakudo-moar c8ec5a: OUTPUT«A.new(a-long-attribute-name => 1)␤»
07:02 _nadim joined, nadim left
psch hrm 07:04
is it too early for bitmasks or does this seem wrong?
m: my @a = [1,2,4,8]; my $b += $_ +< (4 * @a.index($_)) for @a; say $b.base(2).comb(/\d**4/)
camelia rakudo-moar c8ec5a: OUTPUT«(1000 0000 0100 0000 0010 0000 0001)␤»
ufobat morning perl6 :) 07:05
psch oh, it pads to 8 bits doesn't it
07:05 labster joined
psch i probably could have anticipated that 07:05
07:06 quester joined
psch okay, no, i'm just more confused now :( 07:09
07:12 _nadim left
psch m: my @a = [1,2]; say ($_ +< (4 * @a.index($_)) for @a)[1].base(2); say (@a[1] +< (4 * 1)).base(2) 07:13
camelia rakudo-moar c8ec5a: OUTPUT«1000000000␤100000␤»
psch something is weird there
m: $_ = 2; say ($_ +< (4 * 1)).base(2) 07:15
camelia rakudo-moar c8ec5a: OUTPUT«100000␤»
07:15 bbkr left, _nadim joined
Timbus umm 07:16
youre calling index on an array
thats a string method?
psch Timbus: oh! yes, that would do that 07:17
Timbus your generatory thing looks too clever, or not clever enough. 07:18
07:21 fireartist joined
psch m: my @a = [1,2,4,8]; my $b += .value +< (4 * .key) for @a.pairs; say $b.base(2).comb(/\d**4/) 07:22
camelia rakudo-moar c8ec5a: OUTPUT«(1000 0100 0010 0001)␤»
Timbus yeah, i was actually just writinf one using .kv
psch that's what i was looking for :) Timbus++
Timbus looks good now
07:27 Upasaka left
masak morning, #perl6! :) 07:28
07:29 sjoshi joined 07:30 _nadim left, _nadim joined, zakharyas left
psch m: my @a = [1,2,3,4]; my $b = 0b1111 +< (4 * (@a + 1)) + ([+] do .value +< (4 * (1 + .key)) for @a.pairs) + 0b1111; say $b.base(2) # and this is how i'm actually gonna use it 07:31
camelia rakudo-moar c8ec5a: OUTPUT«111101000011001000011111␤»
psch not opaque at all... :S
o/ masak 07:32
masak I'm so happy about the heroku thing
feels like I'm actually doing a real web application in Perl 6
pnu++ again, just on general principle :)
07:36 _nadim left 07:37 atta left 07:38 _nadim joined 07:40 perlawhirl left, winfred joined
winfred Hello 07:40
moritz hi winfred 07:41
winfred newbie here - first few days in perl6
hello Moritz 07:42
is this the right place for a ewbie or could you please point me somewhere
masak yes! 07:43
welcome!
winfred thanks
masak m: say "welcome, new person you!"
camelia rakudo-moar c8ec5a: OUTPUT«welcome, new person you!␤»
masak :D
07:43 ely-se joined
winfred :) 07:43
07:43 ely-se left
masak winfred: I think you'll find this channel quite helpful and friendly. I know I do. 07:44
winfred Masak: Sounds great . I am new to the Perl world and to the irc world for that matter 07:45
please bear with me if I make some beginner mistakes
masak ok :) 07:46
winfred I am trying to start by writing some Grammar and trying to parse a file with it but it fails no matter what regex I throw at it 07:47
masak I would advise you to start small 07:48
winfred ok
masak and maybe proceed with tests from the get-go if you're able
let me write up a small example, hold on
moritz parsing typically lends itself very well to testing
07:49 domidumont left
winfred Tests? we have go to tests? 07:49
07:49 _nadim left, nadim joined
psch m: use Test; is 1, 1, "Mathematical identity can has go!" 07:50
camelia rakudo-moar c8ec5a: OUTPUT«ok 1 - Mathematical identity can has go!␤»
masak m: grammar Number { regex TOP { \d } }; use Test; ok Number.parse("4"), "one-digit number works"; nok Number.parse("FFF"), "some letters do not work"; done-testing
camelia rakudo-moar c8ec5a: OUTPUT«ok 1 - one-digit number works␤ok 2 - some letters do not work␤1..2␤»
masak winfred: you don't *have* to do it with tests...
winfred: ...but I find as a grammar grows (and it likely will), you're glad you have the tests because they ensure that you don't break the old stuff
winfred: anyway, see my example above. ask if anything's unclear 07:51
07:51 RabidGravy joined
winfred ok 07:52
masak .oO( ask if anything's nuclear )
winfred let me try it out in my terminal and check it out 07:53
masak another advantage of writing tests for your grammars: whether you're a beginner or a pro with grammars, it's far too easy to write a rule that *looks* as if it does what you want, but doesn't. tests catch that, much sooner than you would yourself 07:55
007 is basically a lot of tests for the grammar, and a lot of tests for the runtime. that's all :P 07:56
winfred let me read a bit about the test module and get back to you 07:59
masak docs.perl6.org/language/testing
winfred Thanks - will be back to bother you again :)
masak it's a deal! 08:00
08:05 sjoshi left 08:07 bbkr joined 08:11 leont joined
psch huh, that's interesting 08:12
m: class A { has uint8 $.x; }; A.new(:x(5)).perl.say # all good
camelia rakudo-moar c8ec5a: OUTPUT«A.new(x => 5)␤»
psch m: class A { has uint8 $.x; submethod BUILD(:$!x) { } }; A.new(:x(5)).perl.say # but..?
camelia rakudo-moar c8ec5a: OUTPUT«Cannot modify an immutable uint8␤ in submethod BUILD at /tmp/40q_6n7sEm line 1␤ in block <unit> at /tmp/40q_6n7sEm line 1␤␤»
08:12 darutoko joined
psch am i being stupid again? :) 08:13
08:14 g4 joined
moritz m: class A { has uint8 $.x; submethod BUILD(uint8 :$!x) { } }; A.new(:x(5)).perl.say 08:15
camelia rakudo-moar c8ec5a: OUTPUT«Bytecode validation error at offset 102, instruction 16:␤operand type 160 does not match register type 136␤ in block <unit> at /tmp/lIWi4xgzhZ line 1␤␤»
psch ...neat
08:15 winfred left
moritz psch: I think the problem is that argument binding is *binding*, and you cannot bind to natively typed containers 08:16
or something along those lines
of course, that's LTA :/
psch especially with the roundabout binding hidden in the submethod invocation 08:17
that's gonna be a fun awesome error message to think up... :)
08:17 johndau joined
moritz well, I'd hope that we can modify the argument binding to deal with native attributes properly 08:19
though I'm not nearly deep enough into the trench to know how feasible that is
psch i have a hunch it's from the generated accessor, so i'm building the commit right before to see if it worked then 08:20
mind, the hunch might well be wrong, my hunches (especially regarding the rakudo source) often are :)
moritz good that we can verify or disprove hunches :-) 08:21
masak moritz: so, who rakudobugs? 08:23
:)
psch exactly the same behavior as HEAD 08:24
i mean, thinking about my hunch argument binding shouldn't involve accessors anyway... :)
08:26 ocbtec joined
masak submits rakudobug 08:27
08:33 espadrine left 08:38 winfred joined 08:39 zakharyas joined 08:40 btyler joined 08:44 brrt joined
moritz j: m: class A { has uint8 $.x; submethod BUILD(uint8 :$!x) { } }; A.new(:x(5)) 08:46
camelia rakudo-jvm 5eaa15: OUTPUT«cannot connect to eval server: Connection refused␤»
08:47 espadrine joined 08:49 CIAvash left, xinming joined 08:52 CIAvash joined, espadrine left
RabidGravy boom 08:57
09:02 abraxxa joined 09:08 abraxxa left, abraxxa joined 09:09 leont left 09:10 mr-foobar left 09:13 mr-foobar joined 09:17 abraxxa left 09:18 espadrine joined, abraxxa joined 09:21 babuba joined
babuba hey guys 09:22
I sent an email to the mailing list, with code attached to it
but in the archive of the list I see only the code, without explanations
what did a do wrong?
(here's the address if it helps - www.nntp.perl.org/group/perl.perl6....2696.html)
I used windows 10 mail client 09:23
moritz babuba: my mail client shows the message just fine
babuba: so likely a problem with the software at www.nntp.perl.org
oh, it's probably because it's a multipart message with one HTML part and one text part 09:25
masak nobody likes a MIME
moritz and it's quite usual to structure an email like this if you send it as HTML, and want to include a plaintext version
so www.nntp.perl.org thinks the attachment is the plaintext version, and shows just that
babuba ok, thanks
I've found the problem,but didn't want to spam if I was sending emails the wrong way :) 09:26
RabidGravy general rule of thumb is don't send multipart messages to mailling lists 09:27
babuba And what if I need to share code?
moritz babuba: use a plain text email, and include the code inline 09:28
babuba ok, thanks
RabidGravy yeah, and if it's too big to paste then it's probably too big for anyone to read anyway :)
09:34 labster left 09:36 TEttinger left 09:49 atta joined 10:00 babuba left 10:02 Upasaka joined
masak or link to the code in a gist/fiddle if it's very big 10:06
psch welp, let's hope that somewhere in the 334 pages of the MIDI spec it says how exactly realtime data and sysex messages work together... /o\ 10:15
'cause i only get lots of weird results the way i've been trying to get that to work... :) 10:16
RabidGravy I think it's "the responsibility of the receiver to do the right thing" 10:17
psch "The MIDI data stream is a unidirectional asynch 10:18
ronous bit stream at 31.25 Kbits/sec. with 10
bits transmitted per byte (a start bit, 8 data bi
grrr
that was not the screen clipboard
The MIDI data stream is a unidirectional asynch ronous bit stream at 31.25 Kbits/sec. with 10 bits transmitted per byte (a start bit, 8 data bi ts, and one stop bit).
*that* already surprised me
because i don't know if portmidi handles that internally already
RabidGravy that's the wire level spec 10:19
psch :/
i might be out of my depth :P
10:19 wilcov joined 10:20 johndau left, nadim left 10:21 quester left
psch RabidGravy: well, the problem with doing the right thing on the recieving end is that i'm not even getting everything i'm sending 10:22
or even something that only superficially resembles what i send
wilcov Hello :) I've got a question that might spark some mud throwing. That is not my intention. I'm a beginner looking to get into web security. I'm torn between perl and python 3 to learn as my first script language. Assuming the answer is Perl 6: Why is that better? Thanks in advance
RabidGravy psch, so in summary you are trying to send sysex *and* realtime messages at the same time? 10:23
psch RabidGravy: no, i'm successfully sending sysex, but recieving sysex doesn't work, because i haven't figured out how to bend Pm_Read around that it gets the whole message 10:24
RabidGravy: but sysex can be interleaved with realtime, so i probably should be able to figure out how to send both...
RabidGravy: basically, PortMIDI.read has to be quite a bit smarter, apparently :) 10:26
jast wilcov: web security is more about knowing the pitfalls and avoiding them, than about the choice of programming language
psch RabidGravy: the stumbling block in my path right now is that when i'm sending a sysex that would fit into a PortMIDI::Event i'm losing data-one, which is the MfID
as in, the resulting Event has data-one => Int
wilcov: if you're thinking about pentesting, Perl 6 seems a good choice because you can use a lot of Perl 5 and (at least some) Python via the corresponding inline modules 10:28
jast wilcov: and of course which language is better in general is entirely subjective. I guess people tend to like Perlish languages for their ability to express things extremely concisely. the other side of the coin is that there can be more of a learning curve, plus it's easier to make a mess of things, syntactically speaking. (you can make a semantic mess in _any_ language.) Python tends to prefer simpler and more uniform ways of expressing things.
RabidGravy 'ang on let me see what a "real" Sysex looks like when 10:29
wilcov Jast, psch: Thanks for the answers. Since perl has a reputation for begin good with data / text manipulation it might be 'better' (or atleast easier in the beginning) for the type of work i'll have to (indeed i.e. pentesting) 10:31
jast Perl 6 has some of the most advanced text processing things I know of, e.g. built in support for writing your own parsers 10:32
RabidGravy application level penetration is more about having good knowledge of the security failure modes of the platform and the implementation language and the imagination to find new ones rather than any particular set of tools 10:37
I mean you could just as well use curl to try and exploit a web application (and in fact it might be better because you get a higher turnaround) 10:38
10:39 dvinciguerra__ joined, Vlavv_ left
wilcov Alright, thanks for the answers. It's something to think about 10:39
RabidGravy psch, I'm having difficulty simulating "real sysex" , are you on Linux? 10:40
psch RabidGravy: yeah, i'm on linux 10:41
RabidGravy: do you have anything standing around that could *send* sysex to dump that?
10:42 robertle joined
RabidGravy try sticking aseqdump on the "thru" port i.e. 14:0 and then sending your "sysex" to that and see what it says 10:42
psch alright 10:43
yeah, that works 10:44
which is good, because that means my patch for *sending* SysEx is good :)
robertle hi folks, I am confused about returning nothing from a sub in perl6: in perl5 you would do "return;", which would result in undef in scalar context and an empty array in list context. now in perl6 it seems as if "return;" and "return Nil;" are doing exactly the same thing, with the consequence that if I evaluate in list context a get a list with one entry... 10:45
psch < my $m = Audio::PortMIDI::SysExEvent.new(:MfID(MfID), :data([0b01010101])); > gives < 14:0 System exclusive F0 7D 55 F7 > from aseqdump
10:45 kaare_ joined
robertle so how do I not return anything? why is this so different? there must be a good reason? puzzled... 10:46
psch robertle: you can't not return anything, but maybe an empty list works for what you're doing?
ZoffixWin robertle, it's so different because Perl 6 is a new language, not the next iteration of Perl 5, which still gets its own updates and new features. 10:47
m: sub foo { return () }; my @a = foo; say @a
camelia rakudo-moar c8ec5a: OUTPUT«[]␤»
psch oh, we also have Empty
ZoffixWin m: sub foo { return Empty }; my @a = foo; say @a 10:48
camelia rakudo-moar c8ec5a: OUTPUT«[]␤»
ZoffixWin m: sub foo { return Empty }; my $a = foo; say $a
camelia rakudo-moar c8ec5a: OUTPUT«()␤»
robertle ZoffixWin: yeah, I understand that. but the fact that you could write a sub that does not return anything, no matter what the context, seems like a good thing. now you don't seem to be able to that anymore
ZoffixWin robertle, what's the usecase?
robertle let me play with the Empty a bit...
ZoffixWin robertle, it doesn't return "nothing" in Perl 5 either. You either get an undef or an empty list.
psch Empty disappears in lists, fwiw 10:49
m: say (1, 2, Empty, 3)
camelia rakudo-moar c8ec5a: OUTPUT«(1 2 3)␤»
ZoffixWin nice
psch which is probably what undef does in perl5..?
ZoffixWin nope :)
psch vOv 10:50
too long no perl5 for me :)
robertle not really sure about a usecase. but in perl5 we (at work) used to say that it's a good thing to do an explicit "return;" if you do not want to return anything. it makes it clear what you are after, and if you evaluate the method in some context you always get something undef/false. at some point there were dicsusions because java/c people used to write "return undef;", which of course evaluates to soemthi
gn in list context
I am trying to relate that discussion to the perl6 world
ZoffixWin Basically, you return "nothing" so you don't get a stray "undef" in your list, should you call your sub in list context.
robertle, IMO that's nothing useful and just taking a questionable coding practice a bit too far. 10:51
RabidGravy the notion of "list context" isn't quite the same in Perl 6
psch so Empty does what "return;" does in perl5 10:52
well, returning Empty i guess
ZoffixWin m: sub foo { return Empty }; my $a = foo; my @a = $a, '42', 'meow', foo(), 'bar'; say @a
camelia rakudo-moar c8ec5a: OUTPUT«[42 meow bar]␤»
ZoffixWin robertle, Yes, Empty, as psch++ said seems to be the perfect thing for you to use in this case.
robertle ok, understood. and what you just said may be the root cause of the confusion: I am still thinking in terms of "list context", more playinjg required
ZoffixWin isn't a fan of "explicit returns" TBH 10:53
10:53 Vlavv_ joined
teatime ? 10:53
psch ZoffixWin: last i checked they're like 3 times slower, too :/
teatime this entire conversation confuses the heck of out of me.
psch m: sub f { 1 }; f xx 50; say now - INIT now
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Jwftm2BYzT␤Undeclared routine:␤ xx used at line 1␤␤»
psch m: sub f { 1 }; f() xx 50; say now - INIT now
camelia rakudo-moar c8ec5a: OUTPUT«0.00180651␤»
psch m: sub f { return 1 }; f() xx 50; say now - INIT now
camelia rakudo-moar c8ec5a: OUTPUT«0.00188581␤»
ZoffixWin robertle, I found Perl 6 much hard to grasp until I decided to toss all of my notions of Perl 6. Perl 6 has proper types. Perl 5 doesn't. They're are very different languages. Perl 6 is closer to Ruby than to Perl 5.
robertle yeah, I know it's very different. perl5 gets in the way of learning perl6... 10:54
but regarding the returns: why are you not a fan of explicit returns? a particular reason?
ZoffixWin robertle, have you tried Learn X in Y P6 page? I found it a nice short guide: learnxinyminutes.com/docs/perl6/
psch m: sub f { 1 }; f() xx 100000; say now - INIT now
camelia rakudo-moar c8ec5a: OUTPUT«0.0576417␤»
psch m: sub f { return 1 }; f() xx 100000; say now - INIT now 10:55
camelia rakudo-moar c8ec5a: OUTPUT«0.2099502␤»
psch they *are* slower still
robertle surely that slowdown is a VM/compiler weirdness and will get optimized away at some point... 10:56
jnthn Unless you're really squeezing out every last bit of performance you can for some reason, there's little reason to avoid them for that reason though. Especially when that'll likely get fixed in not too long :)
robertle I am more after the clarity than the speed really
I find that even a small amount of if/else/for makes it hard to see where the exit point is. I am of course aware of the arguments for single exit points from functions, but this isn't the 70ies naymore... ;) 10:57
RabidGravy I actually think "return;" in a Perl 5 program is evil
10:57 kid51 joined
RabidGravy and "return undef;" even eviller 10:58
ZoffixWin robertle, thinking more about the code I wrote in the past, maybe I'm not against explicit returns altogether. I do use explicit returns for stuff I want returned, with the exception of `self` that I just leave on line by itself. 11:00
RabidGravy you do have to watch for e.g.
m: sub nothing() { }; my @f = nothing(); say @f; sub empty() { Empty }; my @g = empty(); say @g
camelia rakudo-moar c8ec5a: OUTPUT«[(Any)]␤[]␤»
ZoffixWin I guess I'm not a fan of guidelines that want you to pretend very core and common features of the language might be unfamiliar to a new user :)
Late for the bus! :( 11:01
jnthn bus-ted!
robertle ZoffixWin: ok, I agree there. I was more after the explicit return where i don't want to return a value, just return. so the arguably evil "return;" case. if this is evil, what to do instead? just leave the sub? that is quite hard to spot if it's not the last line
RabidGravy: that is exactly my problem! in perl5 "return;" would evaluate to soemthing reasonable in both scalra and list context. in perl6 I don't see how to do that 11:02
RabidGravy well there isn't really a scalar or list context so it's kind of moot 11:04
11:04 wilcov left
ZoffixWin robertle, you do it with return Empty; 11:04
psch fwiw, the only scenario i can imagine where this matters is if people just put sub calls where ever they like without caring what those subs return 11:05
which i think is their problem, not a language design problem
ZoffixWin ditto
RabidGravy m: sub bar() { 1; }; for bar() { .say }
camelia rakudo-moar c8ec5a: OUTPUT«1␤»
robertle ok, agreed that it is a bit academic because it only matters if you look at the return value of soemthing that does not return anything, at which point you are to blame. 11:06
psch m: sub f { Empty }; f().WHAT.say 11:07
camelia rakudo-moar c8ec5a: OUTPUT«(Slip)␤»
robertle still interesting to follow up on some of these questions, I e.g. need to look a bit at the "there isn't really a scalar or list context"...
RabidGravy and if you really don't ever return anything then it's "returns Nil"
psch ...which only really can happen in an empty sub body
hm, or an if(/elsif) without an else where none of the cases match maybe? 11:08
m: sub f { if False { 1 } elsif False { 2 } }; f().WHAT.say
camelia rakudo-moar c8ec5a: OUTPUT«(Slip)␤»
psch m: sub f { if False { 1 } elsif False { 2 } }; f().say
camelia rakudo-moar c8ec5a: OUTPUT«()␤»
psch yeah, there too
oh, no, that's Empty, not Nil
RabidGravy or just stick Nil at the end of the sub 11:09
psch ah, but if you don't want to return the last statement you can trait_mod
m: sub f returns Nil { 1 }; say f()
camelia rakudo-moar c8ec5a: OUTPUT«Type check failed for return value; expected Nil but got Int (1)␤ in block <unit> at /tmp/YaM1Wg6b8y line 1␤␤»
robertle RabidGravy: and I was already content with the answers ;) sub t { return Nil; }; my @a = t; say @a; means that @a is quite something, it even has an element in it!
psch eh, no, not trait_mod, it's the one in the signature that does that...
m: sub f(--> Nil) { 1; }; f().say
camelia rakudo-moar c8ec5a: OUTPUT«WARNINGS for /tmp/YN24UaxQAx:␤Useless use of constant integer 1 in sink context (line 1)␤Nil␤» 11:10
psch m: sub f(--> Empty) { 1; }; f().say
camelia rakudo-moar c8ec5a: OUTPUT«WARNINGS for /tmp/1cwlQRK7_D:␤Useless use of constant integer 1 in sink context (line 1)␤()␤»
RabidGravy yeah Nil is a special kind of type object
psch
.oO( and now a slang that makes all subs without explicit return return Empty... )
11:11
Timbus m: sub t { return () }; my @a = t; say @a;
camelia rakudo-moar c8ec5a: OUTPUT«[]␤»
psch m: sub f { Empty but [1,2] }; my @a = f; say @a 11:13
camelia rakudo-moar c8ec5a: OUTPUT«[]␤»
11:19 brrt left
psch RabidGravy: i feel like Audio::PortMIDI::Event should probably be either a superclass to ::ChannelEvent and ::SystemEvent or a role 11:34
the role would be does'd by both those other two...
RabidGravy very probably
11:34 perlawhirl joined
psch and Stream.read is really gonna be complicated :/ 11:35
with things like running status and status messages superseding unfinished previous messages
RabidGravy or flipping it the other way 11:36
psch right, for e.g. sample dump
RabidGravy so in fact the Event constructor applies the appropriate role when it has enough information 11:37
psch oh. yeah, that makes more sense, actually
shows how often i think in roles i suppose :)
11:42 brrt joined
psch well midi specification, where *is* Table II? :S 11:42
perlawhirl are there any known issues with using subst with backreferences inside a map ? 11:44
i'm running into a issue where the subst is not working properly inside the map
11:45 wamba left
perlawhirl referring to the {$0} it says 'Use of Nil in string context in block' 11:45
11:45 wamba joined 11:46 kid51 left
psch perlawhirl: there's #126721 11:48
rt.perl.org/Ticket/Display.html?id=126721
well, that's only somewhat related i guess vOv 11:51
perlawhirl hmm, yeah not sure if related. show and tell time
show this is normal...
m: say 'Eleven11'.subst(/ « (..) \D+ /, {$0} );
camelia rakudo-moar c8ec5a: OUTPUT«El11␤»
psch i do remember that we had at least a few different problems with subst and $/ 11:52
perlawhirl m: say 'Eleven11'.map({ $_.subst(/ « (..) \D+ /, {$0} ) });
camelia rakudo-moar c8ec5a: OUTPUT«Use of Nil in string context in block at /tmp/zoHXSqUb3W line 1␤(11)␤»
perlawhirl inside the map it can't see $0
eg...
m: say 'Eleven11'.map({ $_.subst(/ « (..) \D+ /, 'psch' ) });
camelia rakudo-moar c8ec5a: OUTPUT«(psch11)␤»
perlawhirl works fine
it's just the capture
psch m: say 'Eleven11'.map({ $_.subst(/ « (..) \D+ { CALLERS::<$/> = $/ } /, {$0} ) }); 11:53
camelia rakudo-moar c8ec5a: OUTPUT«(El11)␤»
moritz workaround: declare $/ as a paramater for the block
psch ...what moritz++ said :)
moritz m: say 'Eleven11'.map({ $_.subst(/ « (..) \D+ /, -> $/ {$0} ) });
camelia rakudo-moar c8ec5a: OUTPUT«(El11)␤»
moritz or use S///
perlawhirl riiight... ok
moritz m: say 'Eleven11'.map({ S/ « (..) \D+ /$0/}); 11:54
camelia rakudo-moar c8ec5a: OUTPUT«(El11)␤»
11:54 winfred left
perlawhirl moritz++ 11:54
i like using the more english-y operators, so always reach for subst
moritz interesting 11:55
perlawhirl erm... i mean methods
moritz I know .subst mostly as a relict from the times where the s/// and S/// syntax didn't work
or didn't owrk properly
perlawhirl oh, really... that is interesting
i really like subst despite it's verbosity 11:56
moritz it's still useful, mostly when you get a regex object from somewhere else
perlawhirl can i do non-mutating substitutions with s/// or S///. i didn't even realise there were 2 versions :/ 11:58
what does S do differently
psch m: $_ = "foo"; say s/o/u/; .say; $_ = "bar"; say S/a/u/; .say 11:59
camelia rakudo-moar c8ec5a: OUTPUT«「o」␤fuo␤bur␤bar␤»
perlawhirl cool
12:00 cschwenz joined
perlawhirl thanks. should i log a bug or is my original issue expected behaivior? 12:00
moritz perlawhirl: S/ is the non-mutating version 12:01
cschwenz Where is the documentation regarding how to create your own custom object stringification?
moritz cschwenz: I don't know, but it's just creating a method gist and/or Str, depending on the type of stringification you want 12:02
cschwenz ah, is .gist used for 'say $x;' while .Str is used for 'say "$x";'? 12:03
perlawhirl lyw 12:04
yes
erm... i didn't mean that... i wasn't answering you cschwenz... but yes, that is the difference :D
cschwenz sigh, thanks (/me is annoyed i need to implement *2* methods to cover all cases of stringification) 12:05
moritz time to write a module that makes that easier! 12:08
cschwenz :-D 12:09
moritz tries to come up with the most overpowered solutions for that
perlawhirl we are 2 modules away from 600 =D
moritz a parametric role that takes the actual stringification as a parameter? 12:10
a custom meta class? That sounds like fun
12:10 wamba left 12:12 winfred joined
psch ...how does any of this even work..? 12:17
apparently the timestamp flows over into the status byte /o\
12:23 CIAvash left
MadcapJake Released an early version of my Forth (written in Perl 6!) last night: github.com/MadcapJake/rabble 12:26
12:26 wamba joined
hahainternet nice MadcapJake 12:28
the breadth of perl6 increases daily :) 12:29
f3ew moritz: write a webapp which offers it as a service? 12:30
RabidGravy perlawhirl, I've got seven in flight, so it's in hand ;-) 12:34
moritz f3ew: tricky :-)
f3ew moritz: but it can be webscale! 12:35
RabidGravy right now I am however dicking around with javascript
12:40 molaf joined
perlawhirl RabidGravy: puttin' everyone to shame 12:46
12:46 sufrostico joined 12:47 winfred left
RabidGravy or a software version of graphomania 12:47
which reminds me, I wanted to do something to Template6 12:48
perlawhirl night all 12:54
12:54 perlawhirl left 12:55 cdg joined
MadcapJake does provides in a META6 have to be *everything* (internal & external) or just the public interface? 12:57
RabidGravy if it is going to be "used" or "required" then it has to be in there 12:58
masak provides === export 13:01
13:03 winfred joined
masak RabidGravy: what if I have something like Games::Nex::Test, which only the .t files of my own module use? and I don't expect anyone else to ever need to use or require that... 13:03
I often end up with that kind of ::Test module, because I like to layer a set of domain-specific test functions on top of the generic ones. plus various other helpers. 13:04
RabidGravy yeah, I was of course omitting that part for clarity 13:05
masak I wasn't picking nits, I was generally curious
RabidGravy I always put any test modules under t/lib or whatever
masak the answer could just as well have been "that counts as a 'use' too, so you should provide it"
RabidGravy "use or require without any special provision to find the module" :) 13:06
masak but I have mine in lib/, so there's no special provision 13:08
I guess I'll keep it in provides for now
who am I to decide whether someone else has any use for it? :)
lizmat ZoffixWin++ # blogs.perl.org/users/zoffix_znet/20...umans.html
RabidGravy well if it's just used in your tests then "something else" makes the special provision to find the uninstalled modules 13:09
so "not in provides" == "not able to use or require as an installed module" 13:10
13:11 xchg joined 13:13 Sgeo left
masak *nod* 13:14
perlpilot ZoffixWin++ indeed. Some of the prose in that article makes me think ZoffixWin should write a Perl book. He's got the right mix of information, interest, humor, and Perl. Reminds me of the Camel book.
masak it's decided, then. 13:17
gee, I'm so glad we finally found someone! :P
moritz or maybe, uhm, ask ZoffixWin++ first? :-) 13:19
masak .oO( yes, that was the joke ) 13:20
13:22 brrt left
perlpilot But jokes are supposed to be *funny*. Like this one: www.smbc-comics.com/?id=3281 13:24
MadcapJake RabidGravy: so if users will only use Module and not Module::Submodule then all you need to have in provides is Module? 13:26
RabidGravy no, if, *after it is installed*, something needs to use it then it must be in the provides 13:29
13:31 novice666 joined
RabidGravy I don't think it matters whether that something is user code or your code 13:32
MadcapJake that seems bizarre though, provides should mean "public interface" not "every connected module file in this module"
novice666 Can I retrieve file's name assigned to $*ARGFILES ? 13:33
13:34 skids joined
perlpilot novice666: good question. I dunno if anything is specced or implemented in that regard though. 13:36
psch m: say IO::ArgFiles.^can('filename') 13:37
camelia rakudo-moar c8ec5a: OUTPUT«(filename)␤»
RabidGravy MadcapJake, possibly, but "find an installed module by name" is the same on both sides
MadcapJake Internally I think that CUR should just map everything inside lib directories and free up provides to be a map of the public interface. 13:39
13:40 novice666 left
perlpilot psch: now write the P6 equivalent of this P5: while (<>) { print "$ARGV: $_" } # :-) 13:40
psch perlpilot: ...do i have to? :)
13:42 novice666 joined
masak perlpilot: now I'm really curious! how *do* you write the P6 equivalent of that? :) 13:42
surely there is a way! this is Sp^WPerl 6.
moritz for lines() { say $*ARGS.filename, ':', $_ }
I'd assume
masak moritz: Dynamic variable $*ARGS not found 13:43
moritz masak: sorry, $*ARGFILES 13:44
masak ah, but $*ARGFILES w... right
yes, that works
moritz \o/
psch now for more than one file!
i think the perl5 snippet doesn't do that, does it
RabidGravy psch, yep that works for more than one file
moritz in both 5 and 6, I hope :-0 13:45
seems to do
13:45 kerframil joined 13:47 cdg left, shinobi-cl joined
shinobi-cl Hi all! 13:47
perlpilot shinobi-cl: greetings
shinobi-cl I am getting this error when trying to define a sized array inside a method... P6opaque: no such attribute '$!descriptor'
perlpilot shinobi-cl: show the code :) 13:48
13:48 brrt joined, novice666 left
shinobi-cl method get-sized-array { my @sized[2;3] ; } 13:49
is only that
psch m: class C { method f { my @sized[2;3] } }; say C.f
camelia rakudo-moar c8ec5a: OUTPUT«[[(Any) (Any) (Any)] [(Any) (Any) (Any)]]␤»
psch nah, there's more involved, somewhere
shinobi-cl i might upload all the code but it might take a while,i have to detach the module from my app, and then upload
yep
y did the same test as you tring to get a use case but is something else.... 13:50
I*
moritz shinobi-cl: use the opposite approach: make a copy of your code, and throw out as much stuff as possible, while still keeping that error 13:51
shinobi-cl: and when there's nothing more you can remove, you have a minimal example. That's the thing you should be showing us
shinobi-cl Thanks, i will do that!
moritz (and yes, that's more work than shouting "it doesn't work" :-)
shinobi-cl yeah, i know, i thought that may be was a known bug. I'll be back soon :) 13:52
ilmari what, no built-in faculty function/operator?
m: sub postfix:<!>{ [*](2..$^n) }; say 42!
camelia rakudo-moar c8ec5a: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
13:52 boegel|quassel is now known as boegel 13:53 boegel left, boegel joined
moritz ilmari: nah, we have to leave one obvious example for a self-defiend operator :-) 13:55
s/self/user/
13:55 cdg joined
[Coke] m: sub postfix:<!>{ [*](2..$^n) }; say π! 13:55
camelia rakudo-moar c8ec5a: OUTPUT«6␤»
13:56 cdg left, cdg joined
DrForr meditates on Γ($n)... 13:56
13:57 robertle left
perlpilot DrForr: I expect at some point there will be a module in the ecosystem. use Math::Functions; that'll have gamma, bessel, riemann zeta, etc. 14:00
moritz damn mathematicians, giving basically global objects like functions single-letter names
perlpilot (but probably with a better name :)
moritz who thought *that* was a good idea?
masak moritz: it is convenient, and they usually have long names, too. 14:01
[Coke] Math::Γ
DrForr At least it can use the Mathematical letters, especially for Bessel &c.
moritz would still like to a scoping workshop with mathematicians
*to do
RabidGravy well it all started when the scope was *some blackboard* 14:02
masak moritz: scoping in proofs would be a godsend 14:04
moritz: Lamport has a PDF about that which is a nice read
thesis being basically "mathematical expressions/formulae have been updated since the late middle ages -- proofs haven't. let's do that." 14:05
perlpilot When I was in college I took lots of math courses because I could do them, but I don't think I ever really understood what mathematics was all about until I walked in on my linear algebra prof and another prof sitting in a classroom scribbling stuff on a chalkboard.
They were prodding the extent of some obscure equation.
masak perlpilot: for a while I thought that line would end "...until I walked in on my linear algebra prof and another prof in a steamy makeout session" :P 14:06
RabidGravy :-O
masak .oO( that's when I really understood what mathematics was all about! )
perlpilot heh, I wrote that fictional line in my head too as I typed "walked in on my prof"
:-)
geekosaur (are you sure it wasn't?)
masak .oO( we have... unorthodox notions of "proof" in our department ) 14:07
perlpilot "Fun with Math" it's a new course offering
DrForr Math cannot be fun :( :) 14:08
perlpilot DrForr: where's your proof? ;)
14:09 zakharyas left, zakharyas joined
masak I definitely find math not just fun, but an essential part of what I enjoy thinking about 14:12
[Coke] I loved math in school; hard explaining it to my kids, who approach it with more like a dread.
(/me keeps trying, though.) 14:13
masak I have spent large parts of the past year or so thinking about the regular dodecahedron
best thing, I can do it whenever and wherever. no equipment needed
14:14 zakharyas left
Juerd Would you even do that in public? :P 14:14
DrForr I have several of them in my cabinet :)
perlpilot When I was a kid I found my dad's college trig book and it had some fun problems in it (not just trig, some were logic problems for instance) I think that made a positive difference for me. 14:15
(that's also why I've encouraged my kids to read the Martin Gardner books I have)
DrForr I should point out that I have a maths degree and studied high-dimensional minimal surface topology :)
And yes, Martin Gardner. I remember going into the back room in the school library and looking through the original Scientific American articles. 14:16
14:20 Sound joined
timotimo www.openstreetmap.org/way/310046324 <3 14:22
Sound Can I use the … operator for building a sequence where the item index affects the value? e.g. (1,2,4,7,11,16) 14:27
timotimo in that case i'd suggest using a simple "map" instead
masak Sound: sure! 14:28
timotimo right, with a state variable that works
moritz m: say (1..*).map(* ** 2 - 1)[%^5]
camelia rakudo-moar c8ec5a: OUTPUT«one((), 35)␤»
Sound timotimo: how do I create a lazy infinite list with that?
moritz m: say (1..*).map(* ** 2 - 1)[^5]
camelia rakudo-moar c8ec5a: OUTPUT«(0 3 8 15 24)␤»
14:28 g4 left
moritz ah wayit, wrong sequence 14:28
timotimo like moritz just showed you ... but not quite :D
moritz m: say (1..*).map( 2 ** * - 1)[^5]
camelia rakudo-moar c8ec5a: OUTPUT«(1 3 7 15 31)␤»
timotimo hm, also not quite 14:29
Sound hehe, I got what you're saying, let me try
moritz ah no, it's n * (n-1), isn't it?
masak m: my $jump = 1; say (1, 2, * + $jump++ ... Inf)[^10]
camelia rakudo-moar c8ec5a: OUTPUT«(1 2 3 5 8 12 17 23 30 38)␤»
timotimo Central polygonal numbers (the Lazy Caterer's sequence): n(n+1)/2 + 1; or, maximal number of pieces formed when slicing a pancake with n cuts.
Ulti nine have you tried github.com/niner/Grammar-Highlighter with STD.pm6 ?
moritz m: say (1..*).map({ $^n * ($n + 1) / 2 + 1})[^10]
camelia rakudo-moar c8ec5a: OUTPUT«(2 4 7 11 16 22 29 37 46 56)␤»
Juerd m: say (1, 2, * + ++$ ... Inf)[^10] 14:30
camelia rakudo-moar c8ec5a: OUTPUT«(1 2 3 5 8 12 17 23 30 38)␤»
nine Ulti: err...no :)
RabidGravy Ooh, almost got nice interoperation between Crust/WebSocket and AngularJS!
Juerd State variables are nice to have in list generators :)
timotimo Sound: you have our best experts totally stumped here with your sequence :D
Sound timotimo: haha, I feel both sorry and proud of that!
Ulti nine do you think it would work? >:3
Sound timotimo: that sequence is made by adding the index to the previous value 14:31
nine Ulti: just try it :)
Ulti will do :) 14:32
timotimo oh, that sounds easy
Sound timotimo: so I'd imagine I could do it with something like 1, { $^a + $pos } … *
timotimo m: say (1, { $^prevval + $ } ... Inf)[^10]
camelia rakudo-moar c8ec5a: OUTPUT«Use of uninitialized value of type Any in numeric context in block at /tmp/Fa_m7T7z7O line 1␤Use of uninitialized value of type Any in numeric context in block at /tmp/Fa_m7T7z7O line 1␤Use of uninitialized value of type Any in numeric context in …»
timotimo m: say (1, { $^prevval + $++ } ... Inf)[^10] 14:33
camelia rakudo-moar c8ec5a: OUTPUT«(1 1 2 4 7 11 16 22 29 37)␤»
timotimo also not quite
m: say (1, { $^prevval + ++$ } ... Inf)[^10]
camelia rakudo-moar c8ec5a: OUTPUT«(1 2 4 7 11 16 22 29 37 46)␤»
timotimo there we go
Sound m: say (1, { $^prevval + $++ } ^... Inf)[^10]
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ALX8ReZtma␤Preceding context expects a term, but found infix . instead␤at /tmp/ALX8ReZtma:1␤------> 3say (1, { $^prevval + $++ } ^...7⏏5 Inf)[^10]␤»
Sound cries
timotimo we don't seem to have ^...
Sound timotimo: aha. anyway, very good! so we have $^prevval, that's sexy 14:34
Juerd m: say (1, * + ++$ ... *)[^10]
camelia rakudo-moar c8ec5a: OUTPUT«(1 2 4 7 11 16 22 29 37 46)␤»
14:34 buharin joined
Juerd Is there a fundamental law of Perl 6 yet, that states that you can always make something less readable with *? :P 14:35
timotimo $^prevval is just "give the enclosing anonymous code block an argument called 'prevval'"
could have used $_ instead
Juerd Or * and no curlies :)
14:36 cschwenz left
timotimo * . * 14:36
Sound timotimo: ah, interesting, that explains much. So $^a and $^b are positionally named and the language does not define any 'a' and 'b'
timotimo that's right
also be careful that in the signature you get, the variables are sorted lexicographically
Sound being used to sort { $a <=> $b } I thought they were special vars
timotimo m: say { $^b ~ $^a }("world", "hello") 14:37
camelia rakudo-moar c8ec5a: OUTPUT«helloworld␤»
timotimo yeah, that's perl5, where they *are* special vars
Sound so ++$ is the trick in the above sequence. Where is $ initialized/scoped?
timotimo which we think is a terrible thing :P
$ is an anonymous state variable
it's scoped to the innermost enclosing curlies
masak or thunk (with invisibul curlies)
ilmari is each $ a separate variable? 14:38
masak yes
Sound that's clear. thank you for the private lesson :)
timotimo not quite private; any lurker in here can benefit from these lessons :)
masak $ reminds me more of the ff operators (which are also stateful) than of actual named variables
[Coke] m: say [+](1, 2, 2, 2 .. *)[^64]
camelia rakudo-moar c8ec5a: OUTPUT«(7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70)␤»
[Coke] m: say [+]((1, 2, 2, 2 .. *)[^64]) 14:39
camelia rakudo-moar c8ec5a: OUTPUT«Use of Nil in numeric context in block <unit> at /tmp/_zZ1c8IKae line 1␤Use of Nil in numeric context in block <unit> at /tmp/_zZ1c8IKae line 1␤Use of Nil in numeric context in block <unit> at /tmp/_zZ1c8IKae line 1␤Use of Nil in numeric context …»
masak [Coke]: three dots instead of two?
timotimo that first result doesn't make sense to me 14:40
oh, when you add a number to a range, it moves the range
that's how that works, i see.
Juerd 16:37 < timotimo> it's scoped to the innermost enclosing curlies
timotimo: Isn't $ scoped to itself? 14:41
timotimo: A second $ in the same expression is another variable.
timotimo right, because it doesn't have a name
i just meant the state effect latches on to the innermost curlies
masak m: for ^10 { say $++ + $-- }
camelia rakudo-moar c8ec5a: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
masak timotimo: but... does it matter where it latches on, that's the question
ilmari m: for ^10 { say ($++, $--) } 14:42
camelia rakudo-moar c8ec5a: OUTPUT«(0 0)␤(1 -1)␤(2 -2)␤(3 -3)␤(4 -4)␤(5 -5)␤(6 -6)␤(7 -7)␤(8 -8)␤(9 -9)␤»
moritz yes, it does
masak timotimo: since you can't re-use a $, it sort of doesn't really have a scope
moritz m: for ^2 { for ^5 { say ($++, $--) } }
camelia rakudo-moar c8ec5a: OUTPUT«(0 0)␤(1 -1)␤(2 -2)␤(3 -3)␤(4 -4)␤(0 0)␤(1 -1)␤(2 -2)␤(3 -3)␤(4 -4)␤»
timotimo hmm
i guess that's fair :)
masak moritz++' example is also fair :)
moritz because if it latched to an outer scope, the inner for-loop wouldn't restart the sequence
timotimo is AFK for a bit
masak that's screaming "innermost curlies" to me ;)
moritz: aye, good concrete example 14:43
*however*... :)
Juerd m: for ^3 { say hash { $++, $-- } }
camelia rakudo-moar c8ec5a: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/sB_o3vaDGe line 1␤␤»
timotimo Juerd: use ( ) instead of { } there
masak I doubt there's an observable difference between "it latches on to the innermost scope" and "it latches on to itself", since you can't re-use the same $ in the scope
Juerd timotimo: Oh. 14:44
masak Juerd: or just a listop without ()
Juerd timotimo: But then it's not a new set of innermost curlies so never mind :)
timotimo :)
you can use %{ ... } i think?
masak no, it's %()
timotimo OK
BBIAB 14:45
Juerd m: my %x; for ^3 { %x{$++} = $-- }; say %x.perl; 14:46
camelia rakudo-moar c8ec5a: OUTPUT«{"0" => 0, "1" => -1, "2" => -2}␤»
Juerd So, not really innermost curlies after all :) 14:47
[Coke] postfix hash curlies aint' blocks.
masak nor are circumfix hash curlies 14:48
Juerd So it should be 'innermost block', not 'innermost curlies'. 14:49
masak yeah
as it happens, if you try to use `$` inside of hash curlies, the hash turns into a block:
m: my %h := { foo => "a" }; say %h.perl
camelia rakudo-moar c8ec5a: OUTPUT«{:foo("a")}␤»
masak m: my %h := { foo => $++ }; say %h.perl
camelia rakudo-moar c8ec5a: OUTPUT«Type check failed in binding; expected Associative but got Block (-> ;; $_? is raw { #`...)␤ in block <unit> at /tmp/UlAnNHgG_y line 1␤␤»
masak (because of the heuristics used by Perl 6 to figure out whether you're writing a hash or a block) 14:50
14:55 kerframil left, atta left 14:56 atta joined
perlpilot That seems a tad obscure. (I mean, I can see myself getting bit by that at some point) I wonder if there's anything more we can do to help the programmer figure out what went wrong ... 14:58
14:59 buharin left
b2gills masak: I think I have a design for a fairly quick sequence generator for prime factorization. ( basically it is very similar to what I have in that codegolf ) Forcing it to return a Bag would add some processing that may not always be necessary. 14:59
perlpilot (like detect use of anonymous state var and say something like "anonymous state variable turned hash curlies into a block, please use <mumble> instead" 15:00
)
15:02 winfred left
masak b2gills: ok, fair enough 15:02
b2gills What I find most interesting is that it is faster to just check 2 and all odd numbers than to use 「(2.. sqrt $^a).grep(*.is-prime)」 15:04
masak m: say bag(<a a b b b>).kxxv
camelia rakudo-moar c8ec5a: OUTPUT«(a a b b b)␤»
15:05 ilmari left, ilmari joined
masak b2gills: that doesn't surprise me so much 15:05
b2gills: should be about a factor of 2 difference 15:06
b2gills From a purely design standpoint a Bag would be better, but from a practical standpoint it may not be better
moritz well, using .is-prime repeatedly is a good way to kill performance
if you're building a list of things to check, you can try to build a sieve instead based on simply divisibility checks, up to sqrt(n) 15:07
15:07 atta left, cschwenz joined 15:08 fireartist left
cschwenz out of curiosity, has anyone done a CAS in Perl6 yet? 15:08
15:08 nakiro left
perlpilot cschwenz: what does CAS mean in this context? 15:09
masak cschwenz: Compare And Swap?
cschwenz sorry, computer algebra system
moritz Computer Algebra System?
b2gills I found it faster to just keep reducing the input until the currently tested value no longer divides evenly.
15:10 wamba left
perlpilot I was thinking cschwenz meant what moritz said, but then I thought of several other things it could mean. 15:10
15:10 atta joined
masak moritz: even a sieve is probably better replaced by probabilistic methods at some cutoff 15:10
moritz cschwenz: there's github.com/raydiak/Math-Symbolic
15:10 wamba joined
hoelzro o/ cschwenz 15:10
cschwenz cool! so very glad i don't need to re-invent the wheel 15:11
\o hoelsro
perlpilot cschwenz: you might need to make that wheel a little rounder though :)
cschwenz that's okay, i still don't need to start with the square block :-P 15:12
15:13 nadim joined 15:16 ilmari left, ilmari joined
cschwenz gah! sorry for the mistyped name hoelzro \o 15:16
hoelzro no worries =)
15:17 BrassLantern joined
DrForr Got a rasp? 15:18
15:19 kerframil joined, kerframil left
timotimo i wonder when we'll see raydiak active in here again :S 15:21
15:21 wamba left 15:22 wamba joined, ilmari left, kerframil joined, ilmari joined, khw joined 15:26 ilmari left 15:27 ilmari joined, buharin joined 15:29 Sound left 15:30 ilmari left, ilmari joined
dalek c: 78137eb | titsuki++ | doc/Type/Pair.pod:
Add a missing single quote
15:31
c: 0b7d160 | (Zoffix Znet)++ | doc/Type/Pair.pod:
Merge pull request #445 from titsuki/add-single-quote

Add a missing single quote
15:31 nadim left 15:34 Sound joined 15:38 ilmari left, ilmari joined
Sound hm, wouldn't it be nicer if the succ method of a Rat incremented the numerator instead of adding 1? 15:39
masak sounds less hard to defend to me than just + 1 15:40
.succ usually means + 1
timotimo less hard to defend? 15:41
Sound masak: + 1 also loses the Rat semantics
timotimo the thing is, in perl6 you're very often using Rat without explicitly creating numerator/denominator
and sometimes you end up having the Rat be simplified by some operations
so you were going about your business increasing by 1/9th when you .succ'd, but suddenly you're getting a 1/3rd jump
WHAT'S UP WITH THAT!!!!kk
m: say pi.nude 15:42
camelia rakudo-moar c8ec5a: OUTPUT«Method 'nude' not found for invocant of class 'Num'␤ in block <unit> at /tmp/kpGQaOmonX line 1␤␤»
timotimo m: say pi.Rat.nude
camelia rakudo-moar c8ec5a: OUTPUT«(355 113)␤»
timotimo ^- would you expect pi.Rat.succ to be 1/113 more than pi?
gregf_ m: 355/113 15:43
camelia rakudo-moar c8ec5a: OUTPUT«WARNINGS for /tmp/vS3aOcm2C5:␤Useless use of "/" in expression "355/113" in sink context (line 1)␤»
timotimo m: say pi.Rat(0.000000001).nude
camelia rakudo-moar c8ec5a: OUTPUT«(103993 33102)␤»
Sound (pi/3 … 2*pi) actually adds 1 to each element, which is meaningless. I'd expect it to behave like (pi/3, 2*pi/3 … 2*pi) instead
masak Sound: what timotimo said. perhaps it's better to think of a Rat not as a numerator and a denominator, but as a black-box rational point on the real line. 15:44
japhb m: .say for pi/3, 2 * pi/3 ... * >= 2*pi 15:45
camelia rakudo-moar c8ec5a: OUTPUT«1.0471975511966␤2.0943951023932␤3.14159265358979␤4.18879020478639␤5.23598775598299␤6.28318530717959␤7.33038285837618␤»
perlpilot Sound: how about we leave .succ alone and come up with a new special-purpose thing that does what you want?
Sound masak: I see
timotimo ratsucc? :P
japhb Sound: is that what you wanted?
masak .oO( because we have too few things in the core setting... ) :/
timotimo "rats? ugh!"
japhb (Delta wanting a better approximate ending point)
Sound perlpilot: I'm too noob in Perl 6 to actually propose any addition to the design :P
masak I don't see a strong use case (yet) motivating adding something like this to core 15:46
perlpilot you didn't seem to have a problem proposing changing .succ's semantics :)
Sound perlpilot: heh, just sharing a ra(n)t ;-)
timotimo you can still use pi, * + 1 / pi.Rat.de ... *
japhb Sound: ... needs information about how you want to progress. With successively more info, it adds one, adds a fixed increment, multiplies by a fixed multiplier, or follows a more complex rule of your specification 15:47
Sound perlpilot: I just find nonsense to think about 2.04 as a successor to 1.04, I'd expect .succ to be undefined so I'm curious about how that can be defended
perlpilot I can see the desire for an easy way "increment by some amount that isn't 1" I just don't know where or how it might fit. 15:48
(and I can't think of a "natural" incrementor that would apply to 1.04 and 355/113) 15:49
Sound perlpilot: incrementing the numerator in the latter one would sound reasonable to me 15:50
japhb m: .say for 1 ... 10; .say for 1, 3 ... 9; .say for 1, 2, 4 ... 16; .say for 0, 1, * + * ... 8;
camelia rakudo-moar c8ec5a: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤1␤3␤5␤7␤9␤1␤2␤4␤8␤16␤0␤1␤1␤2␤3␤5␤8␤»
japhb Sound: ^^
Sound I think this +1 behavior comes from .succ being used by the ++ operator, where +1 makes more sense
perlpilot Sound: what would you call it?
Sound perlpilot: .succ :-))))
perlpilot :-P
What would you call it knowing that you can't call it .succ ? :) 15:51
and knowing that it only applys to numerics (.succ doesn't have that restriction)
Sound thinking hard 15:52
well, any other naming sounds like a subptimal name, so ratsucc or anything else 15:53
but just adding a method with another name is not very useful, IMHO .succ is useful because it's called by ++, … and other things
perlpilot Well ... one thing at a time. Maybe if you can get a good method and a good rationale we can figure out a good operator :) 15:55
b2gills (1/8).rat-succ would become 1/4
timotimo "upnum"
Sound b2gills: does Rat automatically simplify the fraction? 15:56
b2gills In most cases yes
Sound there you go, I'm too noob in Perl 6 to actually propose anything
b2gills or rather Rational does
perlpilot But, though I was willing to entertain the thought experiment because I saw possibility, those possibilities seem to be rapidly collapsing as I prod this thing in my head.
timotimo m: say Rat.new(:numerator(2), :denominator(8)).perl
camelia rakudo-moar c8ec5a: OUTPUT«0.0␤»
timotimo m: say Rat.new(2, 8).perl
camelia rakudo-moar c8ec5a: OUTPUT«0.25␤»
timotimo m: say Rat.new(2, 8).nude.perl 15:57
camelia rakudo-moar c8ec5a: OUTPUT«(1, 4)␤»
Sound then my proposal of incrementing the numerator is nonsense too
perlpilot .num-succ ? :)
Sound perlpilot: but if the fraction is simplified it's not useful as the series can't continue 15:58
b2gills Rational.new() does some simplifying, so you would have to do all of the MOP stuff at a lower level 15:59
Sound .num-succ.num-succ.num-succ should be equal to multiplying the numerator by 3, which it doesn't seem to be the case
s/multiplying/incrementing/ 16:00
perlpilot you'd have to make an object that knows how much it should be incremented by. my $n = new.SpecialRat :inc(0.01); # or something
16:00 ilmari left, ilmari joined
Sound brb # coffee 16:00
perlpilot (weird that I wrote new.SpecialRat rather than SpecialRat.new) 16:01
I'm not sure I was thinking in Perl at that point
timotimo you can have "new SpecialRat: :inc(0.01)" 16:02
16:02 sortiz joined
Juerd timotimo: Sssh 16:02
timotimo: If nobody knows, nobody will use it, and it can be removed in 6.f or zo ;)
s/or zo/or so/
sortiz \o #perl6
timotimo you don't like indirect object notation? 16:03
Juerd Nope, not really. 16:04
I'm glad the : is required even with no arguments, so that at least "new Foo:;" is ugly enough that nobody will use it anyway :D
16:07 vendethiel joined
grondilu m: class A {}; dd new A: 16:09
camelia rakudo-moar c8ec5a: OUTPUT«A.new␤»
grondilu oh that's a thing indeed. TIL.
16:10 telex left 16:12 telex joined 16:14 cschwenz left
timotimo almost looks like something a stack language might have %) 16:15
16:19 brrt left
tony-o is that do-able now? 16:22
timotimo is what do-able now?
tony-o new A;
timotimo new A:; is do-able 16:23
tony-o ah
i will use that syntax
Juerd: :-)
timotimo haha Juerd:; 16:24
Juerd Look what you did, timotimo!
16:24 buharin left
timotimo no you 16:24
Juerd :)
rosettacode.org/wiki/Call_an_object...hod#Perl_6 16:25
16:26 djbkd joined 16:30 espadrine left 16:35 shinobi-cl left 16:39 Sound left 16:41 zhi joined, leont joined 16:49 kerframil left 16:50 sue joined 16:56 zhi left
hahainternet an odd question, i could probably google, can i embed rakudo into my C application? (Actually CGo but hey) 17:00
masak not that I'm aware 17:07
there'd have to be a rakudolib.so for that to be possible, I guess 17:08
17:09 ilmari left, ZoffixW joined, ilmari joined
ZoffixW Someone with perms should edit that Rosetta page to include: my Thing $x .= new; 17:10
It locks $x into being of type Thing, so you reduce the chances of inadvertantly setting it to something else later in the code.
As for me writing a Perl 6 book: nope. I don't have enough motivation ,interest, or Perl 6 knowledge to write one :) 17:11
17:12 ilmari left
hahainternet masak: i was surprised that wasn't built by default 17:12
17:12 ilmari joined
hahainternet shrugs, no rush 17:12
masak I don't know how much it would take to produce such a library. probably quite a lot. it simply hasn't been a priority at all until this point. 17:13
hahainternet: you are aware that you *can* embed C into your Perl 6 though, right? :)
hahainternet masak: indeed, and it shouldn't be too hard particularly, but i'm not trying to add any pressure 17:14
masak: this is more to link perl6 into a multi language IRC bot, i also need to learn about camelia's security
but i'm doing TCL & Perl 5 first probably
masak :) 17:15
ZoffixW m: use NativeCall; sub system (Str) is native {}; say system 'cowsay "what security?"' 17:17
camelia rakudo-moar c8ec5a: OUTPUT«sh: cowsay: command not found␤(Mu)␤»
ZoffixW ^_^
17:19 sortiz left, ilmari left, ilmari joined
hahainternet ZoffixW: indeed 17:20
17:20 zakharyas joined
Juerd I still don't get why NativeCall uses Str 17:21
C strings are so much unlike Str and so much like Buf...
leont They can be both, really :-/ 17:22
Though I see your point of preferring Bug
Buf
b2gills The best way to do security from a programming standpoint is Capsicum, it allows you to programmatically disable OS features after you have used them, without any way to re-enable them www.freebsd.org/cgi/man.cgi?query=...;sektion=4
Google is in the process of bringing this to Linux for Chrome to use 17:24
at least that is what I've heard
17:26 kurahaupo joined
Ulti yay the glot.io guy merged my PR to add Rakudo support :3 17:26
one step closer to an executable funtime on perl6.org maybe? 17:27
arnsholt Juerd: Convenience, primarily
ZoffixW Ulti++
arnsholt But I've come to the belief that they're a bit over-used
17:29 zakharyas left
hahainternet b2gills: the runtime may well sit in its own cgroup and namespace, but i can't (for example) disable opening files for the entire process if part of it has to, so there's a lot of complexity involved 17:30
RabidGravy gah, that's the second time today I've omitted the () on a javascript method and wondered why it wasn't working :-( 17:31
b2gills hahainternet: You can open files and then disable the ability to open files. If you later need to open files you will probably need to fork and pipe data around 17:33
tadzik good morning sir, do you have a moment to talk about typescript?
17:33 ZoffixW left
tadzik "Type () => string is not assignable to variable of type string" is wayyy better than chasing runtime bugs :) 17:34
b2gills .oO( don't sir me )
hahainternet b2gills: yeah i originally needed to fork to deal with memory exhastion, but now i think i'll have to do it for proper security, it is a pain
b2gills I never got far enough in low-level languages to need fork() ( I think I can understand assembly better than C ) 17:36
masak tadzik: yeah, typescript is clearly in the air. :) 17:38
jnthn Juerd: Str is supported 'cus if we made eveyrone write .encode('utf-8') or whatever on every single callsite they might go nuts. :) 17:39
17:40 cdg_ joined, leont left 17:41 spider-mario joined 17:42 cdg left
grondilu b2gills: fork is actually a core command in Perl, isn't it? 17:48
[Coke] m: say &fork.WHAT; 17:49
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XwdvZ8uu6e␤Undeclared routine:␤ fork used at line 1␤␤»
grondilu well, in Perl 5 that is
also fork creates a separate process, in the Unix sense. Not sure why we don't have that in Perl 6 17:51
mst because it's not portable given perl6's targeting windows as well, but you can NativeCall wrap the syscall for unix specific code
(I was confused too and already harassed people to get that explanation ;) 17:52
17:52 leont joined
grondilu so Perl aims at being more portable than Perl 5? 17:52
*Perl 6
jnthn However, before you should do it, you should consider how fork interacts with threads, and that the VM will probably have threads you don't know about for doing stuff like GC, optimization, etc. 17:53
grondilu if you're doing both forks and threads, you're asking for troubles. 17:54
jnthn figured so
leont It'd say it's more that combining forks, threads and a VM is trouble, pick at most two and stuff 17:55
jnthn Well yeah, it'll suck if your VM's GC thread doesn't survive the fork ;)
17:57 maybekoo2 joined
grondilu what about v5 btw? Will it support forks? 17:57
m: use v5; print "ok" if fork; 17:59
camelia rakudo-moar c8ec5a: OUTPUT«===SORRY!===␤Could not find Perl5 in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-1/share/perl6/site␤ /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-1/share/perl6␤ CompUnit::Repository::Absol…»
b2gills v5 is currently in major dis-repair 18:09
18:09 sjoshi joined 18:21 cdg_ left 18:23 sjoshi left 18:24 sortiz joined 18:30 Begi joined 18:47 sufrostico left 18:48 addison joined 18:54 buharin joined 18:55 sufrostico joined 18:56 atta left 18:57 atta joined
tony-o hahainternet: what about using some other type of messaging system instead of directly embedding CGO into the application 19:06
perlpilot What's that style of method chaining typically seen in javascript code called? 19:08
perlpilot is drawing a blank
tony-o thought it was just called method chaining or cascading
wikipedia thinks named parameter idiom 19:09
19:09 BrassLantern left
perlpilot "fluent interface" is what I was looking for 19:11
tony-o what is fluent interface? 19:12
for 100
perlpilot en.wikipedia.org/wiki/Fluent_inter...JavaScript
There's a Perl 6 example further down that page 19:13
tony-o i was playing jeopardy
and losing, like i do in normal jeopardy
perlpilot heh
skids Things that make me cynical for 200, Alex 19:14
19:15 labster joined
perlpilot This P5 code I'm editing at $work is written in a fluent interface style 19:16
timotimo yo RabidGravy, got any nice tips for stuff that'd teach me to play some melodies on my laptop?
RabidGravy: i just got sunvox and it has a nice "when you start it up, you have some nice default things to play with"
RabidGravy: kind of deal... like, start it up, press some keys, NOISE! 19:17
19:17 ufobat left
psch timotimo: that's an interesting tracker you found there 19:18
RabidGravy ooh that does look pretty
timotimo a friend recommended it to me. he also warned it's complicated and very powerful and quite different
psch yeah, it does look at least a bit different
timotimo also, it runs on everything
psch i mean, i've never dealt with modtrackers, but i dabbled with renoise a bit
timotimo also the "teenage engineering" mini-devices look so cutedorable: www.youtube.com/watch?v=MgHXqA1irwA 19:19
RabidGravy yeah I think the last time I used a tracker type thing was octamed on the Amiga twenty years ago
yeah those do look nice 19:20
timotimo have you seen them before?
psch that is pretty neat 19:21
RabidGravy yeah, I get email from teenage engineering every week or so :)
timotimo oh? 19:22
RabidGravy I keep meaning to get my hands on the chip they use in those
timotimo hah, only the chips? not get a device from them? :)
do you think i could benefit from having one of those?
there's a store in town that has them 19:23
RabidGravy I love little things that make noise :) The little drum machine thing is great 19:25
if you're interested in that kind of thing the you might consider the Korg Volca series, they differ in that the bass and drum things are actually analogue (apart from the sequencer) 19:26
obviously the sampler and FM synth not so analogue :)
psch hrm, sunvox doesn't do qwertz right :( 19:27
RabidGravy but I always suggest that people get small simple instruments if they feel intimidated by music making
timotimo psch: i have to change keyboard layouts anyway ... but i think you can configure keybinds properly
RabidGravy I have about ten african thumb harps here
timotimo ah, those 19:29
i've played with that kind of thing in the past
i've also had a short djembe course in the past. that was awesome
RabidGravy: do you know of something - perhaps in the browser - that'd teach me to play melodies on the same keys i'd be using for sunvox and friends? 19:31
RabidGravy somewhere in the house I have a "synth" which is basically two 555 timers intermodulating 19:32
timotimo hah :D
RabidGravy timotimo, you mean a computer keyboard?
timotimo yes, yxcvbnm,.-
i do have an electric piano nearby, but it doesn't do midi, so no program could help me see when i mess up 19:33
psch next up works too
RabidGravy I don't know of such a thing
timotimo god damn it :(
psch timotimo: what exactly is your goal?
timotimo psch: i want to learn how to music
psch timotimo: well, using only sdghj will probably sound good in any order 19:34
timotimo i want to be able to improvise a melody or two
psch same for 23567
RabidGravy though there is some vkeyboard app
timotimo huh, only the black keys?
psch yeah
those always work 'cause you leave out the complicated harmonies :)
timotimo is that so!
see, i've never been told something like that
my music education was ... lackluster
you know the kind of game where you have a piano at the bottom and the notes come flying down and you have to hit them? 19:36
RabidGravy mine was moderate, I was taught cello, bass and saxophone (though I'm not brilliant at any)
psch RabidGravy: upright?
timotimo hunchback 19:37
RabidGravy no bass guitar, I was taught by a jazz session musician who thought he owed my parents a favour
psch timotimo: en.wikipedia.org/wiki/Blues#Form the table on the right is what you could use as backing for your melodying
timotimo: note though if you take them as writting you'd have to improv with yxvbn (or qwrtz)
s/writting/written/ 19:38
timotimo do the roman numerals correspond to the number keys on my keyboard for that? :P
psch timotimo: no, but it's all major chords (and you can ignore the 7)
timotimo i have not seen any instrument in my whole life where the notes were roman numerals 19:39
19:39 dha joined
psch timotimo: so that'd be C as y c b on the keyboard, F as y v n and G as x v m 19:40
timotimo: the roman numerals refer to the position of the root note of the chord in the scale.. :)
19:40 sufrostico left
psch RabidGravy: that sound curious. did you ask for lessons or did he just decide teaching you is making it up to your parents..? 19:40
'cause i'd think having someone learn jazz bass at home might not really work for household peace... :P 19:41
especially fretless hah
timotimo at least it wouldn't sound like you're strangling a cat
psch: "root node" holds no meaning to me. and what does "in the scale" mean? and where is the start of that scale? and what even is this 19:42
psch timotimo: doesn't really matter, actually 19:43
timotimo: i mean, if you just want to improv
(note this assumes you have figured out how to write something into sunvox - i haven't yet :P ) 19:44
timotimo i'm not writing stuff in sunvox, i just abuse its "press a key and you hear a noise" feature 19:45
i think you press the esc key to record
nope, very much not so d)
psch well, there's is a button "ins" in the top right :) 19:46
19:46 kaare_ left
RabidGravy if you use seq24 it can do "key constraints" in that has a piano roll type thing but when you select a "key" it greys out the notes that aren't in the key 19:46
timotimo oh 19:47
psch ...trackers really aren't for me :S 19:49
dalek c: 5ddcf63 | (Tom Browder)++ | doc/Language/about.pod:
make it clear that the 'X' is not the documentable term
c: 68a9aeb | moritz++ | doc/Language/about.pod:
Merge pull request #443 from tbrowder/master

make it clear that the 'X' is not the documentable term
psch timotimo: my point was trying to tell you how you can program the blues form into sunvox by telling you which chord maps to which keys
timotimo: from there you can have it loop and play along
timotimo oh 19:50
psch like, what's called C in the table i linked is what you hear when you press y, c and b at the same time
err well
would be y if qwertz was supported :) 19:51
so i guess it's zcb on qwerty
F is zvn, G is xbn
err, G is xbm 19:52
C7 is zcbm
19:55 john51_ joined 19:56 yqt joined
RabidGravy y'see at the moment I have as much fun with an eight step sequencer with knobs 19:57
psch yeah, i'm starting to want hardware too, kinda 19:58
19:59 john51 left
psch drawing stuff into a software sequencer is great for detail, but... 19:59
timotimo i wish i had keyboard layouts per window
Juerd Oh my. MS Windows has that and I find it incredibly annoying 20:01
It's not like you change keyboards when you switch focus. Or do you? 20:02
timotimo some programs really should be using scancodes instead of keycodes 20:05
Juerd Agreed. 20:07
Juerd <- dvorak user
20:08 firstdayonthejob joined
Juerd Gimme ",aoe" instead of "wasd", please :D 20:08
timotimo i want liae 20:09
Juerd Which layout?
timotimo neo2 20:12
20:13 sufrostico joined 20:15 cdg joined, cdg left, colomon left 20:16 cdg joined
timotimo i'm doing terrible things to the ears in this room 20:17
20:19 Khisanth left
timotimo maybe i'll never touch music ever again 20:20
nothing of value was lost :)
Woodi so fluent interfaces chain methods... but some years ago methods chaining was discouraged becouse what if method in the middle of chain return error - then rest of the chain is called on that, right ? but errors via exceptions resolve this ?
psch timotimo: eh, it's a skill 20:21
timotimo: look at it this way: you finding what you produce bad shows that you have at least taste, which often comes with talent
timotimo hahaha 20:22
psch yeah, it sounds funny but it is kinda true :P
20:23 darutoko left
psch i mean, if you wouldn't understand music at all it wouldn't sound shitty... vOv 20:24
20:24 Khisanth joined 20:25 sufrostico left 20:26 cognominal left
timotimo i just don't know how to get anywhere from here 20:28
psch yeah, that's the hard part :)
now you have to make up something completely new that sounds good :P 20:29
something unheard, no accidental pachelbel!
timotimo well, in theory i could find some sheet music or some sheet like that
20:29 Begi1 joined
timotimo but i am extraordinarily slow at reading sheet music 20:29
20:29 Begi left, Begi1 is now known as Begi
timotimo i have to look up where the C is relative to the clef and then i just count the lines and spaces in between while saying the note names in my head 20:30
psch same :)
timotimo what's your involvement with music?
psch but tbh i don't think the computer keyboard is the kind of instrument where practice really pays off
timotimo i also have an electric guitar that's collecting dust 20:31
psch uh, i play guitar for like 12 years, bass guitar for like 8 or so, had half a year each lessons in alt saxophone and piano before the guitar, finished some 40 or so tracks with various DAWs...
i'm an semi-enthusiastical amateur i guess :)
timotimo doesn't sound half bad
20:32 ufobat joined, lostinfog joined
psch actually, a lot of it does sound about half bad :P 20:32
i mean, of the songs
timotimo oh my
in that case, how am i supposed to get to anywhere i'd be happy with myself?
psch practice more consistently than i do? :) 20:33
moritz through practise :-)
timotimo maybe in 10 years i can play something passable
if i do an hour every day
yeah ... right ...
psch hah
that's the thing though
what's "passable"?
playing Ode to Joy one-handed?
or playing Für Elise two-handed? 20:34
timotimo the latter, likely
i don't think ode to joy one-handed is terribly hard
20:34 colomon joined
moritz that doesn't take ten year, I'd think 20:34
ufobat tadzik, did you have a chance to look on my session code? I updated the PR because i found that a little thing was still missing. but it is basically still the same 20:35
psch timotimo: www.8notes.com/school/scores/piano/..._orig1.gif look at the lower third
timotimo ah, yes
very notes
psch exactly
but
as moritz says, that's not ten years 20:36
timotimo always just one apart, eh?
psch it's about one or maybe two years of consistent practice
moritz 9.5 years should be enough :-)
timotimo %)
psch the upper half of that sheet takes maybe between 3 and 9 months or something
tadzik ufobat: will check it out, thanks for a reminder :) 20:37
timotimo yo tadzik
psch like, a few months after i quit piano lessons i tried to learn the first movement and it took me maybe a month, which is about 7 months in total, considering the practice before.. vOv
El_Che hehe
I am also starting piano 20:38
(to help daughter starting as well :) )
timotimo so, should i grab the electric keyboard and see what i can do?
or should i grab the guitar instead, because tabs are much easier to read than sheet music is? 20:39
El_Che this has been a great chear shortcut for me: www.amazon.com/Play-Popular-Piano-E...0671530674
psch hah
El_Che (I play (rock) guitar)
psch yeah, tabs are easier to read, but chords on a piano are so much easier :S
[Coke] timotimo: I learned how to read sheet music before I ever saw a guitar tab, so I'd disagree. :)
El_Che just play easy melody with the right hand and chords withs left. Sounds good 20:40
ufobat i find the notes not that hard because you dont have ans syncompation in it :p
El_Che imho I read sometime tabs, but most of the time you just look at the chords and play to the ear
ufobat but my piano skills suck, i think i can't estimate how hard this is.
psch the second movement in Für Elise is pretty tough 20:41
i mean, it's still not *hard* hard
but it is hard :P
ufobat like in "simple kind of hard" 20:42
psch yeah, it's mostly dexterity and muscle memory
tadzik timotimo: yo!
psch ...well, which instrument isn't vOv
20:42 brrt joined
ufobat i played violin for a few years, until my daugter started to walk ;) and wanted to grep the violin and play herself 20:42
RabidGravy when I was being taught saxophone I used to get told off for "remembering" the tunes rather than actually reading 20:43
20:43 tpa_ joined
psch that sounds like genuine pedagogical insight 20:44
20:44 molaf left 20:45 brrt left
El_Che in my opinion, it has to be fun, so not too steep. For that, guitar is great. You'll be singing the ramones in no time :) 20:45
ufobat well doesn't it depend? if you want to make musik remembering the tune and playing it.. is better because its the first step into improvisioning?
20:46 Khisanth left
RabidGravy aren't all Ramones songs just C, G and D anyway? ;-) 20:46
ufobat lol!
mst they didn't really challenge the status quo, no 20:47
El_Che ufobat: my 8-year daughter reads a lot better becuase she learnt (basic) notes before playing piano. Because I have a "better ear" (playing an other instrument) I remember better, but reading is just too slow to just sit and play something without practising
20:47 sufrostico joined
ufobat 3 chords is already the "simple kind of hard" 20:47
aren't 2 sufficient!
El_Che well, you do the ramones and blues and you have years of fun
ufobat :D i just know blitzkrieg bob 20:48
El_Che A - D -E
limit to A and E and you can do mannish boy :)
RabidGravy ufobat, I think that was my problem, I'd been playing other instruments for years, so once I know where the notes are on an instrument and what key the piece is I can basically guess :)
El_Che RabidGravy: that++ 20:49
20:49 Cabanossi left
ufobat El_Che, but yeah, when i started a new piece and played it for a couple of days you have an idea of the melody and tend to stop reading notes.. my teacher was strict about it too. Well i learnt reading sheet music as a child, i am/was good enough in it 20:49
yeah :D 20:50
El_Che what do now, learnig the piano is force myself to sing the notes while I play them
otherwise I, like you, just memorize or play by ear
20:51 Cabanossi joined
El_Che The book I linked has been great fun because you start with both hands right aways (although only playing chords with the left hand) so you get the impression you're "really" playing 20:52
ufobat RabidGravy, i actually find the violin more easy compared to guitar, when you want to play tunes on it.. for me a tuning based in 5th makes more sense. (compared to a tuning on 4ths and 3ths.. which is there like randomly )
psch ufobat: obvious solution: tenor banjo! 20:53
ufobat YEAH! :D
psch it has frets *and* a 5th tuning!!
ufobat or mandoline
20:53 bbkr left
RabidGravy I've got a couple of mandolins in the house, like the violin tuning 20:53
ufobat i own a mandoline for that "configuration" ;D
RabidGravy it's just really guitar upside down
20:53 TEttinger joined
psch hah, i know that 20:54
RabidGravy infact I have a banjolin too
psch 'cause i'm left handed
ufobat but i dont like playing it.. the tention in the strings is so hard
psch and normal guitars are upside down too :P
ufobat :D
20:54 buharin left
colomon banjolin! 20:54
My wife’s old roommate had one.
RabidGravy cool instrument
got it in a junk shop for twenty quid, plays perfectlt 20:55
colomon Mostly just treated as a toy, she is primarily a concertina player.
psch oh is that an extra octave for each string
RabidGravy yeah, eight strings
colomon don’t you tune the string pairs in unison?
psch i have no idea 20:56
i know about 12 string guitars, those have an octave for each string
dha I was just talking about banjolins on facebook recently...
colomon It’s certainly that way on the standard mandolins I’ve seen.
(unison not octave)
El_Che hopes a drummer shows up. Practically the only thing missing to start a perl6 band :)
dha colomon - you do on a mandolin, and I *think* it's usually that way on a banjolin as well, but I'm not positive. 20:57
RabidGravy I think there are almost as many stringed instruments in the house as synthesizers
psch ...i can play the rock base pattern and a really bad amen on drums :P
colomon isn’t there a perl 6 drum machine module, El_Che ?
El_Che colomon: A "Sisters of Mercy" fan? :)
dha RabidGravy - I'm definitely more string-equipped.
colomon El_Che: no
20:58 addison_ joined
dha I really need to actually *learn* how to play my mandolin at some point. 20:58
RabidGravy I wrote a module to manipulate/create Hydrogen song files
psch and a drum example for Audio::PortMIDI
RabidGravy and the Audio::PortMIidi has an example that plays a drum part
colomon RabidGravy: yeah, we have one synth and loads of string instruments. and I cannot play any of the strings.
El_Che colomon: Doktor::Avalanche would be a great name for a perl6 module though 20:59
20:59 dha left
colomon on the other hand, we have even more wind instruments, and I can play almost all of those (except the weird ones purchased as jokes) 20:59
21:00 Khisanth joined, addison left
psch colomon: which are those? the weird ones i mean 21:00
RabidGravy I've got one of those snake charmer pipes which I keep meaning to use in a track at some point 21:01
colomon psch: I dunno the names. Family members will go overseas, find a weird Chinese flute or something, and buy it for me.
On consideration, we have an insane number of musical instruments in the house.
RabidGravy which is a good thing 21:02
21:04 skids left 21:05 sue left
ufobat tadzik, oh my PR fails on travis, because URI::Escape is not in the META.json.. but that wasnt my fault.. i guess somewhere in Bailadors dependencies URI::Escape used to be in it, maybe? 21:07
21:08 firstdayonthejob left 21:10 addison_ left 21:11 hankache joined
hankache evening #perl6 21:12
21:13 addison joined 21:14 lostinfog left 21:15 colomon left 21:17 sufrostico left
RabidGravy every once in a while the websocket::p6sgi craps out if the client browser is closed :( 21:18
21:18 firstdayonthejob joined 21:19 sufrostico joined 21:20 sue joined
hankache hiya RabidGravy 21:21
RabidGravy erp
21:23 djbkd left
RabidGravy "climacterical pale-eared scumfish Kincaid" best random test data of the day 21:24
21:24 addison left 21:27 addison joined
hankache bwahaha 21:27
21:30 sue left
RabidGravy and now I have put a "say" in the on-close of the websocket it doesn't fail 21:31
21:33 colomon joined 21:35 yurivish joined, cognominal joined 21:36 Begi left 21:38 tharkun joined
RabidGravy hahahaha "pike-snouted smell-feast casemaking what-d'you-call-it precontrol fluxionist" 21:39
psch what a peculiar arrangement of words :P 21:40
i'm not sure it actually makes sense
timotimo i'm not sure it actually doesn't
21:41 sufrostico left 21:43 hankache left 21:44 addison left 21:45 maybekoo2 left 21:47 addison joined 21:52 yurivish left 21:56 ZoffixWin left
RabidGravy I'm just testing the logging thing and got bored of using the same old text all the time 21:59
just random words from /usr/share/dict/words 22:00
m: my @words = "/usr/share/dict/words".IO.lines; 22:03
camelia rakudo-moar 61d231: OUTPUT«Failed to open file /usr/share/dict/words: no such file or directory␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block <unit> at /tmp/ruUZUMeCa_ line 1␤␤Actually thrown at:␤ in block <unit> at /…»
RabidGravy m: my @words = "/usr/dict/words".IO.lines;
camelia rakudo-moar 61d231: OUTPUT«Failed to open file /usr/dict/words: no such file or directory␤ in any at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤ in block <unit> at /tmp/qvS0xGUrWS line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/qv…»
RabidGravy boo
22:04 ocbtec left
timotimo uh. i instinctively logged in to hack, but that's not where camelia lives 22:04
RabidGravy :) 22:06
22:07 rindolf left
RabidGravy anyway gotta bed 22:07
toodles
psch o/ RabidGravy
masak RabidGravy: can't stand those precontrol flucionists 22:08
fluxionists*
22:09 von_cheam joined 22:11 RabidGravy left 22:14 Sgeo joined 22:16 skids joined 22:19 von_cheam left, TEttinger left 22:26 TEttinger joined 22:30 sufrostico joined 22:38 ZoffixWin joined, ZoffixWin left, ZoffixWin joined
ZoffixWin Do we still have the issue where panda aborts the install of multiple modules if a module is already installed? I'm thinking whether install will always fail if I specify URI and URI::Escape in `depends` when both are provided by the same distro... 22:39
I guess there's one sure way to find out... 22:47
22:47 Praise joined
dalek osystem: 3ca4176 | (Zoffix Znet)++ | META.list:
Add Twitter: github.com/zoffixznet/perl6-Twitter
22:48
ZoffixWin .tell stmuk our current modules.perl6.org doesn't support GitLab, so your Task::Galaxy isn't indexed.... 22:49
yoleaux ZoffixWin: I'll pass your message to stmuk.
ZoffixWin (though still installable with panda it seems... requires Zef install though? :S) 22:54
masak 'night, #perl6 23:01
ZoffixWin night 23:02
23:07 firstdayonthejob left 23:09 _28_ria left 23:17 wamba left, colomon left
cognominal maybe I missed it. But I don't see how to run rakudo to get heap snapshots. 23:27
diakopter cognominal: did you see github.com/jnthn/p6-app-moarvm-heapanalyzer 23:32
cognominal diakopter, yea, but how do I produce the file analised by the fine program> 23:33
how do I run rakudo to get a snapshot file ? 23:34
diakopter perl6-m --profile=heap 23:35
cognominal thx 23:36
23:39 spider-mario left 23:40 maybekoo2 joined 23:50 sufrostico left 23:53 cdg left, cdg joined 23:57 johndau joined 23:58 cdg left, sufrostico joined