Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 cognominal Why io.d  throws an exception on a missing directory?  I would like some sort of Exception (or Failure?) that boolify to false and is passed to chained methods lke Nil does.
00:01 cognominal Certainly it does not deserve a throw.
00:02 timotimo well, maybe you want .IO.e && .IO.d? or something?
00:03 cognominal I meant .IO.d
00:03 timotimo yes
00:03 timotimo .d seems to only be "is it a directory?"
00:03 yoleaux Sorry, I couldn't find a definition for 'seems to only be "is it a directory?"'.
00:03 timotimo rather than "does it exist, and is it a directory"?
00:04 cognominal https://github.com/rakudo/rakudo/blob/nom/src/core/IO.pm#L47
00:05 timotimo ah, interesting
00:05 timotimo so if you .e && .d, you'll actually stat it for existence twice in a row
00:05 timotimo well, i hope stat is cheap
00:06 cognominal "/foobar-nor-a-dir|.io.d.mymethod-derived-from-IO() || .fail  # what I would like to write
00:07 cognominal hum, something like that. I don't know how to get to the failure to throw it.
00:07 timotimo i'm confused
00:08 timotimo what do you want the code to do?
00:09 cognominal if the .d is false, I would like it to be an exception that I can throw myself, so that means a defined exception that would boolify to false.
00:09 cognominal And acts like Nil on chained methods.
00:09 cognominal But I don't know how to get to it at the right of the ||
00:10 timotimo that seems like orelse would do the trick
00:10 cognominal bed time.
00:10 cognominal My ideas are fuzzy
00:10 cognominal orelse sound like it.
00:10 timotimo orelse will give you a $_ on the right hand side that is the value of what fails on the left side
00:11 cognominal "/foobar-nor-a-dir".io.d.mymethod-derived-from-IO() orelse $_.fail
00:11 segomos_ i thought it was :d to test if it was a dir
00:12 timotimo that also exists, but i think you have to .IO ~~ :d
00:13 timotimo because matching against a pair calls the pair's key as a method on the object and compares it to the value of the pair
00:13 timotimo so :d is "d" => True
00:13 timotimo so "call .d and compare it to True"
00:14 timotimo i'm still amused by the pygments lexer thinking "method s() { ... }" is a big substitution operator
00:14 cognominal that would be nifty but that means many semantic changes :  1/ defined exception returning false, or defined with "but false" and exception acting like Nil on method chaining.
00:14 segomos_ seems like the concurrency issues i was having with IO::Socket::Async in perl6-j are resolved :-)
00:15 segomos_ thank you to whomever is working on it
00:15 cognominal timotimo++ for signaling me the orelse
00:15 timotimo i'm aware of it because i recently spent some time on it
00:15 timotimo mostly tests, though
00:16 TimToady we used to have pairs compare to the value, but that turned out to be a bad idea, so smartmatch on a pair is only for true/false
00:16 timotimo oh? what's the bad idea about it?
00:16 TimToady so :d does not, in fact, compare against True
00:17 timotimo well, okay, if you implement it as "smartmatch against the value", that'll be problematic with :d and :!d
00:17 timotimo because that'd always give True or False
00:17 timotimo m: say True ~~ True
00:17 camelia rakudo-moar 1a3706: OUTPUT«Potential difficulties:â�¤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* insteadâ�¤    at /tmp/0MlgJ8M3e6:1â�¤    ------> [32msay True ~~[33mâ��[31m True[0mâ�¤TrueTrueâ�¤Â»
00:17 TimToady :s is supposed to be true for non-zero-sized files, not just files of size 1
00:17 timotimo oh
00:17 TimToady or files of size True
00:18 * timotimo wrote a "create supersmartmatcher" routine for the spesh log to diff tool in moarvm's tools directory
00:19 timotimo so that you could have a pair as the matcher and the key will be the value it'll be smartmatched against
00:19 timotimo (recursively)
00:20 timotimo i don't know if i said this in here before, but when using qast and stuff in perl6 code with :from<NQP> becomes robust enough, it'd be a good time to build a deparse module, IMO
00:21 cognominal what :from<NQP> does?
00:22 timotimo you can "use Foo::Bar:from<NQP>" to import an nqp module into perl6 code
00:22 timotimo kind of like the :from<Java> we already have on rakudo-jvm
00:24 cognominal r: say Exception.isa(Nil)
00:24 camelia rakudo-jvm 1a3706: OUTPUT«(timeout)»
00:24 camelia ..rakudo-{parrot,moar} 1a3706: OUTPUT«False␤»
00:27 cognominal I suppose that would be too costly to have exception riding on method chaining like Nil.  Testing for  .isa(Nil) would cost more than testing for Nil.
00:28 woosley joined #perl6
00:39 Mouq Pretty serious, IMO, bug:
00:39 Mouq for  .isa(Nil) would
00:39 Mouq cost more than testing for Nil.
00:39 Mouq gah
00:39 MilkmanDan joined #perl6
00:39 Mouq sorry
00:39 Mouq echo '1+' > Uhh.pm6
00:39 Mouq perl6  -e'use lib <.>; use Uhh; '
00:39 Mouq Unhandled exception: Cannot find method 'Stringy': no method cache and no .^find_method
00:39 Mouq ...
00:41 Mouq ('1+' is just an example; any compile-time error seems to do it)
00:42 BenGoldberg_ joined #perl6
00:48 raiph Mouq: reproduced using fresh rakudobrew build moar
00:48 raiph raiph@feather:~/work/slangs$ echo 'say 1+' > Uhh.pm6
00:48 raiph raiph@feather:~/work/slangs$ perl6-debug-m  -e 'use lib <.>; use Uhh'
00:48 raiph ===SORRY!===
00:48 raiph Start argument to substr out of range. Is: -1, should be in 0..0
00:50 raiph Ah. Sorry. That's unrelated I think (jnthn said he hoped get to it soon)
00:50 timotimo m: echo '1+'
00:50 camelia rakudo-moar 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/F8l1Xap9Spâ�¤Undeclared routine:â�¤    echo used at line 1â�¤â�¤Â»
00:51 timotimo ah, that's what the error is
00:51 timotimo mhh, better catch some sleep
00:54 Mouq raiph: Thanks!
00:54 raiph goodnight timotimo
01:07 raiph Mouq: Does it make sense to create and add a spectest that would have caught your error and if so, would you be able/willing to help me do so?
01:17 wooden_ joined #perl6
01:22 FROGGS_ joined #perl6
01:26 Su-Shee_ joined #perl6
01:29 woosley left #perl6
01:29 woosley joined #perl6
01:31 klapperl_ joined #perl6
01:41 Mouq_ joined #perl6
01:41 Mouq_ raiph: Definitely! :)
01:41 raiph cool :)
01:45 raiph Do you know of a doc I could follow?
01:47 Mouq_ raiph: Not that I know of; But my guess is that a test could be used in S10-packages/basic.t or so ( https://github.com/perl6/roast/tree/master/S10-packages )
01:49 raiph m: use Test; say Test.WHY # you never know :)
01:49 camelia rakudo-moar 1a3706: OUTPUT«(Any)␤»
01:51 Mouq_ maybe something like `try EVAL "use lib <.>; use SyntaxError"; is $!, X::Syntax::Confused`
01:52 Mouq_ s/use lib <.>//
01:53 Mouq_ raiph: And then fudging is just putting the line `#?rakudo todo 'reason'` above the test
01:55 raiph Mouq_: Awesome help, thx. What's your tz -- will you be around for next hour or so?
01:55 chenryn why there is only json in perl6 core? while the yaml.pm6 can only dump but not load... Is yaml not needed?
01:55 Mouq_ raiph: EST, and yup :)
01:57 Mouq_ chenryn: JSON was needed for.. I think modules, which use JSON for configuration (?)
01:58 Mouq_ chenryn: As for why Perl 6 doesn't have a YAML parser... :( I've often wondered that myself
01:59 wooden joined #perl6
01:59 raiph cherryn: it's only a little bit of it and not exposed for general use, please ignore that bit in core. (see http://irclog.perlgeek.de/perl6/2014-06-09#i_8843679)
02:01 Mouq_ m: say from-json(q[{ "abcd" : 123 }]) # Sure about that?
02:01 camelia rakudo-moar 1a3706: OUTPUT«{"abcd" => 123}␤»
02:03 Mouq_ (Dang lexically scoped core)
02:03 Mouq_ So who wants to translate https://github.com/ingydotnet/yaml-pm/blob/master/lib/YAML/Loader.pm ? :9
02:04 TimToady hmm, after upgrading to linux mint 17 and doing 'apt-get install mono-complete', my niecza won't run or even compile
02:04 Mouq_ (I'm kidding; I'm sure a grammar would be better suited)
02:05 SamuraiJack joined #perl6
02:07 Mouq Aha! https://github.com/ingydotnet/yaml-pgx
02:07 Mouq Pretty basic, but it's better than nothing
02:09 raiph Mouq: Did you see https://github.com/ingydotnet/yaml-pm6/ (doesn't build per http://75.134.170.198:3001/report)
02:10 TimToady mono version has jumped from 2.10 to 3.2, eep
02:12 [Coke] .d coleda
02:12 yoleaux Sorry, I couldn't find a definition for 'coleda'.
02:15 Mouq .d yoleaux
02:15 yoleaux Sorry, I couldn't find a definition for 'yoleaux'.
02:16 Mouq raiph: Yes :/ I've been hoping ingy would fix TestML.pm6 since all of YAML.pm6's tests are written for it
02:17 * Mouq sees how long it'll take him to whip up an YAML::Tiny
02:19 BenGoldberg Mouq, yoleaux is pronounced the same as 'YOLO', and acronym meaning 'You Only Live Once', which means "you should do stupid things now, since you won't get to do stupid things when you're dead"
02:21 rurban joined #perl6
02:22 Mouq BenGoldberg: Haha, well sometimes I like to imagine that people actually mean Carpe Diem when they say it, but then reality kicks in
02:22 wooden joined #perl6
02:24 Mouq And instead of plucking the blossoming day they've decided on puking just outside the bathroom door
02:25 Mouq Though most of the time I hear "YOLO", it's sarcastic, happily
02:27 * BenGoldberg doesn't quite understand why yolo/carpe diem seems to mean, "I/You should get so drunk that puking happens."  Surely it should also include things like sex, Waterskiiing, Skydiving/BASE Jumping, etc.
02:28 Mouq It should
02:29 Mouq And does
02:29 Mouq but YOLO
02:43 xragnar joined #perl6
02:48 raiph m: use t::spec::packages::A; # is the https://github.com/perl6/roast/tree/master/packages readme correct? should something like this work with camelia? with a local install?
02:48 camelia rakudo-moar 1a3706: OUTPUT«===SORRY!===␤Could not find t::spec::packages::A in any of: /home/p6eval/.perl6/2014.05-167-g1a3706c/lib, /home/p6eval/rakudo-inst-2/languages/perl6/lib, /home/p6eval/rakudo-inst-2/languages/perl6/vendor/lib, /home/p6eval/rakudo-inst-2/languages/perl6/si…»
02:51 raiph Mouq: ^^ ??
02:55 Mouq raiph: See https://github.com/perl6/roast/blob/master/S10-packages/basic.t#L158
02:56 Mouq "This way, we can just use t::spec::packages::Whatever;
02:56 Mouq "
02:57 Mouq ^^^ That I think is pretty incorrect
02:57 zengargoyle left #perl6
02:59 Mouq Also, I
02:59 Mouq well, nvm
02:59 Mouq :P
02:59 raiph heh, but thx :)
02:59 * Mouq is a little out of it tonight
02:59 raiph np
03:00 Mouq m: use Test; say Test::&ok.WHAT
03:00 camelia rakudo-moar 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nZ70USn6HDâ�¤Calling 'ok' requires arguments (if you meant to operate on $_, please use .ok or use an explicit invocant or argument)â�¤    Expected any of:     :($cond, Any $desc = { ... })â�¤at /tm…»
03:00 Mouq m: use Test; say Test::<&ok>.WHAT
03:00 camelia rakudo-moar 1a3706: OUTPUT«(Any)␤»
03:01 BenGoldberg m: use Test; say &Test::ok
03:01 camelia rakudo-moar 1a3706: OUTPUT«(Any)␤»
03:01 BenGoldberg m: use Test; say Test::<&ok>
03:01 camelia rakudo-moar 1a3706: OUTPUT«(Any)␤»
03:01 BenGoldberg m: use Test; say &ok
03:01 camelia rakudo-moar 1a3706: OUTPUT«sub ok (|) { #`(Sub|59050272) ... }␤»
03:01 Mouq m: use Test; say Test::.keys
03:01 camelia rakudo-moar 1a3706: OUTPUT«EXPORT␤»
03:03 bjz joined #perl6
03:27 sivoais joined #perl6
03:34 rurban joined #perl6
03:51 hoverboard joined #perl6
04:02 dayangkun joined #perl6
04:02 Mouq joined #perl6
04:08 rurban joined #perl6
04:16 rindolf joined #perl6
04:17 * Mouq wonders if the YAML spec is actually a modern labyrinth
04:17 anaeem1_ joined #perl6
04:20 chenryn Is ingy still write perl6?
04:22 ssutch joined #perl6
04:27 rurban joined #perl6
04:27 segomos_ how do i check to see if a socket is still open?
04:32 skids joined #perl6
04:37 breinbaas joined #perl6
04:38 ingy hi chenryn
04:38 ingy I write perl6, but only in spirit at the moment :)
04:40 ingy heya Mouq
04:41 ingy I've been doing some modern yaml stuff lately
04:41 ingy some of which you seem to have found
04:41 ingy yaml.pgx is really new, so expect it to flesh out quite a bit soon
04:43 aindilis joined #perl6
04:50 Mouq ingy: Okay, thanks! I did spend two hours on a YAML::Tiny, but I'm having a lot of trouble with the Tiny part, so I may abandon it
05:06 denis_boyun joined #perl6
05:21 virtualsue joined #perl6
05:27 rurban joined #perl6
05:29 rurban1 joined #perl6
05:31 FROGGS_ .tell Mouq no, not really. need to fix that
05:31 yoleaux FROGGS_: I'll pass your message to Mouq.
06:08 Mouq joined #perl6
06:13 ChoHag Is there any way to keep the jvm loaded and avoid the startup cost?
06:17 timotimo yes, the evalserver thing exists
06:17 timotimo we use it to run the test suite in a reasonable amount of time
06:21 ChoHag How does that work then?
06:22 kaare_ joined #perl6
06:25 timotimo i didn't use rakudo-jvm in a long time, sorry
06:25 timotimo the makefile should give you some hints
06:25 timotimo you start the eval server and it gives you a cookie that you have to provide in the client in order to be allowed to connect
06:29 kaleem joined #perl6
06:30 rurban joined #perl6
06:46 zakharyas joined #perl6
06:53 wooden joined #perl6
06:53 wooden joined #perl6
06:55 dayangkun joined #perl6
06:59 darutoko joined #perl6
07:01 FROGGS joined #perl6
07:05 sergot morning o/
07:06 FROGGS morning
07:06 yoleaux 10 Jun 2014 21:47Z <lizmat> FROGGS: does it make sense to have CUR::Local::File instances if which the directory does not exist ?
07:06 yoleaux 10 Jun 2014 21:51Z <lizmat> FROGGS: or CUR::Local::Installation for that matter ?
07:06 yoleaux 10 Jun 2014 22:46Z <Mouq> FROGGS: With your slang example, what is matched by `use COBOL; test ` is `; test `. Is the inclusion of the semicolon intentional?
07:07 FROGGS .tell lizmat perhaps yes... this way you could have a repo pointing to your usb stick
07:07 yoleaux FROGGS: I'll pass your message to lizmat.
07:08 mr-foobar joined #perl6
07:09 oetiker joined #perl6
07:09 SamuraiJack joined #perl6
07:11 bjz joined #perl6
07:14 skids joined #perl6
07:24 oetiker_ joined #perl6
07:27 rurban joined #perl6
07:27 lizmat good *, #perl6!
07:27 yoleaux 07:07Z <FROGGS> lizmat: perhaps yes... this way you could have a repo pointing to your usb stick
07:27 FROGGS morning lizmat
07:27 lizmat FROGGS: would it be too much too ask to mount your USB stick *before* starting to run the program ?
07:28 lizmat also: a USB stick sits on a mount point, which usually *is* a directory underneath
07:28 FROGGS lizmat: what if you have pulled out the stick... do you want to change your configuration every time?
07:28 FROGGS lizmat: the lop level dir of that mount point exists, correct
07:28 lizmat it's not about the configuration, it's about what sits in @*INC
07:28 FROGGS but the MyCPAN/lib/whatever does not
07:28 FROGGS ahh
07:29 FROGGS yes, we don't need to put that in @*INC then
07:29 lizmat whenever we create the CUR::Local::object
07:29 lizmat ok, then we are in agreement  :-)
07:29 lizmat breakfast&
07:30 takesako joined #perl6
07:32 FROGGS :o)
07:36 oetiker joined #perl6
08:01 denis_boyun_ joined #perl6
08:09 aindilis joined #perl6
08:10 denis_boyun__ joined #perl6
08:16 lizmat FROGGS: when trying to make "use lib" lexical, I found that somehow exporting variables seems to be done at runtime, rather than at compile time
08:17 lizmat but exporting subs *does* work at compile time
08:17 lizmat so I was thinking of creating a global sub INC { @*INC }
08:17 lizmat and export another sub INC { local setting closure } when doing "use lib"
08:18 moritz the problem with variables is that at compile time, only the proto lexpad is available
08:18 moritz not the actual lexpad
08:18 lizmat indeed, but a closure would be available, afaics
08:18 salv0 joined #perl6
08:18 dalek Perlito: 11913e2 | (Flavio S. Glock)++ | src5/util/perlito5.pl:
08:18 dalek Perlito: Perlito5 - command line - fix @INC order
08:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/11913e2e2e
08:19 Alula_ joined #perl6
08:28 aindilis` joined #perl6
08:28 rurban joined #perl6
08:33 dmol joined #perl6
08:37 fhelmberger joined #perl6
08:38 erkan joined #perl6
08:38 erkan joined #perl6
08:40 * lizmat scratches the INC idea
08:41 dakkar joined #perl6
08:47 lizmat FROGGS: I'm starting to think we need to special case "use lib" in the grammar
08:48 lizmat and generate a temp @*INC in the scope it is called
08:48 lizmat *have it
08:49 FROGGS hmm, I was hoping we can solve it in a better way...
08:49 moritz that doesn't make me very hopeful about extensibilty through modules
08:50 lizmat the other solution to have exporting @*INC at compile time with proper visibility at compile time work
08:50 lizmat *is
08:55 lizmat moritz: are you implying a replacement for lib.pm6 ?
08:55 lizmat or something else ?
08:55 moritz lizmat: not at the moment :-)
08:56 moritz lizmat: but I'm pretty sure the equivalent of Par::Packer might want to do something like that
08:56 lizmat that would be a matter of creating a custom Compunit::Repo object, and putting it in @*INC
08:56 lizmat if I understand Par::Packer's functionality
08:56 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev$ echo 'sub EXPORT(|) { say "exported hurz"; my %h; %h<$hurz> = 42; %h }' > Hurz.pm
08:56 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev$ perl6-m -I. -e 'use Hurz; BEGIN say $hurz'
08:56 FROGGS exported hurz
08:56 FROGGS 42
08:57 FROGGS lizmat: ^^
08:57 FROGGS I think for the @*INC case you get a redecl error message
08:58 lizmat FROGGS: that doesn't work if Hurz.pm is already compiled
08:58 lizmat afaik
08:58 lizmat (like in the lib.pm6 case)
08:59 FROGGS hmmm, exporting @*INC has no effect, but @INC does...
08:59 lizmat perhaps a deserialization issues ?
08:59 FROGGS lets see
08:59 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev$ perl6-m --target=mbc --output=Hurm.moarvm Hurz.pm
08:59 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev$ perl6-m -I. -e 'use Hurz; BEGIN say @INC'
08:59 FROGGS exported hurz
08:59 FROGGS 42
08:59 FROGGS err
09:00 FROGGS no, also without the type it works
09:00 FROGGS typo
09:00 FROGGS -.-
09:00 FROGGS MODULE_DEBUG: done loading /home/froggs/dev/Hurz.moarvm
09:00 FROGGS exported hurz
09:00 FROGGS 42
09:01 FROGGS so, when we import symbols we need to fix the case for dynamic variables
09:01 FROGGS then exporting @*INC should work
09:01 lizmat where does that live?
09:01 FROGGS (unless somebody declared a my @*INC in the loading code)
09:02 FROGGS import_EXPORTHOW in Perl6::Grammar or merge_globals in Perl6::ModuleLoader
09:02 FROGGS or do_import in the grammar
09:03 lizmat ok, need to prepare for commute to Paris (FPW coming up)
09:04 wooden joined #perl6
09:04 wooden joined #perl6
09:06 brrt joined #perl6
09:06 FROGGS hmmm, when we import @*INC it is :decl(static) in the ast and then ignored when 'say'ing it, when we declare it ourself, it is :decl(contvar) and then not ignored
09:08 lizmat so it would be a matter of exporting it with :decl(contvar) ?
09:10 FROGGS that is my guess, but my gut feeling says that this is not the issue
09:10 ssutch joined #perl6
09:38 jsn_ joined #perl6
09:39 ssutch joined #perl6
10:00 lizmat commute&
10:13 kivutar joined #perl6
10:21 aindilis joined #perl6
10:24 ssutch joined #perl6
10:26 ChoHag I have managed to make moar segfault.
10:27 ChoHag OTOH it's caused by abusing threads and with the eval server the jvm is only about 0.2 seconds slower than moar.
10:30 rurban joined #perl6
10:31 denis_boyun joined #perl6
10:32 telex joined #perl6
10:36 skids joined #perl6
10:36 brrt joined #perl6
10:45 dalek Perlito: c03563c | (Flavio S. Glock)++ | src5/lib/Perlito5/Javascript2/CORE.pm:
10:45 dalek Perlito: Perlito5 - js - fix split()
10:45 dalek Perlito: review: https://github.com/fglock/Perlito/commit/c03563c81f
10:48 sqirrel joined #perl6
10:54 woolfy1 left #perl6
11:05 chenryn joined #perl6
11:12 haroldwu_ joined #perl6
11:15 Util joined #perl6
11:15 breinbaas joined #perl6
11:17 cosimo joined #perl6
11:17 carlin joined #perl6
11:21 pdcawley joined #perl6
11:24 pochi joined #perl6
11:26 masak ChoHag: do you have more details of how you made moar segfault?
11:31 rurban joined #perl6
11:31 ChoHag It's from a very small snippet actually.
11:32 ChoHag So yes, but I'd have to rewrite it.
11:33 masak any clues would be welcome.
11:33 ChoHag Basically $*SCHEDULER.cue({ loop { $channel.receive; } }) with says at every point.
11:34 ChoHag Changing $*SCHEDULER.cue to Thread.start stops the segfaulting.
11:35 ChoHag And all .cue does is enqueue the code block then start it in another thread.
11:35 ChoHag So I think it's something to do with passing coderefs to other threads.
11:36 masak ok, thanks.
11:36 ChoHag However it's triggered quite randomly.
11:36 masak someone more threads-savvy than me might be able to turn that into a failing test.
11:36 dmol joined #perl6
11:36 ChoHag I'll put the code back into shape. It's quite tricky (ie. random) to reproduce.
11:37 masak well, indeterminism is a problem, but not an insurmountable one, usually.
11:38 Grrrr joined #perl6
11:47 haroldwu joined #perl6
11:47 FROGGS joined #perl6
11:53 ugexe_ joined #perl6
11:59 liztormato joined #perl6
12:01 liztormato FWIW, there are several S17 stress tests set to skip in the spectest. It's on jnthn's radar
12:02 liztormato left #perl6
12:03 anaeem1_ joined #perl6
12:05 rhr joined #perl6
12:06 spider-mario joined #perl6
12:09 integral joined #perl6
12:09 integral joined #perl6
12:11 baest joined #perl6
12:13 lue joined #perl6
12:14 rhr joined #perl6
12:14 jnthn joined #perl6
12:19 masak ah.
12:20 liztormato joined #perl6
12:32 rurban joined #perl6
12:40 dalek rakudo-star-daily: c2c8e9e | coke++ | log/ (14 files):
12:40 dalek rakudo-star-daily: today (automated commit)
12:40 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/c2c8e9e400
12:41 [Coke] moar spectest run will be clean again today. \o/
12:42 colomon joined #perl6
12:42 timotimo cool :)
12:43 grondilu_ joined #perl6
12:48 _sri joined #perl6
12:52 FROGGS joined #perl6
12:53 baest_ joined #perl6
12:56 krunen joined #perl6
12:57 virtualsue joined #perl6
12:58 kurahaupo joined #perl6
12:58 _sri joined #perl6
13:00 sftp joined #perl6
13:01 masak [Coke]++ # untiring spectesting
13:02 colomon joined #perl6
13:02 xinming_ joined #perl6
13:04 sergot m: my @a; @a.first({ $_ eq "A" });
13:04 camelia rakudo-moar 1a3706: ( no output )
13:06 sergot m: my @a; @a.first({ .name eq "A" });
13:06 camelia rakudo-moar 1a3706: ( no output )
13:07 masak 'say'
13:08 sergot masak++: actually I didn't want to say anything.
13:12 skids joined #perl6
13:13 ashleydev joined #perl6
13:13 masak ok :)
13:13 sergot m: my @a = <a b b>; @a.first({ $_ eq 'b' }):delete; say @a;
13:13 camelia rakudo-moar 1a3706: OUTPUT«a b b␤»
13:13 masak hm, no.
13:13 sergot masak: do you know maybe how can I do this? :)
13:13 masak :delete is an adverb on .{}
13:13 masak so that won't work.
13:13 masak I'd perhaps use .first-index or whatever
13:13 sergot yeah, I thought so.
13:13 masak and then .{$index}:delete
13:14 sergot hmmm
13:15 sergot m: my @a = <a b b>; my $index = @a.first-index({ $_ eq 'b' }); @a{$index}:delete; say $2;
13:15 camelia rakudo-moar 1a3706: OUTPUT«===SORRY!===␤Can not remove values from a Array␤»
13:15 sergot m: my @a = <a b b>; my $index = @a.first-index({ $_ eq 'b' }); @a{$index}:delete; say $@;
13:15 camelia rakudo-moar 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BoeoJSIbUjâ�¤Unsupported use of @; variableâ�¤at /tmp/BoeoJSIbUj:1â�¤------> [32m{ $_ eq 'b' }); @a{$index}:delete; say $[33mâ��[31m@;[0mâ�¤    expecting any of:â�¤        argument listâ�¤      â€¦Â»
13:15 sergot m: my @a = <a b b>; my $index = @a.first-index({ $_ eq 'b' }); @a{$index}:delete; say @a;
13:15 camelia rakudo-moar 1a3706: OUTPUT«===SORRY!===␤Can not remove values from a Array␤»
13:16 sergot m: my @a = <a b b>; my $index = @a.first-index({ $_ eq 'b' }); @a[$index]:delete; say @a;
13:16 camelia rakudo-moar 1a3706: OUTPUT«a (Any) b␤»
13:16 sergot masak++ thanks
13:17 masak and I wonder if you really want to leave a hole there.
13:17 masak maybe you want .splice($index, 1) ?
13:18 sergot m: my @a = <a b b>; my $index = @a.first-index({ $_ eq 'b' }); @a.splice($index, 1); say @a.perl;
13:18 camelia rakudo-moar 1a3706: OUTPUT«Array.new("a", "b")␤»
13:18 sergot masak: yes, much better
13:18 sergot masak++ :)
13:19 _sri joined #perl6
13:21 masak m: my @a = <a b b>; .splice(.first-index({ $_ eq 'b' }), 1) given @a; say @a.perl
13:21 camelia rakudo-moar 1a3706: OUTPUT«Array.new("a", "b")␤»
13:21 masak \o/
13:22 sergot nice!
13:22 masak oh, actually
13:22 masak m: my @a = <a b b>; .splice(.first-index('b', 1) given @a; say @a.perl
13:22 camelia rakudo-moar 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8cx82qy5__�Unable to parse expression in argument list; couldn't find final ')' �at /tmp/8cx82qy5__:1�------> [32m= <a b b>; .splice(.first-index('b', 1) [33m�[31mgiven @a; say @a.perl[0…»
13:22 masak oops
13:22 masak m: my @a = <a b b>; .splice(.first-index('b', 1)) given @a; say @a.perl
13:22 camelia rakudo-moar 1a3706: OUTPUT«Cannot call 'first-index'; none of these signatures match:␤:(Any: Regex:D $test, *%_)␤:(Any: :D $test, *%_)␤:(Any: $test, *%_)␤  in block  at /tmp/awYaDbDYFR:1␤␤»
13:22 masak aww
13:23 masak clearly .first-index should be able to match on literal things, no?
13:23 masak .grep and .first certainly do.
13:23 moritz yes, it should take Mu and smart-match against it
13:24 * masak submits rakudobug
13:25 thou joined #perl6
13:27 ssutch joined #perl6
13:34 bluescreen10 joined #perl6
13:34 [Coke] rakudo.jvm run getting much further this morning.
13:34 rindolf joined #perl6
13:35 [Coke] m: my @a = <a b b>; say @a.squish
13:35 camelia rakudo-moar 1a3706: OUTPUT«a b␤»
13:38 ChoHag Can I have a class attribute which must be set on initialisation, has no default yet cannot be changed?
13:38 ChoHag Or, rather, how?
13:39 moritz m: class A { has $.required = die 'attribute "required" is, well, required'; }; say A.new(required => 42).required; A.new()
13:39 camelia rakudo-moar 1a3706: OUTPUT«42␤attribute "required" is, well, required␤  in method  at /tmp/dZJZqIK0d6:1␤  in block  at src/gen/m-CORE.setting:921␤  in method BUILDALL at src/gen/m-CORE.setting:876␤  in method bless at src/gen/m-CORE.setting:865␤  in method new at src/gen…»
13:40 Timbus fail
13:41 Timbus .. er. you could use fail. or as someone pointed out to me a little bit ago, you can also use !!!
13:41 moritz you can also add a submethod BUILD that initializes the attribute, and complain if the value is missing
13:42 Timbus i do think a 'required' trait would be better tho
13:43 Timbus it feels odd to suggest stealing things from moose...
13:44 [Coke] rakudo.jvm only made it as far as S06-other/main.t this time.
13:44 [Coke] .tell donaldh rakudo.jvm only made it as far as S06-other/main.t this time. it worked fine with  your first tweak but has failed on subsequent runs with later changes. Any ideas?
13:44 yoleaux [Coke]: I'll pass your message to donaldh.
13:45 dalek perl6-roast-data: c00b578 | coke++ | / (6 files):
13:45 dalek perl6-roast-data: today (automated commit)
13:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/c00b5783f3
13:45 _sri joined #perl6
13:47 Timbus m: my ($a) = (1,); say $a.perl;  ($a) = (1,); say $a.perl;
13:47 camelia rakudo-moar 1a3706: OUTPUT«1␤$(1,)␤»
13:53 guru joined #perl6
14:00 masak unexpected.
14:01 moritz m: my $a; ($a, ) = (1,); say $a.perl
14:01 camelia rakudo-moar 1a3706: OUTPUT«1␤»
14:01 moritz expected
14:05 jnthn , is what constructs parcels, not parens.
14:05 moritz ... except in the declaration
14:06 brrt left #perl6
14:07 jnthn In the declaration we parse a signature there, not a list.
14:07 masak ah, that explains it.
14:08 [particle] joined #perl6
14:08 ssutch joined #perl6
14:12 sqirrel joined #perl6
14:12 thou joined #perl6
14:13 Alina-malina joined #perl6
14:25 ssutch joined #perl6
14:36 dalek ecosystem: d65f753 | (Kamil Kułaga)++ | META.list:
14:36 dalek ecosystem: added lacuna-cookbuk
14:36 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d65f7538d4
14:36 dalek ecosystem: 6d22cd5 | moritz++ | META.list:
14:36 dalek ecosystem: Merge pull request #30 from teodozjan/patch-1
14:36 dalek ecosystem:
14:36 dalek ecosystem: added lacuna-cookbuk
14:36 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6d22cd5ef9
14:39 masak cook..buk?
14:39 ssutch joined #perl6
14:40 molaf joined #perl6
14:41 denis_boyun joined #perl6
14:41 FROGGS lacuna-expanse seems to.... expand
14:42 masak it's not big enough to have a Wikipedia entry yet.
14:44 Mouq joined #perl6
14:50 treehug88 joined #perl6
14:54 ssutch joined #perl6
14:59 colomon joined #perl6
15:02 hoelzro I wish I could use P6 regexes in P5 =/
15:03 hoelzro I also wish I knew how to how P6 regexes.
15:03 hoelzro *how to use
15:03 kaare_ joined #perl6
15:04 hoelzro also, FROGGS++ on COBOL.pm
15:05 FROGGS well, P6 regexes are not very hard
15:05 ChoHag Not like that.
15:06 hoelzro FROGGS: I don't think they're right, per se...I just have to familiarize myself with them
15:07 FROGGS yeah
15:09 hoelzro I started an Anki deck for them
15:09 hoelzro but I need to finish up my other project first...
15:22 hoelzro I'm guessing that p6 slangs (like COBOL) are only good for completely overriding the grammar atm? it is still impossible to augment the existing P6 grammar (ie. to add keywords?)
15:23 Alina-malina joined #perl6
15:23 FROGGS wait
15:24 FROGGS first, that COBOL.pm is just a stub, it does not implement anything COBOLish
15:25 FROGGS second, these kind of slangs allow you to parse the code of a block for example differently, or generate a different ast
15:26 FROGGS it is still possible to add keywords to the current P6 grammar, like by doing: my &infix... my &term...
15:26 FROGGS what does not work yet is that we have categories like 'statement_control' that we can add candidates for
15:29 jsn_ joined #perl6
15:30 Alina-malina joined #perl6
15:30 FROGGS m: sub infix:<ß>(\a, \b) { a + b }; say 2 ß 3
15:30 camelia rakudo-moar 1a3706: OUTPUT«5␤»
15:31 FROGGS m: sub sigil:<*>(\a) { 3*a }; my *2
15:31 camelia rakudo-moar 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tCxnZEE_zJâ�¤Cannot add tokens of category 'sigil'â�¤at /tmp/tCxnZEE_zJ:1â�¤------> [32msub sigil:<*>[33mâ��[31m(\a) { 3*a }; my *2[0mâ�¤    expecting any of:â�¤        colon pairâ�¤        quot…»
15:31 FROGGS and this is the way to augment the current grammar, at least I think so
15:33 ChoHag How do you write a BUILD submethod does something (just print for now) and then continues the default BUILD process?
15:33 moritz you don't
15:33 moritz it's either your own, or the default process
15:34 jnthn (With a sidenote that defualt still get applied if you don't touch the attribute...)
15:34 jnthn *defaults
15:34 hoelzro FROGGS: ok, that's what I was thinking
15:35 ChoHag But they don't.
15:35 hoelzro I already knew that COBOL.pm didn't actually do anything COBOLish =)
15:35 ChoHag > class foo { submethod BUILD { say "IN BUILD" }; has $.bar }; say foo.new: bar=>"6*7";
15:35 ChoHag IN BUILD
15:35 jnthn m: class F { has $.x = 42; submethod BUILD() { say "build" } }; F.new.x.say
15:35 ChoHag foo.new(bar => Any)
15:35 camelia rakudo-moar 1a3706: OUTPUT«build␤42␤»
15:35 jnthn I said *defaults*.
15:35 FROGGS hoelzro: though it would be nice of course when you could declare a grammar that inherits from Perl6::Grammar... but this will be a bit painful
15:35 jnthn Like the "= 42" thing there
15:36 ChoHag So how can I get the default behaviour without having to reproduce it?
15:36 jnthn You don't.
15:36 jnthn What moritz said.
15:36 SamuraiJack_ joined #perl6
15:36 ChoHag So how do I carry out the default process with a slight rather than wholesale adjustment?
15:37 ChoHag Or is this one of those elusive easy things made hard perl is famed for not having?
15:37 guru joined #perl6
15:37 hoelzro FROGGS: that's what I was hoping for
15:37 hoelzro I have had a few ideas for neat modules that would require such a feature
15:37 moritz ChoHag: for example by giving attributes default values
15:38 hoelzro well, they could still work without it, but they would be prettier to look at =)
15:38 moritz that can depend on other attributes
15:38 FROGGS hoelzro: in theory you can inherit from it but then you must write your stuff in nqp
15:38 hoelzro right
15:38 ChoHag In particular, I don't want to have to deal with every attribute (especially those belonging to roles) passed to the constructor.
15:41 jnthn m: class A { has $.x; method BUILDALL(|) { callsame; say "and after all the default building..."; self } }; A.new(x => 42).x.say
15:41 camelia rakudo-moar 1a3706: OUTPUT«and after all the default building...␤42␤»
15:42 jnthn After BUILDALL you know you've got a fully constructed object.
15:45 ChoHag Thankyou.
15:48 mr-fooba_ joined #perl6
15:51 mr-foobar joined #perl6
15:53 ajr joined #perl6
15:53 zengargoyle joined #perl6
15:56 mr-fooba_ joined #perl6
16:01 denis_boyun joined #perl6
16:05 SamuraiJack_ joined #perl6
16:20 guru joined #perl6
16:21 molaf_ joined #perl6
16:36 Alina-malina joined #perl6
16:42 Rotwang joined #perl6
16:43 isBEKaml joined #perl6
16:43 rindolf jnthn: hi, are you there?
16:44 LordVorp joined #perl6
16:44 fhelmberger joined #perl6
16:44 rindolf hoelzro: hi, are you there?
16:45 hoelzro rindolf: yes
16:45 hoelzro what's up?
16:45 rindolf hoelzro: I'm fine.
16:46 rindolf hoelzro: I'm looking for someone to go over all the pages here: http://www.shlomifish.org/humour/bits/facts/ and comment.
16:46 rindolf I'm willing to give a link with name/email/URL/etc. and 1,000,000 love points.
16:47 zengargoyle joined #perl6
16:48 rindolf http://www.shlomifish.org/humour/fortunes/show.cgi?id=sharp-perl-how-big-is-Yaakovs-GREAT-HUGE-LOVE - GREAT HUGE LOVE.
16:49 masak ah, rindolf, you off-topic huggable, you.
16:50 * rindolf hugs masak
16:50 rindolf I'm looking for one person, and in big forums, the chance that anyone will answer is lower.
17:06 FROGGS joined #perl6
17:08 * [Coke] reads http://www.shlomifish.org/humour/bits/facts/Emma-Watson/ quickly, doesnt' get it, and moves on.
17:34 ingy Mouq: idea. if I get a perl5 yaml parser working with pegex, we should easily be able to port to p6
17:34 ingy since pegex =~= p6rules
17:35 lizmat joined #perl6
17:35 * lizmat has arrived in Paris, France
17:35 vendethiel joined #perl6
17:36 treehug88 joined #perl6
17:43 nwc10 lizmat: wave to paris.pm from me, please
17:44 lizmat will do so when we see them (tomorrow night, afaik)
17:46 Sqirrel joined #perl6
17:46 * vendethiel will wave to lizmat too, but IRL hopefully
17:46 rurban joined #perl6
17:47 lizmat vendethiel: when will you be where ?
17:47 vendethiel lizmat: I wasn't aware of something tomorrow
17:47 lizmat ah?
17:47 [Coke] Any sixers want to try to make an Albany.pm meeting? :)
17:48 vendethiel lizmat: don't take your informations from me ! You'd be lost in no time
17:48 kivutar joined #perl6
17:48 guru joined #perl6
17:50 vendethiel lizmat: I think there was something tonight ?
17:50 vendethiel you'd need to ask cognominal
17:52 cognominal vendethiel: there's is a social meeting at the Maldoror. About to go to it.
17:53 vendethiel well, would've told lizmat.
17:53 lizmat joined #perl6
17:54 cognominal too late, sorry. She probably knows about it. She knows elbeho who coordiantes all social mongueurs activities.
17:55 vendethiel and there's something tomorrow as well ?
17:56 cognominal wendethiel: hope, I will see you tonight. And I hope, the RER B train will be work normally (or abnormally because abnormal is the new norm for this line)
17:58 cognominal vendethiel: apparently, there will be a pre fpw dinner, as usual. It should be announced in the wiki here, http://journeesperl.fr/fpw2014/wiki
17:58 vendethiel I'll grab something to eat first, then
17:58 lizmat noithing on the wiki yet
18:00 cognominal lizmat, I am going to maldoror, I should be there in 30-60 minutes depending on potential problems on RER B (they are more or less on strike)
18:01 lizmat maldoror, c'est quoi ca?
18:01 cognominal I can't join elbeho on its personnal phone meaning he is probably in the subway.
18:01 cognominal http://www.maldoror.fr/   that's our usual meeting place
18:02 cognominal ... named after a Lautreamont's novel  http://en.wikipedia.org/wiki/Les_Chants_de_Maldoror
18:03 cognominal https://www.google.com/maps/place/Maldoror/@48.865111,2.36917,17z/data=!3m1!4b1!4m2!3m1!1s0x47e66dfd47f215db:0x130fc1eb3656ad6a
18:04 cognominal metro Oberkampf. And yes it is open again  http://www.ratp.fr/fr/ratp/r_105365/metro-ligne-5-reouverture-de-la-station-oberkampf/
18:04 cognominal so see you there if you come
18:05 lizmat ah, the revolutionary place ?
18:06 woolfy joined #perl6
18:06 cognominal nope. http://en.wikipedia.org/wiki/Oberkampf
18:06 cognominal really gone now
18:08 * masak .oO( In the Land of Maldoror, where the Shadows lie. )
18:08 woolfy cognominal: hoooo
18:08 woolfy wait, what do you mean?  Oberkampf what?
18:10 lizmat Maldoror, the anarchistic restaurant where I had Andouille for the first (and last) time ?
18:10 woolfy Hmmm too late...
18:13 FROGGS yays! I got my shipping confirmation from shop@github.com :D
18:13 woolfy Yep, just got message from elbeho...  they are whaiting for us at Maldoror, near Oberkampf station.
18:13 FROGGS Oberkampf!!!
18:13 FROGGS why do germans always have names like these?
18:14 FROGGS but it fits that Oberkampf is near Mordor
18:16 lizmat the funny thing is, to get to Oberkampf from the hotel, we need to change at Stalingrad  :-)
18:16 woolfy It's not German, Oberkampf was a Frenchman.
18:16 woolfy Real German name, isn't it.  :-)
18:16 FROGGS "The name refers to Rue Oberkampf, named for Christophe-Philippe Oberkampf, an 18th-century German-born French industrialist."
18:17 rurban1 joined #perl6
18:17 FROGGS okay, back to hacking :o)
18:18 * vendethiel is grabbing something to eat before coming
18:18 woolfy See, French!
18:18 FROGGS hehe
18:19 lizmat vendethiel: don't they have something at Maldoror ?
18:20 vendethiel lizmat: they probably do, but as a student, I prefer eating home
18:20 lizmat ah, ok  :-)
18:20 * lizmat remembers eating at home
18:22 vendethiel lizmat: will I see you tonight, or friday/saturday ?
18:22 lizmat we'll be coming to maldoror as well
18:22 lizmat not sure how long that will take...  :-)
18:23 vendethiel Well, I'll be here by 9pm or so :)!
18:23 ssutch joined #perl6
18:23 vendethiel Time to get going -- o/, *
18:23 FROGGS vendethiel: o/
18:29 ggoebel111116 I'm working to setup a travis ci proof of concept... running into issue compiling moar. Any thoughts on the following: https://travis-ci.org/perl6-ci/rakudo/builds/27334735
18:30 ggoebel111116 ===SORRY!===
18:30 ggoebel111116 Start argument to substr out of range. Is: -1, should be in 0..0
18:30 ggoebel111116 make: *** [RESTRICTED.setting.moarvm] Error 1
18:32 FROGGS it successfully compiled moar and nqp btw
18:32 FROGGS sad that there is no backtrace for the substr error
18:33 xfix I find it interesting you configured Travis to compile Perl code.
18:33 xfix I think Perl is still available even in C mode, and C mode would allow different compilers.
18:34 ggoebel111116 hmm... I read the docs the opposite way. C is available in modes. I can certainly switch things up.
18:34 ggoebel111116 I noticed travis now has support for osx
18:34 FROGGS xfix: I'm not sure I get what you say
18:34 ggoebel111116 c compilers are available in all the language vm's
18:35 ggoebel111116 assume I know very little about what I'm doing... and you won't be far off...
18:36 ggoebel111116 figured if I could break my Europa Universalis IV addiction... I might be able to spend a couple hours a day working on ci
18:36 xfix You will need to set --compiler variable for Perl 6 however.
18:36 xfix There is no need to work couple hours a day ;-).
18:37 brrt joined #perl6
18:37 xfix Travis CI is something that can be set, and then it notifies you when the build breaks.
18:37 xfix Also, it would be great if it would run tests.
18:37 xfix However, that may break execution time limit.
18:38 ssutch joined #perl6
18:38 ggoebel111116 I believe the compiler is available as an env variable
18:38 xfix Yes, CC variable.
18:38 rurban1 ggoebel111116: you can have a look at my B::C .travis.yml or the parrot .travis.yml
18:39 anaeem1 joined #perl6
18:39 xfix Oh, it appears they increased the limit to 50 minutes (it was 20 minutes once), or 10 minutes without any new output.
18:39 rurban1 I have a special testfast target for travis
18:40 rurban1 And you can also specify which part of the testmatrix is a TODO
18:41 ggoebel111116 rurban1: thx that is very helpful
18:41 rurban1 running testjobs in parallel helped most (TEST_JOBS=10)
18:41 rurban1 and skipping long-running tests
18:47 ren1us joined #perl6
18:47 ren1us so, apparently Hash.exists() is deprecated, and I'm supposed to use a :exists adverb.  what's an adverb, to perl6, and how do i use it?
18:50 colomon %my-hash{"key"} :exists
18:50 colomon m: my %h; say %h{"blue"} :exists
18:50 camelia rakudo-moar 1a3706: OUTPUT«False␤»
18:50 ren1us eh, that works
18:50 colomon m: my %h; %h<blue> = "gill"; say %h{"blue"} :exists
18:50 camelia rakudo-moar 1a3706: OUTPUT«True␤»
18:51 colomon m: my %h; %h<blue> = "gill"; say %h{"blue", "green"} :exists
18:51 camelia rakudo-moar 1a3706: OUTPUT«True False␤»
18:51 colomon m: my %h; %h<blue> = "gill"; say %h<blue green> :exists # don't know if this one works or no
18:51 camelia rakudo-moar 1a3706: OUTPUT«True False␤»
18:52 SamuraiJack_ joined #perl6
18:53 carlin joined #perl6
18:57 erdic joined #perl6
18:58 SamuraiJack__ joined #perl6
19:02 ggoebel111116 hmm... I get no error when following the same steps locally on windows
19:03 SamuraiJack__ joined #perl6
19:04 ggoebel111116 compiling moarvm, nqp, and rakudo that is...
19:04 ggoebel111116 perl Configure.pl --gen-moar --gen-nqp --backends=moar
19:06 ggoebel111116 is anyone else seeing the substr error on linux?
19:09 ren1us erm, what's a multidimensional index?
19:09 ren1us apparently i just tried to use them and they're not in yet so i'm not sure which part of this line i need to change
19:10 ren1us you guys are really good at coming up with fancy sounding names for things
19:13 rurban1 multidimensional index is a common CS term. https://en.wikipedia.org/wiki/Array_data_structure#Multidimensional_arrays
19:15 ren1us oh, that's kinda awkward since i don't, to my knowledge, actually have any arrays in the line that's pitching a fit
19:15 ivanshmakov joined #perl6
19:16 nwc10 ggoebel111116: I am not seeing it. Tested just now
19:17 nwc10 so, sorry, can't help
19:18 anaeem1 joined #perl6
19:18 ivanshmakov joined #perl6
19:21 ggoebel111116 nwc10: thx
19:28 ssutch joined #perl6
19:30 carlin that substr error is what perl6-debug currently fails with, which I think has something to do with the version number not being set properly
19:30 carlin might be related
19:30 carlin might not be as well though
19:32 raiph joined #perl6
19:32 ggoebel111116 carlin: thx. -I'll switch to a different backend and see if I make more headway
19:39 anaeem1_ joined #perl6
19:42 cogno joined #perl6
19:43 Guest29714 r: .d "wtf"
19:43 camelia rakudo-jvm 1a3706: OUTPUT«Can't call method "syswrite" on an undefined value at /home/p6eval/jvm-rakudo/eval-client.pl line 32.␤»
19:43 camelia ..rakudo-{parrot,moar} 1a3706: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32m.d [33mâ��[31m"wtf"[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix stopperâ�¤    â€¦Â»
19:44 anaeem1_ joined #perl6
19:45 masak Guest29714: "two terms in a row" because you're making a method call (.d) and then just writing a literal ("wtf") next to it
19:45 masak Guest29714: that's always illegal in Perl 6.
19:45 masak Guest29714: `.d: "wtf"` works
19:46 masak Guest29714: as does `.d("wtf")`
19:46 Guest29714 m: my $a = "foo".IO.d
19:46 camelia rakudo-moar 1a3706: OUTPUT«Unhandled exception: Failed to find 'foo' while trying to do '.d'␤   at <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:12907  (/home/p6eval/rakudo-inst-2/languages/per…»
19:47 * masak is not sure he likes .d throwing an exception if the file isn't found
19:47 masak seems to me a likelier use case to ask "is there a directory at 'foo'?"
19:47 masak and not care about whether the reason for there not being one is that (a) it's a regular file or (b) it's not there at all
19:48 Guest29714 m: my $a = "foo".IO.d; 1
19:48 camelia rakudo-moar 1a3706: ( no output )
19:48 masak yes, that's do it. the Failure isn't evaluated, so it doesn't trigger.
19:48 masak 'd*
19:49 mr-foobar joined #perl6
19:54 [Coke] rakudo-j camelia failures: probably related to last tweak of eval server?
19:54 treehug88 joined #perl6
19:54 [Coke] ah. did a run where I backed out only the most recent change to the eval server - it still explodes.
19:55 [Coke] Guess I'll have to shut it off again. :(
19:56 kivutar joined #perl6
19:57 timotimo i think the .exists() deprecation message could very well mention that :exists is used with postcircumfix:<{ }>
19:57 [Coke] .tell donaldh This exception from the eval server look fixable? https://gist.github.com/coke/77a58d476a1008749362
19:57 yoleaux [Coke]: I'll pass your message to donaldh.
20:00 hoverboard joined #perl6
20:04 cogno joined #perl6
20:06 masak timotimo: well volunteered. I agree, I think.
20:06 timotimo heh.
20:06 timotimo seems easy enough
20:10 dalek rakudo/nom: 243ef3e | timo++ | src/core/Hash.pm:
20:10 dalek rakudo/nom: point at postcircumfix:<{ }> for adverbs
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/243ef3ece3
20:10 masak nice.
20:16 raiph masak: 'use' of a module with a compile time error in it dies with the "Start argument to substr out of range. Is: -1, should be in 0..0" error that popped up in the last couple days. (http://irclog.perlgeek.de/perl6/2014-06-11#i_8852890)
20:18 raiph masak: That led me to suggest a spectest that would have caught this basic fail
20:20 masak oh, I've had 'use' of a module with a compile time error lately too.
20:20 masak had been too busy to golf it, though. thought it was just me.
20:20 masak the error was different, but that might have changed.
20:20 ChoHag How can a class provide a value for a role's attribute?
20:21 masak ChoHag: assign it during initialization?
20:21 ChoHag I mean what is the syntax to do that, short of adding it to the BUILD method?
20:22 raiph masak: Looks like any compile time error. Which raises an exception. Which is presumably triggering another exception when processing that exception.
20:23 masak *nod*
20:25 masak ChoHag: I think 'adding it to the BUILD method' might be it.
20:25 masak that's where initialization tends to happen, after all.
20:25 masak m: role R { has $.a }; class C does R { submethod BUILD { $!a = 42 } }; say C.new.a
20:25 camelia rakudo-moar 1a3706: OUTPUT«42␤»
20:26 raiph masak: Mouq suggested adding a module to t/spec/packages with a compile time error in it then making sure 'use'ing it does indeed return a compile time error. But it strikes me that the issue is more basic: is exception handling itself borked?
20:26 masak raiph: checking that it returns the *right* compile time error should do it.
20:28 raiph masak: Yes. Wasn't happy with using a "confused" error cuz a "Confused" error might one day become something else for a particular type of error.
20:29 raiph masak: But more generally this is borked processing of an exception message
20:29 bcode joined #perl6
20:37 masak *nod*
20:39 Gothmog_ joined #perl6
20:39 masak joined #perl6
20:39 sergot joined #perl6
20:40 firnsy joined #perl6
20:40 firnsy joined #perl6
20:40 kshannon joined #perl6
20:40 tempire_ joined #perl6
20:40 dagurval joined #perl6
20:40 cotto joined #perl6
20:40 sunnavy joined #perl6
20:40 go|dfish joined #perl6
20:40 ilogger2 joined #perl6
20:41 camelia joined #perl6
20:42 Mouq joined #perl6
20:42 dmol joined #perl6
20:42 actually_masak grr.
20:42 anaeem1 joined #perl6
20:42 actually_masak look away one minute, and freenode decides to storm and disallow access to one's nick.
20:44 raiph actually_masak: Is there really any practical value to creating a generic "Does Rakudo catch that a module has a compile time error in it" test?
20:45 fhelmberger joined #perl6
20:45 raiph actually_masak: I'm thinking there might be value in having a "Are error/warning messages getting processed correctly" test.
20:45 ponbiki joined #perl6
20:46 actually_masak raiph: I think there is a lot of practical value in creating a test that would have caught *specifically* the failure we're seeing right now.
20:46 kurahaupo joined #perl6
20:47 actually_masak raiph: thinking about catching a wider set of errors feels like premature generalization.
20:49 raiph actually_masak: Well what exactly is the error? It's catching a compile time error in a module -- but then the complaint is going awry.
20:50 raiph actually_masak: I'm really just trying to address the underlying problem; the fact it's more generic is almost incidental
20:55 actually_masak raiph: what I'm proposing is a test that does 'use' on a module with (say) two terms in a row. then we check for the presence of the substring "Two terms in a row" in the resulting error.
20:56 actually_masak raiph: that currently fails, and so we have a failing test for what needs to be fixed.
20:56 PerlJam Yeah, those pesky TTIAR should be eliminated!  ;)
20:58 labster joined #perl6
21:01 actually_masak ;)
21:02 actually_masak PerlJam: no, we'd be checking for the *presence* of that error.
21:02 raiph actually_masak: Sure. (Well, I was thinking $! ~~ X::Syntax::TTIAR) But what's really broken is not TTIAR processing, and, I suspect, not even compile time error processing, but something about error processing itself. Anyhow, I'll go ahead and try prepare a PR for a basic 'use' test.
21:02 actually_masak oh, smartmatching is even better, I guess.
21:02 PerlJam better than checking for a specific string
21:02 actually_masak I figured we'd need to do this in a subprocess, because it fails at compile time.
21:03 actually_masak but if we can actually get the exception out in the same process, that's better, of course.
21:03 PerlJam Is there no way to EVAL the use?
21:03 raiph PerlJam: that's what Mouq suggested; I didn't know why
21:03 actually_masak raiph: the fact that we didn't get an X::Syntax::TTIAR back would (correctly) indicate that something is wrong about error processing itself.
21:04 actually_masak oh, EVAL'ing the use should do it.
21:06 PerlJam doesn't look like it works in my little experiment locally, so maybe a subprocess is needed
21:06 PerlJam (or I'm daft in making it work)
21:08 actually_masak m: try EVAL "42 43"; say $!.message
21:08 camelia rakudo-moar 1a3706: OUTPUT«Two terms in a row␤»
21:08 actually_masak I get the same when I put "use A" in the eval, and A.pm contains "42 43".
21:09 actually_masak and the exception type is the same -- X::Syntax::Confused -- in both cases, too.
21:09 actually_masak it's only when I actually `use A;` outside of an EVAL that I get odd results.
21:10 anaeem1 joined #perl6
21:27 ivanshmakov joined #perl6
21:29 ivanshmakov joined #perl6
21:37 treehug88 joined #perl6
21:39 hummeleB1 joined #perl6
21:47 segomos_ is there a way in a class to do 'is rw' and have a default value?
21:47 segomos_ for a $.var
21:47 timotimo uh, can't you just is rw = 42?
21:48 jnthn class A { has $.a is rw = 42 }
21:48 timotimo m: class Foo { has $.var is rw = 42; }; Foo.new().var.say;
21:48 camelia rakudo-moar 243ef3: OUTPUT«42␤»
21:48 segomos_ jesus
21:48 segomos_ i should stop
21:48 segomos_ ty
21:48 timotimo np
21:48 ssutch joined #perl6
21:56 masak 'night, #perl6
21:57 raiph night masak
21:57 raiph thx for help
22:03 japhb_ joined #perl6
22:07 timotimo http://dogeon.org/index-de.html %)
22:23 skids joined #perl6
22:30 lizmat joined #perl6
22:30 woolfy joined #perl6
22:36 * vendethiel made it alive (apparently)
22:37 vendethiel I basically spent the whole antenoon annoying lizmat.
22:37 denis_boyun_ joined #perl6
22:37 lizmat hehe....  I was *so* annoyed, you can't believe it!
22:37 vendethiel "when is he gonna stop talking?"
22:38 * vendethiel had a lot of fun :)
22:39 lizmat we did as well  :-)
22:48 hummeleB1 joined #perl6
22:49 vendethiel joined #perl6
22:51 BenGoldberg joined #perl6
22:56 * woolfy was annoyed because some people were annoying to eachother...  incredible...  that is so not #perl6 !
22:57 * vendethiel couldn't really talk with woolfy at all
22:57 * woolfy wanted to take pictures but was forbidden...
22:58 * vendethiel hit his head trying to avoid a picture :(
22:59 woolfy that was funny :-)
22:59 vendethiel Hey, uncool !
22:59 woolfy Oh was cool, you did it in a real Charlie chaplin slapstick way, sooo cool.  Really.
23:00 woolfy I should have taped it.
23:00 woolfy But you forbade it.
23:00 woolfy (forbidded?)
23:00 vendethiel good.
23:00 vendethiel (havn't seen enough charlie chaplin movies to know what you're talking about.)
23:01 woolfy Back to work!
23:09 dalek rakudo/nom: 60aaed2 | (Elizabeth Mattijsen)++ | src/core/ (11 files):
23:09 dalek rakudo/nom: Continue with timotimo++ 's work
23:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/60aaed2be6
23:10 dalek roast: 4c8ca36 | (Elizabeth Mattijsen)++ | S02-types/deprecations.t:
23:10 dalek roast: Adapt deprecation checks to changed messages
23:10 dalek roast: review: https://github.com/perl6/roast/commit/4c8ca36ff0
23:11 lizmat and this completes it for now for me...
23:11 lizmat good night, #perl6!
23:12 woolfy left #perl6
23:16 rurban joined #perl6
23:16 * cognominal got back despite the obfuscations. At Gare du Nord, the displays was saying there was perturbation not indicating anymore where/when  the trains were going.
23:46 cognominal joined #perl6
23:46 ren1us is there anything *wrong* with using an object (other than a string or something standard like that) as a key in a hash?
23:47 ren1us because it's making my code freak out and that makes me freak out
23:56 raiph ren1us: can you paste something here to illustrate?
23:59 raiph m: my $o = Any.new; my %h = $o => 1; say %h{$o} :exists
23:59 camelia rakudo-moar 243ef3: OUTPUT«True␤»
23:59 raiph m: my $o = Any.new; my %h = $o => 1; say %h{$o} :delete
23:59 camelia rakudo-moar 243ef3: OUTPUT«This type cannot unbox to a native string␤  in method delete_key at src/gen/m-CORE.setting:9503␤  in block  at src/gen/m-CORE.setting:2037␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2699␤  in block  at /tmp/c5GThS4aHM:1␤␤»

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

Perl 6 | Reference Documentation | Rakudo