Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Ben_Goldberg joined #perl6
00:04 TEttinger joined #perl6
00:07 sprocket joined #perl6
00:09 pippo left #perl6
00:24 Actualeyes joined #perl6
00:24 diakopter___ Ben_Goldberg: lexical lookup in Moar is compiled to something like that; the $OUTER lookup is far slower than the optimized case. if a frame knows it will be looking for a lexical that's more than a few levels up, the compiler makes sure it has a direct pointer to that slot on frame setup
00:25 Juerd Just found out that my mqtt thing for Perl 6 is horribly slow. Even though what it really does is just receive messages from a socket and dump them on stdout, it can't even keep up with 10 messages per second.
00:25 Juerd But with supplies and promises going on... how do I even begin to find out what's causing the delays?
00:26 diakopter___ those use libuv threadpools underneath, afaik... and I don't know the polling frequency we've configured
00:27 Juerd Earlier today I thought my slow GPRS connection was causing it, but it behaves the same on a 1 Gb/s fiber :)
00:28 Juerd It's weird that a lot of data dumped on the socket at once results in different delays for the different messages contained
00:28 diakopter___ Juerd: how many layers of supplies/promises does it use
00:29 Juerd diakopter___: Maybe 4 or 5. I'm not sure which ones are layers, and which ones are parallel.
00:29 Juerd Code's at https://github.com/Juerd/p6-mqtt/ if you like to see it
00:30 diakopter___ I'm curious if you've tried the profiler
00:30 Psyche^_ joined #perl6
00:30 Juerd Immediately after connecting, the server sends a burst of "retained messages". They arrive in the right order at weird and uneven intervals.
00:30 Juerd Haven't tried the profiler. Any documentation, urls, or other hints?
00:32 diakopter___ use --profile in the perl6 invocation, and make sure it terminates normally after a while... it'll output an html thingie
00:33 Juerd Oh, that's nice. I'll try that
00:34 Juerd Having it terminate is a matter of replacing the "await $m.connection" with "sleep 10" ;)
00:34 diakopter___ it may not help with the supply stuff, but should certainly rule out (or not) any massive parsing slowdowns
00:35 arnsholt Juerd: Is checksumming part of the Perl 6 code?
00:35 Juerd http://juerd.nl/tmp/profile-1447979677.99682.html  # Haven't read it myself yet
00:35 Juerd arnsholt: In which sense? As in cryptographic checksums?
00:36 arnsholt Yeah
00:36 diakopter___ Juerd: did it get any messages in those 10 seconds XD
00:36 tokuhiro_ joined #perl6
00:37 Juerd diakopter___: Yes, it got all of the messages during the first half second and spent 10 seconds printing most of them...
00:37 Juerd I can tell from tcpdump that the server actually did send the messages immediately
00:37 Juerd But processing them apparently takes ages
00:37 diakopter___ well, seems it only profiled the main thread?
00:37 arnsholt It says basically all the time was spent in sleep, which is odd
00:37 Juerd Yes, it does look like it.
00:38 Juerd arnsholt: The main thread actually did spend all that time in sleep.
00:39 diakopter___ maybe try pushing the message processing to the main thread :S
00:39 Juerd Hm, this is interesting: if I do a "strace -feread perl6 foo.pl", I see that the reads are spread out.
00:39 diakopter___ just for diagnostic purposes, dunno
00:39 Juerd So perhaps IO::Socket::Async is doing something weird. (I'm guessing, mostly)
00:40 diakopter___ ISTR it uses its own cobbled async emulation... but that was ages ago
00:42 Juerd I see these huge time jumps in strace -tt:
00:42 Juerd 5945  01:41:02.513736 futex(0x4d38d94, FUTEX_WAIT_PRIVATE, 29, NULL <unfinished ...>
00:42 Juerd 5939  01:41:03.082356 <... epoll_wait resumed> {{EPOLLIN, {u32=22, u64=22}}}, 1024, 59861) = 1
00:43 diakopter___ yeah I'd suspect IO::Socket::Async
00:44 Juerd I don't know what it means that epoll_wait is "unfinished" and later "resumed"
00:45 Ben_Goldberg It got a signal?
00:45 Juerd In between there's a lot of futex stuff that I don't understand.
00:45 leont futex is locking
00:48 Juerd This is way beyond my skill set, so I'll just hope it improves.
00:49 leont My first guess is that resumed means signals are in play, but I think that wouldn't make sense in this case
00:50 leont Could also be a confusing notation for a syscall that sleeps for some time, I don't know strace that well
00:57 leont Latter seems more likely based on googling around
00:59 Hotkeys hola
01:01 diakopter___ Juerd: looks like there's some debug output you could uncomment in src/core/IO/Socket/Async.pm
01:01 diakopter___ (if you rebuild rakudo)
01:03 diakopter___ you could study this for mental code reading :) https://github.com/MoarVM/MoarVM/blob/master/src/io/asyncsocket.c
01:03 doublec_ joined #perl6
01:05 yeahnoob joined #perl6
01:06 [Coke] anyone have a summary of jnthn's latest work on NSA?
01:06 telex joined #perl6
01:06 grondilu gather/take is known to be slow in the core, but what about infix:<...>?  Because if it's ok it can be used for permutations:  https://gist.github.com/grondilu/e8536f2389fac5022f2c
01:07 TimToady ... uses gather/take internally
01:08 grondilu ah, ok. Got to stick to Seq.new I guess.
01:13 peterscott joined #perl6
01:14 [Coke] starting work on cutting the release. let me know of any issues.
01:14 * grondilu gave perms an other shot:  https://gist.github.com/grondilu/e8536f2389fac5022f2c
01:16 tokuhiro_ joined #perl6
01:21 JimmyZ grondilu: avoid return/last will be faster :P
01:23 grondilu I4m not sure how to do without a last
01:23 grondilu I mean I see but that would be a bit silly
01:24 grondilu oh wait
01:24 diakopter___ .ask lizmat did this make it into a weekly? http://blog.64p.org/entry/2015/10/30/073514
01:24 yoleaux diakopter___: I'll pass your message to lizmat.
01:25 * grondilu got that he must use IterationEnd
01:25 dalek rakudo/nom: 65a0af4 | coke++ | docs/announce/2015.11.md:
01:25 dalek rakudo/nom: Add first pass at release announcement
01:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/65a0af482b
01:32 JimmyZ yes, IterationEnd is recommanded there
01:33 * grondilu recompiles racido with his rewrite of permutations
01:33 grondilu *rakudo
01:36 mattp_ /b/ 1
01:40 grondilu FYI compilation failed
01:44 grondilu with a very helpful message:  Cannot auto-generate a proto method for 'splice' in the setting
01:47 aborazmeh joined #perl6
01:47 aborazmeh joined #perl6
01:53 Herby_ joined #perl6
01:53 Herby_ Good evening, everyone!
01:54 Herby_ Are there any tutorials for basic web scraping with Perl 6?
01:55 grondilu I doubt there are tutorials for such specific things.  But there is a rosettacode example that does that.
01:55 grondilu I'm thinking of the one that ranks programming languages
01:56 Herby_ Doh, completely forgot about looking at rosettacode examples
01:56 Herby_ thanks!
01:56 Skarsnik perl6 is kind of slow for webscrapping x)
01:56 Ben_Goldberg m: (^5).WHAT.say
01:56 camelia rakudo-moar : OUTPUT«(Range)␤»
01:56 Ben_Goldberg m: (^5).reverse.WHAT.say
01:56 camelia rakudo-moar : OUTPUT«(List)␤»
01:57 * Ben_Goldberg wonders why there's no ReversedRange class.
01:57 Herby_ Just trying to do it as a learning exercise
01:58 gfldex m: (3..1).WHAT.say;
01:58 camelia rakudo-moar : OUTPUT«(Range)␤»
01:58 gfldex Ben_Goldberg: you may want to file a bug report
01:58 gfldex m: (3..1).reverse.reverse.WHAT.say;
01:58 camelia rakudo-moar : OUTPUT«(List)␤»
01:59 gfldex a range can be rather long, so turning it into a list is a bad idea
02:00 dalek rakudo/nom: 78a9cfc | coke++ | docs/ChangeLog:
02:00 dalek rakudo/nom: Add one line about jnthn++'s shaped arrays
02:00 dalek rakudo/nom:
02:00 dalek rakudo/nom: Fix typos
02:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/78a9cfc662
02:00 dalek rakudo/nom: b33872d | coke++ | docs/announce/2015.11.md:
02:00 dalek rakudo/nom: add committers
02:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b33872d998
02:00 dalek rakudo/nom: 9e3e2ed | coke++ | docs/announce/2015.11.md:
02:00 dalek rakudo/nom: add changeloggy bits
02:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e3e2ed178
02:00 dalek rakudo/nom: c6626db | coke++ | docs/release_guide.pod:
02:00 dalek rakudo/nom: Name release in the guide
02:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c6626dbfd0
02:00 Skarsnik Herby_, if you want an example https://gist.github.com/Skarsnik/cc6a997fe72b1caae73d
02:01 Herby_ Thanks, Skarsnik
02:02 dalek rakudo/nom: dfa0c05 | coke++ | tools/build/NQP_REVISION:
02:02 dalek rakudo/nom: [release] bump NQP revision
02:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dfa0c05b91
02:02 dalek rakudo/nom: 20c9510 | coke++ | VERSION:
02:02 dalek rakudo/nom: [release] bump VERSION
02:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20c95106ba
02:04 gfldex m: say so (3..1).min < (3..1).max; # :->
02:04 camelia rakudo-moar : OUTPUT«False␤»
02:05 gfldex m: say min 3..1;
02:05 camelia rakudo-moar : OUTPUT«Inf␤»
02:06 gfldex m: say [min] 3..1
02:06 camelia rakudo-moar : OUTPUT«Inf␤»
02:07 gfldex m: say [min] (3..1).list
02:07 camelia rakudo-moar : OUTPUT«Inf␤»
02:07 grondilu m: say min ()
02:07 camelia rakudo-moar : OUTPUT«Inf␤»
02:07 gfldex m: say [min] 1..3
02:07 camelia rakudo-moar : OUTPUT«1␤»
02:07 grondilu m: say 0 < min ()
02:07 camelia rakudo-moar : OUTPUT«True␤»
02:09 gfldex m: .say for 3..1;
02:09 camelia rakudo-moar : ( no output )
02:09 gfldex m: .say for 1..3, |3..1;
02:09 camelia rakudo-moar : OUTPUT«1..3␤1..1␤»
02:10 kid51 joined #perl6
02:10 gfldex i will rakudobugS this tomorrow
02:11 gfldex m: (3..1).elems.say;
02:11 camelia rakudo-moar : OUTPUT«0␤»
02:11 grondilu well, my &perms does not compile.  Even if I only put "IterationEnd" in pull-one
02:11 gfldex that may not work well with https://github.com/rakudo/rakudo/blob/nom/src/core/Range.pm#L89
02:12 Skarsnik Herby_, parse-html is from the Gumbo module if you are wondering, not in perl6 x)
02:13 Herby_ k
02:14 Herby_ i'm walking my way through, trying to figure out whats going on :)
02:19 [Coke] how do I revert a merge commit?
02:20 Skarsnik I think there is a revert on merge?
02:21 Ben_Goldberg m: (3...1).say
02:21 camelia rakudo-moar : OUTPUT«(3 2 1)␤»
02:21 Ben_Goldberg gfldex, Is that what you wanted?
02:21 Ben_Goldberg m: (3...1).WHAT.say
02:21 camelia rakudo-moar : OUTPUT«(Seq)␤»
02:22 gfldex Ben_Goldberg: no, i actually want a inverted Range literal either work or fail at compile time
02:23 grondilu making it fail at compile time would make sense.
02:23 grondilu (imho)
02:23 gfldex m: my $a = 3; my $b = 1; .say for $a .. $b; # that should fail at runtime
02:23 camelia rakudo-moar : ( no output )
02:24 gfldex well actually, that should just work
02:24 ShimmerFairy joined #perl6
02:24 grondilu you were talking about "range literal"
02:24 gfldex i were
02:24 grondilu $a .. $b is not a literal
02:25 gfldex sometimes i change what i talk about without further notice
02:25 grondilu ok
02:26 lizmat computer: messages
02:26 yoleaux 01:24Z <diakopter___> lizmat: did this make it into a weekly? http://blog.64p.org/entry/2015/10/30/073514
02:27 kaare_ joined #perl6
02:27 lizmat diakopter: I don't think so
02:27 gfldex m: my @l = <a b c>; dd @l[3..1];
02:27 camelia rakudo-moar : OUTPUT«List $var = $()␤»
02:31 dayangkun joined #perl6
02:32 xpen joined #perl6
02:32 raiph joined #perl6
02:32 dalek rakudo/nom: d9dde76 | coke++ | src/core/IO/Handle.pm:
02:32 dalek rakudo/nom: Revert "Merge pull request #592 from pmurias/tty-checking"
02:32 dalek rakudo/nom:
02:32 dalek rakudo/nom: This reverts commit 3806c1011edbe1bf1632d4955dd9810e8cafbc83, reversing
02:32 dalek rakudo/nom: changes made to 46c7c074910d1fef36071f925128602bedc22b9f.
02:32 dalek rakudo/nom:
02:32 dalek rakudo/nom: Build failed on JVM
02:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9dde76fc1
02:33 gfldex TimToady: should (3..1).elems > 0 ?
02:33 gfldex m: say (3..1).elems
02:33 camelia rakudo-moar : OUTPUT«0␤»
02:34 lizmat [Coke]: did you see grondilu's request at reverting the permutations optimization ?
02:34 lizmat [Coke]: ah, too late...
02:36 lizmat m: say (3...1).elems   # gfldex
02:36 camelia rakudo-moar : OUTPUT«3␤»
02:36 lizmat gfldex: simple ranges are always increasing
02:36 lizmat if the end is lower than the start, you get 0 elems
02:37 lizmat sequences (aka infix:<...>) can be descending, thus yielding 3 elems in example
02:38 gfldex that's even documented in http://doc.perl6.org/type/Range :->
02:38 gfldex at least for Range literals it should warn/fail
02:45 bpmedley joined #perl6
02:45 lizmat re tokuhiro_ 's log: https://gist.github.com/lizmat/5d452c8a8eb7a000bd2c
02:46 lizmat it does not require nqp, which is a good thing  :-)
02:46 AlexDaniel wow NativeCall! Now it seems like I am going to write tests for a C library in perl6… At least I see no reasons not to do so. Has anybody tried that?
02:46 lizmat gfldex: you mean "Ranges always go from small to larger elements; if the start point is bigger than the end point, the range is considered empty."
02:46 lizmat ?
02:47 gfldex yes
02:47 tokuhiro_ lizmat: thanks. this entry is a note about reading rakudo code :)
02:47 sprocket joined #perl6
02:47 grondilu AlexDaniel: that's a fun idea
02:47 lizmat AlexDaniel: a long time ago (well, about 13 years now), I wrote Perl 5 tests for a system written in C, so the idea at least is not new
02:48 AlexDaniel lizmat: nice!
02:48 lizmat tokuhiro_: ok, I was just surprised about the use of nqp::decont() when it wasn't necessary
02:49 AlexDaniel grondilu: yeah! I am a bit worried about NativeCall limitations, but perhaps these could be solved as I move on… :)
02:49 finanalyst joined #perl6
02:49 * lizmat now wonders whether we could use syntactic sugar for "until ($foo := iter.pull-one) =:= IterationEnd
02:50 lizmat something like:
02:51 lizmat iterate $iter -> $value {   }
02:52 grondilu shouldn't 'for' already do that?
02:52 lizmat for doesn't automatically do a pull-one and check on IterationEnd afaik
02:53 gfldex m: my @a = do for 1..5 -> $i { $i }; dd @a; # for is doing a bit more then that
02:53 camelia rakudo-moar : OUTPUT«Array $var = $[1, 2, 3, 4, 5]␤»
02:54 grondilu like creating the array?  Isn't that what 'do' does?
02:54 lizmat do only makes sure the final value of each iteration isn't sunk
02:55 lizmat again, afaik
02:56 grondilu then what you want is map, no?
02:56 grondilu map -> $value {...}, $iter
02:56 grondilu I mean if there's a difference, it's subttle
02:57 dalek rakudo/nom: b8160db | lizmat++ | src/core/native_array.pm:
02:57 dalek rakudo/nom: Revert "improve permutations"
02:57 dalek rakudo/nom:
02:57 dalek rakudo/nom: This reverts commit 57b83f4ad7803bb2dc96313c42636229ca76bf6d.
02:57 dalek rakudo/nom:
02:57 dalek rakudo/nom: As requested by the original PR author, grondilu++
02:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b8160db607
02:58 lizmat grondilu: map and for *request* an iterator for what they get
02:58 AlexDaniel lizmat: oh, so the idea is getting to the age of consent! And I am not surprised, actually
02:58 lizmat they don't use the iterator directly (yet, anyway)
02:59 gfldex from S04: Arguments bound to the formal parameters of a pointy block are by default readonly within the block. You can declare a parameter read/write by including the "is rw" trait. The following treats every other value in @values as modifiable:
02:59 synbot6 Link: http://design.perl6.org/S04.html#Arguments_bound_to_the_formal_parameters_of_a_pointy_block_are_by_default_readonly_within_the_block
03:00 gfldex that may not be a good idea for iterators
03:01 gfldex however, having a smarter for would be better then intruducing another keyword
03:01 aborazmeh joined #perl6
03:01 aborazmeh joined #perl6
03:02 gfldex for and given are doing fance stuff to $_ too
03:06 [Coke] 2 failing tests, will skip them for the release.
03:08 kid51_ joined #perl6
03:09 [Coke] ... dammit.
03:09 [Coke] Please hold off on any further commits.
03:10 [Coke] now kicking off a fresh test to make sure I've gotten lizmat's latest work.
03:10 lizmat [Coke]: I thought you had already tagged
03:10 lizmat ?
03:10 lizmat :-(
03:11 * lizmat kicks off another spectest as penance
03:11 [Coke] no. I'm in the middle of the release.
03:12 lizmat [Coke]: my apologies for the misunderstanding
03:14 doublec_ joined #perl6
03:17 lizmat [Coke]: I guess the two failures are due to the revert of the .t / isatty functionality on account of it breaking the JVM build ?
03:18 [Coke] eh. I'm not running the java tests, so it's not as painful as it would have been in the past.
03:18 [Coke] very likely.
03:19 lizmat [Coke]: so perhaps the revert should be changed into a conditional for jvm/!jvm ?
03:21 [Coke] I'd rather not do any surgery when we don't really support the jvm at this point.
03:21 [Coke] we just want to ship something that compiles. You can fix it better post-release.
03:22 lizmat okidoki (which is what I thought I was doing :-)
03:24 noganex joined #perl6
03:25 [Coke] I'm also seeing 2 hangs in the test suite.
03:26 [Coke] IO-Socket-Async.rakudo.moar
03:26 dalek doc: 8b0e97e | (Kamil Kułaga)++ | doc/Language/classtut.pod:
03:26 dalek doc: Comment about new method to not confuse new users
03:26 dalek doc:
03:26 dalek doc: Due to first example contains custom `new` it may give impression that writing `new` is something that programmer want to do. Maybe it would be good to mark it as non standard behavior and say that probably want to write build method?
03:26 dalek doc: review: https://github.com/perl6/doc/commit/8b0e97ec43
03:26 dalek doc: 288e717 | (Zoffix Znet)++ | doc/Language/classtut.pod:
03:26 dalek doc: Merge pull request #179 from perl6/teodozjan-patch-1
03:26 dalek doc:
03:26 dalek doc: Comment about new method to not confuse new users
03:26 dalek doc: review: https://github.com/perl6/doc/commit/288e7176a5
03:26 [Coke] t/spec/S17-supply/syntax.t
03:29 sprocket joined #perl6
03:30 dalek rakudo/nom: 7a4fa6a | coke++ | t/spectest.data:
03:30 dalek rakudo/nom: These tests were causing trouble.
03:30 dalek rakudo/nom:
03:30 dalek rakudo/nom: They'll have to be fixed before Christmas :(
03:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a4fa6a78d
03:36 lizmat [Coke]: fwiw, onlt t/spec/S17-supply/syntax.t is a flapper for me
03:38 diakopter lizmat: also the Crust blog entry there
03:38 [Coke] lizmat: danke.
03:41 diakopter lizmat: this is the one I meant to paste above actually http://blog.64p.org/entry/2015/10/08/104052
03:42 lizmat diakopter: yes, Crust was mentioned as an ecosystem addition, afaik
03:42 diakopter oh
03:42 lizmat on October12
03:43 diakopter and then there's this.. http://mattn.kaoriya.net/software/lang/perl6/20151026144119.htm
03:44 diakopter well, and this http://mattn.kaoriya.net/software/lang/perl6/20151019183138.htm
03:44 diakopter SyoboiScript
03:46 diakopter truly great: method call($/){ make $func{$<ident>.Str}(self.expr($<expr>)); }
03:46 lizmat diakopter: if there would be an easy translation link to English somewhere, we could think about mentioning them ?
03:47 diakopter i dunno
03:48 Ben_Goldberg Google Chrome offers to translate the page for me ;)
03:48 diakopter it boinks the code box though
03:49 Ben_Goldberg Yeah, newlines and indentation in the example code get trashed.
03:57 diakopter tokuhiro_: have you measured how many requests/s Crust can handle?
03:57 dalek doc/initial-styleguide: 75af98e | (Brock Wilcox)++ | / (2 files):
03:57 dalek doc/initial-styleguide: Add initial styleguide
03:57 dalek doc/initial-styleguide: review: https://github.com/perl6/doc/commit/75af98ee4f
04:01 * lizmat goes to bed
04:03 tokuhiro_ diakopter: yes. i measured few months ago. but i lost the data :(
04:05 pyrimidi_ joined #perl6
04:06 [Coke] tag is pushed, go ahead.
04:06 MadcapJake I'm stuck at an impasse, looking for some ideas.  bare regexes (/.../) without `rx|m` are also capturing whenever division `/` happens.  Any ideas for how to avoid this?  I've tried selecting a bunch of different common chars that wouldn't appear right next to a regex but it still catches when the division operator is separated by whitespace `$a / 2` etc.
04:07 jevin_ joined #perl6
04:07 MadcapJake I thought maybe they are single-line only and you need `rx|m` for multiline form, but that appears to be untrue.
04:08 [Coke] tarball for #93, "Bend" is available.
04:08 [Coke] As per last time, I'll send out the release email in the morning.
04:09 frew joined #perl6
04:09 dalek rakudo/nom: e88196a | coke++ | t/spectest.data:
04:09 dalek rakudo/nom: unskip tests post release.
04:09 dalek rakudo/nom:
04:09 dalek rakudo/nom: (Note that one of these wasn't skipped. whoops. it was just hanging,
04:09 dalek rakudo/nom: should be fine, don't worry about it)
04:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e88196a8eb
04:09 zostay joined #perl6
04:10 Actualeyes joined #perl6
04:12 colomon joined #perl6
04:14 [Coke] .tell pmurias please feel free to try to add those patches again now that the release is done; sorry I had to back them out, hopefully we can get the issue fixed easily. Thanks.
04:14 yoleaux [Coke]: I'll pass your message to pmurias.
04:26 FD0_ joined #perl6
04:46 zengargoyle joined #perl6
04:57 MadcapJake In case anyone's curious, I decided to go with a more inclusive rule with bare regexes that only highlights in a couple cases (the only times you'd really use a regex) rather than trying to list all the possible times a `/` wouldn't be a regex beginning delimiter.  Only issue with this is that I might've missed a case but I'm pretty confident that's not the case. :P
04:59 ugexe grammars are the bane of text highlighting perl6 in sublime text for the same reason :(
05:00 ugexe using ModernPerl (not a actual perl6 highlighter)
05:01 skids m: Str.^methods.grep({.name eq "Num"}).perl.say; Str.?Num # should .? be ignoring the :D candidate?
05:01 camelia rakudo-moar : OUTPUT«(method Num (Str:D $: *%_) { #`(Method|58877176) ... },).Seq␤Invocant requires an instance of type Str, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/rDmXHLZ66u:1␤␤»
05:02 grondilu my Seq implementation of permutations works in the core :)  I'll submit a PR soon.
05:02 grondilu (it seems pretty fast too)
05:04 finanalyst joined #perl6
05:10 grondilu ah shoot I thought it worked, but it doesn't.
05:11 Hotkeys Darn
05:13 grondilu debuging some code in the core is tedious.  How could I test a piece of code "as if it was" in the core?
05:37 MadcapJake ugexe: you should give mine a try then! :)  It's really very richly highlighted.  Just a couple minor little bits and it'll be v1.0.0
05:51 grondilu std: say "hi"
05:51 camelia std : OUTPUT«No such file or directory»
05:51 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤»
05:51 grondilu m: {  }(rand)
05:51 camelia rakudo-moar : OUTPUT«Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/L861GubJdF:1␤␤»
05:51 grondilu m: { $_ }(rand)
05:51 camelia rakudo-moar : ( no output )
05:51 grondilu m: { $_ }(rand;)
05:51 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/r4Et69LS9Y␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/r4Et69LS9Y:1␤------> 3{ $_ }(rand7⏏5;)␤»
05:52 grondilu ^I had made a mistake like that while writing in the core and I had no error at compilation.
05:55 grondilu more precisely it was:
05:56 grondilu m: Seq.new(class :: does Iterator { }.new();)
05:56 camelia rakudo-moar : OUTPUT«===SORRY!===␤Method 'pull-one' must be implemented by <anon|60375552> because it is required by a role␤»
05:56 grondilu m: Seq.new(class :: does Iterator { method pull-one { IterationEnd } }.new();)
05:56 camelia rakudo-moar : OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/dqKMF0QmMN:1␤␤»
05:56 grondilu ^this
05:56 grondilu m: Seq.new(class :: does Iterator { method pull-one { IterationEnd } }.new())
05:56 camelia rakudo-moar : ( no output )
06:14 xiaomiao joined #perl6
06:16 molaf joined #perl6
06:36 domidumont joined #perl6
06:53 grondilu m: say Seq.new(class :: does Iterator { method pull-one { IterationEnd } }.new()).is-lazy
06:53 camelia rakudo-moar : OUTPUT«False␤»
06:53 grondilu not sure why Seq(s) are not lazy by default.
06:53 grondilu that prevents .elems to return when they are lazy.
06:54 grondilu I wanted to define C<method count-only { [*] 1 .. $!n }> but that won't work with a lazy Seq :(
06:57 domidumont joined #perl6
06:57 domidumont joined #perl6
06:58 diana_olhovik_ joined #perl6
06:59 Phagus joined #perl6
06:59 abraxxa joined #perl6
07:21 abraxxa joined #perl6
07:26 rindolf joined #perl6
07:35 darutoko joined #perl6
07:47 masak morning, #perl6
07:47 masak grondilu: why not spectest a change where they're lazy by default?
07:47 [Tux] test             50000    21.241    21.127
07:47 [Tux] test-t           50000    18.103    17.989
07:47 [Tux] csv-parser       50000    28.644    28.529
07:48 moritz if they are lazy by default, things like @list.map(...).elems would not work
07:52 cgfbee joined #perl6
07:54 rurban joined #perl6
07:58 sprocket joined #perl6
07:59 rurban joined #perl6
08:00 zhmylove joined #perl6
08:02 yeahnoob joined #perl6
08:15 grondilu it's not so much that they are not lazy by default that bothers me, it's the fact that we can't call .elems when they are lazy.  Seems a bit strong a constraint, imho.  For instance with permutations, we really want it to be lazy because it can be very big a list.  Yet its number of elements is very well known and can be computed immediately.
08:17 moritz but that's a very specific case, unusual case
08:18 grondilu I suppose I can use a role { method elems {...} }
08:18 moritz one could always mix in a role that provides .elems
08:18 moritz right
08:18 moritz or a subclass
08:18 grondilu I'll try using a role
08:28 grondilu yeah I got something that passes t/roast/S32-list/permutations.t
08:29 meilin joined #perl6
08:31 * grondilu recompiles with Seq.new(...) but role { method elems { [*] 1 .. $n } }
08:40 zakharyas joined #perl6
08:46 meilin left #perl6
08:52 kjs_ joined #perl6
08:55 grondilu hum I still get "Cannot .elems a lazy list"
08:55 black_ant joined #perl6
08:57 grondilu m: say Seq.new(class :: does Iterator { method pull-one { IterationEnd }; method is-lazy { True } }.new()).elems
08:57 camelia rakudo-moar : OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/CKKA9ZrkIq:1␤␤Actually thrown at:␤  in block <unit> at /tmp/CKKA9ZrkIq:1␤␤»
08:57 psch m: my $x = Seq.new(class :: does Iterator { method pull-one { IterationEnd } }.new()) but role { method elems { 5 } }; say [+] $x.elems # .sum already cheat somehow iirc..?
08:57 camelia rakudo-moar : OUTPUT«5␤»
08:57 psch +s
08:57 grondilu m: say (Seq.new(class :: does Iterator { method pull-one { IterationEnd }; method is-lazy { True } }.new()) but role { method elems { 0 } }).elems
08:57 camelia rakudo-moar : OUTPUT«0␤»
08:58 grondilu m: say (Seq.new(class :: does Iterator { method pull-one { IterationEnd }; method is-lazy { True } }.new()) but role { method elems { 0 } }).list.elems
08:58 camelia rakudo-moar : OUTPUT«Cannot .elems a lazy list␤  in block <unit> at /tmp/Wrx0AB8vLQ:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Wrx0AB8vLQ:1␤␤»
08:58 grondilu I'm losing the role when converting into list
08:58 grondilu and t/roast/S32-list/permutations.t has explicit conversion to list
09:01 grondilu m: say (Seq.new(class :: does Iterator { method pull-one { IterationEnd }; method is-lazy { True } }.new()) but role { method elems { 0 } }).list.eager.elems
09:01 camelia rakudo-moar : OUTPUT«0␤»
09:01 grondilu maybe there should be an eager in t/roast/S32-list/permutations.t
09:01 psch m: say (Seq.new(class :: does Iterator { method pull-one { IterationEnd }; method is-lazy { True } }.new()) but role { method elems { 5 } }).list.eager.elems
09:01 camelia rakudo-moar : OUTPUT«0␤»
09:02 psch doesn't help you *keep* the elems from the role
09:02 softmoth_ joined #perl6
09:02 psch grondilu: you'd probably have to adapt List.from-iterator to carry that over
09:03 grondilu not sure how to do it.  try { $iter.elems }  or somthing like that?
09:03 psch which would also mean having an $!elems in List or reify anyway...
09:04 psch maybe a PermutationsResult or somesuch would be the better idea, i don't think having explicit $!elems in List is a good idea...
09:05 psch grondilu: right, that's how you'd get it, but there's not really a spot in List to store it
09:06 psch 'cause elems reifies and asks nqp about the size
09:07 grondilu moritz pointed out that having a .elems for a lazy list is very peculiar, so this possibility should not influence the behavior of List
09:07 grondilu I think we'd rather just add an eager in t/roast/S32-list/permutations.t
09:08 psch i agree with that, which is why i'm thinking PermutationsResult (or maybe KnownSizeLazyList, for general applicability) which isa List could be a workable solution
09:08 psch adding the eager doesn't help (and changes the language requirements)
09:09 bpmedley joined #perl6
09:09 psch it just throws away the .elems on the Seq, reifies the list and gives you that count
09:09 grondilu in any case as it is, this test file can not work with a lazy list of permutations.  This is LTA.
09:10 grondilu though I don't understand how it can currently work with the gather/take implementation.
09:13 grondilu the following passes the test but is not lazy:  https://gist.github.com/grondilu/e8536f2389fac5022f2c
09:13 lab_ joined #perl6
09:13 finanalyst I've been working on a Citation index for Perl6 modules. Table can be seen at http://finanalyst.github.io/ModuleCitation/
09:14 finanalyst I hope to update it and look at the change over time. Is it interesting?
09:15 grondilu oh it does not hang with large n though.  I guess I don't quite understand what "lazy" really means.
09:19 * grondilu submitted a PR.
09:25 grondilu finanalyst: not sure 'citation' is the best word for this.
09:33 timotimo yo
09:33 grondilu m: say permutations(10)[*-1]
09:34 camelia rakudo-moar : OUTPUT«(timeout)»
09:34 grondilu m: say permutations(6)[*-1]; say now - INIT now
09:34 camelia rakudo-moar : OUTPUT«(5 4 3 2 1 0)␤0.74277174␤»
09:34 grondilu m: say permutations(8)[*-1]; say now - INIT now
09:34 camelia rakudo-moar : OUTPUT«(timeout)»
09:34 grondilu m: say permutations(7)[*-1]; say now - INIT now
09:34 camelia rakudo-moar : OUTPUT«(6 5 4 3 2 1 0)␤5.98858588␤»
09:37 dalek perl6-bench: 6ca4e0d | timotimo++ | perl6/ (3 files):
09:37 dalek perl6-bench: fix insertion-sort, merge-sort and pi-seq-iter for scale == 0
09:37 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/6ca4e0d12b
09:38 timotimo i need to get my desktop unbusy and re-run the benchmarks uh-gain~
09:38 timotimo but now there's a 2015.11 tag; that'll look better in the results page
09:42 timotimo and also it'll actually pull in the latest nqp and moar; not sure how far back the last ones were when i ran benchmarks
09:44 espadrine joined #perl6
09:48 kjs_ joined #perl6
09:55 psch good news!  the FAIL in t/nqp/90-findmethod.t on jvm isn't a regression!
09:55 psch well, NPE not FAIL
09:55 psch it just never worked in the first place \o/
10:02 psch grondilu: re your PR: can the die call actually ever happen?  and if so, is there a way you can prevent that instead of dying from there?
10:07 domidumont joined #perl6
10:09 domidumont joined #perl6
10:14 telex joined #perl6
10:16 doublec_ joined #perl6
10:20 ribasushi joined #perl6
10:20 arnsholt timotimo: I pushed some stuff to iperl6kernel last night. Now it can evaluate code properly! =D
10:20 psch arnsholt++
10:21 psch still not sure how functional we want the stock REPL
10:21 psch like, moreinput is quite a beast :/
10:21 jnthn morning, #perl6
10:24 psch o/ jnthn
10:24 arnsholt The hard part of making it work was network communication and such
10:25 arnsholt Evaluating code and capturing stdout was really, really simple
10:26 salv0 joined #perl6
10:27 domidumont joined #perl6
10:28 finanalyst grondilU: if not citation, then what? It mirrors citation indices in academic papers
10:28 konobi morning all
10:30 psch so the NPE in t/nqp/90-findmethod.t happens because the method it finds is a CodeRef that pretty much directly points at KnowHOWMethods.methods, and the parameterized constructor for CodeRef doesn't set the STable
10:31 psch and that constructor is what we use to bootstrap the knowhow
10:33 espadrine joined #perl6
10:36 jnthn Maybe some fool played fast and loose when doing the bootstrap... :)
10:36 psch i mainly don't know how to figure out which STable fits there... vOv
10:37 jnthn Is there a BOOTCode type somewhere?
10:37 psch yeah, the KnowHOWBootstrapper stuffs that into the gc
10:38 psch so that means we should also already have it, right?
10:38 jnthn Maybe we have to come back and fix up things created "early"?
10:38 pdcawley joined #perl6
10:41 psch oh, right.  we don't have the BOOTCode STable yet
10:50 softmoth_ joined #perl6
10:51 znpy joined #perl6
10:55 psch testing now
10:55 psch the file on its own worked, but running the full nqp tests seems sensible :P
10:56 jnthn :P
10:56 * jnthn is digging into getting native shaped arrays working
10:57 El_Che TimToady: I saw your craiglist talk yesterday. \o/
10:59 breinbaas joined #perl6
11:01 dalek nqp: 3647cc5 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/KnowHOWBootstrapper.java:
11:01 dalek nqp: Get t/nqp/90-findmethod.t passing.
11:01 dalek nqp:
11:01 dalek nqp: Apparently someone "played fast and loose" with bootstrapping the KnowHOW, we
11:01 dalek nqp: just didn't notice before.  pmurias++ for the test and jnthn++ for a hint or
11:01 dalek nqp: two.
11:01 dalek nqp: review: https://github.com/perl6/nqp/commit/3647cc5029
11:01 psch there we go, clean nqp-j tests
11:02 jnthn :)
11:02 jnthn "someone"...wonder who? :D
11:02 psch ...no idea, i wasn't around then :)
11:03 dalek rakudo/nom: a2e5a00 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
11:03 dalek rakudo/nom: Revert "Properly fix RT #126673."
11:03 dalek rakudo/nom:
11:03 dalek rakudo/nom: This reverts commit 7781481936a6673953a781c2b0c9a8c77a1e8174.
11:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a2e5a003a7
11:03 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126673
11:03 dalek rakudo/nom: 9c82d4c | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
11:03 dalek rakudo/nom: Turns out we can fix this much simpler, as here.
11:03 dalek rakudo/nom:
11:03 dalek rakudo/nom: The original problem, as it turns out, was the operands to istype being the
11:03 dalek rakudo/nom: wrong way aroud. Additionally, renaming the variable containing the type that's
11:03 dalek rakudo/nom: supposed to bypass the type check to "bypassType" seems like a good
11:03 dalek rakudo/nom: code-as-documentation decision.
11:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c82d4c721
11:03 psch and with this i fixed that ticket 3 times and revert two of the solutions... :S
11:04 moritz does that actually increase or decrease your confidence that it's fixed properly now? :-)
11:04 doublec joined #perl6
11:04 psch each iteration increased the confidence, of course
11:05 eliasr joined #perl6
11:05 psch but well, in general i don't develop much of that anyway... confidence that is :P
11:11 moritz IME there's a drop-off point
11:11 moritz after the 5th iteration or so I believe that the problem has no good solution, and my confidence is very low again
11:17 psch well, in this instance the previous iterations had to be discarded because i didn't pay enough attention to see the actual problem... :S
11:20 Skarsnik joined #perl6
11:22 jnthn Darn, wish I was feeling cleverer today...
11:39 nine jnthn: it can always be worse. Today I've failed so far in checking if the modification times of a list of precomp files are all before the one I'm checking against. This is a stupid beginner's exercise, damn it :)
11:41 jnthn all($those-times) < $current-time # :)
11:41 jnthn Well, @those-times :)
11:42 pecastro_ joined #perl6
11:52 nine Is all() actually smart enough to stop looking once one element violates the condition?
11:53 rurban joined #perl6
11:53 jnthn Not sure in this case. On Bool and ACCEPTS it is
11:54 nine I tried something along not $store.path(any(@ids)).modified >= $since which works when I try it separately but when I do it for real, it still fails to recompile the outdated module.
11:54 nine Well I will find the reason in the afternoon . Probably some stupid mistake somewhere.
11:55 jnthn Probably :)
11:56 doublec joined #perl6
11:58 leont joined #perl6
11:59 JimmyZ Isn't it any() ?
12:01 jnthn Uh, yes :)
12:02 black_ant joined #perl6
12:06 grondilu psch: no, the die can not logically happen.  I did put it there to catch a coding error or something.  I guess I should remove it but I thought it was quite cheap so I left it as is.
12:06 CQ joined #perl6
12:07 black_ant joined #perl6
12:07 psch grondilu: my concern was mostly from an end user perspective.  assuming it could happen it should throw something from X::, and if it can't it doesn't need to be there
12:07 dalek rakudo/nom: ec6220f | jnthn++ | src/core/ (2 files):
12:07 dalek rakudo/nom: Factor out shaped storage alloc/interning.
12:07 dalek rakudo/nom:
12:07 dalek rakudo/nom: So we can use it for both Array and array.
12:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec6220f189
12:07 dalek rakudo/nom: 27b1ab6 | jnthn++ | src/core/native_array.pm:
12:07 dalek rakudo/nom: Add a default .shape method to array.
12:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/27b1ab6bf9
12:07 dalek rakudo/nom: 8122895 | jnthn++ | src/core/native_array.pm:
12:07 dalek rakudo/nom: Allocate shaped storage for native arrays.
12:07 dalek rakudo/nom:
12:07 dalek rakudo/nom: This gets the fixed size case working already, but not multi-dim
12:07 dalek rakudo/nom: cases.
12:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8122895b78
12:20 doublec joined #perl6
12:21 kaare_ joined #perl6
12:22 bombless joined #perl6
12:26 bbarker joined #perl6
12:28 sufrostico joined #perl6
12:28 dalek rakudo/nom: ccd386b | jnthn++ | src/core/native_array.pm:
12:28 dalek rakudo/nom: EXISTS-POS for native shaped arrays.
12:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ccd386b786
12:33 grondilu psch: ok, removed from the patch
12:38 kid51 joined #perl6
12:38 softmoth_ joined #perl6
12:41 black_ant joined #perl6
12:45 black_ant joined #perl6
12:46 dalek doc: 032c382 | (Brock Wilcox)++ | doc/Language/classtut.pod:
12:46 dalek doc: Minor grammar fix
12:46 dalek doc: review: https://github.com/perl6/doc/commit/032c382186
12:49 Ven joined #perl6
12:50 Ven \o
12:50 yoleaux 19 Nov 2015 22:59Z <Zoffix> Ven: could you look at http://modules.perl6.org/ and try pressing SPACE or Down Key. Does the same issue happen as on docs.perl6.org that you can't scroll?
12:52 dalek rakudo/nom: e53be19 | jnthn++ | src/ (2 files):
12:52 dalek rakudo/nom: Add missing optimization of multi-dim assign.
12:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e53be19507
12:52 dalek rakudo/nom: 9fb2183 | jnthn++ | src/core/ (2 files):
12:52 dalek rakudo/nom: Implement access to native shaped arrays.
12:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9fb2183b62
12:53 dalek roast: ab1cf9a | jnthn++ | S09-multidim/ (2 files):
12:53 dalek roast: Some initial tests for native shaped arrays.
12:53 dalek roast: review: https://github.com/perl6/roast/commit/ab1cf9a9ef
12:54 jnthn lunch &
12:54 ab6tract joined #perl6
12:55 ab6tract jnthn: i'm curious about the junction internals ... why are they not implemented using the reduce op?
12:55 pink_mist he /just/ went off to lunch
12:55 ab6tract we would get short-circuiting for free...
12:56 ab6tract [&&] $current-time X> @all-the-times
12:56 ab6tract i guess the difference is that this does not return a junction, so is more equivalent to so all(@the-times) > $current-time
12:57 ab6tract but i'm also at a loss as to when the bare junction is really worth it
12:57 ab6tract considering they are too slow to use in core, and seem to be generally discouraged for production as well
12:58 ab6tract hmm, i guess the semantics change very significantly as well
13:00 pecastro joined #perl6
13:05 Ven urgh, I was writing a script to parse some c++ for $work, then I got remainded I was writing a script to parse some c++
13:07 Skarsnik good luck lol
13:09 pippo joined #perl6
13:10 Ven Skarsnik: I gave up :). no way to track namespaces easily. it'd be easier to use some clang api at this point
13:10 grondilu the guy from http://www.quickperm.org/ authorized the use of his algorithm inside the code.  I can forward the email for archive purposes or something.
13:10 grondilu s/code/core/
13:11 Skarsnik Ven, if you are bored, write something to parse c/cpp headers and extract definition!
13:11 dalek doc: 0284491 | (Ricardo Signes)++ | lib/Language/classtut.pod:
13:11 dalek doc: fix anchor link
13:11 dalek doc:
13:11 dalek doc: The old link was to `#Object Construction` but the live page has an underscore in place of space.
13:11 dalek doc: review: https://github.com/perl6/doc/commit/02844912d1
13:11 dalek doc: 1f5df41 | (Zoffix Znet)++ | doc/Language/classtut.pod:
13:11 dalek doc: Merge branch 'patch-1' of https://github.com/rjbs/doc into rjbs-patch-1
13:11 dalek doc: review: https://github.com/perl6/doc/commit/1f5df4125e
13:11 dalek doc: b420ad8 | (Zoffix Znet)++ | doc/Language/classtut.pod:
13:11 dalek doc: Merge branch 'rjbs-patch-1'
13:11 dalek doc: review: https://github.com/perl6/doc/commit/b420ad8577
13:11 Ven Skarsnik: well, I already extract definition, but it's just "one-off". I don't know about the context. So, I can't parse c++
13:12 Skarsnik I am not kidding, it could be useful to write C/Cpp binding x)
13:16 Ven Parsing C++ is *very* hard
13:16 leont Yeah
13:16 leont For reasons similar to perl5
13:16 Ven the result of a function in C++ can change a program between "parse error" and "working"
13:17 leont though the ambiguities are in slightly different places
13:17 Ven constexpr functions, SFINAE, etc, are things you need to take into account *at parsing time*
13:17 Ven m: BEGIN { say 'hey'; }; $xxx++; # look
13:17 camelia rakudo-moar : OUTPUT«hey␤5===SORRY!5=== Error while compiling /tmp/fhn7Yb2YvL␤Variable '$xxx' is not declared␤at /tmp/fhn7Yb2YvL:1␤------> 3BEGIN { say 'hey'; }; 7⏏5$xxx++; # look␤»
13:17 Ven ^ exactly this kind of crazy stuff ;)
13:19 pecastro joined #perl6
13:21 dalek doc: 297b8a1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
13:21 dalek doc: Fix example for Language/control/last.
13:21 dalek doc: review: https://github.com/perl6/doc/commit/297b8a1c77
13:21 dalek doc: f41e3a4 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
13:21 dalek doc: Fix indentation for example of Language/control/next.
13:21 dalek doc: review: https://github.com/perl6/doc/commit/f41e3a48e9
13:21 dalek doc: c1ba6f4 | (Zoffix Znet)++ | doc/Language/control.pod:
13:21 dalek doc: Merge pull request #203 from gfldex/master
13:21 dalek doc:
13:21 dalek doc: Fix last example and indentation for next example.
13:21 dalek doc: review: https://github.com/perl6/doc/commit/c1ba6f4650
13:26 yqt joined #perl6
13:34 pecastro joined #perl6
13:39 jnthn ab5tract_: We often implement hot-path-ish stuff in CORE in unidiomatic ways to squeeze performance out, for pragmatic reasons. While it'd be wonderful if we had the resources to have optimized the heck out of everything already and not have to do such things, in reality careful optimization of various built-ins can make a big difference to the performance of people's Perl 6 programs.
13:39 domidumont joined #perl6
13:41 dalek rakudo/nom: 60e149f | coke++ | docs/announce/2015.11.md:
13:41 dalek rakudo/nom: don't scare anyone
13:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/60e149f57e
13:41 dalek rakudo/nom: 1538532 | coke++ | docs/announce/2015.11.md:
13:41 dalek rakudo/nom: remove reference to old release scheduling
13:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/153853237c
13:42 jnthn Phew! :P
13:43 zakharyas joined #perl6
13:43 [Coke] email sent
13:44 dalek modules.perl6.org: 8ba9ad4 | (Zoffix Znet)++ | / (3 files):
13:44 dalek modules.perl6.org: List missing prereqs / Update deployment docs
13:44 dalek modules.perl6.org:
13:44 dalek modules.perl6.org: Closes #29
13:44 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/8ba9ad43ba
13:44 [Coke] Anyone have any feedback to moving the monthlies to the 3rd saturday of a month?
13:45 dalek modules.perl6.org: a97752d | (Zoffix Znet)++ | DEPLOYMENT.md:
13:45 dalek modules.perl6.org: Write code blocks in Markdown, not POD
13:45 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/a97752d013
13:46 jnthn [Coke]: I'm not sure whether moving it to a weekend makes it easier to get volunteers, harder to get volunteers, or means we get a different set of volunteers. :)
13:47 jnthn [Coke]: I'm certainly +1 to simplifying the rule, anyway.
13:47 jnthn [Coke]: I don't have any strong feelings on what it is.
13:48 ZoffixW joined #perl6
13:48 jnthn (So long as it's not like "the first time the moon is full" or something :))
13:48 pecastro joined #perl6
13:48 ZoffixW [Coke], there's a typo here: "insure" -> "ensure": https://github.com/rakudo/rakudo/commit/60e149f57e#diff-29e26af4352a456a31fe16f6f58731a9R61
13:49 ZoffixW .oO( technical debt insurance... ? )
13:49 jnthn .oO( Mustn't prevent werewolves cutting releases )
13:49 [Coke] jnthn: The release process takes hours to do. As someone who has done the last 2 releases, I'm more likely to find time to do this on the weekend than on a school night.
13:49 [Coke] ZoffixW: yes, well, that just went out in an email. too late, sorry. :|
13:50 jnthn [Coke]: OK, that's a useful data point.
13:50 * [Coke] thinks there's enough slop in ensure/insure that his honor will be ok here. :|
13:50 moritz what do you guys think about automating part of the release process?
13:51 jnthn Short of a bunch of people jumping up saying "I do releases but won't if it's on a weekend", I'm good with third Saturday.
13:51 jnthn moritz: +1
13:51 zakharyas joined #perl6
13:51 * moritz has been doing some continuous delivery for $work :-)
13:51 jnthn Good automation removes tedium and helps avoid mistakes.
13:51 [Coke] moritz: we need CI, we need a better branching strategy... yes to all that.
13:52 Ven did someone not look into CI 1/2months ago? I seem to remember something along those lines
13:52 dalek modules.perl6.org: 242aaeb | (Zoffix Znet)++ | README.md:
13:52 dalek modules.perl6.org: Fix code sample indents and Markdown errors
13:52 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/242aaebf2b
13:52 zengargoyle good * #perl6
13:52 ZoffixW \o
13:53 [Coke] jnthn: no issue with doing a moar release closer to that cycle?
13:53 [Coke] You could do it friday night, even.
13:54 Ven o/ zengargoyle
13:55 MadcapJake ZoffixW: do you think that sigilless variables should be highlighted? I feel like, as they aren't containers, maybe they should be left unhighlighted.  When you subsequently access them, you don't use the backslash so it won't highlight there.  I could highlight the backslash though.
13:55 ZoffixW MadcapJake, I don't think it's really that important, TBH
13:56 jnthn [Coke]: Yeah, doing it on Fridays works for me.
13:56 Ven ZoffixW: I'll test the space/arrow scrolling issue tomorrow when I get back home
13:56 ZoffixW cool
13:56 jnthn [Coke]: Either I'm working at home so it's no issue, or I'm on my wake back from teaching, in which case it's something to do on a train/airport/plane
13:56 Ven ZoffixW: at least I know it works here ;-)
13:56 g4 joined #perl6
13:57 ZoffixW :P
13:57 [Coke] do we need to start marking "Supported" releases?
13:58 [Coke] We're still releasing something every month, but I would expect that 2016.01 might not be expected to an automatic upgrade to 2015.12
13:58 [Coke] perhaps, "Recommended" instead of Supported?
13:59 nine [Coke]: why? Shouldn't it be the exact opposite? Since after christmas we have to care about backwards compatibility, upgrades should be much safer
13:59 grondilu m: say first * !%% 3, :last, ^20;
13:59 camelia rakudo-moar : OUTPUT«Unexpected adverb 'last' passed to first on List␤  in block <unit> at /tmp/wPys4pKHCC:1␤␤Actually thrown at:␤  in block <unit> at /tmp/wPys4pKHCC:1␤␤»
13:59 grondilu lizmat: ^not sure how to use :last
14:00 [Coke] nine: yes, we care, so we don't want people installing something where some idiot (like me) accidentally breaks backward compatibility
14:01 [Coke] this is less of a concern if we move to a more conservative branching setup
14:03 [Coke] our monthlies are more like p5 odd numbered releases, in my mind.
14:03 samb1 joined #perl6
14:03 AlexDaniel joined #perl6
14:04 nmp joined #perl6
14:06 grondilu m: say first * !%% 3, :end, ^20;
14:06 camelia rakudo-moar : OUTPUT«19␤»
14:07 grondilu m: say first * !%% 5, :end, ^20;
14:07 camelia rakudo-moar : OUTPUT«19␤»
14:07 jnthn [Coke]: Generally, I feel that if something is considered difficult (like making releases that don't break back-compat) then we want to do what we can to enable us to do it regularly and reliably, rather than make it a big deal.
14:07 arnsholt Argh. Can't push to github for some reason >.<
14:07 ZoffixW arnsholt, same
14:07 dalek modules.perl6.org: d440899 | (Zoffix Znet)++ | / (3 files):
14:07 dalek modules.perl6.org: Fix typos, formatting, and links
14:07 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/d44089908f
14:07 jnthn [Coke]: I'm somewhat considering a spectest re-org whereby all the spectests we consider "the 6.c spec" move into a 6.c/S0*-* structure
14:07 ZoffixW Oh. never mind :) It git push sat there for like a minute
14:08 grondilu m: say first * %% 5, :end, ^20;
14:08 camelia rakudo-moar : OUTPUT«15␤»
14:08 Ven grondilu: cute
14:08 arnsholt ZoffixW: Oh! So it might actually be a GitHub issue. I'll try to be more patient
14:08 jnthn [Coke]: And then we make the 'use v6.c' and treat those as things we shouldn't touch/change.
14:08 jnthn *them
14:08 arnsholt I just have terrible troubles with the WiFi here at work; assumed that was the cause
14:10 brrt joined #perl6
14:10 jnthn [Coke]: So "did we break back-compat for 6.c" is largely "did we break the spectests for 6.c". We'll of course find holes (in fact, I think a task for 6.d will be using coverage analysis to greatly improve the test suite).
14:10 brrt good * #moarvm
14:10 brrt what's 6.d?
14:11 brrt (i suppose 6.c is christmas... i'd expect 6.e for easter)
14:11 jnthn brrt: We'll have to pick a holiday/event :P
14:11 jnthn Devali? :)
14:11 moritz d: "definitively awesome"
14:12 arnsholt I'd vote for Christmas, Diwali, Eid =)
14:12 brrt what's diwali
14:12 jnthn Oh wow, you can even spell it right :)
14:12 arnsholt brrt: Hindu festival of light
14:13 brrt ah, ok, cool
14:13 arnsholt jnthn: My girlfriend studies Hinduism. I've learned a lot just by osmosis, TBH =)
14:13 jnthn :)
14:14 jnthn I'm mostly aware of it 'cus of regularly visiting Indian restaurants. ;)
14:15 arnsholt That'll do it too =D
14:15 ilmari diwali has just been, though
14:15 ilmari 11 November
14:15 arnsholt Although regarding spelling, there's a pile of different romanisations
14:16 jnthn ilmari: Good news: there'll be another one next year.
14:16 ilmari jnthn: true
14:16 jnthn ilmari: This is for *langauge* version, not implementation version. A year is probably about right. :)
14:16 arnsholt Divali is a common variant as well, I think
14:16 [Coke] jnthn: (make important things easy) it sounds convincing, ja.
14:16 arnsholt Also deepavali, from the Sanskrit name of the festival (Diwali being the Hindi name, IIRC)
14:17 grondilu I did try quickperm in the core and it seems pretty good, but it does not return the same order.  Does the order in t/roast/S32-list/permutations.t matter?
14:17 jnthn Yes, transliteratin is an imprecise art :)
14:17 arnsholt Not to mention a serious case of https://xkcd.com/927/
14:18 gar joined #perl6
14:19 jnthn arnsholt: And...transliteration schemes don't round-trip. :)
14:19 jnthn (In general, at least)
14:21 dalek rakudo/nom: 287d191 | coke++ | / (2 files):
14:21 dalek rakudo/nom: Change release schedule starting in 2016
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/287d1915ea
14:21 dalek rakudo/nom: 9e48f15 | coke++ | docs/release_guide.pod:
14:21 dalek rakudo/nom: Going forward, we're probably not using mongers
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e48f15dd6
14:21 dalek rakudo/nom: c1010d4 | coke++ | docs/release_guide.pod:
14:21 dalek rakudo/nom: name the Christmas release already
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c1010d41be
14:21 dalek rakudo/nom: 9115a85 | coke++ | docs/release_guide.pod:
14:21 dalek rakudo/nom: Put next year's planned dates out there
14:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9115a85b58
14:22 [Coke] Please feel free to discuss any of these release related changes I'm making.
14:22 [Coke] I threw out my commit that marked Christmas as "recommended" based on the comments here.
14:22 arnsholt jnthn: Scholarly transliteration schemes (transcription, really) generally do quite well. But transliterations that normal people use generally don't, yeah
14:23 arnsholt Of course, scholarly schemes tend to look vaguely like Vietnamese orthography =)
14:23 zengargoyle i has the wicked thought last nite... get a P6 <-> neovim thiing happening and make P6 highlight itself.
14:24 jnthn arnsholt: Turns out if you get an official translit of my surname into Ukrainian, and then they translit it back to English, it comes out as "Vorsinhton" :)
14:25 dalek rakudo/nom: fde57e9 | jnthn++ | src/core/native_array.pm:
14:25 dalek rakudo/nom: Give array a sink method.
14:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fde57e9131
14:25 dalek rakudo/nom: 4aaa663 | jnthn++ | src/core/ (3 files):
14:25 dalek rakudo/nom: Share some shaped array methods in a common role.
14:25 dalek rakudo/nom:
14:25 dalek rakudo/nom: This means they can be used by Array and array.
14:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4aaa663eb5
14:26 softmoth_ joined #perl6
14:28 arnsholt jnthn: Hee hee. I'd probably guess at Washington rather than Worthington for that =D
14:29 molaf joined #perl6
14:35 Actualeyes joined #perl6
14:38 skids joined #perl6
14:38 znpy joined #perl6
14:40 rindolf joined #perl6
14:43 dalek rakudo/nom: 22e51b7 | jnthn++ | src/core/native_array.pm:
14:43 dalek rakudo/nom: Fix native array's .flat method to give Seqs.
14:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/22e51b7cdb
14:44 dalek infrastructure-doc: 9b5586b | (Zoffix Znet)++ | hosts/www.p6c.org.pod:
14:44 dalek infrastructure-doc: Mention Zoffix has root acces
14:44 dalek infrastructure-doc: review: https://github.com/perl6/infrastructure-doc/commit/9b5586b00d
14:47 dalek rakudo/nom: 58d05f3 | jnthn++ | src/core/ (3 files):
14:47 dalek rakudo/nom: Move many more methods to shared shape role.
14:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58d05f3009
14:47 dalek rakudo/nom: 6d8ca4c | jnthn++ | src/core/Array.pm:
14:47 dalek rakudo/nom: Fix shaped array type name.
14:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d8ca4ceb9
14:47 dalek roast: ba47c16 | jnthn++ | S09-multidim/methods.t:
14:47 dalek roast: Test methods on shaped native arrays.
14:47 dalek roast: review: https://github.com/perl6/roast/commit/ba47c1619e
14:51 gar left #perl6
14:53 [Coke] коледа!
14:53 [Coke] I am half tempted, btw, to name the 2015.12 release коледа
14:54 [Coke] (which is both the likely original Belrussian spelling of my surname, and "Christmas" in several languages.
14:54 jnthn ooh :)
14:54 pdcawley joined #perl6
14:55 [Coke] I know, right? Plus it's unicode. :)
14:56 [Coke] ok, having said that out loud, now it's more like 85% tempted.
14:57 * [Coke] hurls https://en.wikipedia.org/wiki/Koliada as a reference.
15:00 tadzik Kolęda!
15:00 tadzik ooooh
15:00 tadzik how it fits together
15:05 Ven I just wrote as part of some doc "you need to use nullptr and not 0, because (converted) constant expression are forbidden to implicitly convert integers to null pointer constants". Please, Perl 6, never get so confused (or your users) about your own language :P.
15:05 sprocket joined #perl6
15:05 * Ven goes back to writing some perl6 script and (hopefully) manage to automate this code generation...
15:06 softmoth_ joined #perl6
15:10 xpen joined #perl6
15:11 Ven tadzik++ # File::Find
15:11 tadzik :)
15:12 arnsholt timotimo: I've pushed a couple more commits to iperl6kernel. At this point, I think you can mention it in the weekly on monday =D
15:13 arnsholt It supports the basics of capturing IO, returning reults and handling errors
15:14 arnsholt I'm gonna open some issue tickets too, to point the way for other people to continue hacking on it
15:18 Skarsnik damn modules.perl6.org stopped opening a new tab when you click on a module name x)
15:18 dalek rakudo/nom: 5777a46 | jnthn++ | src/core/Array.pm:
15:18 dalek rakudo/nom: Liberalize "is it shaped" checking.
15:18 dalek rakudo/nom:
15:18 dalek rakudo/nom: So the code works if the source isn't Array, but is shaped.
15:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5777a467cb
15:18 dalek rakudo/nom: 67f8715 | jnthn++ | src/core/ (3 files):
15:18 dalek rakudo/nom: Support assignment to native shaped arrays.
15:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67f87156f7
15:19 tadzik Skarsnik: yay!
15:19 dalek roast: a1f83cb | jnthn++ | S09-multidim/assign.t:
15:19 dalek roast: Tests for assignment to native shaped arrays.
15:19 dalek roast:
15:19 dalek roast: Along with tests for assignment from native shaped to non-native
15:19 dalek roast: shaped and vice versa.
15:19 dalek roast: review: https://github.com/perl6/roast/commit/a1f83cb053
15:19 tadzik I demand a liberty to choose whether my clicks open in a new tab or not
15:19 Skarsnik I don't like it!
15:20 tadzik why!
15:20 tadzik now you can open in a new tab or in the same tab :)
15:20 nwc10 joined #perl6
15:20 tadzik twice as many choices depending on your scenario
15:21 nwc10 left #perl6
15:21 jnthn OK, with around 300 passing tests for shaped arrays now (covering native and non-native) that should cover most of the ground, I'm going to close the RT about it. We'll likely find some bits and pieces, but they can get their own tickets as we run into them.
15:21 zengargoyle tadzik: amen brother!
15:22 stmuk https://github.com/rakudo/rakudo/pull/595 *bump*
15:23 arnsholt jnthn++ # Much shape, very array, wo!
15:23 arnsholt *w
15:24 domidumont joined #perl6
15:25 MadcapJake language-perl6fe launches! v1.0.0 adds set/bag/mix operators, concurrency functions, and more numbers (nums, rats, radix numbers) https://github.com/MadcapJake/language-perl6fe/releases
15:26 tadzik nice!
15:27 dalek perl6-bench: 2bd9f8a | timotimo++ | minibenchmarks.pl:
15:27 dalek perl6-bench: these benchmarks initialize with rand, so don't expect 0.
15:27 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/2bd9f8ac2e
15:31 kjs_ joined #perl6
15:32 dalek roast: 37a7757 | jnthn++ | S09-typed-arrays/native- (2 files):
15:32 dalek roast: Update tests for .flat behavior on native arrays.
15:32 dalek roast: review: https://github.com/perl6/roast/commit/37a775763b
15:33 jnthn Down to 38 xmas tickets
15:35 ZoffixW joined #perl6
15:35 loren joined #perl6
15:35 ZoffixW Skarsnik, what browser are you using?
15:36 Skarsnik Chrome
15:36 Skarsnik on win7
15:36 Ven jnthn++ :-). that's a great feature, and it's nice to see it landing
15:38 * flussence has noticed the "Stage parse:" line hovering around 80/89s recently, but no inbetween values. Weird.
15:39 jnthn Ven: Thanks. I'm glad to have got that in. )
15:39 Ven m: my constant $a = 3; my @a[$a];
15:39 camelia rakudo-moar : ( no output )
15:39 ZoffixW Skarsnik, the most obvious suggestion is to click with the middle click. It'll open in a new tab. But you can also install Tampermonkey (https://tampermonkey.net/) plugin and rewrite all <a> elements to have target="_blank".
15:40 Ven that's really neat :-).
15:40 jnthn Ven: oh, it's more dynamic than that even
15:40 ZoffixW Skarsnik, as to why it was removed: (a) it existed for just a week or two; (b) it's horrible practice and significantly impacts usability.
15:40 jnthn m: my $a = 2; my $b = 3; my @a[$a;$b]; say @a.shape
15:40 camelia rakudo-moar : OUTPUT«(2 3)␤»
15:40 Skarsnik ZoffixW, I mean for a whilte it opened a new tab and it was nice! it's just complaining to compain x)
15:40 Ven jnthn: oh, it's all dynamic then? no compile-time shenanigans? ok!
15:40 ZoffixW Skarsnik, heh. OK :)
15:41 jnthn Well, number of dimensions is static-er :)
15:41 jnthn There's an escape hatch for that too
15:41 Ven ||, right?
15:41 jnthn We push enough info VM-wards that we should be able to do nice code-gen later
15:41 jnthn Yeah, ||. I didn't implement that yet.
15:41 Ven that's what it seemed from looking at the commits :)
15:41 jnthn Not sure whether we need it for 6.c. TimToady may think so. :)
15:41 * ZoffixW is dissapointed this went nowhere: http://www.w3.org/TR/css3-hyperlinks/
15:42 Ven All the "big" S09 parts might not be needed for xmas
15:42 jnthn Most remaining S09 bits besides this were alerady on my "not for xams" list :)
15:43 Skarsnik does that look good so far? (It's a blog post about scrapping html with perl6) https://skarsnik-stuff.blogspot.com/b/post-preview?token=WWNGJ1EBAAA.5HEzvdu_Kkwkm-zO1kLL8gIDRr2czSHIzREUcZxYIPr-apXmVJga9nt1G2xtOn_gsdHqjwgyAdnpcPqNwfAGBg.z2wPc95psN-YigQFatelxQ&amp;postId=9013164190367417366&amp;type=POST
15:43 Skarsnik This crazy huge link x)
15:43 jnthn Scrapping? Or scaping? :D
15:43 jnthn *scraping
15:43 ZoffixW hehe
15:44 jnthn bah, the irony, I point out a spello and make one while doing it :)
15:44 zengargoyle is there a difference when dealing with the web. :P
15:44 ZoffixW Skarsnik, you also used "scrap" instead of "scrape" in the first sentence :)
15:44 flussence ZoffixW: normally I'm in the "all this fancy stuff doesn't belong in CSS" camp, but defining how links act totally makes sense in there
15:44 jnthn OK, time for a break, shopping, etc. bbl o/
15:45 Skarsnik screw you, it's not easy to write english xD
15:46 zengargoyle i was wondering a few days ago what POD would look like using Tufte.css styling.
15:46 Skarsnik but, yeah I will fix it
15:46 tokuhiro_ joined #perl6
15:46 flussence (I think CSS as a whole should be burned down and redesinged from scratch, mind you)
15:46 zengargoyle https://edwardtufte.github.io/tufte-css/
15:46 ZoffixW flussence, it ain't bad when you use CSS
15:47 ZoffixW err SASS
15:47 rorx joined #perl6
15:47 huf syntax is hardly the problem with css
15:47 brrt joined #perl6
15:48 flussence repetition ain't my main beef, it's more that if you squint hard enough, it resembles PHP :)
15:48 huf :)
15:48 zengargoyle along with a dist-zilla type tool to create github.io pages from POD automagically.
15:48 * ZoffixW doesn't see any other serious problems that'd warrant a rewrite
15:48 huf my problem is with the thing css lets you adjust. it's a completely insane machine full of one-purpose hacks, lacking general solutions.
15:48 gfldex while your zeal is hitting CSS hard, could you direct it towards font-size: \d+px too? Pixels don't work well with modern displays, you know.
15:49 huf :D
15:49 huf yeah, that's the sort of stuff...
15:49 huf so basically css is fine, browsers are terrible :)
15:49 Skarsnik I hate css, it's always trial and error to get something right xD
15:49 ZoffixW Skarsnik, I'd suggest removing this entire bit: http://i.imgur.com/2ORwavs.png It just sounds like incoherent rambling and makes a jab at Perl 5, which is a very sore point at the moment.
15:50 dalek perl6-bench: 1af2f3e | timotimo++ | minibenchmarks.pl:
15:50 dalek perl6-bench: fix the filename of pi-sequential-iteration ...
15:50 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/1af2f3efec
15:50 Skarsnik ZoffixW, make a jab at perl 5? I don't even mention it xD
15:51 Skarsnik oh I dumb, the first sentence ><
15:51 ZoffixW Skarsnik, second sentence :)
15:51 huf also, the word is "scrape" i think. or "scraping"
15:51 ZoffixW Yeah
15:52 huf "scrap" the verb means to throw it out, which is probably not what you want
15:52 Khisanth joined #perl6
15:53 ZoffixW Skarsnik, and my other comment would be to modify or even remove the "Perl 6 Issue" section. Judging by how much people over-read the FAQ section (http://doc.perl6.org/language/faq#Is_Perl_6_fast_enough_for_me%3F), I imagine there might be an issue of people misreading your comment as "ZOMFG! Perl 6 is horribly slow and it's a major issue". Next thing it goes viral and does a lot of damage. Does that section need to be there at all? You quote 5-20 se
15:53 ZoffixW conds for start up, but that sounds like your modules aren't precompiled. Also, machines are different: a test that takes 30 seconds on my $work box to run, completes in just 3 seconds on my home box.
15:54 n0tjack joined #perl6
15:54 Skarsnik Well it was/is really annoying when I was messing around with this stuff
15:55 ZoffixW Skarsnik, and this reference too: "...and being perl6 native is very slow.. takes 30 secs to parse the web page"
15:55 ZoffixW Skarsnik, sure, I can understand that, but your writing in its current form suggests Perl 6 has a major problem with being slow.
15:55 zengargoyle heh, i take scrap as fight
15:55 Skarsnik I switched to write perl5 script the time to figure stuff x)
15:55 ZoffixW Skarsnik, Perl 5 had decades to optimize itself. Perl 6 hasn't had a chance. It's an entirely unfair comparison.
15:56 arnsholt People more on top of Rakudo and MoarVM development: Do we have a Github issue or RT ticket for the threads hang issue?
15:56 Skarsnik I don't want to troll. It's just well, a reality and it's annoying
15:56 ZoffixW Skarsnik, someone not overly involved in the language could look at your "30 secs to parse a page" roll their eyes, laugh, and never look at P6 again.
15:56 ZoffixW Skarsnik, what's the sample code you used to get those numbers?
15:57 timotimo Skarsnik: it'd be nice if you could use zef in the mean time if you're going to do performance measurements. because zef still precompiles stuff
15:57 ZoffixW Skarsnik, (and if it's the one on the page.. I can't copy/paste it)
15:58 Skarsnik Oh yeah, this preview stuff is dumb
15:59 timotimo for rakudo star we could ship a panda with the ability to precompile monkey-patched back in :P
16:01 n0tjack joined #perl6
16:02 Skarsnik root@testperl6:~/piko# perl6 -e 'use HTML::Parser::XML; my $html = slurp(@*ARGS[0]); my $time = now; my $xml = HTML::Parser::XML.new().parse($html); say now - $time;' /home/skarsnik/Téléchargements/favourites.htm
16:02 Skarsnik 37.0458354
16:02 Skarsnik root@testperl6:~/piko#
16:02 ZoffixW Where do I get this "zef" from?
16:04 ZoffixW Skarsnik, what do you get with?     perl6 -e 'use HTML::Parser::XML;'
16:04 ZoffixW Skarsnik,     time perl6 -e 'use HTML::Parser::XML;
16:04 ZoffixW '
16:04 Skarsnik I downloaded the page x)
16:04 timotimo http://t.h8.lv/p6bench/2015-11-19-release_10_11.html - this looks nice - still the same results as last night, but one additional benchmark now has output for one of the two.
16:04 Skarsnik I just wanted to point out the time to parse the webpage, not the compile time ^^
16:05 polettix joined #perl6
16:05 timotimo ZoffixW: rakudobrew build-zef
16:05 ZoffixW Thanks.
16:05 flussence timotimo: are the first two graphs measuring startup time?
16:06 timotimo yeah
16:06 flussence oh, makes sense. looks like it's getting better too :D
16:06 timotimo i don't know how, but yeah :)
16:07 polettix std: my ($x,) = 1 Z 1; say $x.WHAT;
16:07 camelia std : OUTPUT«No such file or directory»
16:07 flussence I'm about 90% sure that's from all the paper cuts lizmat++ has been fixing
16:07 polettix p6: my ($x,) = 1 Z 1; say $x.WHAT;
16:07 camelia rakudo-moar: OUTPUT«(List)␤»
16:07 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤#perl6 <polettix> Perl6: my ($x,) = 1 Z 1; say $x.WHAT;␤cat: ~/rakudo-m-inst/revision: No such file or directory␤»
16:07 pecastro joined #perl6
16:08 polettix p6: my ($x,) = 1 Z 1; say "{$x.WHAT}";
16:08 camelia rakudo-moar: OUTPUT«Use of uninitialized value of type List in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/tmpfile:1␤␤»
16:08 timotimo i don't think anything liz has done would have improved bare startup time?
16:08 Skarsnik ZoffixW, hm  real    0m42.170s   user    0m31.564s (the time the script show remain the same) the web page is https://www.fimfiction.net/bookshelf/751448/favourites?order=date_added
16:08 flussence thinking about it... maybe not
16:08 flussence everything's precompiled there so making bits of the compiler faster wouldn't do much.
16:09 polettix is there anything implicitly wrong in calling $x.WHAT in the block {} inside quotes?
16:09 timotimo polettix: that'll get you the type object, which will give you that warning when you try to stringify it
16:09 timotimo polettix: but it also tells you ".^name, .perl, .gist or .say" would work
16:09 polettix timotimo: then I can’t get the difference wrt say $x.WHAT
16:10 flussence polettix: .^name seems like what you really wanted there
16:10 timotimo polettix: say $x.WHAT directly calls .gist on $x.WHAT. when you put it into a string, that uses the ~ operator to interpolate the value into the string
16:10 dalek rakudo/nom: 09acf19 | coke++ | docs/release_guide.pod:
16:10 dalek rakudo/nom: float an alternate tag/name for Christmas.
16:10 dalek rakudo/nom:
16:10 dalek rakudo/nom: See https://en.wikipedia.org/wiki/Koliada
16:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/09acf19f97
16:11 [Coke] The doc answer to "are we slow" should be that rakudo's architecture offers many chances for optimization, and we are pursuing them.
16:12 polettix timotimo: so there’s something “more” to putting stuff in the args list of say as opposed to using interpolated blocks
16:12 polettix thanks
16:12 timotimo polettix: no, not really
16:12 timotimo polettix: the difference is really just "say $x.WHAT.gist" vs 'say "hello! " ~ $x.WHAT ~ " is my friend!"'
16:12 timotimo well, in the second example it should read $x.WHAT.Str for clarity
16:13 timotimo and the difference between .Str (which is what ~ does for you) and .gist (which is what say does for you) is what you experience
16:13 modcure joined #perl6
16:13 timotimo to be really precise, the second one should read:
16:13 polettix timotimo: ok, so not “more”, but “different” (.gist instead of .Str)
16:13 timotimo say ("hello! " ~ $x.WHAT ~ " is my friend!").gist'
16:13 timotimo yeah
16:14 polettix thanks
16:14 ZoffixW timotimo, hm. How do I make zef install stuff? zef install HTML::Parser::XML says it got installed but trying perl6 -MHTML::Parser::XML -e1 tells me it can't find it
16:14 timotimo at the time say gets to call .gist on its argument, the $x.WHAT has already had .Str called on it by the ~ operator
16:14 polettix and I have to apologize with you all, I entered here without even saying “hello”, which was very rude of me :)
16:14 timotimo haha, don't worry :)
16:14 timotimo that's better than coming in, saying hello, waiting for a minute, and leaving again :D
16:14 polettix (but my “discover” was eating too much brain cycles)
16:17 jnthn .tell nine Would be good to check/test how the updated repo stuff handles https://rt.perl.org/Ticket/Display.html?id=126688 - hopefully it catches the error and reports it...but good to check :)
16:17 yoleaux jnthn: I'll pass your message to nine.
16:17 [Coke] (slow) and also pointers on how to investigate speed issues (e.g. --profile)
16:19 lab_ joined #perl6
16:20 Skarsnik ZoffixW, ok, should be less trolly https://skarsnik-stuff.blogspot.com/b/post-preview?token=01ZpJ1EBAAA.5HEzvdu_Kkwkm-zO1kLL8gIDRr2czSHIzREUcZxYIPr-apXmVJga9nt1G2xtOn_gsdHqjwgyAdnpcPqNwfAGBg.4ZWVooKajmAVCY5ZfDYayQ&amp;postId=9013164190367417366&amp;type=POST x)
16:21 skids jnthn++ yay!! NSAs!!  And not the creepy listen-to-your-phone-calls kind!!
16:21 ZoffixW Skarsnik, looks good :)
16:22 Skarsnik It's not finished. I wanted to know if that enought/clear explanation
16:22 n0tjack joined #perl6
16:22 hoelzro o/ #perl6
16:22 ZoffixW \o
16:23 * ZoffixW is tempted to spin up this baby to test out Perl 6: "Linode 98304 1920GB DISK 20 CPU Cores 20TB XFER $960/mo"
16:24 Skarsnik lol
16:24 ZoffixW :)
16:24 Skarsnik I am curious, how much time it take to parse the page on your box?
16:25 ZoffixW I was trying to install get zef to install HTML::Parser::XML... gave up... now installing it with panda.
16:25 timotimo hey hoelzro
16:25 timotimo we only have a docker image for rakudo star, right? not for regular compiler releases?
16:25 ZoffixW But I'm on a crappy work box ATM (hence my thought to spin up an uber linode box for half an hour or so :P
16:26 Skarsnik On my vm it's like 35 sec vs 0.05 sec on a C parse x)
16:27 timotimo oof
16:27 timotimo well, comparing us to C on a complex task, that's got to doom us. we're not pypy :(
16:27 El_Che what the deal with zef and panda? just competing projects? and other take?
16:28 timotimo yeah, that's pretty much it
16:28 ZoffixW Ooohh :( "Initial orders are pro-rated from today to the end of the month. Total: $1,325.59"
16:28 ZoffixW No thanks :P
16:28 hoelzro o/ timotimo
16:28 hoelzro timotimo: correct
16:29 hoelzro (re: docker)
16:29 ZoffixW Skarsnik, my results are much more terrible than yours :)
16:29 loren joined #perl6
16:29 ZoffixW Skarsnik, http://fpaste.scsys.co.uk/501712
16:29 kjs_ joined #perl6
16:29 flussence ZoffixW: holy crap, that's expensive. OVH does 8 cores for 5% the price.
16:29 ZoffixW 97 seconds >_< Versus 0.472s using Perl 5's Mojo::DOM parse
16:29 Skarsnik ZoffixW, lol
16:30 timotimo ZoffixW: damn.
16:30 ZoffixW flussence, but 20 cores / 98GB RAM are a lot more than 8 cores :P
16:30 flussence oh, that's a lotta RAM
16:30 TimToady someday you'll have that in your wristwatch...
16:31 timotimo damn. now i notice i forgot to change the commandline to use 2015.11 instead of the 7e3d0b8 commit :|
16:31 stmuk [Coke]: the FAQ answer for speed already says that
16:31 Skarsnik ZoffixW, not bad for Mojo lol. with gumbo http://pastebin.com/zsd007dy (gumbo_parse call is the C call)
16:32 lab_ joined #perl6
16:33 timotimo http://t.h8.lv/p6bench/2015-11-19-release_09_10_11.html  - that doesn't look so happy after all
16:34 ZoffixW looks fine to me.
16:35 timotimo ZoffixW: well, yesterday i just looked at .10 vs .11 and there were many performance improvements to be seen
16:35 timotimo ZoffixW: now it's mostly the fact that .10 was much slower than .09 that shows
16:35 ZoffixW Ah :(
16:35 timotimo .11 still wins on a bunch of benchmarks
16:38 raiph joined #perl6
16:38 flussence (ahh, looking at the price of ovh's own 20 core offerings, $960/mo doesn't sound so insane...)
16:39 Skarsnik ZoffixW, I am curious, can you display the number of elements the tree generated by Mojo::Dom contain? I know www-mechanize-tree-builder fail to get the right DOM for this page
16:39 dbrock- joined #perl6
16:39 dalek doc: 4f458ad | (Zoffix Znet)++ | doc/Language/faq.pod:
16:39 dalek doc: Toss runtimes from bench codes
16:39 dalek doc:
16:39 dalek doc: Leave a little mystery; we won't be updating these numbers with each improvement in Rakudo (Closes #205)
16:39 dalek doc: review: https://github.com/perl6/doc/commit/4f458ad209
16:39 n0tjack joined #perl6
16:40 ZoffixW flussence, exact same price as Linode. The $1,325.59 price is until end of December methinks
16:40 ZoffixW But they advertise it as $960/mo
16:41 ZoffixW m: say 960/1325.59
16:41 camelia rakudo-moar : OUTPUT«0.7242058␤»
16:41 loren joined #perl6
16:41 raiph m: my \foo = $; foo = 1; say foo; foo = 2; say foo # MadcapJake: "do you think that sigilless variables should be highlighted? I feel like, as they aren't containers"
16:41 camelia rakudo-moar : OUTPUT«1␤2␤»
16:42 lab_ joined #perl6
16:42 stmuk ZoffixW: the "Is Perl 6 fast enough for me?" FAQ is probably a bit of a minefield but I don't think the current wording is that bad
16:42 Skarsnik The issue with sigilles variable is knowing they are a variable and not a route call x)
16:42 Skarsnik *routine
16:42 jnthn They're not really variables.
16:43 jnthn Since you can't vary them :)
16:43 ZoffixW :D
16:43 MadcapJake raiph: What do you mean?
16:44 MadcapJake oh, but i thought you coulnd't actually assign to them.
16:44 ZoffixW stmuk, yeah; I read it in full now and I think it's fine. And good point about removing the runtime numbers
16:45 MadcapJake raiph: but you are assigning foo to a container, so that's a special case, right?
16:45 timotimo perl6-bench still gives 2015.09 100 points, 2015.10 76.6 points and 2015.11 155.4 points
16:45 lab_ joined #perl6
16:46 raiph MadcapJake: I wouldn't call it a special case
16:46 MadcapJake why would you do that though and not do `$foo = 1`?
16:47 tokuhiro_ joined #perl6
16:47 hankache joined #perl6
16:50 raiph MadcapJake: afaik the two main uses are 1) for when you want a noun to be SSA or 2) when you want to skip the sigil 'cuz reasons
16:50 raiph (SSA = single static assignment)
16:53 raiph m: my \foo =@= 1,2,3; say foo.WHAT # MadcapJake: perhaps a notable use case will be tweetable one liners
16:53 camelia rakudo-moar : OUTPUT«(Array)␤»
16:53 psch huh, where did =@= come from? o.o
16:54 gfldex m: my $b = 1; my \a = Proxy.new(FETCH => { $b * 2}, STORE => -> $, $new { $b = $new + 1 } ); say a; a = 4; say a; a.VAR.^name.say;
16:54 camelia rakudo-moar : OUTPUT«2␤10␤Proxy␤»
16:54 gfldex m: my $b = 1; my $a := Proxy.new(FETCH => { $b * 2}, STORE => -> $, $new { $b = $new + 1 } ); say $a; $a = 4; say $a; $a.VAR.^name.say;
16:54 camelia rakudo-moar : OUTPUT«2␤10␤Proxy␤»
16:54 raiph MadcapJake++ # perl6fe
16:55 lab_ joined #perl6
16:55 oceanpollen joined #perl6
16:55 raiph psch: = container =
16:58 lab joined #perl6
17:02 psch raiph: neat, thanks
17:05 zengargoyle not sure whic will come first, more RAM than you could ever want locally, or network so fast it doesn't matter.
17:05 loren joined #perl6
17:06 MadcapJake raiph: Thanks! I still feel that it makes sense to just leave them unhighlighted.  There's no way for Atom's grammars to detect that `foo` is a sigilless variable and not a routine so the only time it would be highlighted is on assignment.
17:07 khw joined #perl6
17:08 MadcapJake and in a way, leaving it unhighlighted feels mnemonically relavant seeing as the sigiled variables are all highlighted.
17:09 dalek doc: 32ab73c | (Zoffix Znet)++ | doc/Language/control.pod:
17:09 dalek doc: Use more common language
17:09 dalek doc:
17:09 dalek doc: Maybe I live under a rock, but after 15 years of living in English speaking countries, I never heard of "tamale". Its appearance in a technical doc was an unwelcome distraction to a dictionary :)
17:09 dalek doc: review: https://github.com/perl6/doc/commit/32ab73c098
17:09 dalek doc: ce45cde | (Zoffix Znet)++ | doc/Language/control.pod:
17:09 dalek doc: Grammar fix
17:09 dalek doc: review: https://github.com/perl6/doc/commit/ce45cde34e
17:10 zengargoyle at 100Gb/s it's a challenge to build boxes fast enough to keep up and the network becomes akin to higher-latency memory.
17:10 pink_mist 0_o I've heard 'hot tamale' used often in english
17:11 stmuk I've never heard it and I'm English
17:11 oceanpollen you don't live in a rock, but you don't live in Texas, that's for sure.
17:11 lab_ joined #perl6
17:11 TimToady or California
17:11 stmuk is it Mexician food?
17:11 MadcapJake pink_mist: yeah but it was only used as a regular `tamale` uncooked :p
17:11 flussence zengargoyle: looks like HP's decided to just make both things the same. "The Machine" looks like a really interesting project.
17:11 MadcapJake stmuk: yeah it's a fried burrito I believe
17:12 oceanpollen stmuk - it's "guy at the parking lot of walmart sells five of them for a dollar" Mexican food.
17:12 MadcapJake stmuk: correction, fried corn husk burrito :P
17:12 stmuk I shall seek one out on my next visit to the West Coast :)
17:12 zengargoyle yeah, i'm sorta paraphrasing stuff i hear floating around at conferences.
17:13 MadcapJake I'm more of a chimichanga kind of guy xD
17:13 * zengargoyle had a 40Gb/s test going this week for supercomputing.
17:15 hpd left #perl6
17:16 kmel joined #perl6
17:17 * flussence gets over-excited when my wifi sustains >100Mb/s...
17:19 ZoffixW joined #perl6
17:20 ZoffixW In the last paragraph of else/elsif section (http://docs.perl6.org/language/control#else%2Felsif) it says "Each block must individually say whether it wants to know what the conditional expression evaluated to." How would I get the value inside an elsif {} tho?
17:20 ZoffixW m: if False { } elsif True -> $a { say $a } # expecting a "False"
17:20 camelia rakudo-moar : OUTPUT«True␤»
17:21 MadcapJake m: if False { } elsif True { say $_ } # expecting a "False"
17:21 camelia rakudo-moar : OUTPUT«(Any)␤»
17:21 MadcapJake m: if False { } elsif Bool(True) { say $_ } # expecting a "False"
17:21 camelia rakudo-moar : OUTPUT«(Any)␤»
17:21 zengargoyle m: if False { } elsif True { say $^a }
17:21 camelia rakudo-moar : OUTPUT«True␤»
17:22 psch "[...] whether it wants to know what its conditional expression evaluated to." makes it a bit clearer i guess?
17:22 zengargoyle think you have to 'declare' a var to get the value passed
17:22 zengargoyle block of arity-1
17:22 abaugher joined #perl6
17:22 ZoffixW psch, I am right now. But I also want to clarify the code example and I see it doesn't include the variant for elsif {}
17:23 ZoffixW psch, or does this not work in elsif:
17:23 ZoffixW m: if False { } else -> $a { say $a }
17:23 camelia rakudo-moar : OUTPUT«False␤»
17:23 xfix joined #perl6
17:23 psch ZoffixW: well, the elsif has its own condition to evaluate
17:23 zengargoyle yeah, elsif will always get a True or it wouldn't be there
17:23 psch ZoffixW: else deviates from the if behavior, elsif doesn't
17:24 psch (because elsif could be else { if ... { } })
17:24 zengargoyle psch: i believe that's the way it actually is.
17:24 zengargoyle down in QAST land
17:25 ZoffixW zengargoyle, why would it always get a True? It can get whatever the previous if/elsif used
17:25 ZoffixW m: if 0 { } else -> $a { say $a }
17:25 camelia rakudo-moar : OUTPUT«0␤»
17:25 psch m: state $foo; if $foo++ { } elsif $foo++ -> $bar { say $bar } else { say "vOv" }
17:25 camelia rakudo-moar : OUTPUT«1␤»
17:25 ZoffixW m: if Nil { } else -> $a { say $a }
17:25 camelia rakudo-moar : OUTPUT«Nil␤»
17:25 timotimo ZoffixW: why would you expect False for an "elsif True -> $a"?
17:25 zengargoyle but the body won't be run unless the value was True
17:25 psch m: state $foo; if $foo++ { } elsif $foo++ > 2 -> $bar { say $bar } else { say "vOv" }
17:25 camelia rakudo-moar : OUTPUT«vOv␤»
17:25 psch zengargoyle: might well be, yeah
17:26 psch m: state $foo; if $foo++ { } elsif $foo++ > 2 -> $bar { say $bar } else -> $else { say $else } # bit more info
17:26 camelia rakudo-moar : OUTPUT«False␤»
17:26 ZoffixW timotimo, that was merely my attempt to transpose else -> $a { say $a } to an elsif
17:26 zengargoyle ... elsif foo() -> $b { never here if $b ~~ False }
17:27 psch m: state $foo; if $foo++ { } elsif $foo++ does role { method Bool { False } }  -> $bar { say $bar } else -> $else { say $else }
17:27 camelia rakudo-moar : OUTPUT«1␤»
17:27 psch m: state $foo; if $foo++ { } elsif $foo++ does role { method Bool { False } }  -> $bar { say $bar } else -> $else { say so $else }
17:27 camelia rakudo-moar : OUTPUT«False␤»
17:28 ZoffixW I wonder if that bit even needs to be in the docs.
17:28 psch ZoffixW: well, i didn't know about it, fwiw :)
17:28 ZoffixW psch, but it seems more of an artifact than something you'd actually use.
17:29 psch i don't know...
17:29 ZoffixW Since you'd only ever get falsey stuff
17:29 ZoffixW Can Objects be false in P6?
17:29 psch yes
17:29 zengargoyle bingo
17:29 ZoffixW k, then I'll reword it
17:29 psch note the last two examples :)
17:29 ZoffixW oh lol :P
17:29 psch we get a 1 but False
17:30 psch also, False *is* an Object in the first place :P
17:31 dalek doc: d5e1442 | (Zoffix Znet)++ | doc/Language/control.pod:
17:31 dalek doc: Reword for clarity
17:31 dalek doc: review: https://github.com/perl6/doc/commit/d5e14421b0
17:31 ZoffixW Oh, hah. Right! :)
17:31 Upasaka joined #perl6
17:32 dalek doc: a44ce9b | (Zoffix Znet)++ | doc/Language/control.pod:
17:32 dalek doc: Grammar fix
17:32 dalek doc: review: https://github.com/perl6/doc/commit/a44ce9b869
17:32 pecastro joined #perl6
17:32 Peter_R joined #perl6
17:36 diana_olhovik_ joined #perl6
17:36 psch r: say $*PERL.compiler
17:36 camelia rakudo-moar: OUTPUT«rakudo (2015.11.23.g.9.acf.19)␤»
17:36 camelia ..rakudo-jvm 09acf1: OUTPUT«rakudo (2015.10.134.g.273.e.895)␤»
17:51 psch m: say "a b".split(/\s/, :v)
17:51 camelia rakudo-moar : OUTPUT«(a 「 」 b)␤»
17:51 psch m: class A { has int $.x }; my A $a .= new; say nqp::getattr(nqp::decont($a), A, '$!x') # a bit of that underneath
17:51 camelia rakudo-moar : OUTPUT«This representation (P6int) cannot unbox to other types␤  in block <unit> at /tmp/FgIDkYvrfy:1␤␤»
17:52 psch i don't get why getattr for an int attr works in Str.split
17:52 psch i mean, it really shouldn't, right?
17:52 psch for reference, src/core/Str.pm:794
17:53 Skarsnik blogger is not the best for code formatting, but well http://skarsnik-stuff.blogspot.fr/2015/11/scrapping-web-with-perl6-so-you-want-to.html
17:56 psch m: class A { has int $.x }; my A $a .= new; my int $x = nqp::getattr(nqp::decont($a), A, '$!x'); say $x # hrm...
17:56 camelia rakudo-moar : OUTPUT«0␤»
17:57 jandeman joined #perl6
17:57 psch well, i guess that means i'll have to hack getattr to check the contspec, or moar has to complain as well...
17:57 jandeman left #perl6
18:01 n0tjack joined #perl6
18:02 rgrau joined #perl6
18:02 telex joined #perl6
18:06 Upasaka joined #perl6
18:14 n0tjack joined #perl6
18:15 raiph joined #perl6
18:24 kjs_ joined #perl6
18:26 [Coke] btw, anyone who has chrome, I recommend setting up an "rt" search helper. I can do "new tab, rt<tab>123456" and go right to the ticket.
18:28 Upasaka joined #perl6
18:29 nine Actually that's a good idea in any browser
18:29 yoleaux 16:17Z <jnthn> nine: Would be good to check/test how the updated repo stuff handles https://rt.perl.org/Ticket/Display.html?id=126688 - hopefully it catches the error and reports it...but good to check :)
18:33 n0tjack joined #perl6
18:33 domidumont joined #perl6
18:36 AlexDaniel m: sub foo { FIRST { say 'hi' } }; foo; foo;
18:36 camelia rakudo-moar : ( no output )
18:36 AlexDaniel what's the right way to do it?
18:37 AlexDaniel I mean, call something during the first execution of the sub
18:37 ugexe once { } ?
18:38 psch FIRST only works in iterations
18:38 psch i'd suggest unles $++ { }
18:38 psch +s
18:38 pink_mist m: sub foo { $ = say 'hi'; }; foo; foo; # why doesn't this work?
18:38 camelia rakudo-moar : OUTPUT«hi␤hi␤»
18:38 Upasaka joined #perl6
18:39 psch pink_mist: what doesn't work?
18:39 pink_mist I thought $ was a state variable so it should only get assigned to the first time foo is run
18:39 pink_mist so the second time foo is run, 'say hi' shouldn't be executed
18:39 psch state variables aren't about assigning only once, state variables are about keeping values across reexecution of the same block
18:40 AlexDaniel ugexe: nice!
18:40 AlexDaniel m: for 1..5 { once { say 'ok' } }
18:40 camelia rakudo-moar : OUTPUT«ok␤»
18:40 AlexDaniel m: for 1..5 { FIRST { say 'ok' } }
18:40 camelia rakudo-moar : OUTPUT«ok␤»
18:40 psch m: sub f { once { say "hi" } }; foo; foo
18:40 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/RrE6DVgZXO␤Undeclared routine:␤    foo used at line 1␤␤»
18:40 AlexDaniel what's the difference here?
18:40 psch m: sub f { once { say "hi" } }; f; f
18:40 camelia rakudo-moar : OUTPUT«hi␤»
18:40 psch ^^^ that's the difference
18:41 AlexDaniel psch: one works in subs and another one doesn't?
18:41 psch AlexDaniel: exactly, FIRST fires at loop initialization time
18:41 psch AlexDaniel: once { ... } is apparently a concise "... unless $++"
18:41 AlexDaniel psch: yeah, great. Why not just have “once” then? :)
18:42 ugexe if you go back into a subroutine with a loop using FIRST, you would expect it to fire again
18:42 psch m: sub f($max) { for ^$max { once { say "once" }; FIRST { say "FIRST" } }; f 1; f 1
18:42 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/RjIPxqCufB␤Missing block (taken by some undeclared routine?)␤at /tmp/RjIPxqCufB:1␤------> 3ce" }; FIRST { say "FIRST" } }; f 1; f 17⏏5<EOL>␤    expecting any of:␤        postfix␤        statement en…»
18:42 psch m: sub f($max) { for ^$max { once { say "once" }; FIRST { say "FIRST" } } }; f 1; f 1
18:42 camelia rakudo-moar : OUTPUT«FIRST␤once␤FIRST␤once␤»
18:42 psch hrm
18:43 psch with that i'd expect the once only, well...
18:43 psch AlexDaniel: that's what i think the difference should be, at least
18:44 mspo is there a reason for moar to not be static compiled by default?
18:45 psch AlexDaniel: oh, but another difference can be seen in the order of the output
18:45 AlexDaniel ugexe: right, it kinda makes sense
18:45 psch AlexDaniel: as in, the FIRST came before once in both cases
18:45 n0tjack joined #perl6
18:45 AlexDaniel m: sub f($max) { for ^$max { FIRST { say "FIRST" }; once { say "once" }; } }; f 1; f 1
18:45 camelia rakudo-moar : OUTPUT«FIRST␤once␤FIRST␤once␤»
18:46 AlexDaniel yeah right
18:46 ugexe curious why `once` shows up twice as well...
18:46 b2gills m: val ''
18:46 camelia rakudo-moar : OUTPUT«Cannot invoke this object␤  in block <unit> at /tmp/6NhUhlFytT:1␤␤»
18:47 cygx joined #perl6
18:47 AlexDaniel interestingly you can have multiple “once” and “FIRST”
18:47 cygx mspo: someone might want to embed it
18:48 cygx also, I suspect we want to generate proper executables for perl6 and nqp eventually instead of shellscripts
18:48 AlexDaniel ugexe: well, if you think that it is a bug then I can report it
18:48 tokuhiro_ joined #perl6
18:49 cygx jnthn: https://github.com/rakudo-p5/v5/blob/master/src/Perl5/Terms.pm breaks pre-compilation
18:49 MadcapJake m: sub f($max) { for ^$max { FIRST { say "FIRST" }; once { say "once" }; } }; f 2; f 2;
18:49 camelia rakudo-moar : OUTPUT«FIRST␤once␤FIRST␤once␤»
18:49 nine .tell jnthn RT 126688 is actually a bit of a challenge since the process doing the precompilation doesn't know which modules the other process already loaded. I'll have to communicate that between processes.
18:49 yoleaux nine: I'll pass your message to jnthn.
18:49 cygx you can pre-compile that file just fine, but anything that uses it then fails to precompile with Serialization Error: missing static code ref for closure 'MAIN'
18:51 cygx .tell jnthn
18:51 yoleaux cygx: I don't know what you want me to say to jnthn.
18:51 hankache joined #perl6
18:51 cygx .tell jnthn https://github.com/rakudo-p5/v5/blob/master/src/Perl5/Terms.pm makes pre-compiltion of modules that use it die with Serialization Error: missing static code ref for closure 'MAIN'
18:51 yoleaux cygx: I'll pass your message to jnthn.
18:52 AlexDaniel ugexe: as I understand it, “once” should do exactly what it says. From S04 “run only once, suppressing additional evaluations”
18:52 ugexe yea im looking around to see if i misunderstand something, because that seems wrong
18:52 psch m: my $var; sub f($x) { once { $var += $x } }; f(2); f(3); say $var
18:52 camelia rakudo-moar : OUTPUT«2␤»
18:53 psch m: my $var; sub f($x) { once { $var += $x; say "adding $x to $var"; } }; f(2); f(3); say $var
18:53 camelia rakudo-moar : OUTPUT«adding 2 to 2␤2␤»
18:53 AlexDaniel ugexe: otherwise it is «run “once” except for a couple of edge cases when it will evaluate more than once»
18:53 psch m: my $var; sub f($x) { once { say "adding $x to $var"; } }; f(2); f(3); say $var
18:53 camelia rakudo-moar : OUTPUT«Use of uninitialized value $var of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at /tmp/bVVnLgceZc:1␤adding 2 to ␤(Any)␤»
18:53 psch m: my $var = 0; sub f($x) { once { say "adding $x to $var"; } }; f(2); f(3); say $var
18:53 camelia rakudo-moar : OUTPUT«adding 2 to 0␤0␤»
18:53 ugexe m: my $x; sub f($max) { for ^$max { once { $x++; }; } }; f 2; f 2; say $x;
18:53 camelia rakudo-moar : OUTPUT«2␤»
18:53 psch m: my $var = 0; sub f($x) { once { say "adding $x to $var"; }; FIRST { say "so?" } }; f(2); f(3); say $var
18:53 camelia rakudo-moar : OUTPUT«adding 2 to 0␤0␤»
18:53 cygx bye again o/
18:54 psch hmm, loop opts breaking it maybe?
18:57 psch m: sub f { { once { say "hi" } } }; f; f;
18:57 camelia rakudo-moar : OUTPUT«hi␤hi␤»
18:57 psch it only binds one scope outwards
18:57 psch m: for ^10 { if $_ % 2 { FIRST { say $_ } } else { FIRST { say $_ } } }; # same here though
18:57 camelia rakudo-moar : ( no output )
18:58 psch m: L: for ^10 { if $_ % 2 { FIRST L { say $_ } } else { FIRST L { say $_ } } }; # ...i wonder
18:58 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/pUcbJY7an9␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/pUcbJY7an9:1␤------> 3L: for ^10 { if $_ % 2 { FIRST L7⏏5 { say $_ } } else { FIRST L { say $_ …»
18:58 psch aww :P
18:59 Upasaka joined #perl6
18:59 hankache hello perl 6
18:59 psch in any case, yes, that seems not once-y enough
19:00 AlexDaniel psch: okay. I'll submit a bug report then
19:00 pmurias joined #perl6
19:01 MadcapJake m: sub g($val) { if $val > 10 { once { return $val } }; return 0; }; g 100; g 5; g 50;
19:01 camelia rakudo-moar : ( no output )
19:01 MadcapJake m: sub g($val) { if $val > 10 { once { return $val } }; return 0; }; say g(100); say g(5); say g(50);
19:01 camelia rakudo-moar : OUTPUT«100␤0␤50␤»
19:02 pmurias the FAQ answer for the "Is Perl 6 fast enough for me?" with the Moose "benchmark" seems a bit lame
19:02 yoleaux 04:14Z <[Coke]> pmurias: please feel free to try to add those patches again now that the release is done; sorry I had to back them out, hopefully we can get the issue fixed easily. Thanks.
19:02 pmurias [Coke]: you reverted the tty jvm patch or something more?
19:03 hankache MadcapJake thanks for Perl 6 FE
19:04 Upasaka_ joined #perl6
19:04 [Coke] pmurias: the jvm patch in nqp broke the nqp build. that in turn broke the rakudo build. I backed both of them out so we could get the release out.
19:04 [Coke] so you can probably revert my reversion on both of them, adding in whatever was missing.
19:04 MadcapJake hankache: no problem! hope you like it!
19:05 hankache MadcapJake i definitely like it. Great job. Looking forward to more features
19:06 ugexe if that once {} stuff is a bug, i wonder if fixing it will speed this Str.Match? https://github.com/rakudo/rakudo/blob/nom/src/core/Str.pm#L423
19:07 rurban joined #perl6
19:07 MadcapJake hankache: on there way! I've never hooked into the linter package before but it's well documented.  atom-runner and atom-build will be pretty simple to setup.  The autocomplete could be more of a challenge but it'll really be great once it's working!
19:08 ugexe once @matches := $matches.list, where @matches is 3 scopes outside
19:08 johan joined #perl6
19:08 pecastro joined #perl6
19:09 pmurias [Coke]: I can't redo the rakudo commit as I don't have a commit biy
19:09 pmurias * bit
19:09 pmurias [Coke]: I recommited the changes to nqp-jvm as soon as I noticed the file was missing
19:09 nine pmurias: you mean revert the revert?
19:09 timotimo psch, AlexDaniel, ugexe, "once" gives you the exact same semantics as state variables. when the block it's in gets cloned, they get reset.
19:10 AlexDaniel timotimo: in other words it is fine that “once” can run twice?
19:11 timotimo i'd say so, yeah
19:11 hankache MadcapJake Good luck mate
19:11 psch ah
19:11 * psch ponders adding a test for that semantic
19:12 kjs_ joined #perl6
19:12 psch 'cause the name makes it seem more literal
19:12 AlexDaniel yeah
19:12 timotimo AFK
19:12 pmurias nine: yes
19:13 psch right, S04 mentions it the other way around, but yes
19:13 n0tjack joined #perl6
19:13 psch 'But state automatically applies "once" semantics to any initializer,[...]'
19:13 psch and a bit above too
19:14 pink_mist psch: that sounds like my earlier example should have worked 0_o
19:15 dalek rakudo/nom: a030922 | (Stefan Seifert)++ | src/core/IO/Handle.pm:
19:15 dalek rakudo/nom: Revert "Revert "Merge pull request #592 from pmurias/tty-checking""
19:15 dalek rakudo/nom:
19:15 dalek rakudo/nom: This reverts commit d9dde76fc1be441fb0ad7394bfd28d6e5c2dab7e.
19:15 dalek rakudo/nom:
19:15 dalek rakudo/nom: Release is out, now let's fix this.
19:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a03092271a
19:16 nine pmurias: can you make a pull request with the missing file?
19:16 zengargoylew joined #perl6
19:16 pmurias nine: no, it's already commited to nqp
19:16 nine pmurias: so we're done?
19:17 pmurias I think nqp needs to be bumped
19:17 psch pink_mist: ...i'm not sure.  i think specs is worded badly, fwiw vOv
19:19 psch pink_mist: i don't think 'sub f { $ = say "hi" }' *can* execute the say only once, because of side-effects
19:20 psch ...that doesn't quite express what i mean :/
19:21 psch these language design things are hard /o\
19:21 nine Where do I get the NQP revision from?
19:21 psch nine: either nqp-$be --version or git describe
19:21 psch nine: the former obviously only if you are on master/HEAD and built that :)
19:22 psch (which, incidentally, i did wrong at least once so i only use git describe now :P )
19:22 MadcapJake m: my $i = 0; sub g($v) { once { $i += $v } }; say g(1); say g(2);
19:22 camelia rakudo-moar : OUTPUT«1␤1␤»
19:24 MadcapJake m: my $i = 0; sub g($v) { once { $i += $v } return $i }; say g(1); say g(2);
19:24 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/1x3XvKCUWN␤Strange text after block (missing semicolon or comma?)␤at /tmp/1x3XvKCUWN:1␤------> 3my $i = 0; sub g($v) { once { $i += $v }7⏏5 return $i }; say g(1); say g(2);␤    expecting any of:␤     …»
19:24 MadcapJake m: my $i = 0; sub g($v) { once { $i += $v }; return $i }; say g(1); say g(2);
19:24 camelia rakudo-moar : OUTPUT«1␤1␤»
19:26 ZoffixW joined #perl6
19:26 Begi11111 joined #perl6
19:26 dalek rakudo/nom: 7c70c69 | (Stefan Seifert)++ | tools/build/NQP_REVISION:
19:26 dalek rakudo/nom: Bump NQP revision for JVM build fix
19:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c70c69f57
19:26 lab_ joined #perl6
19:26 dalek perl6-roast-data: 3009add | coke++ | / (9 files):
19:26 dalek perl6-roast-data: today (automated commit)
19:26 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3009addccf
19:28 ZoffixW MadcapJake, if you care; stuff in module names seems to be highlighted sometimes: http://i.imgur.com/Rn2VZoH.png
19:28 [Coke] pmurias++, psch++, nine++
19:29 MadcapJake m: my @l = 0,0,0; sub g($v) { once { for @l { $_ += $v } }; return @l }; say g(1); say g(2);
19:29 camelia rakudo-moar : OUTPUT«[1 1 1]␤[1 1 1]␤»
19:29 MadcapJake Ok, I can fix that.
19:30 ZoffixW What's $*META-FILE? It's the only time I see it mentioned in that code https://github.com/jonathanstowe/Test-META/blob/master/lib/Test/META.pm#L83 and I don't see it in the Dynamic Vars section: http://docs.perl6.org/language/variables#Dynamic_variables
19:30 ZoffixW hm... there's $*DIST-DIR and $*TEST-DIR too
19:32 ZoffixW m: $*META-FILE // 42; say $*META-FILE
19:32 camelia rakudo-moar : OUTPUT«Dynamic variable $*META-FILE not found␤  in block <unit> at /tmp/nNn5mSuLwz:1␤␤Actually thrown at:␤  in block <unit> at /tmp/nNn5mSuLwz:1␤␤»
19:32 ZoffixW m: sub zmeta-file { $*META-FILE // 42 }; say zmeta-file
19:32 camelia rakudo-moar : OUTPUT«42␤»
19:32 ZoffixW What sorcery is this?
19:32 zengargoylew m: sub f { $ ||= say "once" }; f; f;
19:32 camelia rakudo-moar : OUTPUT«once␤»
19:32 MadcapJake ZoffixW: patch released
19:33 kjs_ joined #perl6
19:33 ZoffixW MadcapJake++ # works. Thanks
19:35 zengargoylew hrm, thought it would have to be: for @l <-> $_ { $_ += $v }
19:36 ZoffixW Ah, OK. There's a whole section under the * twigil: http://docs.perl6.org/language/variables#The_*_Twigil
19:36 zengargoylew don't you still have to make $_ rw if you want it to be rw?
19:36 dalek doc: 22ecbc8 | (Zoffix Znet)++ | doc/Language/variables.pod:
19:36 dalek doc: Remove duplicate word
19:36 dalek doc: review: https://github.com/perl6/doc/commit/22ecbc8dac
19:39 ugexe m: sub f { $_ ||= say "once" }; f; f;
19:39 camelia rakudo-moar : OUTPUT«once␤once␤»
19:40 Upasaka joined #perl6
19:42 zengargoylew oops, guess not: If you rely on C<$_> as the implicit parameter to a block, then C<$_> is considered read/write by default.
19:42 AlexDaniel how can I write Num literals? One way is to append “e0” to the end, but is there anything better?
19:42 jnthn psch: Sounds like the code should really use nqp::getattr_i
19:42 yoleaux 18:49Z <nine> jnthn: RT 126688 is actually a bit of a challenge since the process doing the precompilation doesn't know which modules the other process already loaded. I'll have to communicate that between processes.
19:42 yoleaux 18:51Z <cygx> jnthn: https://github.com/rakudo-p5/v5/blob/master/src/Perl5/Terms.pm makes pre-compiltion of modules that use it die with Serialization Error: missing static code ref for closure 'MAIN'
19:42 zengargoylew m: say 1.Num.WHAT
19:42 camelia rakudo-moar : OUTPUT«(Num)␤»
19:44 AlexDaniel m: say 0.25.Num.WHAT
19:44 camelia rakudo-moar : OUTPUT«(Num)␤»
19:44 AlexDaniel okay!
19:44 jnthn psch: I'd not worry about trying to replicate the Moar behavior in JVM.
19:45 jnthn psch: Just fix the usage.
19:45 zengargoylew i think that's the proper way... though i often wish they would auto coerce sometimes.
19:47 jnthn nine: Darn, you're right. :-)
19:47 jnthn nine: Dunno how you were communicating what we compiled back though.
19:48 nine jnthn: right now? STDOUT ;) Will write that information directly to the appropriate file though.
19:49 jnthn .tell cygx I don't actually see a MAIN in that module; any idea which one it's referring to? The issue may be something to do with the code in the mainline assigning to variables, which it then exports. But the error isn't what I'd expect...
19:49 yoleaux jnthn: I'll pass your message to cygx.
19:49 nine jnthn: oh and I now write a .deps and a .rev-deps file for each precomp file. That way all lookups are O(1) and it's also the cheapest way to store the information.
19:49 jnthn Neat!
19:49 nine jnthn: and I can write just one precomp id per line which makes it ridiculously simple to handle :)
19:49 jnthn :D
19:49 jnthn nine++ # simple designs
19:50 nine And everything is managed by PrecompilationRepository.
19:51 diakopter___ joined #perl6
19:51 znpy joined #perl6
19:53 diana_olhovik_ joined #perl6
19:57 lab joined #perl6
19:58 ugexe nine++ very cool
19:58 espadrine joined #perl6
20:00 dalek rakudo/curli: 4c4d9d7 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
20:00 dalek rakudo/curli: Use a dependencies file per precomp file and fix thinko
20:00 dalek rakudo/curli:
20:00 dalek rakudo/curli: Using a file per module scales O(1) since we can look up the information
20:00 dalek rakudo/curli: directly by name.
20:00 dalek rakudo/curli:
20:00 dalek rakudo/curli: This commit also fixes a thinko in transitive dependencies checking. Of course
20:00 dalek rakudo/curli: we have to ensure that no dependency is newer than the precompilation file
20:00 dalek rakudo/curli: we're about to load.
20:00 dalek rakudo/curli: The precomp file must be newer than the source.
20:00 dalek rakudo/curli: No dependency may be newer than the precomp file.
20:00 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/4c4d9d7e9e
20:00 hankache joined #perl6
20:00 lab joined #perl6
20:01 dalek rakudo/curli: 795dff2 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
20:01 dalek rakudo/curli: Avoid shell() at all cost!
20:01 dalek rakudo/curli:
20:01 dalek rakudo/curli: Especially, when it's quite cheap and makes the code more robust.
20:01 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/795dff225a
20:02 dalek rakudo/curli: 83b9a24 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
20:02 dalek rakudo/curli: Write a reverse dependencies file for every precomp file.
20:02 dalek rakudo/curli:
20:02 dalek rakudo/curli: This way we know in O(1) which modules have to be recompiled when we update a
20:02 dalek rakudo/curli: precomped module.
20:02 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/83b9a24ab4
20:02 ugexe nine: the first argument to run() is still 2 arguments
20:03 ugexe s/$lle"/",$lle/
20:03 nine ugexe: oh, thanks for the hint!
20:03 psch jnthn: well, yes, the code should use getattr_i, but i distinctly remember this not being the first time that this exact bug appears
20:03 hankache if you were to publish a document under which license would you do it?
20:03 psch jnthn: because when developing against moar (and assigning to a native container) getattr works just fine, but then someone tries to build r-j and stuff is broken
20:04 psch jnthn: so in the interest of ticket-minimization i'd like consistency :S
20:04 ZoffixW joined #perl6
20:04 ZoffixW Was $foo:defined a thing? What's the new variant? $foo.defined?
20:04 pink_mist :D
20:04 * ZoffixW is fixing some code in ecosystem
20:05 pink_mist (maybe?)
20:05 ZoffixW m: my $foo; say $foo:D ?? "Y" !! "N"; $foo = 42; say $foo:D ?? "Y" !! "N";
20:05 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/BsVP3b83UQ␤Variable '$foo:D' is not declared␤at /tmp/BsVP3b83UQ:1␤------> 3my $foo; say 7⏏5$foo:D ?? "Y" !! "N"; $foo = 42; say $fo␤»
20:05 ZoffixW pink_mist, I believe that's just a type "hint" that says it must be defined
20:05 pink_mist right, you're correct :(
20:05 ZoffixW m: sub foo (Int $x:D) {say $x;}; foo(42); foo();
20:05 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/iLgvmNXQfq␤Invalid typename 'D' in parameter declaration.␤at /tmp/iLgvmNXQfq:1␤------> 3sub foo (Int $x:D7⏏5) {say $x;}; foo(42); foo();␤»
20:06 jnthn :D does on types, not variables
20:06 ZoffixW lol. it looks like we're talking in smileys :P
20:07 Upasaka joined #perl6
20:07 [Coke] m: .:D
20:07 camelia rakudo-moar : OUTPUT«Default constructor for 'Any' only takes named arguments␤  in block <unit> at /tmp/xFCYX95F33:1␤␤»
20:07 dalek rakudo/curli: 772b73e | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
20:07 dalek rakudo/curli: Fix precompilation when running with --ll-exception
20:07 dalek rakudo/curli:
20:07 dalek rakudo/curli: Thanks to ugexe++ for pointing this out!
20:07 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/772b73e868
20:10 ZoffixW tony-o_, sent you a PR. See if you can merge it. I'm using that module for a new test module that will be used by the modules.perl6.org build script soon: https://github.com/tony-o/perl6-pluggable/pull/1
20:10 ZoffixW (and currently that error makes it fail)
20:10 bpmedley joined #perl6
20:11 jnthn psch: Understand...I fear it's one of those places where the thing Moar does is easy in C, but a Java equivalent may not be
20:12 psch jnthn: which makes me think that maybe moar shouldn't apply its branch of magic there.  similarly to 9bc5a0a, which again is moar magically decont'ing where jvm needs it explicitly
20:13 psch anyway, it's not really bad, of course, i'm probably just a bit annoyed right now because i had to ride to the store twice 'cause i forgot my wallet
20:14 jnthn Why doesn't that code just use self?
20:14 jnthn Then the problem wouldn't happen
20:14 jnthn (Instead of $self)
20:15 jnthn I guess it captures it for a reason, but it doesn't need to use it there.
20:15 jnthn The decont is probably nothing to do with Moar at the VM level, but rather because we compile signatures on Moar and it elides the container in that csae
20:15 jnthn *case
20:17 jnthn (Getting that working on JVM will help performance a load too, I suspect...)
20:19 Skarsnik Does someone can test https://rt.perl.org/Ticket/Display.html?id=126645 on win32 (or os X) or jvm? x)
20:22 leont jnthn: have you tried my harness branch with TEST_JOBS=2? That should show the async issue I mentioned before. Possibly you can make more out of it than I can.
20:25 jnthn leont: Not yet; I've been tied up with a bunch of other non-concurrency things, and figured I'd look at it along with the various concurrency RTs on the xams list (since it may end up being one of those issues anyway)
20:25 jnthn leont: Planning to work on those next week... This week largely went on getting the shaped array stuff sorted.
20:27 nine jnthn: I think...we should actually use the precomp ids for storing the source files, too. For the user it doesn't matter if it's a number or a sha1. And with using the sha1, I can find the corresponding source file to recompile in O(1). Precomp ids have to be sufficiently unique anyway.
20:27 leont If I find the tuits I may try to minimize the problem, but I have no idea how easy that's going to be (given concurrency)
20:28 CQ joined #perl6
20:28 arnsholt So, here's a puzzle: Given a Rakudo compiler object, would it be possible to figure out if a string is a *partial* Perl 6 program?
20:29 arnsholt That is, given a string that doesn't parse, is it possible to distinguish those that could parse if you add more stuff at the end, and those that couldn't?
20:29 pink_mist surely any string could be a partial perl6 program; any string can be a string in a perl6 program after all 0_o
20:30 CQ just randomly generate stuff before and after, and if it ever parses, it's perl6 : )
20:30 jnthn nine: I could go with that...
20:30 nine + the repo doesn't have to keep the count of the source files anymore. Less state!
20:30 jnthn arnsholt: Well, you can see where the highwater mark is and if it's at the end of the string, you know it got there, and was looking for more stuff
20:30 arnsholt I guess I could look at the high water mark of a parse failure and see if it reached all the way to the end of the string
20:31 jnthn hah
20:31 jnthn :)
20:31 arnsholt I'm glad you agree =D
20:31 jnthn leont: Yes...that's concurrency :)
20:36 Skarsnik I just wondering, is there a nice way to say:  A; { some code } B; and I want to wait if A -> B take less than a 1 sec? An usage is for example $ua.get("some html"); do stuff with it; wait before doing anohter request
20:38 moritz Skarsnik: sleep()?
20:38 pink_mist Skarsnik: you could fire off A into another thread and sleep for 1 sec in the current thread and do B after
20:39 ugexe depends, if he is using sockets that could get messy
20:41 Skarsnik I mean I could write my $time = now; {get web, parse}; sleep 1 - now - $time if (now - $time < 1);
20:42 Skarsnik it to ensure I wait enought between 2 http request
20:42 pink_mist or you could just sleep 1 anyway :P
20:42 ugexe throttling
20:43 pink_mist sometimes throttling is /between/ requests, not /between start times/ of requests =)
20:43 zengargoylew sleep min 1, (1-now-$time); -ish
20:43 zengargoylew min 0, ...
20:43 tony-o_ and he can't read from that socket if he goes to another thread
20:44 zengargoylew max 0, (1-now-$time)
20:45 dalek rakudo/nom: 0b6328c | peschwa++ | src/core/Str.pm:
20:45 dalek rakudo/nom: Fix RT #126679.
20:45 dalek rakudo/nom:
20:45 dalek rakudo/nom: The JVM backend needs type-specific getattr invocations for native Attributes.
20:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0b6328c2d5
20:45 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126679
20:49 zengargoylew sleep max 0, 1-(now-$time);
20:50 tokuhiro_ joined #perl6
20:53 dalek doc: 280f7e3 | (Zoffix Znet)++ | doc/Language/objects.pod:
20:53 dalek doc: Grammar fix
20:53 dalek doc: review: https://github.com/perl6/doc/commit/280f7e3329
20:54 dalek doc: b3fd082 | (Zoffix Znet)++ | doc/Language/objects.pod:
20:54 dalek doc: Grammar fix
20:54 dalek doc: review: https://github.com/perl6/doc/commit/b3fd082c75
20:54 dalek rakudo/curli: 2046957 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
20:54 dalek rakudo/curli: Fixup: superfluous space in front of --ll-exception
20:54 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/204695708e
20:55 pmurias jnthn: if a closure is taken on MoarVM it should get the same code_object as the code ref it's built from?
20:55 * pmurias is confused why his nqp-js copy of the MoarVM closure model is sometimes breaking
20:56 jnthn pmurias: code object as in the HLL code object?
20:56 jnthn They should point to each other, though, if that's what you mean
20:57 pmurias jnthn: yes
20:57 pmurias point to each other?
20:57 dalek doc: d10e4d6 | (Zoffix Znet)++ | doc/Language/objects.pod:
20:57 dalek doc: Reword
20:57 dalek doc: review: https://github.com/perl6/doc/commit/d10e4d68e6
20:58 jnthn Sure
20:58 jnthn code ref points to HLL code object
20:58 jnthn HLL code object points to same code ref
20:59 jnthn Though the latter isn't the VM's job to make happen.
20:59 pmurias how is the HLL code object updated?
21:00 jnthn Just by nqp::bindattr
21:00 jnthn In Rakudo's code objects to a $!do
21:00 jnthn Think similar in NQP
21:04 dalek doc: c82e355 | (Zoffix Znet)++ | doc/Language/objects.pod:
21:04 dalek doc: Reword for clarity
21:04 dalek doc:
21:04 dalek doc: When reading code examples in detail, it is not immediately obvious the sentence refers to the example a paragraph earlier and "in the method describe" looks like a typo
21:04 dalek doc: review: https://github.com/perl6/doc/commit/c82e355839
21:04 pmurias jnthn: I'm looking at src/vm/moar/QAST/QASTCompilerMAST.nqp:833 and the $!do doesn't seem to be updated
21:06 jnthn It doesn't happen there
21:06 jnthn It's done by HLL code
21:06 jnthn See src/core/NQPRoutine.nqp
21:08 pmurias jnthn: you mean in the clone method?
21:09 jnthn pmurias: Yes
21:11 pmurias jnthn: and what call the clone method? it seems like only the moarvm takeclosure op is called
21:11 pmurias * calls
21:13 grondilu joined #perl6
21:13 jnthn pmurias: In Rakudo we code-gen calls to .clone. I thought the same in NQP... In NQP we only use code objects in some cases, though, iirc.
21:14 jnthn pmurias: By code-gen I mean that Actions spits out such code
21:14 Skarsnik can something write a small code that create like a buck of nested structure of a class A {has A $.parent; has A @.children} like with 50 depth (I am too dumb to write this or what). I think the GC don't know to release the memory when you can copy something like that
21:15 jdv79 so parameterized roles and require not mix well?
21:15 jdv79 *do
21:16 dalek rakudo/curli: 11116b6 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
21:16 dalek rakudo/curli: Recompile reverse dependencies after installing a precomp file
21:16 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/11116b6020
21:16 diakopter____ joined #perl6
21:16 nine ^^^ this is actually 12 insertions(+), 16 deletions(-) :)
21:17 tokuhiro_ joined #perl6
21:17 jdv79 https://gist.github.com/anonymous/54c68dd756572eae51fe
21:17 pmurias jnthn: in NQP code we don't seem to call clone
21:18 gfldex joined #perl6
21:18 jnthn pmurias: Maybe we only do it when dealing with multi-dispatch or role cloning...
21:19 pmurias in !cursor_start_all we set $!regexsub to nqp::getcodeobj(nqp::callercode())
21:19 jnthn nine: Nice!
21:23 dalek doc: 9767a51 | (Zoffix Znet)++ | doc/Language/objects.pod:
21:23 dalek doc: Fix POD
21:23 dalek doc: review: https://github.com/perl6/doc/commit/9767a51249
21:28 n0tjack joined #perl6
21:29 arnsholt jnthn: Hmm. How do I get at the highwater mark after a failed parse?
21:30 timotimo could be in the exception
21:30 arnsholt Oh, nm
21:30 arnsholt Yeah, it's in the exception
21:30 arnsholt I derped while grepping through the src/core/Exception.pm
21:31 arnsholt I saw the X::Comp { ... } stub and misparsed it as an empty declaration
21:31 diana_olhovik joined #perl6
21:31 arnsholt But the real declaration of X::Comp has stuff
21:33 grondilu hello everyone
21:34 grondilu how's everything going?  Still confident for Xmas?
21:36 dalek rakudo-star-daily: 516c172 | coke++ | log/ (3 files):
21:36 dalek rakudo-star-daily: today (automated commit)
21:36 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/516c172ec7
21:39 ollej_ joined #perl6
21:40 * grondilu remembers to read announce/2015.11.md
21:42 eliasr joined #perl6
21:54 pdcawley_ joined #perl6
21:59 pdcawley joined #perl6
22:05 leont Is there a cute syntax for a constant method?
22:06 dalek doc: e65755d | (Steve Mynott)++ | doc/ (2 files):
22:06 dalek doc: input-line-separator is now nl-in
22:06 dalek doc: review: https://github.com/perl6/doc/commit/e65755d226
22:07 dalek doc: f8c77d5 | (Steve Mynott)++ | doc/Type/IO/Socket/INET.pod:
22:07 dalek doc: correct default network line terminator
22:07 dalek doc: review: https://github.com/perl6/doc/commit/f8c77d517d
22:09 zengargoyle constant how?
22:10 jnthn leont: Can you show your not-cute syntax, so I understand what you want? :)
22:12 leont I think I just want to drop my habit of explicit returns for these kinds of methods, nm
22:15 arnsholt Does the Rakudo Linenoise code do tab-completion stuff?
22:16 TEttinger joined #perl6
22:17 Upasaka_ joined #perl6
22:17 grondilu m: say map * + *, ^10;  # TIL I can do that
22:17 camelia rakudo-moar : OUTPUT«(1 5 9 13 17)␤»
22:17 kjs_ joined #perl6
22:18 zengargoyle pretty sure Linenoise just does basic line editing and session history
22:19 arnsholt Yeah, I didn't expect it too, TBH. But if it did, it'd be an interesting reference
22:19 zengargoyle that's part of why i asked yesterday about using readline instead.
22:19 arnsholt Cheers!
22:19 AlexDaniel m: my $↑↓ = 5; say $↑↓
22:19 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/J5izXwSG4n␤Name must begin with alphabetic character␤at /tmp/J5izXwSG4n:1␤------> 3my $7⏏5↑↓ = 5; say $↑↓␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤   …»
22:21 arnsholt Those aren't letters =)
22:21 AlexDaniel arnsholt: Hm, I see!
22:22 AlexDaniel arnsholt: still, any way to make it work?
22:22 dalek doc: 2b3e34a | (Steve Mynott)++ | CREDITS:
22:22 dalek doc: extend CREDITS using CREDITS.p6
22:22 dalek doc: review: https://github.com/perl6/doc/commit/2b3e34ae6e
22:22 Upasaka joined #perl6
22:34 AlexDaniel m: my term:<↑↓> = 25; say ↑↓
22:34 camelia rakudo-moar : OUTPUT«5===SORRY!5===␤Type 'term:<↑↓>' is not declared␤at /tmp/I5AudUE4up:1␤------> 3my term:<↑↓>7⏏5 = 25; say ↑↓␤Malformed my␤at /tmp/I5AudUE4up:1␤------> 3my term:<↑7⏏5↓> = 25; say ↑↓␤␤»
22:34 roguelazer joined #perl6
22:35 jnthn m: my \term:<↑↓> = 25; say ↑↓
22:35 camelia rakudo-moar : OUTPUT«25␤»
22:35 AlexDaniel right
22:35 AlexDaniel m: my $term:<↑↓> = 25; say $term:<↑↓>
22:35 camelia rakudo-moar : OUTPUT«25␤»
22:35 kjs_ joined #perl6
22:36 arnsholt timotimo: Sorry for spamming you with iperl6kernel issues. I'm done now =)
22:38 AlexDaniel m: sub term:<࿖> { die }; ࿖ # heh…
22:38 camelia rakudo-moar : OUTPUT«Died␤  in sub term:<࿖> at /tmp/7RL9rTqKXY:1␤  in block <unit> at /tmp/7RL9rTqKXY:1␤␤»
22:38 timotimo arnsholt: issues?
22:39 timotimo oh, on github/email?
22:39 Skarsnik nice AlexDaniel x)
22:40 AlexDaniel m: sub term:<☠> { die }; ☠ # ok this one is more appropriate
22:40 camelia rakudo-moar : OUTPUT«Died␤  in sub term:<☠> at /tmp/PAXQTWOCml:1␤  in block <unit> at /tmp/PAXQTWOCml:1␤␤»
22:41 timotimo arnsholt: linenoise actually does tab completion.
22:45 zengargoyle my grip it that it doesn't do unicode well.  and it that weird horizontal scroll thing.
22:46 kjs_ joined #perl6
22:46 zengargoyle i'm trying rlwrap now, had to remove Linenoise.pm first.
22:47 AlexDaniel m: my %h; say %h.default
22:47 camelia rakudo-moar : OUTPUT«(Any)␤»
22:48 AlexDaniel m: my %h is default(42); say %h<nice>
22:48 camelia rakudo-moar : OUTPUT«42␤»
22:48 diakopter___ joined #perl6
22:49 AlexDaniel m: my %h is default(42); say %h<nice>; say keys %h
22:49 camelia rakudo-moar : OUTPUT«42␤()␤»
22:49 diakopter___ joined #perl6
22:49 hahainternet so is it possible to manipulate the 'global' grammar? i'm just about starting to grok std.pm but i want to add support for superscripts and subscripts using this
22:49 hahainternet but it's quite hard to find reference material
22:52 Skarsnik m: my @array is default(-1); @array[2] = 4; say @array;
22:52 camelia rakudo-moar : OUTPUT«[(Any) (Any) 4]␤»
22:52 Skarsnik m: my @array is default(-1); @array[2]; say @array;
22:52 camelia rakudo-moar : OUTPUT«[]␤»
22:54 AlexDaniel m: my @array; say @array.default
22:54 camelia rakudo-moar : OUTPUT«(Any)␤»
22:54 AlexDaniel m: my @array is default(42); say @array.default
22:54 camelia rakudo-moar : OUTPUT«42␤»
22:54 AlexDaniel m: my @array is default(42); say @array.default; say @array[100]
22:54 camelia rakudo-moar : OUTPUT«42␤42␤»
22:54 Skarsnik damn I though it will feel missing  key with default
22:54 Skarsnik *feed
22:55 AlexDaniel m: my @array is default(42); say @array.default; @array[100] = 100; say @array[50]
22:55 camelia rakudo-moar : OUTPUT«42␤42␤»
22:55 AlexDaniel m: my @array is default(42); @array[10] = 10; say @array[5]; say @array
22:55 camelia rakudo-moar : OUTPUT«42␤[(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) 10]␤»
22:56 Skarsnik hm
22:56 AlexDaniel it is a bit weird
22:56 AlexDaniel in fact, it feels wrong…
22:56 AlexDaniel m: my @array is default(42); @array[10] = 10; say @array[5]; say @array[3..5]
22:56 camelia rakudo-moar : OUTPUT«42␤()␤»
22:57 AlexDaniel or maybe not
22:57 psch hahainternet: i'd suggest starting with looking at the Slangs in the ecosystem, coupled with (potentially a lot of) looking at Perl6/Grammar.nqp and Perl6/Actions.nqp
22:57 Skarsnik :m: my @array is default(42); for 0..10 -> $i {@array[$i]}; say @array;
22:57 Skarsnik m: my @array is default(42); for 0..10 -> $i {@array[$i]}; say @array;
22:57 camelia rakudo-moar : OUTPUT«[]␤»
22:57 hahainternet psch: ack, i know about slangs but nqp is a stage beyond what i've done so far
22:58 psch hahainternet: nqp is just perl6 with lots less convenience :)
22:58 hahainternet psch: i just don't have much time unfortunately, and i don't know if my contributions would be welcome
22:59 psch hahainternet: i'm pretty sure it would be a fringe-useful Slang, if i understand your intent correctly
22:59 timotimo m: my @array is default(42); say @array[10]; say @array[10]:exists; @array[20] = 100; say @array[10]:exists;
22:59 camelia rakudo-moar : OUTPUT«42␤False␤False␤»
22:59 timotimo AlexDaniel, Skarsnik: perhaps this helps? ^
22:59 hahainternet psch: 2² = 4 and $x₁ or whatever = $x_1
22:59 hahainternet seems to me that this should be core, as we embrace the rest of unicode
22:59 AlexDaniel timotimo: right!
22:59 timotimo m: my $x₁ = 10;
22:59 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/17bLiudIdt␤Bogus postfix␤at /tmp/17bLiudIdt:1␤------> 3my $x7⏏5₁ = 10;␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        statement end␤  …»
22:59 hahainternet and this is standard notation
22:59 timotimo aaw.
22:59 AlexDaniel hahainternet: I agree!
23:00 psch hahainternet: standard *math* notation, maybe.  i don't know of any mainstream programming language that allows it
23:00 AlexDaniel hahainternet: but…
23:00 timotimo m: say uniprop("₁")
23:00 camelia rakudo-moar : OUTPUT«No␤»
23:00 psch hahainternet: but that's the thing, it can work as a module quite easily
23:00 timotimo what does No stand for?
23:00 hahainternet m: say unival("₁")
23:00 camelia rakudo-moar : OUTPUT«1␤»
23:00 psch timotimo: "other number"
23:00 timotimo ah, hm.
23:00 psch -" "
23:00 timotimo so we allow regular numbers at the end of identifiers, but not "other number"?
23:00 hahainternet anyhow psch i will write as a module first
23:01 psch timotimo: cf nqp/src/vm/jvm/runtime/Ops.java:4230
23:01 AlexDaniel hahainternet: some time ago there was a discussion about ≤ ≥ ≠ and stuff
23:01 hahainternet but i don't know if anyone would notice
23:01 hahainternet AlexDaniel: i assume those are supported, i haven't actually checked :)
23:01 AlexDaniel hahainternet: and IMO these should be allowed, why not?
23:01 psch hahainternet: it'd probably get mentioned on the perl6weekly if you pout it into the ecosystem
23:01 hahainternet i agree AlexDaniel
23:01 psch s/pout/put/
23:01 AlexDaniel hahainternet: however, some people felt that it is a bit “too much”…
23:01 AlexDaniel hahainternet: so the suggestion was to implement it as a module first
23:02 AlexDaniel hahainternet: and then, well, perhaps some parts of it colud become core
23:02 hahainternet well, i need to learn how to manipulate the default grammar before i can write the module
23:02 AlexDaniel hahainternet: in fact, I've always wanted to create such module, just didn't had enough time
23:02 psch hahainternet: the challenge, as i see it, is that you'd need to extract the operator function from the operator symbol
23:02 zengargoyle i like ₁ being in a var, not so sure about ² being a power.
23:02 psch hahainternet: well, except if you want to implement e.g. ²² manually
23:03 hahainternet psch: i don't know enough about grammars and new regexes to be able to comment
23:03 psch 'cause those only become really useful if they are composable, i.e. $x²² eqv $x ** 22
23:03 timotimo m: my $fooⅣ = 4;
23:03 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/qCcF8no4Ch␤Bogus postfix␤at /tmp/qCcF8no4Ch:1␤------> 3my $foo7⏏5Ⅳ = 4;␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        statement end␤ …»
23:03 timotimo ah, that's also not allowed, eh?
23:03 hahainternet psch: that is precisely the intention i had
23:04 psch hahainternet: right, but that means that for every No (but hopefully there's a narrower category that limits it to superscript) you have to generate the appropriate potentiation operator
23:04 hahainternet obviously these are the more trivialities of unicode, what really matters is the ability for people to write perl in their own language without hinderance
23:04 AlexDaniel hahainternet: but you can start with something small, I think. There's a bunch of other stuff like ∞ × ÷ ⋅
23:04 psch hahainternet: it definitely sounds like an interesting project!
23:04 timotimo m: say uniprop("Ⅳ")
23:04 camelia rakudo-moar : OUTPUT«Nl␤»
23:05 hahainternet psch: i figured it could be matched earlier in the parsing really
23:05 hahainternet but again, i know very little
23:05 hahainternet std.pm is a hard read :D
23:05 timotimo Nl is "number letter" so why not allow that? :P
23:06 AlexDaniel by the way, I wonder if More::Unicode is a good way to name that module
23:06 timotimo i'd put Slang in the name
23:06 psch timotimo: i think we allow only L* at the moment..?
23:06 timotimo maybe
23:06 psch timotimo: maybe it doesn't even match well with unicode categories...
23:07 AlexDaniel .oO( no More::Unicode; )
23:09 AlexDaniel hahainternet: anyway, just wanted to say that whether it is a core thing or not, I'll definitely use it
23:09 hahainternet well, the chances of me making it anytime soon are small
23:09 grondilu is it possible to have a sigilless named parameter?
23:09 hahainternet but if i do make a start i'll make it public and chat in here
23:09 AlexDaniel grondilu: \var ?
23:09 AlexDaniel m: my \var = 25; say var
23:09 camelia rakudo-moar : OUTPUT«25␤»
23:10 grondilu parameter, not variable.  Like:  sub (:\var) {...}
23:10 AlexDaniel hahainternet: thanks!
23:10 El_Che grondilu: yes, it's called Ruby ;)
23:10 AlexDaniel m: sub test(\foo) { say foo }; test(25)
23:10 camelia rakudo-moar : OUTPUT«25␤»
23:10 lostinfog joined #perl6
23:11 AlexDaniel ah, named
23:11 * AlexDaniel has to learn to read
23:11 psch hahainternet: well, a module can overwrite the current language
23:11 psch hahainternet: which effectively means you get to decide how stuff is parsed in your module (terms and condition apply)
23:12 hahainternet psch: yep, that's what i intend to try
23:12 hahainternet but we'll see, not tonight as it's friday :)
23:12 grondilu I'm asking this because I wanted to use 'δ' as a named parameter for a sub, but writing $δ looks very ugly.
23:13 jnthn Epic blog post on what I've been working on recently: https://6guts.wordpress.com/2015/11/21/what-one-christmas-elf-has-been-up-to/
23:13 diakopter___ joined #perl6
23:13 psch ++hahainternet
23:13 hahainternet Posted on November 21, 2015
23:13 hahainternet holy crap jnthn you're from the future
23:13 hahainternet that explains everythin
23:13 AlexDaniel hahainternet: me too
23:13 jnthn Shhh!
23:14 hahainternet jnthn: if you have 2 secs, thoughts on what we've just been discussing? ie 2²=4, $x₁ as a valid variable name
23:14 lostinfog joined #perl6
23:14 hahainternet as well as a bunch of other fancy unicode character supports
23:14 AlexDaniel hahainternet: hold on, I thought that $x₁ would be $x[1]
23:15 hahainternet does $x[1] make any sense anymore with sigil invariance? i have no idea, but it's down to whatever the most common use of it is i guess
23:16 jnthn m: say 2²
23:16 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/tQwXOMDdC5␤Bogus postfix␤at /tmp/tQwXOMDdC5:1␤------> 3say 27⏏5²␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤ …»
23:16 hahainternet i was thinking more the denoting of different instances of $x like in math formulas, but i'm very ignorant :)
23:16 jnthn m: sub postfix:<²>($n) { $n ** 2 }; say 2²
23:16 camelia rakudo-moar : OUTPUT«4␤»
23:16 jnthn Well, that one works out like that :)
23:16 hahainternet sorta, but there's say, 2³⁰
23:16 hahainternet which is a bit more complex :)
23:17 jnthn Especially when the final char shows up as a replacement char here :P
23:17 hahainternet anyway more interested in your thoughts about how, if i was to write a module, it should be implemented
23:17 AlexDaniel hahainternet: well, if you have x1 then you probably have x2 and maybe x0… which sounds like an array
23:17 jnthn .u ⁰
23:17 yoleaux U+2070 SUPERSCRIPT ZERO [No] (⁰)
23:17 jnthn Ah
23:17 hahainternet AlexDaniel: some latin chars can be subscripted too
23:17 hahainternet so you can have the equiv of $x_a
23:18 hahainternet it's not a particularly well fleshed out part of unicode
23:18 hahainternet but the only way it ever will be is adoption :)
23:18 AlexDaniel hahainternet: which is %x<a>
23:18 psch m: sub term:<x₁> is rw { $ }; x₁ = 5; say x₁ # this can also work, fwiw
23:18 camelia rakudo-moar : OUTPUT«5␤»
23:19 tokuhiro_ joined #perl6
23:19 psch if we get this as a module it's gonna be an amazing opportunity for improving performance of language recomposition... :P
23:19 jnthn hahainternet: I think if you want it scale well rather than defining a ton of postfixes, then you'd need to write a slang that provides a token postfix:sym<superscript> { <[²³...]>+ }
23:19 AlexDaniel psch: yeah, last time I tried that stuff it was horribly slow
23:19 hahainternet jnthn: yep that is exactly what i plan to do, that example is perfect though as now i can look up similar examples
23:20 pink_mist is there a superscript /? so one can have ^1/3? :P
23:20 psch AlexDaniel: yeah, it has something to do with how we recreate the existing grammar when we have to, because we get a new operator
23:20 jnthn hahainternet: Not sure if anyone's really done that yet, but it's probably an easier slang than, say, Tuxic :)
23:20 Skarsnik m: my @a[10] is default(42); say @a;
23:20 camelia rakudo-moar : OUTPUT«[(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)]␤»
23:20 hahainternet pink_mist: not quite, but there is ½ and ¾ etc :)
23:20 Skarsnik that infortunate x)
23:21 Skarsnik m: my @a[10] = 42; say @a;
23:21 pink_mist hahainternet: err, those aren't superscript though :P
23:21 camelia rakudo-moar : OUTPUT«[42 (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)]␤»
23:21 hahainternet jnthn: well i don't think i can really contribute in any other way
23:21 hahainternet pink_mist: nope, but as close as you can get i believe
23:21 jnthn :)
23:21 jnthn OK, I'm going to go rest...
23:21 jnthn 'night, #perl6
23:21 psch m: say unival ½
23:21 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/aw6UTHw076␤Bogus term␤at /tmp/aw6UTHw076:1␤------> 3say unival 7⏏5½␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        postfix␤        prefix␤        st…»
23:21 Skarsnik good night
23:21 psch m: say unival "½" # of course...
23:21 camelia rakudo-moar : OUTPUT«0.5␤»
23:22 hahainternet night jnthn, blog post looks good
23:22 hahainternet only skim read so far
23:22 psch night jnthn o/
23:22 pink_mist they have superscript + - = ( and ) .. but no / =(
23:22 AlexDaniel pink_mist: what about ÷?
23:23 pink_mist nope
23:23 hahainternet pink_mist: yep, only one way to fix though, make it feasible for these to actually be used :D
23:26 pink_mist they also have n, i, a, and h
23:26 AlexDaniel
23:27 pink_mist AlexDaniel: I wanted it as superscript though :P
23:27 AlexDaniel hmm, is there any superscript modifier?
23:29 AlexDaniel nope
23:29 AlexDaniel .u ℁
23:29 yoleaux U+2101 ADDRESSED TO THE SUBJECT [So] (℁)
23:29 AlexDaniel .u ℆
23:29 yoleaux U+2106 CADA UNA [So] (℆)
23:30 AlexDaniel ᵃ ᵇ ᶜ ᵈ ᵉ ᶠ ᵍ ʰ ⁱ ʲ ᵏ ˡ ᵐ ⁿ ᵒ ᵖ ʳ ˢ ᵗ ᵘ ᵛ ʷ ˣ ʸ ᶻ ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ
23:30 pink_mist ℆ later :P
23:30 pink_mist AlexDaniel: oh, nice
23:31 AlexDaniel oh: ᴬ ᴮ ᴰ ᴱ ᴳ ᴴ ᴵ ᴶ ᴷ ᴸ ᴹ ᴺ ᴼ ᴾ ᴿ ᵀ ᵁ ⱽ ᵂ
23:31 pink_mist no F?
23:31 pink_mist or C
23:31 AlexDaniel it's not too bad, but it is so stupid that some of the characters are missing…
23:31 pink_mist yeah
23:31 pink_mist really ordd
23:31 pink_mist *err odd
23:31 AlexDaniel it's unicode! Let's have arrows in all directions except one!
23:33 AlexDaniel .u ₑ
23:33 yoleaux U+2091 LATIN SUBSCRIPT SMALL LETTER E [Lm] (ₑ)
23:33 AlexDaniel .u ᵥ
23:33 yoleaux U+1D65 LATIN SUBSCRIPT SMALL LETTER V [Lm] (ᵥ)
23:35 pecastro joined #perl6
23:35 ZoffixGameBox joined #perl6
23:37 ZoffixGameBox huh?
23:37 ZoffixGameBox Can someone say something
23:37 hahainternet hi :)
23:37 sprocket joined #perl6
23:37 ZoffixGameBox This is annoying. Camelia's "nl" at the end makes Freenode webchat beep :S
23:38 psch "Attention, there was a non-standard line break"
23:38 ZoffixGameBox hahainternet: I joined 'cause I thought I figured out how to solve for any power, but then realized I was wrong :(
23:38 zengargoyle lol, DOS ZoffixGameBox
23:38 ZoffixGameBox Ah. it's not nl, it's addressed/PM. Mighty annoying sound
23:38 ZoffixGameBox hahainternet: oh wait. I *do* know how to make any power!
23:39 psch m: say unival ²
23:39 camelia rakudo-moar : OUTPUT«5===SORRY!5=== Error while compiling /tmp/C88DE_PuoC␤Bogus term␤at /tmp/C88DE_PuoC:1␤------> 3say unival 7⏏5²␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        postfix␤        prefix␤        st…»
23:39 psch m: say unival "²"
23:39 camelia rakudo-moar : OUTPUT«2␤»
23:39 psch still needs to hook into %*LANG
23:39 psch also those superscripts don't combine, so you'd have to do it on a per-character basis
23:39 psch m: say unival "²³"
23:39 camelia rakudo-moar : OUTPUT«2␤»
23:40 psch m: say univals "²³"
23:40 camelia rakudo-moar : OUTPUT«(2 3)␤»
23:40 ZoffixGameBox hahainternet: make postfix and infix ops of 0-9 and minus. Make the infix return a custom object that would tell the OTHER infix to combine previous power and then the postfix op can take care of all that object stuff and return a proper number
23:40 Skarsnik psch, do you remember if the multi method issue with role and class (with multi method foo {...} doing weird stuff)get into a bug repport or something?
23:41 psch Skarsnik: tbh i thought you'd report it..?
23:41 ZoffixGameBox hahainternet: that's works only in my head for now though. I'll see if I can extend Operators::Math::Superscripts for any power. That would make it more than a toy :P
23:41 psch ZoffixGameBox: put it in a slang that parses the superscripts and gets the univals
23:41 psch ZoffixGameBox: that seems much easier from my POV :P
23:41 ZoffixGameBox psch: oh
23:41 hahainternet ZoffixGameBox: have a look at the web chat logs
23:42 hahainternet we had a brief chat about it for the hour before you joined
23:42 ZoffixGameBox psch: I know nothing about slangs other than it's a stands for "sublanguage" :) Gonna check 'em out
23:42 hahainternet ZoffixGameBox: what jnthn mentioned: > hahainternet: I think if you want it scale well rather than defining a ton of postfixes, then you'd need to write a slang that provides a token  postfix:sym<superscript> { <[²³...]>+ }
23:42 AlexDaniel what about creating an operator that is empty but does lookahead? Then superscript+ can be a simple numeric literal…
23:44 ZoffixGameBox An empty operator? How?
23:45 AlexDaniel ZoffixGameBox: no idea, but I'm just thinking that lookahead can probably do it, maybe
23:45 ZoffixGameBox Oh, in a slang.
23:45 AlexDaniel ZoffixGameBox: it sounds a bit better than trying to reconstruct the number
23:46 * ZoffixGameBox 's head hurts from coding for the last 12 hours :) Time for chicken wings and playing Warframe :)
23:46 ZoffixGameBox \o 'night
23:46 Skarsnik psch, can't find it ~~
23:47 AlexDaniel grondilu: have you found any solution?
23:47 AlexDaniel grondilu: I've tried different things but no luck
23:52 psch AlexDaniel: LTM forbids operators that define themselves via lookahead
23:52 psch (at least if i understand LTM correctly...)
23:53 AlexDaniel psch: but there would be no alternative
23:53 psch AlexDaniel: of there's an alternative.  just match the superscripts, figure out what numeric value they stand for, construct that value as an Int, call postfix:<**> with that number as 2nd arg
23:54 AlexDaniel psch: no, I mean LTM thing
23:54 AlexDaniel (at least if I understand LTM at least partially…)
23:54 psch ...no alternative to LTM?
23:55 AlexDaniel psch: well, LTM is about matching the longest alternative, right?
23:55 psch the longest token, yes
23:55 AlexDaniel psch: well, if we are in front of ²³ then there would be nothing else to match besides this lookahead thing
23:56 psch but LTM doesn't lookahead
23:56 AlexDaniel ah
23:56 psch i mean, i think i get what you're saying
23:56 psch but LTM brings that for free
23:56 psch you don't need the lookahead
23:57 psch $x is matches as variable, next it finds a superscript and there's only one token to match those
23:57 psch so it matches them with that token
23:57 psch s/is matches/is matched/
23:58 AlexDaniel psch: alright. Well, I was thinking that maybe there's a way to shove an operator in between, it would have made a couple of things easier, perhaps.
23:58 n0tjack joined #perl6
23:59 psch well, functionally i'd expect the superscript to parse equivalent to a postfix
23:59 psch ...which is where jnthn++ put them too

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

Perl 6 | Reference Documentation | Rakudo