»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 _28_ria joined 00:22 mr-foobar left 00:24 mr-foobar joined 00:25 ssotka left, me joined 00:26 me is now known as Guest42474 00:27 Guest42474 left 00:31 jack_rabbit joined 00:39 llfourn_ joined, pierre_ joined 00:40 pierrot_ left 00:41 mr-foobar left, llfourn left 00:42 mr-foobar joined 00:54 sufrostico left 00:58 astj joined 01:00 cognominal joined 01:25 pierre_ left 01:28 huggable joined 01:32 pierre_ joined 01:36 dmc00 joined 01:40 Actualeyes joined 01:45 ilbot3 left, fildon_ joined 01:47 kjk joined, ilbot3 joined 01:48 fildon left 01:50 zakharyas joined 01:51 cdg joined
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:55 kurahaupo left, skink left
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)␤»
timotimo m: class A { our $v = 123 }; GLOBAL::('A')::.keys.say 02:00
camelia rakudo-moar ad8265: OUTPUT«0..0␤»
kjk Zoffix: I can't get '$v' from the second way above
timotimo m: class A { our $v = 123 }; GLOBAL::('A').WHO::.keys.say 02:01
camelia rakudo-moar ad8265: OUTPUT«()␤»
timotimo m: class A { our $v = 123 }; GLOBAL::('A').WHO.keys.say
camelia rakudo-moar ad8265: OUTPUT«()␤»
timotimo m: class A { our $v = 123 }; ::('A').WHO.keys.say
camelia rakudo-moar ad8265: OUTPUT«($v)␤»
timotimo m: class A { our $v = 123 }; A::.keys.say; my $name='A'; ::($name).WHO.keys.say
camelia rakudo-moar ad8265: OUTPUT«($v)␤($v)␤»
timotimo ^- there we go
Zoffix 👏
kjk nice! :) thanks 02:02
02:05 noganex_ joined 02:08 noganex left 02:12 Actualeyes left
MadcapJake jast: are you around? 02:13
TimToady sitting at sjc for flight to aus 02:17
02:18 pierre_ left 02:19 pierre_ joined, pierre_ left 02:20 pierre_ joined 02:21 cognominal left, kid51 left 02:22 kjk left 02:23 hotel joined 02:24 hotel_california left 02:32 kurahaupo joined, mr-foobar left 02:34 mr-foobar joined 02:35 ssotka joined 02:36 Actualeyes joined 02:40 perlawhirl joined
perlawhirl aus...tria? aus...tralia? aus...tin? 02:41
MadcapJake sitting at home trying to figure out undirected unweighted dynamic programming 02:42
02:42 dmc00 left, dmc00 joined
TimToady perlawhirl: tin 02:47
(oscon)
02:49 mr-foobar left
TEttinger austinia 02:49
TimToady though I do hope our luggage doesn't go down under
MadcapJake Cool! conferences.oreilly.com/oscon/open-...tail/49373
02:50 mr-foobar joined
MadcapJake I believe it! :) 02:50
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
perlawhirl TimToady: :( i was hoping you were coming to australia.
TimToady heading to gate & 02:55
02:57 mr-foobar left 03:06 jamesneko joined 03:08 jamesnek1 left 03:11 |2701 left 03:20 hotel_california joined 03:21 hotel left 03:23 yqt left
MadcapJake I don't understand this one bit... 03:40
MadcapJake is off to bed
timotimo if it's only one bit that you're not understanding, that's good! 03:41
MadcapJake lol
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
timotimo sorry, i know nothing about the thing you refer to 03:43
undirected unweighted dynamic programming
that's the one
MadcapJake well if you or anyone else wants to take a look: gist.github.com/MadcapJake/efbcb24...13a263c7c7
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
i even forgot what the common example for it was. it wasn't bin packing, was it?
03:44 wbill joined
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
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
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
MadcapJake but then the problem is that you're never finding the shortest path again XD
gahh!
timotimo are you only needing to do a dijkstra-ish traversal? 03:48
MadcapJake yeah basically (I think)
timotimo do you ever have negative weights?
MadcapJake nothing has weight
timotimo oh! 03:49
MadcapJake it's an unweighted graph
timotimo well, then that's easy
MadcapJake ...not seeing the easiness :P
timotimo i didn't realize dijkstra could be called dynamic programming, but i think i can see it now
ok, look, here's how i'd do it:
MadcapJake I think it's different than dijkstra's
timotimo let me just outline what i'm thinking of, then we can figure out the differences
you have a set of nodes that are currently "interesting". it starts with only the beginning node in it 03:50
MadcapJake ok :)
timotimo you hold the cost for each node somewhere, and you hold the "predecessor" for each node somewhere
MadcapJake predecessor? but the connections are predefined and not uniform
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
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
after every neighbour was considered, the ones where you changed something end up in the "to-look-at" set again
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
you proceed from multiple nodes
MadcapJake I *feel* like I'm doing that but I must not be :P
wait
03:52 hotel joined
timotimo every node that hasn't been in the interesting set so far 03:52
and every node that you set a lower cost for
note, however, that in the unweighted case, you can never find a node that's cheaper to reach from your current node
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)
MadcapJake every node is 1 cost away
timotimo yeah
MadcapJake so I have to calculate brute force?
timotimo if you only add the "cheapest" into your set, you'll build a random path through your graph
yes, the thing we're talking about right now is brute force
there are many ways to improve on that
A* for example is very popular
03:53 hotel_california left
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
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
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:55 cpage_ left
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
03:56 cdg left, hotel_california joined
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: www.reddit.com/r/dailyprogrammer/c...ph_radius/
03:57 hotel left
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:57
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?
what do you mean by dynamic?
oh, you'll be interested to know that if every edge weight is 1, dijkstra essentially becomes equivalent to BFS 03:59
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 pierre_ left
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
i repeat my question: do you know how to work graphviz?
MadcapJake no :P 04:03
timotimo you should learn it, it's worth a lot
the easiest way to go is to print "digraph G {", then for every edge just " $a -> $b;" and "}" at the end
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
if you've got a file, you can overwrite the file and it'll instantly refresh in the window
MadcapJake cool!
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
so you can print a line qq{ $node_id [label="$text_on_node"]} to have a label 04:05
graphviz.org/Gallery.php - on top of that: copy paste from these examples :D
i love graphviz 04:06
MadcapJake wow that's awesome! 04:07
timotimo very. 04:08
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:09
MadcapJake sweet! so visually seeing how it discovers the path 04:10
04:11 pierre_ joined
timotimo quite. 04:11
it's bedtime for me now 04:14
gnite!
MadcapJake night! 04:15
04:16 zhmylove left 04:18 zhmylove joined
masak morning, #perl6 04:22
04:22 pierre_ left, pierre_ joined 04:27 pierre_ left 04:36 khw left 04:38 pierre_ joined 04:40 pierre_ left
dalek osystem: ce5b554 | MasterDuke17++ | META.list:
Add Text::Diff::Sift4 to ecosystem

See github.com/MasterDuke17/Text-Diff-Sift4
04:47
osystem: 1561402 | azawawi++ | META.list:
Merge pull request #206 from MasterDuke17/patch-2

Add Text::Diff::Sift4 to ecosystem
04:48 Cabanossi left 04:50 Cabanossi joined 04:58 skids joined
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␤␤»
teatime MadcapJake: you spec'd an array of hashes, but you're giving it a list (or array, fiik) of pairs 05:02
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
%h is a hash, but I think @a is deconstructing it
MadcapJake m: my %h = foo => 1, bar => 2, baz => 3; %h.say;
camelia rakudo-moar ad8265: OUTPUT«{bar => 2, baz => 3, foo => 1}␤»
teatime `my Type @a` means "an array of Type's", not "a Type which is also positional/Array" 05:04
it's in the docs about perl6 gotchas, i think
MadcapJake I want it to be an array of hashes
teatime oh dang, I see what you are saying now, sorry
MadcapJake that's what I don't understand, why would it deconstruct it into pairs
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
teatime thought I had that one, but now I'm lost again. yay p6.
MadcapJake maybe a comma will do the trick
m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = %h,; 05:06
camelia ( no output )
MadcapJake m: my %h = foo => 'bar', baz => 'quux'; my Hash @a = %h,; @a[0].say
camelia rakudo-moar ad8265: OUTPUT«{baz => quux, foo => bar}␤»
MadcapJake boom-diggity!
teatime: not understanding p6 is a nightly occurrence for me :) 05:07
teatime I *need* a new camel book.
or whatever fauna.
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␤␤»
MadcapJake weird that brackets actually *doesn't* work
only the comma works in this case o_O
teatime if you [%h], what else could you expect but an array of pairs?
how else can you make a sensible array out of a hash?
MadcapJake @( %h ) 05:10
teatime well, I suppose. does that give you a flat list of $k2, $v2, $k2, $v2, etc.?
MadcapJake I expect deconstruction in signatures and for/if (which is really signatures) but not in variable assignment
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
camelia rakudo-moar ad8265: OUTPUT«2␤»
MadcapJake it just pulls the pairs out
teatime I was talking about @( %h ), you implied it does something that isn't that
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.
MadcapJake oh? what's that?
skids The way to thing about it is "my @a = <thing>" will iterate <thing> 05:13
If you iterate %h, you iterate the pairs.
Erm, let me repharase that.
If you iterate %h you iterate the pairs.
If you iterate %h, you iterate the one-element list.
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.
*level* 05:15
MadcapJake I see! thanks skids, clarity at last!
skids wonders what aner of crumb is under his l key
or maybe I just cannot type tonight.
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:17
05:18 itcharlie left
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:21
teatime skids: may I ask, what is the 'bigger picture' that explains the logic of <a> → 'a' but <a b> → ('a', 'b') 05:22
I assume something, somewhere, becomes inconsistent/inconvenient if <a> → ('a',)
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)
m: <a >.perl.say
camelia rakudo-moar ad8265: OUTPUT«"a"␤»
MadcapJake m: < a >.perl.say
camelia rakudo-moar ad8265: OUTPUT«"a"␤»
skids but I guess that part is not consistent.
teatime hehe, I, too, had hoped for < a >, but it was not to be 05:24
MadcapJake m: qw{ a}.perl.say
camelia rakudo-moar ad8265: OUTPUT«"a"␤»
MadcapJake m: < >.perl.say
camelia rakudo-moar ad8265: OUTPUT«()␤»
skids I guess they figured people would want to use newlines where those spaces are.
MadcapJake is that Unit or an empty list?
teatime () means empty list 05:25
skids "Unit"?
teatime ($a) is not a list
but ($a, $b) is
MadcapJake m: < > ~~ Arrray
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'?␤␤»
MadcapJake lol
pirate's array
m: < > ~~ Array
camelia ( no output )
teatime m: < >.WHAT
camelia ( no output )
MadcapJake m: say < > ~~ Array
camelia rakudo-moar ad8265: OUTPUT«False␤»
teatime we're both terrible at this
m: < >.WHAT.say
camelia rakudo-moar ad8265: OUTPUT«(List)␤»
teatime List does not inherit from Array
MadcapJake m: say < > ~~ Empty 05:26
camelia rakudo-moar ad8265: OUTPUT«True␤»
teatime m: < > ~~ Positional & List
camelia ( no output )
MadcapJake It's an Empty
teatime m: say < > ~~ Positional & List
camelia rakudo-moar ad8265: OUTPUT«True␤»
05:26 wbill left
teatime Empty is a term/constant for empty list, iirc 05:26
m: say () == Empty 05:27
camelia rakudo-moar ad8265: OUTPUT«True␤»
MadcapJake skids: I thought Unit was something but it's not :P I meant like a Slip I think
m: say < > ~~ Slip
camelia rakudo-moar ad8265: OUTPUT«False␤»
skids m: say (|()).per
camelia rakudo-moar ad8265: OUTPUT«Method 'per' not found for invocant of class 'Slip'␤ in block <unit> at /tmp/dJwvxJHsTT line 1␤␤»
skids m: say (|()).perl
camelia rakudo-moar ad8265: OUTPUT«slip()␤»
05:28 huggable left
MadcapJake m: say < >.perl 05:28
camelia rakudo-moar ad8265: OUTPUT«()␤»
MadcapJake m: my @a = <a>; @a.perl.say
camelia rakudo-moar ad8265: OUTPUT«["a"]␤»
05:28 mohae joined
MadcapJake m: my @a = <a>,; @a.perl.say 05:28
camelia rakudo-moar ad8265: OUTPUT«["a"]␤»
MadcapJake o_O 05:29
oh yeah, cus <a> is just a string apparently
m: say <a> ~~ Str
camelia rakudo-moar ad8265: OUTPUT«True␤»
05:31 mohae_ left
skids m: say slip().item.perl # erm... 05:36
camelia rakudo-moar ad8265: OUTPUT«slip$()␤»
skids Ah there is already RT#127224 05:37
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127224
skids Anyway, time for bed 05:38
MadcapJake same, g'night all!
05:38 skids left 05:40 MadcapJake is now known as MadcapJake_zZz 05:49 CIAvash joined 06:08 pierre_ joined, ssotka left 06:22 wamba joined 06:23 yqt joined 06:26 firstdayonthejob joined 06:33 cpage_ joined 06:40 firstdayonthejob left 06:42 domidumont joined 06:47 domidumont left 06:48 domidumont joined 06:49 pierre_ left
grondilu is it possible to retrieve the name of a variable. Eg. "foo" from $foo ? 06:49
06:49 pierre_ joined 06:51 ssotka joined 06:53 RabidGravy joined 06:54 pierre_ left
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 06:57 ssotka left, fildon_ left
TEttinger #perl6, how would you match a unicode opening brace/bracket to a corresponding unicode closing brace/bracket? 07:00
like 〚 to 〛 or ⸨ to ⸩
oddly, the Ps and Pe categories in unicode are not equivalent-length
starting bracket is Ps, Pe is ending 07:01
grondilu did not know about .VAR
m: say (my $foo).VAR.name
camelia rakudo-moar ad8265: OUTPUT«$foo␤»
grondilu cool
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:11 pierre_ left 07:12 pierre_ joined
RabidGravy Harr! 07:15
sortiz \o
07:21 pierre_ left
RabidGravy decides to use a different k8055 library which has some small chance of being thread safe 07:21
07:31 pierre_ joined 07:37 perlawhirl left 07:38 simula67 joined 07:47 rindolf joined 07:49 pierre_ left 07:51 pierre_ joined 07:52 pmurias joined 08:04 CIAvash left 08:05 domidumont left 08:07 pierre_ left 08:08 pierre_ joined 08:15 _mg_ joined 08:16 darutoko joined 08:19 dakkar joined
moritz kinda off-topic question for the noisegang :-) 08:28
is there any open format for annotating audio with meta information and links, depending on the time?
something like: from 1:10 to 1:45 of $podcast_episode they talk about "Learning Perl" and here's the link for that 08:29
RabidGravy I think mpeg 4 does 08:30
moritz RabidGravy: any pointers to something googlable would be appreciated 08:31
like a name or so
08:33 CIAvash joined
RabidGravy just trying to find an actual example 08:35
dalek Iish: 9d13ea0 | (Salvador Ortiz)++ | / (4 files):
TestMock: Allow generation from syntetic data

Mimic DBD::Sponge reflexion capabilities.
08:37
Iish: e009b5d | (Salvador Ortiz)++ | lib/DBDish/Pg (4 files):
Pg: Add $dbh.column-info for schema introspection
08:38 yqt left
grondilu is often amazed how powerful closures are. He should try to use them more often. 08:42
RabidGravy moritz, ah there you go en.wikipedia.org/wiki/MPEG-4_Part_17 08:43
I was wrong about BWF, it's just timecode it supports 08:44
08:46 Emeric joined, rindolf left
RabidGravy I keep meaning to have a look at an mp4 module in order to support www.native-instruments.com/en/specials/stems/ 08:46
(though why they go out of their way to hide the fact it is just an mp4 container is beyond me) 08:47
08:54 rindolf joined
moritz RabidGravy: thanks 08:55
08:55 CIAvash left, pierre_ left 08:56 pierre_ joined 08:59 pierre_ left, pierre_ joined 09:01 CIAvash joined 09:03 zakharyas left 09:20 gregf_ joined 09:25 _mg_ left 09:28 sortiz left 09:29 ShimmerFairy left
stmuk moritz: www.matroska.org/technical/specs/s...s/srt.html maybe? although I don't think links are supported 09:32
also see en.wikipedia.org/wiki/SubRip 09:33
09:36 simula67 left
RabidGravy wonders where the "NAT_BoolNAT" that gptrixie uses for "bool" comes from 09:38
09:40 buharin joined
llfourn_ can anyone confirm that I'm not crazy and that rakudo beats all these languages in performance: hashnode.com/post/comparison-nodej...53frmfnt70 09:42
m: say [+] ^100000000
camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤»
llfourn_ well I didn't test Go or C
stmuk big integer maths support seemed v fast in perl 6 when I tried it 09:43
psch m: say sum ^100000000; say now - BEGIN now 09:44
camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.0118575␤»
psch m: say sum ^100000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.0021432␤»
psch i keep forgetting which of those is more meaningful
llfourn_ wow it gets faster..
psch but either way, it doesn't have "start the interp" overhead either
llfourn_ yeah
I'm going to install golang on this comp and then gloat if it wins :D
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:46
09:47 llfourn_ is now known as llfourn
buharin hiho :) 09:49
RabidGravy for the python example given p6 is ten times faster here 09:50
don't have ruby
llfourn RabidGravy: really for me it's 100 times faster... 09:51
RabidGravy 3 times faster than nose.js
llfourn for node rakudo is 6 times faster...
(on a mac)
RabidGravy ah, user time yes 100 times faster 09:52
but ten wallclock
stmuk I found p6 addition 10x perl6 -Mbigint 09:53
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 :(
El_Che banned? 09:55
stmuk I should update and give at YAPC::EU
tadzik aahahah
I'd go see it
RabidGravy and 30x faster than php
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
stmuk it was fairly light hearted 09:57
El_Che make it slightly longer so it could be a regular talk? 09:59
sound interesting
s
llfourn rakudo beats go as well
RabidGravy is there a specific optimisation for that sum of a very large list?
llfourn it doesn't beat C but it gets the wrong answer so it doesn't count 10:00
10:00 kid51 joined
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 kid51 left
tadzik well, it's easy to check :) 10:00
m: say sum ^100000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.00227928␤»
tadzik m: say sum ^10000000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«49999999995000000000␤0.00298638␤»
stmuk I think ruby gave the wrong answer when I tried it too 10:01
tadzik m: say sum ^10000000000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«49999999999995000000000000␤0.0032230␤»
psch m: say [+] ^100000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«4999999950000000␤0.00238478␤»
llfourn heh tadzik++
psch we opt that too
tadzik I... think it's inconclusive
llfourn ?
tadzik well, it does grow :P
llfourn not linearly :)
tadzik but yeah, I think it's safe to say it does that in O(1) 10:02
yep :)
stmuk github.com/stmuk/p6benchmark/blob/...00K_fib.pl
psch method sum() { my ($start,$stop) = self.int-bounds || nextsame; my $elems = 0 max $stop - $start + 1; ($start + $stop) * $elems div 2; }
llfourn ok well that's a bit less magic
tadzik m: say sum ^100000000000000000; say now - INIT now
camelia rakudo-moar ad8265: OUTPUT«4999999999999999950000000000000000␤0.00242954␤»
RabidGravy still 10:03
yeah, losing that optimisation and doing it exactly the same way as the others are doing it, it's a lot slower 10:06
a lot slower 10:07
10:07 pierre_ left 10:08 _mg_ joined 10:09 gregf_ left
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
if 0..1000 just returned an array or list or whatever it wouldn't be possible to do it 10:10
10:12 _mg_ left
RabidGravy It would be nice if it could be at least as quick as python for the "dumb case" though 10:15
pmurias jnthn: ping 10:24
10:25 gregf_ joined
jnthn pmurias: pong 10:25
RabidGravy powm 10:27
10:31 pierre_ joined
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
jnthn: the bigger problem is that rakudo seems to be binding parameters into static variables
jnthn: at github.com/rakudo/rakudo/blob/nom/....nqp#L2466 10:32
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?
This is the code that "fakes" an outer context when we run stuff at BEGIN time 10:35
pmurias jnthn: I'll go recheck some things 10:38
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:41
RabidGravy the C example 10:42
tadzik oh, classic C :)
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:43 TEttinger left
pmurias jnthn: should I make the hll role serializable on Moar? 10:44
jnthn pmurias: Yes, that sounds like an oversight. 10:46
10:48 nchambers left 10:49 nchambers joined
jnthn lunch; bbl 10:52
10:56 Sgeo_ left 10:57 eyck left, eyck joined 10:59 pierre_ left 11:00 pierre_ joined 11:04 pierre_ left
dalek k-simple: 462f141 | finanalyst++ | / (2 files):
Add new widgets GTK::Simple::Scale and GTK::Simple::MarkUpLabel with example
11:15
k-simple: 384f818 | RabidGravy++ | / (2 files):
Merge pull request #25 from finanalyst/master

Add new widgets GTK::Simple::Scale and GTK::Simple::MarkUpLabel with …
RabidGravy SLIDERS!
tadzik ayy! 11:16
11:17 kid51 joined
tadzik LIES! 11:18
wait, this has no sliders
RabidGravy the scale widget is a slider 11:22
run the examples/04_marked_scale.p6 11:24
so going to make one or two of the dumb sequencers I was thinking of later 11:28
tadzik oh
11:31 pierre_ joined 11:35 Emeric left 11:36 Emeric joined 11:38 kid51 left 11:44 olinkl left, olinkl joined 11:53 _mg_ joined 11:54 cschwenz joined, |2701 joined
dalek k-simple: 9043cfd | finanalyst++ | examples/04_marked_scale.p6:
typo reverse blue/red keys in example
11:56
k-simple: 075d8bb | azawawi++ | examples/04_marked_scale.p6:
Merge pull request #26 from finanalyst/master

typo reverse blue/red keys in example
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}
psch m: say "\x2603" 11:57
camelia rakudo-moar ad8265: OUTPUT«☃␤»
psch m: say "\c[SNOWMAN]"
camelia rakudo-moar ad8265: OUTPUT«☃␤»
cschwenz that's what i thought, but the perl6 REPL is spitting "Undeclared routine" back at me :-( 11:58
p6: say "\xABCD"; 11:59
camelia rakudo-moar ad8265: OUTPUT«ꯍ␤»
psch m: say "\xABCD".uniname
camelia rakudo-moar ad8265: OUTPUT«MEETEI MAYEK LETTER HUK␤»
psch m: say '\x[ABCD]'
camelia rakudo-moar ad8265: OUTPUT«\x[ABCD]␤»
psch cschwenz: not sure how that'd happen
cschwenz: does it happen with -e'...' instead of in the REPL? 12:00
12:00 _mg_ left
cschwenz ah, nevermind. say \xABCD; is not the same as say "\xABCD"; 12:01
12:03 cschwenz left 12:07 spider-mario joined, vytas joined 12:24 cschwenz joined
cschwenz what is canonical perl6 for the last entry in a list? @list[@list.elems - 1] seems a bit verbose… 12:25
12:25 pierre_ left
psch m: my @a = ^10; say @a[*-1] 12:25
camelia rakudo-moar ad8265: OUTPUT«9␤»
cschwenz :+1: psch, thanks :-) 12:26
timotimo o/ 12:27
cschwenz \o timotimo :-)
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:29
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.
timotimo well, why wouldn't it be 12:31
12:31 Relsak joined
cschwenz i would have thought that optimisation would have been made already 12:31
pmurias timotimo: that would make generating code faster? 12:32
timotimo m: sub id($a) { $a }; say id(* - 1) eqv id(* - 1)
camelia rakudo-moar ad8265: OUTPUT«True␤»
timotimo huh?
does WhateverCode eqv WhateverCode do anything sensible?
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
camelia rakudo-moar ad8265: OUTPUT«True␤»
timotimo okay, it doesn't
but i'm failing to grep for * \s* - \s* 1 with grep or egrep 12:34
JimmyZ ack-grep
timotimo i only want to search in gen/moar/m-CORE.setting :P 12:35
the thing is i can't get the fucking escaping right
cschwenz thus, ack for non-braindead escaping :-P 12:36
timotimo oh? i thought ack just uses pcre
well, it's written in perl, so it does pcre without pcre
cschwenz i also find the shell getting in the way of entering regexes correctly
12:37 pierre_ joined
timotimo there's really only 11 instances of * - \d+ 12:37
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:41
12:42 pierre_ left 12:43 pierre_ joined
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)…»
RabidGravy that's annoying
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
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:46
12:46 pierre_ left 12:47 pierre_ joined
RabidGravy yeah, I worked out why, but it's still annoying 12:48
timotimo :(
luckily Pointer works without having the scalar typed, too
12:49 cschwenz left
RabidGravy I know but there's no way out of what I need to do 12:50
12:51 pierre_ left, |2701 left, |2701 joined, |2701 left, |2701 joined
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
oh, I can do it, but it means ugly code 12:53
timotimo so what, just my $foo = new Pointer[Foo]:;
RabidGravy but it has to be outside
timotimo why? for the nativecall signature declaration? 12:54
RabidGravy yes
timotimo i don't think it has to be a fully typed pointer to work
hmm, i wonder: what if you stub the class first?
12:55 mohae left
[Coke] wonders where the coffee is hiding. 12:55
RabidGravy no I tried with a predeclare 12:57
12:57 mohae joined
timotimo 'k, then you'll just have to declare it "Pointer" in the signature 12:58
you'll be hiding the sub from users anyway, so all your "ugly" code will be purely internal
12:59 sufrostico joined, pierre_ joined 13:02 domidumont left, aindilis` left 13:12 pierre_ left 13:13 perlawhirl joined 13:19 cdg joined 13:20 pierre_ joined
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 :)
RabidGravy Oooh more blinkenlights 13:28
timotimo where do you get blinkenlights from? :3
tadzik the telnet star wars?
RabidGravy one of these www.velleman.eu/products/view/?coun...;id=351346
timotimo ah
RabidGravy it was sitting in my box o'stuff so I thought I'd make a module to drive it, and it works 13:29
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:31
or ... is the total amount limited to 4? 13:32
RabidGravy the code would suggest 4 13:34
timotimo the dll just has a little array in it that only goes to 4 13:35
13:35 kaare_ joined 13:36 cognominal joined
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:36
(it's basically a PIC and a couple of chips) 13:37
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
timotimo hehe
stmuk so 5 quid elsewhere :P 13:41
timotimo well, that's a damp quid 13:42
RabidGravy there are some things that they are actually cheaper for, but not many things
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:46
stmuk on a recent trip to the US I was amused to find a Radio Shack still in business 13:47
geekosaur they do still exist, just not as many of them 13:48
13:48 pierrot joined, finanalyst joined
RabidGravy I miss proper old-school electronics shops 13:48
13:49 kurahaupo left
stmuk Edgeware Rd used to have many 13:50
RabidGravy yeah 13:51
13:51 itaipu joined
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 13:58 araujo left
moritz llfourn: now if I tell you about the "roll" method, you'll be devastated, right? 13:59
m: say (^10).roll(*)[^5]
camelia rakudo-moar ad8265: OUTPUT«(2 4 4 3 3)␤»
moritz m: say (^10).roll(*)[^5]
camelia rakudo-moar ad8265: OUTPUT«(8 8 0 1 7)␤»
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:00
whenever I wanted to create a lazy list I always had to take an existing list and .map it to something 14:01
but loop lets me create an abitrary one based on a block
moritz also gather/take, and "lazy" 14:02
llfourn yeah gather take is the other way
but gather take you need a iterating block anyways? 14:03
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)␤»
timotimo you don't need an iterating block
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))␤»
llfourn ah you can have many takes
timotimo of course
llfourn but not an infinite amount?
timotimo yeah you can
m: sub rofl { take 1; rofl }; my @a = gather { rofl }; say @a[^10]
m: sub rofl { take 1; rofl }; my @a = lazy gather { rofl }; say @a[^10] 14:06
camelia rakudo-moar ad8265: OUTPUT«(timeout)»
rakudo-moar ad8265: OUTPUT«(1 1 1 1 1 1 1 1 1 1)␤»
llfourn ah with recursion. Interesting.
timotimo %) 14:07
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:12 pierre_ left 14:18 araujo joined, araujo left, araujo joined 14:19 dha joined 14:20 ianm joined
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
*sub MAIN($x, :$y)
llfourn Emeric: atm you have to put the named params first 14:23
so perl6 script.p6 --named=stuff positional
timotimo if you just want it to be optional, not positional, you'll have to spell it "$y?" or "$y = 'some default'" 14:26
Emeric it works, thanks :) 14:27
14:33 yqt joined 14:38 yqt left
dha I am currently being introduced to Perl 6! 14:39
14:39 zakharyas joined
stmuk is using a newer moar with an older rakudo likely to cause probs? or is moar mostly backward compatible? 14:39
ianm shout-out from OSCON from Austin, Texas. Intro to Perl 6 by Jeff Goff. 14:40
timotimo cool!
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.
stmuk: Of note, a couple of fairly major internals changes landed a few days back. 14:42
dha ianm - I'd wave, but I don't know what direction you're in. :-) 14:44
RabidGravy - So far, it's a lot like Perl 5, but it can handle numbers better. :-)
Oh, and it has types.
perlpilot ianm: stand up and start shouting so that dha can find you ;)
ianm LOL
dha heh.
RabidGravy cool, I guess I had better check it out
ianm I'm wearing a neck collar! 14:45
RabidGravy what like one of those dog-training shock collars?
timotimo whenever your code doesn't compile ... ;)
perlpilot RabidGravy: heh, I had a similar image in my head
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 :)
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
dha DrForr and I have already waved at each other. :-) 14:47
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.
ianm LOLZ ... the Dr. said I have to stop licking myself! too funny
timotimo ah, quite.
stmuk are ORA making the videos available without $$$?
timotimo in theory we could have run-time switching between implementations
but that's maybe a bit excessive and wouldn't help anybody?
dha perlpilot - nope. I have a presentation at yapc, though. 14:49
stmuk - I think they're livestreaming the keynotes, but the talks generally, I doubt it.
dalek c: c10af6c | (Wenzel P. P. Peppmeyer)++ | doc/Language/subscripts.pod:
doc subscripts with multiple dimensions
14:53
14:54 ptolemarch joined 14:55 perlawhirl left
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
it's also cool how it displays the whole parse tree if a match has sub-matches 14:58
ianm whoa, really... nice
gfldex will it truncate big match trees? 15:00
timotimo no
use something more advanced, like Data::Dump::Tree (major shout-outs!) for that 15:01
where "that" means "more advanced things"
dha so... use more advanced things for more advanced things? :-)
timotimo yup
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
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
really, in a perfect world, i'd set up a second section of the p6weekly that highlights bunches of modules each time around
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
timotimo no, you need .print or print $_
ianm a ha
timotimo you can try it for yourself by starting your line with m: and then just code
ianm .print works a treat
timotimo m: print for 0 .. 15
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␤----…»
timotimo ^- see how it tells you to "please use .print if you meant $_" :) 15:05
ianm Wow - nice error output.
timotimo we try to make as many of our errors "awesome" as we can
ianm That's really cool 15:06
Juerd ianm: You better get used to that. Many error messages are verbose and actually helpful.
timotimo m: if 1 { say "oh" } elif 2 { say "what?" }
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
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
buharin hiho :)
ianm Perfect
timotimo m: $/ = "separator"
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"␤»
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...
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
Juerd And Perl 5 tries to help you find where blocks began if you leave out the }
Perl 6 just takes this idea ten steps further :)
ianm Love it
timotimo we don't have something clever for missing } though, right?
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:
m: sub prin { }; pritn "Hi";
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'?␤␤»
ianm This is pretty slick having this channel around while I'm in this intro class. Thanks everyone. 15:10
timotimo i initially put that code in :D 15:11
ianm: don't get too distracted by irc from the course :D
ianm LOL timotimo
timotimo don't L O too L, or you'll disturb the course :P 15:12
ianm Good point ;)
15:12 samb1 left
tadzik perl 5 will stay "syntax error in line <last line of file>" if you forget a } in a hash dereference though :) 15:14
15:16 zakharyas left 15:18 molaf joined
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␤»
Juerd m: sub foo {
camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JDxp4anI35␤Missing block␤at /tmp/JDxp4anI35:1␤------> 3sub foo {7⏏5<EOL>␤»
Juerd The former is significantly more helpful 15:19
15:21 domidumont joined
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)?
Unicode code point?
15:23 kurahaupo joined, kurahaupo left
[Coke] dha: design.perl6.org/S15.html#NFG 15:24
15:25 samb1 joined
dha So... in terms that humans can understand, Unicode code points? :-) 15:25
[Coke] ... basically.
p6 tries hard to do DTRT with combining chars so you can ignore them. 15:26
15:26 kurahaupo joined
[Coke] er, ignore the fact that unicode lets you do it more than one way 15:26
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? :-)
"It's complicated" 15:28
[Coke] dha - you asked for the simple version, so yup. :)
dha How about "generally Unicode code points, but there are some edge cases"?
timotimo geekosaur: sorting properly according to locale isn't perl6 core, it ought to go into a module, IMO.
dha this came up in the intro tutorial, so Im trying to find an answer that I can provide in that context.
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
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
well, perl6 deals with that for you
geekosaur (and yes NFG is how p6 deals with this, but it is itself a compromise)
[Coke] greek question marks are handled.
timotimo "greek question mark" turns into ; immediately during the NFG algorithm
[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
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 ianm left
jnthn (And yes, agree with geekosaur, "it's complicated" :)) 15:32
timotimo yeah 15:34
geekosaur (and p6 is on the "it's complicated" end rather than the "it came from r'l'yeh" end) 15:35
15:38 pRiVi left
timotimo hmm. our nqp repository has 57 open issues 15:38
i wonder if someone should go through and see if any of them have become solved or irrelevant since their last interaction
15:39 dha left, pRiVi joined 15:43 mephinet left, mephinet joined 15:45 ianm joined 15:46 ssotka joined
ianm "No compiler available for Perl v6.c" when attempting to bootstrap panda. I've installed build-essential, any other ideas? 15:47
15:47 pierre_ left
ugexe whats your `perl6 -v` 15:48
ianm This is perl6 version 2015.11 built on MoarVM version 2015.11
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!
ianm lol
ok will do ugexe, thanks for the info
timotimo stmuk: well, as long as it works ... :)
stmuk actually it seems to fail some nqp tests :/ t/nqp/60-bigint.t & t/hll/06-sprintf.t 15:54
16:01 dha joined 16:07 MadcapJake_zZz is now known as MadcapJake
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?
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
ugexe: leave comment and close, or collect a list for someone else to go over if you don't feel confident in just closing
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:11
timotimo oh, OK 16:12
16:12 nicqbot joined
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?
stmuk dunno it could be something else 16:15
was libffi a parrotism? 16:19
timotimo um, i don't think so
16:19 kurahaupo left
timotimo wasn't parrot on dyncall, too? 16:20
16:20 dwarring left, kurahaupo joined
timotimo .seen froggs 16:20
yoleaux I saw FROGGS 27 Mar 2016 22:29Z in #perl6: <FROGGS> jnthn++
16:20 kurahaupo left
timotimo :( 16:20
ugexe i believe i needed to use libffi for a moarvm netbsd build at one point when i couldnt get dyncall to compile 16:21
16:25 finanalyst left
ianm is standard input always of type string? 16:25
16:25 khw joined 16:26 avalenn joined
ilmari m: $*IN.WHAT.say 16:26
camelia rakudo-moar ad8265: OUTPUT«(Handle)␤»
ilmari m: say $*IN 16:27
camelia rakudo-moar ad8265: OUTPUT«IO::Handle<IO::Special.new(what => "<STDIN>")>(opened, at octet 0)␤»
RabidGravy m: say $*IN.read(10, :bin)
camelia rakudo-moar ad8265: OUTPUT«Buf[uint8]:0x<43 c3 a9 61 64 20 73 6c c3 a1>␤»
RabidGravy so no
stmuk ugexe: sounds related 16:28
16:28 st_iron joined
st_iron hello my friends 16:28
pmurias hi 16:29
st_iron hello pmurias
ianm cool ilmari and RabidGravy , thanks
16:38 CJKinni joined 16:43 alva left, alva_ joined, CJKinni left
RabidGravy So, that all seems good, haven't the faintest how to test the inputs though 16:44
16:47 dakkar left
RabidGravy someone be a love and bring round eight small solenoids and an eight way darlington array 16:47
I think we need Perl 6 playing a xylophone
ugexe nqp#192 and nqp#235 can be closed 16:51
timotimo RabidGravy: have you seen Jack Conte's music video "pedals"? 16:52
or his "thrift shop" cover?
RabidGravy nah 16:54
timotimo www.youtube.com/watch?v=zF60E3J1dSM
he's playing his Launchpad together with a 4-solenoid thingie he built
16:54 ZoffixW joined
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␤»
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␤»
ZoffixW Why does this happen? I expected $level to be 3 in the first run and 2 in the second.
timotimo m: say "\x200C\x200C\x200C".comb.perl
camelia rakudo-moar ad8265: OUTPUT«("‌‌‌",).Seq␤»
ZoffixW m: .say for "\x200C\x200D\x200C".uninames
camelia rakudo-moar ad8265: OUTPUT«ZERO WIDTH NON-JOINER␤ZERO WIDTH JOINER␤ZERO WIDTH NON-JOINER␤»
16:56 hotel joined
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
jnthn m: say "\x200C\x200C\x200C".chars
camelia rakudo-moar ad8265: OUTPUT«1␤»
16:56 hotel_california left
jnthn It's a single grapheme 16:57
ZoffixW dam
Is there a way to tell .comb to do it by chars?
jnthn So, correct. :)
It *is* doing it by chars.
If you want to work at Unicode codepoint level, you'd need Uni
timotimo yeah, man. get a proper education at your uni, man!
ZoffixW Or by... THINGS.... I want it to give me "\x200C", "\x200C", "\x200C" lol
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…»
timotimo m: say '\x200C\x200C\x200C'.split(/ <before \\> /).perl
camelia rakudo-moar ad8265: OUTPUT«("", "\\x200C", "\\x200C", "\\x200C")␤»
timotimo there you go
jnthn :P
ZoffixW heh
jnthn m: say "\x200C\x200C\x200C".NFC.map({ .chr }) 16:59
camelia rakudo-moar ad8265: OUTPUT«(‌ ‌ ‌)␤»
jnthn m: say "\x200C\x200C\x200C".NFC.map({ .chr }).perl
camelia rakudo-moar ad8265: OUTPUT«("‌", "‌", "‌").Seq␤»
jnthn Like that
ZoffixW Interesting. Thanks, jnthn++
17:01 RabidGravy left, araujo_ joined, RabidGravy joined
ZoffixW Looks like it's a really slow operation, eh? 17:03
timotimo what is?
ZoffixW NFC stuff
timotimo oh?
well, it probably didn't get lizmat'd yet :P
ZoffixW :)
timotimo in theory it wouldn't be slower than a Buf[int16] or whatever 17:04
well, Blob probably, as it's immutable (isn't it?)
17:04 araujo left
ZoffixW Maybe my program is wrong.... It's still sitting there :/ 17:04
timotimo could be wrong, yeah :( 17:07
17:07 pmurias left
ZoffixW Yeah, nevermind, it's not NFC. I just tried only that part and it works fast. 17:07
timotimo strange 17:08
hopefully you can find the problem :)
17:08 buharin left, buharin joined
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
timotimo i have no idea what Anguish is :| 17:09
is that the DSL the angular people came up with for angular 2 ? :)
ZoffixW Nah, it's a language I invented. It's like Brainfuck, but uses invisible characters :P
ZoffixW will write an article today about it
timotimo oh!
fantastic!
so even worse than whitespace?
ZoffixW Yeah :D 17:10
timotimo "every anguish program is just a single grapheme!"
ZoffixW heh
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
ianm Wow - adverbs - nice 17:15
say "There?: ", %h<missing>:exists ?? 'Yes' !! 'No';
17:20 firstdayonthejob joined
dalek c: 0d9dc28 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket/Async.pod:
Fixed broken link
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
timotimo i agree we should. we don't have that already? 17:21
dha I don't know offhand.
And I was thinking I might know offhand if we did. :-)
17:22 araujo_ left
geekosaur design.perl6.org/S02.html#Subscript_adverbs 17:23
timotimo oh yikes
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 >_<
the specs aren't sufficient for documentation purposes
17:24 CJKinni_ left
geekosaur yeh 17:24
dha timotimo - exactly.
geekosaur bu the language documentation is even more sparse...
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
dha geekosaur - well, that's the point of discussions like this, we're trying to make it less sparse.
timotimo dha: what, 4 people? :)
dha :-p
17:26 araujo joined
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! :-)
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
split the effort up a bit
dha yeah, a picture like that is probably counter-productive.
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
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
ianm Great intro by Jeff. Thanks everyone for your help 17:31
ZoffixW \o/
huggable, hug DrForr
huggable hugs DrForr
17:32 mohae_ joined
ZoffixW m: "\x[FEFF]".uninames.say 17:32
camelia rakudo-moar ad8265: OUTPUT«(ZERO WIDTH NO-BREAK SPACE)␤»
ZoffixW Turns out ^ that is also a BOM -_- and being the first char in my file was the source of my last bug
"All tests successful." 17:33
Now, I can finally finish the article :P
timotimo ugh, BOMs 17:34
dha And it's lunchtime!
17:34 mohae left, dha left
ianm Yep, I've ran into those pesky things too with unicode 17:34
yahoo dha
17:36 ianm left
timotimo we can't leave BOM support out because windows programs still output that shit 17:36
either way, we're screwed
17:37 AlexDaniel joined
AlexDaniel Zoffix: jgraph.github.io/mxgraph/docs/manual.html 17:38
Zoffix: can you read that?
I mean, next step is probably white text on white background
ZoffixW Hehe. Well, I had to zoom in :) 17:39
nicqbot What are BOM's? 17:40
timotimo Byte Order Mark
ZoffixW nicqbot, en.wikipedia.org/wiki/Byte_order_mark
dalek c: 331bdb9 | Coleoid++ | doc/ (7 files):
Proofreading some POD
c: 9c6a4a7 | (Jason Cole)++ | doc/Language/c (2 files):
Proofreading and light edits of docs
c: d4d0a0b | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/ (9 files):
Merge pull request #518 from Coleoid/master

Typos, grammar, etc.
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
AlexDaniel mmhm two commits with different names 17:42
nicqbot So to tell if the following text is utf-8/-16/-32?
timotimo nah, for that you need only look for null bytes 17:43
ugexe there is no magic bullet
timotimo i guess?
well, it's not 100% reliable
but it can be guessed based on that
ugexe create a large heuristics library
17:44 Actualeyes left
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...
*never 17:45
timotimo isn't the BOM also deprecated in utf16 and utf32?
17:45 xnrand left, domidumont left 17:46 Actualeyes joined, domidumont joined
chansen_ geekosaur: When did Unicode prohibit U+FEFF ZERO WIDTH NO-BREAK SPACE from UTF-8? 17:46
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:47
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:48
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:49 itaipu left 17:51 xnrand joined
chansen_ geekosaur: www.unicode.org/versions/corrigendum9.html 17:52
timotimo ibm is a gold sponsor for the "cloud" emoji %) 17:53
17:54 sortiz joined
sortiz \o #perl6 17:55
RabidGravy harr 17:56
timotimo harr mister gravy 17:57
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 ( no output )
17:58 liztormato joined
timotimo huh, the "is Any" makes it work? 17:58
sortiz Yep. 17:59
liztormato PSA: looks like I won't be able to do the Perl 6 Weekly until Tuesday 18:00
RabidGravy eugh, nasty 18:03
liztormato, when you do any chance of giving the noise gang a shout-out? 18:04
18:05 cdg left
liztormato Sure. Anything in particular you want me to shout about? 18:05
RabidGravy just that it exists and we love people making noisey software :) 18:06
perl6.noisegang.com/
mst RabidGravy: perl6 controlling a robot playing a theremin. ISAGN
RabidGravy well when I've finished what I'm doing right now, it'll be doable 18:07
:)
liztormato Cool! 18:08
18:08 daxim left 18:14 nebg left
dogbert17 evening #perl6 18:14
RabidGravy I've got one of those robot arm kits somewhere 18:15
dogbert17 I have tried to write docs for method put in IO::Socket, does it look commitable? gist.github.com/dogbert17/65aed1ac...2ea31d9350 18:16
18:16 nebg joined 18:17 itaipu joined
RabidGravy looks good to me 18:17
dogbert17 RabidGravy: thx, the src is a bit suspicious though: nqp::printfh($!PIO, nqp::unbox_s("\n")); # XXX should be $!nl-out 18:18
RabidGravy I'm not sure I've any seen any code using that but, yes that is a bit wonky 18:19
18:20 CIAvash left
dalek c: 95d8ee4 | (Jan-Olof Hendig)++ | doc/Type/IO/Socket.pod:
Added docs for method 'put' in IO::Socket
18:21
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:24
18:26 liztormato left, alva_ is now known as alva 18:28 liztormato joined
timotimo interesting 18:29
18:36 avalenn left 18:37 Emeric left, nemo joined, Emeric joined
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
oh. duh. camelia I bet
18:37 ianm joined
nemo hm. can't remember how to address it either 18:38
liztormato nemo: m:
18:39 Emeric left
RabidGravy I'm wondering whether a TypedPointer should return the type object for deref when it's null 18:39
liztormato m: say "foo" 18:40
camelia rakudo-moar ad8265: OUTPUT«foo␤»
RabidGravy m: use NativeCall; my $a = Pointer[int32].new; say $a.deref; # <apologies in advance> 18:41
camelia rakudo-moar ad8265: OUTPUT«(signal SEGV)»
RabidGravy LTA I'd say, but a ten character patch to fix 18:42
geekosaur X::NativeCall::Don't-Do-That 18:43
nemo 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
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 left, Relsak joined 18:48 cpage_ left 18:49 st_iron left 18:50 liztormato left, _mg_ joined 18:53 araujo_ joined 18:54 araujo_ left 18:55 araujo_ joined 18:57 Relsak left, araujo left, Relsak joined
RabidGravy makes the change 18:58
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:02
19:02 _mg_ left
dalek osystem: 7be6e67 | (Zoffix Znet)++ | META.list:
Add Acme::Anguish

Use Anguish programming language in your Perl 6 programs
19:03
19:04 rindolf left 19:09 nicqbot left 19:10 brrt joined 19:11 dha joined
timotimo there's a zero-width "function application" char o_O 19:14
that's kinda neat that that exists 19:15
sortiz Wondering if a Bool coercer for Pointer:D can be util too. 19:22
timotimo to compare against null pointers? 19:23
sortiz yes. 19:24
19:24 yqt joined
sortiz m: use NativeCall; my $a = Pointer[int32].new; say so $a; 19:24
camelia rakudo-moar ad8265: OUTPUT«True␤»
19:24 sufrostico left
RabidGravy yeah 19:24
sortiz m: use NativeCall; my $a = Pointer[int32].new; say so $a.Int
camelia rakudo-moar ad8265: OUTPUT«False␤»
RabidGravy I've just put github.com/rakudo/rakudo/pull/769
19:24 domidumont left 19:25 sufrostico joined
ZoffixW New blog post: "Anguish": Invisible Programming Language and Invisible Data Theft: blogs.perl.org/users/zoffix_znet/20...theft.html 19:26
19:27 kaare_ left, [particle] left
ZoffixW And posted on HN too: news.ycombinator.com/item?id=11708923 19:28
19:30 Emeric joined
dha glances at the Anguish article. 19:31
ZoffixW - WHAT THE HECK IS WRONG WITH YOU???
ZoffixW dha, what?
b2gills dha: I'm not sure either, but I bet it's hard to pronounce 19:32
ZoffixW pffft
Whatever.
dha :-) 19:33
mst ZoffixW: you should totally do a perl6 Acme::Bleach using the same approach
19:33 [particle] joined
dha Like I'm one to talk. I'm the guy who implemented hq9+ in Parrot assembler. 19:33
geekosaur Acme::HF >.>
jnthn "Anguish is a language for true computer masochists who would love to question whether their program actually exists." :D 19:34
ZoffixW++
dha Hm. I should revisit my Perl6 implementation of hq9+
ZoffixW++ # indeed.
mst jnthn: which means it's misnamed, it should've been called Angst 19:35
brrt ZoffixW++
19:35 Emeric left, Emeric joined
ZoffixW RFC to disallow invisible terms and operators in Perl 6 on security grounds: rt.perl.org/Ticket/Display.html?id=128159 19:36
timotimo yeah, let's force identifiers and such to have at least one visible grapheme 19:37
geekosaur perl 6, the first language to have the punycode security issue >.> 19:39
ZoffixW :D
timotimo ZoffixW: i love how RT thinks the first line is a quotation
19:39 spider-mario left
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
ZoffixW Oh, sorry. Rushed copy-pasta 19:40
timotimo :)
19:43 spider-mario joined
ZoffixW mst, I think someone already beat me to it: github.com/thundergnat/Acme-Scrub 19:44
(not that I have any clue how Acme::Bleach works)
timotimo it just encodes the whole file content as whitespace characters or something 19:45
like, with a source filter
and it rewrites the source file when it's first invoked
dha Acme::Bleach translates everything to spaces and tabs, IIRC.
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 Emeric left, tromp joined
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
that's not good, imo 19:49
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 :)
ZoffixW A disgruntled worker shoving code into sensitive parts, for example.
jnthn And tbh, if I wanted to screw with people, I'd just export versions of built-ins like `say` or infix:<+> :P
ZoffixW lol 19:51
brrt hmmm......
what about a warning?
ZoffixW A warning warning what?
timotimo "there is an invisible operator you've pulled in" 19:52
ZoffixW Is there any possible use for invisible opertors?
brrt routine ... on line x of file y is invisible
timotimo "if you want to allow the invisible operator '', please put in a 'use invisible ''"
geekosaur basically what jnthn just said. why stick to invisible operators when I can redefine something else?
ZoffixW geekosaur, because that may affect the actual program negatively, while the invisible ones are entirely your own 19:53
Also, that argument is akin to: why ban guns when you can beat a guy to death :P
ZoffixW runs to catch the bus 19:54
19:54 ZoffixW left, brrt left 19:57 ianm left 19:59 ianm joined
dalek Iish: a19e2da | (Salvador Ortiz)++ | lib/DBDish/Oracle (2 files):
Oracle: No longer needed 'no precompilation'
19:59
20:03 TreyHarris left
timotimo MadcapJake: i found my grid code! 20:04
it's so pretty <3 20:05
20:06 darutoko left
ugexe "invisible" depends enirely on your text editor 20:07
timotimo yeah, if your text editor is b0rked, you'll see stuff there :) 20:08
20:09 Ven joined, TEttinger joined 20:12 Ven left 20:15 cdg joined 20:17 hotel_california joined 20:18 pecastro joined, hotel left
sortiz think perl6.party's headers are b0rked, 'cus I see THAT stuff there but not in blogs.perl.org's copy. 20:19
ugexe visual studio is capable of handling it 20:20
DrForr waves. 20:23
dha particles 20:25
DrForr wants to quantum tunnel through the floor. Wiped, but getting better. 20:26
BTW if anyone @OSCON wants a P6 badge I've got just one left, gave 2 to Larry and Gloria. 20:27
20:27 Actualeyes left
dha Wendy and Liz apparently have a bunch after you run out. 20:28
timotimo i hear your tutorial was visited by many people :)
attended, even
dha More than 3, even!
20:28 _dolmen_ joined
DrForr Apparently so. I counted 30-35. 20:28
The entire left side of the room was a sea of light, couldn't see a damn thung. 20:29
MadcapJake timotimo: neat! Got it up somewhere I can take a look? 20:30
DrForr I'll put yhe (corrected) dlides up tonight. 20:32
timotimo MadcapJake: sure!
you'll need Terminal::ANSIColor
DrForr RabidGravy: perl6-noise did get a callout. 20:33
timotimo gist.github.com/timo/32cdd8ee9a602...9e84d014d0
RabidGravy yay!
DrForr++
DrForr I bsrely had the time to get tgeough the basics, peopke kept asking quesrions. 20:34
timotimo oh no, not questions! not people!!
moritz m: [&&] 0, say 42
camelia ( no output )
20:35 Actualeyes joined
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
:D
MadcapJake haha nice! I'll take a look in a bit. 20:36
dalek c: 0479386 | (Jan-Olof Hendig)++ | doc/Type/Metamodel/Primitives.pod:
Fixed another broken link
DrForr What's the URL for the chat logger? 20:38
20:38 xnrand left
moritz irclog.perlgeek.de/perl6/today 20:39
irc.perl6.org redirects there
DrForr Found it by other meabs, thankd. 20:40
20:41 |2701 left
dha Oh, DrForr ... I forgot to congratulate you on sneaking a Wild Man Fisher reference into your slides. :-) 20:43
20:45 xnrand joined 20:46 Emeric joined
DrForr I was wonderong if anyone would get thst. 20:48
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
20:49 sufrosti1o joined
DrForr Probably most people thought it eas a differwnt Larry. 20:49
moritz dyslexic keyboard? 20:50
timotimo i have no idea what wild man fisher is
dyslectric?
DrForr Galaxy 5 witjout sutocorrect. 20:51
timotimo ugh, a samsung device?
those have horrible modifications to android in them :S
DrForr Well, it's this or hauling around a huge honkin'laptop all dsy.
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? :-)
Zoffix Oh, god. github-- now they hid the clone URL under a click ~_~ 20:54
dha en.wikipedia.org/wiki/Wild_Man_Fischer
dalek c: f097697 | (Jan-Olof Hendig)++ | doc/Type/Mu.pod:
Two more broken links fixed
20:54 Emeric left
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. :-)
Zoffix ha :D
DrForr Ooo, we should redo Acme::Bleach, just think of the possibilities. I wonder if there's combining whitesoace. 20:56
moritz I really hope not. 20:57
geekosaur didn't see one 21:03
21:05 Emeric joined 21:06 silug left 21:07 silug joined, skids left 21:08 ptolemarch left 21:10 Relsak left
Zoffix fixed perl6.party Unicode rendering... 21:11
Though I'm bummed some of the chars in my Anguish article actually do show up as... filled circles :S perl6.party/post/Anguish--Invisible...Data-Theft
21:11 cognominal left
Zoffix Pretty much the only place where my Invisible Language works is the box I wrote the article on 😜😂 21:12
mst it worked here 21:14
21:14 hotel joined 21:15 hotel_california left 21:16 Emeric1 joined, Emeric left 21:18 Emeric1 is now known as Emeric 21:19 Emeric left 21:20 hotel left, hotel_california joined, Emeric joined
timotimo damn 21:21
there's no way to make .first return the previous one to the one that first matched, is there?
i'd negate my condition and use :end, but i'm working with an infinite sequence here 21:22
21:22 Emeric left
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
i've already had to put the list into an @'d variable for some reason
not entirely sure why it gave me the "already exhausted" message, but perhaps i can golf it 21:23
21:23 Emeric joined
timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = "A" X~ 1..*; $nameseq.first({ not any(@nodes) eq $_ }).perl.say 21:24
21:24 wamba left
camelia rakudo-moar e239f6: OUTPUT«(timeout)» 21:24
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
i think i have to use Z
m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = ("A" xx *) Z~ 1..*; $nameseq.first({ say $_; not any(@nodes) eq $_ }).perl.say
camelia rakudo-moar e239f6: OUTPUT«(timeout)»
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␤␤»
timotimo m: my @nodes = <A1 A2 A3 A4 A5>; my $nameseq = ("A" xx *) Z~ 1..*; $nameseq.first({ say $_; not any(@nodes) eq $_ })
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␤␤»
timotimo it might be a bug in first?
21:25 kurahaupo joined
timotimo m: my $testseq = 1..*; say $testseq.first({ rand < 0.1 }) 21:26
camelia rakudo-moar e239f6: OUTPUT«68␤»
timotimo m: my $testseq = ("A" xx *) Z~ (1..*); say $testseq.first({ rand < 0.1 })
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␤␤»
jnthn 11.* ain't a Seq though
timotimo m: my $testseq = ("A" xx *); say $testseq.first({ rand < 0.1 })
camelia rakudo-moar e239f6: OUTPUT«A␤»
jnthn uh, 1..*
timotimo oh? right, just a Range
jnthn That xx * is though
21:26 wamba joined
timotimo wouldn't the Z~ result in a lazy sequence regardless? 21:27
21:27 espadrine joined
jnthn Should do 21:27
m: my @nodes = <A1 A2 A3 A4 A5>; m: my $testseq = ("A" xx *) Z~ (1..*);
camelia ( no output )
jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my $testseq = ("A" xx *) Z~ (1..*); say $testseq[^5]
camelia rakudo-moar e239f6: OUTPUT«(A A A A A)␤»
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␤␤»
jnthn Hmm
21:28 huggable left, huggable joined
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)»
jnthn m: my @nodes = <A1 A2 A3 A4 A5>; m: my \testseq = ("A" xx *) Z~ (1..*); say testseq.first('A1')
camelia rakudo-moar e239f6: OUTPUT«A1␤»
timotimo it uses AT-POS to grab the result out after it found the key with self!first-result 21:29
jnthn D'oh
That won't end well
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!"
yey users \o/
jnthn Nice :)
Time for some rest...'night
21:30 hotel joined
chansen_ dha: let ​ = "ZERO WIDTH SPACE"; print(​); // Works just fine in Swift! <developer.apple.com/library/ios/do...-ID412> 21:30
21:30 hotel_california left
dha I'll have to let them know. :-) 21:31
timotimo wait, no
it's the other way around
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.
[Coke] drops mic and heads home.
timotimo i'm all the wrongs
21:35 Emeric left, dha left
timotimo Zoffix: well done! i also enjoy your blog posts :) 21:38
21:40 hotel_california joined 21:41 hotel left 21:50 kid51 joined
timotimo turns out my path finding had a derp that let it re-add nodes a bajillion times 21:53
it suddenly does whole-graph searches on a 400-node graph in a split second, rather than between a second and a minute
just my output algorithm isn't fast yet :)
21:55 _dolmen_ left
Zoffix Thanks. 22:00
22:01 ianm left 22:07 x86 joined 22:09 Sgeo_ joined 22:13 wamba left
timotimo MadcapJake: i updated it with the version that's at least 1000x faster 22:18
22:23 itaipu left 22:27 |2701 joined
RabidGravy right toodles 22:29
22:32 xenowoolfy joined 22:34 willthechill joined, RabidGravy left
xenowoolfy Austin, Texas: OSCON just started. Tonight at 19:00 the BOF sessions (birds of a feather) will have a Perl-session. 22:35
All are welcome. Especially TimToady++
Today opened with DrForr giving an introduction to Perl 6, for 4 hours, well-received by over 30 attendeed! 22:37
timotimo www.flexboxdefense.com/ - a tower defense game where you place your towers using the new nice CSS properties of the "flex box" set
xenowoolfy Perl BOF at OSCON in room 9ABC at 19:00 22:40
timotimo xenowoolfy: can you tell me the current localtime so i can understand when 19:00 will be? 22:44
22:45 grondilu left
xenowoolfy Hihi of course... Austin Texas... It is 17:45 now. And a BOF is a 'physical meeting'. :-) 22:46
Zoffix :)
timotimo thank you!
at that time i might even still be awake
xenowoolfy Awake is good. 22:48
timotimo depends. it'll be ~3am locally by then :) 22:50
xenowoolfy Yeah, but we probably will all be very awake and maybe not online. 22:51
We as in people at the BOF
jdv79 what happens at these bof things? 22:52
timotimo birds get feathered 22:54
(no tar allowed, though)
m: say ("A".."AJ").list
camelia rakudo-moar e239f6: OUTPUT«(A)␤»
timotimo :\
am i in the wrong to expect this to work? 22:55
jdv79 what should it do?
timotimo give me A through Z followed by AA through AJ 22:56
m: say ("1".."16").list
camelia rakudo-moar e239f6: OUTPUT«(1)␤»
timotimo oh, huh
m: say ("1"..16).list
camelia rakudo-moar e239f6: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16)␤»
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:57 espadrine left
xenowoolfy BOF is also exchanging info, show off programs, ask questions and hope for useful answers 22:58
timotimo m: say ("A"..*)[^30]
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)␤»
AlexDaniel m: .say for (‘aa’..‘acc’)
camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ac␤» 22:59
AlexDaniel m: .say for (‘aa’..*)
oops
m: .say for (‘aa’..*)[15]
m: .say for (‘aa’..*)[^15]
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…»
rakudo-moar e239f6: OUTPUT«ap␤»
rakudo-moar e239f6: OUTPUT«aa␤ab␤ac␤ad␤ae␤af␤ag␤ah␤ai␤aj␤ak␤al␤am␤an␤ao␤»
timotimo m: .say for ('aa'..'bb') 23:01
camelia rakudo-moar e239f6: OUTPUT«aa␤ab␤ba␤bb␤»
timotimo oh, it does it on every "digit" individually in that case
no, er, not that
m: .say for ('aa'..'zb')
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…»
timotimo it takes every digit-place as a separate range
AlexDaniel what?
23:01 willthechill left 23:02 firstdayonthejob left
timotimo well, in 'aa'..'zb' it iterates the first from a through z and the second from a to b 23:02
because those are the end points
AlexDaniel I mean, maybe that's dwimmy, but it is definitely wtf-y as well… 23:03
timotimo we call it WAT-y
AlexDaniel so, that does not work 23:04
m: .say for (‘zx’..‘aab’)[^5]
camelia rakudo-moar e239f6: OUTPUT«Nil␤Nil␤Nil␤Nil␤Nil␤»
AlexDaniel but that does
m: .say for (‘zx’..*)[^5]
camelia rakudo-moar e239f6: OUTPUT«zx␤zy␤zz␤aaa␤aab␤»
AlexDaniel huggable: dunno
huggable AlexDaniel, ¯\_(ツ)_/¯
timotimo yah, it only kicks in when you have a defined endpoint, and probably also only if they are the same length 23:07
not sure what's up with the aa .. acc example, though
23:09 jdv79 left 23:12 hotel_california left, hotel_california joined, _28_ria left 23:13 jdv79 joined, skids joined 23:14 xenowoolfy left 23:16 xenowoolfy joined, _28_ria joined
AlexDaniel timotimo: can you guess what is going to happen if you do ‘’..‘abc’ ? 23:17
timotimo: and a bonus question: what happens if you do ‘’..‘’ ? 23:18
timotimo from what i've seen in the recent minutes, i'd expect empty list for both 23:19
m: .say for ''..''
camelia rakudo-moar e239f6: OUTPUT«␤»
timotimo m: .say for ''..'abc'
it's a timeout instead, though?
23:19 tromp left
AlexDaniel m: dd (‘’..‘’)[^20] 23:19
camelia rakudo-moar e239f6: OUTPUT«(timeout)␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤…»
rakudo-moar e239f6: OUTPUT«("", Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil, Nil)␤»
timotimo oh, huh 23:20
AlexDaniel m: dd (‘’..‘abc’)[^20]
camelia rakudo-moar e239f6: OUTPUT«("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")␤»
timotimo edge cases, edge cases
AlexDaniel timotimo: there's another one: *..‘abc’
timotimo to expect that to give anything sane is nothing short of madness
what does it give, though?
AlexDaniel correct!
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)␤»
teatime NaNNaNNaNNaNNaNNaNNaNNaNNaN Watman!
timotimo hahaha
23:22 xenowoolfy_ joined, xenowoolfy left, xenowoolfy_ is now known as xenowoolfy, xenowoolfy left
AlexDaniel well, more stuff. I don't think that anybody can guess that 23:23
m: dd (*...‘abc’)[^20]
camelia rakudo-moar e239f6: OUTPUT«===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
AlexDaniel m: dd (*...‘’)[^20]
camelia rakudo-moar e239f6: OUTPUT«===SORRY!===␤Method 'pred' not found for invocant of class 'Whatever'␤»
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'␤»
AlexDaniel Look! A run time SORRY ?
geekosaur bets on dd doing ev[ia]l things 23:25
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'␤»
geekosaur huh
AlexDaniel WAT :]
geekosaur WATever star :p 23:27
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:28
23:29 cpage_ joined 23:31 cpage_ left
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:32
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
AlexDaniel, a single line of "debug code" is much easier to sneak in than something that redefines the whole grammar. 23:35
23:35 _nadim left
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
geekosaur ... if I banned crazy stuff in a language, much of C++ wouldn't exist >.>
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?
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:38
23:38 khw left
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
use for the spiky club" :)
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?
AlexDaniel yea, let's allow all invisible characters :D 23:42
anyway, I dunno
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 :)
AlexDaniel RT #128161 23:44
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128161
AlexDaniel what next…
it's not a real range though 23:46
Zoffix m: say *…*
camelia rakudo-moar e239f6: OUTPUT«(...)␤»
Zoffix m: say *…42
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␤␤»
AlexDaniel Zoffix: *…* is fine too 23:47
Zoffix Yeah, I'm not sure what the reporter expects the meaning of that sequence to be.
AlexDaniel m: say ‘hi’; say (*…*)[^20]
camelia rakudo-moar e239f6: OUTPUT«hi␤===SORRY!===␤Method 'succ' not found for invocant of class 'Whatever'␤»
Zoffix giggles
AlexDaniel Zoffix: well, my point is that there should be no run time SORRY!
Zoffix ¯\_(ツ)_/¯ 23:48
Zoffix resumes drinking beer and playing DOOM 2016
23:56 kurahaupo_ joined 23:57 kurahaupo` joined, cdg left, kurahaupo left