»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
raydiak yep looks like jnthn++ already had the same grammar idea and started implementing it (though a couple years of bitrot makes it segfault): github.com/jnthn/grammar-generative 00:00
TimToady: do you know if it met any particular obstacles other than X::NoTuits? 00:01
dalek osystem: bc31998 | (David Warring [email@hidden.address] | META.list:
moved Test::Builder to perl6-community-modules
00:25
skids raydiak: github.com/skids/perl6netpack/blob...r.pm6#L122 those were my thought on the matter years ago. 00:27
(That and a more formalized way to specify a default actions.) 00:28
skids But mainly my biggest wish for grammars is reducing the "make foo.ast" boilerplate when you need to skip up the tree. 00:35
skids Some form of advanced "make" that walks the sub-tree to find asts or sub-sub-rules maybe. 00:38
raydiak or a default action which does so, and gets overridden if you define your own 00:39
skids ...and a way to elide a shim rule, say lie a <..rule> that would be invisible but whose subrules would still appear where it does. 00:40
timotimo you can still just put { make $<foo> } at the end of your regex 01:26
muraiki if I create a promise using async and the code inside of async throws an exception, does that result in a failed promise or do I have to do that manually? 01:56
skids timotimo: It's that you have to either put { make $<foo><bar>[42]<fnord> } at branch tops or put { make blah } on every rule. 02:02
(or if you are talking aout default actions, if you { make $<foo> } that happens even when alternate actions are specified.) 02:03
timotimo no, not default actions 02:04
just that you don't have to build methods for everything
muraiki it looks like the promise fails, woot 02:20
does anyone know how I can redirect stdout/stderr locally? 02:21
I'm trying to run two shell commands in parallel, but I don't really want their output interleaved :) 02:22
dnmfarrell is there a way to check for the existence of named captures in $/? Something like $/<singeline_format_text>:exists 02:27
timotimo that should work, yes 02:28
you can also get $/.keys
muraiki: you can use Async::Process for that
doc.perl6.org/type/Proc::Async
muraiki timotimo: thanks! 02:29
timotimo you're welcome
hm, also there's open :pipe
not documented on doc.perl6.org it seems? 02:30
dnmfarrell timotimo: hmm it doesn't like $?<name>:exists is there a way I can use the hash interface like: $?{"name"}:exists (that example doesn't work either, I think)
timotimo you want $/ of course 02:31
dnmfarrell yeah sorry bad typing
timotimo m: "hello" ~~ / (.) $0 /; say $/.keys
camelia rakudo-moar 59b893: OUTPUT«0␤»
timotimo m: "hello" ~~ / (.) $0 /; say $/.perl
camelia rakudo-moar 59b893: OUTPUT«Match.new(orig => "hello", from => 2, to => 4, ast => Any, list => (Match.new(orig => "hello", from => 2, to => 3, ast => Any, list => (), hash => EnumMap.new()),), hash => EnumMap.new())␤»
timotimo m: "hello" ~~ / (.) $0 /; say $/.hash.keys
camelia rakudo-moar 59b893: OUTPUT«␤»
timotimo m: "hello" ~~ / (.) $0 /; say $/.list
camelia rakudo-moar 59b893: OUTPUT«「l」␤»
timotimo m: "hello" ~~ / (.) $0 /; say $/.list.perl
camelia rakudo-moar 59b893: OUTPUT«(Match.new(orig => "hello", from => 2, to => 3, ast => Any, list => (), hash => EnumMap.new()),)␤»
timotimo right, match objects are a tiny bit different i suppose?
dnmfarrell yeah I'm getting a "you can't adverb that" error 02:32
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/.keys
camelia rakudo-moar 59b893: OUTPUT«alpha foo bar␤»
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/<foo>:exists
camelia rakudo-moar 59b893: OUTPUT«True␤»
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/<yoink>:exists
camelia rakudo-moar 59b893: OUTPUT«False␤»
timotimo give me your exact code please?
seems like the adverb is attaching to the wrong thing?
dnmfarrell $/.<url>:exists 02:33
dalek osystem: fbdea2d | tony-o++ | META.list:
Perl6 Templates that compile to subs

Yet another perl6 templating module. Compiles to subs, fairly quick
dnmfarrell I tried: $/<url>:exists and: $/{"url"}:exists
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/.<yoink>:exists 02:34
camelia rakudo-moar 59b893: OUTPUT«False␤»
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/<yoink>:exists
camelia rakudo-moar 59b893: OUTPUT«False␤»
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/{'yoink'}:exists
camelia rakudo-moar 59b893: OUTPUT«False␤»
dnmfarrell *cries*
timotimo huh. what's your exact version?
m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/.{'yoink'}:exists
camelia rakudo-moar 59b893: OUTPUT«False␤»
timotimo did you perhaps put spaces in there somewhere?
muraiki timotimo: I'm looking at Async::Process, but it's not clear to me how to get the exit code of the program. I can see how to check whether launching the program succeeded or not, but do you know how to get the exit code? 02:35
dnmfarrell I have this: if ($/.<url>:exists && $/.<singleline_format_text>:exists)
timotimo muraiki: well, .start gives back a promise that you can wait on 02:37
and the resulting value of the promise will be a Proc::Status object
muraiki oh! nice. thanks! 02:38
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/.{'yoink'}:exists && $/.{'barf'}:exists
camelia rakudo-moar 59b893: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CLs0vYlphR␤You can't adverb that␤at /tmp/CLs0vYlphR:1␤------> 3/.{'yoink'}:exists && $/.{'barf'}:exists7⏏5<EOL>␤ expecting any of:␤ pair value␤»
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/.{'yoink'}:exists and $/.{'barf'}:exists
camelia rakudo-moar 59b893: OUTPUT«False␤»
timotimo the precedence bites you here
m: "hello" ~~ / <foo=alpha><bar=alpha> /; say ($/.{'yoink'}:exists) && ($/.{'barf'}:exists)
camelia rakudo-moar 59b893: OUTPUT«False␤»
tony-o muraiki: promise.result will have .exitcode in it
timotimo m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/{'yoink'}:exists && $/{'barf'}:exists
camelia rakudo-moar 59b893: OUTPUT«5===SORRY!5=== Error while compiling /tmp/J93BUkOCeo␤You can't adverb that␤at /tmp/J93BUkOCeo:1␤------> 3 $/{'yoink'}:exists && $/{'barf'}:exists7⏏5<EOL>␤ expecting any of:␤ pair value␤»
dnmfarrell damn, you're right 02:39
timotimo std: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/{'yoink'}:exists && $/{'barf'}:exists 02:39
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
timotimo i wonder if std thinks this is okay because it doesn't analyze far enough?
dnmfarrell timotimo: thanks that was driving me a bit nuts 02:40
timotimo star-m: "hello" ~~ / <foo=alpha><bar=alpha> /; say $/{'yoink'}:exists && $/{'barf'}:exists
camelia star-m 2015.03: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eTNwRoC9vK␤You can't adverb that␤at /tmp/eTNwRoC9vK:1␤------> 3 $/{'yoink'}:exists && $/{'barf'}:exists7⏏5<EOL>␤ expecting any of:␤ pair value␤»
dnmfarrell what's std, a parser?
timotimo at least it has been like that in the last release
yes, std is the reference grammar
tony-o timotimo: the Proc::Async exitcode seems to be multiplied by 256. shell script with 'exit 1' has an exit code of 256 , exit 2 => 512, etc. i'm running freshly build p6 02:44
tony-o gist.github.com/tony-o/adeb3a9d3288f894e118 02:47
m: gist.github.com/tony-o/ad52076865a21edec940 02:48
camelia rakudo-moar 59b893: OUTPUT«IO::Socket::INET is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in method new at src/RESTRICTED.setting:32␤ in block <unit> at /tmp/9gxcCFURYp:5␤␤»
timotimo ah, yes, that's the actual exit code
is there no accessor for what a user thinks of as an exit code? 02:49
tony-o that other gist is still borken too ::
mm, not from Proc::Status
Proc::Status.new(exitcode => 1280, pid => Any, signal => Any) 02:50
timotimo ah, that one ;(
tony-o it's always what the user thinks the exit code is * 256, it seems
m: 5* 1280
camelia ( no output )
tony-o m: say 5* 1280
camelia rakudo-moar 59b893: OUTPUT«6400␤»
tony-o m: say 5* 25 02:51
timotimo it ought to set the status via the status method
camelia rakudo-moar 59b893: OUTPUT«125␤»
tony-o m: say 5* 256
camelia rakudo-moar 59b893: OUTPUT«1280␤»
tony-o i give up
timotimo $!exitcode = $new_status +> 8
tony-o fancy
timotimo that doesn't seem like it's being called, though 02:52
all the users of Proc::Status seem to just set the values in the constructor
muraiki hrm, am I doing something bad if I get the error: P6opaque: no such attribute '$!tappers_lock'
tony-o probably - what's your CStruct look like?
muraiki I don't even know what a CStruct is, heh 02:53
tony-o do you have a gist?
timotimo ... CStruct? 02:54
muraiki gist.github.com/muraiki/1211c20fc0d1f2f7af33
tony-o i've only ever seen that P6Opaque error when i try to access something that wasn't part of a class .. repr('CStruct') ...
muraiki sorry but I can't provide the full program... you'd need a config file that has some company specific stuff in it. but I can try to make something generic if necessary, but that would probably have to be tomorrow 02:55
without the taps it works fine
so I imagine I am doing something bad there, heh
timotimo that can't be right, because P6Opaque is a repr and if you use a CStruct repr, you should never get errors for a P6Opaque thingie
tony-o timotimo: maybe i was confused, i was trying a lot of stuff trying to get csv parsing with NativeCall to work :/ 02:56
timotimo mhm
muraiki: can you print out the .perl of the .stdout and .stderr?
muraiki sure 02:56
tony-o i'm fried, apparently. later 02:58
muraiki hrm, if I "say $proc.stdout.perl" I just get "Supply.new"
muraiki ah, initializing $stdout and $stderr to "" seems to fix it 03:00
but now I'm getting a warning "use of uninitialized value of type Any in numeric context" on line 14 03:01
let me .perl the promise
tony-o signal might be any 03:02
muraiki yeah, that's it 03:03
pid is also Any
tony-o ($promise.result.signal // 0) != 0 03:04
muraiki thanks! 03:05
er... but now I ran it once and got the tappers_lock error, then I ran it a second time and got "Unhandled exception in code scheduled on thread 139942201779968 MVMArray: Index out of bounds"
running it a third time yielded "No appropriate parametric role variant available for 'Buf" 03:06
all sorts of fun things :n
well I really need to get to bed, but hopefully I can debug this more tomorrow 03:07
thanks for your help, everyone
:)
masak morning, #perl6 05:52
sjn \o 05:59
nbdsp Greetings! Could someone advise please what is the fastest way to iterate over a list of lines with space separated words (like this: '1 word1 A') and place the second and third words of each line into a tuple in a second list. When I use: for @list1 { my ($a $b $c) = $_.words; @list2.push( $b, $c ); } or for @list1 { $_ ~~ m:s/\d+ (<-[\ ]>+) (\w)/; @list2.push: ( $/[0], $/[1]); } - this ways take about 3 minutes to iterate over a list w 06:44
on a machine with a 1.2 Ghz single core processor. Is such timing normal?
moritz nbdsp: your first line was truncated after "over a list w" 06:46
nbdsp Greetings! Could someone advise please what is the fastest way to iterate over a list of lines with space separated words (like this: '1 word1 A') and place the second and third words of each line into a tuple in a second list. 06:47
When I use: for @list1 { my ($a $b $c) = $_.words; @list2.push( $b, $c ); } or for @list1 { $_ ~~ m:s/\d+ (<-[\ ]>+) (\w)/; @list2.push: ( $/[0], $/[1]); } - this ways take about 3 minutes to iterate over a list with 100.000 lines on a machine with a 1.2 Ghz single core processor. Is such timing normal?
moritz I'd write it as @list = @list1.map({ .words[0, 1]}) 06:48
but no idea if it's faster
and yes, list iteration is known to be rather slow
nbdsp moritz: thanks.
nbdsp The variant with .map is slower than the one with regexes. =( Unfortunate slowness for such a common programming task. :( 07:02
moritz yes, that's why we're all eager for the Great List Refactoring (GLR) to happen, which hopefully makes that faster 07:05
but most of us are too scared or don't feel qualified to it themselves
TimToady++ is moving in that direction, afaict 07:09
nbdsp moritz: thanks, will be waiting for improvements. 07:10
jnthn raydiak: On Grammar::Generative, the talk about it jnthn.net/papers/2013-yapcna-gramma...nerate.pdf was met with some amount of terror and incomprehension. :) I still think it's an interesting idea, though. :) 07:45
DrForr jnthn: I've been thinking about that myself, but not quite as rigorously. 07:49
RabidGravy nothing like a bit of terror and incomprehension 08:00
DrForr My talks just are met with incomprehension.
RabidGravy all good fun 08:02
labster That generative grammar talk reminded me of all of the seminars I sat through in grad school -- interesting and fairly neat, but I only understood 20% of it.
RabidGravy if one uses "earliest" with a list of channels is it possible to get the actual channel that won in the "done" block? The code in asyncops says not but there may be something I missed 08:14
RabidGravy ah, no got it - you can do a "done" or a more with a specific channel rather than a '*' 08:24
or rather as well as a '*'
anyway off to the seaside for the day 08:26
itz_ a rainy day? 08:27
masak labster: that generative talk will probably go to history as jnthn's least generally understandable talk. 08:45
labster: my two lasting impressions of it is pmichaud walking out of the talk mumbling that something was bothering him about it all
labster: and sorear sitting at the edge of his seat during the talk, loudly saying "this is awesome"
the rest of the audience... looked a bit stunned :) 08:46
itz_ is it on video? :)
masak quite possibly 08:47
masak I remember there being recordings at that YAPC::NA 08:47
masak yep, here: www.youtube.com/watch?v=RPQvtfwsilM 08:47
also -- haha -- "backtions" :P 08:48
itz_ ty
masak they're the dual of "actions", of course :D
jnthn++
masak if I gave an online course "Category Theory for programmers", who on this channel would be interested? (a "yes" answer is not binding in any way. just probing for interest.) 08:57
lizmat good *, #perl6! 08:58
masak \o lizmat 08:59
brrt \o masak, lizmat 09:00
i would have some interest in that, yes
masak yay one participant 09:02
itz_ if it were branded "Category Theory for Dummies" with a nice yellow book 09:06
lizmat my arrows are going both ways on this one
[ptc] masak: +1 09:07
cdc masak: will it be a live course?
masak yes. on IRC. 09:08
labster hmmm, maybe
masak itz_: yeah, yellow books about Category Theory tend to be nice and slow in their explanation :P
FROGGS masak: I'd be interested 09:10
masak wow, that's 3 interested and 2 maybes. 09:11
masak in the first 15 minutes of asking. 09:11
I think we might have something here.
some context: category theory is "the branch of mathematics school never told you about (but should have)" 09:12
it unifies so many things. it explains a fair bunch of things, too.
it's very relevant to programming, especially things to do with types.
but also in relating programs and types to other fields.
I just submitted a course abstract to Edument about category theory. I don't expect that course to ever go off, because the IT industry doesn't work like that. 09:13
labster A man can always dream.
masak right.
but it's nice to see there's some interest here :)
I'll... get back to y'all about details. it may happen. then again, it may not. 09:14
lunch &
FROGGS might it may happen in May if I may ask? 09:16
labster I always feel like my computer science education is somewhat lacking, probably because I studied meteorology in university. So topics like this are interesting to me. 09:17
Ven github.com/jnthn/grammar-generativ...6#L107-110 I'm not sure I get what's that for 09:23
Ven m: say 1 xx * Z+< 0..*;. 09:28
camelia rakudo-moar 59b893: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uOY3MlxAMo␤Bogus statement␤at /tmp/uOY3MlxAMo:1␤------> 3say 1 xx * Z+< 0..*;.7⏏5<EOL>␤ expecting any of:␤ dotty method or postfix␤»
Ven m: say (1 xx * Z+< 0..*)
camelia rakudo-moar 59b893: OUTPUT«1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736…»
Ven masak: I'd be interested :) 09:33
dalek kudo/nom: f433a2f | lizmat++ | src/Perl6/World.nqp:
Simplify UNIT tagging
09:37
cognominal I failed to generate a pdf book from the "category theory" category in wikipedia because some page is misformatted. 09:41
Galois connexions make me more or less understdood the business of adjoints
arnsholt masak: I would be interested in a CT course too 09:51
masak cool, cool. 09:52
masak makes a note "interest exists (!)"
cognominal: ok, now you made me interested in Galois connections. gotta read up on those ;) 09:53
cognominal the pb with category theory is it usually uses examples from parts of math I don't know. 09:54
masak right. 09:55
yeah, I've basically had to learn a lot of group theory and topology in the past two years or so, in order to appreciate the examples.
cognominal Basic group theory, I know. So the value of Galois connexions.
masak s/a lot of/a very modest amount of/
cognominal On the other hand, when you know something, CT permits to translate part of your knowledge to very different parts of maths making them easier. 09:58
cognominal I remember in high school being very pissed off and excited at the same time, when the trigonometry formula I had trouble to memorize, were a trivial consequence of complex exponentials algebraic property. 10:01
masak ah yes. en.wikipedia.org/wiki/Euler%27s_formula 10:04
cognominal so they are down to earth examples of CT after all.. 10:06
masak there are a lot of things in that region of math that end up equivalent. 10:07
for example, complex numbers can be represented as 2x2 matrices of reals with a certain shape. 10:08
and so complex multiplication can be put into correspondence with matrix multiplication.
(and that's also a way to remember some sine and cosine laws)
cognominal After college, I felt I learnt all the bourbakic bureaucratie without the interesting things that motivated them. Learing about CT makes me things I had not been swindled after all.
s/things/think/ 10:09
masak heh, even Bourbaki didn't use the (early) results of Bourbaki. :P
the first volume produced (with set foundations) basically quickly became out-of-date and something to ignore. 10:10
they still had an undeniably big influence, though.
en.wikipedia.org/wiki/Bourbaki_dang...end_symbol for example 10:11
and ∅ for en.wikipedia.org/wiki/Empty_set 10:12
cognominal Also after learning all these alphabets and notations (matrices, indices, exponent...), it was quite a let down to go back to upper case ASCII for programming. I naively thought this notation wealth was used in programming wiithout thinking too much how it could be entered from the terminal. At least, that prepared me to the idea of rich syntax à la Perl. 10:17
andreoss m: my $x = 'before colon: after'; $x.subst: /<?before before \s colon\:> \w+/, 'xxx', :i; 10:32
camelia ( no output )
andreoss m: my $x = 'before colon: after'; say $x.subst: /<?before before \s colon\:> \w+/, 'xxx', :i; 10:33
camelia rakudo-moar f433a2: OUTPUT«xxx colon: after␤»
DrForr I keep meaning to make 3+@a⃗ be a valid quaternion representation.
andreoss why?
DrForr (look carefully at the @a)
andreoss is <?before .. > the right syntax for looking behind? 10:34
m: my $x = 'before colon: after'; say $x.subst: /<?after before \s colon\: \s*> \w+/, 'xxx', :i; 10:36
camelia rakudo-moar f433a2: OUTPUT«before colon: xxx␤»
andreoss okay
masak cognominal: I've more and more opened up to the idea of Unicode identifiers. I've come to realize that what was holding me back from that was mostly irrational fear. 10:58
lizmat
.oO( the fear of APL? )
10:59
masak I still think it's a freedom-under-responsibility thing, mind. but so are many things in Perl.
lizmat: more like the fear of not being able to enter characters, or having them display wrong on screen, or encode wrong on disk.
those fears are unwarranted, because they have good solutions. 11:00
lizmat well, as long as their not synthetic, it should be ok
masak as in, multiple codepoints?
lizmat otoh, synthetic unicode ops *would* be the ultimate dogfooding :-)
masak even that ought to be OK...
lizmat the ones with negative code point values in NFG
masak right.
yeah, if we pull off NFG right, those should be on completely equal footing. 11:01
cognominal: oh, I see how Galois connections made you think of adjoints. I'm only on the definition, but yeah, I see it. 11:03
lizmat s/if/when/ # trust in jnthn
masak .oO( wenn ) :P 11:05
lizmat introducing false friends... tssk! 11:07
masak hey! some of my best friends are false
oh wait
(I believe in English the term is "false cognate", perhaps, and that "false friend" might itself be a false cognate) 11:08
lizmat ok, maybe "false friend" is a dutchism :-) 11:09
maybe not, if we're to believe WP: en.wikipedia.org/wiki/False_friend 11:10
masak yeah, maybe not.
in Swedish, we also have it as "false friend", so I think I assumed that was a false cognate 11:11
cognominal masak, about Galois connections, you will like this one too : www.cs.toronto.edu/~azadeh/page11/p...ction1.pdf 11:12
masak thanks.
teaching now; will read later :)
dalek kudo/nom: 9826595 | lizmat++ | src/Perl6/ (2 files):
First scaffolding auth/version in module loading

This basically introduces the temporary "use cur" pragma, and the @?INC compile time array with string representations of CompUnitRepo's to search.
11:18
FROGGS ohh cool, lizmat++ 11:22
masak oh, "use cur" is temporary? 11:23
I feel terribly out of touch on all this.
lizmat well, perhaps we will s/lib/cur/ 11:24
*I* think it makes sense, but I'm not alone :-)
masak: I guess reading up on S11/S22 may help 11:25
it's been ripening for 1+ year now :-)
FROGGS hmmm, I have nostalgic feelings about use lib :/ 11:26
lizmat well, that's why I said "cur" would be temporary
FROGGS yeah, and it is at least a very good way to play with it, even when that will be renamed to lib 11:27
lizmat that's the idea, and I hope I won't be the only one playing with it :-)
FROGGS yes, I'll check it, though $work, you know :o(
masak cognominal: that was a fun read -- thanks. 11:28
dalek kudo/nom: 902c291 | lizmat++ | src/Perl6/World.nqp:
use cur should unshift, not push :-)
FROGGS we shall add extensive tests for 'use cur' me thinks
like a pandaish scenario 11:29
lizmat well, we need extensive tests: if we rename "cur" to "lib" later, that should be an easy fix 11:30
dalek kudo/nom: 1a4d47f | lizmat++ | t/01-sanity/54-use-lib.t:
Add some 'use cur^Wlib' sanity tests
12:12
pan style="color: #395be5">perl6-examples: e5c0ba2 | andreoss++ | / (14 files):
Merge pull request #1 from perl6/master

merge with orig
12:14
pan style="color: #395be5">perl6-examples: 0e374a6 | (Andrei Osipov)++ | categories/euler/prob059-andreoss.pl:
[euler] problem 59, add back previosly removed lines
pan style="color: #395be5">perl6-examples: 2b08b3c | (Zoffix Znet)++ | categories/euler/prob059-andreoss.pl:
Merge pull request #23 from andreoss/prob059

Fix errors in solution to Problem 59
kudo/nom: cbf849f | lizmat++ | t/01-sanity/54-use-lib.t:
Add some more sanity tests
12:19
lucasb Hello channel 12:48
FROGGS lucasb: hello receiver :o)
lizmat lucasb o/
DrForr Afternoon.
lucasb FROGGS, lizmat, DrForr: o/ :)
Since there is happening some refactoring in Grammar and World, what is your opinion about moving those levenshtein subs into a separate file and be included and used from World? Is it worth it or it's too much trouble? The only methods that use them are suggest_{typename,lexicals,routines}. 12:49
FROGGS my feeling is that these might want to be moved to nqp 12:51
like there is sprintf.nqp in HLL
we could move levenshtein to this place, and also punycode in case we are going to implement it
lizmat FROGGS: I was actually thinking of moving the Levenshtein code to Perl6 / settings 12:55
but I agree they should become more accessible
FROGGS does that actually work?
lucasb Second thing is: what is your opinion about making levenshtein suggestion optional? Maybe turned on/off at compilation time, or a cmdline switch, or a pragma. Doesn't it incur a little time penalty? The default could be on, and if some programmer doesn't want to wait those miliseconds, it could turn it off. 12:56
FROGGS ohh, perhaps yes, when it only called from typed exceptions
lucasb m: my ($foo1, $foo2, $foo3, $foo4, $foo5); $foo1
camelia ( no output )
lizmat well, I want to be able to call it for method not found errors during runtime
lucasb m: my ($foo1, $foo2, $foo3, $foo4, $foo5); $foo
camelia rakudo-moar cbf849: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2kD6XNwBqO␤Variable '$foo' is not declared. Did you mean any of these?␤ $foo1␤ $foo2␤ $foo3␤ $foo4␤ $foo5␤␤at /tmp/2kD6XNwBqO:1␤------> 3$foo1, $foo2, $foo3, $foo4, $foo5); $fo…»
FROGGS lucasb: if you end up there, it is too late to worry about performance 12:57
lizmat m: class A {}. A.frobnicate
camelia rakudo-moar cbf849: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aiM1cia_Bt␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/aiM1cia_Bt:1␤------> 3class A {}. 7⏏5A.frobnicate␤»
lizmat m: class A {}; A.frobnicate
camelia rakudo-moar cbf849: OUTPUT«Method 'frobnicate' not found for invocant of class 'A'␤ in block <unit> at /tmp/Y1m8b0Usnz:1␤␤»
FROGGS aye
lizmat meanwhile my head hurts from looking at the module loading code again 12:58
FROGGS :/
I like that code somehow :o)
can't even tell why
timotimo o/ 12:59
rarara Hello, I don't have a culture in CS and I am now learning (from you) about the concept of Grammars; Only one thing is preventing me form using them and is memory usage and I would like to ask to you if there are already elegant solutions to my problems.
lizmat well, my next step will be to have @*INC/%*CUSTOM_LIB only have strings
FROGGS hi timotimo
lizmat and vivify CUR objects on demand
but that will be tomorrow, after a visit to AmsterdamX.pm 13:00
rarara Imagine the computer is you, and someone is talking to you some simple sentences: I think that you would not store all the information in a parse tree
FROGGS rarara: did you hit some memory usage issues?
DrForr rarara: if you're using perl{6}? you shouldn't be worrying about memory.
rarara I would like to be constructive
lizmat afk for rest of the day&
DrForr rarara: A source file isn't a set of disconnected paragraphs. 13:01
rarara I think you would store the simple sentences, or if you want the paragrpah or the chapters
DrForr I agree that for perl6 usage it is perfectly fine
but what about the user which is parsing gbites of data
?
moritz rarara: there are two possible answers 13:01
DrForr Then you can use subparse(). 13:02
moritz rarara: the first is to not do it in one .parse call
spit by paragraphs first, for example
and the second is that Perl 6 promises something called "parse tree pruning", but it's not really designed yet
rarara ok it would be a solution
moritz so, you could find a good design for that, implement it, and be happy
could be as simple as Match.forget-captures 13:03
that would throw away everything in the parse tree under the Match object you call it on
rarara subparse would be ok but is not a flexible mechanism; forget-captures would be nice to have 13:05
I will look if I find time to learn to do it
timotimo there's going to be an element for inside regexes that'd cause the target string up to the current match position to be "cut off" and possibly forgotten, along with the matches (i guess?) 13:08
that's also not yet implemented
moritz there's <( and )> 13:09
they are implemented
but they don't throw away old captures; they just cause none to be made outside
rarara would this be the best documentation for the grammar api at the moment? github.com/perl6/specs/blob/master...-regex.pod 13:15
moritz rarara: there's also doc.perl6.org/type/Grammar and doc.perl6.org/type/Match
FROGGS timotimo: <cut> probably, which corresponds to either ::: or :::: 13:16
I'd love to implement it, though, need someone else's braincells for that too 13:17
moritz I thought <cut> was about backtracking o^Hcontrol? 13:23
FROGGS "A <cut> assertion always matches successfully, and has the side effect of logically deleting the parts of the string already matched. Whether this actually frees up the memory immediately may depend [...]" 13:24
"Attempting to backtrack past a <cut> causes the complete match to fail [...]" 13:25
moritz ok, seems my p6 memory is rusty :-) 13:27
FROGGS I guess it is fun to implement, though I know that it does not make sense to try it again with out some clarification 13:29
moritz yes, deleting stuff in an immutable string seems questionable
FROGGS S05 says that this is illegal 13:30
though, it is tricky anyway 13:31
muraiki hi all. I'm having a weird problem using tap on stdout and stdin from Proc::Async. I'm getting errors sometimes but not always, so perhaps there's some kind of race condition with what I'm doing 13:38
moritz muraiki: there are known races in Proc::Async (in RT already) 13:38
muraiki oh, that explains everything :)
well darn
moritz in particular if you use multiple Proc::Async instances in the same program
muraiki yeah, that's what's happening
I'm trying to run >1 using await 13:39
I had tried using system (or maybe shell) earlier but didn't know how to redirect stdout/stderr
and eventually I'd like to be able to kill the proc if necessary, and it seems that Proc::Async is what I'd need for that anyways
timotimo es 13:40
yes, even.
i didn't know there are races for proc::async :(
muraiki is there anything that I can do to help, given that I know nothing about p6 development at all? haha :) 13:44
I suppose you have enough stack traces already
dalek p: b951514 | paultcochrane++ | tools/build/Makefile-Moar.in:
Correct nqp binary cleanup in realclean target
13:47
c: 1c7e923 | paultcochrane++ | lib/Type/Mu.pod:
Document Mu.so
13:48
c: 3afe30a | paultcochrane++ | / (2 files):
Merge branch 'master' of github.com:perl6/doc
c: ec3bd8b | paultcochrane++ | / (7 files):
Merge branch 'master' of github.com:perl6/doc
c: feb9f6f | paultcochrane++ | lib/Type/List.pod:
Minor grammatical correction
c: 2cd5bfe | paultcochrane++ | type-graph.txt:
Add PairMap to type graph information
c: 5f81319 | paultcochrane++ | lib/Type/Mu.pod:
Document Mu.not
kudo/nom: bcf3f1c | timotimo++ | src/ (2 files):
try to hint at what you can't adverb (rather than just "that")
13:54
timotimo ^- plz like 13:54
timotimo it's especially weird that "$/<foo>:exists && $/<bar>:exists" applies the adverb to && even though :exists is spacelessly cuddled against the postcircumfix 13:59
i can't help but think it used to be different 14:00
[ptc] if rotor returns a LoL, is it expected that assignment should flatten the resulting list of lists, or retain it? 14:10
m: say (^6).rotor(3 => -2).perl; my @blah = (^6).rotor(3 => -2); say @blah.perl; 14:11
camelia rakudo-moar cbf849: OUTPUT«((0, 1, 2), (1, 2, 3), (2, 3, 4), (3, 4, 5))␤[0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5]<>␤»
[ptc] I've found that one needs to use C<lol> to force LoL context, is that then the right way to do things? 14:13
[ptc] m: say (^6).rotor(3 => -2).perl; my @blah = lol (^6).rotor(3 => -2); say @blah.perl; 14:13
camelia rakudo-moar cbf849: OUTPUT«((0, 1, 2), (1, 2, 3), (2, 3, 4), (3, 4, 5))␤[$((0, 1, 2), (1, 2, 3), (2, 3, 4), (3, 4, 5))]<>␤»
moritz or binding
m: my @a := (^6).rotor(3 => -2); say @blah.perl; 14:14
camelia rakudo-moar cbf849: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QnFWUNZETq␤Variable '@blah' is not declared␤at /tmp/QnFWUNZETq:1␤------> 3 := (^6).rotor(3 => -2); say @blah.perl7⏏5;␤ expecting any of:␤ method arguments␤»
moritz m: my @a := (^6).rotor(3 => -2); say @a.perl;
camelia rakudo-moar cbf849: OUTPUT«((0, 1, 2), (1, 2, 3), (2, 3, 4), (3, 4, 5))␤»
[ptc] moritz: cool, thanks
am trying to work out why a contributed example didn't work
I'll document the two assignment cases under rotor so that this doesn't trip anyone else up 14:15
m: my @a = lol (^6).rotor(3 => -2); say @a.WHAT; 14:17
camelia rakudo-moar cbf849: OUTPUT«(Array)␤»
[ptc] m: my @a := (^6).rotor(3 => -2); say @a.WHAT;
camelia rakudo-moar cbf849: OUTPUT«(List)␤»
[ptc] interesting
dalek pan style="color: #395be5">perl6-examples: 86489a3 | paultcochrane++ | categories/euler/prob059-andreoss.pl:
Need to bind variable so as not to flatten LoL

This then retains the List structure in the assigned variable. Otherwise it gets completely flattened into an Array.
14:20
lucasb Is there some confusion about the LoL term? I mean, one thing is ((1,2),(3,4)), and another thing is (1,2;3,4). Only the latter is a LoL in P6 terms, right? 14:24
lucasb I mean, both ((1,2),(3,4)) and (1,2;3,4) are LoLs, but the second LoL is more LoLer than the first LoL :) 14:30
Just kidding... lol :)
[ptc] lucasb: I think you're right 14:31
m: ((1,2),(3,4)).WHAT.say
camelia rakudo-moar bcf3f1: OUTPUT«(Parcel)␤»
[ptc] m: (1,2;3,4).WHAT.say
camelia rakudo-moar bcf3f1: OUTPUT«(LoL)␤»
dalek pan style="color: #395be5">perl6-examples: 53829ab | paultcochrane++ | t/categories/euler.t:
[euler] add test for prob059
14:47
dnmfarrell hey, how can i declare a private class attribute rw and give it a default value? has %!names is rw = john => 'smith', jane => 'smith'; gives a warning about redundant use of 'rw' 14:54
timotimo private attributes are always rw 14:57
dnmfarrell timotimo: thanks, the issue i've got is when I try to modify: has %!names is rw = john => (), jane => (); like this: self.get_names("john") = () I get an error: "cannot assign to a readonly variable" 15:00
dnmfarrell think my Perl 5 mental mp is hurting me again :) 15:01
*map
FROGGS what does get_names do? 15:02
timotimo ah
get_names must be declared "is rw" if you want it to return a rw-container
dnmfarrell return %!buffer<buffer_name>; 15:02
dalek pan style="color: #395be5">perl6-examples: 6a70759 | paultcochrane++ | categories/euler/README.md:
Document adding new solutions to the Euler examples
dnmfarrell s/buffer/names
FROGGS what timotimo said
dnmfarrell FROGGS, timotimo thanks guys. I've tried that but I'm still getting the readonly error. Code is here: github.com/dnmfarrell/Pod-Perl5/bl...TML.pm#L28 can you see what's wrong? 15:05
FROGGS hmmm, this works: 15:07
m: class Foo { has %!bar = baz => 42; method bang is rw { %!bar<baz> } }; say Foo.new.bang = 11
camelia rakudo-moar bcf3f1: OUTPUT«11␤»
FROGGS dnmfarrell: ahh, remove that return
m: class Foo { has %!bar = baz => 42; method bang is rw { return %!bar<baz> } }; say Foo.new.bang = 11
camelia rakudo-moar bcf3f1: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/LTOomPYU56:1␤␤» 15:08
jdv79 or use return-rw i think
dnmfarrell FROGGS: works! 15:09
jdv79: that works too!
timotimo hm, should return in an is rw method/sub work like return-rw perhaps? 15:09
dnmfarrell is that a bug? if a method is declared as RW, shouldn't the return value always be rw?
moritz dnmfarrell: it would be nice, but it's not that easy 15:11
dnmfarrell: because the scoping for 'return' is non-trivial
and it's the return that strips the container
dnmfarrell moritz: is that because you may need to return exceptions or other read only values from a RW method? 15:15
ab5tract [ptc]: IIUC, any time we currently see 'Parcel' currently is an ambiguous corner which will become a "real" version of itself on a case by case basis
ab5tract I have to say, the distinction between LoL and List feels somewhat as awkward as the one between Parcel and List, 15:18
moritz m: my $x = { return 5 }; sub f() is rw { $x() }; sub g() { $x() }; say f(), g() 15:19
camelia rakudo-moar bcf3f1: OUTPUT«55␤»
moritz dnmfarrell: ^^ in the example above, how would the 'return' decide whether to decontainerize?
ab5tract moritz: this is where lexotic dispatch comes into play, correct? 15:21
ab5tract I remember coming across that word in the synopses and enjoying the fact that there was a proper noun for the 'thingy' 15:22
ab5tract *this 'thingy' 15:22
moritz ab5tract: yes 15:24
dnmfarrell does return-rw return a copy? This is not modifying the attribute: my @buffer = self.get_buffer($buffer_name); @buffer.push: $pair; 15:33
moritz dnmfarrell: it does not 15:36
moritz m: my $x; sub f() is rw { return-rw $x }; f() = 42; say $x 15:36
camelia rakudo-moar bcf3f1: OUTPUT«42␤»
moritz as can be seen here
dnmfarrell method get_buffer (Str:D $buffer_name) is rw { return-rw %!buffer{$buffer_name}; }
moritz still not enough code to actually run it 15:37
dnmfarrell moritz: oh sure, the code is here github.com/dnmfarrell/Pod-Perl5/bl...TML.pm#L28 15:39
Maybe the hash access is returning a copy, or my assignment (my @buffer = self.get_buffer($buffer_name); @buffer.push: $pair;) is creating a copy ...
moritz dnmfarrell: and what's not working? 15:40
dnmfarrell %!buffer is not modified 15:41
moritz dnmfarrell: when you do what?
dnmfarrell add_to_buffer()
moritz oh 15:42
you probably want my @buffer := self.get_buffer($buffer_name);
because array assignment does a copy of the list on the RHS 15:43
dnmfarrell fg
oops wrong window :)
moritz or simply self.get_buffer($buffer_name).push($pair)
dnmfarrell fg 15:44
moritz: thanks, with self.get_buffer)$buffer_name).push($pair); I get: "Cannot call push(Parcel: Pair); none of these signatures match:" 15:45
ugh s/)/( 15:46
moritz so, is there actually an Array in %!buffer{$buffer_name}? 15:47
dnmfarrell it's initialized as (), so it could be empty 15:48
moritz so as a Parcel, not an Array
which would explain a lot 15:49
so, use an Array instead
dnmfarrell moritz: I really appreciate the help, thanks. I've changed the attribute to be has %!buffer = paragraph => Array.new(), _item => Array.new(); but it's not working: "Cannot call push(Parcel: Pair); none of these signatures match: ..." 15:55
moritz dnmfarrell: what does a say %!buffer{$buffer_name}.perl in get_buffer say? 15:56
dnmfarrell weird, the first few iterations it prints [], then [] with elements, but then later on $() 15:58
let me hunt for what's changing it
moritz: found it! clear_buffer was setting it back to () 15:59
moritz: thank you, sir!
dalek rl6-roast-data: 7381b5d | coke++ | / (9 files):
today (automated commit)
16:50
Heuristic branch merge: pushed 16 commits to perl6-examples by paultcochrane
jdv79 pmichaud: what robotics comp was it that you were a part of? 16:57
RabidGravy itz_, all good fun 17:00
boom 17:01
raiph .tell jepeway I've changed/extended my commentary at gist.github.com/cjepeway/42215154aff709d3efd7 17:27
yoleaux raiph: I'll pass your message to jepeway.
masak heh, just found this: bartoszmilewski.com/2014/10/28/cate...e-preface/ 17:36
not sure I've seen that resource before, and now it's on HN. curious coincidence. (I talked about a CT-for-programmers course today in the backlog.) 17:37
also, that guy in that header looks a lot like an older version of sorear.
dalek c: 4ede88c | (Steve Mynott)++ | lib/Language/ (2 files):
typos
17:39
vendethiel nice :) 17:40
masak , seeing a commit with the message "typos", instinctively goes "no no no! revert them" :P 17:45
FROGGS same here :o) 17:46
masak I think a commit "typos" maybe belongs in a branch "mistakes" 17:48
[ptc] the commit message is most certainly descriptive ;-) 17:52
andreoss m: Int(10).perl.say
camelia rakudo-moar bcf3f1: OUTPUT«10␤»
andreoss what is this called? 17:53
[ptc] andreoss: maybe you want something like Int(10).WHAT.say? 17:54
andreoss it's Int
[ptc] ... or maybe I've misunderstood the question
timotimo what is int called?
andreoss Class(something) 17:55
this
not Class.new(...)
timotimo type coercer
andreoss how do i handle it within class defenition? 17:56
itz_ :P 17:59
lucasb camelia \o/ :D 17:59
lucasb nqp: for [1,2,3] { say($_) } 17:59
hello? 18:00
camelia nqp-jvm: OUTPUT«(signal ABRT)*** Error in `java': double free or corruption (out): 0x00007f3d0401a8c0 ***␤*** Error in `java': double free or corruption (out): 0x00007f3d0401a8c0 ***␤» 18:00
..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 188.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Lost connection to server irc.freenode.org.␤» 18:01
..nqp-moarvm: OUTPUT«1␤2␤3␤»
lucasb I should have said nqp-m...
lucasb Anyway, NQP's "for" flattens, but now P6's "for" doesn't flatten. Is that confusing? 18:02
skids andreoss: Right now to make a coercer for one of your classes, define a 'method poscircumfix:<( )>' if that is what you are asking.
*postcircumfix 18:03
andreoss m: class X { method postcurcumfix:<()>(){say "hi"} }; X(); 18:05
camelia ( no output )
Ulti just opened a .pm6 file in Visual Studio Code and it got syntax highlighted!!! 18:06
andreoss m: class X { method postcurcumfix:<( )>(){say "hi"} }; X();
camelia ( no output )
itz_ ewwwww noone would use windows. would they? :)
Ulti VS Code is for OSX and Linux too 18:07
skids m: class X { method postcircumfix:<( )>(){say "hi"} }; X(); 18:08
camelia ( no output )
Ulti wow it really must have some understanding of the language too since %*LANG is highlighted as a variable
masak pro tip: do not call your class `X` -- `X::` is the namespace for exceptions in Perl 6. 18:09
skids m: class X { method postcircumfix:<( )> (|c) { say c.perl; say "hi" } }; X(4); # it gets cranky with no args. 18:10
camelia rakudo-moar bcf3f1: OUTPUT«\(4)␤hi␤»
itz_ "f you use the Fibonacci sequence for estimates your project will go slower because they are derived from a snail! " 18:11
andreoss what |c does here? 18:12
skids It means take the whole Parcel and do not do any args processing.
skids It used to be that Coercers had to be written that way, but IIRC that got changed. 18:13
raiph m: #`[DRY prepending] my $foo = '456'; my $bar = '789'; $foo [R~]= '123'; say :$foo ~ " (DRY prepend)"; $foo = '456'; '123' R[R~]= $foo; say :$foo ~ " (DRY RTL prepend)"; $foo = '456'; sub infix:<~=~>($a, $b is rw) { $b = $a ~ $b }; '123' ~=~ $foo ~=~ $bar; say :$foo ~ ' , ' ~ :$bar ~ " (DRY R2L multivar prepend)" 18:16
camelia rakudo-moar bcf3f1: OUTPUT«foo 123456 (DRY prepend)␤foo 123456 (DRY RTL prepend)␤foo 123456 , bar 123456789 (DRY R2L multivar prepend)␤»
skids raiph: you realize you said DRY four times there, right? :-) 18:18
andreoss Ulti: i'm using css-mode in emacs for p6, cause perl-mode get pointy blocks and regexpes wrong(css-mode doesn't know about them at all, but nicely indent curly braces) 18:19
indents 18:21
Ulti andreoss vim now has really really nice Perl6 support :P
andreoss out of the box? it doesn't hightlight any syntax for me 18:22
and the feature i need the most is indenting, syntax highlighing sometimes gives headackes 18:23
raiph skids: :)
raiph andreoss: you need to get latest (7.4 iirc) 18:24
andreoss i hope for perl6tidy soon
literal andreoss: work in progress (no indenting yet), but I recently started on github.com/hinrik/perl6-mode
FROGGS blog.nix.is/perl6.vim-gets-more-love/ 18:25
raiph andreoss: I think I'm wrong about 7.4. The link FROGGS gave is what I meant. 18:27
andreoss literal: it's 404 on MELPA 18:30
lucasb m: class A { method postcircumfix:<( )>(\x) { say 'hi' } }; A(Any.new) 18:31
camelia rakudo-moar bcf3f1: OUTPUT«hi␤»
lucasb m: class A { method postcircumfix:<( )>(\x) { say 'hi' } }; A(Any)
camelia ( no output )
FROGGS melpa.org/#/perl6-mode
andreoss: ^^
lucasb m: class A { method postcircumfix:<( )>(Any:U \x) { say 'hi' } }; A(Any) 18:31
camelia ( no output )
lucasb m: class A { method postcircumfix:<( )>(Any:U \x) { say 'hi' } }; A(Any.new)
camelia rakudo-moar bcf3f1: OUTPUT«Parameter 'x' requires a 'Any' type object, but an object instance was passed␤ in method postcircumfix:<( )> at /tmp/5w9Ik64rEw:1␤ in block <unit> at /tmp/5w9Ik64rEw:1␤␤»
lucasb m: class A { method postcircumfix:<( )>(Any:U \x) { say 'hi' } }; A.new()(Any)
camelia rakudo-moar bcf3f1: OUTPUT«hi␤»
literal andreoss: hm 18:32
FROGGS m: class A { method CALL-ME(Any:U \x) { say 'hi' } }; A.new()(Any)
camelia rakudo-moar bcf3f1: OUTPUT«hi␤»
andreoss FROGGS: i just did M-x package-install RET perl6-mode and it gave me 404
literal yeah I get an error too
lucasb It works with A.new()(Any), but doesn't work with A(Any) 18:33
FROGGS lucasb: A(Any) is the syntax for coercion 18:33
lucasb FROGGS: So it would never work, then? 18:34
FROGGS m: class A { method CALL-ME(*@) { say 'hi' } }; A.(Any) 18:36
camelia rakudo-moar bcf3f1: OUTPUT«hi␤»
FROGGS m: class A { method CALL-ME(*@a) { say @a.perl; say 'hi' } }; A.(Any)
camelia rakudo-moar bcf3f1: OUTPUT«[Any]<>␤hi␤»
lucasb m: class A { method postcircumfix:<( )>(Any:U \x) { say 'hi' } }; my $x; A($x)
camelia rakudo-moar bcf3f1: OUTPUT«hi␤»
lucasb Understood :)
FROGGS I hope that helps :o)
lucasb I can pass a variable that is undefined, but I can't pass a type object itself. 18:37
FROGGS correct
lucasb FROGGS: thanks!
FROGGS a literal TypeA(TypeB) is a coercer
vendethiel doesn't think "A(B)" reads easily (as in: which is type in, which is the type out)
FROGGS you pass in a B and get an A 18:38
literal andreoss: after fiddling for a bit, I no longer get an error about it and can't reproduce it... did you try (package-refresh-contents) ? 18:39
vendethiel I guess the "in" and "out" part can be used as a mnemonic
FROGGS when you see that A() is in fact A(Any) it also gets clear
aye
flussence makes sense to me, you just have to look at it like a function call - B is an input
andreoss literal: it works, thanks a lot
literal andreoss: it still doesn't highlight regexes/grammars/Pod/reduce-ops/hyper-ops/adverbs and some Q strings, but it gets most other things right 18:42
nine_ masak: category theory? sounds interesting! 18:47
yoleaux 28 Apr 2015 22:09Z <japhb> nine_: Please see irclog.perlgeek.de/perl6/2015-04-28#i_10520477 re: test failure during Inline::Perl5 install
lucasb A(B) is reverse to :a($b) :)
with A(B), you pass a B to get an A
lucasb with :a($b), you pass an :a, to get it bound to $b 18:47
brrt good UGT :-) 18:49
nine_ .tell japhb I'm sorry, I cannot reproduce the Inline::Perl5 test failure here with current rakudo 18:50
yoleaux nine_: I'll pass your message to japhb.
PerlJam lucasb: do you think they should be the same? 18:52
lucasb PerlJam: No, I was just making a joke comparison :) 18:53
m: sub f(Str(Int) :Int($Str)) { say $Str.perl }; f(Int => 10) 18:56
camelia rakudo-moar bcf3f1: OUTPUT«"10"␤»
brrt the end to end argument lives again: notcp.io/
PerlJam was going to ask if this was serios ... then he got to the "are you serious?" section 18:58
flussence misread the url as "not-cpio" and agreed with it for a few seconds 18:59
PerlJam flussence: heh! That's exactly how I read it at first :)
brrt lots of them good old spectest failures btw 19:00
flussence
.oO( I don't know why more people haven't adopted SCTP, it does a lot of the fancy stuff in http2 and even has a UDP-tunnelled mode as standard )
19:03
moritz flussence: probably because they have never heard of it :-) 19:07
brrt like me 19:08
skids The UDP support is new. Before that, pretty much nothing goes anywhere is it requires a large majority firewall admins to know the difference between a port and a protocol number. 19:09
s/is/if/
PerlJam
.oO( "The UDP support if new"?!? ;-)
flussence oh, that'd be why then... 19:11
brrt recently had a discussion with a VoIP company that didn't know to use UDP for SIP when targeting mobile
like.... as if mobile devices are a good target for TCP
raydiak skids: sorry about disappearing in the middle of our conversation yesterday; got a call, had another emergency come up with the ex's car :P 19:17
skids raydiak: np. jnthn++s Generative stuff was pretty interesting. 19:20
skids radiak: I'd have to work that model a bit to see how one would designate particular rules as normative, though, since lots of grammars have stuff to clean up minor infractions in them. 19:21
raydiak yeah I don't think you can probably get the clean sort of api which would be desired without a few extra little declarations and so forth for things like defaults 19:23
skids radiak: It might work really well for well defined binary data structures, though, once Buf ~~ comes to be. 19:24
raydiak and for e.g. declaring that things like /<uppercase-letter><any-letter>/ should be treated as a leaf node instead of continuing to descend into it's subrules for too-fine-grained params
RabidGravy would it be reasonable to compare "earliest" to "given" but specialized to channels? 19:25
raydiak skids: yes for binary it'd probably be very easy, but maybe sometimes so easy you don't need regexes any more :) 19:26
raydiak jnthn: what is so terrifying and incomprehensible about it? I have two or more shoddy prototypes laying around which solve the same problem to varying degrees. methinks people have funny ideas of good and bad...seemed more "obvious next step" than "terrifying" to me :) 19:30
raydiak often has the advantage of being too ignorant to be suitably terrified :) 19:31
masak we need volunteers at all levels of terrification capability :P 19:34
moritz is terrified of his own incompetence, and of those who do stuff much more critical than himself 19:36
not in the p6 community though :-)
masak are you saying the p6 community doesn't do critical stuff? :) 19:37
vendethiel I rejoice of my incompetence: stuff to learn, yay \o/
masak incompetence is merely the luminiferous ether for knowledge to proagate into.
or is that "aether"? or "æther"? 19:38
moritz masak: no, I'm saying that those doing critical stuff in p6 community don't strike me as incompetent 19:39
masak moritz: could simply be mass-delusional Dunning-Kruger :P
moritz masak: could be :-)
PerlJam moritz: apparently you don't consider yourself as doing "critical stuff in p6"? 19:40
masak .oO( "all other communities to critical and scary things! but not us! our things are only critical!" )
moritz PerlJam: not such much anymore
PerlJam: though now that you say it, it's kinda terrifying to be seen responsible for the single biggest doc effort in the community 19:41
and I was never really good at writing docs :/
PerlJam moritz++ dedication and commitment trump talent for many things. :) 19:42
masak moritz++ # a journey begins with a single step
flussence
.oO( writing docs is twice as hard as debugging the program they're for )
19:42
moritz m: say WHAT lol 1, 1 19:43
camelia rakudo-moar bcf3f1: OUTPUT«(LoL)␤»
raydiak
.oO( more terrified of people who *don't* have a health humility wrt their own ignorance, which *always* exists to some extent )
19:44
masak m: sub omg {}; say WHAT lol omg
camelia rakudo-moar bcf3f1: OUTPUT«(LoL)␤»
brrt does anyone know a good html syntax highlight utility? 19:44
flussence syntax highlighting *of* html, or for? 19:45
either way pygments is pretty nice...
moritz brrt: I tend to use vim through Text::VimColor for most of my hilighting needs
flussence that too :)
skids wouldn't that require a good html syntax to start with ... baddumpdump
flussence hey, html isn't bad as long as you pretend 90% of it doesn't exist :D 19:46
brrt no, i mean something which takes source, preferably in many different languages, and outputs html
moritz yes, pygments and Text::VimColor both give you that
m: .say for (1, 2), (3, 4) 19:47
camelia rakudo-moar bcf3f1: OUTPUT«1 2␤3 4␤»
moritz m: .say for lol (1, 2), (3, 4) 19:48
camelia rakudo-moar bcf3f1: OUTPUT«1 2␤3 4␤»
moritz what exactly do we need the LoL type for, now that iterating over a traditional list-of-lists doesn't flatten? 19:48
m: .say for lol (1, 2).list, (3, 4).list
camelia rakudo-moar bcf3f1: OUTPUT«1 2␤3 4␤»
PerlJam
.oO( for the LoLs )
19:49
moritz m: my @a = lol (1, 2), (3, 4); say @a.perl
camelia rakudo-moar bcf3f1: OUTPUT«[1, 2; 3, 4]<>␤»
moritz m: my @a = $(1, 2), $(3, 4); say @a.perl
camelia rakudo-moar bcf3f1: OUTPUT«[1, 2; 3, 4]<>␤»
moritz a function that itemizes the sublists would work just as well; no extra type required 19:50
lucasb m: say (->{} if True) 19:51
camelia rakudo-moar bcf3f1: OUTPUT«-> () { #`(Block|73688656) ... }␤»
lucasb m: say ({$^a} if True)
camelia rakudo-moar bcf3f1: OUTPUT«True␤»
lucasb Wasn't {$^a} supposed to be a block? 19:52
raydiak m: my @a := lol (1,2),(3,4); say @a.perl; @a := $(1,2),$(3,4); say @a.perl;
camelia rakudo-moar bcf3f1: OUTPUT«(1, 2; 3, 4)␤($(1, 2), $(3, 4))␤»
lucasb m: say ({$^a}(10) if True) 19:55
camelia rakudo-moar bcf3f1: OUTPUT«10␤»
lucasb m: say ({$^a,$^b} if True)
camelia rakudo-moar bcf3f1: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/xsiMwwd4_W:1␤␤»
lucasb m: say ({$^a} if 42) 19:56
camelia rakudo-moar bcf3f1: OUTPUT«42␤»
lucasb I think this is about a recent change, isn't it? If calls the block and passes the condition value to it. Is this correct?
* The "if" statement 19:57
masak lucasb: I'm surprised that block gets called
skids lucasb: yes.
m: say ( -> $a { $a } if 42)
camelia rakudo-moar bcf3f1: OUTPUT«-> ($a) { #`(Block|49176144) ... }␤»
vendethiel jnthn++ changed that yesterday IIRC, masak
skids m: say ( -> $a { $a.say } for 0..1 ) 20:00
camelia rakudo-moar bcf3f1: OUTPUT«0␤1␤True True␤»
beastd :q 20:01
wrong window...
skids The specs never really weighed in on the if form, but had an example with the for form, and it was decided for and if should behave consistently. But, it appears pointy blocks are not consistent yet. 20:02
jnthn The specs *do* weigh in; read S04.
skids I could not find an example in S04 using "if".
jnthn Read carefullier :P 20:03
design.perl6.org/S04.html#Statement...are_blocks near the bottom of that section :)
masak hugs beastd, good vim user :)
skids jnthn: ah good. 20:05
beastd masak: one of the most important programs to me ;D
masak yeah, vim is fantastic. 20:06
all you need to do to learn it is to view your keyboard as a Riemann surface of two keyboards, glued together :P 20:07
arnsholt Easier than growing an additional finger on each hand =p 20:08
japhb
.oO( The Six-Fingered Man prefers Emacs ...? )
yoleaux 18:50Z <nine_> japhb: I'm sorry, I cannot reproduce the Inline::Perl5 test failure here with current rakudo
japhb nine_: On further rebuilds, it appears to be a flaky fault. I don't get it every time. :-/ 20:09
Guess I should .tell him that ...
.tell nine_ On further rebuilds, the Inline::Perl5 test failure appears to be a flaky fault. I don't get it every time. :-/ 20:10
yoleaux japhb: I'll pass your message to nine_.
lucasb By the specs, the behavior is correct. I'll have to get used to it. 20:11
rjbs Is Flavio Glock (still?) around? 20:12
moritz rjbs: haven't seen him much in here in the last ~3 years
like, on a few single dasys 20:13
rjbs Okay.
moritz irclog.perlgeek.de/perl6/search/?ni...ock&q=
rjbs his "v6" dist on CPAN is indexed for the "If" package, which conflicts with the core "if" package
I'll talk to Andreas.
moritz you can also try to email him 20:14
rjbs nod 20:17
jnthn has another busy day and travel tomorrow 20:21
Will try to catch up on backlog...and got Friday free for Perl 6 things. :)
moritz \o/ 20:23
moritz has Friday free for family things 20:24
moritz it being a holiday in .de 20:25
masak has Friday free for taking to the streets and expressing his solidarity with the oppressed worker
lucasb Executing the block in "{ say $^x } for ^2" is ok by the specs, but "-> $x { say $x } for ^2" should not be executed, right?
masak lucasb: that sounds familiar, yes. 20:26
moritz finds that rather weird
masak it's anlogous to immediate blocks and pointy blocks on statement level 20:27
lucasb "->{} if condition" doesn't call the block, but "->{} for list" *calls* the block
masak m: { say "OH HAI" }; -> { say "OH BYE" }
camelia rakudo-moar bcf3f1: OUTPUT«OH HAI␤»
skids m: say ( { -> $a { $a.say } } for 0..1 ) # to be safe you could just do this 20:28
camelia rakudo-moar bcf3f1: OUTPUT«-> ($a) { #`(Block|48906672) ... } -> ($a) { #`(Block|48906736) ... }␤»
brrt afk 20:56
labster all of my modules are finally passing their own tests. tadzik++ for panda discovering a bug for me by using only numbers in work directory names. 21:00
labster m: False.Str.so.say #this bugs me a little 21:01
camelia rakudo-moar bcf3f1: OUTPUT«True␤»
arnsholt That way madness lies, though 21:04
(Assuming you don't want False.Str to be "")
We really (really, *really*) don't want ?"False" to be False
labster heh, I was the one who first committed "0" as True. 21:05
no, I was tempted to say False.Str should be "", but False.gist should still be "False". 21:06
or we could just say any string that begins with "fals" should be false, for internationalization reasons ("falso", "falsa", "falstaff", "false alarm") :P 21:08
arnsholt Hehe 21:09
Although False.Str being "" and .gist "False" might even be semi-plausible =)
nine_ japhb: I feared as much :/ Still cannot reproduce it though after several attempts 21:20
yoleaux 20:10Z <japhb> nine_: On further rebuilds, the Inline::Perl5 test failure appears to be a flaky fault. I don't get it every time. :-/
nine_ japhb: maybe dependent on some GC run at the wrong time
atweiden can a hash's index be type checked?
lizmat m: my %h{Int}; %h<a> # atweiden 21:29
camelia rakudo-moar bcf3f1: OUTPUT«Type check failed in binding key; expected 'Int' but got 'Str'␤ in method AT-KEY at src/gen/m-CORE.setting:12657␤ in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3721␤ in block <unit> at /tmp/a9wVygNrFP:1␤␤»
atweiden lizmat: ty 21:31
lizmat sometimes I wonder whether not all subs / methods in core should be 'is hidden-from-backtrace; 21:32
or at least, automatically removed from backtraces without --ll-exception 21:33
dalek kudo-star-daily: 207a2ea | coke++ | log/ (2 files):
today (automated commit)
21:35
lucasb Funny, hash type constraints are swapped: it's Hash[Value,Key], and not Hash[Key,Value]. Must be because of the existence of the single form Hash[Value] 21:35
lizmat yup 21:37
I think that's a reasonable assumption :-) 21:38
raydiak or maybe so that Hash[Type] is unsurprisingly consistent with Array[Type] 21:48
dalek kudo/nom: c102326 | lizmat++ | src/core/Backtrace.pm:
Make an evil hack a bit less evil
21:56
lizmat good night, #perl6! 22:15
thou moritz: thanks for bug report on Template::Mustache. It appears to be a bug in perl6, or changed behavior in exception handling. I'm not sure how to fix: github.com/softmoth/p6-Template-Mu...t-97302788 23:59
it doesn't fail on 2015.03 build, but does on current nom