Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-16

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:01 _28_ria joined #perl6
00:24 mr-foobar joined #perl6
00:25 me joined #perl6
00:31 jack_rabbit joined #perl6
00:39 llfourn_ joined #perl6
00:39 pierre_ joined #perl6
00:42 mr-foobar joined #perl6
00:58 astj joined #perl6
01:00 cognominal joined #perl6
01:28 huggable joined #perl6
01:32 pierre_ joined #perl6
01:36 dmc00 joined #perl6
01:40 Actualeyes 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:50 zakharyas joined #perl6
01:51 cdg joined #perl6
01:53 kjk p6: class A { our $v = 123 }; A::.keys.say; my $name='A'; ::($name)::.keys.say
01:53 camelia rakudo-moar ad8265: OUTPUT«($v)␤()␤»
01:59 Zoffix m: class A { our $v = 123 }; A::.WHAT.say; my $name='A'; ::($name)::.WHAT.say
01:59 camelia rakudo-moar ad8265: OUTPUT«(Stash)␤(A)␤»
02:00 timotimo m: class A { our $v = 123 }; GLOBAL::('A')::.keys.say
02:00 camelia rakudo-moar ad8265: OUTPUT«0..0␤»
02:00 kjk Zoffix: I can't get '$v' from the second way above
02:01 timotimo m: class A { our $v = 123 }; GLOBAL::('A').WHO::.keys.say
02:01 camelia rakudo-moar ad8265: OUTPUT«()␤»
02:01 timotimo m: class A { our $v = 123 }; GLOBAL::('A').WHO.keys.say
02:01 camelia rakudo-moar ad8265: OUTPUT«()␤»
02:01 timotimo m: class A { our $v = 123 }; ::('A').WHO.keys.say
02:01 camelia rakudo-moar ad8265: OUTPUT«($v)␤»
02:01 timotimo m: class A { our $v = 123 }; A::.keys.say; my $name='A'; ::($name).WHO.keys.say
02:01 camelia rakudo-moar ad8265: OUTPUT«($v)␤($v)␤»
02:01 timotimo ^- there we go
02:01 Zoffix ????
02:02 kjk nice! :) thanks
02:05 noganex_ joined #perl6
02:13 MadcapJake jast: are you around?
02:17 * TimToady sitting at sjc for flight to aus
02:19 pierre_ joined #perl6
02:20 pierre_ joined #perl6
02:23 hotel joined #perl6
02:32 kurahaupo joined #perl6
02:34 mr-foobar joined #perl6
02:35 ssotka joined #perl6
02:36 Actualeyes joined #perl6
02:40 perlawhirl joined #perl6
02:41 perlawhirl aus...tria? aus...tralia? aus...tin?
02:42 * MadcapJake sitting at home trying to figure out undirected unweighted dynamic programming
02:42 dmc00 joined #perl6
02:47 TimToady perlawhirl: tin
02:47 TimToady (oscon)
02:49 TEttinger austinia
02:49 TimToady though I do hope our luggage doesn't go down under
02:49 MadcapJake Cool! http://conferences.oreilly.com/oscon/open-source-us/public/schedule/detail/49373
02:50 mr-foobar joined #perl6
02:50 MadcapJake I believe it! :)
02:51 MasterDuke kind of jealous my co-worker is going
02:51 * MadcapJake used to watch Ripley's all the time as a kid and even went to a couple of the locations
02:51 perlawhirl TimToady: :( i was hoping you were coming to australia.
02:55 TimToady heading to gate &
03:06 jamesneko joined #perl6
03:20 hotel_california joined #perl6
03:40 MadcapJake I don't understand this one bit...
03:40 * MadcapJake is off to bed
03:41 timotimo if it's only one bit that you're not understanding, that's good!
03:41 MadcapJake lol
03:42 timotimo sorry, couldn't resist :S
03:42 MadcapJake I kind of get the cost part, but I don't see how to traverse the graph
03:43 timotimo sorry, i know nothing about the thing you refer to
03:43 timotimo undirected unweighted dynamic programming
03:43 timotimo that's the one
03:43 MadcapJake well if you or anyone else wants to take a look: https://gist.github.com/MadcapJake/efbcb2400c061c30fc9cb713a263c7c7
03:44 timotimo i was kind of able half-way to understand "dynamic programming" what was taught to us at uni. i'm not sure what variant of it that was
03:44 timotimo i even forgot what the common example for it was. it wasn't bin packing, was it?
03:44 wbill joined #perl6
03:44 MadcapJake well I've tried watching videos on it and it's always the weighted kind or a directioned graph
03:44 timotimo in our case it was always a table that'd hold the data we'd traverse, not something very graph-like
03:45 timotimo though of course you can represent tables as graphs somewhat trivially, but you get the idea
03:45 MadcapJake right, that's what I'm finding
03:47 MadcapJake so in this instance, I want to traverse nodes, but jast suggested that I take nodes out of a $to-visit Set and check the costs of each, but I just don't see how that gets relayed back to the %cost, in my code it just picks another node but who's to say that's actually the right node? shouldn't it be the previous one visited?
03:47 timotimo oh timtoady's website ... the background color is absolutely unapologetically neon :D
03:47 MadcapJake but then the problem is that you're never finding the shortest path again XD
03:47 MadcapJake gahh!
03:48 timotimo are you only needing to do a dijkstra-ish traversal?
03:48 MadcapJake yeah basically (I think)
03:48 timotimo do you ever have negative weights?
03:48 MadcapJake nothing has weight
03:49 timotimo oh!
03:49 MadcapJake it's an unweighted graph
03:49 timotimo well, then that's easy
03:49 MadcapJake ...not seeing the easiness :P
03:49 timotimo i didn't realize dijkstra could be called dynamic programming, but i think i can see it now
03:49 timotimo ok, look, here's how i'd do it:
03:49 MadcapJake I think it's different than dijkstra's
03:49 timotimo let me just outline what i'm thinking of, then we can figure out the differences
03:50 timotimo you have a set of nodes that are currently "interesting". it starts with only the beginning node in it
03:50 MadcapJake ok :)
03:50 timotimo you hold the cost for each node somewhere, and you hold the "predecessor" for each node somewhere
03:50 MadcapJake predecessor? but the connections are predefined and not uniform
03:51 timotimo now for every node in your set, you look at every neighbour. if they don't have a predecessor set yet, or if their current cost is bigger than the cost of your currently considered node, you set the currently-looking-from node (the one you took out of the set of interesting ones) as that node's predecessor
03:51 timotimo the predecessors are just pointers from every node into the direction where you started your search, so you can later reconstruct the path through the whole graph
03:51 timotimo after every neighbour was considered, the ones where you changed something end up in the "to-look-at" set again
03:52 MadcapJake ok so you check the cost at each stop on the path and then only proceed from the lowest-cost node
03:52 timotimo when you've reached the target node for your search, you're done
03:52 timotimo you proceed from multiple nodes
03:52 MadcapJake I *feel* like I'm doing that but I must not be :P
03:52 MadcapJake wait
03:52 hotel joined #perl6
03:52 timotimo every node that hasn't been in the interesting set so far
03:52 timotimo and every node that you set a lower cost for
03:52 timotimo note, however, that in the unweighted case, you can never find a node that's cheaper to reach from your current node
03:53 MadcapJake I think that's my problem!
03:53 timotimo that's only possible if there's a shorter way (by number of nodes) that has a higher cost (by adding the path up)
03:53 MadcapJake every node is 1 cost away
03:53 timotimo yeah
03:53 MadcapJake so I have to calculate brute force?
03:53 timotimo if you only add the "cheapest" into your set, you'll build a random path through your graph
03:53 timotimo yes, the thing we're talking about right now is brute force
03:53 timotimo there are many ways to improve on that
03:53 timotimo A* for example is very popular
03:54 timotimo if you have a geography, more or less, where you can say that two nodes are as far apart as sqrt(dx * dx + dy * dy), you can change the edge weights depending on if they point "towards" your goal or not
03:54 MadcapJake My brute force method is commented out and it's just monstrously slow
03:55 timotimo that'll mean you'll be searching the nodes that are closer to your targets first, before considering nodes that point the other way
03:55 timotimo if you have a direct-ish connection from start to finish, you'll be fine. if you have to move 1km away from start as well as end, and then 2km towards the goal, you'll be looking at a big amount of dead ends first
03:56 timotimo i sat in a path finding lecture for a few sessions at one point, but i didn't end up having it tested
03:56 hotel_california joined #perl6
03:57 timotimo when you have some time to preprocess your graph, you can put some neat algorithms to use that'll give you far faster search times
03:57 MadcapJake Here's the problem I'm trying to solve if you're interested: https://www.reddit.com/r/dailyprogrammer/comments/4iut1x/20160511_challenge_266_intermediate_graph_radius/
03:57 timotimo the things i learned about were mostly about path finding for maps, i.e. distance between two nodes are strongly related to the weight it ends up having
03:58 MadcapJake I think dynamic might still work because the "cost" is essentially how many nodes it takes to reach that node
03:58 timotimo do you know how to work graphviz, btw?
03:58 timotimo what do you mean by dynamic?
03:59 timotimo oh, you'll be interested to know that if every edge weight is 1, dijkstra essentially becomes equivalent to BFS
04:00 MadcapJake dynamic programming is where you calculate cost each step of the weight and only save the smallest cost.  This way you aren't actually traversing a path (this is what I'm not groking right now) so the time to compute is the time it takes to update costs for each node
04:00 timotimo yeah, that's equivalent to BFS
04:02 MadcapJake yeah this looks like what I'm doing, I just don't know why it's not working xD
04:02 timotimo shameful. i know i've seen the floyd-warshall algorithm at uni, but i don't remember how it works
04:02 timotimo i repeat my question: do you know how to work graphviz?
04:03 MadcapJake no :P
04:03 timotimo you should learn it, it's worth a lot
04:03 timotimo the easiest way to go is to print "digraph G {", then for every edge just "  $a -> $b;" and "}" at the end
04:04 timotimo output that into a file or on stdout, then run "dot -Tx11 foo.dot" and you'll get a window where you can pan and zoom and such
04:04 timotimo if you've got a file, you can overwrite the file and it'll instantly refresh in the window
04:04 MadcapJake cool!
04:04 timotimo the names of the nodes have to be a specific format; i'm not sure if it'll complain about numbers, but it'll definitely complain about spaces
04:05 timotimo so you can print a line qq{  $node_id [label="$text_on_node"]} to have a label
04:05 timotimo http://graphviz.org/Gallery.php - on top of that: copy paste from these examples :D
04:06 timotimo i love graphviz
04:07 MadcapJake wow that's awesome!
04:08 timotimo very.
04:09 timotimo you can add back-edges for the "predecessor" relation and put the calculated cost into the node, and you can give nodes colors depending on whether they are in the "interesting" set or not
04:10 MadcapJake sweet! so visually seeing how it discovers the path
04:11 pierre_ joined #perl6
04:11 timotimo quite.
04:14 timotimo it's bedtime for me now
04:14 timotimo gnite!
04:15 MadcapJake night!
04:18 zhmylove joined #perl6
04:22 masak morning, #perl6
04:22 pierre_ joined #perl6
04:38 pierre_ joined #perl6
04:47 dalek ecosystem: ce5b554 | MasterDuke17++ | META.list:
04:47 dalek ecosystem: Add Text::Diff::Sift4 to ecosystem
04:47 dalek ecosystem:
04:47 dalek ecosystem: See https://github.com/MasterDuke17/Text-Diff-Sift4
04:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ce5b554546
04:47 dalek ecosystem: 1561402 | azawawi++ | META.list:
04:47 dalek ecosystem: Merge pull request #206 from MasterDuke17/patch-2
04:47 dalek ecosystem:
04:47 dalek ecosystem: Add Text::Diff::Sift4 to ecosystem
04:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/156140278f
04:50 Cabanossi joined #perl6
04:58 skids joined #perl6
05:01 MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = %h; # what am I doing wrong here?
05:01 camelia rakudo-moar ad8265: OUTPUT«Type check failed in assignment to @a; expected Hash but got Pair (:baz("quux"))␤  in block <unit> at /tmp/tpPycD5p12 line 1␤␤»
05:02 teatime MadcapJake: you spec'd an array of hashes, but you're giving it a list (or array, fiik) of pairs
05:03 MadcapJake I thought that % variables could be provided a list of pairs and it would generate a hash?
05:03 teatime I think 'my Pair @a' or 'my %a' or 'my Hash $a' would work
05:03 teatime %h is a hash, but I think @a is deconstructing it
05:03 MadcapJake m: my %h = foo => 1, bar => 2, baz => 3; %h.say;
05:03 camelia rakudo-moar ad8265: OUTPUT«{bar => 2, baz => 3, foo => 1}␤»
05:04 teatime `my Type @a`  means  "an array of Type's", not "a Type which is also positional/Array"
05:04 teatime it's in the docs about perl6 gotchas, i think
05:04 MadcapJake I want it to be an array of hashes
05:04 teatime oh dang, I see what you are saying now, sorry
05:04 MadcapJake that's what I don't understand, why would it deconstruct it into pairs
05:05 teatime eh, I give up now.  :)
05:05 MadcapJake I guess I have to wrap it in brackets, I thought that was a valid way to set a first positional of an array
05:05 teatime thought I had that one, but now I'm lost again.  yay p6.
05:05 MadcapJake maybe a comma will do the trick
05:06 MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = %h,;
05:06 camelia rakudo-moar ad8265: ( no output )
05:06 MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = %h,; @a[0].say
05:06 camelia rakudo-moar ad8265: OUTPUT«{baz => quux, foo => bar}␤»
05:06 MadcapJake boom-diggity!
05:07 MadcapJake teatime: not understanding p6 is a nightly occurrence for me :)
05:07 teatime I *need* a new camel book.
05:07 teatime or whatever fauna.
05:09 MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = [%h]; @a[0].say
05:09 camelia rakudo-moar ad8265: OUTPUT«Type check failed in assignment to @a; expected Hash but got Pair (:baz("quux"))␤  in block <unit> at /tmp/xs7ZVjDVJB line 1␤␤»
05:09 MadcapJake weird that brackets actually *doesn't* work
05:09 MadcapJake only the comma works in this case o_O
05:09 teatime if you [%h], what else could you expect but an array of pairs?
05:09 teatime how else can you make a sensible array out of a hash?
05:10 MadcapJake @( %h )
05:10 teatime well, I suppose.  does that give you a flat list of $k2, $v2, $k2, $v2, etc.?
05:10 MadcapJake I expect deconstruction in signatures and for/if (which is really signatures) but not in variable assignment
05:11 teatime er, k1, v1, you know what I meant
05:11 MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my @a = [%h]; @a.elems.say
05:11 camelia rakudo-moar ad8265: OUTPUT«2␤»
05:11 MadcapJake it just pulls the pairs out
05:11 teatime I was talking about @( %h ), you implied it does something that isn't that
05:12 MadcapJake no I see @() as explicit deconstruction where it wouldn't normally occur
05:12 skids %h alone will usually be subject to the single arg rule.
05:12 MadcapJake oh? what's that?
05:13 skids The way to thing about it is "my @a = <thing>" will iterate <thing>
05:13 skids If you iterate %h, you iterate the pairs.
05:13 skids Erm, let me repharase that.
05:13 skids If you iterate %h you iterate the pairs.
05:13 skids If you iterate %h, you iterate the one-element list.
05:14 MadcapJake ohhhh, I thought it would work because `my @a = 1` creates an array of one element 1, so I assumed it would do the same, but my assumption didn't take into account that it would try iterating if it can.
05:14 skids right, if the top eve thing is iterable, it s usually iterated.
05:15 skids *level*
05:15 MadcapJake I see! thanks skids, clarity at last!
05:15 * skids wonders what aner of crumb is under his l key
05:15 skids or maybe I just cannot type tonight.
05:17 MadcapJake this is one of those times where I'm glad I typed the array, cus otherwise I would've been terribly confused later on dealing with Pairs instead of Hashes :P
05:18 itcharlie left #perl6
05:21 skids Learning to always remember apply the single arg rule is perhaps the trickiest part of learning Perl 6.  But it was less confusing/complicated than all the alternatives that were tried.
05:22 teatime skids: may I ask, what is the 'bigger picture' that explains the logic of <a> → 'a' but <a b> → ('a', 'b')
05:22 teatime I assume something, somewhere, becomes inconsistent/inconvenient if <a> → ('a',)
05:23 MadcapJake It's confusing a priori, but rather nifty a posteriori.
05:23 skids I can't say for sure but probably to keep it consistent with (a)
05:23 skids m: <a >.perl.say
05:23 camelia rakudo-moar ad8265: OUTPUT«"a"␤»
05:23 MadcapJake m: < a >.perl.say
05:23 camelia rakudo-moar ad8265: OUTPUT«"a"␤»
05:23 skids but I guess that part is not consistent.
05:24 teatime hehe, I, too, had hoped for < a >, but it was not to be
05:24 MadcapJake m: qw{ a}.perl.say
05:24 camelia rakudo-moar ad8265: OUTPUT«"a"␤»
05:24 MadcapJake m: < >.perl.say
05:24 camelia rakudo-moar ad8265: OUTPUT«()␤»
05:24 skids I guess they figured people would want to use newlines where those spaces are.
05:24 MadcapJake is that Unit or an empty list?
05:25 teatime () means empty list
05:25 skids "Unit"?
05:25 teatime ($a) is not a list
05:25 teatime but ($a, $b) is
05:25 MadcapJake m: < > ~~ Arrray
05:25 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ONLKPjPr_h␤Undeclared name:␤    Arrray used at line 1. Did you mean 'Array', 'array'?␤␤»
05:25 MadcapJake lol
05:25 MadcapJake pirate's array
05:25 MadcapJake m: < > ~~ Array
05:25 camelia rakudo-moar ad8265: ( no output )
05:25 teatime m: < >.WHAT
05:25 camelia rakudo-moar ad8265: ( no output )
05:25 MadcapJake m: say < > ~~ Array
05:25 camelia rakudo-moar ad8265: OUTPUT«False␤»
05:25 teatime we're both terrible at this
05:25 teatime m: < >.WHAT.say
05:25 camelia rakudo-moar ad8265: OUTPUT«(List)␤»
05:25 teatime List does not inherit from Array
05:26 MadcapJake m: say < > ~~ Empty
05:26 camelia rakudo-moar ad8265: OUTPUT«True␤»
05:26 teatime m: < > ~~ Positional & List
05:26 camelia rakudo-moar ad8265: ( no output )
05:26 MadcapJake It's an Empty
05:26 teatime m: say < > ~~ Positional & List
05:26 camelia rakudo-moar ad8265: OUTPUT«True␤»
05:26 teatime Empty is a term/constant for empty list, iirc
05:27 teatime m: say () == Empty
05:27 camelia rakudo-moar ad8265: OUTPUT«True␤»
05:27 MadcapJake skids: I thought Unit was something but it's not :P I meant like a Slip I think
05:27 MadcapJake m: say < > ~~ Slip
05:27 camelia rakudo-moar ad8265: OUTPUT«False␤»
05:27 skids m: say (|()).per
05:27 camelia rakudo-moar ad8265: OUTPUT«Method 'per' not found for invocant of class 'Slip'␤  in block <unit> at /tmp/dJwvxJHsTT line 1␤␤»
05:27 skids m: say (|()).perl
05:27 camelia rakudo-moar ad8265: OUTPUT«slip()␤»
05:28 MadcapJake m: say < >.perl
05:28 camelia rakudo-moar ad8265: OUTPUT«()␤»
05:28 MadcapJake m: my @a = <a>; @a.perl.say
05:28 camelia rakudo-moar ad8265: OUTPUT«["a"]␤»
05:28 mohae joined #perl6
05:28 MadcapJake m: my @a = <a>,; @a.perl.say
05:28 camelia rakudo-moar ad8265: OUTPUT«["a"]␤»
05:29 MadcapJake o_O
05:29 MadcapJake oh yeah, cus <a> is just a string apparently
05:29 MadcapJake m: say <a> ~~ Str
05:29 camelia rakudo-moar ad8265: OUTPUT«True␤»
05:36 skids m: say slip().item.perl # erm...
05:36 camelia rakudo-moar ad8265: OUTPUT«slip$()␤»
05:37 skids Ah there is already RT#127224
05:37 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127224
05:38 skids Anyway, time for bed
05:38 MadcapJake same, g'night all!
05:49 CIAvash joined #perl6
06:08 pierre_ joined #perl6
06:22 wamba joined #perl6
06:23 yqt joined #perl6
06:26 firstdayonthejob joined #perl6
06:33 cpage_ joined #perl6
06:42 domidumont joined #perl6
06:48 domidumont joined #perl6
06:49 grondilu is it possible to retrieve the name of a variable.  Eg. "foo" from $foo ?
06:49 pierre_ joined #perl6
06:51 ssotka joined #perl6
06:53 RabidGravy joined #perl6
06:55 sortiz m: my $foo; sub name(\any) { any.VAR ~~ Scalar ?? any.VAR.name !! '' }; name($foo).say; name('bar');
06:55 camelia rakudo-moar ad8265: OUTPUT«$foo␤»
06:55 pierre_ joined #perl6
06:57 fildon_ left #perl6
07:00 TEttinger #perl6, how would you match a unicode opening brace/bracket to a corresponding unicode closing brace/bracket?
07:00 TEttinger like 〚 to 〛 or ⸨ to ⸩
07:00 TEttinger oddly, the Ps and Pe categories in unicode are not equivalent-length
07:01 TEttinger starting bracket is Ps, Pe is ending
07:01 * grondilu did not know about .VAR
07:01 grondilu m: say (my $foo).VAR.name
07:01 camelia rakudo-moar ad8265: OUTPUT«$foo␤»
07:01 grondilu cool
07:03 sortiz m: sub name(\any) { any.VAR ~~ Scalar ?? any.VAR.name !! any.?name }; my $foo; my @bar; my %baz; name($_).say for $foo, @bar, %baz; #  A more general approach, grondilu
07:03 camelia rakudo-moar ad8265: OUTPUT«$foo␤@bar␤%baz␤»
07:12 pierre_ joined #perl6
07:15 RabidGravy Harr!
07:15 sortiz \o
07:21 * RabidGravy decides to use a different k8055 library which has some small chance of being thread safe
07:31 pierre_ joined #perl6
07:38 simula67 joined #perl6
07:47 rindolf joined #perl6
07:51 pierre_ joined #perl6
07:52 pmurias joined #perl6
08:08 pierre_ joined #perl6
08:15 _mg_ joined #perl6
08:16 darutoko joined #perl6
08:19 dakkar joined #perl6
08:28 moritz kinda off-topic question for the noisegang :-)
08:28 moritz is there any open format for annotating audio with meta information and links, depending on the time?
08:29 moritz something like: from 1:10 to 1:45 of $podcast_episode they talk about "Learning Perl" and here's the link for that
08:30 RabidGravy I think mpeg 4 does
08:31 moritz RabidGravy: any pointers to something googlable would be appreciated
08:31 moritz like a name or so
08:33 CIAvash joined #perl6
08:35 RabidGravy just trying to find an actual example
08:37 dalek DBIish: 9d13ea0 | (Salvador Ortiz)++ | / (4 files):
08:37 dalek DBIish: TestMock: Allow generation from syntetic data
08:37 dalek DBIish:
08:37 dalek DBIish: Mimic DBD::Sponge reflexion capabilities.
08:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/9d13ea0350
08:37 dalek DBIish: e009b5d | (Salvador Ortiz)++ | lib/DBDish/Pg (4 files):
08:37 dalek DBIish: Pg: Add $dbh.column-info for schema introspection
08:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/e009b5d316
08:42 * grondilu is often amazed how powerful closures are.  He should try to use them more often.
08:43 RabidGravy moritz, ah there you go https://en.wikipedia.org/wiki/MPEG-4_Part_17
08:44 RabidGravy I was wrong about BWF, it's just timecode it supports
08:46 Emeric joined #perl6
08:46 RabidGravy I keep meaning to have a look at an mp4 module in order to support https://www.native-instruments.com/en/specials/stems/
08:47 RabidGravy (though why they go out of their way to hide the fact it is just an mp4 container is beyond me)
08:54 rindolf joined #perl6
08:55 moritz RabidGravy: thanks
08:56 pierre_ joined #perl6
08:59 pierre_ joined #perl6
09:01 CIAvash joined #perl6
09:20 gregf_ joined #perl6
09:32 stmuk moritz: https://www.matroska.org/technical/specs/subtitles/srt.html maybe? although I don't think links are supported
09:33 stmuk also see https://en.wikipedia.org/wiki/SubRip
09:38 * RabidGravy wonders where the "NAT_BoolNAT" that gptrixie uses for "bool" comes from
09:40 buharin joined #perl6
09:42 llfourn_ can anyone confirm that I'm not crazy and that rakudo beats all these languages in performance: https://hashnode.com/post/comparison-nodejs-php-c-go-python-and-ruby-cio352ydg000ym253frmfnt70
09:42 llfourn_ m: say [+] ^100000000
09:42 camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤»
09:42 llfourn_ well I didn't test Go or C
09:43 stmuk big integer maths support seemed v fast in perl 6 when I tried it
09:44 psch m: say sum ^100000000; say now - BEGIN now
09:44 camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.0118575␤»
09:44 psch m: say sum ^100000000; say now - INIT now
09:44 camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.0021432␤»
09:44 psch i keep forgetting which of those is more meaningful
09:44 llfourn_ wow it gets faster..
09:44 psch but either way, it doesn't have "start the interp" overhead either
09:44 llfourn_ yeah
09:44 llfourn_ I'm going to install golang on this comp and then gloat if it wins :D
09:46 llfourn_ of course if you write it the loopy way it's at least 10 times slower than the slowest but it's still encouraging
09:49 buharin hiho :)
09:50 RabidGravy for the python example given p6 is ten times faster here
09:50 RabidGravy don't have ruby
09:51 llfourn RabidGravy: really for me it's 100 times faster...
09:51 RabidGravy 3 times faster than nose.js
09:51 llfourn for node rakudo is 6 times faster...
09:51 llfourn (on a mac)
09:52 RabidGravy ah, user time yes 100 times faster
09:52 RabidGravy but ten wallclock
09:53 stmuk I found p6 addition 10x perl6 -Mbigint
09:54 stmuk I had a lightening talk "Lying With Benchmarks - Perl 6 is faster" but sadly it was banned from LpW 2015
09:54 llfourn that soudns like an interesting talk :(
09:55 El_Che banned?
09:55 stmuk I should update and give at YAPC::EU
09:55 tadzik aahahah
09:55 tadzik I'd go see it
09:55 RabidGravy and 30x faster than php
09:56 stmuk El_Che: well maybe just schedule issues
09:56 El_Che stmuk: certainly with the self-relativizing title it doesn't feel like a troll talk
09:57 stmuk it was fairly light hearted
09:59 El_Che make it slightly longer so it could be a regular talk?
09:59 El_Che sound interesting
09:59 El_Che s
09:59 llfourn rakudo beats go as well
09:59 RabidGravy is there a specific optimisation for that sum of a very large list?
10:00 llfourn it doesn't beat C but it gets the wrong answer so it doesn't count
10:00 kid51 joined #perl6
10:00 tadzik I suspect it may catch that you're trying to get a sum of a series
10:00 llfourn so it doesn't iterate?
10:00 tadzik well, it's easy to check :)
10:00 tadzik m: say sum ^100000000; say now - INIT now
10:00 camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.00227928␤»
10:00 tadzik m: say sum ^10000000000; say now - INIT now
10:00 camelia rakudo-moar ad8265: OUTPUT«49999999995000000000␤0.00298638␤»
10:01 stmuk I think ruby gave the wrong answer when I tried it too
10:01 tadzik m: say sum ^10000000000000; say now - INIT now
10:01 camelia rakudo-moar ad8265: OUTPUT«49999999999995000000000000␤0.0032230␤»
10:01 psch m: say [+] ^100000000; say now - INIT now
10:01 camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.00238478␤»
10:01 llfourn heh tadzik++
10:01 psch we opt that too
10:01 tadzik I... think it's inconclusive
10:01 llfourn ?
10:01 tadzik well, it does grow :P
10:01 llfourn not linearly :)
10:02 tadzik but yeah, I think it's safe to say it does that in O(1)
10:02 tadzik yep :)
10:02 stmuk https://github.com/stmuk/p6benchmark/blob/master/100K_fib.pl
10:02 psch method sum() { my ($start,$stop) = self.int-bounds || nextsame; my $elems = 0 max $stop - $start + 1; ($start + $stop) * $elems div 2; }
10:02 llfourn ok well that's a bit less magic
10:02 tadzik m: say sum ^100000000000000000; say now - INIT now
10:02 camelia rakudo-moar ad8265: OUTPUT«4999999999999999950000000000000000␤0.00242954␤»
10:03 RabidGravy still
10:06 RabidGravy yeah, losing that optimisation and doing it exactly the same way as the others are doing it, it's a lot slower
10:07 RabidGravy a lot slower
10:08 _mg_ joined #perl6
10:09 RabidGravy I killed it after 4 minutes
10:09 llfourn it does show how Perl 6's making first class object out of everything allows for optimizations
10:10 llfourn if 0..1000 just returned an array or list or whatever it wouldn't be possible to do it
10:15 RabidGravy It would be nice if it could be at least as quick as python for the "dumb case" though
10:24 pmurias jnthn: ping
10:25 gregf_ joined #perl6
10:25 jnthn pmurias: pong
10:27 RabidGravy powm
10:31 pierre_ joined #perl6
10:31 pmurias jnthn: first, a minor thing I have noticed is that the hll role is serialized on the jvm but not on the moar
10:31 pmurias jnthn: the bigger problem is that rakudo seems to be binding parameters into static variables
10:32 pmurias jnthn: at https://github.com/rakudo/rakudo/blob/nom/src/Perl6/World.nqp#L2466
10:34 pmurias docs/qast.markdown seems to imply that changing the implementation is free to change that to direct references
10:34 jnthn Not seeing what that has to do with parameters?
10:35 jnthn This is the code that "fakes" an outer context when we run stuff at BEGIN time
10:38 pmurias jnthn: I'll go recheck some things
10:41 Zoffix What gets the wrong answer? Rakudo? [06:00:02] <llfourn> it doesn't beat C but it gets the wrong answer so it doesn't count
10:42 RabidGravy the C example
10:42 tadzik oh, classic C :)
10:43 RabidGravy it's using a plain int so may truncate on most platforms
10:43 Zoffix Man, that article and especially its comments is pretty pathetic. "Hey, we tested a single super basic operation... let's claim we tested the entire language!"
10:44 pmurias jnthn: should I make the hll role serializable on Moar?
10:46 jnthn pmurias: Yes, that sounds like an oversight.
10:49 nchambers joined #perl6
10:52 jnthn lunch; bbl
10:57 eyck joined #perl6
11:00 pierre_ joined #perl6
11:15 dalek gtk-simple: 462f141 | finanalyst++ | / (2 files):
11:15 dalek gtk-simple: Add new widgets GTK::Simple::Scale and GTK::Simple::MarkUpLabel with example
11:15 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/462f141450
11:15 dalek gtk-simple: 384f818 | RabidGravy++ | / (2 files):
11:15 dalek gtk-simple: Merge pull request #25 from finanalyst/master
11:15 dalek gtk-simple:
11:15 dalek gtk-simple: Add new widgets GTK::Simple::Scale and GTK::Simple::MarkUpLabel with …
11:15 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/384f81813e
11:15 RabidGravy SLIDERS!
11:16 tadzik ayy!
11:17 kid51 joined #perl6
11:18 tadzik LIES!
11:18 tadzik wait, this has no sliders
11:22 RabidGravy the scale widget is a slider
11:24 RabidGravy run the examples/04_marked_scale.p6
11:28 RabidGravy so going to make one or two of the dumb sequencers I was thinking of later
11:28 tadzik oh
11:31 pierre_ joined #perl6
11:36 Emeric joined #perl6
11:44 olinkl joined #perl6
11:53 _mg_ joined #perl6
11:54 cschwenz joined #perl6
11:54 |2701 joined #perl6
11:56 dalek gtk-simple: 9043cfd | finanalyst++ | examples/04_marked_scale.p6:
11:56 dalek gtk-simple: typo reverse blue/red keys in example
11:56 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/9043cfd3b2
11:56 dalek gtk-simple: 075d8bb | azawawi++ | examples/04_marked_scale.p6:
11:56 dalek gtk-simple: Merge pull request #26 from finanalyst/master
11:56 dalek gtk-simple:
11:56 dalek gtk-simple: typo reverse blue/red keys in example
11:56 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/075d8bb7bb
11:56 cschwenz in perl6, how do i represent a unicode char without actually typing it in?  i'm looking for the perl6 equiv of perl5's \x{ABCD}
11:57 psch m: say "\x2603"
11:57 camelia rakudo-moar ad8265: OUTPUT«☃␤»
11:57 psch m: say "\c[SNOWMAN]"
11:57 camelia rakudo-moar ad8265: OUTPUT«☃␤»
11:58 cschwenz that's what i thought, but the perl6 REPL is spitting "Undeclared routine" back at me :-(
11:59 cschwenz p6: say "\xABCD";
11:59 camelia rakudo-moar ad8265: OUTPUT«ꯍ␤»
11:59 psch m: say "\xABCD".uniname
11:59 camelia rakudo-moar ad8265: OUTPUT«MEETEI MAYEK LETTER HUK␤»
11:59 psch m: say '\x[ABCD]'
11:59 camelia rakudo-moar ad8265: OUTPUT«\x[ABCD]␤»
11:59 psch cschwenz: not sure how that'd happen
12:00 psch cschwenz: does it happen with -e'...' instead of in the REPL?
12:01 cschwenz ah, nevermind.  say \xABCD; is not the same as say "\xABCD";
12:03 cschwenz left #perl6
12:07 spider-mario joined #perl6
12:07 vytas joined #perl6
12:24 cschwenz joined #perl6
12:25 cschwenz what is canonical perl6 for the last entry in a list?  @list[@list.elems - 1] seems a bit verbose…
12:25 psch m: my @a = ^10; say @a[*-1]
12:25 camelia rakudo-moar ad8265: OUTPUT«9␤»
12:26 cschwenz :+1: psch, thanks :-)
12:27 timotimo o/
12:27 cschwenz \o timotimo :-)
12:29 timotimo i wonder if we should special-case * - 1 in the compiler and cache the code that we generate for it, seeing as it'd be a very common case
12:30 timotimo like, it's gotta be in the setting alone at least 50 times
12:30 cschwenz o_0 and that's generated fresh each and every time?  ouch.
12:31 timotimo well, why wouldn't it be
12:31 Relsak joined #perl6
12:31 cschwenz i would have thought that optimisation would have been made already
12:32 pmurias timotimo: that would make generating code faster?
12:32 timotimo m: sub id($a) { $a }; say id(* - 1) eqv id(* - 1)
12:32 camelia rakudo-moar ad8265: OUTPUT«True␤»
12:32 timotimo huh?
12:32 timotimo does WhateverCode eqv WhateverCode do anything sensible?
12:33 timotimo a rather naive grep of the setting reveals we only have 8 *-1 in it
12:33 psch m: my $x = * + 1; my $y = * - 1; say $x eqv $y
12:33 camelia rakudo-moar ad8265: OUTPUT«True␤»
12:33 timotimo okay, it doesn't
12:34 timotimo but i'm failing to grep for * \s* - \s* 1 with grep or egrep
12:34 JimmyZ ack-grep
12:35 timotimo i only want to search in gen/moar/m-CORE.setting :P
12:35 timotimo the thing is i can't get the fucking escaping right
12:36 cschwenz thus, ack for non-braindead escaping  :-P
12:36 timotimo oh? i thought ack just uses pcre
12:36 timotimo well, it's written in perl, so it does pcre without pcre
12:36 cschwenz i also find the shell getting in the way of entering regexes correctly
12:37 pierre_ joined #perl6
12:37 timotimo there's really only 11 instances of * - \d+
12:41 timotimo cschwenz: if you find it so odd that we don't cache the code objects for * - *, you can try implementing an optimization for that :)
12:43 pierre_ joined #perl6
12:44 RabidGravy m: use NativeCall; class Foo is repr("CPointer") { method x() {  my Pointer[Foo] $a; }}
12:44 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fNF4MvgoWp␤An exception occurred while parameterizing Pointer␤at /tmp/fNF4MvgoWp:1␤Exception details:␤  Cannot call infix:<===>(Foo, Str); none of these signatures match:␤      ($?)␤      (\a, \b)…»
12:44 RabidGravy that's annoying
12:45 timotimo m: use NativeCall; class Foo is repr("CPointer") { method x() {  my Pointer[$?CLASS] $a; }}
12:45 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cGBem6aoFd␤An exception occurred while parameterizing Pointer␤at /tmp/cGBem6aoFd:1␤Exception details:␤  Cannot call infix:<===>(Foo, Str); none of these signatures match:␤      ($?)␤      (\a, \b)…»
12:45 domidumont joined #perl6
12:46 timotimo well, a typization of an array like that does run at compile time, which means the class it's trying to use isn't composed yet
12:47 pierre_ joined #perl6
12:48 RabidGravy yeah, I worked out why, but it's still annoying
12:48 timotimo :(
12:48 timotimo luckily Pointer works without having the scalar typed, too
12:49 cschwenz left #perl6
12:50 RabidGravy I know but there's no way out of what I need to do
12:51 |2701 joined #perl6
12:51 |2701 joined #perl6
12:51 timotimo really? o_O
12:51 RabidGravy that is I have an "open_foo(struct foo **f)" which populates the f pointer with a Foo
12:53 RabidGravy oh, I can do it, but it means ugly code
12:53 timotimo so what, just my $foo = new Pointer[Foo]:;
12:53 RabidGravy but it has to be outside
12:54 timotimo why? for the nativecall signature declaration?
12:54 RabidGravy yes
12:54 timotimo i don't think it has to be a fully typed pointer to work
12:54 timotimo hmm, i wonder: what if you stub the class first?
12:55 * [Coke] wonders where the coffee is hiding.
12:57 RabidGravy no I tried with a predeclare
12:57 mohae joined #perl6
12:58 timotimo 'k, then you'll just have to declare it "Pointer" in the signature
12:58 timotimo you'll be hiding the sub from users anyway, so all your "ugly" code will be purely internal
12:59 sufrostico joined #perl6
12:59 pierre_ joined #perl6
13:13 perlawhirl joined #perl6
13:19 cdg joined #perl6
13:20 pierre_ joined #perl6
13:24 pmurias jnthn: I turned out that parameters ended up declared twice as both 'static' and in a more inner scope as 'var', and it was a bug in nqp-js causing problems
13:24 jnthn pmurias: Aha :)
13:27 RabidGravy Oooh more blinkenlights
13:28 timotimo where do you get blinkenlights from? :3
13:28 tadzik the telnet star wars?
13:28 RabidGravy one of these http://www.velleman.eu/products/view/?country=be&amp;lang=en&amp;id=351346
13:28 timotimo ah
13:29 RabidGravy it was sitting in my box o'stuff so I thought I'd make a module to drive it, and it works
13:31 timotimo "The number of inputs/outputs can be further expanded by connecting more (up to a maximum of four) cards to the PC's USB connectors." - that is the most useless description. also, why the heck would you limit the amount to 5?!
13:32 timotimo or ... is the total amount limited to 4?
13:34 RabidGravy the code would suggest 4
13:35 timotimo the dll just has a little array in it that only goes to 4
13:35 kaare_ joined #perl6
13:36 cognominal joined #perl6
13:36 RabidGravy yeah, I'm using a different library but it has a software defined usb thingy in the firmware so it's probably in that
13:37 RabidGravy (it's basically a PIC and a couple of chips)
13:38 timotimo yeah, it seems like an extremely cheap thing :P
13:38 RabidGravy yeah I bought it years ago because it was like a tenner or something at Maplins
13:38 timotimo hehe
13:41 stmuk so 5 quid elsewhere :P
13:42 timotimo well, that's a damp quid
13:42 RabidGravy there are some things that they are actually cheaper for, but not many things
13:46 RabidGravy the worst thing to buy from them is electronic components, they're not only more expensive, but they'll only have two of anything in stock so you're kind of stuffed when you want ten 2n3904s
13:47 stmuk on a recent trip to the US I was amused to find a Radio Shack still in business
13:48 geekosaur they do still exist, just not as many of them
13:48 pierrot joined #perl6
13:48 finanalyst joined #perl6
13:48 RabidGravy I miss proper old-school electronics shops
13:50 stmuk Edgeware Rd used to have many
13:51 RabidGravy yeah
13:51 itaipu joined #perl6
13:54 llfourn m: my @a = lazy loop { (^10).pick }; say @a[^5] # my new thing for the day -- create an infinite lazy list without a List.map or sequence/series
13:54 camelia rakudo-moar ad8265: OUTPUT«(5 9 5 2 7)␤»
13:55 skids joined #perl6
13:59 moritz llfourn: now if I tell you about the "roll" method, you'll be devastated, right?
13:59 moritz m: say (^10).roll(*)[^5]
13:59 camelia rakudo-moar ad8265: OUTPUT«(2 4 4 3 3)␤»
13:59 moritz m: say (^10).roll(*)[^5]
13:59 camelia rakudo-moar ad8265: OUTPUT«(8 8 0 1 7)␤»
14:00 llfourn moritz: that's pretty cool but no I'm not devastated the pick was just an example (should have been .roll you're right)
14:01 llfourn whenever I wanted to create a lazy list I always had to take an existing list and .map it to something
14:01 llfourn but loop lets me create an abitrary one based on a block
14:02 moritz also gather/take, and "lazy"
14:02 llfourn yeah gather take is the other way
14:03 llfourn but gather take you need a iterating block anyways?
14:04 llfourn m: my @a = lazy gather for ^10 { take $_ + 1 }; say @a[^5] # like this
14:04 camelia rakudo-moar ad8265: OUTPUT«(1 2 3 4 5)␤»
14:04 timotimo you don't need an iterating block
14:05 timotimo m: my @a = gather { take 1; take 2; take 3; take 4; }; say @a[^5]
14:05 camelia rakudo-moar ad8265: OUTPUT«(1 2 3 4 (Any))␤»
14:05 llfourn ah you can have many takes
14:05 timotimo of course
14:05 llfourn but not an infinite amount?
14:05 timotimo yeah you can
14:05 timotimo m: sub rofl { take 1; rofl }; my @a = gather { rofl }; say @a[^10]
14:06 timotimo m: sub rofl { take 1; rofl }; my @a = lazy gather { rofl }; say @a[^10]
14:06 camelia rakudo-moar ad8265: OUTPUT«(timeout)»
14:06 camelia rakudo-moar ad8265: OUTPUT«(1 1 1 1 1 1 1 1 1 1)␤»
14:06 llfourn ah with recursion. Interesting.
14:07 timotimo %)
14:08 llfourn m: my @a = lazy gather { take 1; &?BLOCK() }; say @a[^10]
14:08 camelia rakudo-moar ad8265: OUTPUT«(1 1 1 1 1 1 1 1 1 1)␤»
14:18 araujo joined #perl6
14:19 dha joined #perl6
14:20 ianm joined #perl6
14:20 Emeric Can I use optionals parameters in a MAIN sub ? I've something like that : sub MAIN($y, :$y), but it doesn't work. Any idea ?
14:20 Emeric *sub MAIN($x, :$y)
14:23 llfourn Emeric: atm you have to put the named params first
14:23 llfourn so perl6 script.p6 --named=stuff positional
14:26 timotimo if you just want it to be optional, not positional, you'll have to spell it "$y?" or "$y = 'some default'"
14:27 Emeric it works, thanks :)
14:33 yqt joined #perl6
14:39 dha I am currently being introduced to Perl 6!
14:39 zakharyas joined #perl6
14:39 stmuk is using a newer moar with an older rakudo likely to cause probs? or is moar mostly backward compatible?
14:40 ianm shout-out from OSCON from Austin, Texas. Intro to Perl 6 by Jeff Goff.
14:40 timotimo cool!
14:41 RabidGravy cool, is Perl 6 any good?
14:41 jnthn stmuk: It's pretty strongly backward compatible bytecode wise, however less so for C extensions, and Rakudo has one of those.
14:42 jnthn stmuk: Of note, a couple of fairly major internals changes landed a few days back.
14:44 dha ianm - I'd wave, but I don't know what direction you're in. :-)
14:44 dha RabidGravy - So far, it's a lot like Perl 5, but it can handle numbers better. :-)
14:44 dha Oh, and it has types.
14:44 perlpilot ianm: stand up and start shouting so that dha can find you  ;)
14:44 ianm LOL
14:44 dha heh.
14:44 RabidGravy cool, I guess I had better check it out
14:45 ianm I'm wearing a neck collar!
14:45 RabidGravy what like one of those dog-training shock collars?
14:45 timotimo whenever your code doesn't compile ... ;)
14:45 perlpilot RabidGravy: heh, I had a similar image in my head
14:46 stmuk jnthn: ah thanks I'm looking at pkgsrc's build and it's a bizarre mixture of versions (which vendors may start doing)
14:46 perlpilot ianm: you could tell DrForr that #perl6 says "hi" during the question period  :)
14:46 timotimo instead of fixing that one compatibility problem for C extensions, i wrote a long description of how you could do it on the issue tracker ... nobody wanted to implement it, though
14:47 dha DrForr and I have already waved at each other. :-)
14:48 perlpilot dha: Are you presenting at OSCON too?
14:48 jnthn timotimo: Wouldn't have helped this time though...the frames changes were to blame.
14:48 ianm LOLZ ... the Dr. said I have to stop licking myself! too funny
14:48 timotimo ah, quite.
14:48 stmuk are ORA making the videos available without $$$?
14:48 timotimo in theory we could have run-time switching between implementations
14:48 timotimo but that's maybe a bit excessive and wouldn't help anybody?
14:49 dha perlpilot -  nope. I have a presentation at yapc, though.
14:49 dha stmuk -  I think they're livestreaming the keynotes, but the talks generally, I doubt it.
14:53 dalek doc: c10af6c | (Wenzel P. P. Peppmeyer)++ | doc/Language/subscripts.pod:
14:53 dalek doc: doc subscripts with multiple dimensions
14:53 dalek doc: review: https://github.com/perl6/doc/commit/c10af6c43c
14:54 ptolemarch joined #perl6
14:57 ianm I like how say returns upper bracket and lower bracket for a matched value.
14:57 timotimo yeah, that's the .gist of a Match object at work
14:58 timotimo it's also cool how it displays the whole parse tree if a match has sub-matches
14:58 ianm whoa, really... nice
15:00 gfldex will it truncate big match trees?
15:00 timotimo no
15:01 timotimo use something more advanced, like Data::Dump::Tree (major shout-outs!) for that
15:01 timotimo where "that" means "more advanced things"
15:01 dha so... use more advanced things for more advanced things? :-)
15:01 timotimo yup
15:02 dha Never would have thought of that....
15:02 timotimo well, you can only think of that if you know that there's something more advanced out there in the first place
15:03 timotimo i see it all the time in here where people could use one of our fantastic modules but never even think of looking at our module list
15:03 timotimo really, in a perfect world, i'd set up a second section of the p6weekly that highlights bunches of modules each time around
15:04 timotimo but i'ven't made a weekly in a few months now; liz has always taken care of it for me - pretty darn well, too!
15:04 ianm does this work? print for 0 .. 15
15:04 timotimo no, you need .print or print $_
15:04 ianm a ha
15:04 timotimo you can try it for yourself by starting your line with m: and then just code
15:04 ianm .print works a treat
15:04 timotimo m: print for 0 .. 15
15:04 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hcpDwCXBXu␤Unsupported use of bare "print"; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument, or use &print to refer to the function as a noun␤at /tmp/hcpDwCXBXu:1␤----…»
15:05 timotimo ^- see how it tells you to "please use .print if you meant $_" :)
15:05 ianm Wow - nice error output.
15:05 timotimo we try to make as many of our errors "awesome" as we can
15:06 ianm That's really cool
15:06 Juerd ianm: You better get used to that. Many error messages are verbose and actually helpful.
15:06 timotimo m: if 1 { say "oh" } elif 2 { say "what?" }
15:06 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BQG41RV74e␤In Perl 6, please use "elsif' instead of "elif"␤at /tmp/BQG41RV74e:1␤------> 3if 1 { say "oh" } elif7⏏5 2 { say "what?" }␤»
15:06 pierre_ joined #perl6
15:07 ianm Juerd, Yeah. I'm coming from a PERL5 world. Loving the output - very good.
15:07 timotimo we have a bunch of messages especially aimed at perl5 users who accidentally put in perl5-like code
15:07 buharin hiho :)
15:07 ianm Perfect
15:07 timotimo m: $/ = "separator"
15:07 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2bb2RFQGzP␤Unsupported use of $/ variable; in Perl 6 please use the filehandle's .nl-in attribute␤at /tmp/2bb2RFQGzP:1␤------> 3$/7⏏5 = "separator"␤»
15:07 Juerd Perl 5 already has better error messages than most programming languages, because it says "near ..." instead of just blurting out a line number that isn't even correct...
15:08 ianm Agreed Juerd
15:08 timotimo and with RAKUDO_VERBOSE_STACKFRAME or whatever it's called you even get the lines around an error in your backtraces
15:08 Juerd And Perl 5 tries to help you find where blocks began if you leave out the }
15:08 Juerd Perl 6 just takes this idea ten steps further :)
15:08 ianm Love it
15:08 timotimo we don't have something clever for missing } though, right?
15:09 timotimo did you see the "misleading indentation" errors that gcc (or was it clang?) now has?
15:09 Juerd I really like the help you get when you misspell something:
15:09 Juerd m: sub prin { }; pritn "Hi";
15:09 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tpu5Ecg_FO␤Undeclared routine:␤    pritn used at line 1. Did you mean 'print', 'prin', 'printf'?␤␤»
15:10 ianm This is pretty slick having this channel around while I'm in this intro class. Thanks everyone.
15:11 timotimo i initially put that code in :D
15:11 timotimo ianm: don't get too distracted by irc from the course :D
15:11 ianm LOL timotimo
15:12 timotimo don't L O too L, or you'll disturb the course :P
15:12 ianm Good point ;)
15:14 tadzik perl 5 will stay "syntax error in line <last line of file>" if you forget a } in a hash dereference though :)
15:17 molaf joined #perl6
15:18 Juerd m: %foo{
15:18 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kvaXNFnjrK␤Unable to parse expression in subscript; couldn't find final '}' ␤at /tmp/kvaXNFnjrK:1␤------> 3%foo{7⏏5<EOL>␤    expecting any of:␤        list composer␤»
15:18 Juerd m: sub foo {
15:18 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JDxp4anI35␤Missing block␤at /tmp/JDxp4anI35:1␤------> 3sub foo {7⏏5<EOL>␤»
15:19 Juerd The former is significantly more helpful
15:21 domidumont joined #perl6
15:22 ianm I've never used le or ge in a string comparison... cool
15:22 dha I'm forgetting, on what basis do the text comparison operators compare (gt, lt, etc)?
15:22 dha Unicode code point?
15:23 kurahaupo joined #perl6
15:24 [Coke] dha: https://design.perl6.org/S15.html#NFG
15:25 samb1 joined #perl6
15:25 dha So... in terms that humans can understand, Unicode code points? :-)
15:25 [Coke] ... basically.
15:26 [Coke] p6 tries hard to do DTRT with combining chars so you can ignore them.
15:26 kurahaupo joined #perl6
15:26 [Coke] er, ignore the fact that unicode lets you do it more than one way
15:27 geekosaur p6 tries to do something sensible and consistent with something that isn't very consistent and sometimes is dubiously sensible >.>
15:27 dha So... we're reduced to using Facebook relationship status to describe this? :-)
15:28 dha "It's complicated"
15:28 [Coke] dha - you asked for the simple version, so yup. :)
15:28 dha How about "generally Unicode code points, but there are some edge cases"?
15:28 timotimo geekosaur: sorting properly according to locale isn't perl6 core, it ought to go into a module, IMO.
15:28 dha this came up in the intro tutorial, so Im trying to find an answer that I can provide in that context.
15:30 geekosaur dha, anything that intercts with sociopolitical issues is "It's complicated". and unicode is right in the middle of that since it's trying to deal with natural language representation on a global basis
15:30 [Coke] dha - sure
15:31 geekosaur timotimo, I'm not even going that far. I mean multiple normal forms, weirdshit like Greek question marks, etc. "sort by codepoint" is already in trouble with á's multiple representations...
15:31 timotimo ah
15:31 timotimo well, perl6 deals with that for you
15:31 geekosaur (and yes NFG is how p6 deals with this, but it is itself a compromise)
15:31 [Coke] greek question marks are handled.
15:31 timotimo "greek question mark" turns into ; immediately during the NFG algorithm
15:32 [Coke] using the builtin property for that sort of thing. there are a few chars that have that.
15:32 jnthn iirc, those two are part of NFC, rather than an NFG-specific thing
15:32 geekosaur so it's consistent with itself but not necessarily with how other things sort "by codepoint" --- not because p6 has issues but because *Unicode* has issues
15:32 jnthn (And yes, agree with geekosaur, "it's complicated" :))
15:34 timotimo yeah
15:35 geekosaur (and p6 is on the "it's complicated" end rather than the "it came from r'l'yeh" end)
15:38 timotimo hmm. our nqp repository has 57 open issues
15:38 timotimo i wonder if someone should go through and see if any of them have become solved or irrelevant since their last interaction
15:39 pRiVi joined #perl6
15:43 mephinet joined #perl6
15:45 ianm joined #perl6
15:46 ssotka joined #perl6
15:47 ianm "No compiler available for Perl v6.c" when attempting to bootstrap panda. I've installed build-essential, any other ideas?
15:48 ugexe whats your `perl6 -v`
15:48 ianm This is perl6 version 2015.11 built on MoarVM version 2015.11
15:49 ugexe you probably need to upgrade, that was a month before the first release
15:49 stmuk hmm pkgsrc seem to have bumped moar's libuv to 1.9!
15:49 ianm lol
15:49 ianm ok will do ugexe, thanks for the info
15:49 timotimo stmuk: well, as long as it works ... :)
15:54 stmuk actually it seems to fail some nqp tests :/ t/nqp/60-bigint.t & t/hll/06-sprintf.t
16:01 dha joined #perl6
16:08 MadcapJake timotimo: how do I change the color of a node in graphviz? (graphviz site isn't loading for me, for some reason)
16:08 ugexe timotimo: if i find an nqp issue that is irrelevant now should i just leave a comment, or make a list?
16:09 timotimo MadcapJake: it goes down sometimes, yeah. i think it's "   foo [fillcolor=red]" maybe it needs [style=filled,fillcolor=...] or [style=filled,color=red]
16:09 timotimo ugexe: leave comment and close, or collect a list for someone else to go over if you don't feel confident in just closing
16:11 ugexe ok. i'll leave a comment and make a list for someone else to close, as it won't let me close issues on nqp
16:12 timotimo oh, OK
16:12 nicqbot joined #perl6
16:14 stmuk argg it's not the libuv version breaking pkgsrc maybe its because their's is a so?
16:14 timotimo hm, shouldn't we be able to dynamically link to libuv?
16:15 stmuk dunno it could be something else
16:19 stmuk was libffi a parrotism?
16:19 timotimo um, i don't think so
16:19 kurahaupo left #perl6
16:19 timotimo wasn't parrot on dyncall, too?
16:20 kurahaupo joined #perl6
16:20 timotimo .seen froggs
16:20 yoleaux I saw FROGGS 27 Mar 2016 22:29Z in #perl6: <FROGGS> jnthn++
16:20 timotimo :(
16:21 ugexe i believe i needed to use libffi for a moarvm netbsd build at one point when i couldnt get dyncall to compile
16:25 ianm is standard input always of type string?
16:25 khw joined #perl6
16:26 avalenn joined #perl6
16:26 ilmari m: $*IN.WHAT.say
16:26 camelia rakudo-moar ad8265: OUTPUT«(Handle)␤»
16:27 ilmari m: say $*IN
16:27 camelia rakudo-moar ad8265: OUTPUT«IO::Handle<IO::Special.new(what => "<STDIN>")>(opened, at octet 0)␤»
16:27 RabidGravy m: say $*IN.read(10, :bin)
16:27 camelia rakudo-moar ad8265: OUTPUT«Buf[uint8]:0x<43 c3 a9 61 64 20 73 6c c3 a1>␤»
16:27 RabidGravy so no
16:28 stmuk ugexe: sounds related
16:28 st_iron joined #perl6
16:28 st_iron hello my friends
16:29 pmurias hi
16:29 st_iron hello pmurias
16:29 ianm cool ilmari and RabidGravy , thanks
16:38 CJKinni joined #perl6
16:43 alva_ joined #perl6
16:44 RabidGravy So, that all seems good, haven't the faintest how to test the inputs though
16:47 RabidGravy someone be a love and bring round eight small solenoids and an eight way darlington array
16:47 RabidGravy I think we need Perl 6 playing a xylophone
16:51 ugexe nqp#192 and nqp#235 can be closed
16:52 timotimo RabidGravy: have you seen Jack Conte's music video "pedals"?
16:52 timotimo or his "thrift shop" cover?
16:54 RabidGravy nah
16:54 timotimo https://www.youtube.com/watch?v=zF60E3J1dSM
16:54 timotimo he's playing his Launchpad together with a 4-solenoid thingie he built
16:54 ZoffixW joined #perl6
16:54 ZoffixW m: my $x = "\x200C\x200C\x200C"; my $level = 0; for $x.comb { $level++ if $_ eq "\x200C"; $level-- if $_ eq "\x200D"; }; say $level
16:54 camelia rakudo-moar ad8265: OUTPUT«0␤»
16:55 ZoffixW m: my $x = "\x200C\x200D\x200C"; my $level = 0; for $x.comb { $level++ if $_ eq "\x200C"; $level-- if $_ eq "\x200D"; }; say $level
16:55 camelia rakudo-moar ad8265: OUTPUT«0␤»
16:55 ZoffixW Why does this happen? I expected $level to be 3 in the first run and 2 in the second.
16:55 timotimo m: say "\x200C\x200C\x200C".comb.perl
16:55 camelia rakudo-moar ad8265: OUTPUT«("‌‌‌",).Seq␤»
16:55 ZoffixW m: .say for "\x200C\x200D\x200C".uninames
16:55 camelia rakudo-moar ad8265: OUTPUT«ZERO WIDTH NON-JOINER␤ZERO WIDTH JOINER␤ZERO WIDTH NON-JOINER␤»
16:56 hotel joined #perl6
16:56 RabidGravy I'm not sure I'd trust a 500 quid ableton push controller with those solenoids TBH :-O
16:56 timotimo it obviously disappears before the for even runs
16:56 jnthn m: say "\x200C\x200C\x200C".chars
16:56 camelia rakudo-moar ad8265: OUTPUT«1␤»
16:57 jnthn It's a single grapheme
16:57 ZoffixW dam
16:57 ZoffixW Is there a way to tell .comb to do it by chars?
16:57 jnthn So, correct. :)
16:57 jnthn It *is* doing it by chars.
16:57 jnthn If you want to work at Unicode codepoint level, you'd need Uni
16:57 timotimo yeah, man. get a proper education at your uni, man!
16:57 ZoffixW Or by... THINGS.... I want it to give me "\x200C", "\x200C", "\x200C" lol
16:58 timotimo m: say '\x200C\x200C\x200C".split(/ <before \\> /).perl
16:58 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O7Yn7e0mY8␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/O7Yn7e0mY8:1␤------> 3x200C\x200C".split(/ <before \\> /).perl7⏏5<EOL>␤    expecting any of:␤        argu…»
16:58 timotimo m: say '\x200C\x200C\x200C'.split(/ <before \\> /).perl
16:58 camelia rakudo-moar ad8265: OUTPUT«("", "\\x200C", "\\x200C", "\\x200C")␤»
16:58 timotimo there you go
16:58 jnthn :P
16:58 ZoffixW heh
16:59 jnthn m: say "\x200C\x200C\x200C".NFC.map({ .chr })
16:59 camelia rakudo-moar ad8265: OUTPUT«(‌ ‌ ‌)␤»
16:59 jnthn m: say "\x200C\x200C\x200C".NFC.map({ .chr }).perl
16:59 camelia rakudo-moar ad8265: OUTPUT«("‌", "‌", "‌").Seq␤»
16:59 jnthn Like that
16:59 ZoffixW Interesting. Thanks, jnthn++
17:01 araujo_ joined #perl6
17:01 RabidGravy joined #perl6
17:03 ZoffixW Looks like it's a really slow operation, eh?
17:03 timotimo what is?
17:03 ZoffixW NFC stuff
17:03 timotimo oh?
17:03 timotimo well, it probably didn't get lizmat'd yet :P
17:03 ZoffixW :)
17:04 timotimo in theory it wouldn't be slower than a Buf[int16] or whatever
17:04 timotimo well, Blob probably, as it's immutable (isn't it?)
17:04 ZoffixW Maybe my program is wrong.... It's still sitting there :/
17:07 timotimo could be wrong, yeah :(
17:07 ZoffixW Yeah, nevermind, it's not NFC. I just tried only that part and it works fast.
17:08 timotimo strange
17:08 timotimo hopefully you can find the problem :)
17:08 buharin joined #perl6
17:08 timotimo i had a sudden realization that it'd be pretty cool to have something that can automatedly hook up to a moarvm process and tell you where in the code it's running right now, so you can spot endless loops and such
17:08 ZoffixW I'm trying to make an Anguish parser... Wasted hours on it already. The name is appropriate :P
17:09 timotimo i have no idea what Anguish is :|
17:09 timotimo is that the DSL the angular people came up with for angular 2 ? :)
17:09 ZoffixW Nah, it's a language I invented. It's like Brainfuck, but uses invisible characters :P
17:09 * ZoffixW will write an article today about it
17:09 timotimo oh!
17:09 timotimo fantastic!
17:09 timotimo so even worse than whitespace?
17:10 ZoffixW Yeah :D
17:10 timotimo "every anguish program is just a single grapheme!"
17:10 ZoffixW heh
17:10 mst now I want to see a bf dialect that uses different unicode single quote characters so you can't tell the difference in most fonts
17:15 ianm Wow - adverbs - nice
17:15 ianm say "There?: ", %h<missing>:exists ?? 'Yes' !! 'No';
17:20 firstdayonthejob joined #perl6
17:20 dalek doc: 0d9dc28 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket/Async.pod:
17:20 dalek doc: Fixed broken link
17:20 dalek doc: review: https://github.com/perl6/doc/commit/0d9dc28d07
17:20 dha I'm tempted to say we should have some kind of general description of adverbs in the docs if we don't already, as they're a fairly unusual construct in programming languages.
17:21 CJKinni_ joined #perl6
17:21 timotimo i agree we should. we don't have that already?
17:21 dha I don't know offhand.
17:21 dha And I was thinking I might know offhand if we did. :-)
17:23 geekosaur http://design.perl6.org/S02.html#Subscript_adverbs
17:23 timotimo oh yikes
17:24 geekosaur seems to be the first mention of them in the specs
17:24 timotimo someone tweets a pic about the perl6 tutorial "good turnout" and only 3 people are visible on the picture >_<
17:24 timotimo the specs aren't sufficient for documentation purposes
17:24 geekosaur yeh
17:24 dha timotimo -  exactly.
17:24 geekosaur bu the language documentation is even more sparse...
17:25 dha also, there are definitely more than 3 people here. :-)
17:25 geekosaur seems like every time I want to look something up in the language doc I end up going to the spec instead because it hasn't been documented yet
17:25 dha geekosaur -  well, that's the point of discussions like this, we're trying to make it less sparse.
17:25 timotimo dha: what, 4 people? :)
17:25 dha :-p
17:26 araujo joined #perl6
17:26 timotimo i'm just saying, that picture seems pretty bad in terms of PR
17:26 dha geekosaur -  In fact, if, when you find yourself doing that, please feel free to add to the language docs! :-)
17:26 mst maybe a start would be to provide doc headings that contain a link to the spec and a note that it should be turned into actual docs
17:26 mst split the effort up a bit
17:26 dha yeah, a picture like that is probably counter-productive.
17:27 dha mst - I would endorse that. I know there were a whole slew of TODOs in the docs ('cause I put a lot of them in...)
17:27 dha But in those cases, I was mainly looking at doc headings without actual documentation. I haven't gone through the design docs to see what's there, but not in the standard docs.
17:28 huggable joined #perl6
17:31 ianm Great intro by Jeff. Thanks everyone for your help
17:31 ZoffixW \o/
17:31 ZoffixW huggable, hug DrForr
17:31 * huggable hugs DrForr
17:32 mohae_ joined #perl6
17:32 ZoffixW m: "\x[FEFF]".uninames.say
17:32 camelia rakudo-moar ad8265: OUTPUT«(ZERO WIDTH NO-BREAK SPACE)␤»
17:32 ZoffixW Turns out ^ that is also a BOM -_- and being the first char in my file was the source of my last bug
17:33 ZoffixW "All tests successful."
17:33 ZoffixW Now, I can finally finish the article :P
17:34 timotimo ugh, BOMs
17:34 dha And it's lunchtime!
17:34 ianm Yep, I've ran into those pesky things too with unicode
17:34 ianm yahoo dha
17:36 timotimo we can't leave BOM support out because windows programs still output that shit
17:36 timotimo either way, we're screwed
17:37 AlexDaniel joined #perl6
17:38 AlexDaniel Zoffix: https://jgraph.github.io/mxgraph/docs/manual.html
17:38 AlexDaniel Zoffix: can you read that?
17:38 AlexDaniel I mean, next step is probably white text on white background
17:39 ZoffixW Hehe. Well, I had to zoom in :)
17:40 nicqbot What are BOM's?
17:40 timotimo Byte Order Mark
17:40 ZoffixW nicqbot, https://en.wikipedia.org/wiki/Byte_order_mark
17:40 dalek doc: 331bdb9 | Coleoid++ | doc/ (7 files):
17:40 dalek doc: Proofreading some POD
17:40 dalek doc: review: https://github.com/perl6/doc/commit/331bdb95b1
17:40 dalek doc: 9c6a4a7 | (Jason Cole)++ | doc/Language/c (2 files):
17:40 dalek doc: Proofreading and light edits of docs
17:40 dalek doc: review: https://github.com/perl6/doc/commit/9c6a4a79e1
17:40 dalek doc: d4d0a0b | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/ (9 files):
17:40 timotimo it's supposed to go at the beginning of a utf* encoded file to point out in what order the operating system stores multi-byte sequences
17:40 dalek doc: Merge pull request #518 from Coleoid/master
17:40 dalek doc:
17:40 dalek doc: Typos, grammar, etc.
17:40 dalek doc: review: https://github.com/perl6/doc/commit/d4d0a0b029
17:42 AlexDaniel mmhm two commits with different names
17:42 nicqbot So to tell if the following text is utf-8/-16/-32?
17:43 timotimo nah, for that you need only look for null bytes
17:43 ugexe there is no magic bullet
17:43 timotimo i guess?
17:43 timotimo well, it's not 100% reliable
17:43 timotimo but it can be guessed based on that
17:43 ugexe create a large heuristics library
17:44 geekosaur nicqbot, BOM is inten ded to identify utf16/utf32 endianness. Microsoft abused it in UTF8 (which is prohibited by the UTF8 standard) to tell it from old-Windows code page-based text files
17:44 nicqbot Huh. So this is mostly used in Windows? No wonder I have neer heard of it...
17:45 nicqbot *never
17:45 timotimo isn't the BOM also deprecated in utf16 and utf32?
17:46 Actualeyes joined #perl6
17:46 domidumont joined #perl6
17:46 chansen_ geekosaur: When did Unicode prohibit U+FEFF ZERO WIDTH NO-BREAK SPACE from UTF-8?
17:47 geekosaur chansen_, back when that was not the mneaning of that code point and U+FFEF and permutations wre specifically reserved for byte order checking
17:48 geekosaur and it is not the zero width space that was forbidden, it was *byte order mark*. i.e. unlike utf16/utf32, utf8 was not supposed to either signal or intuit, since it is meaningless for an 8-bit encoding
17:49 geekosaur afaik making U+FEFF an effective no-op codepoint was retroactive cleanup after Microsoft's decision to use it to identify UTF8 files. (which they have since backed off from, but not all their tools have been fixed..)
17:49 chansen_ It's not prohibited, it's discouraged!
17:51 xnrand joined #perl6
17:52 chansen_ geekosaur: http://www.unicode.org/versions/corrigendum9.html
17:53 timotimo ibm is a gold sponsor for the "cloud" emoji %)
17:54 sortiz joined #perl6
17:55 sortiz \o #perl6
17:56 RabidGravy harr
17:57 timotimo harr mister gravy
17:58 sortiz m: m: use NativeCall; class Foo is repr("CPointer") is Any { method x() {  my Pointer[Foo] $a; }}; # Workaround for RabidGravy's problem
17:58 camelia rakudo-moar ad8265: ( no output )
17:58 liztormato joined #perl6
17:58 timotimo huh, the "is Any" makes it work?
17:59 sortiz Yep.
18:00 liztormato PSA: looks like I won't be able to do the Perl 6 Weekly until Tuesday
18:03 RabidGravy eugh, nasty
18:04 RabidGravy liztormato, when you do any chance of giving the noise gang a shout-out?
18:05 liztormato Sure. Anything in particular you want me to shout about?
18:06 RabidGravy just that it exists and we love people making noisey software :)
18:06 RabidGravy http://perl6.noisegang.com/
18:06 mst RabidGravy: perl6 controlling a robot playing a theremin. ISAGN
18:07 RabidGravy well when I've finished what I'm doing right now, it'll be doable
18:07 RabidGravy :)
18:08 liztormato Cool!
18:14 dogbert17 evening #perl6
18:15 RabidGravy I've got one of those robot arm kits somewhere
18:16 dogbert17 I have tried to write docs for method put in IO::Socket, does it look commitable? https://gist.github.com/dogbert17/65aed1ac79efade5ccb2ba2ea31d9350
18:16 nebg joined #perl6
18:16 itaipu joined #perl6
18:17 RabidGravy looks good to me
18:18 dogbert17 RabidGravy: thx, the src is a bit suspicious though: nqp::printfh($!PIO, nqp::unbox_s("\n"));  # XXX should be $!nl-out
18:19 RabidGravy I'm not sure I've any seen any code using that but, yes that is a bit wonky
18:21 dalek doc: 95d8ee4 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod:
18:21 dalek doc: Added docs for method 'put' in IO::Socket
18:21 dalek doc: review: https://github.com/perl6/doc/commit/95d8ee4735
18:24 sortiz timotimo, Normally he inheritance chain needed by '===' (Types.pm/L#57) is armed until compose time, so 'is Any' works as an early bootstrap, thought.
18:28 liztormato joined #perl6
18:29 timotimo interesting
18:37 nemo joined #perl6
18:37 Emeric joined #perl6
18:37 nemo I didn't want to spam the channel playing with it, but could remember the bot's name.  Responds to PM too right?
18:37 nemo oh. duh. camelia I bet
18:37 ianm joined #perl6
18:38 nemo hm. can't remember how to address it either
18:38 liztormato nemo: m:
18:39 RabidGravy I'm wondering whether a TypedPointer should return the type object for deref when it's null
18:40 liztormato m: say "foo"
18:40 camelia rakudo-moar ad8265: OUTPUT«foo␤»
18:41 RabidGravy m: use NativeCall; my $a = Pointer[int32].new; say $a.deref; # <apologies in advance>
18:41 camelia rakudo-moar ad8265: OUTPUT«(signal SEGV)»
18:42 RabidGravy LTA I'd say, but a ten character patch to fix
18:43 geekosaur X::NativeCall::Don't-Do-That
18:44 nemo https://doc.perl6.org/language/unicode_texas  is this list up to date?
18:44 RabidGravy well, I've got a library here that does that
18:45 liztormato nemo: afaik, yes
18:45 RabidGravy of course I could do "$a.Int ?? $a.deref !! Int", but in this particular case I'm going to have to type that a lot
18:47 Relsak joined #perl6
18:50 _mg_ joined #perl6
18:53 araujo_ joined #perl6
18:55 araujo_ joined #perl6
18:57 Relsak joined #perl6
18:58 * RabidGravy makes the change
19:02 RabidGravy I'm totally cool if it segfaults in the library because of stoopid developer, but not so much in the VM when rakudo can avoid it
19:03 dalek ecosystem: 7be6e67 | (Zoffix Znet)++ | META.list:
19:03 dalek ecosystem: Add Acme::Anguish
19:03 dalek ecosystem:
19:03 dalek ecosystem: Use Anguish programming language in your Perl 6 programs
19:03 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7be6e6731d
19:10 brrt joined #perl6
19:11 dha joined #perl6
19:14 timotimo there's a zero-width "function application" char o_O
19:15 timotimo that's kinda neat that that exists
19:22 * sortiz Wondering if a Bool coercer for Pointer:D can be util too.
19:23 timotimo to compare against null pointers?
19:24 sortiz yes.
19:24 yqt joined #perl6
19:24 sortiz m: use NativeCall; my $a = Pointer[int32].new; say so $a;
19:24 camelia rakudo-moar ad8265: OUTPUT«True␤»
19:24 RabidGravy yeah
19:24 sortiz m: use NativeCall; my $a = Pointer[int32].new; say so $a.Int
19:24 camelia rakudo-moar ad8265: OUTPUT«False␤»
19:24 RabidGravy I've just put https://github.com/rakudo/rakudo/pull/769
19:25 sufrostico joined #perl6
19:26 ZoffixW New blog post: "Anguish": Invisible Programming Language and Invisible Data Theft: http://blogs.perl.org/users/zoffix_znet/2016/05/anguish-invisible-programming-language-and-invisible-data-theft.html
19:27 [particle] left #perl6
19:28 ZoffixW And posted on HN too: https://news.ycombinator.com/item?id=11708923
19:30 Emeric joined #perl6
19:31 * dha glances at the Anguish article.
19:31 dha ZoffixW -  WHAT THE HECK IS WRONG WITH YOU???
19:31 ZoffixW dha, what?
19:32 b2gills dha: I'm not sure either, but I bet it's hard to pronounce
19:32 ZoffixW pffft
19:32 ZoffixW Whatever.
19:33 dha :-)
19:33 mst ZoffixW: you should totally do a perl6 Acme::Bleach using the same approach
19:33 [particle] joined #perl6
19:33 dha Like I'm one to talk. I'm the guy who implemented hq9+ in Parrot assembler.
19:33 geekosaur Acme::HF >.>
19:34 jnthn "Anguish is a language for true computer masochists who would love to question whether their program actually exists." :D
19:34 jnthn ZoffixW++
19:34 dha Hm. I should revisit my Perl6 implementation of hq9+
19:34 dha ZoffixW++ # indeed.
19:35 mst jnthn: which means it's misnamed, it should've been called Angst
19:35 brrt ZoffixW++
19:35 Emeric joined #perl6
19:36 ZoffixW RFC to disallow invisible terms and operators in Perl 6 on security grounds: https://rt.perl.org/Ticket/Display.html?id=128159
19:37 timotimo yeah, let's force identifiers and such to have at least one visible grapheme
19:39 geekosaur perl 6, the first language to have the punycode security issue >.>
19:39 ZoffixW :D
19:39 timotimo ZoffixW: i love how RT thinks the first line is a quotation
19:39 ZoffixW Ah, it's 'cause of '>' char
19:39 timotimo it wouldn't have been necessary to keep the brainfuck equivalents around for th RT
19:40 ZoffixW Oh, sorry. Rushed copy-pasta
19:40 timotimo :)
19:43 spider-mario joined #perl6
19:44 ZoffixW mst, I think someone already beat me to it: https://github.com/thundergnat/Acme-Scrub
19:44 ZoffixW (not that I have any clue how Acme::Bleach works)
19:45 timotimo it just encodes the whole file content as whitespace characters or something
19:45 timotimo like, with a source filter
19:45 timotimo and it rewrites the source file when it's first invoked
19:45 dha Acme::Bleach translates everything to spaces and tabs, IIRC.
19:46 dha Heh. "Do not use Acme::Scrub for security. See above note. You will get only slightly less effective security by putting a sticky note over your source code"
19:46 timotimo haha
19:47 tromp joined #perl6
19:48 geekosaur I am not sure I agree with the assessment of security hole, btw, unless you already have a compromise that allows you to insert those nonprintables into random scripts... and if you have that, you already have the access to do even nastier things
19:48 timotimo well, you can still underhand code easily
19:49 timotimo that's not good, imo
19:50 ZoffixW geekosaur, I wouldn't really call it a "security hole", more like... "security issue" :)
19:50 jnthn Operators are lexically scoped, so there'll be a `use` statement bringing in such craziness :)
19:50 ZoffixW A disgruntled worker shoving code into sensitive parts, for example.
19:50 jnthn And tbh, if I wanted to screw with people, I'd just export versions of built-ins like `say` or infix:<+> :P
19:50 ZoffixW lol
19:51 brrt hmmm......
19:51 brrt what about a warning?
19:51 ZoffixW A warning warning what?
19:52 timotimo "there is an invisible operator you've pulled in"
19:52 ZoffixW Is there any possible use for invisible opertors?
19:52 brrt routine ... on line x of file y is invisible
19:52 timotimo "if you want to allow the invisible operator '', please put in a 'use invisible ''"
19:52 geekosaur basically what jnthn just said. why stick to invisible operators when I can redefine something else?
19:53 ZoffixW geekosaur, because that may affect the actual program negatively, while the invisible ones are entirely your own
19:53 ZoffixW Also, that argument is akin to: why ban guns when you can beat a guy to death :P
19:54 * ZoffixW runs to catch the bus
19:59 ianm joined #perl6
19:59 dalek DBIish: a19e2da | (Salvador Ortiz)++ | lib/DBDish/Oracle (2 files):
19:59 dalek DBIish: Oracle: No longer needed 'no precompilation'
19:59 dalek DBIish: review: https://github.com/perl6/DBIish/commit/a19e2da1d6
20:04 timotimo MadcapJake: i found my grid code!
20:05 timotimo it's so pretty <3
20:07 ugexe "invisible" depends enirely on your text editor
20:08 timotimo yeah, if your text editor is b0rked, you'll see stuff there :)
20:09 Ven joined #perl6
20:09 TEttinger joined #perl6
20:15 cdg joined #perl6
20:17 hotel_california joined #perl6
20:18 pecastro joined #perl6
20:19 * sortiz think perl6.party's headers are b0rked, 'cus I see THAT stuff there but not in blogs.perl.org's copy.
20:20 ugexe visual studio is capable of handling it
20:23 * DrForr waves.
20:25 * dha particles
20:26 * DrForr wants to quantum tunnel through the floor. Wiped, but getting better.
20:27 DrForr BTW if anyone @OSCON wants a P6 badge I've got just one left, gave 2 to Larry and Gloria.
20:28 dha Wendy and Liz apparently have a bunch after you run out.
20:28 timotimo i hear your tutorial was visited by many people :)
20:28 timotimo attended, even
20:28 dha More than 3, even!
20:28 _dolmen_ joined #perl6
20:28 DrForr Apparently so. I counted 30-35.
20:29 DrForr The entire left side of the room was a sea of light, couldn't see a damn thung.
20:30 MadcapJake timotimo: neat! Got it up somewhere I can take a look?
20:32 DrForr I'll put yhe (corrected) dlides up tonight.
20:32 timotimo MadcapJake: sure!
20:32 timotimo you'll need Terminal::ANSIColor
20:33 DrForr RabidGravy: perl6-noise did get a callout.
20:33 timotimo https://gist.github.com/timo/32cdd8ee9a602e6e75180e9e84d014d0
20:33 RabidGravy yay!
20:33 RabidGravy DrForr++
20:34 DrForr I bsrely had the time to get tgeough the basics, peopke kept asking quesrions.
20:34 timotimo oh no, not questions! not people!!
20:34 moritz m: [&&] 0, say 42
20:34 camelia rakudo-moar ad8265: ( no output )
20:35 Actualeyes joined #perl6
20:35 DrForr Users. It had to be users.
20:35 timotimo MadcapJake: i'm thinking i'll add weighting to the grid version for extra fun
20:35 timotimo :D
20:36 MadcapJake haha nice! I'll take a look in a bit.
20:36 dalek doc: 0479386 | (Jan-Olof Hendig)++ | doc/Type/Metamodel/Primitives.pod:
20:36 dalek doc: Fixed another broken link
20:36 dalek doc: review: https://github.com/perl6/doc/commit/0479386a25
20:38 DrForr What's the URL for the chat logger?
20:39 moritz https://irclog.perlgeek.de/perl6/today
20:39 moritz irc.perl6.org redirects there
20:40 DrForr Found it by other meabs, thankd.
20:43 dha Oh, DrForr ... I forgot to congratulate you on sneaking a Wild Man Fisher reference into your slides. :-)
20:45 xnrand joined #perl6
20:46 Emeric joined #perl6
20:48 DrForr I was wonderong if anyone would get thst.
20:49 Zoffix Yeah, I think I've missed an encoding/decoding step on perl6.party somewhere. And on my phone, even the blogs.perl.org article shows up with boxes for some chars :(
20:49 sufrosti1o joined #perl6
20:49 DrForr Probably most people thought it eas a differwnt Larry.
20:50 moritz dyslexic keyboard?
20:50 timotimo i have no idea what wild man fisher is
20:50 timotimo dyslectric?
20:51 DrForr Galaxy 5 witjout sutocorrect.
20:51 timotimo ugh, a samsung device?
20:51 timotimo those have horrible modifications to android in them :S
20:51 DrForr Well, it's this or hauling around a huge honkin'laptop all dsy.
20:53 DrForr I was yhinking avout getting a replacement tablet while I'm here anyway, the one I've got has a crack ftom yop yo bottom.
20:53 dha DrForr -  were you really wondering if *I* would get it? :-)
20:54 Zoffix Oh, god. github-- now they hid the clone URL under a click ~_~
20:54 dha https://en.wikipedia.org/wiki/Wild_Man_Fischer
20:54 dalek doc: f097697 | (Jan-Olof Hendig)++ | doc/Type/Mu.pod:
20:54 dalek doc: Two more broken links fixed
20:54 dalek doc: review: https://github.com/perl6/doc/commit/f0976970bc
20:55 DrForr dha - no, O'd expect ypu yo get it, I was wondetong about oyhers in the audience.
20:55 dha Zoffix -  I'm in a Swift tutorial, and they just mentioned that you can use any unicode character in Swift, but then corrected that to any *printable* unicode character. I thought of Anguish. :-)
20:55 Zoffix ha :D
20:56 DrForr Ooo, we should redo Acme::Bleach, just think of the possibilities. I wonder if there's combining whitesoace.
20:57 moritz I really hope not.
21:03 * geekosaur didn't see one
21:05 Emeric joined #perl6
21:07 silug joined #perl6
21:11 * Zoffix fixed perl6.party Unicode rendering...
21:11 Zoffix Though I'm bummed some of the chars in my Anguish article actually do show up as... filled circles :S http://perl6.party/post/Anguish--Invisible-Programming-Language-and-Invisible-Data-Theft
21:12 Zoffix Pretty much the only place where my Invisible Language works is the box I wrote the article on ????????
21:14 mst it worked here
21:14 hotel joined #perl6
21:16 Emeric1 joined #perl6
21:20 hotel_california joined #perl6
21:20 Emeric joined #perl6
21:21 timotimo damn
21:21 timotimo there's no way to make .first return the previous one to the one that first matched, is there?
21:21 timotimo i'd negate my condition and use :end, but i'm working with an infinite sequence here
21:22 jnthn timotimo: Don't think so, but you could :k to get the index that matches and then grab that...but of course then you'd need a list and be caching your head
21:22 timotimo ah, right
21:22 timotimo i've already had to put the list into an @'d variable for some reason
21:23 timotimo not entirely sure why it gave me the "already exhausted" message, but perhaps i can golf it
21:23 Emeric joined #perl6
21:24 timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = "A" X~ 1..*; $nameseq.first({ not any(@nodes) eq $_ }).perl.say
21:24 camelia rakudo-moar e239f6: OUTPUT«(timeout)»
21:25 timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = "A" X~ 1..*; $nameseq.first({ say $_; not any(@nodes) eq $_ }).perl.say
21:25 timotimo i think i have to use Z
21:25 timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = ("A" xx *) Z~ 1..*; $nameseq.first({ say $_; not any(@nodes) eq $_ }).perl.say
21:25 camelia rakudo-moar e239f6: OUTPUT«(timeout)»
21:25 camelia rakudo-moar e239f6: 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/4muTZPJn_1 line 1␤␤»
21:25 timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = ("A" xx *) Z~ 1..*; $nameseq.first({ say $_; not any(@nodes) eq $_ })
21:25 camelia rakudo-moar e239f6: 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/aInZ6BXhKM line 1␤␤»
21:25 timotimo it might be a bug in first?
21:25 kurahaupo joined #perl6
21:25 timotimo m: my $testseq = 1..*; say $testseq.first({ rand < 0.1 })
21:25 camelia rakudo-moar e239f6: OUTPUT«68␤»
21:26 timotimo m: my $testseq = ("A" xx *) Z~ (1..*); say $testseq.first({ rand < 0.1 })
21:26 camelia rakudo-moar e239f6: 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/upduZMTNr9 line 1␤␤»
21:26 jnthn 11.* ain't a Seq though
21:26 timotimo m: my $testseq = ("A" xx *); say $testseq.first({ rand < 0.1 })
21:26 camelia rakudo-moar e239f6: OUTPUT«A␤»
21:26 jnthn uh, 1..*
21:26 timotimo oh? right, just a Range
21:26 jnthn That xx * is though
21:26 wamba joined #perl6
21:27 timotimo wouldn't the Z~ result in a lazy sequence regardless?
21:27 espadrine joined #perl6
21:27 jnthn Should do
21:27 jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my $testseq = ("A" xx *) Z~ (1..*);
21:27 camelia rakudo-moar e239f6: ( no output )
21:27 jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my $testseq = ("A" xx *) Z~ (1..*); say $testseq[^5]
21:27 camelia rakudo-moar e239f6: OUTPUT«(A A A A A)␤»
21:28 jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my $testseq = ("A" xx *) Z~ (1..*); say $testseq.first('A')
21:28 camelia rakudo-moar e239f6: 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/d_xzCPA4o0 line 1␤␤»
21:28 jnthn Hmm
21:28 huggable joined #perl6
21:28 jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my \testseq = ("A" xx *) Z~ (1..*); say testseq.first('A')
21:28 camelia rakudo-moar e239f6: OUTPUT«(timeout)»
21:28 jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my \testseq = ("A" xx *) Z~ (1..*); say testseq.first('A1')
21:28 camelia rakudo-moar e239f6: OUTPUT«A1␤»
21:29 timotimo it uses AT-POS to grab the result out after it found the key with self!first-result
21:29 jnthn D'oh
21:29 jnthn That won't end well
21:29 Zoffix Wooo: "Hey, just want to let you know I'm really enjoying your Perl 6 posts, they've inspired me to boot up perl6 several times -- thanks!"
21:29 Zoffix yey users \o/
21:29 jnthn Nice :)
21:29 jnthn Time for some rest...'night
21:30 hotel joined #perl6
21:30 chansen_ dha: let ​ = "ZERO WIDTH SPACE"; print(​); // Works just fine in Swift! <https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID412>
21:31 dha I'll have to let them know. :-)
21:31 timotimo wait, no
21:31 timotimo it's the other way around
21:32 timotimo i think i was wrong to accuse the first method of being wrong
21:32 [Coke] or you're wrong now. Either way you're wrong.
21:32 * [Coke] drops mic and heads home.
21:32 timotimo i'm all the wrongs
21:38 timotimo Zoffix: well done! i also enjoy your blog posts :)
21:40 hotel_california joined #perl6
21:50 kid51 joined #perl6
21:53 timotimo turns out my path finding had a derp that let it re-add nodes a bajillion times
21:53 timotimo it suddenly does whole-graph searches on a 400-node graph in a split second, rather than between a second and a minute
21:53 timotimo just my output algorithm isn't fast yet :)
22:00 Zoffix Thanks.
22:07 x86 joined #perl6
22:09 Sgeo_ joined #perl6
22:18 timotimo MadcapJake: i updated it with the version that's at least 1000x faster
22:27 |2701 joined #perl6
22:29 RabidGravy right toodles
22:32 xenowoolfy joined #perl6
22:34 willthechill joined #perl6
22:35 xenowoolfy Austin, Texas: OSCON just started. Tonight at 19:00 the BOF sessions (birds of a feather) will have a Perl-session.
22:35 xenowoolfy All are welcome. Especially TimToady++
22:37 xenowoolfy Today opened with DrForr giving an introduction to Perl 6, for 4 hours, well-received by over 30 attendeed!
22:37 timotimo http://www.flexboxdefense.com/  -  a tower defense game where you place your towers using the new nice CSS properties of the "flex box" set
22:40 xenowoolfy Perl BOF at OSCON in room 9ABC at 19:00
22:44 timotimo xenowoolfy: can you tell me the current localtime so i can understand when 19:00 will be?
22:46 xenowoolfy Hihi of course... Austin Texas... It is 17:45 now. And a BOF is a 'physical meeting'. :-)
22:46 Zoffix :)
22:46 timotimo thank you!
22:46 timotimo at that time i might even still be awake
22:48 xenowoolfy Awake is good.
22:50 timotimo depends. it'll be ~3am locally by then :)
22:51 xenowoolfy Yeah, but we probably will all be very awake and maybe not online.
22:51 xenowoolfy We as in people at the BOF
22:52 jdv79 what happens at these bof things?
22:54 timotimo birds get feathered
22:54 timotimo (no tar allowed, though)
22:54 timotimo m: say ("A".."AJ").list
22:54 camelia rakudo-moar e239f6: OUTPUT«(A)␤»
22:54 timotimo :\
22:55 timotimo am i in the wrong to expect this to work?
22:55 jdv79 what should it do?
22:56 timotimo give me A through Z followed by AA through AJ
22:56 timotimo m: say ("1".."16").list
22:56 camelia rakudo-moar e239f6: OUTPUT«(1)␤»
22:56 timotimo oh, huh
22:56 timotimo m: say ("1"..16).list
22:56 camelia rakudo-moar e239f6: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)␤»
22:57 timotimo that must be why it works in my code but only for the numbe rcase
22:57 xenowoolfy BOF is basically a Perl Monger meeting. :-)  sit and stand together, talk, maybe we have some food and drink.
22:58 xenowoolfy BOF is also exchanging info, show off programs, ask questions and hope for useful answers
22:58 timotimo m: say ("A"..*)[^30]
22:58 camelia rakudo-moar e239f6: OUTPUT«(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD)␤»
22:59 AlexDaniel m: .say for (‘aa’..‘acc’)
22:59 camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ac␤»
22:59 AlexDaniel m: .say for (‘aa’..*)
22:59 AlexDaniel oops
22:59 AlexDaniel m: .say for (‘aa’..*)[15]
22:59 AlexDaniel m: .say for (‘aa’..*)[^15]
22:59 camelia rakudo-moar e239f6: OUTPUT«(timeout)aa␤ab␤ac␤ad␤ae␤af␤ag␤ah␤ai␤aj␤ak␤al␤am␤an␤ao␤ap␤aq␤ar␤as␤at␤au␤av␤aw␤ax␤ay␤az␤ba␤bb␤bc␤bd␤be␤bf␤bg␤bh␤bi␤bj␤bk␤bl␤bm␤bn␤bo␤bp␤bq␤br␤bs␤bt␤bu␤bv␤bw␤bx…»
22:59 camelia rakudo-moar e239f6: OUTPUT«ap␤»
22:59 camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ac␤ad␤ae␤af␤ag␤ah␤ai␤aj␤ak␤al␤am␤an␤ao␤»
23:01 timotimo m: .say for ('aa'..'bb')
23:01 camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ba␤bb␤»
23:01 timotimo oh, it does it on every "digit" individually in that case
23:01 timotimo no, er, not that
23:01 timotimo m: .say for ('aa'..'zb')
23:01 camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ba␤bb␤ca␤cb␤da␤db␤ea␤eb␤fa␤fb␤ga␤gb␤ha␤hb␤ia␤ib␤ja␤jb␤ka␤kb␤la␤lb␤ma␤mb␤na␤nb␤oa␤ob␤pa␤pb␤qa␤qb␤ra␤rb␤sa␤sb␤ta␤tb␤ua␤ub␤va␤vb␤wa␤wb␤xa␤xb␤ya␤yb␤za␤z…»
23:01 timotimo it takes every digit-place as a separate range
23:01 AlexDaniel what?
23:02 timotimo well, in 'aa'..'zb' it iterates the first from a through z and the second from a to b
23:02 timotimo because those are the end points
23:03 AlexDaniel I mean, maybe that's dwimmy, but it is definitely wtf-y as well…
23:03 timotimo we call it WAT-y
23:04 AlexDaniel so, that does not work
23:04 AlexDaniel m: .say for (‘zx’..‘aab’)[^5]
23:04 camelia rakudo-moar e239f6: OUTPUT«Nil␤Nil␤Nil␤Nil␤Nil␤»
23:04 AlexDaniel but that does
23:04 AlexDaniel m: .say for (‘zx’..*)[^5]
23:04 camelia rakudo-moar e239f6: OUTPUT«zx␤zy␤zz␤aaa␤aab␤»
23:04 AlexDaniel huggable: dunno
23:04 huggable AlexDaniel, ¯\_(ツ)_/¯
23:07 timotimo yah, it only kicks in when you have a defined endpoint, and probably also only if they are the same length
23:07 timotimo not sure what's up with the aa .. acc example, though
23:12 hotel_california joined #perl6
23:13 jdv79 joined #perl6
23:13 skids joined #perl6
23:16 xenowoolfy joined #perl6
23:16 _28_ria joined #perl6
23:17 AlexDaniel timotimo: can you guess what is going to happen if you do ‘’..‘abc’ ?
23:18 AlexDaniel timotimo: and a bonus question: what happens if you do ‘’..‘’ ?
23:19 timotimo from what i've seen in the recent minutes, i'd expect empty list for both
23:19 timotimo m: .say for ''..''
23:19 camelia rakudo-moar e239f6: OUTPUT«␤»
23:19 timotimo m: .say for ''..'abc'
23:19 timotimo it's a timeout instead, though?
23:19 tromp left #perl6
23:19 AlexDaniel m: dd (‘’..‘’)[^20]
23:19 camelia rakudo-moar e239f6: OUTPUT«(timeout)␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤…»
23:19 camelia rakudo-moar e239f6: OUTPUT«("", Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil)␤»
23:20 timotimo oh, huh
23:20 AlexDaniel m: dd (‘’..‘abc’)[^20]
23:20 camelia rakudo-moar e239f6: OUTPUT«("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")␤»
23:20 timotimo edge cases, edge cases
23:20 AlexDaniel timotimo: there's another one: *..‘abc’
23:20 timotimo to expect that to give anything sane is nothing short of madness
23:20 timotimo what does it give, though?
23:20 AlexDaniel correct!
23:21 AlexDaniel m: dd (*..‘abc’)[^20]
23:21 camelia rakudo-moar e239f6: OUTPUT«(-Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf)␤»
23:21 teatime NaNNaNNaNNaNNaNNaNNaNNaNNaN Watman!
23:21 timotimo hahaha
23:22 xenowoolfy_ joined #perl6
23:23 AlexDaniel well, more stuff. I don't think that anybody can guess that
23:23 AlexDaniel m: dd (*...‘abc’)[^20]
23:23 camelia rakudo-moar e239f6: OUTPUT«===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
23:23 AlexDaniel m: dd (*...‘’)[^20]
23:23 camelia rakudo-moar e239f6: OUTPUT«===SORRY!===␤Method 'pred' not found for invocant of class 'Whatever'␤»
23:24 AlexDaniel m: say ‘hi’; dd (*...‘abc’)[^20]
23:24 camelia rakudo-moar e239f6: OUTPUT«hi␤===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
23:24 AlexDaniel Look! A run time SORRY ?
23:25 * geekosaur bets on dd doing ev[ia]l things
23:26 AlexDaniel m: say ‘hi’; say (*...‘abc’)[^20]
23:26 camelia rakudo-moar e239f6: OUTPUT«hi␤===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
23:26 geekosaur huh
23:26 AlexDaniel WAT :]
23:27 geekosaur WATever star :p
23:28 AlexDaniel some might argue that you should not be doing that kind of things anyway… but I don't know… It takes one lightning talk to make a lot of noise about such things
23:29 cpage_ joined #perl6
23:32 AlexDaniel Zoffix: I'm not sure if I understand your point. “in one module I can define this invisible operator” well, can't you just change the whole grammar and steal these variables anyway? Or am I wrong?
23:34 AlexDaniel Zoffix: “I can't think of any useful case” – THEN LET'S FORBID IT! Well, dunno, perhaps it can be useful in some whitespace slang? Wasn't it you who was creating a language that is based on whitespace characters?
23:34 Zoffix heh
23:35 Zoffix AlexDaniel, a single line of "debug code" is much easier to sneak in than something that redefines the whole grammar.
23:36 Zoffix I dunno... I found some crazy stuff in a language, I said "This is nuts. Maybe we should ban it"... That's all there is to it. I'm not married to it :)
23:36 AlexDaniel Zoffix: actually, it is the opposite. If some malicious module redefines the grammar, then there's no need to try to put some whitespace characters into your code
23:36 geekosaur ... if I banned crazy stuff in a language, much of C++ wouldn't exist >.>
23:37 Zoffix AlexDaniel, but you have to "use" the malicious code.
23:37 AlexDaniel Zoffix: if you are not “use”-ing any malicious code, then where would your whitespace op come from?
23:38 Zoffix If my Useful.pm6 defines a single line of "debug" code it's much less likely to raise eyebrows than something that redefines the grammar
23:40 Zoffix I think geekosaur brought up a similar point. That this is not malicious, because a malicious coder could use XYZ to wreck havoc anyway. My take on this is: you enter a tool shed, you see an axe, a rake, and a spiky club. I tell you "bruh, get rid of that spiky club. It's useless and you'll poke your eye out!" And the response I get is "Hell, why would I do that when I could cut my finger off with the axe! And maybe, just maybe, one day I'll find the
23:40 Zoffix use for the spiky club" :)
23:41 AlexDaniel Zoffix: actually, it sounds right
23:41 Zoffix There's actually some inconsistency in the language. Not all invisible Cf chars can be used. So, why some invisible Cf chars but not the others?
23:42 AlexDaniel yea, let's allow all invisible characters :D
23:42 AlexDaniel anyway, I dunno
23:42 Zoffix AlexDaniel, ¯\_(ツ)_/¯ I proposed an idea and gave my arguments. If those arguments aren't sound or the majority disagrees, I won't feel bad if my RFC is rejected :)
23:44 AlexDaniel RT #128161
23:44 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128161
23:44 AlexDaniel what next…
23:46 AlexDaniel it's not a real range though
23:46 Zoffix m: say *…*
23:46 camelia rakudo-moar e239f6: OUTPUT«(...)␤»
23:46 Zoffix m: say *…42
23:46 camelia rakudo-moar e239f6: OUTPUT«Cannot call Numeric(Whatever: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/SMHtzTNzzl line 1␤␤»
23:47 AlexDaniel Zoffix: *…* is fine too
23:47 Zoffix Yeah, I'm not sure what the reporter expects the meaning of that sequence to be.
23:47 AlexDaniel m: say ‘hi’; say (*…*)[^20]
23:47 camelia rakudo-moar e239f6: OUTPUT«hi␤===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
23:47 * Zoffix giggles
23:47 AlexDaniel Zoffix: well, my point is that there should be no run time SORRY!
23:48 Zoffix ¯\_(ツ)_/¯
23:48 * Zoffix resumes drinking beer and playing DOOM 2016
23:56 kurahaupo_ joined #perl6
23:57 kurahaupo` joined #perl6

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

Perl 6 | Reference Documentation | Rakudo