Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-04-16

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:17 klapperl joined #perl6
00:30 colomon joined #perl6
00:43 kurahaupo joined #perl6
00:51 BenGoldberg joined #perl6
01:04 jnap joined #perl6
01:13 klapperl_ joined #perl6
01:21 dayangkun joined #perl6
01:37 FROGGS_ joined #perl6
01:38 dalek roast: 637d31a | Mouq++ | S03-metaops/cross.t:
01:38 dalek roast: Label test as corresponding to RT #77660
01:38 dalek roast: review: https://github.com/perl6/roast/commit/637d31ab17
01:38 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=77660
01:40 thou joined #perl6
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:51 Bryanstein joined #perl6
01:51 Bryanstein joined #perl6
01:51 bluescreen10 joined #perl6
01:55 dalek mu: 567cca0 | Mouq++ | docs/Perl6/Cheatsheet/cheatsheet. (2 files):
01:55 dalek mu: Update collection types
01:55 dalek mu: review: https://github.com/perl6/mu/commit/567cca0a32
01:59 hoverboard joined #perl6
02:08 effbiai joined #perl6
02:13 effbiai joined #perl6
02:24 dalek specs: e7c777d | (David Warring david.warring@gmail.com)++ | S05-regex.pod:
02:24 dalek specs: grammar inheritance typo
02:24 dalek specs: review: https://github.com/perl6/specs/commit/e7c777d22b
02:26 donaldh joined #perl6
02:33 dalek roast: a98a8e0 | (David Warring david.warring@gmail.com)++ | integration/advent2012-day09.t:
02:33 dalek roast: adding advent 2012 day 09
02:33 dalek roast: review: https://github.com/perl6/roast/commit/a98a8e00bb
02:33 xragnar_ joined #perl6
02:50 dragon_d joined #perl6
02:58 dalek nqp: 74875ba | (Andrew Egeler)++ | src/HLL/Compiler.nqp:
02:58 dalek nqp: Add support for REPL multiline input
02:58 dalek nqp:
02:58 dalek nqp: When an input line ends with '\', wait for more code before executing.
02:58 dalek nqp: review: https://github.com/perl6/nqp/commit/74875ba93c
03:28 lue Huh, running syngen is suddenly much faster at backlink generation and synopses retrieval than the last time I ran it. Who knows what did it :) . (my rakudo and nqp are still from 12 April, with the absolute latest MVM)
03:55 plobsing joined #perl6
04:10 anaeem1 joined #perl6
04:13 xenoterracide joined #perl6
04:14 xenoterracide_ joined #perl6
04:28 Khisanth joined #perl6
04:32 SamuraiJack__ joined #perl6
04:34 [Coke] MuEvent fails to build on r0m
04:34 [Coke] rakudo-moar
04:34 [Coke] Error while compiling op p6box_n: To compile on the MoarVM backend, QAST::VM must have an alternative 'moar' or 'moarop'
04:37 Khisanth joined #perl6
04:44 klapperl joined #perl6
04:47 havenwood joined #perl6
04:51 jnap joined #perl6
04:54 klapperl_ joined #perl6
05:03 stevan__ joined #perl6
05:15 kaleem joined #perl6
05:16 bjz joined #perl6
05:24 denis_boyun_ joined #perl6
05:29 FROGGS_ [Coke]: is there pir code somewhere?
05:34 denis_boyun_ joined #perl6
05:41 denis_boyun___ joined #perl6
05:52 jnap joined #perl6
06:02 kaare__ joined #perl6
06:09 havenwood joined #perl6
06:11 havenn joined #perl6
06:16 havenwood joined #perl6
06:24 salv0 joined #perl6
06:29 hummeleB1 joined #perl6
06:37 nhayashi joined #perl6
06:39 avuserow joined #perl6
06:44 nebuchadnezzar joined #perl6
06:46 havenwood joined #perl6
06:47 darutoko joined #perl6
06:47 moritz good morning
06:49 jnthn lue: Nice that syngen is faster from the recent performance work too. :)
06:49 jnthn morning, all
06:52 jnap joined #perl6
06:56 * moritz tests donaldh++'s rakudo-j patches
06:58 FROGGS joined #perl6
06:59 zakharyas joined #perl6
07:04 kaleem joined #perl6
07:19 dalek rakudo/nom: 626fd39 | (Donald Hunter)++ | tools/build/Makefile-JVM.in:
07:19 dalek rakudo/nom: On JVM, CORE.setting now compiles comfortably in 800m heap.
07:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/626fd391b8
07:19 dalek rakudo/nom: 9b9ca14 | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
07:19 dalek rakudo/nom: Suppress unused warnings for constants. Remove unused local.
07:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9b9ca140c0
07:32 havenwood joined #perl6
07:38 kivutar joined #perl6
07:41 IllvilJa left #perl6
07:47 SamuraiJack__ joined #perl6
07:53 fhelmberger joined #perl6
07:53 jnap joined #perl6
07:54 dmol joined #perl6
08:01 moritz t/spec/S02-types/sethash.rakudo.jvm                        (Wstat: 0 Tests: 191 Failed: 2) Failed tests:  186-187
08:01 moritz lizmat: ^^ is that your doing?
08:25 dakkar joined #perl6
08:30 moritz and on moar, I get
08:30 moritz t/spec/S02-types/mix.rakudo.moar                            (Wstat: 0 Tests: 169 Failed: 1) Failed test:  124
08:33 FROGGS joined #perl6
08:35 denis_boyun joined #perl6
08:37 kivutar joined #perl6
08:47 thou joined #perl6
08:54 jnap joined #perl6
09:09 bjz joined #perl6
09:09 timotimo o/
09:09 lizmat moritz, timotimo o/
09:10 lizmat moritz: checking
09:11 pecastro joined #perl6
09:13 lizmat moritz: re t/spec/S02-types/mix, not seeing any test failerues myself :-(
09:13 lizmat nor on t/spec/S02-types/sethash  :-(
09:14 lizmat however, the t/spec/S02-types/sethash failing tests relate to minpairs/maxpairs
09:15 lizmat the t/spec/S02-types.mix fail is related to .roll(*), and I didn't change anything there
09:15 lizmat firing up a jvm build
09:16 jnthn Is .WHICH involved in these in some way?
09:18 lizmat checking
09:20 lizmat nope, unless role composition is...  minpairs/maxpairs live in the QuantHash role
09:20 jnthn We may be vulnerable to .WHICH for things changing over time, is all.
09:20 jnthn For reference types, I mean.
09:21 sergot hi o/
09:21 jnthn o/ sergot
09:21 jnthn sergot: Polish Perl Workshop is not far away! \o/ :)
09:22 jnthn lizmat: On JVM and Moar, .WHICH is based on the address of the object (on JVM because we use .hashCode(), which in turn is typically based on it for JVM). And unlike on Parrot, both Moar and JVM's GCs will move objects over their lifetime.
09:23 lizmat so a .WHICH of an object can change ?
09:23 jnthn yes
09:23 lizmat that feels...  eh...  action at a distance ?
09:24 lizmat which also means you cannot use .WHICH as a key in a hash to identify an object?
09:24 lizmat which basically means that typed hashes are not reliable ?
09:24 lizmat or sets for that matter ?
09:24 lizmat or bags / mixes ?
09:24 moritz then .WHICH shouldn't be based on memory address on moar/jvm
09:25 jnthn lizmat, moritz: Java manages to have object hashes, despite its hashCode() having this property.
09:26 sergot jnthn: that's right! I can't wait. :)
09:26 lizmat maybe .WHICH should be based on mem addr of creation + creation time ?
09:26 jnthn lizmat: Well, here's the problem: you need a way to do this without making every object bigger to store taht.
09:27 jnthn The CLR has a way. We too can manage one, but it's going to be non-trivial. It involves weak references and similar.
09:27 jnthn need to take @student for lunch, bbiab
09:27 moritz Java's hashCode changes over time?
09:27 moritz urks
09:27 jnthn moritz: yes
09:27 jnthn http://stackoverflow.com/questions/4178997/how-default-equals-and-hashcode-will-work-for-my-classes
09:27 jnthn bbiab
09:30 lizmat S02:633: "Every object can produce a "WHICH" value that uniquely identifies the object for hashing and other value-based comparisons"
09:30 synopsebot Link: http://perlcabal.org/syn/S02.html#line_633
09:30 lizmat I read this as .WHICH to be immutable for an object
09:31 lizmat and since everything in Perl 6 is an object...
09:31 timotimo the RAM is an object
09:32 Ven joined #perl6
09:32 lizmat moritz: can reproduce the sethash fail on JVM
09:35 woolfy left #perl6
09:36 lizmat indeed, there was a .sort missing
09:36 lizmat moritz++
09:37 dalek roast: baace2c | (Elizabeth Mattijsen)++ | S02-types/sethash.t:
09:37 dalek roast: We can't rely on order in which pairs are returned
09:37 dalek roast: review: https://github.com/perl6/roast/commit/baace2c54e
09:38 woolfy joined #perl6
09:38 timotimo my blog's already had more views this week than it had last week; probably thanks to 6guts mentioning me
09:38 timotimo thanks jnthn :)
09:41 vky joined #perl6
09:42 Ven o/, #perl6
09:42 timotimo neV \o
09:43 Ven I think there was the debian perl6 guy here, yesterday or so ?
09:43 Ven (wrt to the segfault I had, doing `aptitude install perl6 && perl6`)
09:44 zakharyas joined #perl6
09:52 anaeem___ joined #perl6
09:55 jnap joined #perl6
09:56 havenwood joined #perl6
10:07 Sqirrel joined #perl6
10:11 dalek rakudo/nom: 3648d3d | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
10:11 dalek rakudo/nom: Provisionally add "is cas" trait to $@%
10:11 dalek rakudo/nom:
10:11 dalek rakudo/nom: Just so I can mark the variables in tests that need to be marked this way.
10:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3648d3d63e
10:12 FROGGS joined #perl6
10:12 colomon is cas?
10:13 tadzik compare and swap?
10:13 timotimo yeah
10:14 timotimo assignments to these variables should be attempted atomically
10:14 timotimo however that'll be possible
10:14 lizmat S17:854
10:14 synopsebot Link: http://perlcabal.org/syn/S17.html#line_854
10:14 lizmat it's Perl6's equivalent to ":shared" from Perl5's ithreads
10:15 colomon ah
10:16 lizmat one could argue that we don't need this if we have sufficient other primitives for queuing up reads/writes
10:17 colomon lizmat++ timotimo++ tadzik++
10:17 lizmat to variables from different threads
10:17 timotimo much like the parrot threading model? ;)
10:17 tadzik :D
10:17 lizmat it's just that I realised some of the S17 tests assume "is cas" in some cases
10:17 lizmat so I would like to mark them as sich
10:18 lizmat *such
10:21 jnthn How many more times do I have to say it's operations that want to be transactional... :/
10:22 jnthn An "is monitor" or "is actor" could *maybe* make sense
10:23 jnthn "is cas" really, really does not.
10:23 jnthn (where "is monitor" means "implicitly hold a lock during the method call"
10:23 jnthn )
10:23 lizmat okok
10:24 lizmat it's just that I specced it last November, and nobody complained  :-)
10:25 jnthn I'll try and remember to complain more :P
10:26 dalek rakudo/nom: f1f30d2 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
10:26 dalek rakudo/nom: Revert "Provisionally add "is cas" trait to $@%"
10:26 dalek rakudo/nom:
10:26 dalek rakudo/nom: This reverts commit 3648d3d63e8e8d071c131517da4572c21c27f7da.
10:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f1f30d2234
10:26 jnthn I think any of these we spec really, really need to have a strong description of their semantics.
10:27 dalek specs: c71f130 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
10:27 dalek specs: "is cas" is no more
10:27 dalek specs: review: https://github.com/perl6/specs/commit/c71f13031c
10:29 lizmat the only thing I'm still worried about is naive programmers with a threads background
10:30 lizmat writing wrong programs that will be unreliable in the Perl 5.005 threads way
10:30 timotimo https://www.youtube.com/watch?v=KhbUvoxjxIg - this will be a tricky game
10:30 lizmat as in random strange effects / segfaults, etc
10:30 rindolf joined #perl6
10:30 lizmat we *need* a solution for that, otherwise Perl 6 concurrency will get a bad name
10:30 jnthn lizmat: I don't think you get to be naive and have a threads background :P
10:30 lizmat even if it doesn't deserve that
10:31 timotimo heh heh.
10:31 moritz with MoarVM, I now have a lock in t/spec/S17-concurrency/promise.rakudo.moar
10:31 moritz worked on the first spectest run though
10:31 jnthn need to teach, bbl
10:31 lizmat well, you'd be surprised the questions I got when I was still maintaining forks.pm
10:31 jnthn Maybe I'll do a blog post on this stuff on the train home tonight... I promised lizmat++ one ages ago...
10:31 lizmat hehe  :-)
10:32 lizmat moritz: it should be busy for ~ 10 seconds (sleep sort test)
10:32 Ven 5.14 should be enough to build rakudo, right ?
10:33 lizmat plenty, I would think
10:33 moritz lizmat: I killed it after it consume >1h CPU time
10:33 * Ven can't get rakudo to build under debian, but has no idea why
10:33 lizmat ah, not good
10:34 lizmat moritz: any idea at which test it hangs?
10:35 Ven "set_pmc_keyed_str() not implemented in class 'ResizablePMCArray' current instr.: 'main' pc 15 (frontend/parrot2/build.pir:12) make: *** [frontend/parrot2/prt0.pbc.c] Error 1"
10:35 Ven Command failed (status 512): make install-dev :(
10:35 thou joined #perl6
10:35 Ven (following the steps in http://rakudo.org/how-to-get-rakudo/)
10:36 lizmat hmmm... is there a reason you want to run rakudo with parrot?  why not MoarVM ?
10:37 Ven I just tried to generate every backend. I got a similar, though different error with moar
10:37 moritz Ven: looks like a parrot bug to me :(
10:37 Ven I got a missing .so error later
10:37 lizmat fwiw, it feels like a rakudo / parrot version mismatch, but I'm no expert on that
10:37 moritz that's weird, moarvm works fine for me on debian
10:39 Ven actually, `aptitude install perl6` from the VM makes it work in the supervisor, but it segfaults instantly on the vms ...
10:40 Ven m: multi sub MAIN(Str $foo, Str :$add = 'default', Bool :$force) {}; multi sub MAIN() {} # usage ?
10:40 camelia rakudo-moar 9b9ca1: ( no output )
10:40 FROGGS Ven: that ResizablePMCArray error sounds like you either built a newer Parrot then 6.1.0, or you have an older parrot in PATH
10:41 FROGGS m: multi sub MAIN(Str $foo, Str :$add = 'default', Bool :$force) {}; multi sub MAIN($bar) {} # usage ?
10:41 camelia rakudo-moar 9b9ca1: OUTPUT«Usage:␤  /tmp/5xnvafQOyL [--add=<Str>] [--force] <foo> ␤  /tmp/5xnvafQOyL <bar> ␤»
10:41 Ven I used the other one
10:41 FROGGS the other one?
10:41 FROGGS of what?
10:41 Ven I mean. I only used the snippet from the blog -- it should take the correct parrot version. No other parrot in my path.
10:41 Ven Seems like Moar built, though
10:42 FROGGS m: multi sub MAIN(Str $foo, Str :$add! = 'default', Bool :$force) {}; multi sub MAIN($bar) {} # usage ?
10:42 camelia rakudo-moar 9b9ca1: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/s6dwfZGvhX�Cannot put default on required parameter $add�at /tmp/s6dwfZGvhX:1�------> [32mub MAIN(Str $foo, Str :$add! = 'default'[33m�[31m, Bool :$force) {}; multi sub MAIN($bar)[0m� …»
10:42 FROGGS ahh
10:42 FROGGS m: multi sub MAIN(Str $foo, Str :$add!, Bool :$force) {}; multi sub MAIN($bar) {} # usage ?
10:42 camelia rakudo-moar 9b9ca1: OUTPUT«Usage:␤  /tmp/S4Nu35i3JK --add=<Str> [--force] <foo> ␤  /tmp/S4Nu35i3JK <bar> ␤»
10:42 FROGGS Ven: do you have another parrot in PATH?
10:42 Ven no, I don't
10:43 Ven m: sub MAIN($foo, $bar) {}
10:43 camelia rakudo-moar 9b9ca1: OUTPUT«Usage:␤  /tmp/IMrvlEzURx <foo> <bar> ␤»
10:43 Ven `make install`ing moar ...
10:44 FROGGS m: my $*PROGRAM_NAME = 'camelia.pl'; multi sub MAIN(Str $foo, Str :$add = 'default', Bool :$force) {}; multi sub MAIN($bar) {} # <-- a bit nicer output here
10:44 camelia rakudo-moar 9b9ca1: OUTPUT«Usage:␤  camelia.pl [--add=<Str>] [--force] <foo> ␤  camelia.pl <bar> ␤»
10:45 FROGGS that .so error would be interesting to know more abot
10:45 FROGGS about*
10:46 Ven Seems like it's working now. Uh.
10:46 FROGGS hmmm
10:46 FROGGS weird
10:52 lizmat m: sub a ($a,&c) { $_ := $a; c }; my $b=1; a($b,{.say; $_++}); say $b  # hoping for 1,2
10:52 camelia rakudo-moar 9b9ca1: OUTPUT«Nil␤1␤»
10:52 lizmat so what is the canonical way to set $_ for a given block to be an alias to something outside ?
10:55 lizmat Ah!  S06:1971
10:55 synopsebot Link: http://perlcabal.org/syn/S06.html#line_1971
10:55 lizmat m: sub a ($a is rw,&c) { c($a) }; my $b=1; a($b,{.say; $_++}); say $b
10:55 camelia rakudo-moar 9b9ca1: OUTPUT«1␤2␤»
10:55 jnap joined #perl6
10:57 lizmat sub a (\a,&c) { c(a) }; my $b=1; a($b,{.say; $_++}); say $b  # better, as it allows @ and % as well :-)
10:57 lizmat m: sub a (\a,&c) { c(a) }; my $b=1; a($b,{.say; $_++}); say $b
10:57 camelia rakudo-moar 9b9ca1: OUTPUT«1␤2␤»
10:59 timotimo m: my $foo is parcel;
10:59 camelia rakudo-moar 9b9ca1: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VbyOAISviXâ�¤Can't use unknown trait 'is parcel' in a variable declaration.â�¤at /tmp/VbyOAISviX:1â�¤------> [32mmy $foo is parcel[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        TypeObjectâ�¤ …»
10:59 timotimo we may want to change S06:1971 to say "is rw" instead?
10:59 synopsebot Link: http://perlcabal.org/syn/S06.html#line_1971
11:00 timotimo or is "is parcel" yet to be implemented on rakudo?
11:00 lizmat it is atm an alias for "is rw"
11:00 lizmat there was a subtle difference between "is rw" and "is parcel", which I currently cannot remember :-(
11:02 timotimo OK
11:03 timotimo m: sub foo { say self }; 1.&foo;
11:03 camelia rakudo-moar 9b9ca1: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DrdqYv5tnnâ�¤'self' used where no object is availableâ�¤at /tmp/DrdqYv5tnn:1â�¤------> [32msub foo { say [33mâ��[31mself }; 1.&foo;[0mâ�¤    expecting any of:â�¤        argument listâ�¤        p…»
11:03 timotimo mhm mhm
11:06 havenwood joined #perl6
11:07 lizmat afk for a few hours&
11:09 JimmyZ How did I see it as 'new house'?
11:10 kivutar joined #perl6
11:15 Woodi hallo :)
11:17 klapperl joined #perl6
11:17 Woodi but if Perl is dead but apparently is still moving so it must be a zombie or vampire and they are hard to kill...
11:21 Woodi but about concurent debugging: maybe something like "bash -x" which echo every command before execution but per thread/thunk. threads could write to stddebug file descriptor or have one fd per active thread ?
11:46 Woodi also: apps eg. db's usually have configs to change number of used threads but hypers and for @a { start(...) } are under-language surface, apps can't change anything. and if app looks like: hyper --> hyper --> hyper --> ... then some parts can be starved or work can be arranged not optimal. maybe each such paraller block could have name and admin could configure how many threads need to be used per named block ? such config isn't just standard app config
11:48 timotimo you can set $*SCHEDULER
11:49 kurahaupo joined #perl6
11:49 jnthn And, generally, modern scheduler designs can normally do better than a human's guesswork.
11:50 jnthn By adapting number of threads not only to the available hardware, but also to the system's current load.
11:51 jnthn The Rakudo built-in one doesn't do so yet.
11:51 jnthn But there's no reason it can't learn to.
11:51 jnthn But yeah, if you must, set $*SCHEDULER.
11:52 jnthn Note that start is also sugar for Promise.start(...), which can take a per-promise level scheduler, so you can get fine-grained control if needed.
11:53 timotimo looking for a good short snippet of code i could explain on video
11:53 timotimo i could start with the super-compact pascal's triangle from RC
11:54 jnthn say "Hello, world!";
11:54 timotimo not much to explain there, except if i go crazy into depth :P
11:55 jnthn sub mean(*@a) { [+
11:55 jnthn oops
11:55 jnthn sub mean(*@a) { [+
11:55 jnthn arse, this keyboard
11:55 timotimo heh heh :)
11:55 jnthn sub mean(*@a) { [+](@a) / @a }
11:56 jnap joined #perl6
11:57 jnthn timotimo: Maybe some simple class example also is nice
11:57 timotimo raiph suggested to keep it below 100 chars so it'll fit twitter with url and hashtags
11:58 jnthn class Log { has @.msgs handles :log<push>; } # :P
11:59 timotimo that's already cute :)
12:00 Ven some p6weekly code
12:03 Ven I mean -- p6advent :-+
12:07 havenwood joined #perl6
12:07 Woodi jnthn: ok. I was just guessing from apps I know, not quite modern
12:09 Woodi timotimo: looks I must 3rd+ read about SCHEDULERs :)
12:11 timotimo hmm. obs-studio will not be the way to record my screen on my laptop, as it requires an opengl extension i don't have there yet
12:12 jnthn <jnthn> OK, time to go and get cake! <group> * keeps programming
12:12 jnthn geez, cake folks :)
12:13 timotimo :D
12:13 tadzik :D
12:13 jnthn At least the exercise I set must be some amount of fun :)
12:15 jnthn timotimo: Dunno if you are running in a VM, but I noticed virtualbox provides some kind of screen recording feature.
12:15 timotimo oh
12:15 timotimo that could be helpful
12:15 timotimo i'd like to have a somewhat sterile environment to record in rather than my cluttered desktop and such :)
12:15 jnthn Didn't try it, just noticed it while trying to make opengel happy in my linux mint vm the other day...
12:16 Ven .oO(is opengel cold to you ?)
12:16 jnthn uh, opengl :P
12:16 jnthn .oO( I'm so open source, I shower with opengel... )
12:20 FROGGS >.<
12:21 retupmoca I'm not sure if we want this in CORE.setting, or if it should be a module, but: https://github.com/rakudo/rakudo/pull/261
12:21 retupmoca (exposes the REPL readline library to perl6 code)
12:23 thou joined #perl6
12:24 timotimo oh yay
12:31 * colomon would totally accept that pull request, except he's not sure about the name...
12:32 FROGGS yeah
12:33 retupmoca what name should it have?
12:33 colomon I dunno
12:34 retupmoca I was thinking readline-interactive or something maybe, but I hav no experience naming things on the setting level
12:34 retupmoca s/hav /have /
12:36 colomon consider the IO::Prompter module (https://github.com/colomon/io-prompter)
12:36 colomon AFK # exercise, yay!
12:41 Ven r: role IntConversionHelper { method Num { self.Numeric }; method Numeric { self.Num }; method Int { self.Num.Int }; method Integral { self.Int }; }; class Foo does IntConversionHelper { has Int $.val; method Num { +$.val; } }; say Foo.new(:5val).Integral;
12:41 * Ven is trying to define Num and such in terms of others
12:41 camelia rakudo-jvm f1f30d: OUTPUT«(timeout)»
12:41 camelia ..rakudo-parrot f1f30d, rakudo-moar f1f30d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Malformed radix numberâ�¤at /tmp/tmpfile:1â�¤------> [32mmethod Num { +$.val; } }; say Foo.new(:5[33mâ��[31mval).Integral;[0mâ�¤    expecting any of:â�¤        nu…»
12:41 Ven m: role IntConversionHelper { method Num { self.Numeric }; method Numeric { self.Num }; method Int { self.Num.Int }; method Integral { self.Int }; }; class Foo does IntConversionHelper { has Int $.val; method Num { +$.val; } }; say Foo.new(:val(5)).Integral;
12:41 camelia rakudo-moar f1f30d: OUTPUT«5␤»
12:42 Ven this looks better to me than defining each operator
12:42 * Ven could very well make this a module
12:42 moritz Ven: this is #perl6, not #java :-)
12:42 Ven moritz: https://github.com/colomon/io-prompter/blob/master/lib/IO/Prompter.pm#L12
12:43 xenoterracide_ joined #perl6
12:47 jnap joined #perl6
12:48 hoverboard joined #perl6
12:52 Ven timotimo: actually, I remember asking a similar question few days/weeks ago, "what is the rosettacode example you'd use to demonstrate p6's power to somebody
12:53 timotimo did you get good results? :)
12:54 Ven I'm trying to find what TimToady++ answered me
12:54 Ven timotimo: http://rosettacode.org/wiki/Function_composition#Perl_6
12:55 Ven maybe http://rosettacode.org/wiki/Odd_word_problem#Perl_6
12:55 guru joined #perl6
12:58 meowmixdeath joined #perl6
12:59 meowmixdeath ki
13:00 Ven r: foo(*%a) { say %a.perl }; foo(:a(True), :!b);
13:00 camelia rakudo-parrot f1f30d, rakudo-jvm f1f30d, rakudo-moar f1f30d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)�at /tmp/tmpfile:1�------> [32mfoo(*%a) [33m…»
13:00 timotimo virtualbox seems to have a problem with my graphics or something
13:01 Ven m: sub foo(*%a) { say %a.perl }; foo(:a(True), :!b) # I should know better by now ...
13:01 camelia rakudo-moar f1f30d: OUTPUT«("a" => Bool::True, "b" => Bool::False).hash␤»
13:01 Ven m: sub foo(*%a) { say %a.perl }; foo(:a(True), :b!) # I should know better by now ...
13:01 camelia rakudo-moar f1f30d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oTnPfjs8qtâ�¤Negation metaoperator not followed by valid infixâ�¤at /tmp/oTnPfjs8qt:1â�¤------> [32m(*%a) { say %a.perl }; foo(:a(True), :b![33mâ��[31m) # I should know better by now ...[0mâ�¤  â€¦Â»
13:01 Ven m: sub foo(*%a) { say %a.perl }; foo(:a(True), :b)
13:01 camelia rakudo-moar f1f30d: OUTPUT«("b" => Bool::True, "a" => Bool::True).hash␤»
13:01 FROGGS timotimo: in what way?
13:01 timotimo black screen after login
13:01 * Ven sent timotimo a few examples
13:01 guru joined #perl6
13:02 Ven btw, it seems that `open :rw` is NYI ?
13:03 timotimo oh?
13:03 Ven I tried to use it doing a p6demo but it blew up :p
13:03 timotimo huh.
13:04 FROGGS this could be right, and it will be refactored anyway
13:04 FROGGS or... maybe I am thinking of open :rwp
13:05 Ven Cannot call 'open'; none of these signatures match: :(Any $path, Any :r($r), Any :w($w), Any :a($a), Any :p($p), Any :bin($bin), Any :chomp($chomp) = { ... }, Any :enc(:encoding($encoding)) = { ... })   in block  at <unknown file>:1
13:06 FROGGS ahh
13:06 FROGGS , and open( ..., :r, :w ) ?
13:06 Ven works :)
13:06 FROGGS k
13:06 FROGGS is :rw mentioned in the spec?
13:06 Ven I'm not even sure :rw is needed ...
13:07 Ven Yep. https://github.com/perl6/specs/blob/master/S32-setting-library/IO.pod
13:07 Ven FROGGS: do you think it's necessary ?
13:07 FROGGS hmmm, maybe we should add :rw because it is used often enough?
13:08 FROGGS kinda
13:08 Ven `:rw` vs `:r, :w`, really ?
13:08 havenwood joined #perl6
13:08 Ven That's like, 2 chars different :p
13:08 AW3i joined #perl6
13:10 FROGGS well, it is specced for some reason... and it is easy to implement and might be handy
13:11 Ven $r = $w = True if $rw;
13:12 Ven though if you want to do that properly, you'll probably want to check if the user provided another `:r` or `:w` with it, at which point ...
13:15 Ven FROGGS: the "easy" way : https://github.com/rakudo/rakudo/pull/262
13:18 havenwood joined #perl6
13:20 dalek rakudo/nom: e572536 | Nami-Doc++ | src/core/IO.pm:
13:20 dalek rakudo/nom: Implement IO.read :rw as specced
13:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e5725364c4
13:20 dalek rakudo/nom: 0c11bcb | (Tobias Leich)++ | src/core/IO.pm:
13:20 dalek rakudo/nom: Merge pull request #262 from Nami-Doc/patch-2
13:20 dalek rakudo/nom:
13:20 dalek rakudo/nom: Implement IO.read :rw as specced
13:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c11bcb3fa
13:22 kbaker_ joined #perl6
13:25 Ven Definitely true that having p6 written in p6 makes it easier for "outsiders" to contribute
13:25 moritz eeks, that's only for the method, the sub form should get :rw as well
13:25 daniel-s_ joined #perl6
13:27 Ven whoopsie - thought this was an `is export`
13:27 FROGGS still a method
13:27 moritz we don't do 'is export' on methods in the setting
13:27 Ven moritz: should I change it in other places ?
13:27 FROGGS (but I havn't seen it anyway)
13:27 dragon_d joined #perl6
13:28 moritz Ven: not that I'm aware of
13:28 FROGGS Ven: you need to adjust this: rakudo/src/core/IO.pm:608:multi sub open($path, :$r, :$w, :$a, :$p, :$bin, :$chomp = Bool::True, :enc(:$encoding) = 'utf8') {
13:29 Ven yeah I know :) I had the commit window opened already
13:29 FROGGS :o)
13:29 Ven just wanted to make sure I wasnt missing yet another one ...
13:29 FROGGS but yeah, having the compiler in nqp/perl6 is a big plus... I am not that good at writing Haskell
13:30 Ven moritz: #263 :)
13:31 dalek rakudo/nom: 22db812 | Nami-Doc++ | src/core/IO.pm:
13:31 dalek rakudo/nom: #262 fixup - Add :$rw to `open` sub
13:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/22db8122fa
13:31 dalek rakudo/nom: 8bac4dd | (Tobias Leich)++ | src/core/IO.pm:
13:31 dalek rakudo/nom: Merge pull request #263 from Nami-Doc/patch-3
13:31 dalek rakudo/nom:
13:31 dalek rakudo/nom: #262 fixup - Add :$rw to `open` sub
13:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8bac4ddc2d
13:31 moritz FROGGS++ Ven++
13:31 Ven moritz++
13:32 FROGGS Ven++
13:32 FROGGS (enough now!!)
13:32 FROGGS :P
13:32 Ven FROGGS++ :)
13:33 FROGGS gah!
13:34 pecastro joined #perl6
13:34 jnthn The karma ran over the dogma? :)
13:34 moritz and the dog barked "ma"
13:35 [Coke] there's a "your mom" joke in there somewhere.
13:35 jnthn There's a joke somewhere in your mom...
13:35 * jnthn goes to do the final bit of teaching for the week :)
13:36 * Ven didn't get the dogma part
13:37 FROGGS jnthn: I hope that I am productive on the easter holidays... (fri-mon)
13:37 FROGGS I have to kick myself somehow to grok CPAN
13:38 Timbus erm, is it possible to assign to $r and $w if they are params?
13:39 FROGGS ohh
13:40 FROGGS good that PR's are kinda cheap :o)
13:40 [Coke] oh, there is PIR code in MuEvent...
13:40 [Coke] sub clock { nqp::p6box_n(pir::time__N)
13:40 [Coke] }
13:40 tadzik ah :)
13:40 tadzik that explains it
13:40 FROGGS [Coke]: yes, the message you got is a very good indicator about PIR
13:41 tadzik now there's an nqp thing that's even easier to type :)
13:41 moritz nqp::time_n
13:41 [Coke] do you need a PR?
13:41 FROGGS nothing else triggers it from user code
13:41 Ven Timbus: wat?
13:41 tadzik though I should actually rewrite MuEvent into something that uses our asyncy-concurency-y thingys
13:41 FROGGS Ven: $r and $w need "is copy"
13:41 Ven r: sub fu-()
13:41 camelia rakudo-parrot f1f30d, rakudo-jvm f1f30d, rakudo-moar f1f30d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Missing blockâ�¤at /tmp/tmpfile:1â�¤------> [32msub fu[33mâ��[31m-()[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or te…»
13:41 Ven I'll just stop touching stuff
13:42 FROGGS m: sub foo(:$r, :$w) { $r = $w = True }; foo()
13:42 camelia rakudo-moar f1f30d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub foo at /tmp/9dIDx4xZgZ:1␤  in block  at /tmp/9dIDx4xZgZ:1␤␤»
13:42 Timbus no. press more buttons
13:42 Ven yeah yeah, I got it, I'm just fu-'ing
13:43 dmol joined #perl6
13:43 Ven Timbus: That doesn't seem to help !
13:44 FROGGS m: sub foo(:$r is copy, :$w is copy) { $r = $w = True }; foo()
13:44 camelia rakudo-moar f1f30d: ( no output )
13:44 Timbus lol
13:44 moritz :r($r || $rw), :w($w || $rw)
13:45 Timbus i was thinking something along those lines moritz
13:45 cognominal Is there a double quoted string adverb to allow stray spaces in a string? Let's call it :u for unspace.  qq :u  ":  {self.named} < $!value  >"  would mean  ":{self.named}<$!value>|
13:45 Ven m: sub open(:$rw, :r($r || $rw), :w($w || $rw)) { say ($r, $w).perl }; open(:r); open(:rw); open(:rw, :!w);
13:45 camelia rakudo-moar f1f30d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rmhT0LYwBwâ�¤Unable to parse named parameter; couldnt find right parenthesisâ�¤at /tmp/rmhT0LYwBw:1â�¤------> [32msub open(:$rw, :r($r [33mâ��[31m|| $rw), :w($w || $rw)) { say ($r, $w).p[0mâ�¤  â€¦Â»
13:46 Timbus yet you also want them to be true if they arent defined.. hmm
13:46 cognominal This would permit to use double quotes where we generally use infix ~
13:46 Ven that's dealt with later in the code, though
13:46 moritz cognominal: I prefer join, personally
13:46 bluescreen10 joined #perl6
13:46 Timbus would be cooler if it was all in one!
13:47 moritz <<: {self.named} < $!value > >>.join
13:47 moritz ($r // True) || $rw
13:47 moritz .oO( rod logic! )
13:48 cognominal moriz, ho, I did not know the << .. >>     That's nice.
13:48 Ven moritz: you can't actually `sub foo(:r($r || 'a'))`, right ?
13:49 moritz Ven: no, you can sub foo(:$r) { bar( :r($r || 'a') } }
13:50 Ven moritz: ah, yeah, but that's not fixing the method
13:50 cognominal so, now, I can advocate my :u adverb only for the the sake of there should be one way to do it as a modifier of the first way one thin of. After all TMTOWTDI is not gratuitous.
13:52 cognominal Also it would be for free on nqp where the .join does not exists. I am writing that in nqp btw.
13:56 moritz nqp::join exists.
13:56 moritz (iirc nqp doesn't support quote adverbs anyway)
13:56 cognominal yes but that's get verbose.
13:56 moritz nqp is more verbose than p6. Live with it.
13:56 btyler joined #perl6
13:59 cognominal nope, my very point is to make less verbose to tend toward Perl 6 style. Eventally, Perl 6 has to be written in Perl 6 if we want people to write compilers for their own language.
14:00 cognominal * to make NQP less verbose
14:00 thou joined #perl6
14:01 cognominal I am working on write a slang to generate AST.
14:02 Teratogen what?
14:03 cognominal I am working on writing a slang to generate AST.
14:03 Teratogen I don't understand
14:03 Teratogen what is AST?
14:03 cognominal An early spec   https://gist.github.com/cognominal/10880617
14:03 PerlJam Teratogen: ast == abstract syntax tree
14:03 FROGGS abstract syntax tree
14:03 Teratogen ah, cool
14:04 tadzik maybe we should get S-last into a wtf-compatible database and teach synopsebot to use it :)
14:04 cognominal I am writing the dumper to see how it looks on a real AST.
14:04 PerlJam Teratogen: When people here say something weird that you don't understand, have a look at http://perlcabal.org/syn/S99.html to see if it's in the glossary  :)
14:05 Teratogen cool I will
14:06 cognominal in this doc, I use the present tense where it should be a future
14:08 daniel-s__ joined #perl6
14:09 treehug88 joined #perl6
14:13 atrodo joined #perl6
14:13 Ven m: sub foo($bar is rw) { $bar = True; }; sub baz($bar) { foo($bar) }; baz(my $a);
14:13 camelia rakudo-moar f1f30d: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub foo at /tmp/PItqck4GeJ:1␤  in sub baz at /tmp/PItqck4GeJ:1␤  in block  at /tmp/PItqck4GeJ:1␤␤»
14:15 Ven FROGGS: I'd rather have you fix this, because I'm 100% gonna miss something else and it's been enough PRs already
14:17 * PerlJam wonders what needs fixing?
14:18 Ven PerlJam: rakudo/rakudo#26{2,3}
14:25 dragon_d joined #perl6
14:26 donaldh joined #perl6
14:28 benabik joined #perl6
14:29 retupmoca (re: my readline patch) Should my new nqp::readlineintfh thing replace the existing prompt sub in CORE.setting?
14:29 retupmoca instead of being a new function?
14:37 hoverboard joined #perl6
14:40 retupmoca like so: https://github.com/rakudo/rakudo/pull/261/files
14:42 retupmoca colomon, FROGGS: ^
14:42 FROGGS retupmoca: the difference is that prompt returns when you hit enter and readlinethingy does not, right?
14:43 retupmoca readlinethingy should return when you hit enter, yes
14:43 retupmoca it just allows line editing, where prompt does not
14:43 colomon +1
14:44 FROGGS hmmm, then +1 to sell it as prompt
14:44 FROGGS (in case it also prints a text like prompt does)
14:44 retupmoca indeed it does
14:44 FROGGS (and also takes a default)
14:44 retupmoca current prompt has no default - the text is required
14:45 retupmoca unless I misunderstand?
14:45 * [Coke] gives tadzik a pull request.
14:45 [Coke] ... and another ticket.
14:45 FROGGS retupmoca: forget about the default, prompt has none
14:46 FROGGS would be nice if it has one though :o)
14:46 retupmoca FROGGS: what would you like the default to be? :)
14:46 colomon retupmoca: one issue: the old prompt worked with $*OUT and $*IN, while yours (I think) only works with stdout and stdin?
14:47 * FROGGS .oO( say prompt "Do you like coffee?", "Yes" ---> Do you like coffee? [Yes] _ )
14:47 kaleem joined #perl6
14:47 retupmoca true. nqp::readlineintfh doesn't give an option to change the output fh
14:47 retupmoca so idk if that's doable easily
14:49 Ven r: grammar G { proto token string {*}; token string:sym<"> { \" ~ \" [ <str> | \\ <str=.str_escape> ]* }; token string:sym<'> { \' ~ \' [ <str> | \\ <str=.str_escape> ]* } }; token TOP { <string> * } }; say G.parse('"foo"');
14:49 camelia rakudo-jvm 8bac4d: OUTPUT«(timeout)»
14:49 camelia ..rakudo-parrot 8bac4d, rakudo-moar 8bac4d: OUTPUT«Useless declaration of a has-scoped method in mainline (did you mean 'my token TOP'?)�[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unexpected closing bracket�at /tmp/tmpfile:1�------> [32mscape> ]* } }; t…»
14:49 retupmoca FROGGS: refresh the PR for default prompt message :)
14:49 Ven m: grammar G { proto token string {*}; token string:sym<"> { \" ~ \" [ <str> | \\ <str=.str_escape> ]* }; token string:sym<'> { \' ~ \' [ <str> | \\ <str=.str_escape> ]* }; token TOP { <string> * } }; say G.parse('"foo"');
14:49 camelia rakudo-moar 8bac4d: OUTPUT«No such method 'str' for invocant of type 'G'␤  in regex string:sym<"> at /tmp/0yezbRXF7G:1␤  in any !protoregex at gen/moar/stage2/QRegex.nqp:791␤  in regex string at /tmp/0yezbRXF7G:1␤  in regex TOP at /tmp/0yezbRXF7G:1␤  in method parse at src…»
14:49 colomon wonder if there's a way to check if $*IN and $*OUT are set to stdin / stdout and use your new code if they are3?
14:51 retupmoca I don't think I know nqp well enough to do that
14:51 retupmoca is there an easy way to convert $*IN and $*OUT to nqp filehandles to do a comparison?
14:51 FROGGS retupmoca: instead of nqp::getstdin you just pass $*IN
14:52 retupmoca FROGGS: $*IN doesn't work with nqp::eoffh
14:52 FROGGS does it work to print the $msg to $*OUT, and then prompt using an empty string as second arg?
14:52 FROGGS ohh
14:52 retupmoca and without nqp::eoffh, nqp/perl6 will segfault if you ^D
14:53 retupmoca FROGGS: also, my build of r-m acts slightly odd with a '' prompt (it seems to think the prompt is at least 1 character)
14:54 FROGGS hmmm
14:54 guru joined #perl6
14:54 retupmoca so if prompt needs to respect $*IN and $*OUT, I think we need a way to fall back to the old code
14:55 FROGGS I dunno how to do that...
14:58 retupmoca I *think* we can do it if we can get $!PIO out of $*IN/$*OUT
15:00 retupmoca so if we added a IO::Handle.nqpfh method or something?
15:00 jnthn No! Don't leak it.
15:00 jnthn You can check it's an IO::Handle, and nqp::getattr it out.
15:00 retupmoca ah, nqp::getattr sounds like what I needed to know
15:00 jnthn And then fall back to something else if it's not an IO::Handle
15:02 jnthn That said, you may need to go further and ensure that the handles are really stdin/stdout or so
15:02 jnthn I mean, it expects a tty I guess
15:02 jnthn s/expects/needs/
15:02 JimmyZ nqp::istty?
15:03 jnthn No, doubt we need to go that far...
15:03 FROGGS m: say nqp::getattr($*IN, IO::Handle, '$!PIO') # or so
15:03 camelia rakudo-moar 8bac4d: OUTPUT«P6opaque: no such attribute '$!PIO'␤  in block  at /tmp/jpK1dFr7SV:1␤␤»
15:03 FROGGS m: say nqp::getattr($*IN.IO, IO::Handle, '$!PIO') # or so
15:03 camelia rakudo-moar 8bac4d: OUTPUT«P6opaque: no such attribute '$!PIO'␤  in block  at /tmp/2LKjZAWWDH:1␤␤»
15:03 FROGGS hmm
15:03 jnthn nqp::decont the $*IN maybe
15:03 FROGGS m: say nqp::getattr(nqp::decont($*IN), IO::Handle, '$!PIO') # or so
15:03 camelia rakudo-moar 8bac4d: OUTPUT«P6opaque: no such attribute '$!PIO'␤  in block  at /tmp/38hg0Y7jPM:1␤␤»
15:04 treehug8_ joined #perl6
15:05 FROGGS m: say nqp::getattr($*ERR, IO::Handle, '$!PIO')
15:05 camelia rakudo-moar 8bac4d: OUTPUT«P6opaque: no such attribute '$!PIO'␤  in block  at /tmp/mYuX9q4xDQ:1␤␤»
15:05 FROGGS m: say nqp::getattr(nqp::decont($*ERR), IO::Handle, '$!PIO')
15:05 camelia rakudo-moar 8bac4d: OUTPUT«P6opaque: no such attribute '$!PIO'␤  in block  at /tmp/D3IdaSZmu2:1␤␤»
15:05 FROGGS damnit
15:05 jnthn r: say $*IN.WHAT
15:05 Ven Grammars are hard to evalbot
15:05 camelia rakudo-parrot 8bac4d, rakudo-jvm 8bac4d, rakudo-moar 8bac4d: OUTPUT«(IO::Handle)␤»
15:05 jnthn Ven: gist it and give evalbot the gist url
15:05 FROGGS $PROCESS::ERR = IO::Handle.new;
15:05 FROGGS nqp::bindattr(nqp::decont($PROCESS::ERR),
15:05 FROGGS IO::Handle, '$!PIO', nqp::getstderr());
15:06 FROGGS it looks like one could access it as we did
15:06 Ven jnthn: I actually have a perl6-m at hand right here ! Arguably better :-)
15:06 jnthn True ;)
15:06 jnthn Time to head to the station and get my train home
15:06 jnthn bbl
15:07 treehug88 joined #perl6
15:07 FROGGS o/
15:13 retupmoca I think I got it
15:13 retupmoca testing locally
15:13 FROGGS retupmoca++
15:16 retupmoca FROGGS, colomon, *: refresh the PR and see if that looks better
15:18 FROGGS I thought the plan would be to pass nqp::getattr(nqp::decont($*IN), IO::Handle, '$!PIO') to nqp::eoffh
15:18 retupmoca hmm
15:18 retupmoca the problem is that nqp::readlineintfh will still print to nqp::getstdout instead of $*OUT
15:19 retupmoca and on my machine, it doesn't really like empty string prompt
15:19 retupmoca (it doesn't break, it just behaves slightly oddly)
15:20 LLamaRider joined #perl6
15:22 dalek nqp: 6135feb | (Tobias Leich)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:22 dalek nqp: map nqp::seekfh op for moarvm
15:22 dalek nqp: review: https://github.com/perl6/nqp/commit/6135feb2e5
15:23 dalek rakudo/nom: fbf3873 | (Tobias Leich)++ | / (2 files):
15:23 dalek rakudo/nom: use nqp::seekfh on moar and $!PIO.seek on jvm/parrot
15:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fbf3873dcc
15:30 araujo joined #perl6
15:30 araujo joined #perl6
15:32 retupmoca FROGGS: would it make sense to make sure $*OUT is nqp::getstdout (since we can't change that), and then just use $*IN for the user input to readline?
15:33 FROGGS I dunno
15:33 FROGGS and my brain is not capable to think about it atm
15:33 retupmoca I shall await additional feedback from jnthn or someone else then :)
15:35 FROGGS yeah, in general, I am more on the side of implementing/fixing stuff, rather than deciding how it should act
15:42 * lizmat is back but has no feed(back)
15:43 vendethiel joined #perl6
15:46 * Ven doesnt like to see himself at home getting relogging like that oO
15:48 havenwood joined #perl6
15:51 lizmat Stage mast       : Error while compiling op seekfh: No registered operation handler for 'seekfh'
15:51 lizmat do we need a version bump somewhere?
15:52 retupmoca looks like we need a NQP_VERSION bump
15:52 * lizmat is building from scratch to make sure
15:52 retupmoca err, NQP_REVISION
15:56 lizmat hmmm.... nothing that a rebuild from scratch didn't fix
15:57 dalek rakudo/nom: 15c145b | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
15:57 dalek rakudo/nom: Naive implementation of cas()
15:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15c145bdeb
15:58 xfix joined #perl6
16:02 lizmat m: $_ ~ "foo"; .say   # there must be shorter way to append to $_, no?
16:02 camelia rakudo-moar 8bac4d: OUTPUT«WARNINGS:␤Useless use of "~" in expression "$_ ~ \"foo\"" in sink context (line 1)␤Nil␤»
16:02 lizmat m: $_ ~= "foo"; .say   # there must be shorter way to append to $_, no?
16:02 camelia rakudo-moar 8bac4d: OUTPUT«foo␤»
16:07 geekosaur mm, that's a too fiddly, right?
16:08 geekosaur m: .~=: "foo"; .say
16:08 camelia rakudo-moar 8bac4d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lTdfjM2RWvâ�¤Bogus statementâ�¤at /tmp/lTdfjM2RWv:1â�¤------> [32m.[33mâ��[31m~=: "foo"; .say[0mâ�¤    expecting any of:â�¤        dotty method or postfixâ�¤Â»
16:08 * geekosaur doesn't even remember how to do an operator that way. need sleeeep
16:08 lizmat std: ~= "foo"
16:08 camelia std e347792: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead at /tmp/Anc1q0SVpL line 1:�------> [32m~[33m�[31m= "foo"[0m�Parse failed�FAILED 00:00 121m�»
16:08 TimToady m: $_~="foo";.say  # shorter :P
16:08 camelia rakudo-moar 8bac4d: OUTPUT«foo␤»
16:08 lizmat hehe
16:17 rindolf joined #perl6
16:21 cognominal joined #perl6
16:22 cognominal joined #perl6
16:24 grondilu joined #perl6
16:24 grondilu m: s/$$/foo/; .say
16:24 camelia rakudo-moar 8bac4d: OUTPUT«foo␤»
16:25 lizmat maybe we should have some syntactic sugar for "cas $foo, {$_++}"
16:26 TimToady grondilu: you just want $ there
16:26 grondilu m: s/$/foo/; .say
16:26 camelia rakudo-moar 8bac4d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_dDWO_1OC0â�¤Malformed replacement part; couldn't find final /â�¤at /tmp/_dDWO_1OC0:1â�¤------> [32ms/$/foo/; .say[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤        p…»
16:26 grondilu std: s/$/foo/; .say
16:26 camelia std e347792: OUTPUT«ok 00:01 123m␤»
16:27 grondilu j: s/$/foo/; .say
16:27 camelia rakudo-jvm 8bac4d: ( no output )
16:27 TimToady rakudobug
16:27 TimToady n: s/$/foo/; .say
16:27 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method subst in type Any␤  at /tmp/JwT5W2q6lI line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 576) …»
16:27 lizmat grondilu: will you file it ?
16:27 lizmat or else I can  :-)
16:27 grondilu please
16:27 grondilu do
16:27 * grondilu is not quite accustomed to these stuff
16:28 TimToady well, it reasonably complains about $_ not being a string
16:28 lizmat just sending a mail to "rakudobug" with the discussion pasted, is what I do  :-)
16:28 grondilu m: $_ = "foo"; s/$/bar/; .say
16:28 TimToady Any is not Cool
16:28 camelia rakudo-moar 8bac4d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PFDr2rHY1Câ�¤Malformed replacement part; couldn't find final /â�¤at /tmp/PFDr2rHY1C:1â�¤------> [32m$_ = "foo"; s/$/bar/; .say[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤    â€¦Â»
16:29 havenwood joined #perl6
16:29 TimToady m: $_ = "foo"; s/$ /bar/; .say
16:29 camelia rakudo-moar 8bac4d: OUTPUT«foobar␤»
16:29 lizmat 1, select discussion
16:29 lizmat 2. paste to a new email
16:29 lizmat 3. add a descriptive subject
16:29 lizmat 4. send to rakudobug@perl.org
16:29 TimToady it's not properly taking $ as end of string because it's trying to parse $/
16:29 lizmat 5. wait until fix  :-)
16:30 grondilu lizmat: you forgot 0. check it has not been reported yet.
16:30 TimToady std properly values / as a delimiter more highly than / as a variable name (as does P5 too)
16:30 lizmat well, I'd rather see something like this reported twice then forgotten because someone did not take the trouble to find that out  :-)
16:31 grondilu ok
16:31 TimToady n: $_ = "foo"; s/$/bar/; .say
16:31 camelia niecza v24-109-g48a8de3: OUTPUT«foo␤»
16:31 TimToady as does niecza
16:31 grondilu lizmat: I'll report it, to prove my good will :-)
16:31 lizmat cool, thank you!
16:31 lizmat it's your itch  :-)
16:33 TimToady p6: $_ = "foo"; say so m/$/
16:33 camelia rakudo-jvm 8bac4d: ( no output )
16:33 camelia ..rakudo-parrot 8bac4d, rakudo-moar 8bac4d, niecza v24-109-g48a8de3: OUTPUT«True␤»
16:33 TimToady funny that it works there
16:35 FROGGS joined #perl6
16:39 * grondilu reported the bug
16:40 lizmat grondilu++
16:41 TimToady it wins in STD because token metachar:sym<$> does lookahead for <.stopper> to include it in LTM, and it's a more-derived rule than special_variable:<$/>
16:44 rindolf joined #perl6
16:49 jnthn lizmat: That naive cas is, uh, so naive it doesn't even have the right signature? :)
16:50 lizmat ah?
16:50 lizmat seems to do what I want it to do so far ?
16:50 jnthn oh, sorry
16:51 jnthn it does
16:51 TimToady and token metachar:sym<rakvar> appears to be winning in rakudo, since there's no metachar:<$>
16:51 jnthn It needs to read val = code(val), surely?
16:51 lizmat I'm not sure about that, really
16:52 lizmat I was going by the example at S17:848
16:52 synopsebot Link: http://perlcabal.org/syn/S17.html#line_848
16:53 lizmat and interpreted that incorrectly, I now realize
16:53 jnthn cas $a, { $_.succ };
16:53 jnthn .succ is not in-place
16:53 jnthn If you in-place update the thing then cas can't cas ;)
16:53 jnthn That'd actually be an infinite loop :)
16:53 benabik …  That’s a terrible signature for cas.  Don’t you need an expected value?
16:54 jnthn well, cas $a, { $a++ } would;
16:54 jnthn benabik: See the spec.
16:54 benabik Ah.  There’s a var, old, new version too.
16:54 jnthn benabik: It's just one overload.
16:54 jnthn Though perhaps we should give the implicit-retry-loop one a better name.
16:55 dalek rakudo/nom: fae1d09 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
16:55 dalek rakudo/nom: Slightly less naive implementation of cas()
16:55 dalek rakudo/nom:
16:55 dalek rakudo/nom: jnthn++
16:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fae1d092ea
16:55 kurahaupo joined #perl6
16:55 jnthn It's just that a load of my real-life uses of such things do the loop, and I get bored of writing it again and a gain, so tend to end up defining myself something that does what cas $a, {...} does.
16:55 jnthn casloop could perhaps be better
16:56 jnthn Then we needn't make it a multi
16:56 benabik cas($var, &code) is more like do { my $old, $new = $var, code($var) } until cas($var, $old, $new)?
16:56 jnthn Pretty much, yeah.
16:56 retupmoca jnthn: can you take a look at my updated PR (rakudo#261) for prompt? Hopefully it's sane now.
16:56 jnthn prompt?
16:56 jnthn Oh, did we decide to endow that with readline?
16:56 benabik jnthn: Seems akin to the general fetch-and-phi from CS lit.
16:57 retupmoca jnthn: that's my proposal, anyway
16:57 jnthn benabik: I'm pretty sure I don't want the Perl 6 sub to be called fetch-and-phi ;)
16:57 jnthn Teratogen: Hmm. It's not a bad one...
16:57 jnthn oops
16:57 lizmat I just realize that I was using cas() more as a protect()
16:57 jnthn That was a bad mis-tab though :)
16:58 lizmat protect %h, {$_{foo}++}
16:58 benabik jnthn: You can certainly call it something different, although it’s probably most useful if it returns the old value.
16:59 lizmat basically create a lock on the .WHICH of given container
16:59 lizmat but I guess that just carries the danger of deadlocks again  :-(
16:59 benabik jnthn: And calling it something akin to fetch-and-phi will mean someone looking for that could find it.  The first cas-code version is literally fetch-and-increment.
17:00 thou joined #perl6
17:00 benabik *example
17:01 benabik Although I suppose if I was going to try to use FA* and couldn’t find it, my next step would be to look at CAS.
17:01 kurahaupo joined #perl6
17:02 Teratogen hi jnthn
17:02 jnthn benabik: Depends on what literature. Back at uni it was decidedly introduced as CAS, or atomic compare and swap.
17:03 kivutar joined #perl6
17:03 jnthn And .Net calls it CompareExchange
17:03 jnthn libatomic follows the fetch naming, though.
17:03 jnthn lizmat: yeah, cas ain't that.
17:03 jnthn lizmat: "I looks like you want STM" :)
17:03 jnthn (ut
17:03 jnthn *it
17:03 TimToady we should call it Fred, or Barbara, or some such
17:04 jnthn wfm :)
17:04 benabik jnthn: They’re two different things.  CAS can be used to implement Fetch-and-Φ, or vice versa.
17:04 jnthn Ah
17:05 benabik jnthn: Typically FAΦ is actually a generic term for the category of operations like fetch-and-increment, fetch-and-set, etc.
17:05 jnthn Fair enough.
17:05 denis_boyun_ joined #perl6
17:05 benabik The casloop is the implementation of all FAΦ for platforms that only have CAS.  Which isn’t uncommon.
17:06 TimToady we should charge everyone a Φ for its use
17:06 TimToady (can you tell how I pronounce that Greek letter? :)
17:07 thou Hi! I built perl6-m nom HEAD yesterday (awesome!), and notice that perl6 --doc /path/to/Str.pod (or others) behaves odd when piped (to less, or cat -v). OS X 10.9.2 iTerm. Known issue? Text displays OK w/ no pipe, but is truncated or slightly jumbled when piped.
17:07 benabik I think x86 may be the only common platform with an atomic fetch-and-increment instruction.  Turns out to be useful in a number of lock-free data structures.
17:08 jnthn x86 doing something well? Wow! :)
17:08 TimToady ((inconsistenly, I do not pronounce π as "pee"))
17:08 TimToady *tent
17:08 benabik Well, more like x86 having everything and the kitchen sink...
17:08 lizmat $ perl6 -e 'my %h; cas %h<foo>, {$_.succ}; say %h'
17:08 lizmat No such method 'succ' for invocant of type 'Any'
17:08 jnthn Clearly we should run Perl 6 on the x86!
17:09 TimToady thou: almost certainly a failure to flush an IO buffer
17:09 lizmat seems we're going to have a problem doing this to hashes, or am I missing something?
17:09 benabik Hm.  Oddly, I geta  TTIAR error parsing Str.pod
17:09 lizmat I mean, initializing the hash element would also be a race condition
17:09 jnthn lizmat: You're *always* going to have a problem if you try to mix auto-viv with atomicity.
17:09 thou TimToady: Yes, seems it should be easy to fix. I couldn't find where it's actually printed.
17:09 TimToady did the recent change to let exit() cleanup bypass a needed buffer flush?
17:10 jnthn TimToady: It's possible, I guess
17:10 thou FYI I haven't tried rakudo for a while, so no idea if this is recent or not.
17:11 jnthn TimToady: That'd explain truncated, though not slightly jumbled, though?
17:11 jnthn Wonder if I can reproduce it in my Linux VM....
17:12 thou benabik: I did:  make install; perl6 panda-bootstrap; panda install p6doc; p6doc Str # noticed issue; perl6 --doc /path/install/.../site/lib/Str.pod
17:12 jnthn lizmat: btw, if you're interested in getting a real CAS impl in place, I'm happy to give pointers.
17:12 benabik Oh, I probably lack the Pod libraries.
17:12 jnthn (will need a bit of C work)
17:12 lizmat well, I'm interested, I'm not sure I have the Moar/C Fu to do that
17:13 lizmat definitely not for this month's release  :-)
17:13 jnthn ok, np
17:13 lizmat which would be tomorrow, right?
17:13 jnthn yes :)
17:13 * timotimo has absolutely no clue how to build a robust CAS for moarvm
17:14 lizmat I'll just keep it with the naive cas for now, so I can at least mark all of the S17 tests appropriately
17:14 jnthn ok
17:14 thou slightly jumbled == hard to describe, but: in less, first page looks ok, scroll down 1 line, exposing at bottom a long text line, at which point the last 4 or 5 lines shift up, covering up end of previously-visible text. scroll up and it redisplays. Probably term size and doc content dependent behavior.
17:14 timotimo tomorrow already? wow!
17:15 jnthn timotimo: 3rd Thursday comes early this month.
17:15 timotimo right
17:15 thou btw, it's thrilling to have panda just work, very nice!
17:15 jnthn and it's not even the 3rd Thursday
17:15 timotimo need me to work on anything in particular for moar or nqp/rakudo before the release?
17:16 jnthn It's the thursday after the third tuesday...
17:16 john_john joined #perl6
17:16 * vendethiel needs to fix his previous prs...
17:16 TimToady thou: that sounds more like a stupid pager
17:16 jnthn timotimo: Well, we should look at what thou just reported, I suspect.
17:16 timotimo TimToady: or mixed stderr and stdout output?
17:16 TimToady could be
17:16 jnthn If I really have busted paging stuff on stdout that's kinda bad.
17:16 john_john left #perl6
17:17 thou TimToady: I agree, but it's less ... very odd; I did try perl6 --doc ...Str.pod 2>&1 | less, no different
17:17 timotimo weird!
17:18 TimToady what's your TERM set to?
17:18 jnthn Does anybody else get it, btw?
17:18 TimToady and does stty -a report the right dimensions?
17:18 thou and if I redirect to a file, then less file.txt, it's fine
17:19 TimToady less shouldn't get confused merely by a long line unless it's terminal settings are inaccurate, or maybe you've got a weird scroll setting in the screen
17:19 TimToady try resetting the terminal?
17:19 TimToady sometimes printing garbage sets the scroll region oddly
17:20 timotimo oh yeah, garbage can be any combination of valid but non-helpful commands for your terminal in it
17:20 vendethiel m: sub foo($a is copy) { bar($a); }; sub bar($a is copy) { say $a }; foo(5);
17:20 camelia rakudo-moar 15c145: OUTPUT«5␤»
17:21 kurahaupo thou: when you redirect to a file, does anything show at the same time, on stderr?
17:22 TimToady kurahaupo++
17:22 telex joined #perl6
17:22 thou I opened a new iTerm window. Tried TERM=xterm-256color (my default), vt100, xterm, ansi. Different TERM settings do affect it slightly, but still is weird. stty -a ($LINES $COLUMNS, too) matches actual dimensions. When redirect to file, no stderr output
17:22 TimToady I guess the scroll region explanation wouldn't explain the redirect working right
17:23 jnthn fwiw (not much, probably), on Windows piping it to more works out :)
17:23 timotimo what in the ... ?!
17:24 TimToady maybe someone fed the IO to a hyper...
17:24 TimToady and the output buffer size makes a difference
17:24 benabik thou: Do you have R in your $LESS env?  Could be that some bit of output is an unwanted terminal control code.
17:24 * TimToady is stretching...
17:25 timotimo in general, i think calling print to a FH multiple times is less expensive than concatenating the text before doing a single call, eh?
17:25 tadzik heh
17:25 tadzik maybe print yes, say no :D
17:25 TimToady is true in P5, but depends on how pessimal the IO invocation is
17:26 kurahaupo if you run under "script" to capture the output, does it differ from what's written with redirection?
17:26 TimToady well, except join is optimized in P5, so both ways are fast :)
17:28 thou Maybe iterm related, but i've never seen anything else behave wonky. 'p6doc Str | tail' works ok. But 'p6doc Str | cat' consistently shows wrong stuff at the end. Example: https://pastee.org/h6gde
17:30 timotimo huh, could the line wrapping be wrong if there's no newline at the very end?
17:30 thou I tried Terminal.app, too. Same thing.
17:31 TimToady how could piping to cat vs tail make a difference?!?
17:31 thou head has same issue
17:31 timotimo well, less probably does its own line wrapping
17:31 timotimo and the others would leave it to the terminal?
17:31 jnthn Just tried the Moar build I had on my Linux VM and it was OK piping Str.pod to less
17:31 jnthn Building a latest now.
17:31 thou i.e.: perl6 --doc ... > skr.txt; head -n 50 skr.txt # OK; perl6 --doc ... | head -n 50 # Broken
17:32 timotimo what repo do i find that file in?
17:32 thou perl6/doc
17:32 thou panda install perl6doc
17:32 timotimo thanks
17:32 thou s/perl6doc p6doc
17:32 Rotwang joined #perl6
17:32 thou (Str.pod is not the only one -- it's all files i've seen)
17:33 TimToady does changing your screen width change the behavior?
17:33 jnthn *sigh* train wifi is busted, and my 3G connection is really LTA on this bit of the line :/
17:33 thou I compiled nom 7814401b72945ee738e27707c4b3466edafa5c73
17:33 denis_boyun___ joined #perl6
17:34 xinming joined #perl6
17:34 thou If no one else can get it, it's possibly some broken thing in my homebrew; after uprade of OS X to 10.9 I've had various issues there.....
17:35 thou I tried with both a wide window (253 cols) and standard 80x24
17:36 thou cat vs. tail: problem only shows if long lines near end of output
17:36 timotimo wtf, unix? :)
17:37 dalek roast: 2b72453 | (Elizabeth Mattijsen)++ | S17-concurrency/ (3 files):
17:37 dalek roast: Cassify S17 tests
17:37 dalek roast: review: https://github.com/perl6/roast/commit/2b7245322a
17:43 havenwood joined #perl6
17:43 jnthn Can't reproduce it on my Linux VM, fwiw.
17:45 thou OK. I think this may be OS X termcap related or something like that :-/
17:45 thou I'll just drop it. It's very odd, though.
17:45 treehug88 joined #perl6
17:45 thou thanks for investigating, and sorry for the distraction!
17:50 guru joined #perl6
17:52 denis_boyun joined #perl6
17:52 geekosaur that doesn't look like terminal type to me, that looks like an unflushed buffer
17:52 jnthn thou: No, thanks for reporting. It's not a distraction.
17:52 jnthn thou: Just that nobody else can reproduce it yet.
17:52 jnthn Mebbe somebody else on OSX can...
17:53 [Coke] tadzik: ping
17:53 tadzik [Coke]:
17:53 tadzik yep
17:55 [Coke] there's a pull request and a new issue on muevent.
17:55 thou I'm going to try building jvm backend and check w/ that
17:55 [Coke] I agree it would be nifty to write it with promises and not the poll/select trick.
17:56 [Coke] (I want to use moar for the project I'm doing that needs a muevent.)
17:56 benabik I’ll see if I can reproduce the output thing…  But I have to install panda first...
17:57 myfree joined #perl6
17:58 myfree left #perl6
17:59 jnthn [Coke]: What are you trying to do in the project?
18:01 dalek roast: 6ef4a7c | (Elizabeth Mattijsen)++ | S17-concurrency/thread.t:
18:01 dalek roast: Fudge thread stress test
18:01 dalek roast:
18:01 dalek roast: Cassifying made it randomly segfault more often
18:01 dalek roast: review: https://github.com/perl6/roast/commit/6ef4a7c42f
18:02 benabik Hm.
18:02 benabik Less looked fine, but I get “cat: stdout: Resource temporarily unavailable” when trying |cat
18:03 benabik And now truncated output without an error.  But only intermittently.
18:04 geekosaur ohhh
18:04 hummeleB1 joined #perl6
18:04 geekosaur the filehandls is nonblocking, and tty devices and pipes can be slow and need to block
18:04 geekosaur *filehandle is
18:04 [Coke] jnthn: TL;DR - redo https://github.com/tlily/tigerlily in perl 6
18:05 [Coke] it's a extensible chat client for a chat server that only a few hundred people in the world use. (I'd like to port the bot that I wrote in it to both perl 6 and to IRC)
18:05 [Coke] so async IO events would be most nice.
18:08 [Coke] one day I'll finish a project instead of trying to do 30 diffe -SQUIRREL!
18:11 jnthn geekosaur: I at a guess imagined that that's what https://github.com/MoarVM/MoarVM/blob/master/src/io/fileops.c#L321 is doing
18:12 treehug88 joined #perl6
18:12 benabik http://lists.nongnu.org/archive/html/bug-cvs/2005-07/msg00008.html
18:12 geekosaur the question might be whether that's actually doing the right thing at the lowest level (also... literal values for such things?)
18:12 benabik It /looks/ like stdout is getting set non-blocking and OS X doesn’t like it.
18:14 jnthn geekosaur: I don't know. I didn't put it in there :)
18:15 geekosaur that's not just an os x thing
18:15 benabik From the comment, the code seems to think that setting the flag makes it non-blocking.  Evidence suggests that’s not enough.
18:15 geekosaur it's every unixlike out there that considers non-blocking an attribute of a ssytem file table entry and not just an individual process's handle
18:16 benabik Perhaps setting the flag is enough on Linux but not OS X?  Why don’t all platforms just use uv_stream_set_blocking?
18:16 jnthn uv_stream_set_blocking is only implemented on Windows, iirc :/
18:16 benabik Ahhhhh...
18:17 jnthn So I put it in there and was happy and othrs were like "omg you broke it" :)
18:17 benabik libuv seems to be lacking a bit in “cross platform"
18:19 TimToady well, how hard can it be to add one bit?  :)
18:19 benabik uv_stream_set_blocking appears to be in libuv/{include/uv.h,src/unix/stream.c}
18:19 _sri famous last words
18:20 benabik Ohhhhh....
18:20 benabik But it’s just an abort in unix.  D'oh.
18:21 FROGGS benabik: https://github.com/MoarVM/MoarVM/blob/master/src/io/fileops.c#L309
18:21 FROGGS doesn't this what uv_stream_set_blocking does for Win32?
18:21 FROGGS do*
18:21 benabik Judging from effects, no.
18:21 FROGGS k
18:22 FROGGS it had effects on my box when I added it though
18:22 FROGGS IIRC it made a hang go away
18:22 benabik FROGGS: Linux?
18:22 FROGGS yes
18:25 thou It seems the root cause has been found. Good! perl6-j doesn't suffer from the same problem (too late to be useful)
18:26 dragon_d joined #perl6
18:26 benabik Well, there appears to be a large amount of `#if defined(__APPLE__)` in libuv.
18:26 benabik I’m not familiar enough with the code here to know what part is going to be important.  :-/
18:27 dwarring joined #perl6
18:31 benabik Well, error diagnosed.  I don’t really have the time to dig further.  :-/
18:32 jnthn To be fair, if we'd just hacked up all the stuff ourselves in Moar, we'd not be more portable. :) And there's not a huge selection of alternatives.
18:33 jnthn ("We'd not be a lot portable" here meaning "we'd probably be less ortable and have spent longer getting there")
18:33 benabik libuv HEAD has removed the abort from set_blocking in unix.  But it just returns an error instead of doing anything useful.
18:34 benabik I’m guessing that set_blocking should probably set the flag in most Unix and maybe the Apple specific stuff needs to do something special.  If we find a solution it probably should get punted upstream.
18:35 jnthn aye
18:35 molaf joined #perl6
18:38 grondilu joined #perl6
18:39 timotimo jnthn: are we actually ready for a tristar for this month?
18:40 jnthn timotimo: Well, a bistar at least.
18:40 timotimo parrot and moar?
18:40 jnthn timotimo: I got Moar clean on module install and tests.
18:41 FROGGS me too
18:41 jnthn FROGGS: Got a recen tJVM report?
18:41 timotimo that sounds lovely
18:41 FROGGS wait...
18:41 FROGGS jnthn: no, but I can update this tonight: https://gist.github.com/FROGGS/0ea5537eb675588baaa2
18:41 FROGGS jnthn: you even got DBIish clean?
18:42 jnthn FROGGS: Yeah
18:42 FROGGS cool!
18:42 jnthn FROGGS: that needed a Rakudo bug fix.
18:42 FROGGS ahh
18:42 jnthn Well, NQP one
18:42 jnthn Code-gen fix, of all things... )
18:42 * lizmat is glad to see so many Perl 6 talks at PLPW: http://act.yapc.eu/plpw2014/schedule?day=2014-05-17
18:43 timotimo are there video recordings from GPW available?
18:44 dwarring joined #perl6
18:44 jnthn oooh yay, my talk is on day 1 :)
18:45 FROGGS I have a talk on every day \o/
18:45 FROGGS timotimo: it seems so... I get the link in a sec
18:45 jnthn And not first thing in the morning :)
18:46 jnthn FROGGS: I was lazy and only submat one.
18:47 FROGGS and I hope that I can show off with CPAN for Perl6 by then...
18:47 timotimo lizmat submat, too
18:47 lizmat only once, though
18:47 timotimo and stuff like generating executables that will look for the right compunit repo and version and stuff
18:48 jnthn :)
18:49 lizmat I wonder if we could have a Perl6 hackathon on the Fri before?
18:49 jnthn I'm pretty sure I can't.
18:49 jnthn I think I might actually have to fly from somewhere != home to get there.
18:50 jnthn oh, no.
18:50 lizmat oh no?
18:51 timotimo does that mean there actually will be a hackathon? :)
18:51 jnthn My schedule did once have it so I was gonna have to do that.
18:51 jnthn I guess my "I'll teach that day if you work out how to get me to Poznan that evening" led to me not teaching that day. :)
18:51 jnthn I'm teaching mon-wed that week.
18:52 jnthn May have some stuff to do on the Thu.
18:52 jnthn But could do an evening flight on Thu or early flight on Fri.
18:53 dalek rakudo-star-daily: 0e06f71 | coke++ | log/ (5 files):
18:53 dalek rakudo-star-daily: today (automated commit)
18:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/0e06f71a7c
18:53 dalek perl6-roast-data: dc53d16 | coke++ | / (6 files):
18:53 dalek perl6-roast-data: today (automated commit)
18:53 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/dc53d167b1
18:53 lizmat would be very nice if all the stakeholders on S11/S22 would be sitting together in the same room  :-)
18:54 [Coke] yay, rakudo.moar is now the only rakudo with failures.
18:54 benabik yay?
18:54 vendethiel 6 perl6 talks ? or is sergot also gonna talk about p6 ?
18:54 [Coke] benabik: we've had failures on all 3 for weeks.
18:55 benabik [Coke]: Well, it’s an improvement at least.  I’d be happier if Moar wasn’t the one with the failures though.  ;-)
18:55 jnthn It does also pass the most tests :P
18:56 benabik yay!
18:56 jnthn lizmat: Yeah. I think I can make it.
18:57 sjn_ joined #perl6
18:57 * jnthn realizes that he'll be away from home at least half the nights in May.
18:58 sjn_ \o
18:58 jnthn o/ sjn_
18:59 lizmat jnthn: looks like that for woolfy and me as well
19:02 sjn_ jnthn: sitting with one of the guys working on the JavaZone talk schedule; he's asking if someone from #perl6 would like to give a talk. Know of anyone interested? :)
19:04 sjn_ JVM angle optional but appreciated
19:04 sjn_ http://javazone.no/
19:07 jnthn Well, you're asking in the right channel... :)
19:11 PerlJam sjn_: Are there often non-Java talks at JavaZone?
19:11 anaeem1 joined #perl6
19:15 lizmat jnthn: should this work?
19:15 lizmat for (CurrentThreadScheduler, ThreadPoolScheduler) {
19:15 lizmat $*SCHEDULER = .new;
19:15 bluescreen100 joined #perl6
19:15 dalek Perlito: 66a686c | (Flavio S. Glock)++ | / (6 files):
19:15 dalek Perlito: Perlito5 - rename module Perlito5::Grammar::Regex to Perlito5::Grammar::Regex6
19:15 dalek Perlito: review: https://github.com/fglock/Perlito/commit/66a686c403
19:16 jnthn lizmat: Maybe; I can't remember if the latter one demands args saying how many thrads.
19:16 jnthn *threads
19:16 jnthn m: ThreadPoolScheduler.new
19:16 camelia rakudo-moar fae1d0: ( no output )
19:17 jnthn Seems not.
19:18 lizmat ok, thanks for the sanity check
19:20 sjn_ PerlJam: yes, they have several non-java tracks
19:21 lizmat m: say $SCHEDULER.WHAT; say "{$*SCHEDULER.WHAT}"  # some scoping issue ?
19:21 camelia rakudo-moar fae1d0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yiS0CDIfrQâ�¤Variable '$SCHEDULER' is not declaredâ�¤at /tmp/yiS0CDIfrQ:1â�¤------> [32msay $SCHEDULER.WHAT[33mâ��[31m; say "{$*SCHEDULER.WHAT}"  # some scopi[0mâ�¤    expecting any of:â�¤      â€¦Â»
19:21 lizmat m: say $*SCHEDULER.WHAT; say "{$*SCHEDULER.WHAT}"  # some scoping issue ?
19:21 camelia rakudo-moar fae1d0: OUTPUT«(ThreadPoolScheduler)␤use of uninitialized value of type ThreadPoolScheduler in string context␤␤»
19:21 sjn_ what they want is interesting talks :)
19:21 lizmat hmmm..... I guess not
19:22 PerlJam nice.  JavaZone++
19:22 jnthn lizmat: No, just .Str vs .gist
19:22 lizmat m: say Int.WHAT; say "{Int.WHAT}"   # indeed  :-)
19:22 camelia rakudo-moar fae1d0: OUTPUT«(Int)␤use of uninitialized value of type Int in string context␤␤»
19:26 vendethiel (being able to change $*OUT and $*IN (being able to choose dynamic scoping), like in plt/scheme is a really, really powerful tool)
19:27 vendethiel r: my $*OUT = ""; say "foo"; # is it STORE ?
19:27 camelia rakudo-moar fae1d0: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method print at src/gen/m-CORE.setting:1051␤  in sub say at src/gen/m-CORE.setting:13554␤  in block  at /tmp/tmpfile:1␤␤»
19:27 camelia ..rakudo-jvm fae1d0: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method print at gen/jvm/CORE.setting:1051␤  in sub say at gen/jvm/CORE.setting:13497␤  in block  at /tmp/tmpfile:1␤␤»
19:27 camelia ..rakudo-parrot fae1d0: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method print at gen/parrot/CORE.setting:1054␤  in sub say at gen/parrot/CORE.setting:13539␤  in block  at /tmp/tmpfile:1␤␤»
19:27 benabik vendethiel: I think say ‘foo’ is just $*OUT.say ‘foo’
19:28 vendethiel benabik: not what I want :-)
19:28 vendethiel I would like to store in a variable the output
19:28 jnthn There's a module for that I think
19:28 benabik You want a string buffer then.
19:29 jnthn https://github.com/sergot/IO-Capture-Simple/blob/master/lib/IO/Capture/Simple.pm
19:29 jnthn that shows how to do it.
19:30 vendethiel yep, ty
19:30 vendethiel oh, just .print >_>
19:30 benabik You don’t want say to be $*OUT = something, because then trying to set $*OUT to something to redirect is going to just result in output.  ;-)
19:30 vendethiel I didn't understand what benabik meant >_>
19:30 vendethiel benabik: what?
19:31 benabik vendethiel: .STORE is used when you assign to something.  So if say used STORE, redirecting $*OUT would be a pain.
19:31 vendethiel ah, yeah :-).
19:31 vendethiel I'll just override .print :-)
19:42 kaare__ joined #perl6
19:42 molaf joined #perl6
20:03 hoelzro ugh, I really need to put some time into that Kate syntax file
20:19 timotimo yes please :))
20:21 * vendethiel would like a standart highlighting format ...
20:27 btyler joined #perl6
20:31 dalek Perlito: e6b0e42 | (Flavio S. Glock)++ | src5/lib/Perlito5/Grammar/Regex5.pm:
20:31 dalek Perlito: Perlito5 - new module Perlito5::Grammar::Regex5 wip
20:31 dalek Perlito: review: https://github.com/fglock/Perlito/commit/e6b0e42a57
20:36 sjn_ btw; deadline for submitting talks to JavaZone is April 28th (in a week or so)
20:38 hoelzro vendethiel: I'm thinking of unifying the pygments, kate, and vim highlighting in a single repo
20:38 hoelzro and possibly generating pieces of each from a common spec
20:40 geekosaur joined #perl6
20:41 treehug8_ joined #perl6
20:43 lizmat jnthn: am I correct in understanding that Supply.for will "more" all the values on *each* tap?
20:44 lizmat even if a tap is created after another tap has consumed all the "more"s ?
20:46 timotimo i don't think it even *can* more values to some taps but not others
20:46 timotimo so if you tap something later, it won't be able to send only the first few there again
20:48 lizmat there is a test for specifically that, and it passes
20:48 lizmat where a second tap doesn't see the first value, and the first tap doesn't see the third value because it closed it before it was "more"d
20:49 lizmat I sort of expected that for a Supply.for as well, but it seems *that* will generate all values for *each* tap, regardless of when they're started
20:49 lizmat I guess in a way it makes sense
20:49 lizmat it's just that the spec is a little unclear about that (S17:523)
20:49 synopsebot Link: http://perlcabal.org/syn/S17.html#line_523
20:50 * jnthn bck from the train
20:50 jnthn lizmat: Yes, Supply.for gives a cold observable
20:50 lizmat jnthn o/
20:50 jnthn lizmat: I'm afraid we don't have a Perl 6 name for that concept yet, so I hope you can excuse the Rx one. ;)
20:51 jnthn lizmat: But your understanding is correct: each time you tap a...hmm...let's call it a cold supply...it sets something in motion that delivers the values.
20:52 jnthn lizmat: A "hot supply" works differently; there, the values come and go whether anybody has tapped, and if two things tap they're tapping into the same supply and both getting its values from the point they tap
20:52 jnthn lizmat: Examples of hot supply: mouse move events, file change notifications...
20:53 lizmat ok, so maybe I should introduce "hot" and "cold" in the spec?
20:53 jnthn We can; I never felt hot and cold were optimal words, though, tbh.
20:53 jnthn I suspect TimToady++ might find us better ones, with time.
20:54 jnthn When I first heard the names, they didn't especially give me an intuition of the difference.
20:54 jnthn And I still find myself teaching them as just names for things I then need to explain.
20:56 jnthn "ready supply" is cute but then I wasn't sure which one it'd be :P
20:59 treehug88 joined #perl6
20:59 lizmat well, sharing and cloning supplies ?
21:00 lizmat the cold supply you could consider a clone of a sharing (hot) supply ?
21:00 lizmat maybe better: a "picking" and a "rolling" supply ?  like the difference between .pick and .roll ?
21:01 lizmat recorded / live supply
21:01 jnthn live or rolling I like.
21:01 jnthn (for hot)
21:01 lizmat on demand / live supply
21:01 jnthn picking and recorded feel a bit off
21:01 jnthn on-demand is better
21:01 thou from "it set something in motion", it sounds like "recorded is wrong
21:01 jnthn Yeah, "recorded" is more like a ReplaySubject...
21:02 lizmat so an "on demand" video vs a "live feed" video
21:03 thou yeah
21:03 lizmat ok, I'll go with "on demand" versus "live" then, for now at least
21:03 lizmat unless TimToady already wants to chime in?
21:03 jnthn yeah. I think "live" is really good. "on demand" feels a tad awkward.
21:03 jnthn But does match well
21:04 jnthn "rental supply" :P
21:04 lizmat indeed..  :-)
21:04 colomon joined #perl6
21:05 jnthn I probably shouldn't try for cute naming. Damian already correctly chastised my kxxv enough :D
21:05 lizmat maybe a "type" method on the tap ?
21:05 jnthn Well, type is always the wrong word for anything :)
21:05 lizmat "live" "on demand"
21:05 lizmat hehe
21:06 jnthn Hmm...occurs to me Rx doesn't, afaik, have an introspection mechanism for that. I wonder if that's for a deep reason, or because it's not useful...
21:06 lizmat point taken...  I go at great lengths to please all of you  :-)
21:06 jnthn Feels like it's most useful in an exploration sense.
21:07 jnthn Like, "I wonder how this one works"
21:07 jnthn Might be useful for an interactive debugger to know.
21:08 jnthn You can safely tap into a live stream without interfering with it.
21:09 jnthn We could just call it "live" and it's a boolean.
21:10 lizmat ok, will take that approach
21:12 jnthn Gee, "we've hit 'peak beard'" is probably the winner of "phrase I never expected to see in a news article" today...
21:12 * jnthn gets back to writing his blog post
21:12 lizmat jnthn++  :-)
21:13 timotimo yays
21:14 jnthn Tomorrow is last day of $dayjob work until after the Dutch Perl Workshop, also :)
21:15 lizmat and the weather is going to get better!  :-)
21:15 jnthn It already is better here :)
21:15 jnthn Was sunny up in Stockholm.
21:17 dayangkun joined #perl6
21:17 Teratogen hi jnthn
21:17 jnthn o/ Teratogen
21:18 Teratogen =)
21:19 [Coke] thinks jnthn probably is top beard on #perl6.
21:19 [Coke] speaking of SQUIRREL-brain, I just volunteered to replace an actor in a show that starts in five weeks.
21:23 lizmat does it have lines?
21:24 nwc10 more bloggage?
21:24 tadzik I feel like going to NLPW :)
21:24 nwc10 not quite "you wait for ages and 3 come along together"
21:25 nwc10 someone had an *excellent* photo with that caption
21:25 nwc10 3 oil platforms, in the sea
21:25 jnthn nwc10: One of those "it's more optimal for me to write a blog post that might explain my take on something well, than badly explain something again and again" :)
21:25 nwc10 but this was in meatspace (and I suspect film), so the Internet cannot provide a version of it
21:26 nwc10 jnthn: aha. About Perl 6, or beer? :-)
21:27 lizmat jnthn: would you consider Supply.interval to be a "live" or an "on demand" tap ?
21:28 jnthn lizmat: Certainly on demand.
21:28 lizmat ok
21:28 jnthn lizmat: Becomes clear it needs to be given the interval can vary :)
21:28 jnthn lizmat: Also because you want the ticks to stop on un-tap
21:28 jnthn lizmat: For a given usage, anyways.
21:29 lizmat this also implies we could cache grep/map/uniq/squish on "on demand" taps
21:29 lizmat hmmm... maybe not
21:29 lizmat if they'e like .interval
21:31 dalek specs: 4d7ca45 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
21:31 dalek specs: Elaborate on "on demand" and "live" Supply
21:31 dalek specs: review: https://github.com/perl6/specs/commit/4d7ca45c08
21:31 dragon_d joined #perl6
21:32 dalek roast: c691297 | (David Warring david.warring@gmail.com)++ | integration/advent2012-day03.t:
21:32 dalek roast: tweaks (thanks to day 10)
21:32 dalek roast: review: https://github.com/perl6/roast/commit/c6912979bd
21:32 dalek roast: 0f6ab3d | (David Warring david.warring@gmail.com)++ | integration/advent2012-day10.t:
21:32 dalek roast: adding 2012 advent day 10
21:32 dalek roast: review: https://github.com/perl6/roast/commit/0f6ab3d908
21:33 dwarring I've got a PR to pull in a few more advent tests
21:33 dwarring https://github.com/rakudo/rakudo/pull/257
21:35 dwarring just when someones got a few moments
21:35 dalek rakudo/nom: 54e6994 | (David Warring)++ | t/spectest.data:
21:35 dalek rakudo/nom: Make advent2012-day04.t a stress test
21:35 dalek rakudo/nom:
21:35 dalek rakudo/nom: Takes around 20 sec to run @moar and 1 min @jvm
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54e699498e
21:35 dalek rakudo/nom: e8ee661 | (David Warring)++ | t/spectest.data:
21:35 dalek rakudo/nom: Also add integration/advent2009-day21.t
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8ee661a91
21:35 dalek rakudo/nom: 11c277c | (David Warring)++ | t/spectest.data:
21:35 dalek rakudo/nom: adding integration/advent2012-day09.t
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/11c277cfc4
21:35 dalek rakudo/nom: 8384fcd | (David Warring)++ | t/spectest.data:
21:35 dalek rakudo/nom: Update spectest.data
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8384fcdd80
21:35 dalek rakudo/nom: d37353f | lizmat++ | t/spectest.data:
21:35 dalek rakudo/nom: Merge pull request #257 from dwarring/patch-1
21:35 dalek rakudo/nom:
21:35 dalek rakudo/nom: spectest.data changes
21:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d37353f4c1
21:36 dwarring thanks lizmat++
21:39 lizmat yw
21:39 lizmat Files=808, Tests=31186, 167 wallclock secs ( 7.67 usr  3.63 sys + 1118.66 cusr 79.16 csys = 1209.12 CPU)
21:40 jnthn Show-off! :P
21:41 jnthn 47s until a 2-min spectest :)
21:41 woolfy1 joined #perl6
21:41 lizmat hehe... yup: waiting for a 16 core MacBook
21:41 lizmat :-)
21:49 dalek roast: 640c38f | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
21:49 dalek roast: More deeply test supplies, with both schedulers
21:49 dalek roast: review: https://github.com/perl6/roast/commit/640c38f5b3
21:50 * lizmat calls it a day and wishes #perl6 a good night (*)
21:50 lizmat (*) wish still meant well where not applicable
21:51 jnthn :)
21:51 jnthn 'night, lizmat++
22:02 * sjn_ is having a tasty beer at one of the local brewpubs :-9
22:12 kurahaupo joined #perl6
22:14 havenwood joined #perl6
22:20 bluescreen__ joined #perl6
22:20 benabik joined #perl6
22:35 tadzik mmm :)
22:39 FROGGS joined #perl6
22:48 * TimToady thought all supplies were "live", and wonders if "on demand" is just an array in disguise that you can only push values into, and can't remove values except by destroying the whole supply
22:49 TimToady and it sounds like a great way to leak memory if you forget to destroy the supply
22:50 TimToady a cockpit recorder with an infinite tape, seemingly
22:52 virtualsue joined #perl6
22:57 retupmoca my new prompt doesn't like Term::ANSIColor - readline thinks all the color escape sequences are printable :\
23:02 FROGGS joined #perl6
23:07 hoverboard joined #perl6
23:23 TimToady well, they are printable, they just don't have width...
23:24 BenGoldberg joined #perl6
23:43 benabik joined #perl6
23:44 cognominal TimToady is a character with depth.
23:44 segomos a non-null character with depth
23:45 rindolf joined #perl6
23:46 FROGGS joined #perl6
23:47 segomos how do i get warnings like p5, where i get the line #?
23:49 Mouq joined #perl6
23:49 colomon joined #perl6
23:54 Mouq segomos: You mean like how `warn "abcd"` just does $*ERR.say("abcd") in p6 but does say STDERR "abcd at $file line $line"?
23:54 Mouq *In p5
23:55 Mouq std: throw "abcd"
23:55 camelia std e347792: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'throw' used at line 1�Check failed�FAILED 00:01 122m�»
23:55 TimToady n: warn "fo"
23:55 camelia niecza v24-109-g48a8de3: OUTPUT«fo␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /tmp/omI5VerHUs line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 5…»
23:56 Mouq Hm
23:56 Mouq Niecza++
23:56 TimToady looks like niecza++ attempts to
23:56 Mouq m: warn "LTA warnings"
23:56 camelia rakudo-moar d37353: OUTPUT«LTA warnings␤»
23:56 TimToady albeit without weeding out inconsequential frames
23:58 TimToady m: CONTROL { .perl.say }; warn "What am I?"
23:58 camelia rakudo-moar d37353: OUTPUT«What am I?␤»
23:58 TimToady m: CONTROL { say "HERE"; }; warn "What am I?"
23:58 camelia rakudo-moar d37353: OUTPUT«What am I?␤»
23:58 Mouq m: say $?LINE
23:58 camelia rakudo-moar d37353: OUTPUT«1␤»
23:58 TimToady NYI it looks like
23:59 Mouq segomos: You can at least cheat using that
23:59 Mouq but :(

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

Perl 6 | Reference Documentation | Rakudo