Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-20

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 _nadim joined #perl6
00:07 spintronic joined #perl6
00:16 _nadim can someone please unban my normal nick?
00:45 nadim joined #perl6
00:50 timotimo i don't know what your normal nick is, but i also don't have permissions to do administration of #perl6
01:14 vendethiel joined #perl6
01:19 rodarmor joined #perl6
01:34 BenGoldberg joined #perl6
01:39 vendethiel joined #perl6
01:46 michaelvipub joined #perl6
01:55 Ben_Goldberg joined #perl6
02:01 kalkin-_ joined #perl6
02:24 jack_rabbit joined #perl6
02:26 vendethiel joined #perl6
02:49 FROGGS__ joined #perl6
02:59 kalkin- joined #perl6
03:02 colomon joined #perl6
03:09 sftp joined #perl6
03:19 sftp joined #perl6
03:22 perlawhirl joined #perl6
03:36 noganex_ joined #perl6
04:02 skids joined #perl6
04:11 perlawhirl joined #perl6
04:17 BrassLantern joined #perl6
04:17 BrassLantern left #perl6
04:21 colomon joined #perl6
04:35 kaare_ joined #perl6
04:38 perlawhirl joined #perl6
04:55 pdcawley joined #perl6
05:00 colomon joined #perl6
05:17 colomon joined #perl6
05:25 tmch joined #perl6
05:29 silug joined #perl6
05:54 Cabanossi joined #perl6
05:57 dalek DBIish/myGLR: 38fdc10 | (Salvador Ortiz)++ | lib/DBIish/CommonTesting.pm6:
05:57 dalek DBIish/myGLR: Remove remaining trailing zero
05:57 dalek DBIish/myGLR: review: https://github.com/perl6/DBIish/commit/38fdc10c51
05:57 dalek DBIish/myGLR: 19cbc75 | (Salvador Ortiz)++ | lib/DBDish/Pg/StatementHandle.pm6:
05:57 dalek DBIish/myGLR: Retab only
05:57 dalek DBIish/myGLR: review: https://github.com/perl6/DBIish/commit/19cbc75cd0
05:58 avalenn joined #perl6
06:06 jevin joined #perl6
06:18 kentnl joined #perl6
06:26 CIAvash joined #perl6
06:40 kent\n joined #perl6
06:47 silug joined #perl6
06:55 perlawhirl joined #perl6
06:56 colomon joined #perl6
07:04 labster joined #perl6
07:17 xinming joined #perl6
07:26 kentnl joined #perl6
07:28 perlawhirl joined #perl6
07:43 vendethiel joined #perl6
07:50 domidumont joined #perl6
07:55 domidumont joined #perl6
08:12 vendethiel joined #perl6
08:22 yqt joined #perl6
08:25 abaugher joined #perl6
08:30 espadrine_ joined #perl6
08:45 wamba joined #perl6
08:56 firstdayonthejob joined #perl6
09:00 vendethiel joined #perl6
09:07 rindolf joined #perl6
09:09 pmurias joined #perl6
09:11 Ven joined #perl6
09:25 rindolf Hi all, is there anything that can be done about the Perl 6 behaviour quirks mentioned in these quotes from a facebook thread - http://paste.debian.net/417281/ ?
09:26 rindolf Like - something I meant is not doing the right thing and the code runs but yields a wrong result.
09:28 teatime hrm, none of his examples seem very, well, convincing.
09:30 rindolf teatime: convincing?
09:30 rindolf teatime: and I am Shlomi Fish.
09:31 teatime ok, first, I know very little about Perl6, and haven't done Perl5 for several years.  So I'm probably wrong.  But, I'll say my bit anyway.
09:31 teatime ok the first example is “+{}” returns 0 instead of a hash reference.
09:32 teatime when would you ever actually do that?
09:32 rindolf teatime: I did it because I assumed it would be the same as Perl 5.
09:32 teatime why would you do that in perl5 ?
09:32 rindolf teatime: I wanted to disambiguate between a hash ref and a block.
09:33 rindolf teatime: to disambiguate between a hash ref and a block.
09:35 teatime fair enough, I see that's even recommended by perlref
09:35 Begi joined #perl6
09:36 teatime #3 seems to boil down to "the following operators do something different in perl6 than in other random languages including perl5, so when I paste code from other random languages into a perl6 file, it doesn't execute correct."
09:36 nine rindolf: they're not quirks in Perl 6 but quirks in Perl 5 that have been fixed
09:37 rindolf nine:
09:37 rindolf nine: I disagree.
09:39 rindolf nine: perl6 accepts and runs them fine, but they do the wrong thing and then you spend many minutes debugging.
09:39 teatime rindolf: I don't think you should expect random perl5 code to be valid, equivalent perl6 code.
09:39 teatime this doesn't even work very well for python2 -> python3, which are much more similar than perl5 and perl6.
09:40 rindolf teatime: I don't , but coming from Perl 5 , I find a lot of the Perl 6 I write or port to be errorprone and silently accepted.
09:41 rindolf Why would [+] (map ... ) evaluate the map in numeric/scalar context? Who would ever want to do that?
09:41 rindolf What good is +{ ... } returning 0?
09:42 rindolf At least it should err or warn on those.
09:42 teatime rindolf: it might have to read your mind?  to know you meant other than you wrote?
09:43 teatime in the general case, I mean.  you might could make a case in specific instances.
09:44 teatime like, a C example.  "if (a = b)" will generate a warning, because it's a common error, and almost never intended.  but the warnings you want, may fall into neither category?
09:44 arnsholt As regards prefix:<+>, it's the operator that converts to numeric. For hashes, IIRC, the numeric value of a hash is the number of entries in it
09:44 arnsholt m: my %x; %x<a> = 1; say +%x
09:44 camelia rakudo-moar 843741: OUTPUT«1␤»
09:44 arnsholt Thus, +{} is 0 since it's empty
09:44 RabidGravy joined #perl6
09:45 rindolf arnsholt: ok, I wish it was done in a more explicit manner.
09:45 arnsholt For #2, since adding flat helps, it sounds like a list semantics thing (which I haven't properly assimilated yet either)
09:50 tmch joined #perl6
09:54 nine rindolf: the numeric values of an array or hash is the number of their elements. Does that not make sense?
09:54 iH2O joined #perl6
09:56 rindolf nine: it does, but it can behave in a quirky manner.
09:56 iH2O left #perl6
09:57 rindolf Anyway, this discussion is going nowhere.
09:59 vendethiel joined #perl6
10:04 virtualsue joined #perl6
10:07 nine rindolf: I'd argue that Perl 6 would be less of a Perl if it didn't have shortcuts like +%h and required you to be more explicit (Zen of Python #2). Now having a numeric operator return a Hash was a straight forward mistake that made no sense at all in a language where operators determine the type of operation instead of variables.
10:08 nine So Perl 6 sticks much more to the spirit of Perl in this case than Perl 5.
10:12 rindolf nine: fine, I guess I'll have to accept that my Perl 6 code will be errorprone.
10:14 nine rindolf: it will only be if you take code from other languages and expect it to work just the same in Perl 6. That said, Perl 6 has helped me often with informative error messages when I accidentally used Perl 5 syntax. It just cannot catch every case.
10:16 masak antenoon, #perl6
10:16 rindolf masak: morning.
10:18 masak rindolf: just jumping into this conversation -- sorry about that -- but when you say "it does, but it can behave in a quirky manner", all I hear is "I'm not quite used to Perl 6's behavior here yet"
10:19 masak for both arrays and hashes (and other container-y types), prefix:<+> means the same as `.elems`. it's quite consistent and non-quirky
10:20 pmurias rindolf: is accidently numerifing Hashes a common error?
10:20 masak arguably, if you want to project container types down into a single scalar number, its *size* is a prime candidate for that number
10:20 masak a container type*
10:20 * masak is too tired to grammar
10:22 rindolf pmurias: well, it happened to me at least once and now I'll need to remember to avoid it.
10:23 * El_Che is reading rindolf's url
10:23 perlawhirl joined #perl6
10:26 pmurias rindolf: in Perl 5 you also have to avoid doing that
10:27 rindolf pmurias: like %one + %two?
10:27 TEttinger I'm in the process of ungolfing (in a way) a piece of java code. in another sense I can still golf it.
10:27 TEttinger Hello, World!
10:27 TEttinger {'$' << (',' ^ '-'), '`' | ('-' - '('), '$' << (',' ^ '-') | '$', '$' << (',' ^ '-') | '$', '\\' + '@', ',', ' ', '(' + '\\', '\\' + '@', '\\' + '\\', '$' << (',' ^ '-') | '$', '\\' + '\\', '!'};
10:28 TEttinger no alphanumerics used at all, still able to say Hello, World
10:28 rindolf TEttinger: this is Java?
10:28 TEttinger it does need new char[] before it
10:28 TEttinger yes
10:28 rindolf TEttinger: ah.
10:28 TEttinger most people don't know java allows bitwise ops on chars
10:28 rindolf TEttinger: maybe it treats characters as integers.
10:28 TEttinger the one unsigned integer type, yeah
10:28 rindolf TEttinger: this looks like obfuscation rather than golf.
10:29 TEttinger it can be golfed down
10:29 TEttinger many of these combinations may have better versions
10:29 pmurias rindolf: +%foo also doesn't warn in Perl 5, it's just that the chance that it fails silently is bit bigger
10:34 Guest11071 joined #perl6
10:36 mr-foobar joined #perl6
10:38 spider-mario joined #perl6
10:40 masak rindolf: ...but do you not agree that it's more consistent like this? because `+` means "numeric addition" as an infix, `~` means "string concatenation", so it makes sense that the prefix versions numify and stringify (respectively)
10:44 bakedb joined #perl6
10:45 masak ...have QAST::Compunit, want to recurse down it. what do I do? :)
10:46 rindolf masak: well, fine.
10:46 masak m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); say $foo.^name
10:46 camelia rakudo-moar 843741: OUTPUT«QAST::CompUnit␤»
10:46 masak rindolf: I really think it's a matter of getting used to it.
10:46 rindolf masak: OK, OK.
10:46 * masak stops nagging ;)
10:46 * rindolf is away - walk.
10:47 masak in the above, what does $foo have that lets me actually introspect the program?
10:47 masak I expected a .children or *something*
10:47 masak oh, QAST::CompUnit does QAST::Children, I see it now
10:48 masak so .list et al work
10:52 masak m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); multi hmm($node) {}; hmm($foo);
10:52 camelia rakudo-moar 843741: OUTPUT«X::Multi::NoMatch exception produced no message␤  in block <unit> at /tmp/uH6q_q9KtF line 1␤␤»
10:52 masak ^ this is a bit of a problem :)
10:52 masak m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); sub hmm($node) {}; hmm($foo);
10:52 camelia rakudo-moar 843741: OUTPUT«X::TypeCheck::Binding exception produced no message␤  in sub hmm at /tmp/gmqYXsvvCT line 1␤  in block <unit> at /tmp/gmqYXsvvCT line 1␤␤»
10:52 masak seems nqp-universe QAST nodes can't bind to Perl 6-universe routines
10:53 masak that... somewhat raises the bar required to do anything sensible with them
10:53 masak I've already got a (dirty, unwholesome) regex-based test in place in the 007 test suite. it's working fine, I guess. but help me replace it with a QAST-based one! :D
10:54 * masak goes about emulating a call stack the hard way
10:56 bjz joined #perl6
10:58 masak I have a feeling I'm the first one to do this.
10:58 masak ...which means I'm in the right place :)
10:58 * masak .oO( well, technically it's a necessary but not sufficient condition... )
11:02 masak ooh, $node.dump
11:02 darutoko joined #perl6
11:04 kid51 joined #perl6
11:08 pmurias masak: is there a plan to have the new ast format replace QAST or will it just be compiled to that?
11:09 masak pmurias: that's a biggish question.
11:10 masak pmurias: fortunately, I don't feel I have to provide an excellent answer to it until-and-unless it becomes clear that Q is the right choice not just for macros in Perl 6, but for Perl 6 AST handling as such.
11:10 masak I'm reading the QAST dump now... and I'll say this: it's looking good for Q :P
11:11 masak (I don't mean to disparage QAST. it's clearly doing vital work for Perl 6 compiler code manipulation/generation)
11:14 iH2O joined #perl6
11:17 pmurias there is a big difference between handling Perl 6 AST as a transformable representations of the program and using it as a processed form that's suitable for compiling
11:17 * RabidGravy wonders idly if making a grammar for "drum tabs" is worth it
11:19 masak pmurias: full ACK
11:19 masak pmurias: ...which, I guess, is the same thing as saying that there will be a place both for QAST and for Q
11:21 arnsholt masak: Regarding using NQP stuff in Perl 6, don't you need to make the arguments Mu?
11:22 arnsholt To the Perl 6 subs, that is. NQP things not being subtypes of Any
11:23 masak arnsholt: good tip.
11:23 * masak tries
11:24 masak m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); sub hmm(Mu $node) { say "this works!" }; hmm($foo);
11:24 camelia rakudo-moar 843741: OUTPUT«this works!␤»
11:24 masak arnsholt++ # nice!
11:24 arnsholt I think Perl 6 code I've seen that does NQP stuff also tends to bind the results of the operations
11:24 masak yeah, that'll simplify my life a bit
11:24 masak ok, good to know
11:24 arnsholt Probably some kind of interaction with containers, but not sure what
11:24 masak as far as I can see, I can't access *names* like `QAST::CompUnit`
11:25 masak but if I want to typecheck, I can always do something like `if $node.^name eq "QAST::CompUnit"` -- like a barbarian
11:25 arnsholt Hmmm, that's trickier
11:26 pmurias masak: there might also be a place for a QAST replacement that fully embraces it's role and is easily optimizable, full of stuff that helps compilations etc.
11:27 masak pmurias: sounds awesome.
11:27 masak pmurias: you're looking for another champion there though -- not me ;)
11:34 psch m: use QAST:from<NQP>; my $x = QAST::CompUnit.new
11:35 camelia rakudo-moar 843741: ( no output )
11:35 psch masak: ^^
11:36 arnsholt m: use QAST:from<NQP>; say QAST::CompUnit ~~ Any # I wonder...
11:36 camelia rakudo-moar 843741: OUTPUT«False␤»
11:36 psch and that's the dispatch failure form before :)
11:36 psch *from
11:37 arnsholt Yeah, I was just wondering whether NQP types could occur directly as types in Perl 6, or if they'd need some kind of bridge type to supply some additional operations needed by Perl 6
11:37 arnsholt From the looks of it, they can be used directly =)
11:38 psch m: use QAST:from<NQP>; QAST::CompUnit.^mro.say
11:38 camelia rakudo-moar 843741: OUTPUT«Method 'gist' not found for invocant of class 'QAST::CompUnit'␤  in block <unit> at /tmp/jpN354K3Ef line 1␤␤»
11:38 psch m: use QAST:from<NQP>; QAST::CompUnit.^mro>>.Str.say
11:38 camelia rakudo-moar 843741: OUTPUT«Method 'Str' not found for invocant of class 'QAST::CompUnit'␤  in block <unit> at /tmp/HC_JhX4N6N line 1␤␤»
11:38 psch m: use QAST:from<NQP>; QAST::CompUnit.^mro.elems.say
11:38 camelia rakudo-moar 843741: OUTPUT«3␤»
11:39 psch well, i suppose having .gist might be nice, but having them next to Any seems reasonable to me at least
11:39 psch if only 'cause it makes it obvious that something extraordinary is going on
11:40 arnsholt Oh, yeah, definitely
11:40 arnsholt Was just curious about implementation details, really =)
11:40 psch m: use QAST:from<NQP>; say QAST::CompUnit.^mro.map: { $_.HOW.name($_) } # hm, not even next to Any, really
11:40 camelia rakudo-moar 843741: OUTPUT«(QAST::CompUnit QAST::Node NQPMu)␤»
11:41 psch seeing as that's no Mu at the top there...
11:59 pmurias masak: It's very likely I will have to add a static analysis pass to rakudo-js to get decent performance, I do not plan to replace QAST but it should provide some insight
12:20 shinobicl joined #perl6
12:21 dalek rakudo-star-daily: dc17839 | coke++ | log/ (9 files):
12:21 dalek rakudo-star-daily: today (automated commit)
12:21 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/dc178390be
12:21 dalek rakudo-star-daily: 51d8e09 | coke++ | log/ (9 files):
12:21 dalek rakudo-star-daily: today (automated commit)
12:21 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/51d8e09b29
12:22 perlawhirl :q
12:24 shinobicl hi all!
12:24 shinobicl is there support for multidimensional arrays in perl6?
12:25 psch shinobicl: i suspect you mean multidimensional *shaped* arrays?
12:26 psch m: my @a = [],[]; dd @a # unlike this
12:26 camelia rakudo-moar 843741: OUTPUT«Array @a = [[], []]␤»
12:26 psch m: my @a[2;2]; dd @a # but like this
12:26 camelia rakudo-moar 843741: OUTPUT«Array.new(:shape(2, 2), [Any, Any], [Any, Any])␤»
12:27 michaelvipub joined #perl6
12:29 shinobicl m: my @sa = [1,2,3], ['A','B','C']; say @sa.perl ; say @sa[1][2];
12:29 camelia rakudo-moar 843741: OUTPUT«[[1, 2, 3], ["A", "B", "C"]]␤C␤»
12:31 psch hm, shaped arrays are less implemented than i though
12:31 psch t
12:32 shinobicl Why? It seems fine to me
12:32 psch m: my @a[2;2] = [1,2],[3,4]; say @a[0;*]
12:32 camelia rakudo-moar 843741: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/CkVEOucmFU line 1␤␤»
12:32 psch m: my @a[2;2] = [1,2],[3,4]; say @a[0;1]
12:32 camelia rakudo-moar 843741: OUTPUT«2␤»
12:32 psch that's why :)
12:33 psch m: my @a[2;2] = [1,2],[3,4]; say @a[0][1]
12:33 camelia rakudo-moar 843741: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/aT4zf3D9RT line 1␤␤»
12:33 shinobicl I am developing a "table class" (bi dimensional array), and i would like to use the same syntax to refer to a cell, something like this
12:34 shinobicl say  $table1['C'][3]
12:34 shinobicl i'm not sure how toimplement an operator like this, [] [] though
12:35 shinobicl or maybe ['C';3]
12:36 psch shinobicl: http://doc.perl6.org/language/subscripts#Methods_to_implement_for_positional_subscripting
12:36 shinobicl so far i am only using $table1.cell('C', 3), that seems good enough but if i can make it work in the same way perl6 habdles bidimensional arrays it would be much better
12:36 shinobicl wow! thanks!
12:39 perlawhirl joined #perl6
12:41 * perlawhirl thinks about accessing tables cells via quoteless letters with enums...
12:41 perlawhirl m: my @table = ['one','two'],['alpha','beta']; my enum <A B>; say @table[B;1]
12:41 camelia rakudo-moar 843741: OUTPUT«beta␤»
12:42 psch fwiw, if i needed something like that i'd probably just go with an HoA and sort the keys whenever i have to iterate... :)
12:42 perlawhirl that makes sense
12:43 psch although an enum is a very nice approach as well
12:43 perlawhirl yeah, but how to create a infinite enum of incrementing letters?
12:45 iH2O left #perl6
12:49 psch hm, true, i don't think lazy enums are a thing we do
12:50 perlawhirl hah, not well anyway... i just troed : my enum ('a' ... 'z') which wordked ok, but: my enum ('a' ... 'za') segfaulted the first time
12:50 perlawhirl worked the second time
12:50 psch uh
12:50 perlawhirl but yeah. 'a'...'zzz' generates a list find, but trying to make an enum out of it just sat there
12:50 RabidGravy gosh I hate regular expressions
12:51 psch m: say ('a'...'zzz').elems
12:51 camelia rakudo-moar 843741: OUTPUT«18278␤»
12:51 Begi joined #perl6
12:51 perlawhirl yeah the list form works no probs... but enum will timeout
12:51 perlawhirl m: my enum ('a' ... 'zzz')
12:51 camelia rakudo-moar 843741: ( no output )
12:51 perlawhirl o... k?
12:51 psch m: my enum ('a' ... 'zzz'); say abz
12:51 camelia rakudo-moar 843741: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jzjwXKgSih␤Two terms in a row␤at /tmp/jzjwXKgSih:1␤------> 3my enum ('a' ... 'zzz'); say7⏏5 abz␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        stat…»
12:52 psch RabidGravy: what's the problem?
12:52 RabidGravy regular expressions
12:52 psch ... i suppose i ran into that one :)
12:52 perlawhirl yeap
12:53 RabidGravy I just don't think my brane works that way
12:54 perlawhirl psch: by the way, repl just created the a...zzz enum, just took a few seconds, but yeah, it ain't lazy... anyway, moving on now
12:55 psch yeah, i don't think enum can be lazy, considering the keys are installed lexically
12:55 psch +s
12:57 perlawhirl m: my enum ('a' ... 'zzz'); my $n = 1 + abz; say $n;
12:57 camelia rakudo-moar 843741: OUTPUT«5===SORRY!5=== Error while compiling /tmp/meVloISDL5␤Two terms in a row␤at /tmp/meVloISDL5:1␤------> 3um ('a' ... 'zzz'); my $n = 1 + abz; say7⏏5 $n;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤…»
12:57 perlawhirl works in repl
13:10 Guest11071 m: say 'Test';
13:10 camelia rakudo-moar 843741: OUTPUT«Test␤»
13:12 Guest11071 Hello
13:13 Guest11071 Is it possible to run a short snippet of code from pastebin here?
13:13 Begi m: say "Hello Guest11071 !";
13:13 camelia rakudo-moar 843741: OUTPUT«Hello Guest11071 !␤»
13:13 psch Guest11071: gisthub works
13:13 Guest11071 First time using irc ever I'm afraid
13:13 psch well, gist.github.com i think the url is
13:14 kurahaupo joined #perl6
13:14 Guest11071 Ok, thx, have a snippet which segfaults at home and wanted to try it here
13:16 lizmat Guest11071: please do
13:16 Guest11071 m: https://gist.github.com/anonymous/d5d04065881b55c1618d
13:16 camelia rakudo-moar 843741: OUTPUT«360360␤»
13:17 psch star-m: https://gist.github.com/anonymous/d5d04065881b55c1618d
13:17 camelia star-m 2016.01: OUTPUT«360360␤»
13:17 psch oh, that's 2016.01 already
13:17 Guest11071 it fails at home, must be something wrong with my install I guess
13:17 psch hmm
13:18 Guest11071 did rakudobrew build moar yesterday
13:18 Begi What's your version Guest11071 ?
13:18 * psch is in the middle of a bisect...
13:18 Guest11071 This is Rakudo version 2016.02-189-g8437418 built on MoarVM version 2016.02-33-g1e3d2ac
13:18 psch m: say $*VM.version
13:18 camelia rakudo-moar 843741: OUTPUT«v2016.02.33.g.1.e.3.d.2.ac␤»
13:18 psch curious
13:19 psch as in, that's exactly the same version as camelia is running
13:19 lizmat Guest11071: fwiw, I can confirm the segfault
13:19 Guest11071 Phew, I was beginning to think I was wasting your time
13:20 psch Guest11071: what's your os?
13:20 lizmat Guest11071: looks like while (True) is to blame (at least for me)
13:20 lizmat Guest11071: if you replace this with loop {}, it works for me
13:20 Guest11071 Linux Mint 17.3 running in Virtual Box on W7
13:20 * lizmat suspects a JIT / spesh issue
13:20 Guest11071 Yes it starts to work for me when I remove the comment in the beginning
13:21 lizmat not for me
13:21 psch lizmat: disabling either works?
13:21 lizmat no,  :-(   so it's something else
13:21 psch :/
13:22 Guest11071 I was trying to develop a solution for Project Euler, problem 5
13:23 RabidGravy there, can parse a "drum tab"
13:24 lizmat Guest11071: fwiw, I would write the loop as "$a += 14 while (2..13).first(-> $x { !($a %% $x) });"
13:25 Guest11071 thx, I'll try it. Seemed like a good idea to start learning p6 by doing some Project Euler problems
13:26 lizmat Guest11071: thanks for reporting: core devs love easy reproducible segfaults
13:27 Guest11071 Thank you for helping me out, hope you'll be able to figure out what's wrong
13:29 Guest11071 psch++, lizmat++ # hope that's the correct lingo :-)
13:29 lizmat yeah, that's about it, Guest11071++  :-)
13:30 psch Guest11071: as lizmat says, segfaults are never a waste of time :)
13:30 psch ... well, alluded to at least vOv
13:30 Guest11071 i'll check the weechat manual and get a proper nick but dogbert was taken :(
13:53 domidumont joined #perl6
13:54 itaipu joined #perl6
13:59 RabidGravy LAWKS!
13:59 RabidGravy perl6++
14:05 RabidGravy so you may remember a while back I was wondering about the stability of the Supply.interval
14:05 RabidGravy well
14:05 RabidGravy http://rabidgravy.com:8000/stream
14:05 psch it's more stable than meg white live?
14:06 RabidGravy sequencing that live
14:06 psch amen brother :P
14:07 psch RabidGravy++
14:08 RabidGravy took longer to parse the drum tab than make the program ;-)
14:08 Begi m: ("Hello World !").grep: '!';
14:08 camelia rakudo-moar 843741: ( no output )
14:08 Begi m: (("Hello World !").split('')).grep: '!';
14:08 camelia rakudo-moar 843741: ( no output )
14:08 psch m: say "Hello World !".contains('!')
14:08 camelia rakudo-moar 843741: OUTPUT«True␤»
14:09 Begi Ahh, that's what I was looking for, thanks psch :
14:10 psch RabidGravy: now just bring the acid bass back, occassionally shuffle a few 8th or 4th of that drum beat around and presto, breakcore :)
14:11 RabidGravy quite a nice drum kit for the stock fluidsynth GM kit
14:14 psch sounds a bit heavy on the reverb for stock samples vOv
14:15 psch well, bisect finally finished...
14:15 psch apparently 93d597f40 broke the r-j build
14:16 RabidGravy it's the fluidsynth doing that
14:17 psch "Cannot do aggregate operation on a type object" it says, which seems to point at the nqp::join call in the patch...
14:17 RabidGravy that's "dry" now
14:18 psch RabidGravy: well, i've listened with headphones, so what sounds like "a bit heavy" might be perfectly fine for speaker-listening
14:18 RabidGravy all maximum velocity
14:20 psch no rim or deadnote sample in the kit?
14:20 psch i mean, low velocity on the deadnotes can work i guess, but...
14:21 lucs RabidGravy: Nasty 4/4 there :)
14:23 Ben_Goldberg joined #perl6
14:24 lucs Okay, same four bars repeating, not immediately obvious.
14:25 psch lucs: https://en.wikipedia.org/wiki/Amen_break
14:25 lucs Ah, nice.
14:28 telex joined #perl6
14:30 aborazmeh joined #perl6
14:30 aborazmeh joined #perl6
14:33 tokomer joined #perl6
14:52 awwaiid I'm still not getting what's going on here, so I'll renew my question...
14:52 awwaiid m: for <100 10_000 100_000> -> $batch { my $start = now; ((10..99) X (10..99)).map({$_[0] * $_[1]}).grep(-> $n { $n.Str eq $n.Str.flip }).sort[* - 1].say ; my $end = now; say "Batch $batch took { $end - $start } seconds" }
14:52 camelia rakudo-moar 843741: OUTPUT«9009␤Batch 100 took 0.1909047 seconds␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/Z8Bm3tjoGy line 1␤␤»
14:52 awwaiid It gets through the first iteration fine (prints out 9009 and the timing), but on the second iteration it says the seq is used up. which seq?
14:53 awwaiid actually I'll put this in a file and maybe it'll tell me which line it's talking about
14:53 arc__ joined #perl6
14:53 arcetera joined #perl6
14:54 psch m: for ^2 { ((10..99) X (10..99)).map( { $_ + 2 } ) }
14:54 camelia rakudo-moar 843741: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/jev26hJTlI line 1␤␤»
14:54 psch m: for ^2 { say [+] ((^5) X (^5)) }
14:54 camelia rakudo-moar 843741: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/9d9xKl4VVU line 1␤␤»
14:55 psch awwaiid: the Seq built by infix:<X>, apparently
14:55 awwaiid yep, I just got that from the breaking of lines
14:55 awwaiid interesting
14:55 arc__ joined #perl6
14:56 arcetera joined #perl6
14:56 awwaiid so is this wrong behavior? I expect it to construct that Seq from scratch on each iteration
14:57 psch m: for ^2 { ^5 .say }
14:57 camelia rakudo-moar 843741: OUTPUT«^5␤^5␤»
14:58 psch m: for ^2 { 0..4.say }
14:58 camelia rakudo-moar 843741: OUTPUT«WARNINGS for /tmp/2Y5I0bmw1X:␤Useless use of ".." in expression "0..4.say" in sink context (line 1)␤4␤4␤»
14:58 psch m: for ^2 { (0..4).say }
14:58 camelia rakudo-moar 843741: OUTPUT«0..4␤0..4␤»
14:58 psch hm
14:58 psch m: for ^2 { say (1..5).map: * }
14:58 camelia rakudo-moar 843741: OUTPUT«Cannot call map(Range: Whatever); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at /tmp/51yvD2JMrA line 1␤␤»
14:58 awwaiid I'm wondering how to construct a Seq minimally too
14:58 psch m: for ^2 { say (1..5).map: { $_ } }
14:58 camelia rakudo-moar 843741: OUTPUT«(1 2 3 4 5)␤(1 2 3 4 5)␤»
14:58 psch yeah, it's not the Range itself then
14:58 psch that's somewhat reassuring at least
14:59 psch awwaiid: fwiw, i don't think you'd want to recreate that, if it's the same in each iteration anyway
14:59 Begi m: my Str $a; say 42 unless $a.chars;
14:59 camelia rakudo-moar 843741: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/QNvn680Cm2 line 1␤42␤»
14:59 psch awwaiid: but that doesn't really help with it being somewhat unintuitive there
14:59 psch awwaiid: ... at least the error tells you what to do i suppose :)
14:59 Begi Why a warning ?
15:00 psch m: Str.chars
15:00 camelia rakudo-moar 843741: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/7v3FjKeCXG line 1␤»
15:00 Begi my $a = ''; say 42 unless $a.chars;
15:00 Begi m: my $a = ''; say 42 unless $a.chars;
15:00 camelia rakudo-moar 843741: OUTPUT«42␤»
15:00 awwaiid psch: well a seq is being lazily created, ya? so if I were bailing out of that loop early based on some detection, and then did it again based on another detection, I'd want it to start from the beginning and not fill up all my memory
15:01 psch awwaiid: how do you bail out of ($range X $range)?
15:01 Begi Is there a more idiomatic way to write this bit in Perl 6 ?
15:02 awwaiid psch: it'd be later in the seq chain, like in the grep
15:02 psch Begi: assuming you want "it's not the empty string and not a type object" you can use prefix:<?> or .Bool
15:03 psch m: my Str $a; my $b = ''; say 42 unless ?$a; say 43 unless $b.Bool
15:03 camelia rakudo-moar 843741: OUTPUT«42␤43␤»
15:03 awwaiid m: (^5 X ^5).map(* * 2).WHAT.say # sequences keep chaining
15:03 RabidGravy or just  my $a = ''; say 42 unless $a
15:03 camelia rakudo-moar 843741: OUTPUT«(Seq)␤»
15:03 Begi Yes, RabidGravy, it's what I've done
15:04 yqt joined #perl6
15:05 psch awwaiid: does that preclude you from using .cache, as the error suggests?
15:05 psch awwaiid: afaik, .cache doesn't eagerly evaluate the Seq, but just keeps the reified bits around instead of falling off the end
15:05 teatime So, I'm wanting to make a compact syntax for XCompose file generation; I was planning to do this with Python, so forgive that I'm about to link to Python syntax, but I'm interested how it might look in Perl and/or Perl6 (since these would likely be both more concise and more sensible for creating this DSL-like thing.)  Examples/syntax/functionality (very preliminary) at
15:05 teatime https://gist.github.com/pprince/f2c5879242d3d5ef1929
15:06 teatime (also, if you want to make suggestions about the syntax/features itself, *please do*)
15:07 awwaiid psch: I just don't know why you'd ever want (^5 X ^5) inside one iteration of a loop to be the same Seq on a second iteration. If I wanted that I should define it outside the loop
15:09 cognominal joined #perl6
15:09 psch awwaiid: fair enough.  in that case i suggest talking to someone who's firmer with Seq semantics than me :)
15:09 awwaiid m: for ^2 { my $n = 5; say [+] (^$n X ^$n) } ; for ^2 { say [+] (^5 X ^5) } # when we use a variable for the generator it forces it to be re-created on each iteration
15:09 camelia rakudo-moar 843741: OUTPUT«50␤50␤50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/OKykQ60rge line 1␤␤»
15:09 psch yeah, cause that could change
15:10 psch but an X between literal changes is constant folded i guess vOv
15:10 psch m: for ^2 { constant n = 5; say [+] (^n X ^n) }
15:10 camelia rakudo-moar 843741: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/GQkymz1Cdj line 1␤␤»
15:10 psch s/changes/Ranges/
15:11 Ben_Goldberg m: for ^2 { say [+] (^(+5) X ^(+5)) }
15:11 camelia rakudo-moar 1ad917: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/ZJWIOoB3P3 line 1␤␤»
15:11 Ben_Goldberg m: for ^2 { say [+] (^(($_-$_+5) X ^($_-$_+5)) }
15:11 camelia rakudo-moar 1ad917: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TiX41hp4fX␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/TiX41hp4fX:1␤------> 3^2 { say [+] (^(($_-$_+5) X ^($_-$_+5)) 7⏏5}␤    expecting any of:␤     …»
15:11 teatime I will flesh it out some more; maybe with more meat, people will be more interested.
15:11 Ben_Goldberg m: for ^2 { say [+] (^($_-$_+5) X ^($_-$_+5)) }
15:11 camelia rakudo-moar 1ad917: OUTPUT«50␤50␤»
15:12 awwaiid if I write them next to each other it doesn't see them as the same either
15:12 awwaiid m: say [+] (^5 X ^5) ; say [+] (^5 X ^5)
15:12 camelia rakudo-moar 1ad917: OUTPUT«50␤50␤»
15:13 psch m: say [X~] (<c C>, <o O>, <a>, <b B>)
15:13 camelia rakudo-moar 1ad917: OUTPUT«(coab coaB cOab cOaB Coab CoaB COab COaB)␤»
15:13 psch teatime: i don't really know why that needs a DSL, fwiw :)
15:13 teatime excellent
15:13 Ben_Goldberg It seems like some sort of over-aggressive constant inlining, to me.
15:13 teatime I figured that would exist.
15:13 psch i mean, "for the sake of it", maybe yeah
15:14 teatime like, is it my imagine, or does Perl6 seem literally perfect for this task
15:15 awwaiid psch: Ben_Goldberg: I guess I can open a rakudobug. I'll do that
15:15 teatime psch: What do I read to understand how your code works?
15:18 awwaiid psch: Ben_Goldberg: thank you both for noodling with me :)
15:20 psch teatime: the brackets are shorthand for reduce, X is CROSS-META and ~ is concatenation
15:20 psch teatime: i'm pretty sure those should be documented on http://doc.perl6.org
15:21 psch awwaiid: yeah, RT is a good idea, thanks
15:22 teatime psch: excellent, the reduce/concat is exactly what I needed.
15:22 teatime no clue what cross-meta is, but I shall figure it out.  much thanks.
15:22 psch teatime: i think it's actually called METAOP_CROSS...
15:23 teatime ahhh
15:25 Ben_Goldberg Welcome :)
15:29 Ben_Goldberg joined #perl6
15:35 sjoshi joined #perl6
15:44 khw joined #perl6
15:46 garu m: my Str $s; $s.chars.say
15:46 camelia rakudo-moar 1ad917: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/gOjV_8s_Ky line 1␤0␤»
15:47 zakharyas joined #perl6
15:47 garu shouldn't this output 0 without warnings?
15:49 psch m: Cool.chars
15:49 camelia rakudo-moar 1ad917: OUTPUT«Use of uninitialized value of type Cool in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/BBfhhJY7ly line 1␤»
15:50 psch way i see it:  any Cool type object that wants to be .chars'd needs to be turned into a Str first, and still is undefined then
15:50 psch that generates the warning
15:50 psch so Str::chars(Str:U:) also has to generate that warning
15:52 xinming joined #perl6
15:59 psch nqp-m: nqp::elems(nqp::what(nqp::list_s()))
15:59 camelia nqp-moarvm: ( no output )
15:59 psch $ ./nqp-j -e'nqp::elems(nqp::what(nqp::list_s))'
15:59 psch org.perl6.nqp.sixmodel.TypeObject$AggregateRTE: Cannot do aggregate operation on a type object
15:59 psch and *that* is why r-j doesn't build at the moment...
16:00 skids joined #perl6
16:01 * psch has to get used to having a dev channel...
16:03 awwaiid there's a dev channel?
16:03 psch yeah, #p6dev :)
16:03 psch for like a week or so i think..?
16:04 awwaiid ah right. With such a flexible and young language that can probably be tricky
16:04 psch ...having a dev channel?
16:05 awwaiid trying to keep them separate
16:05 psch oh, right
16:05 psch well, this one here is to be open for newbies and questions, which makes it hard to backlog for devs...
16:06 awwaiid yep
16:06 awwaiid makes total sense, and I like :)
16:06 RabidGravy yeah, the clutter of "How do I (do something that is blindlingly obvious to anyone who has looked at the source)" was getting too much at times
16:07 awwaiid ya
16:08 psch nqp-m: say(nqp::elems(nqp::what(nqp::list_s()))) # yay pointers
16:08 camelia nqp-moarvm: OUTPUT«-4294967287␤»
16:08 psch i almost want to maintain that nqp-j is doing the right thing...
16:09 psch anyway, moving that discussion... now
16:11 colomon joined #perl6
16:14 garu psch: sorry, I'm not sure I understood your analysis :X. I mean, according to the docs, .chars "Returns the number of characters in the string". If the string is uninitialized, wouldn't you say it has 0 chars? Or should I just suck it up and use .defined?
16:15 garu I mean, it *does* say it has 0 chars, but it also triggers the warning
16:15 garu maybe it should, I don't know - that's why I'm askig :D
16:15 garu asking, even
16:15 psch garu: yeah, the warning makes sense in my opinion, because Cool things that are not Str have to have .Str called first
16:16 psch garu: and an undefined Str being the only Cool type that *doesn't* warn is weirdly inconsistent
16:16 garu right. ok, thanks!
16:18 raiph joined #perl6
16:26 liztormato joined #perl6
16:31 RabidGravy also at a more stringy level, an empty string *is* different from an undefined string
16:40 virtualsue joined #perl6
16:57 mr-foobar joined #perl6
16:58 AlexDaniel joined #perl6
17:10 AlexDaniel RabidGravy: the first time I actually got to your stream without getting 404 and there's just silence! What a disappointment! :)
17:10 RabidGravy hahah
17:11 KotH joined #perl6
17:12 AlexDaniel RabidGravy: So you're streaming silence from Perl 6! That's not a big achievement, you know xD
17:16 RabidGravy there, fixed that
17:17 RabidGravy slightly different GM drum kit
17:17 ParsonsNose joined #perl6
17:18 RabidGravy well it would have been if I had connected the outputs
17:18 AlexDaniel :)
17:19 kaare__ joined #perl6
17:19 RabidGravy "it's coming out the headphones so it *must* be coming out the stream"
17:25 AlexDaniel RabidGravy: this is getting boring pretty fast :)
17:25 RabidGravy well it is only about thirty lines of code, and most of that is parsing the "drum tab"
17:28 psch RabidGravy: just add a chance to move back or forth 4 16th in line 87... :)
17:29 psch well, catching out of bounds too
17:29 mr-foobar joined #perl6
17:34 RabidGravy if I get distracted by making "interesting" music I'll never finish the module ;-)
17:34 psch fair enough :)
17:36 RabidGravy I may hook up the euclidean thing I used in Audio::Hydrogen a bit later when I've actually added the pod
17:39 raiph joined #perl6
17:42 raiph joined #perl6
17:44 molaf joined #perl6
17:49 virtualsue joined #perl6
17:50 virtualsue left #perl6
18:02 zakharyas joined #perl6
18:09 lsm-desktop joined #perl6
18:11 yqt joined #perl6
18:22 geekosaur joined #perl6
18:53 RabidGravy Until this moment in time I had actually forgotten that I have a bunch of http://www.roland.co.uk/products/um-3ex/ somewhere in the house
18:53 RabidGravy where "bunch" > 1 and < some unknown number
19:03 * masak .oO( 1 ^..^ * )
19:10 ducky_ joined #perl6
19:25 vendethiel masak: cute :)
19:25 teatime psch: I did a little more work:  https://gist.github.com/pprince/f2c5879242d3d5ef1929
19:25 ely-se joined #perl6
19:26 teatime psch: The idea of writing this to replace 8 lines of crap is fun:  Ã‚© ↤ ⎄⟪↕co⟫ ∪ ⎄(↕c)
19:26 teatime I'd have to write my own parser though, most likely.
19:33 Begi joined #perl6
19:35 psch m: sub prefix:<↕>(Str $s) { { @^a>>.uc X~ @a>>.lc }($s.comb) }; say ↕'co'
19:35 camelia rakudo-moar 5eaa15: OUTPUT«(Cc Co Oc Oo)␤»
19:35 lichtkind_ joined #perl6
19:37 teatime can you make it allow barewords?
19:37 * psch doesn't know what's neccessary in XCompose syntax
19:37 teatime like ↕co ?
19:37 psch nah, that probably not
19:37 psch i guess with macros you could there
19:37 teatime still, that's very very promising.
19:37 psch also i wouldn't know how to get every unicode symbol mean "this is the symbol i want to define"
19:37 psch as well as (presumably) print it
19:38 psch but if you can make the concession of an e.g. &define sub and not using barewords but literals you could implement it in p6 as-is, if i'm not missing something
19:38 teatime that wouldn't be necessary
19:39 psch making the concession wouldn't be neccessary..? :)
19:39 teatime hmm.
19:39 teatime no I was going to say the way I have <symbol> ↤ is not strictly necessary
19:39 psch oh
19:40 teatime one advantage though of the syntax example from the doc, is it uses all high Unicode chars for operators/delimeters/etc.
19:40 psch i'm imagining something like < define '©' ↤ ⎄⟪↕'co'⟫ ∪ ⎄(↕'c') > instead
19:40 teatime Compose sequences usually only contain ASCII chars, but they contain *all* of them
19:40 psch that should be doable right now
19:40 teatime so the fewer you would have to escape, big win
19:40 teatime ahhh
19:41 teatime yeah that's pretty reasonably beautiful, psch
19:41 psch and quotes you can already evade, with q[] or q{} for example
19:41 psch so no escaping for those either
19:41 psch eh, don't the leftarrow there actually
19:42 psch 'cause that's kinda what the define does
19:42 teatime with define you no longer need it
19:42 psch :)
19:44 teatime the idea was ⎄(↕'c') would become [['<Multi_key>', '<parenleft>', 'C', '<parenright>'], ['<Multi_key>', '<parenleft>', 'c', '<parenright>']], if that wasn't obvious.
19:44 teatime psch: does it seem insane to use this much unicode?  I don't really intent to try to convince anyone else to use the system, and the amount of typing it will save me is just, ginormous.
19:46 psch m: say (1,2,3) ∪ (6,7,8)
19:46 camelia rakudo-moar 5eaa15: OUTPUT«set(7, 8, 3, 1, 6, 2)␤»
19:46 psch teatime: i don't know about insane, but it's supported, so go wild..? :)
19:46 teatime hehe
19:50 cognominal joined #perl6
19:53 psch oh, no that wasn't obvious to me right then actually
19:54 psch so ⟪⟫ are the 'only inside these are the chars' and () are 'just another key to press'?
19:55 teatime psch: well actually ⟪⟫ was intended as 'create all combinations from these elements', and () were just literal '(' and ')'.  but I just made this up today, other chars can be used (if, e.g., ⟪⟫ conflicts with perl.)
19:56 psch teatime: no, it's more that () conflict
19:56 teatime psch: it can be '(' and ')' since we aren't doing barewords
19:56 psch right
19:57 teatime ⎄ is also a literal that stands for '<Multi_key>', but that's probably worth making work.
19:58 psch < define '©', ⎄ ⟪↕'co'⟫ ∪ ⎄ '(', ↕'c', ')' > # this is what i can actually see working, thinking more about it
19:58 psch but that's a bit eh too
19:58 teatime psch: you could probably so '(↕c)' and parse the string for certain chars :)
19:59 psch teatime: yeah, but then you're losing ↕ as an explicit operator
19:59 psch or having to do both, which would be silly :)
19:59 teatime yeah
19:59 psch hm, actually
20:00 psch ↕ '(c)' is fine isn't it?
20:00 teatime yeah, I suppose so
20:00 psch m: say '('.uc; say '('.lc
20:00 camelia rakudo-moar 5eaa15: OUTPUT«(␤(␤»
20:00 psch 'cause  Ã¢â€ â€¢ is just .uc and .lc both
20:00 teatime right
20:01 psch hm, but then you are reliant on ordering, which means that ⎄ ⟪↕'co'⟫  can't include '<Multi_key> <C> <O>'
20:01 psch err
20:01 teatime not necessarily
20:02 psch the o c variants i mean
20:02 teatime I haven't decided if ↕co should mean co,CO or co,cO,Co,CO
20:02 teatime and the order they get generated in, in either case, is not important
20:02 psch right, but your gist has it definitely mean at least one of oc and OC
20:02 teatime they can be a set
20:03 teatime psch: see the thing is, if you have a big expression
20:03 psch and that's what you'd have to give up with ↕ '(c)'
20:03 teatime psch: ↕'a' in the middle, should double the number of output sequences
20:03 psch 'cause that'd also mean )(c
20:03 teatime oh no
20:03 teatime no I'm pretty sure ↕ shouldn't permute/combine; we'd have a diff operator for that
20:04 timotimo RabidGravy: looking at rabidgravy.com gives me a 404 for soundcloud.com//stratus.js; maybe something's out of date there?
20:04 psch right, so ↕co can at most mean co,cO,Co,CO
20:04 teatime yeah
20:04 psch yeah, in that case my last suggestion should be workable
20:04 shadowpaste0 joined #perl6
20:04 RabidGravy timotimo, very probably, I'm useless with websites
20:04 timotimo hah
20:04 timotimo why is rabid gravy an alternative to music? :)
20:05 RabidGravy "noise with beats in", may or may not be music depending on your point of view ;-)
20:06 FROGGS my kids (age 1, 4 and 6) and me count that as music :o)
20:07 psch RabidGravy: fwiw, https://gist.github.com/peschwa/638df29b3f394cdf3cdf makes the amen examples lots more interesting, i find :P
20:07 FROGGS I mean, they know and love skrillex, that's worth something I guess
20:07 psch well, the lib change isn't for interesting, just for "work" :)
20:07 geekosaur one person's music is always another's noise :p
20:08 FROGGS aye
20:08 RabidGravy haha
20:09 RabidGravy psch, interesting, what platform are you on such that portmidi isn't versioned like that?
20:09 teatime psch: so, would you define ↕ as a prefix operator that returns, say, a set, and after the RHS has processed, your define() sub gets like, something that might be a list of lists and sets that might contain lists and sets etc.; and define() walks through that and flattens, doing permutations where it finds a set?
20:09 RabidGravy or did you build it yourself
20:09 teatime does that make sense?
20:09 psch RabidGravy: i'm on archlinux, the lib exists as libportmidi.so
20:10 RabidGravy weird
20:10 RabidGravy it's libportmidi.so.0 and libportmidi.so.0.217 here
20:11 RabidGravy maybe NC should do something like try it unversioned first and then try the versioned
20:12 timotimo i can make a website for you, but it'll cost ya. it'll be worth it, though. i know wicked cool tricks like making things look totally like 3d with <TABLE> and also how to make scroll bars with wicked-cool colors!
20:12 FROGGS timotimo: holy grail!
20:12 timotimo also until that new website is done, i can post a totally radical gif with an "under construction" sign that, like, spins and stuff!
20:13 psch teatime: yeah, that sounds like what i'd try to implement with the syntax
20:13 FROGGS timotimo: you can also do lots of good stuff with bgColor on tables!
20:13 RabidGravy I WANNA MARQUEE AND BLINK AND STUFFS!
20:13 psch teatime: note that &define would also get the unicode symbols itself as first char
20:13 timotimo i know, FROGGS! if i set the border to 0 i can make pictures with that! even without letting the user download my .jpgs!
20:13 FROGGS haha
20:14 timotimo BBIAB
20:14 FROGGS ALRIGHT!!11
20:15 masak SEE YOU LATER
20:16 * FROGGS will slam the door shut when he leaves
20:22 shadowpaste joined #perl6
20:22 teatime BTW, is the unicode data for Perl6 up to date with Unicode 8.0 ?
20:23 moritz teatime: yes
20:23 moritz from MoarVM's docs/Changelog, section New in 2015.07: "+ Updated to Unicode 8"
20:23 shadowpaste joined #perl6
20:25 shadowpaste joined #perl6
20:26 timotimo that's not up to date, that's like almost half a year old!
20:26 labster joined #perl6
20:27 azwieg103 joined #perl6
20:27 lizmat I don't think there's a newer version?
20:27 lizmat afaik, 9.0 is still in draft stage
20:27 masak nevertheless!
20:27 timotimo OK, so unicode isn't up to date
20:27 shadowpaste joined #perl6
20:27 timotimo lizmat: when i set MVM_SPESH_DISABLE=foo in the environment, i don't seem to be able to get that script to segfault
20:27 * moritz expects montly releases from Unicode!
20:27 masak is there some way we can update to Unicode 9 before the consortium? :P
20:28 timotimo clearly everyone who says unicode is "production ready" is lying
20:28 stmuk there is probably a pirate torrent of a the prespec
20:28 lizmat who needs unicode 9,, we want a 10!
20:29 timotimo yeah, if they were dumb enough to release unicode 9, people's code will break left and right because they are checking if the version starts-with 9 to figure out if it's the 95 or 98 version
20:29 lizmat $ MVM_SPESH_DISABLE=foo perl6 2
20:29 lizmat Segmentation fault: 11
20:29 lizmat (2 being the name of the script)
20:29 shadowpaste0 joined #perl6
20:30 lizmat timotimo: ^^^
20:30 * masak shudders at the memory of Unicode 95
20:30 timotimo how reliable is that crash?
20:31 lizmat timotimo: 10 out of 10 times for me
20:33 lizmat timotimo: afaics, it seems to be triggered by the (): take them away, and the problem goes away
20:33 lizmat timotimo: perhaps we should continue this on #p6dev ?
20:34 timotimo OK
20:40 * masak has a thing now which can traverse a whole QAST tree from a parse of a Perl 6 program
20:40 masak it doesn't do anything yet, though
20:42 moritz masak: is it installed as a compiler stage?
20:44 nowan joined #perl6
20:57 masak moritz: no -- I'm just running a Perl 6 script that begins with `use nqp;`
20:57 geraud joined #perl6
20:58 masak my proximal goal for this is to re-write a 007 test from regex-based to QAST-based
20:58 masak but I might also go the extra mile and publish a module that can traverse a Perl 6 program as QAST
20:58 masak we'll see :)
21:02 masak here's the regex-based version: https://github.com/masak/007/blob/0378d840d5849277ba6671d54e3a939728044e07/t/integration/finishblock.t
21:04 yqt joined #perl6
21:05 masak 'night, #perl6
21:05 lizmat gnight masak
21:06 tmch joined #perl6
21:09 census joined #perl6
21:10 census hi masak!  i'm still banned in #perl after all this time.  does #perl ever unban people?
21:12 * lizmat suggests asking the banners ?
21:13 census lizmat i have no clue who banned me but it was years ago
21:14 El_Che census: who did you kill?
21:14 census El_Che hahaha i can't even remember
21:15 census if we made it multiple choice i might remember
21:16 MilkmanDan joined #perl6
21:19 teatime is there a perl6 that has, like, readline-type functionality
21:19 teatime perl6 REPL I mean
21:20 lizmat $ perl6
21:20 lizmat should do it
21:20 awwaiid teatime: the built-in repl (just run 'perl6') has readline-type functionality if readline is installed, and linenoise if linenoise is installed (similar thing)
21:20 teatime hrm, ok
21:20 awwaiid teatime: failing that, try 'rlwrap perl6', though you'll have to get rlwrap
21:25 teatime OH!  By "installed", you meant via panda!  ?
21:26 timotimo that's right
21:26 teatime aha!
21:27 cpage joined #perl6
21:29 TEttinger joined #perl6
21:31 bjz joined #perl6
21:49 kentnl joined #perl6
22:03 BenGoldberg_ joined #perl6
22:05 cpage_ joined #perl6
22:15 lucasb joined #perl6
22:16 lucasb any chance to see the monthly release still today? :)
22:20 timotimo it's being worked on actively
22:20 timotimo er, i think
22:20 timotimo at least NQP already has its tag
22:20 vendethiel joined #perl6
22:21 lizmat as far as I'm concerned, I've fixed (worked around) the blocker
22:21 lucasb yep, nqp is already there
22:21 lucasb I'm just waiting for rakudo to build the 3 tarballs at once
22:22 lizmat lucasb: fwiw, there are still some hours in the day left for [Coke]  :-)
22:22 lucasb good :)
22:25 lucasb lizmat: sorry to bother you again with the Bool/defined issue, but don't you think type objects need to have the same behavior as instances? your second commit only changed the Bool(Mu:D) case.
22:29 lizmat Well, I liberally interpreted S02:4668: "Note that if you could instantiate a C<Mu> it would be considered defined, and thus true.  (It is not clear that this is allowed, however.)
22:29 synopsebot6 Link: http://design.perl6.org/S02.html#line_4668
22:30 lizmat so that a type object is intrinsically always False unless you create your own Bool method that says otherwise
22:32 lucasb yeah, it's confusing. thanks for taking a look at this, lizmat++
22:33 lucasb interesting that it is possible to instantiate a Mu
22:33 lizmat fwiw, I don't have a strong opinion about it: timotimo found .Bool being called a lot, so I saw an opportunity
22:33 lizmat m: dd IterationEnd
22:33 camelia rakudo-moar 1bbef9: OUTPUT«Mu.new␤»
22:33 lizmat :-)
22:35 lucasb oh, IterationEnd is a Mu instance. I didn't know that
22:35 lizmat meanwhile, there aren't that many hours left in my day, so I wish you all a good night!
22:35 lucasb good night
22:46 Vitrifur joined #perl6
22:57 timotimo hm, didn't we want to put IterationEnd outside of the core setting and into RakudoInternals?
23:01 lucasb there's no way to get a handle on IterationEnd in userland code? iirc, I think in Python and Ruby one can catch StopIteration in some circumstances
23:03 timotimo RabidGravy: i wonder if you've ever thought about making video game music
23:05 RabidGravy I made games for fun on the Amiga years ago and made the music :)
23:05 timotimo what do you mean?
23:06 timotimo having some packet loss between my laptop and my ssh server :\
23:07 RabidGravy music, games, done a bit in the past
23:07 RabidGravy but I actually really prefer to make music with real hardware these days
23:08 RabidGravy I'm just doing this other stuff *because I can* ;-)
23:19 timotimo fair enough :)
23:20 RabidGravy the thing with this MIDI stuff is that I am finding myself forced to document parts of MIDI itself
23:20 RabidGravy which is a bit tedious
23:20 timotimo i can imagine
23:21 teatime R
23:21 vendethiel joined #perl6
23:21 timotimo Arrrr?
23:23 teatime heh
23:23 teatime I am trying to make the irssi → weechat adjustment... it's painful at times.
23:23 Juerd teatime: Why?
23:23 teatime *shrug* boredom, and it does lots of neat stuff.
23:24 Juerd Why is it painful?
23:24 teatime oh
23:24 timotimo i prefer weechat, too
23:24 teatime it's very different in some ways, there are zillions of settings, and lots and lots of keybindings
23:24 timotimo did you see the user manual, though? it's pretty good
23:25 teatime yes..
23:25 teatime I haven't read it front-to-back
23:25 Juerd I've never tried weechat
23:25 teatime I probably should though it would save me time
23:25 timotimo it also lets you find out about some neat features here or there
23:25 Juerd The most painful thing, I imagine, would be to port all the irssi scripts I've come to depend on :)
23:25 teatime Juerd: a lot of the really popular ones have corresponding ones
23:26 Juerd Yea, but not all of my scripts got popular :P
23:26 teatime although they don't seem as featureful on average
23:26 teatime I haven't yet found a suitable awaylog :(
23:26 Juerd I recently made a new script to change s/^$nick: /$newnick: / when someone changes their nickname while I'm still composing a line to them.
23:27 Juerd That's the kind of silly stuff I have.
23:27 Juerd Not live saving things that everyone would want, but small stuff that makes me happy in the one or two times a year it actually does something useful.
23:28 havenwood joined #perl6
23:29 Juerd Oh, sorry. I meant s/^ $nick ':'/$newnick: // I think ;)
23:29 Juerd Without that 4th slash. Er, s:4th/'/'//;
23:34 AlexDaniel teatime: oh, it looks like you can type →arrows←! Welcome to the club! xD
23:34 teatime heh
23:35 teatime There is so much stuff in Unicode, I am having trouble fitting it all into my compose bindings.
23:35 AlexDaniel compose bindings? I have it all right on my keyboard!
23:36 AlexDaniel teatime: meanwhile, take a look at this: https://gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c
23:36 teatime I don't beleive you, because there's just not enough keys, even if you have like 4 groups defined.
23:36 teatime but I am working on a new layout, w/ AltGr/Level3 and probably also multiple groups
23:37 teatime that combined w/ Compose, should get me a lot further
23:37 AlexDaniel yep
23:37 AlexDaniel I figured that most of the stuff that I actually use can perfectly fit on my keyboard, so I just did that.
23:38 teatime I want to pay *some* attention to legacy key locations and compose bindings, however Unicode has grown sooo much that I think it makes sense to feel free to overwrite cruft.
23:39 dalek rakudo-star-daily: fb60b53 | coke++ | log/ (9 files):
23:39 dalek rakudo-star-daily: today (automated commit)
23:39 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/fb60b53a12
23:39 teatime I would say I want to make sure all of the APL symbols are particularly accessible, but a lot of them are dumb?
23:40 AlexDaniel ‘’ “” 「」 «» 〈〉 :)
23:41 * geekosaur tries to remember if there's a unicode symbol for O^HU^HT (abort program at quote-quad input)
23:41 Juerd Since we're on the topic of composing characters... is there a way to load an X Compose file without restarting X?
23:44 Hotkeys Juerd: I don't believe so
23:44 teatime you don't have to restart X
23:44 teatime just whatever client you want to recognize it
23:45 teatime although gtk is weird, you might have to restart the gtk im thingy
23:46 Juerd Ah, that's helpful :)
23:47 Hotkeys what does =~= do
23:47 Hotkeys m: say 3.1 =~= 3
23:47 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:47 Hotkeys m: say 3.1 =~= 3.0
23:47 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:48 AlexDaniel Hotkeys: ah you mean ≅
23:48 geekosaur equal within some epsilon, for floating point
23:49 AlexDaniel Hotkeys: it's for comparing floats
23:49 Hotkeys m: 3.001 =~= 3.0
23:49 camelia rakudo-moar 1bbef9: ( no output )
23:49 Hotkeys m: say 3.001 =~= 3.0
23:49 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:49 Hotkeys m: say 3.000000000000001 =~= 3.0
23:49 camelia rakudo-moar 1bbef9: OUTPUT«True␤»
23:50 geekosaur basiucally a workaround for floating point's least significant digits collecting errors
23:50 Hotkeys m: say 3.00001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.0000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.00000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 geekosaur if you add 0.1 10 times to 3 you expect to get 4, with IEEE floating point you may get 3.99999999999998 or sth
23:50 Hotkeys m: say 3.000000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.0000000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.00000000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:50 Hotkeys m: say 3.000000000001 =~= 3.0
23:50 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:51 Hotkeys m: say 3.00000000000001 =~= 3.0
23:51 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:51 Hotkeys m: say 3.000000000000001 =~= 3.0
23:51 camelia rakudo-moar 1bbef9: OUTPUT«True␤»
23:51 Hotkeys intersting
23:53 AlexDaniel m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y == 0.3
23:53 camelia rakudo-moar 1bbef9: OUTPUT«False␤»
23:53 AlexDaniel m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y ≅ 0.3
23:53 camelia rakudo-moar 1bbef9: OUTPUT«True␤»
23:53 Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y
23:53 camelia rakudo-moar 1bbef9: OUTPUT«0.3␤»
23:53 Hotkeys well now I
23:53 Hotkeys am confused
23:54 AlexDaniel m: ‘∨’.uniname.say
23:54 camelia rakudo-moar 1bbef9: OUTPUT«LOGICAL OR␤»
23:54 AlexDaniel m: ‘∧’.uniname.say
23:54 camelia rakudo-moar 1bbef9: OUTPUT«LOGICAL AND␤»
23:54 geekosaur say is doing .gist which simplifies it
23:54 Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; put $x + $y
23:54 camelia rakudo-moar 1bbef9: OUTPUT«0.3␤»
23:54 Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; say ($x + $y).perl
23:54 camelia rakudo-moar 1bbef9: OUTPUT«0.3e0␤»
23:55 geekosaur although... that, it's also clipped by the default format for exponential
23:58 RabidGravy anyway, I think I'm all documented out today
23:58 RabidGravy last bit tomorrow
23:58 RabidGravy toodles
23:59 AlexDaniel .u ‖
23:59 yoleaux U+2016 DOUBLE VERTICAL LINE [Po] (‖)
23:59 Juerd <Multi_key> <Left>       : "←"   leftarrow   # LEFTWARDS ARROW
23:59 Juerd etc.
23:59 Juerd Single key compose! (Well, two keys if you count compose itself)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo