Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-24

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 lizmat joined #perl6
00:10 cdg joined #perl6
00:19 grondilu seems to be related to a heredoc I had with lots of { and }
00:19 grondilu m: say "\{ foo bar \}"
00:19 camelia rakudo-moar 688dde: OUTPUT«{ foo bar }␤»
00:21 geekosaur wonder if found some unescaped ones, ran what was inside them and got something with newlines in it. I think there's known bugs with that?
00:26 kurahaupo joined #perl6
00:31 stmuk seen azawawi
00:33 geekosaur .seen azawawi
00:33 yoleaux I saw azawawi 22 Apr 2016 12:42Z in #perl6: <azawawi> .tell RabidGravy so basically depending on JSON::Fast does not install a newer version. panda install Test::META will fail because JSON::Marshall expects a newer JSON::Fast 0.4 than the older 0.3 that is installed with panda
00:37 stmuk ty
00:42 BenGoldberg joined #perl6
00:43 BenGoldberg Say, MadcapJake, I've a suggestion for your MyHTML code... NativeCall makes a 'size_t' type available, which you can use for setvbuf's third argument, and it's return type.
00:47 Lixquid joined #perl6
00:49 xtreak joined #perl6
00:52 MadcapJake BenGoldberg: thanks! Had a chance to try it out?
00:58 BenGoldberg Actally, no, it's just that I've got my browser set to always open up where I left off, and I'd been looking your code last night, so it was the first think I saw.
01:00 lizmat joined #perl6
01:24 BenGoldberg joined #perl6
01:25 molaf joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:51 cdg joined #perl6
01:54 xtreak joined #perl6
01:59 dalek star: fd4d41f | (Steve Mynott)++ | modules/MODULES.txt:
01:59 dalek star: uncomment file-which so its built
01:59 dalek star: review: https://github.com/rakudo/star/commit/fd4d41f975
02:02 stmuk_ joined #perl6
02:03 BenGoldberg joined #perl6
02:06 jcallen joined #perl6
02:12 kid511 joined #perl6
02:18 pierre_ joined #perl6
02:26 jeek joined #perl6
02:30 noganex_ joined #perl6
02:34 Herby_ any baseball fans around?  thinking about creating a simple module for the MLB GameDay data
02:34 Herby_ no OAUTH to mess with (which continues to stump me)
03:07 jcallen joined #perl6
03:20 pierre_ joined #perl6
03:25 kaare_ joined #perl6
03:26 pdcawley joined #perl6
03:27 yasnothil joined #perl6
03:34 Actualeyes joined #perl6
03:46 pierre_ joined #perl6
04:06 Cabanossi joined #perl6
04:08 Amnez777- joined #perl6
04:11 dalek perl6.org: e821ad3 | azawawi++ | README.md:
04:11 dalek perl6.org: Simplify local site testing instructions
04:11 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/e821ad3a8c
04:11 dalek perl6.org: ed4a4fd | azawawi++ | source/whatever/index.html:
04:11 dalek perl6.org: Separate whatever list items into related groups
04:11 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/ed4a4fd941
04:11 dalek perl6.org: cfc4043 | azawawi++ | source/whatever/index.html:
04:11 dalek perl6.org: Add an entry to Atom Perl 6 editor support
04:11 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/cfc404377f
04:11 dalek perl6.org: 841203e | azawawi++ | / (2 files):
04:11 dalek perl6.org: Merge pull request #47 from azawawi/master
04:11 dalek perl6.org:
04:11 dalek perl6.org: Update testing instructions + Tidy Whatever section + add atom perl 6 editor support link
04:11 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/841203e1c5
04:18 Amnez777 joined #perl6
04:23 AlexDaniel joined #perl6
04:55 khw joined #perl6
05:00 skids joined #perl6
05:05 Cabanossi joined #perl6
05:05 xtreak joined #perl6
05:10 djbkd joined #perl6
05:14 matiaslina joined #perl6
05:20 nige1 joined #perl6
05:25 azawawi joined #perl6
05:25 azawawi hi
05:25 yoleaux 22 Apr 2016 13:07Z <pmurias> azawawi: re Pointer[MyHTML] docs.perl6.org is wrong
05:38 teatime .u ℚ
05:38 yoleaux U+211A DOUBLE-STRUCK CAPITAL Q [Lu] (ℚ)
05:38 teatime u ℚ
05:38 teatime u: ℚ
05:39 pierre_ joined #perl6
06:09 pierre_ joined #perl6
06:13 joe__ joined #perl6
06:13 joe__ hi rakudo! I have install a rakudo-jvm yesterday. very intersting. It took me 10 second when I run perl-j -e 'say 123'. What is the correct way to run it? rakudo-jvm?
06:14 joe__ I run it in moar, 0.3 second
06:16 joe__ do you have any idea?
06:16 bartolin your command has to start the JVM first -- that takes most of the time
06:17 CIAvash joined #perl6
06:17 bartolin so, if you have a long running program, those startup will become less important
06:18 bartolin apart from that rakudo-moar is faster for most workloads (as far as I know). and rakudo-jvm has more known bugs and has yet to catch up rakudo-moar feature wise
06:20 joe__ hi, bartolin: how to do that? any tutorital for that? thanks.
06:21 bartolin sorry, what do you mean with "how to do that"? installing rakudo-moar?
06:25 bartolin oh, you probably referred to "start the JVM first". when you execute 'perl6-j -e ...' a jvm is started for you -- and that takes quite some time
06:25 joe__ hi bartolin, how to make perl-j startup faster
06:27 wamba joined #perl6
06:28 ufobat good morning guys :D
06:29 Amnez777 joined #perl6
06:29 bartolin hmm, I'm not sure about that. there should be a perl6-eval-server in your rakudo directory. we use that when running our testsuite. but I have not tried it to run other programs.
06:30 bartolin hi ufobat
06:30 joe__ I try a sub fibonacci, perl-j is slow than perl-m, 10 sec + x  >> 0.3 + y?
06:31 joe__ yes, i found that perl6-eval-server, but dont know how to? what is it?
06:33 domidumont joined #perl6
06:33 joe__ hi, bartolin, what is it? thanks.
06:34 jack_rabbit joined #perl6
06:35 wamba joined #perl6
06:35 bartolin joe__: as I said, I don't know the details. you can look at t/harness how it is used there (look for 'eval-' in the code)
06:36 bartolin sorry, maybe someone else can tell you more (probably later when more people are awake :-)
06:36 joe__ bartolin: thanks.
06:36 Ven joined #perl6
06:38 joe__ bartolin: thanks very much. bye.
06:38 Ven joined #perl6
06:38 domidumont joined #perl6
06:56 dolmen joined #perl6
07:00 rurban joined #perl6
07:20 azawawi joined #perl6
07:20 azawawi hi
07:20 azawawi stmuk_: ping
07:20 azawawi .seen RabidGravy
07:20 yoleaux I saw RabidGravy 23 Apr 2016 08:34Z in #perl6: <RabidGravy> anyway off out to the seaside, see y'all later
07:21 azawawi .tell RabidGravy 86 days longest streak... oh well :)
07:21 yoleaux azawawi: I'll pass your message to RabidGravy.
07:24 ufobat joined #perl6
07:31 darutoko joined #perl6
07:42 marcusramberg lizmat: asum! When is the next release due? :)
07:42 yoleaux 23 Apr 2016 10:37Z <lizmat> marcusramberg: looks like 48cc6b5 fixes your problem (RT #127968)
07:42 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127968
07:45 verzit joined #perl6
07:51 pierre_ joined #perl6
07:57 jjido joined #perl6
08:00 Relsak joined #perl6
08:09 firstdayonthejob joined #perl6
08:12 RabidGravy joined #perl6
08:20 psch waking up on sunday morning to a broken coffee machine is definitely quite high on my list of most annoying mornings /o\
08:21 leont joined #perl6
08:22 psch and it doesn't look fixable with my knowledge either.  i can only guess it's something internal to the heater that's broken vOv
08:24 [TuxCM] left #perl6
08:24 psch (read that as "the light in the switch still works and the cables all looked connected..." :P )
08:24 nine_ You can always make Greek coffee
08:25 lizmat_ joined #perl6
08:25 nine_ At least as long as you have some working heat source ;)
08:31 psch yeah, that was my plan, after the impulsive dis- and reassembly of the coffee machine :)
08:32 TEttinger psch: aeropress
08:34 TEttinger http://www.aerobie.com/product/aeropress/
08:34 psch yeah, i skimmed the wikipedia article
08:35 TEttinger it makes damn good coffee and pretty quickly
08:35 psch ...i don't have one of those. :)  it did remind me i do have an italian coffee pot though
08:35 TEttinger I think they sell them at lots of big stores like Target
08:35 psch which has a slightly lower chance of grounds in the cup than greek coffee
08:35 TEttinger oh yeah, these never gave me grounds in the cup
08:36 TEttinger I've since switched to no-doz-style caffeine in a pill
08:36 TEttinger had stomach trouble from coffee
08:39 TEttinger I think if I did the math, the amount of caffeine in one bottle of these is probably equal to all the caffeine in all the coffee a starbucks sells in a day http://www.amazon.com/Nutricost-Caffeine-Pills-200mg-Capsules/dp/B015P6QWFA/ref=sr_1_4_s_it
08:39 TEttinger probably the 500 pill bottle
08:44 psch 1k cups for a starbucks a day?
08:44 psch 'cause google says ~100mg per 8 fl oz cup coffee
08:44 psch i think that sounds a little low
08:45 psch but then i've only seen one starbucks in person locally, and never been inside one at all
08:45 TEttinger starbucks sells a lot of lattes
08:45 TEttinger which are probably a lot of milk and not a lot of coffee, though they allow lots of configuration
08:45 psch ohh, right.  that's a think, the slightly darkened milk with lots of sugar
08:46 TEttinger so it also probably depends on whether they get lots of morning business when people NEED WAKE UP NOW or whether it's later in the day for coffee-date stuff where overstimulation may be bad
08:47 TEttinger and there's the free wifi thing where people go in, buy the tiniest coffee imaginable, and stay for 4 hours of wifi when internet is down at home
09:01 dolmen joined #perl6
09:16 kurahaupo joined #perl6
09:39 pierre_ joined #perl6
09:43 leont joined #perl6
09:44 kurahaupo joined #perl6
09:58 roryrjb joined #perl6
09:59 rurban1 joined #perl6
10:02 masak smls: I finally had time to finish my implementation of the mini-challenge from day before yesterday: https://gist.github.com/masak/a4fa034eef9ee3c9e04a9f0b818c8ae6
10:02 dolmen joined #perl6
10:03 masak came out a bit different. I think I'm leaning more on protorules choosing control flow rather than analyzing $/ after the parse
10:03 masak also, I'm increasingly fond of the `make`-as-accumulator trick :)
10:04 masak also also, my first serious use of a MixHash, which seems optimal for this task
10:05 masak in that I have to write zero lines of code for "terms can cancel each other"
10:05 psch masak: any specific reason why $actions is an anon role?
10:06 masak psch: because "role" is shorter than "class"? :P
10:06 psch ahh, right, 'twas golfy
10:06 masak nah, not really
10:06 psch ...so just for the snarky response then? :P
10:06 masak when I choose between role and class and don't see any useful distinction, I tend to go with role
10:07 Ven joined #perl6
10:07 masak it's a bit of a political statement, I guess. roles are better than classes.
10:07 psch haha
10:09 psch "roles are better than classes" framed as a statement refering to politics actually made me laugh :)
10:10 tadzik hhaahah
10:10 psch as in, real world politics
10:13 masak I fear I made it more political than I intended... :)
10:24 Ven joined #perl6
10:25 lizmat .oO( let the rolevolution start! )
10:28 dogbert2 hi #perl6, anyone up for some documentation review/bashing?
10:28 grondilu talking about roles, earlier I wrote about how to make a class attribute for them.  Any thoughts?
10:29 grondilu m: role A[$classattrib] { method classattrib { $classattrib } }; say A[pi].classattrib
10:29 camelia rakudo-moar b95268: OUTPUT«3.14159265358979␤»
10:29 tadzik dogbert2: alwyas :)
10:29 dogbert2 have tried to write some docs for polymod here and need comments: https://gist.github.com/dogbert17/3135be4f816ec758fd1d294fbb551099
10:30 dogbert2 well, most of the text was 'stolen'
10:31 masak ...what *does* that plus sign mean? o.O
10:32 tadzik asking the right question :o
10:32 masak dogbert2: in my S32/Numeric, it's method polymod(*@mods)
10:34 tadzik ack the setting
10:34 dogbert2 the plus sign is in the code, i.e. src/core/Int.pm
10:34 dogbert2 I'll change the plus sign then :)
10:35 masak tadzik: heh, using "ack" as a verb really doesn't work so well, does it? :P
10:35 tadzik masak: it felt wrong :)
10:35 tadzik ...but not quite as wrong as my Getopt module :D
10:35 masak haha
10:36 tadzik thought now that I think of it, an argument-modifying type constraint may not be that bad of an idea in all cases
10:36 tadzik consider ($arg where s/foo/bar/) or so
10:37 masak so... what does `+@mods` mean...?
10:38 dogbert2 I guess I should know :(
10:38 tadzik I think we all should :o
10:38 masak m: sub foo(+@mods) { say @mods }; foo([1, 2, 3])
10:38 camelia rakudo-moar b95268: OUTPUT«[1 2 3]␤»
10:38 masak m: sub foo(+@mods) { say @mods }; foo([])
10:38 camelia rakudo-moar b95268: OUTPUT«[]␤»
10:39 masak hypothesis disproved: it does not mean "with more than 0 elements" :)
10:39 masak next hypothesis: TimToady wrote that code, and only he knows what it means, and he's not telling
10:40 dogbert2 sounds like a theory :)
10:40 masak hm, partly true
10:40 tadzik numified?
10:40 masak TimToady wrote the first version
10:40 masak lizmat++ changed it from *@mods to +@mods in 51bbf66a34ae8208e6aa8f76347579bd70c34748 as part of a "Late GLRification"
10:41 masak lizmat: what does the + in `+@mods` mean in a method signature?
10:41 lizmat single argument semantics ?
10:42 dogbert2 please elaborate
10:42 psch m: sub f(+@a) { say @a.perl }; sub g(*@a) { say @a.perl }; f [1, 2], 3; g [1,2], 3
10:42 camelia rakudo-moar b95268: OUTPUT«[[1, 2], 3]␤[1, 2, 3]␤»
10:42 masak ooh
10:42 lizmat m: sub a(+@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
10:42 camelia rakudo-moar b95268: OUTPUT«[1, 2, 3]␤[(1, 2, 3), (4, 5, 6)]␤»
10:43 psch m: sub f(**@a) { say @a.perl }; f [1,2],3
10:43 camelia rakudo-moar b95268: OUTPUT«[[1, 2], 3]␤»
10:43 lizmat m: sub a(@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
10:43 camelia rakudo-moar b95268: OUTPUT«(1, 2, 3)␤Too many positionals passed; expected 1 argument but got 2␤  in sub a at /tmp/mBFN3Om4Rx line 1␤  in block <unit> at /tmp/mBFN3Om4Rx line 1␤␤»
10:43 psch i know there's a difference there somewhere, but...
10:43 lizmat m: sub a(*@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
10:43 camelia rakudo-moar b95268: OUTPUT«[1, 2, 3]␤[1, 2, 3, 4, 5, 6]␤»
10:43 lizmat m: sub a(**@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
10:43 camelia rakudo-moar b95268: OUTPUT«[(1, 2, 3),]␤[(1, 2, 3), (4, 5, 6)]␤»
10:43 psch oh, **@a does the ((1,2,3),(4,5,6)) ca.. yeah
10:43 masak got it, thanks lizmat++
10:43 masak dogbert2: then I think the + should stay in the docs
10:44 tadzik cross-post from #qah: "please go +1 LeftPad so it makes the MetaCPAN weekly report: https://metacpan.org/release/LeftPad"
10:44 dogbert2 I will add it again, what about the rest?
10:45 dogbert2 lizmat++ for the explanation
10:46 dogbert2 the plus sign has now made a comeback :)
11:06 dalek doc: 4c2ea19 | (Jan-Olof Hendig)++ | doc/Type/Int.pod:
11:06 dalek doc: Added documentation for polymod
11:06 dalek doc: review: https://github.com/perl6/doc/commit/4c2ea19c43
11:07 neuron joined #perl6
11:07 neuron Hi
11:07 dogbert2 done, thx for reviewing and great explanations
11:07 neuron Is there a way to make object assume role in it's setup method?
11:08 neuron Something like "if my name is whatever, I'll also assume role of lawyer"
11:08 RabidGravy you mean runtime mixin?
11:08 yoleaux 07:21Z <azawawi> RabidGravy: 86 days longest streak... oh well :)
11:08 neuron Maybe, I have no clue what runtie mixin is :)
11:08 RabidGravy something like
11:09 neuron I know that I can assign the roles via "is mangled() is native('...')" etc.
11:09 neuron But I want to make the object detect that he needs "is mangled()" in it's setup method.
11:10 psch m: role R1 { }; role R2 { }; class A { method new { rand < .5 ?? self but R1 !! self but R2 } }; A.new.WHAT.say xx 5
11:10 camelia rakudo-moar 15a0dc: OUTPUT«(A+{R1})␤(A+{R1})␤(A+{R2})␤(A+{R2})␤(A+{R2})␤»
11:11 RabidGravy m: role A { method boo() { say "A" } }; role B {}; class C { has $.what;  submethod BUILD(:$!what) { given $!what { when 'A' { self does A }}}}; C.new(what => 'A').boo
11:11 neuron Aha, that looks promising!
11:11 camelia rakudo-moar 1034c6: OUTPUT«A␤»
11:11 grondilu m: role A {}; multi infix:<< <=> >>(A $a, A $b) { $a.flip <=> $b.flip }; say sort map {$_ but A}, ^16;
11:11 camelia rakudo-moar 1034c6: OUTPUT«(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)␤»
11:11 grondilu m: say sort *.flip, ^16
11:11 camelia rakudo-moar 1034c6: OUTPUT«(0 10 1 11 2 12 3 13 4 14 5 15 6 7 8 9)␤»
11:12 * grondilu was expecting the same output from those two programs
11:12 rurban joined #perl6
11:12 neuron psch: Many thanks, that's what I was looking for!
11:14 psch neuron: try and grasp RabidGravy++'s solution as well, they work differently well in different circumstances
11:14 grondilu m: role A {}; multi infix:<< <=> >>(A $a, A $b) { $a.flip <=> $b.flip }; say (2 but A) <=> (10 but A);
11:14 neuron psch, RabidGravy: I'm still chewing on that :)
11:14 camelia rakudo-moar 1034c6: OUTPUT«Ambiguous call to 'infix:«<=>»'; these signatures all match:␤:(Int:D \a, Int:D \b)␤:(A $a, A $b)␤  in block <unit> at /tmp/sq_zBh7gbP line 1␤␤»
11:14 wamba m: my @fibs = [], { @_ } ... *; say @fibs[^4];
11:14 camelia rakudo-moar 1034c6: OUTPUT«([] [[]] [[] [[]]] [[] [[]] [[] [[]]]])␤»
11:14 psch wamba: set fibs, neat :)
11:15 wamba m: my @numbers = [], { @_ } ... *; say @numbers[^4];
11:15 camelia rakudo-moar 1034c6: OUTPUT«([] [[]] [[] [[]]] [[] [[]] [[] [[]]]])␤»
11:16 psch ..right, N, not fibs
11:16 psch double stroke, of course
11:17 wamba m: perl6 -e 'my @numbers = set(), { set(@_) } ... *; say ^4 Z=> @numbers[^4];'
11:17 wamba
11:17 camelia rakudo-moar 1034c6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RAfg6qALW_␤Two terms in a row␤at /tmp/RAfg6qALW_:1␤------> 3perl6 -e7⏏5 'my @numbers = set(), { set(@_) } ... *␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
11:18 wamba m: my @numbers = set(), { set(@_) } ... *; say ^4 Z=> @numbers[^4];
11:18 camelia rakudo-moar 1034c6: OUTPUT«(0 => set() 1 => set(set()) 2 => set(set(), set(set())) 3 => set(set(), set(set()), set(set(), set(set()))))␤»
11:19 grondilu those are Church integers, aren't they?
11:19 grondilu oh not quite
11:19 wamba defining integers from Set theory
11:20 grondilu m: my @church = set(), { set($_) } ... *; say @church[5];
11:20 camelia rakudo-moar 1034c6: OUTPUT«set(set(set(set(set(set())))))␤»
11:20 neuron psch: Ah, 'but' creates new object. That's the difference I guess
11:20 neuron many thanks for help
11:21 psch neuron: it's not the only difference.  BUILD also gives you automagical attribute setting (with the right signature)
11:21 psch neuron: but yeah, you most likely want 'does', not 'but'
11:22 leont joined #perl6
11:23 grondilu I had a great math teacher who once began a course with "at the beginning there was the empty set.  And then God said : <<the set containing the empty set and only the empty set shall be called "one">>.  "
11:24 flaviusb joined #perl6
11:27 tadzik hm
11:27 tadzik m: if 0{} # is that expected?
11:27 camelia rakudo-moar 1034c6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jOQFMc6QNs␤Missing block␤at /tmp/jOQFMc6QNs:1␤------> 3if 0{} # is that expected?7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤»
11:28 _4d47 joined #perl6
11:29 grondilu I bet it is.  Otherwise they'd be no way to parse something like if $var{$key}  {...} without backtracing.
11:31 roryrjb joined #perl6
11:33 tadzik is it just me, or is --profile-filename not actually creating any files?
11:33 tadzik grondilu: ah, fair enough
11:35 wamba grondilu i found this, oficially name is Von Neumann definition of ordinals  https://en.wikipedia.org/wiki/Von_Neumann_ordinal, I did not know this name :)
11:40 grondilu well I'm not sure they are Church integers.  WP tells me church integers are made from lambda calculus.  I may have confused things.
11:40 _4d47 left #perl6
11:43 wamba joined #perl6
11:43 tadzik lizmat: ¯\_(ツ)_/¯
11:58 timotimo raydiak: it doesn't seem like you posted your results for removing the where clauses? did you measure yet?
12:05 wamba m: my @church = {$^a} xx *; say @church[3]("a")
12:05 camelia rakudo-moar 1034c6: OUTPUT«a␤»
12:06 wamba m: my @church = 1,{$^a} ... *; say @church[3]
12:06 camelia rakudo-moar 1034c6: OUTPUT«1␤»
12:07 wamba m: my @church = item({$^a}),{$^a} ... *; say @church[3]("a")
12:07 camelia rakudo-moar 1034c6: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/IyN1vZzWry line 1␤␤»
12:08 psch m: my @church = 1, { $^a xx $a } ... *; say @church[^3]
12:08 camelia rakudo-moar 1034c6: OUTPUT«(1 (1) ((1)))␤»
12:09 spider-mario joined #perl6
12:09 pierre_ joined #perl6
12:16 vlad___ joined #perl6
12:18 timotimo hey RabidGravy, are you here?
12:19 RabidGravy well, I'm on my sofa with an xchat window open :)
12:19 timotimo oh, neat
12:19 timotimo do you know of a program that'd let me play my keystation mini32 and have it split in the middle to have two or three extra octaves in between?
12:22 timotimo hm, QMidiRoute could potentially do it
12:25 RabidGravy yes it could, it's just a matter of adding or substracting 12 from the midi note number for the selected notes
12:26 RabidGravy or some multiple of 12
12:26 timotimo it looks like it can, but it's not packaged :)
12:26 wamba how  can i have function as element in ... (three dot) construction?
12:27 timotimo only the last thing in front of the ... is inspected for "is it a function? if yes, i'll use it to generate more"
12:27 timotimo if you have a function in your sequence, the sequence operator wouldn't know by itself how to continue the sequence by itself
12:27 timotimo so you'll need a function to generate the next element anyway
12:27 RabidGravy you could of course right your own using Audio::PortMIDI, however the latency is likely to be horrendous
12:28 RabidGravy write
12:28 timotimo heh.
12:28 wamba m: my $f={$^a};my @church = $f,{$^a} ... *; say @church[1](1)'
12:28 camelia rakudo-moar 1034c6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qTcRP9WS86␤Two terms in a row␤at /tmp/qTcRP9WS86:1␤------> 3urch = $f,{$^a} ... *; say @church[1](1)7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
12:28 synopsebot6 Link: http://design.perl6.org/S86.html#line_1
12:30 RabidGravy hahaha
12:30 timotimo m: my $f = {$^a}; my @church = $f, {$^a} ... *; say @church[1].(1)
12:30 camelia rakudo-moar 1034c6: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/bBNh8dT10t line 1␤␤»
12:30 RabidGravy timotimo, alternatively you could do it in PD
12:30 timotimo :o
12:30 jjido joined #perl6
12:31 timotimo kaconnect hasn't seen a release since 2004
12:35 wamba m:my $f={$^a};my @church = [$f],{$^a} ... *; say @church.map( *.[0]).[3](1)
12:35 wamba m: my $f={$^a};my @church = [$f],{$^a} ... *; say @church.map( *.[0]).[3](1)
12:35 camelia rakudo-moar 1034c6: OUTPUT«1␤»
12:36 timotimo the screenshot of the qmidiroute thing looks unlike anything i can find in the actual program
12:36 timotimo :|
12:37 verzit joined #perl6
12:39 RabidGravy I've just installed it and it looks look it will do exactly what you want really easily
12:39 RabidGravy it's packaged for planet ccrma BTW
12:40 hahainternet are there no lv2 midi filters that do the job?
12:40 hahainternet sorry to just come out of nowhere
12:40 hahainternet i just use Ardour and Jack for my audi screwy needs, but haven't done MIDI through it
12:40 RabidGravy there is an lv2 qmidiroute
12:40 hahainternet well i mean, if it's just to subtract the midi code
12:41 hahainternet you could find a passthrough lv2 and recompile in seconds
12:41 BenGoldberg joined #perl6
12:41 hahainternet anyhow just a thought, not of much use :)
12:42 RabidGravy yeah, infact the alsa sequencer example code has most of the stuff required to do this
12:43 RabidGravy it's not something I've ever worried about as I have a 62 note controller keyboard with built in split
12:50 leont joined #perl6
12:56 astj joined #perl6
12:56 hankache joined #perl6
12:57 hankache hola #perl6
12:57 hankache perl6intro is available now in Spanish http://es.perl6intro.com
12:58 hahainternet muchos gracias (i cannot speak spanish)
13:00 dalek star: 4f0d254 | (Steve Mynott)++ | tools/build/Makefile.in:
13:00 dalek star: add perl6 install path to panda bootstrap and module install
13:00 dalek star: review: https://github.com/rakudo/star/commit/4f0d254e3d
13:03 dalek star: 9d90b15 | (Steve Mynott)++ | modules/MODULES.txt:
13:03 dalek star: revert addition of File::Which to modules.txt since we see odd
13:03 dalek star: const_iX NYI error which resembles (fixed) RT #125480
13:03 dalek star: review: https://github.com/rakudo/star/commit/9d90b15990
13:03 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=125480
13:05 pierre_ joined #perl6
13:07 rindolf joined #perl6
13:09 dalek star: 16005de | (Steve Mynott)++ | modules/DBIish:
13:09 dalek star: Newer DBIish to get recent Windows fixes
13:09 dalek star: review: https://github.com/rakudo/star/commit/16005de8aa
13:09 dalek star: 34d06a4 | (Steve Mynott)++ | modules/doc:
13:09 dalek star: Newer p6 doc
13:09 dalek star: review: https://github.com/rakudo/star/commit/34d06a4aa8
13:11 stmuk_ timotimo: I notice you imported File::Which into star and wondered why
13:11 stmuk_ timotimo: also whether you saw issues with it
13:11 RabidGravy I think because it is a dependency of Shell::Command now
13:15 stmuk_ yes but it's embedded into panda already
13:17 timotimo stmuk_: i put it in and gave it a # i think
13:17 BenGoldberg joined #perl6
13:18 stmuk_ I uncommented it and saw a bizarre error :) see above
13:19 timotimo oh?
13:20 timotimo oh, "const_iX error" is when you didn't recompile rakudo after a moar changed its opcodes
13:21 timotimo causes opcodes to shuffle around and suddenly an operation with the wrong length is called and advances the "which opcode to run" into the already-defined-but-not-implemented const_i* ops
13:21 stmuk_ I'm sure thats not the case with this since I only had one moar installed
13:21 timotimo RabidGravy: where can i set up split in qmidirouter? i can't even get it to receive messages from my keyboard, but i assume that's what i need aconnect for?
13:22 stmuk_ maybe its triggered by multiple versions of a module being installed as well
13:23 RabidGravy timotimo, it's implemented as a note -> note map with the appropriate offset
13:23 Emeric joined #perl6
13:23 RabidGravy 'ang on I'll screenshot it for your
13:23 timotimo ah, the left hand side has a from-to thing
13:25 RabidGravy yeah, so on the left side "Event Input" you put the range of notes you want to alter and then on the RHS just put the offset, which may be some multiple of 12
13:25 timotimo omg it works
13:25 tadzik I'm thinking
13:25 tadzik maybe File::Which could be a runtime dependency of Shell::Command
13:26 tadzik since Shell::Command recommends it anyway
13:27 timotimo i'm hoping this piece i'm interested in playing won't need the same key for two octaves :)
13:27 tadzik it could just die with "Please install File::Which if you really need this to work"
13:27 timotimo yo tadzik, what kind of stuff do you play on your piano?
13:28 tadzik timotimo: various things. Recently going through a few of vk's metal covers
13:28 tadzik dunno if you're familiar
13:28 timotimo you play metal on your piano, eh?
13:28 tadzik https://www.youtube.com/watch?v=5nzeHoxAxag this for example
13:28 stmuk_ I'm also surprised about https://github.com/tadzik/Shell-Command/blob/master/lib/Shell/Command.pm#L85
13:28 tadzik yeah :)
13:29 stmuk_ that the linux solution doesnt apparently work on OS X
13:29 tadzik stmuk: about which part?
13:29 tadzik ah
13:29 tadzik I'm not entirely convinced which() belongs there at all
13:29 tadzik I wrote S::C so people don't constantly reimplement rm_rf
13:30 tadzik not for it to evolve into eventually supporting mount() or whatever
13:30 tadzik which() is not a very common thing you need
13:30 wamba m: my @church_a = [ {@_[1]} ],[ { &^a($^b) } ], -> [&c] {   [{ &c( &^a,  &^a( $^b ) ) }]  } ... *; my @church = @church_a.map: *.[0]; say @church[153]( * + 1,0 )
13:30 camelia rakudo-moar 1034c6: OUTPUT«153␤»
13:30 tadzik perhaps FS::Tools would be a more fitting module name in that case
13:30 stmuk_ I also noticed that which() returns Str whereas File::Which returns Any if not found
13:31 wamba grondilu: this is probably church numbers
13:31 tadzik Shell::Command at this point lacks focus and point, and I'll be entirely happy to rename my part to something more specific and have someone else claim S::C :)
13:31 wamba but can not do this without the map
13:31 * stmuk_ runs away :)
13:36 timotimo AFK
13:36 spider-mario joined #perl6
13:41 spider-mario joined #perl6
13:48 tokomer joined #perl6
13:49 astj_ joined #perl6
13:53 Ven joined #perl6
13:57 stmuk_ http://pl6anet.org/drop/rakudo-star-2016.04-RC2.tar.gz
13:58 ufobat i just discovered my $foo will leave { ... } and now i dont find where this is documented. does anyone know?
14:00 stmuk_ windows build report particularly welcomed since I dont current have a windows VM
14:00 lizmat ufobat: this appears to not have been documented yet, indeed
14:01 RabidGravy ufobat, http://doc.perl6.org/language/phasers
14:01 RabidGravy it is mentioned en passant
14:01 RabidGravy "Some of these phasers also have corresponding traits that can be set on variable"
14:02 ufobat but just in lowercase
14:02 RabidGravy yes
14:02 ufobat thanks :D i think thats enough for me to understand
14:03 tadzik timotimo: please poke me if you come back in a near future :)
14:03 kid51 joined #perl6
14:07 AlexDaniel He-he, stackoverflow is funny: “You earned a new privilege! Thanks to your efforts, you can Approve tag wiki edits”. Yeah, thanks, except that I haven't done anything in like 2.5 years.
14:08 AlexDaniel oh, it has been a bit less than that, actually
14:09 vendethiel AlexDaniel: you can receive rep passively ;)
14:09 AlexDaniel vendethiel: sure, but it does not make much sense…
14:09 vendethiel why not?
14:10 AlexDaniel vendethiel: because older users get more rep just because they created account earlier
14:10 vendethiel no, not like that. I mean that people can still upvote your answers while you're away
14:13 AlexDaniel Why? If I am away it means that I don't care about the votes.
14:14 vendethiel no it doesn't
14:14 vendethiel people still found your answers useful
14:15 AlexDaniel ¯\_(ツ)_/¯ whatever
14:16 tharkun joined #perl6
14:17 kerframil joined #perl6
14:17 AlexDaniel Well, not that I care about the votes at all. One of the reasons why I stopped contributing to stackoverflow was that I was surrounded by people who cared about points more than about the quality of their answers, it just doesn't feel right to be there. It is a great resource, yeah, but the system is kinda unhealthy.
14:17 pierre_ joined #perl6
14:18 geekosaur that's a large part of why I stopped too
14:21 yasnothil joined #perl6
14:24 dogbert2 AlexDaniel: https://doc.perl6.org/routine/polymod
14:24 AlexDaniel oh!
14:25 Relsak joined #perl6
14:25 dogbert2 Perhaps there should be more examples but we have to start somewhere :)
14:26 khw joined #perl6
14:26 AlexDaniel dogbert2: sure!
14:28 dogbert2 The most interesting part was the plus sign, confused the heck out of me :) 'method polymod(Int:D: +@mods)'
14:28 timotimo tadzik: i'm not sure i have the capability of coming back in a future
14:29 AlexDaniel dogbert2: what does it mean by the way?
14:29 dogbert2 lizmat has a great golfing course at 10:41 hours here
14:30 zakharyas joined #perl6
14:30 tadzik timotimo: not with that attitude :P
14:30 tadzik timotimo: but I have a question about the profiling json format
14:30 dogbert2 don't know if you see the same times that I do, but you can find it above
14:30 timotimo oh, ok
14:30 timotimo ask away
14:30 tadzik so the... things, it's strings for allocations and objects for calls?
14:30 lizmat m: sub a(@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
14:30 camelia rakudo-moar 1034c6: OUTPUT«(1, 2, 3)␤Too many positionals passed; expected 1 argument but got 2␤  in sub a at /tmp/6pGXfZ0w9e line 1␤  in block <unit> at /tmp/6pGXfZ0w9e line 1␤␤»
14:31 lizmat m: sub a(*@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
14:31 camelia rakudo-moar 1512da: OUTPUT«[1, 2, 3]␤[1, 2, 3, 4, 5, 6]␤»
14:31 timotimo i *think* it's just a serialized ID that's useful for anything you wish
14:31 lizmat m: sub a(+@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
14:31 camelia rakudo-moar 1512da: OUTPUT«[1, 2, 3]␤[(1, 2, 3), (4, 5, 6)]␤»
14:31 timotimo you'll never get the wrong thing by looking at the ID you've got somewhere
14:31 lizmat m: sub a(**@a) { dd @a }; a((1,2,3)); a((1,2,3),(4,5,6))
14:31 camelia rakudo-moar 1512da: OUTPUT«[(1, 2, 3),]␤[(1, 2, 3), (4, 5, 6)]␤»
14:31 dogbert2 lizmat++
14:35 AlexDaniel okay
14:36 timotimo tadzik: did you read my messages among the camelia output?
14:36 timotimo tadzik: but yeah, it's strings for one case and objects for another
14:36 tadzik right
14:36 tadzik I have now
14:37 dogbert2 AlexDaniel: I might even try to close https://github.com/perl6/doc/issues/426 ...
14:38 AlexDaniel dogbert2: so your example is basically splitting the number of seconds into seconds, minutes, hours and days
14:38 AlexDaniel dogbert2: what about making it clear?
14:38 AlexDaniel m: say 3600.polymod(60,60,24) Z <seconds minutes hours days>
14:38 camelia rakudo-moar 1512da: OUTPUT«((0 seconds) (0 minutes) (1 hours) (0 days))␤»
14:38 AlexDaniel something like this
14:39 spider-mario joined #perl6
14:40 dogbert2 nice, I could definitely change that, do you have more ?
14:40 AlexDaniel dogbert2: because, honestly, I never wondered what polymod does, so perhaps my impression is kinda valuable. I didn't really get what the example does until playing with your example a little bit.
14:41 dogbert2 consider you code added :)
14:41 dogbert2 *your
14:42 dogbert2 seem to remember seeing an example with base conversion somewhere
14:42 AlexDaniel dogbert2: another idea that I had in mind was “This textual explanation is pretty clear, but I still don't get it. What about some code that shows what it does?”
14:43 lizmat m: say :16("a")   # dogbert2
14:43 camelia rakudo-moar 1512da: OUTPUT«10␤»
14:43 lizmat m: say :16("a1")   # dogbert2
14:43 camelia rakudo-moar 1512da: OUTPUT«161␤»
14:44 RabidGravy ooof
14:44 AlexDaniel m: say 161.base: 16
14:44 camelia rakudo-moar 1512da: OUTPUT«A1␤»
14:44 dogbert2 lizmat, thx
14:44 RabidGravy I don't think I have ever needed to specify --std=c++11 to compile something
14:44 RabidGravy until just now
14:45 * leont has lived with --std=c++11 for a while now, and wouldn't ever want to look back
14:46 dogbert2 I'll see what I can do, chances are I'll be struck by writers block
14:46 AlexDaniel leont: look back! It is now the default in gcc
14:46 Ven joined #perl6
14:47 tadzik timotimo: uh. It seems that somewhere on the way, ids became strings too
14:48 tadzik that confused C++ a lot
14:48 timotimo ah, yes
14:48 timotimo annoying :(
14:48 * dogbert2 wondering if there are other methods sorely in need of at least some documentation
14:48 timotimo json doesn't like numbers as object keys
14:48 timotimo iirc
14:48 tadzik worst thing is, it works in *some* cases
14:49 tadzik for the Qt json parser
14:49 tadzik I traversed the "thngs" object, .toInt() gave me proper ints
14:49 tadzik I did the same for callgraph, .toInt() gave me zeroes
14:50 timotimo it'd be pretty amazing if you could get away from the qt json parser that we had been using
14:50 timotimo that's a fantastic cover you linked to
14:51 AlexDaniel m: my $x = 3600; for 60,60,24 { say $x mod $_; $x div= $_ }; say $x
14:51 camelia rakudo-moar 1512da: OUTPUT«0␤0␤1␤0␤»
14:51 AlexDaniel m: my $x = 3661; for 60,60,24 { say $x mod $_; $x div= $_ }; say $x
14:51 camelia rakudo-moar 1512da: OUTPUT«1␤1␤1␤0␤»
14:51 AlexDaniel dogbert2: perhaps something like this should be included? Like “Look, here's what it does!”
14:52 * dogbert2 notices that timotimo's --profile fix is available in moar-nom (cool)
14:52 dogbert2 AlexDaniel: nice I can add that
14:52 timotimo oh, yes, that!
14:53 tadzik alright, qt profiler now works again :)
14:53 timotimo excellent!!
14:54 tadzik wasn't nearly as painful as I tohught it'd be
14:54 timotimo do you think we could build a mode that reads in the html file and does the correct conversion for the quoted-inside-a-quote transformation the profiler does when it outputs html?
14:54 tadzik and it did help that I made my code look as closely as possible as the JS version
14:54 AlexDaniel dogbert2: but yeah, feel free to close the issue :)
14:54 AlexDaniel dogbert2++
14:55 tadzik timotimo: I was planning that, but I noticed that rakudo can already output the bare JSON
14:55 dogbert2 AlexDaniel: thx, I closed another of your issues a couple of days ago, lack of printf docs
14:55 tadzik but perhaps it could also be made to work with HTMLs, so you can fallback to the qt profiler without re-profiling
14:55 timotimo yes!
14:55 AlexDaniel dogbert2: yeah, I remember that!
14:55 timotimo often you only notice you need to use the qt-profiler after the html already blew up
14:55 timotimo but you may not want to re-run
14:55 tadzik right
14:56 tadzik it sounds super annoying to do on the C++ side though
14:56 tadzik maybe I'll just write a p6 script
14:56 _mg_ joined #perl6
14:57 kurahaupo joined #perl6
14:57 tadzik oh, it helps that it's always one line.. >:)
14:57 pierre_ joined #perl6
14:57 timotimo yeah, you can take all lines and just change the longest one :D
14:58 dogbert2 AlexDaniel: perhaps me closing your report isn't the correct workflow
14:58 tadzik since I already depend on what rakudo produces, I may as well grab line 708 and cut a couple...,yes :D
14:58 timotimo it'll almost 100% always be that. only if the profiler result was empty it wouldn't be
14:58 AlexDaniel dogbert2: I agree
14:58 AlexDaniel dogbert2: ok
14:58 timotimo how well do you play those piano covers so far, tadzik?
14:58 dogbert2 AlexDaniel: should I have left a comment instead?
14:58 tadzik catching 'var rawData = JSON.parse' can't go much wrong though
14:58 timotimo i've only just started with piano playing, so going two-handed still trips me up something fierce
14:58 tadzik timotimo: not very well
14:58 timotimo yeah
14:58 AlexDaniel dogbert2: yeah, that's the right way to do it I guess
14:59 tadzik going two-handed is tricky, I often practice hands separately and only then join them
14:59 dogbert2 AlexDaniel: then I have learned something, hope I didn't piss you off to much, my bad
14:59 tadzik that's how they taught me in music school too, so it's probably not that stupid
15:00 timotimo OK
15:00 AlexDaniel dogbert2: personally I don't like when people close the issue right after commiting something, very frequently the issue is not solved completely and reopening is a very tough thing to do. So I agree that the right way to do it is to wait until someone reviews it (either the author or somebody else) and feels inclined to close it.
15:01 AlexDaniel dogbert2: but in reality it does not matter that much while you are still working on the docs and it doesn't get in your way, that's what really matters. You're doing a great job
15:02 dogbert2 AlexDaniel: thx for the compliment, I'll settle with adding a comment to bugs from now on :)
15:05 MadcapJake in Windows how are versions codified into folder names?
15:06 MadcapJake Can a period be in a folder name, on Windows?
15:08 MadcapJake iirc, they can.
15:09 geekosaur you can have at least one period. I *think* it's safe to assume more than one supported these days
15:13 ugexe windows is difficult because the underlying file system will let you do things that explorer wont (like create files with ? in the name)
15:16 tadzik timotimo: https://github.com/tadzik/p6profiler-qt/commit/5980f657b0e613269d97334eea723933e2ae611b seems to work :)
15:16 mst MadcapJake: just made one, so yes.
15:16 mst ok, I did it via 'mkdir /cygdrive/c/foo.bar.az' but it totally worked fine in explorer after
15:16 MadcapJake cool, thanks!
15:17 timotimo tadzik: how does that work? the json string inside the thing contains escaped " and such
15:17 timotimo and probably also escaped \
15:18 tadzik timotimo: it doesn't :)
15:18 timotimo ah!
15:18 mst libuv has a unix domain socket and/or win32 named pipe abstraction, is that exposed anywhere?
15:18 tadzik but you scared me for a moment :P
15:22 zakharyas joined #perl6
15:23 lizmat mst: probably better asked on #moarvm or #p6dev
15:24 timotimo it doesn't? what doesn't?
15:25 tadzik timotimo: it probably helps that the json has ", not '
15:26 tadzik not sure how would escaping work, but from what I saw in the code that emits that file, it just blindly dumps it inside
15:26 timotimo tadzik: https://github.com/perl6/nqp/blob/master/src/vm/moar/HLL/Backend.nqp#L88
15:26 tadzik oh
15:27 tadzik yeah, that might break
15:28 timotimo :)
15:28 timotimo told ya
15:33 tadzik timotimo: so what are you playing on the piano?
15:34 timotimo i've started learning "popcorn" :P
15:34 timotimo but only the right-hand part
15:34 timotimo the left-hand part is ridiculously fast compared to what i could feasibly do
15:34 timotimo i'd love to be able to play the crashed frigate from metroid prime; know that one?
15:35 MadcapJake is there a way to check if a version is "absolute"
15:37 tadzik I don't think I heard it
15:39 timotimo it's a great tune
15:39 MadcapJake m: my $v = v1.1.*; say any($v.parts) ~~ Whatever; # this works
15:39 camelia rakudo-moar 1512da: OUTPUT«True␤»
15:40 tadzik I still haven't come up with the right-hand part of The Wight To Remain
15:40 tadzik the melodic part is taxing enough for me still :P
15:40 lizmat MadcapJake: check #p6dev for that discussion
15:40 timotimo oh lord
15:40 timotimo the wight to remain is also quite fast, isn't it?
15:41 tadzik it is
15:41 tadzik well, quite, not very :)
15:41 MadcapJake lizmat: haha that is quite the coincidence :)
15:41 tadzik not flight of the bumblebee fast
15:41 timotimo hah!
15:41 timotimo i'd love to play that melody
15:42 tadzik I can probably write you down the notes
15:42 timotimo https://flat.io/score/5655eabe38a4bf457a67b7cd-the-wight-to-remain-4-3 - i can steal this
15:43 tadzik I play in a different tune, but it sound similar when I hum it :)
15:44 timotimo in a different tune?
15:44 timotimo a different key, you mean?
15:44 tadzik for the purpose of learning that I pretended that internet doesn't exist
15:44 tadzik yes, key, thnk you
15:44 tadzik "w innej tonacji" :P
15:44 timotimo "eine andere tonart"
15:44 timotimo i can't read notes well yet :(
15:46 cdg joined #perl6
15:46 cdg joined #perl6
15:47 tadzik I still take a pencil and write down what they are near the "funny ones" :)
15:47 timotimo oh?
15:47 timotimo well, to be fair, i also don't grok what name maps to which key
15:47 timotimo except i know where the C goes
15:47 tadzik well, it's like, I know where D is, and what D note looks like
15:47 timotimo but the regular clef shows the position of the G
15:48 tadzik I also know where D''' is, but I don't immediately recognize the D''' note
15:48 timotimo how many ' are on the G that the clef has circled?
15:49 RabidGravy II just got mmy little e-mu keyboard out for the first time in ages and the keys have gone quite weird colour, like hundred year old ivory rather than ten year old plastic
15:49 timotimo :D
15:49 tadzik er, I don't remember :P
15:49 timotimo wow
15:49 tadzik I think it's one ' for the "standard" octave
15:50 timotimo OK
15:50 psch C' is C5
15:50 RabidGravy and trying to compile two large c++ programs at the same time doesn't help the typing latency
15:50 psch C4 is the middle C on an 88 key piano
15:50 tadzik yeah, that's what my editor shows
15:50 timotimo ah, it's G4
15:50 tadzik ' and , are the lilypond notation marks
15:51 timotimo oh fuck, that line of shit music has # next to the clef
15:52 timotimo >:(
15:52 psch :O
15:52 timotimo why do people do that? effing crap
15:52 timotimo sheet music*
15:52 psch lol
15:52 spider-mario joined #perl6
15:52 psch pretty sure it's ♯ not # ;)
15:52 * psch .oO( this note line commented out )
15:53 tadzik :D
15:53 timotimo that would be equally mean
15:53 tadzik timotimo: you can probably get some tool to transform that to C for you :P
15:53 moritz ... or C++ :-)
15:53 tadzik C-major, not the... right:P
15:56 timotimo why would you ever write Esharp? isn't that equivalent to F anyway?
15:57 tadzik it is
15:57 timotimo unless i guess you have a 6th black key?
15:57 tadzik I seem to recall that there's a reason for that, possibly only stylistic
15:57 timotimo i feel like my more musically educated friend explained it to me, but ...
15:57 tadzik my music-fu is to weak these days to give you a proper answer though
15:58 timotimo music theory is blasphemy. it is madness!
15:58 tadzik this!
15:58 tadzik is!
15:58 tadzik scherzooooooo
15:58 timotimo TaSharp?
15:58 tadzik *queue sting of the bumblebee"
16:00 psch it's basically "because jazz"
16:00 psch e♯ that is
16:01 tadzik I imagine there's probably an audiophile somewhere that claims they can hear the difference between e# and f and it matters a lot to them
16:01 psch well, in non-tempered tuning they can be different too
16:02 timotimo hold on
16:02 timotimo when there's a # configured to go on the upper C
16:02 timotimo does that also affect the C one octave lower?
16:02 psch yeah
16:02 timotimo FFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUuuuuuuuuuuuuuuuuuuuuuuuu
16:03 psch it's usually noted on the C' line for less clutter
16:03 psch well, assuming you're still talking about "right behind the clef"
16:03 timotimo yes
16:03 timotimo there's also an extra sharp right behind the area right behind the clef
16:03 timotimo but the distance is noticably different
16:03 tadzik timotimo: I'd expect a "FFFFuuuu" if the answer was "no" :P
16:03 psch https://upload.wikimedia.org/wikipedia/commons/1/1b/Tritone_substitution.png # he he
16:03 timotimo tadzik: explicit is better than implicit!
16:04 tadzik NO LOL, NO PROJECT EULER
16:04 psch but global state change should be indicated exactly once (even though that's not anywhere in the zen of python i guess...)
16:05 psch timotimo: basically, every sharp or flat behind the clef but before the time signature means "every note with this name is altered such"
16:05 skids joined #perl6
16:05 timotimo well, at least now i know why it sounded wrong
16:06 jjido joined #perl6
16:06 tadzik as opposed to those between the bars, which work until the bar
16:06 skink joined #perl6
16:06 timotimo mhm
16:06 tadzik yes, I don't know the word for "takt"
16:06 psch "bar" is fine
16:07 skink Howdy guys
16:07 timotimo takt is also the german world
16:07 timotimo word*
16:07 psch o/ skink
16:07 tadzik hello skink
16:07 skink I need some advice regarding default parameters
16:08 timotimo i find it hilarious that english has unpronouncable names for flat and sharp notes
16:08 timotimo in german it's "cis" for c sharp, or "ges" for g flat
16:08 tadzik exactly the same in polish
16:08 timotimo but then we've got h instead of b
16:08 tadzik which is also a reason why I can't get used to the word "cisgender"
16:08 timotimo well, h instead of B i suppose
16:09 skink I did some benchmarks of the Bcrypt vs Argon2 modules. The Bcrypt module defaults to 2^12 iterations because that's the recommended sane default
16:09 timotimo there's also sharpgender and flatgender
16:09 tadzik I must say I can't really tell if you're serious
16:09 skink For Argon2 I copied the defaults of the Python lib, but the speed of that is two orders of magnitude different from Bcrypt's default
16:09 skink In fact, the current defaults seem to be something like 2^5.5 bcrypt iterations
16:11 skink So... do I go with pre-existing defaults in other ecosystems, or try to be default-performance-consistent within our ecosystem?
16:11 timotimo not serious
16:11 tadzik h and b also confuse me
16:12 tadzik I saw b used meaning bh, so ais
16:12 tadzik but also to mean regular h
16:12 tadzik so I just play both and check which one fits in this case
16:12 psch tadzik: i've been told there was a german monk who didn't close his B on the top and bottom
16:12 psch and someone transcribed that wrong
16:12 tadzik o
16:12 tadzik :D
16:13 psch that explanation skirts the edge of believable for me though
16:13 psch as in, i can't decide if i believe that exactly one cloyster could be more or less completely responsible for all transcription of music at some point in time
16:15 timotimo i've heard a very similar explanation to that
16:16 timotimo the "misread or miswritten b"
16:19 timotimo and i found another sharp that applies here
16:20 psch hm, actually e sharp isn't only because jazz
16:20 psch that's in Cis major already
16:20 psch don't even need jazz, we can stay baroque for that
16:23 timotimo this sheet music is still stumping me a tiny bit
16:24 Herby_ joined #perl6
16:25 Herby_ o/
16:25 timotimo ugh, this piano instrument i'm using
16:25 timotimo it has a terrible discontinuity right in the uppermost notes i have to play
16:26 timotimo probably switched between two samples right in the middle >_>
16:26 RabidGravy qsample with the maestro grand sample set is what you want :)
16:26 RabidGravy qsampler
16:27 timotimo the C6 is the note that changes it
16:27 tadzik is there anyone competent in windows to help me with some rakudobrew bugs?
16:29 Herby_ I know the shortcut key to open File Explorer
16:29 Herby_ not sure if that helps
16:32 timotimo i'm constantly getting disconnected from my ssh session :\
16:32 timotimo (i think the wifi extender is flaky, but i haven't a single clue how to debug something like that)
16:35 tadzik I would love to have a wifi debugging kit
16:35 tadzik I feel like the people who buy a new computer when their current one bluescreens
16:37 timotimo tadzik: actually, why don't i study some undertale songs
16:37 timotimo i'll get a million fans on tumblr and the youtubes for that
16:37 timotimo are you familiar with "dog source" aka "gabe the dog"?
16:40 tadzik nope
16:40 tadzik I also haven't played undertale
16:40 tadzik patiently waiting for a linux port and all that :)
16:41 japhb skink: (Just because I happened to see your question on the screen): IMO crypt modules should default things like iterations, key bits, etc. to values generally considered safe.  If you want to indicate alternate values that are less safe but considerably faster, you can certainly do so, but the *defaults* should always tend to generally-accepted cryptographic safety over raw speed.
16:41 timotimo it's the most commercially successful game of 2016 by far and it's not got enough moneys to do a linux port
16:42 timotimo er, 2015?
16:42 skink japhb, That's exactly what I was thinking.
16:42 japhb skink: Ah, good.  :-)
16:43 skink japhb, If you look at Crypt::Random/Bcrypt/Argon2, in each case I present functions whose parameters have sane default values
16:43 skink I was just questioning the sanity of the Argon2 defaults selected by this other developer.
16:46 tadzik timotimo: probably has enough money, but not enough incentive
16:46 tadzik hell, Rocket League was attached to the Steam Controller with "coming to SteamOS" label, and it still didn't get ported
16:46 tadzik it's the new Divinity now
16:48 dogbert2 AlexDaniel: ping
16:48 AlexDaniel dogbert2: pong
16:49 dogbert2 AlexDaniel: check https://github.com/perl6/doc/issues/426
16:49 AlexDaniel dogbert2: yeah, I'm already reading it :)
16:51 AlexDaniel dogbert2: technically there's a newline after the last 0
16:52 hankache joined #perl6
16:52 dogbert2 AlexDaniel: added :)
16:52 AlexDaniel dogbert2: perhaps I'd also move the shortest example to the front (the one without Z magic)
16:52 AlexDaniel to the top*
16:53 dogbert2 AlexDaniel: done
16:53 timotimo tadzik: who knows :)
16:54 AlexDaniel dogbert2: L<Z|routine/Z> – does it work inside code blocks?
16:54 skink japhb, What I'm struggling with currently, however, is how much memory to use. For Argon2 parameters vs performance, it scales much more with memory than it does with iterations.
16:54 skink But... I can't just go using 128 MiB per hash.
16:55 dogbert2 AlexDaniel: dunno, was going to test with htmlify.p6 before committing
16:57 AlexDaniel dogbert2: 1 hours :)
16:58 AlexDaniel dogbert2: it's good to go then
17:00 dogbert2 AlexDaniel: cool, I can always change $seconds to 7200 :)
17:00 AlexDaniel dogbert2: bikeshedding :)
17:01 dogbert2 AleksDaniel :) I'll verify that the link works, will take a few minutes, then I'll commit
17:04 Cabanossi joined #perl6
17:05 timotimo oh japhb is here :)
17:05 timotimo o/
17:10 dalek doc: 39e8e39 | (Jan-Olof Hendig)++ | doc/Type/Int.pod:
17:10 dalek doc: Improved the polymod examples section. AlexDaniel++
17:10 dalek doc: review: https://github.com/perl6/doc/commit/39e8e39ecf
17:10 dogbert2 AlexDaniel: done, unfortunately the Z link didn't work :(
17:10 AlexDaniel dogbert2: yeah, but that was expected
17:11 Ven joined #perl6
17:29 cdg_ joined #perl6
17:31 jjido joined #perl6
17:40 dogbert2 m: say 7 ~~ (1,5,7,10) # why do I get False ?
17:40 camelia rakudo-moar 1512da: OUTPUT«False␤»
17:40 timotimo you're supposed to use "any" for that use case
17:40 timotimo m: say 7 == any(1, 5, 7, 10)
17:40 camelia rakudo-moar 1512da: OUTPUT«any(False, False, True, False)␤»
17:40 timotimo m: say 7 ~~ any(1, 5, 7, 10)
17:40 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:41 timotimo m: say so 7 == any(1, 5, 7, 10)
17:41 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:41 dogbert2 timotimo: aha, many thanks
17:41 AlexDaniel m: say 4 ~~ (1,5,7,10)
17:41 camelia rakudo-moar 1512da: OUTPUT«False␤»
17:42 AlexDaniel timotimo: but what does it compare in this case?
17:46 timotimo list against list
17:46 timotimo m: say (1, 2, 3, 4) ~~ (1, 2, *, 4)
17:46 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:46 timotimo m: say (1, 2, 9, 4) ~~ (1, 2, *, 4)
17:46 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:46 lizmat m: say 7 ~~ 1|5|7|10   # alternate way
17:46 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:46 timotimo m: say (1, 3, 3, 4) ~~ (1, 2, *, 4)
17:46 camelia rakudo-moar 1512da: OUTPUT«False␤»
17:46 AlexDaniel m: say 4 ~~ (4,)
17:46 camelia rakudo-moar 1512da: OUTPUT«False␤»
17:47 AlexDaniel timotimo: ↑ ?
17:47 timotimo 4 doesn't seem to count as the list that contains only 4, it seems
17:47 timotimo in this case, i mean
17:48 AlexDaniel so it compares nothing and just gives “False” as the answer?
17:48 timotimo you'd have to look at the code; not sure if this is a bug or intended behaviour
17:48 lizmat m: say 4 ~~ any(4,)
17:48 camelia rakudo-moar 1512da: OUTPUT«True␤»
17:49 lizmat m: say 4 ~~ (5,6,7,8)
17:49 camelia rakudo-moar 1512da: OUTPUT«False␤»
17:51 psch m: say 4 ~~ () # uhh
17:51 camelia rakudo-moar 1512da: OUTPUT«()␤»
17:51 AlexDaniel o_o
17:52 AlexDaniel I have a feeling that in 4 ~~ (4,) case it is comparing types
17:52 psch so, $item ~~ $list returns (1) () when $list has no elems, (2) self if $list is a Match object, (3) False
17:52 AlexDaniel oh
17:53 psch see https://github.com/rakudo/rakudo/blob/nom/src/core/List.pm#L426
17:53 psch well, (2) is slighty wrong in my summary there... :)
17:53 psch self[0] has to be a Match
17:53 psch m: say 5 ~~ (Match.new,)
17:53 camelia rakudo-moar 1512da: OUTPUT«(「」)␤»
17:54 psch m: say (5 ~~ (Match.new,)).WHAT
17:54 camelia rakudo-moar 1512da: OUTPUT«(List)␤»
17:54 AlexDaniel maybe it is just me but I fail to see any logic here, but there has to be some
17:54 psch AlexDaniel: exactly my thinking :)
17:54 psch note, for the original query i'd probably use (elem) anyway
17:54 kaare_ Native casting escapes me. I also fail to find any dox. So, question. The C function should receive a (pointer to a ) bitstring.
17:54 kaare_ How do I turn e.g.0b000000000000000000100000 into three byte and  0b0000000000000010 into two?
17:57 moritz kaare_: uh, huh? are those pointer values?
17:57 timotimo you'll have to split it apart manually, i'm afraid
17:58 psch ...what's a bitstring?
17:58 moritz a bsob? (binary small object)
17:58 timotimo a given number of bits
17:58 timotimo :D
18:01 kaare_ moritz: I guess the answer is That's the buffer value
18:01 psch the "string" part really confuses me
18:01 psch bitstring is apparently a python library for dealing with binary data vOv
18:01 AlexDaniel psch: what kinda bothers me is that it is not something very rare. Lots of people will type that in and will wonder what it actually does
18:02 kaare_ timotimo: I can spilt it, but into what? I've tried CArray[uint8] with no luck
18:02 AlexDaniel psch: I wonder if there are any tests…
18:02 timotimo what do you have it as?
18:02 timotimo if you just spell out 0b000000000010 into your code ,you'll end up with an Int
18:03 timotimo then you just +>8 to get 8-bit bunches
18:03 psch AlexDaniel: List as RHS to smartmatch seems undertested, yeah
18:04 psch AlexDaniel: afaict we only test Array ~~ List, List ~~ Array, and List ~~ Array-with-Whatevers
18:04 kaare_ timotimo: ok. And that's eniugh for a Buf or a CArray{uint8] ?
18:04 BrassLantern joined #perl6
18:05 timotimo you will then put each 8bit piece into a CArray[uint8] you've .new'd yourself
18:05 timotimo then you'll have a pointer to a bunch of bytes that represent your bitstring
18:05 timotimo be aware of endianness, though
18:05 psch AlexDaniel: fwiw i'd agree with replacing the "return False" in the linked bit with "return $topic (elem) self"
18:05 psch 'cause that does seem rather intuitive to assume
18:06 psch m: say 4 ~~ [3, 4, 5]
18:06 camelia rakudo-moar 1512da: OUTPUT«False␤»
18:06 kaare_ endianness shouldn't be a problem for an array of bits, I suppose.
18:06 timotimo then you would be very wrong :)
18:06 * masak .oO( this bit is big-endian )
18:06 timotimo since you yourself now have to decide in what order the bytes go
18:06 kaare_ and the bits are in order?
18:07 timotimo if you grab the lowest 8 bits by going +& 0b11111111 and then shift it over with +>8, but put it into the CArray's index [0], that'll be little endian
18:07 timotimo +> and +& don't know about bit order
18:07 timotimo they only care about mathematical values
18:07 timotimo byte order, i meant
18:08 kaare_ ok, so better do the arranging myself. Perhaps the problem is that I misunderstood CArray.
18:09 kaare_ Each 8 bit byte will go in a separate CArray?
18:09 timotimo it's difficult to misunderstand CArray; it's the simplest thing you could get
18:09 timotimo not into a separate CArray
18:09 timotimo CArray is an array of multiple of your base type, for example uint8
18:09 kaare_ OK, so not that.
18:11 kaare_ I'll whip up an example when I have 10 minutes. l8r.
18:11 AlexDaniel psch: ok so I did this: https://github.com/perl6/roast/issues/116
18:12 AlexDaniel m: say 4 (elem) (1..100)
18:12 camelia rakudo-moar 1512da: OUTPUT«True␤»
18:12 AlexDaniel m: say 4 (elem) @(1..100)
18:12 camelia rakudo-moar 1512da: OUTPUT«True␤»
18:12 AlexDaniel m: say 4 ~~ (1..100)
18:12 camelia rakudo-moar 1512da: OUTPUT«True␤»
18:12 AlexDaniel m: say 4 ~~ @(1..100)
18:12 camelia rakudo-moar 1512da: OUTPUT«False␤»
18:12 AlexDaniel So smartmatch is not so smart in this case… in fact, it is a bit more dumb than (elem) :)
18:13 rurban left #perl6
18:15 * psch hardly looks at roast issues
18:15 psch actually, pretty much never
18:15 AlexDaniel yeah, and you probably don't look at spec issues as well
18:15 AlexDaniel just like everyone
18:16 psch true.  i mostly look at RT
18:16 timotimo same here
18:16 AlexDaniel which makes it impossible to discuss issues like this because RT does not seem to be the right place for such discussions
18:17 timotimo it doesn't have reaction emoticons
18:17 psch i don't know, "$item ~~ $list is weird" sounds like a perfect RT ticket title to me ;P
18:17 AlexDaniel psch: ok then, opening it right now
18:18 psch ...not actually with that title please :)
18:18 AlexDaniel and if somebody tells me that RT is not for such discussions I'll slap him with a link to this IRC log
18:19 psch well, that's the thing
18:19 psch sure it's undertested, and that's for roast
18:19 psch but the behavior itself seems weird in the first place, and there's no test to clarify
18:19 psch so the weird behavior is what i would report
18:20 AlexDaniel and given that any ticket needs tests to be closable this actually makes sense
18:37 AlexDaniel psch: https://rt.perl.org/Ticket/Display.html?id=127980
18:38 AlexDaniel kinda like that, but feel free to leave a bunch of comments to make it clearer ;)
18:38 pmurias joined #perl6
18:39 pmurias are there any plans to restore parrot support in rakudo?
18:39 timotimo not in the very near future
18:39 moritz no
18:39 AlexDaniel pmurias: why? :)
18:40 AlexDaniel I mean, sure you could do that, but what for?
18:40 pmurias AlexDaniel: I'm not planning to do that
18:41 timotimo parrot has a very different model of doing multi-threading
18:42 pmurias I was just thinking if there is any sense in keeping parrot support in nqp
18:42 pmurias timotimo: it has the same model of multi-threading js has in the browser (WebWorkers)
18:43 timotimo oh? i thought it was quite different
18:44 timotimo the "access to a variable schedules a job on the owner's thread"
18:46 pmurias timotimo: webworkers and parrot threads have very similiar power
18:47 pmurias you can do things in parallel without synchronization and with message passing
18:47 timotimo i think you can also read from any object another thread owns on parrot
18:47 timotimo well... from lexicals at least? i don't know the details at all
18:47 pmurias timotimo: lexical access was turned into message passing
18:50 perturbation joined #perl6
18:58 _mg_ joined #perl6
18:59 perturbation joined #perl6
19:02 buharin joined #perl6
19:02 itaipu joined #perl6
19:03 cognominal joined #perl6
19:08 spider-mario joined #perl6
19:10 moritz .tell lizmat running a single spectest file through make fails: http://perlpunks.de/paste/show/571d1a03.5018.199
19:10 yoleaux moritz: I'll pass your message to lizmat.
19:20 ajoe joined #perl6
19:32 spider-mario joined #perl6
19:41 Skarsnik joined #perl6
19:47 Ven joined #perl6
19:54 raoulvdberge joined #perl6
19:54 cdg joined #perl6
19:55 spider-mario joined #perl6
19:56 felher joined #perl6
19:57 timotimo Perl v6.0.0 required--this is only v5.22.1, stopped at tools/build/create-moar-runner.pl line 4.
19:57 timotimo :D
20:04 inokenty joined #perl6
20:07 masak timotimo: at least Perl 5 is polite about it.
20:08 timotimo :)
20:10 kid511 joined #perl6
20:14 kid51 joined #perl6
20:16 jjido joined #perl6
20:17 timotimo looking at the "build BUILDALL at compile time" thing again
20:17 timotimo and an error is stumping me really strongly
20:17 skink I see ssh on the list of most wanted bindings. Would that be for just client-side, or also server-side?
20:19 neuron joined #perl6
20:25 AlexDaniel skink: I doubt that it is about server side.
20:26 skink I figured.
20:27 pmurias joined #perl6
20:27 skink OpenSSH is client- and v2-only, but has a stable and very well-documented API
20:29 moritz the use cases for a perl-based SSH server are rather limited
20:29 moritz since you can configure the OpenSSH server to run scripts for you on login etc.
20:29 skink mhm
20:34 timotimo this stack trace makes like zero sense to me
20:40 sena_kun joined #perl6
20:41 timotimo a-ha, i missed an important piece of the puzzle
20:49 MadcapJake debating whether I should start a new module or flesh out some unfinished ones...
20:50 kurahaupo joined #perl6
20:53 timotimo oh, huh
20:53 leont joined #perl6
20:53 timotimo Str on Mu:U tries to get $*VAR_NAME
20:54 timotimo and that gets us into INITIALIZE_DYNAMIC
20:55 timotimo there ought to be a better way to try and find if a dynamic variable is set than "defined($*FOO)" for in the setting ...
20:55 timotimo but i also don't have a single clue why the hell it'd try to Str that ...
20:56 psch timotimo: what's the context, ooc?
20:57 timotimo i accidentally tried to put the wrong part of the buildplan into the SVal's :value slot
20:57 timotimo that's also why i was getting to INITIALIZE-DYNAMIC via QAST::Node.new
20:58 timotimo ooooh, i get through stage parse now
20:58 psch i think that was more specific context than i was trying to ask for :)
20:58 timotimo sorry :)
20:58 psch but i did see "build BUILDALL at compile time" in the backlog just now
20:59 timotimo aye
20:59 timotimo same kind of idea jnthn had when he generated code for accessors instead of using a single closure for all of them
21:00 psch oh
21:00 psch hm, i had thought composition happens at compile time already?
21:01 masak whoa. got a 'double free or corruption' from moarvm right *after* my app served itself on a port :P
21:01 masak ...not reproducible. figures.
21:01 timotimo yeah, but at composition time we only create the buildallplan as a list of tasks with some parameters
21:01 psch ahh, i see
21:03 psch so instead of the while and 13-level if/elsif we'd get a exactly-what's-needed BUILDALL for each class?
21:03 timotimo it turns out a gigantic amount of classes end up with a completely no-op buildallplan
21:03 timotimo yup
21:04 psch that seems like it could be valueable, especially if we usually don't do anything at all anyway
21:04 timotimo yeah, some buildallplans are just 13, 13, 13, 13, 13, 13
21:04 masak or, hm, sorta reproducible every other time :(
21:05 masak yep, apparently I've arrived. in the undergrowth where I belong, whacking away with a machete.
21:06 timotimo now ... the part of the buildplan generator that actually generates a code object and installs it ... that is still missing :)
21:09 timotimo entrecôde
21:11 raydiak good afternoon #perl6
21:13 kurahaupo_ joined #perl6
21:14 timotimo hello raydiak!
21:18 raydiak hiya timo! looks like you're up to exciting stuff...
21:18 skink Ha, who was it the other day who was doing the multi-type constraints?
21:18 psch multi-type constraints?
21:19 timotimo hmm ... maybe it'll be exciting
21:19 timotimo currently mostly frustrating, though ;)
21:20 raydiak then...I'm excited to find out if it's exciting :)
21:20 skink sub crypt_random_sample($set where List|Blob, $count where 1..^$set.elems)
21:20 skink I may have overdone that constraint :)
21:20 psch looks fine to me vOv
21:24 timotimo raydiak: did you get measurements done without the "where" clauses?
21:25 masak hi, raydiak
21:25 psch m: sub f($x where my $y = 2 * $x where $y > 5) { } # oh wow
21:25 camelia rakudo-moar 423220: ( no output )
21:25 psch how had i never thought to try that before... :)
21:26 timotimo i wonder what scope the $y ends up in; potentially the sub itself
21:26 psch m: sub f($x where my $y = 2 * $x where $y > 5) { say $y }; f(4)
21:26 camelia rakudo-moar 423220: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub f at /tmp/vN9_GeTznb line 1␤  in block <unit> at /tmp/vN9_GeTznb line 1␤␤»
21:27 timotimo oh, the $x doesn't get bound before the "where" fires?
21:27 timotimo you'll need to use $_, then
21:27 psch m: sub f($x where $x > 5) { say $y }; f(6)
21:27 camelia rakudo-moar 423220: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MZq1h0SdF8␤Variable '$y' is not declared␤at /tmp/MZq1h0SdF8:1␤------> 3sub f($x where $x > 5) { say 7⏏5$y }; f(6)␤»
21:27 psch m: sub f($x where $x > 5) { say $x }; f(6)
21:27 camelia rakudo-moar 423220: OUTPUT«6␤»
21:27 psch i think the $y isn't around in the sig, actually
21:28 psch m: sub f($y, $x where $y = $x * 2 where $y > 5) { say $y }; f(1, 3)
21:28 camelia rakudo-moar 423220: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NZuIHPwH8g␤The post constraint "where $y > 5" came after the default value␤(did you mean "...where $y > 5 = $x * 2 "?)␤at /tmp/NZuIHPwH8g:1␤------> 3 f($y, $x where $y = $x * 2 where $y > 57⏏5) { s…»
21:28 timotimo so many messages with "HOORAY!" in front ...
21:28 psch oh boy, the "did you mean" :D
21:29 psch m: sub f($y, $x where $y > 5 = $x * 2) { say $y }; f(1, 3) # did i..?
21:29 camelia rakudo-moar 423220: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub f at /tmp/62OQp8FhSi line 1␤  in block <unit> at /tmp/62OQp8FhSi line 1␤␤»
21:29 psch m: sub f($y, $x where $y > 5 = $x * 2) { say $y }; f(6, 3) # did i..?
21:29 camelia rakudo-moar 423220: OUTPUT«6␤»
21:29 psch m: sub f($y, $x where $y > 5 = $x * 2) { say "$y $x" }; f(6, 3) # did i..?
21:29 camelia rakudo-moar 423220: OUTPUT«6 3␤»
21:29 psch ...what *does* that where constraint actually mean, though...
21:30 leont_ joined #perl6
21:30 timotimo should die, because $y > 5 isn't an lvalue
21:30 psch m: sub f($x where $x = 10) { $x }; say f 2
21:30 camelia rakudo-moar 423220: OUTPUT«2␤»
21:30 psch m: sub f($x where $x := 10) { $x }; say f 2
21:30 camelia rakudo-moar 423220: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YGSDfZQaQy␤Malformed parameter␤at /tmp/YGSDfZQaQy:1␤------> 3sub f($x where $x :7⏏5= 10) { $x }; say f 2␤»
21:30 timotimo yeah, $x gets bound after the where clause has fired
21:31 psch m: sub f($x where CALLERS::<$x> = 10) { $x }; say f 2
21:31 camelia rakudo-moar 423220: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub f at /tmp/Tn7SEjfaH4 line 1␤  in block <unit> at /tmp/Tn7SEjfaH4 line 1␤␤»
21:31 raydiak hello, masak. how goes it?
21:31 psch there's definitely something spooky hidden there
21:31 psch although practically just LTA errors, i suppose
21:31 * psch heads to bed o/
21:32 raydiak timotimo: yep I shaved off about 10% of the runtime, and another 5% or so from optimizations in the cube intersection tests
21:32 timotimo that's not as much as i'd have hoped :\
21:33 raydiak timotimo: one of the things I noticed is that the intersection tests are written in...probably the slowest ways imaginable....things like "for -1, 1 { ... }" and other such nonsense
21:33 timotimo uh oh :)
21:33 timotimo well, pre-GLR that wouldn have been catastrophic
21:33 timotimo nowadays it's just bad
21:34 RabidGravy right beddy byes for rabid
21:34 RabidGravy toodles
21:34 raydiak iirc, I was going to re-write them, then bikeshedded the whole thing into Math::Symbolic, which was going to generate the intersection code for me, but it didn't get that far
21:34 masak wait, why is `for -1, 1 { ... }` bad?
21:35 timotimo gnite RabidGravy :)
21:35 timotimo masak: only bad for high-efficiency code on moar right now
21:36 raydiak because it's done for each object in the scene for every pixel, very hot path
21:36 masak ah.
21:36 raydiak btw my 3G is really laggy right now, forgive me if I'm 10+ seconds behind the conversation :)
21:38 spider-mario joined #perl6
21:39 masak 'night, #perl6
21:40 raydiak good night masak
21:40 timotimo gnite masak
21:43 timotimo Stage parse      : Running custom buildplan for Any
21:45 kerframil joined #perl6
21:45 raydiak timotimo: check out how bad it is when you have a moment, it's just funny :) https://github.com/raydiak/pray/blob/master/lib/Pray/Geometry/Cube.pm6#L18-54
21:46 timotimo my ($ray_pos, $ray_dir) = .position, .direction given $ray;  -  this alone is likely already 100000x slower than the equivalent two-liner :)
21:46 raydiak right? and that's one of the more sane parts...
21:47 timotimo that @norm is spectacular :)
21:48 raydiak yeah my style at that time was...um...special :)
21:50 raydiak a lot of the rest of the project is fairly clean, but somehow when my brain starts doing more math, all the coding style gets very unreadable and mathy if I'm not careful
21:51 timotimo my code isn't really working out that well :\
21:53 raydiak I'd offer to help, but I suspectyou'd have it solved before I fully understood the parts you're working on
21:53 spider-mario joined #perl6
21:53 timotimo it's a bit icky :)
21:53 timotimo and it contains code generation with QAST and such
21:54 timotimo though that particular part seems all-right by now
21:54 timotimo i'm generating the BUILDALL method on objects that have a sufficiently simple BUILDALLPLAN, but installing it isn't right yet
21:54 timotimo tadzik freshened up the qtprofiler today, it can read profiler files from recent rakudos now
21:54 timotimo you may be interested in giving that a try :)
21:57 raydiak ah, cool...sounds promising
21:59 timotimo blurgh. things are blowing up in load_setting
22:00 timotimo so it's just the "loadbytecode" op in which the exception flies ... and from there i may dive deep into the bytecode file? :\
22:02 jjido joined #perl6
22:02 timotimo i don't even get a bytecode index for the exception
22:11 raydiak definitely sounds mysterious to me...
22:13 timotimo https://gist.github.com/timo/48837cd9082bb0be7b66aea60091388e  ;(
22:16 raydiak duhhh...looks broken :P
22:18 timotimo if you want to have a look at the scope of my work, you can look at the generate_buildallplan_2 branch i just pushed: https://github.com/rakudo/rakudo/commit/8d1725daf5
22:19 raydiak trying to look but my internet connection is truly terrible right now...and yet still somehow burning through more of my data than I can afford :P
22:19 timotimo oh!
22:19 timotimo yeah, in that case don't look :)
22:20 timotimo not *that* interesting
22:20 raydiak yay it loaded :)
22:21 TEttinger joined #perl6
22:21 xinming joined #perl6
22:23 raydiak it's quite interesting, but definitely more than I can absorb atm. think I'm going to move on until I can be productive online again later today
22:23 dalek doc: f05280f | (Tom Browder)++ | doc/Language/unicode_texas.pod:
22:23 dalek doc: try to reinsert unicode italic 'e' character in first column
22:23 dalek doc: review: https://github.com/perl6/doc/commit/f05280fef4
22:23 dalek doc: bd276d0 | (Tom Browder)++ | doc/ (3 files):
22:23 dalek doc: Merge remote-tracking branch 'upstream/master'
22:23 dalek doc: review: https://github.com/perl6/doc/commit/bd276d0bfb
22:23 dalek doc: f626904 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
22:24 dalek doc: Merge pull request #461 from tbrowder/master
22:24 dalek doc:
22:24 dalek doc: trying to insert unicode italic 'e' in first column
22:24 dalek doc: review: https://github.com/perl6/doc/commit/f626904574
22:25 timotimo sounds like a good plan
22:27 raydiak So, I wish you luck in slaying this particular dragon! You'll probably be in bed by the time I'm back today, but hope to catch you again soon. :) P.S. thanks for mentioning me a couple weeks ago. Saw my name in the backlog, it's one of the reasons I came back at this particular time
22:27 timotimo thank you! :)
22:27 timotimo yeah, i'll probably go to bed in the next half-hour
22:27 timotimo yay!
22:28 leont_ joined #perl6
22:29 raydiak in that case, I'll also wish you pleasant dreams :)
22:29 raydiak later #perl6 o/
22:29 timotimo thanks :) seeya
22:44 Herby_ joined #perl6
22:44 Herby_ Afternoon, everyone!
22:44 Herby_ \o
22:45 timotimo abendnoon, Herby_
22:46 AlexDaniel So the commit message is “try to reinsert unicode italic 'e' character in first column”
22:46 AlexDaniel I look in the source code and I see 푒
22:46 AlexDaniel which is… well, it was a good try, I guess!
22:47 TEttinger is that a CJK or Hangul char?
22:47 timotimo hah
22:47 TEttinger my font isn't very good
22:47 AlexDaniel .u 푒
22:47 yoleaux No characters found
22:47 TEttinger D:
22:47 AlexDaniel m: ‘푒’.uniname.say
22:47 camelia rakudo-moar 423220: OUTPUT«<Hangul Syllable>␤»
22:47 TEttinger syllable... what?
22:47 AlexDaniel yoleaux: perl 6 is smarter than you
22:48 timotimo could be a newer unicode database?
22:48 timotimo or perhaps we insert those by ourselves for big ranges of those?
22:48 TEttinger it can't be that new... it displays in Unifont
22:49 AlexDaniel yoleaux is just old I guess
22:49 timotimo a consequence of only living once
22:49 timotimo is that you spend most of your time old :P
22:49 firstdayonthejob joined #perl6
22:49 AlexDaniel yeah, and other part of your time as being too young
22:50 TEttinger ha! http://unicode-table.com/en/1D452/
22:50 timotimo you're not too young for too long
22:50 TEttinger http://unicode-table.com/en/D452/
22:50 TEttinger the 1D452 is becoming D452
22:51 AlexDaniel yeah… well! Another way to do it is to copy it from here https://github.com/perl6/doc/commit/f2a9e0d738100a9522ee536ad0d14456a71cfa08
22:52 AlexDaniel or just reapply the commit which was accidentally reverted
22:52 TEttinger AlexDaniel: it's a better first try than I would get, actually. if that committer's copy-paste functionality was using UCS-16, they wouldn't be able to copy one astral-plane character
22:52 TEttinger they'd need to copy two... how would that work
22:52 AlexDaniel hmmm
22:53 AlexDaniel TEttinger: which makes me want to say “get a proper system, dude!”
22:53 TEttinger ???? copies for me
22:53 timotimo that looks b0rked
22:53 timotimo in my font
22:53 TEttinger is that natural number e?
22:53 AlexDaniel m: say ????
22:53 camelia rakudo-moar 423220: OUTPUT«2.71828182845905␤»
22:53 TEttinger nice
22:54 timotimo oh my
22:54 AlexDaniel not sure who came up with that but ????????????
22:54 tbrowder joined #perl6
22:54 TEttinger delightful, github... https://github.com/perl6/doc/blob/f2a9e0d738100a9522ee536ad0d14456a71cfa08/doc/Language/unicode_texas.pod
22:55 geekosaur and now you know why I tried ???? yesterday :p
22:55 teatime did someone say UCS-16
22:55 teatime I got that tell-tale pain in my side
22:55 AlexDaniel tbrowder: hey, we're discussing 푒
22:55 teatime UCS-16 doesn't support >BMP chars at all does it?
22:56 teatime or no, I'm thinking of UCS-2
22:56 timotimo only the UTF ones do
22:56 TEttinger ah, that's it
22:56 TEttinger UCS-2
22:56 AlexDaniel TEttinger: I think that it attempts to parse it as perl 5 pod
22:56 tbrowder that's my pitiful attempt at unicode char 1d452 with the atom editor
22:56 TEttinger I wonder what JS screwed up this time re:unicode
22:57 grondilu how do I write that a string $string matches a grammar G?  $string ~~ G does not work apparently.  so $string ~~ /<G::TOP>/   ?
22:57 teatime yeah, UCS-2 stops at 0xFFFF.  UTF-16 adds the surrogate pair method, to get to 0x10FFFF.
22:57 geekosaur G.parse($string)?
22:57 teatime JavaScript has a fucked up implementation.
22:57 TEttinger I've dealt with it second-hand
22:57 teatime Basically UCS-2-and-handle-your-own-surrogate-pairs-to-pretend-it's-UTF-16.
22:58 grondilu geekosaur: yeah I guess.  Silly me.
22:58 TEttinger :D what could go wrong, teatime?
22:58 teatime so when you do ord or the equiv you see two wrong codepoints, copy+paste them or something, and #unicode makes fun of you.
22:58 AlexDaniel actually, modern javascript has proper suppport for unicode
22:58 AlexDaniel we just have to wait a bit till it hits all of the browsers…
22:58 teatime yeah I was about to say I think this was in the process of changing.
22:59 teatime but yeah it's still an issue w/ browsers.
22:59 AlexDaniel and then we will get into “stop using this, start using that” period
22:59 AlexDaniel when proper unicode support will be there but everyone will be writing broken code just out of habit
23:00 AlexDaniel it's pretty sad, yeah…
23:00 teatime heh I was about to say something and then realized it sounded like star trek
23:00 TEttinger AlexDaniel: I'm pretty happy with some of the crazy but awesome workarounds people use https://gist.github.com/gagern/89db1179766a702c564d
23:00 AlexDaniel tbrowder: anyway, so I'll just commit the right character then
23:00 tbrowder thank you
23:01 AlexDaniel TEttinger: what the! Well, I had some experience in dealing with that stuff with punycode.js
23:02 tbrowder AlexDaniel: what editor are you using, and how are you entering the character?  I've tried vi, but no luck.
23:02 tbrowder same with Padre
23:02 AlexDaniel TEttinger: the main purpose of the library is a bit different but it has to understand unicode stuff correctly, so it has some functions that it also provides publicly
23:03 teatime did someone here paste the js code I'm reading or is it just a coincidence
23:03 TEttinger ah, I used the node.js unicode 8.0.0 lib
23:03 TEttinger ?
23:03 TEttinger the bitset one? on gist?
23:03 TEttinger actually I'm not sure what data structure it is
23:03 teatime oh ok I see now sorry
23:03 infina_ joined #perl6
23:03 TEttinger it's a crazy technique but kinda brilliant
23:04 AlexDaniel tbrowder: any editor on my system handles it well
23:04 AlexDaniel tbrowder: including vim
23:05 AlexDaniel tbrowder: perhaps your terminal does not support unicode?
23:05 AlexDaniel tbrowder: or are you using gvim?
23:07 tbrowder i'll check the terminal...
23:07 tbrowder mate on deb 8 shows utf-8
23:07 tbrowder got to go--thanks for the fix
23:08 teatime it's kinda common for s/w (terminals, editors) to have trouble w/ non-BMP chars even if BMP works OK
23:08 AlexDani` joined #perl6
23:08 teatime I have to make sure I build urxvt w/ the right options (or get the hugest package from the distro), and used to have issues w/ screen.
23:08 AlexDani` just :wq-ed out of emacs…
23:09 AlexDani` confused it with a vim window next to it
23:10 AlexDaniel ah I'm still here…
23:10 teatime https://en.wikipedia.org/wiki/UTF-16#Usage  <--  next to last paragraph.  I should make a perl6 update to this.
23:11 dalek doc: 5c13737 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/unicode_texas.pod:
23:11 dalek doc: Correct ???? character (again)
23:11 dalek doc: review: https://github.com/perl6/doc/commit/5c137376df
23:11 AlexDaniel There we go!
23:16 AlexDaniel teatime: ah! The world would have been such an easier place if we restricted ourselves to some particular alphabet! … Preferably consisting of two characters: 0 and 1
23:18 geekosaur then we'd be arguing over what combinations of them mean
23:18 geekosaur (in fact, we kinda are...)
23:18 AlexDaniel perhaps then “word” data type would be even more meaningful
23:19 AlexDaniel .oO( “long word” ! )
23:20 teatime haha
23:32 grondilu m: say grammar { token TOP { <foo> | <bar> }; token foo { foo(\d+) { make $0**2 } }; token bar { bar(\d+) { make $0.sqrt } } }.parse("foo3").made;
23:32 camelia rakudo-moar 423220: OUTPUT«(Any)␤»
23:32 jjido joined #perl6
23:32 grondilu ^how do I access the made object from the TOP?
23:33 grondilu do I have to { make $/.made } at each level up to the top or something?
23:33 grondilu m: say grammar { token TOP { <foo> | <bar> { make $/.made } }; token foo { foo(\d+) { make $0**2 } }; token bar { bar(\d+) { make $0.sqrt } } }.parse("foo3").made;
23:33 camelia rakudo-moar 423220: OUTPUT«(Any)␤»
23:34 grondilu m: say grammar { token TOP { [<foo> | <bar>] { make $/.made } }; token foo { foo(\d+) { make $0**2 } }; token bar { bar(\d+) { make $0.sqrt } } }.parse("foo3").made;
23:34 camelia rakudo-moar 423220: OUTPUT«(Any)␤»
23:38 matiaslina joined #perl6

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

Perl 6 | Reference Documentation | Rakudo