Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-05

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:04 raydiak J-L: I'm not sure as I don't use star but I assume that is correct...you can likely use the installer which contains all of them if you like, but you (apparently) still need to un-install the old one first and re-install just moar to ensure everything works out
00:05 J-L Okay, I'll try it...
00:08 raydiak timotimo: is it known that nums don't always optimize as well as ints?
00:10 timotimo raydiak: in what circumstance?
00:11 raydiak timotimo: gimme a minute or two I'll commit the example in Inline::Lua if you like
00:12 raydiak but just basic loop() and addition
00:12 timotimo on nqp, math tended to be num by default even when it could have been int, which often used to have generated too many coercions
00:12 timotimo are you on the very, very latest rakudo? or perhaps on a rakudo before jnthn merged native_ref?
00:12 timotimo that had a bit of a performance hit we haven't yet ironed out again
00:13 raydiak timotimo: nom from like 2 hours ago
00:13 timotimo try nom with jnthn's latest commit from half an hour ago
00:13 raydiak will do, though I'm not using ++...does it help other things too?
00:15 timotimo hopefully
00:18 raydiak actually, looks like it's only about half as fast, which is...possibly within the expected range? building latest rakudo will try again; the example is in examples/ in Inline::Lua now
00:18 timotimo hum
00:20 raydiak I was using num64 instead of num originally, I'll try that again too after rakudobrew finishes
00:20 timotimo hm, aren't our nums usually num64 on most systems you'd find nowadays?
00:21 J-L Okay, I uninstalled perl 6 and reinstalled the one with Moar.  Now 'perl6 --version' says:  This is perl6 version 2014.12 built on MoarVM version 2014.12
00:21 raydiak looks better
00:21 raydiak timotimo: idk tbh
00:21 timotimo J-L: that's a huge improvement in terms of everything
00:23 J-L I'm surprised it's so much smaller.  It's like less than half the size than the one with Parrot.
00:23 Hor|zon joined #perl6
00:24 timotimo yeah
00:25 timotimo MoarVM will do that to you
00:26 J-L Cool... Now the following function works in the perl6 interpreter:  use NativeCall; sub GetTickCount() returns Int is native('KERNEL32') is export { * };
00:26 TimToady don't need the final ; there...
00:26 timotimo be wary of the REPL, it can have weird bugs that don't happen if you put the same code into a file and run it
00:26 raydiak timotimo: https://gist.github.com/raydiak/10588fcc717e5bfe7191
00:28 timotimo interesting, raydiak; --profile?
00:28 timotimo and maybe speshlog?
00:32 raydiak timotimo: https://gist.github.com/raydiak/d3157c38107bcfb891c5
00:32 J-L Can anyone help me with converting the GetConsoleMode function from https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx into a NativeCall?
00:32 J-L I tried:  sub GetConsoleMode() returns Int is native('KERNEL32') { * };
00:32 raydiak timotimo: how do I get a speshlog?
00:32 J-L But when I call GetConsoleMode.say(), the program just stops.
00:32 timotimo env MVM_SPESH_LOG=thespeshlog.txt perl6 ...
00:33 timotimo i'd prefer a speshlog without --profile
00:33 japhb J-L: perhaps 'returns int32' or so?
00:33 timotimo because --profile sprinkles additional ops all over
00:33 raydiak btw this is beside the int vs num point but to put the lua number into perspective, luajit is *the* fastest general-purpose dynamic language implementation I know of, so being over 10% of its speed is kinda impressive considering where we are coming from, gives hope imo
00:33 raydiak oh btw the profile and speshlog are for 1e7 isntead of 1e8, which has similar ratios
00:34 timotimo J-L: how do you expect it to work if you don't pass a proper hConsoleHandle?
00:35 TimToady timotimo: that's been the main backronym for roast since about http://irclog.perlgeek.de/perl6/2010-09-04#i_2785777
00:35 timotimo oh
00:35 japhb java -version
00:35 japhb Gah
00:35 timotimo why didn't anybody ever tell me until i watched pm's talk recording? :S
00:35 TimToady you never asked?
00:35 raydiak timotimo: the speshlog is 63M, I'll have to upload it to my server
00:36 J-L I figure that I gotta pass in two arguments (or maybe just one and return one), but I have no idea how to pass in a proper hConsoleHandle.  Do you know how?
00:36 timotimo me and WinAPI? haha.
00:36 timotimo raydiak: compress it with gzip
00:36 timotimo it should be very compressable
00:36 timotimo actually, i can generate the speshlog myself if i have the code
00:36 timotimo it ought to be more or less the same
00:37 J-L timotimo:  So, how do I create a proper hConsoleHandle?
00:37 timotimo some WinAPI function must exist that gives you the current one
00:37 raydiak timotimo: I updated the example, you can just comment out the lua parts if you don't have it
00:38 timotimo thanks :)
00:38 timotimo just compiling a completely up-to-date rakudo right now
00:39 raydiak timotimo: did it anyway just b/c I already started: http://data.cyberuniverses.com/stuff/thespeshlog.txt.gz
00:41 timotimo okeh
00:41 timotimo compressed well, i see
00:41 raydiak indeed...silly how sometimes I forget about the most essential tools; too much to keep track of
00:50 timotimo raydiak: can you tell me what your moarvm version is?
00:51 raydiak This is perl6 version 2015.02-196-g07cea90 built on MoarVM version 2015.02-25-g3d0404a
00:51 raydiak afk
00:52 b2gills J-L: you may be able to figure it out if you look at https://metacpan.org/source/JDB/Win32-Console-0.10/Console.xs
00:52 timotimo that's a fairly recent moar, so that's fine
00:53 timotimo i'm seeing a case of bindattrs_o not being turned into a bindattr_o even though the name argument is set by const_s directly before that op :\
00:58 laouji joined #perl6
01:07 J-L As for hConsoleHandle, I found this declaration for HANDLE:  class HANDLE is repr('CPointer') { };
01:08 J-L I'm not sure if it can stand in as an hConsoleHandle.
01:09 yeahnoob joined #perl6
01:09 J-L I tried out this code:  use NativeCall;  class HANDLE is repr('CPointer') { };  sub GetConsoleMode(HANDLE, HANDLE is rw) is native('KERNEL32') { * };  my HANDLE $h1;  my HANDLE $h2;  GetConsoleMode($h1, $h2);  say $h2.perl;
01:09 J-L And I get nothing.
01:12 timotimo i don't know any more how these in and out parameters work in win api
01:12 timotimo but you're basically giving it two null pointers right now
01:14 J-L timotime:  I don't know them either, but I'm trying to figure them out... one example at a time.
01:26 timotimo i seem to recall someone had been working on something with WinAPI and nativecall
01:27 timotimo in the documentation for WinAPI, there should at some point be an explanation of what "in" and "out" mean
01:29 J-L How do I view the OS in Perl6?  (I'm looking for the Perl5 equivalent of $^O)
01:30 timotimo m: say $^O
01:30 camelia rakudo-moar 07cea9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tVSBrjPKp5␤Unsupported use of $^O variable; in Perl 6 please use $?DISTRO.name or $*DISTRO.name␤at /tmp/tVSBrjPKp5:1␤------> 3say $^O7⏏5<EOL>␤»
01:30 timotimo there you go :)
01:30 geekosaur m: say $*OS
01:30 camelia rakudo-moar 07cea9: OUTPUT«opensuse␤Saw 1 call to deprecated code during execution.␤================================================================================␤$*OS called at:␤  /tmp/Dn6Aze_ilF, line 1␤Deprecated since v2014.9, will be removed with release v2015.9!␤…»
01:30 geekosaur right, hm
01:30 geekosaur m: say $DISTRO
01:30 camelia rakudo-moar 07cea9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PtddJD931E␤Variable '$DISTRO' is not declared␤at /tmp/PtddJD931E:1␤------> 3say $DISTRO7⏏5<EOL>␤    expecting any of:␤        postfix␤»
01:30 geekosaur oops
01:31 geekosaur m: say $*DISTRO
01:31 camelia rakudo-moar 07cea9: OUTPUT«opensuse (13.2.Harlequin)␤»
01:31 timotimo m: say $*DISTRO.perl
01:31 camelia rakudo-moar 07cea9: OUTPUT«Distro.new(release => "13.2", is-win => Bool::False, path-sep => ":", name => "opensuse", auth => "https://opensuse.org/", version => Version.new('13.2.Harlequin'), signature => Blob, desc => Str)␤»
01:31 geekosaur right
01:31 TimToady say $*KERNEL.perl
01:32 TimToady m: say $*KERNEL.perl
01:32 J-L When I write "$*DISTRO.perl.say" I get:  Any
01:32 camelia rakudo-moar 07cea9: OUTPUT«Kernel.new(release => "#1 SMP Wed Dec 17 18:00:44 UTC 2014 (762f27a)", name => "linux", auth => "unknown", version => Version.new('1.SMP.Wed.Dec.17.18.0.44.UTC.2014.762.f.27.a'), signature => Blob, desc => Str)␤»
01:33 J-L When I type "say $*KERNEL.perl" I get:  Method 'name' not found for invocant of class 'Any'
01:34 TimToady what kind of machine are you on?
01:35 TimToady core/Kernel.pm:# The Kernel class and its methods, underlying $*KERNEL, are a work in progress.
01:36 TimToady it does seem like a bug that it would return Any rather than a generic I-dunno object
01:36 mr-foobar joined #perl6
01:37 J-L I'm on a Win32 machine (running Windows 7).
01:37 BenGoldberg m: say $?DISTRO
01:37 camelia rakudo-moar 07cea9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bPe9NwO2B3␤Variable '$?DISTRO' is not declared␤at /tmp/bPe9NwO2B3:1␤------> 3say $?DISTRO7⏏5<EOL>␤    expecting any of:␤        postfix␤»
01:38 BenGoldberg Why does the error message for use of $^O suggest that $?DISTRO might be a possibility, when, in fact, it's not?
01:41 TimToady m: say $*VM.config.perl
01:41 camelia rakudo-moar 07cea9: OUTPUT«{"ld" => "gcc", "can_unaligned_int64" => "1", "staticlib" => "", "dcbclean" => "\$(RM) 3rdparty/dyncall/dyncallback/libdyncallback_s.a", "ldinstflags" => "-pg", "cppswitch" => "-E", "thirdpartylibs" => "3rdparty/libatomic_ops/src/libatomic_ops.a 3rdparty/d…»
01:41 TimToady m: say $*VM.config<osname>
01:41 camelia rakudo-moar 07cea9: OUTPUT«linux␤»
01:41 dj_goku joined #perl6
01:41 dj_goku joined #perl6
01:41 TimToady that one might work
01:41 geekosaur BenGoldberg, might be a fossil?
01:42 TimToady or the opposite of a fossil
01:44 TimToady m: constant $?DISTRO = $*DISTRO.clone;  say $?DISTRO.perl
01:44 camelia rakudo-moar 07cea9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/75qKw59yyA␤Twigil-Variable constants not yet implemented. Sorry. ␤at /tmp/75qKw59yyA:1␤------> 3constant $?DISTRO = $*DISTRO.clone7⏏5;  say $?DISTRO.perl␤»
01:45 TimToady m: constant term:<$?DISTRO> = $*DISTRO.clone;  say $?DISTRO.perl
01:45 camelia rakudo-moar 07cea9: OUTPUT«Distro.new(release => "13.2", is-win => Bool::False, path-sep => ":", name => "opensuse", auth => "https://opensuse.org/", version => Version.new('13.2.Harlequin'), signature => Blob, desc => Str)␤»
01:45 TimToady haha
01:45 TimToady since $?DISTRO is just supposed to be the compiler's $*DISTRO, and constants are BEGIN time, that is almost a complete implementation
01:46 TimToady not sure how well it'd survive precomp though, given how many of the values are computed lazily...
01:50 * timotimo reads "opposite of a fossil" and thinks "anachronism"
01:53 laouji joined #perl6
02:07 tinyblak joined #perl6
02:12 Hor|zon joined #perl6
02:16 cschwenz1 joined #perl6
02:17 Sir_Ragnarok_ joined #perl6
02:20 rjbs- joined #perl6
02:20 lizmat_ joined #perl6
02:20 rmgk_ joined #perl6
02:20 thomas__ joined #perl6
02:21 Tux__ joined #perl6
02:22 tadzik joined #perl6
02:24 Ben_Goldberg joined #perl6
02:25 Ben_Goldberg joined #perl6
02:26 dylanwh joined #perl6
02:37 gfldex joined #perl6
02:48 skids joined #perl6
02:51 mr-fooba_ joined #perl6
02:51 chenryn joined #perl6
02:52 pierrot joined #perl6
03:00 pierrot joined #perl6
03:10 aborazmeh joined #perl6
03:10 aborazmeh joined #perl6
03:17 laouji_ joined #perl6
03:19 japhb m: PROCESS::SCHEDULER = ThreadPoolScheduler.new(:max_threads(1)); $p = start { (start { "foo" }).result }; say "Waiting ..."; say $p.result
03:19 camelia rakudo-moar 07cea9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yRAKUeKDRz␤Variable '$p' is not declared␤at /tmp/yRAKUeKDRz:1␤------> 3adPoolScheduler.new(:max_threads(1)); $p7⏏5 = start { (start { "foo" }).result }; s␤    expecting any of:␤        postfix␤»
03:19 japhb m: PROCESS::SCHEDULER = ThreadPoolScheduler.new(:max_threads(1)); my $p = start { (start { "foo" }).result }; say "Waiting ..."; say $p.result
03:19 camelia rakudo-moar 07cea9: OUTPUT«Could not find symbol 'SCHEDULER'␤  in method <anon> at src/gen/m-CORE.setting:15157␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2870␤  in any find_method at src/gen/m-Metamodel.nqp:1037␤  in block <unit> at /tmp/52w3kycOPE:1␤␤»
03:19 japhb m: $PROCESS::SCHEDULER = ThreadPoolScheduler.new(:max_threads(1)); my $p = start { (start { "foo" }).result }; say "Waiting ..."; say $p.result
03:19 camelia rakudo-moar 07cea9: OUTPUT«(timeout)Waiting ...␤»
03:21 japhb .ask jnthn Is it intended that http://irclog.perlgeek.de/perl6/2015-03-05#i_10225547 will result in lockup?  Meaning, if you do max_threads => 1 and then start { start { ... } }, is it a bug or DIHWIDT that it locks up?
03:21 yoleaux japhb: I'll pass your message to jnthn.
03:31 noganex_ joined #perl6
03:35 laouji_ joined #perl6
04:01 FROGGS_ joined #perl6
04:01 Hor|zon joined #perl6
04:13 raiph joined #perl6
04:39 laouji joined #perl6
04:44 Sqirrel joined #perl6
05:13 ninedragon joined #perl6
05:15 ninedragon joined #perl6
05:16 ninedragon joined #perl6
05:16 ninedragon joined #perl6
05:17 ninedragon joined #perl6
05:17 ninedragon joined #perl6
05:18 ninedragon joined #perl6
05:20 ninedragon joined #perl6
05:21 ninedragon joined #perl6
05:21 ninedragon joined #perl6
05:22 ninedragon joined #perl6
05:24 ninedragon joined #perl6
05:25 ninedragon joined #perl6
05:26 ninedragon joined #perl6
05:27 ninedragon joined #perl6
05:28 ninedragon joined #perl6
05:29 ninedragon joined #perl6
05:30 ninedragon joined #perl6
05:31 ninedragon joined #perl6
05:32 Ziemniak joined #perl6
05:32 ninedragon joined #perl6
05:33 ninedragon joined #perl6
05:34 ninedragon joined #perl6
05:35 ninedragon joined #perl6
05:36 ninedragon joined #perl6
05:37 ninedragon joined #perl6
05:38 ninedragon joined #perl6
05:39 ninedragon joined #perl6
05:40 ninedragon joined #perl6
05:41 ninedragon joined #perl6
05:42 ninedragon joined #perl6
05:43 ninedragon joined #perl6
05:44 ninedragon joined #perl6
05:46 ninedragon joined #perl6
05:47 ninedragon joined #perl6
05:48 ninedragon joined #perl6
05:49 ninedragon joined #perl6
05:50 ninedragon joined #perl6
05:50 Hor|zon joined #perl6
05:50 diana_olhovik_ joined #perl6
05:51 ninedragon joined #perl6
05:52 ninedragon joined #perl6
05:53 ninedragon joined #perl6
05:54 ninedragon joined #perl6
05:55 ninedragon joined #perl6
05:56 ninedragon joined #perl6
05:57 ninedragon joined #perl6
05:58 ninedragon joined #perl6
05:59 ninedragon joined #perl6
06:00 ninedragon joined #perl6
06:01 ninedragon joined #perl6
06:02 ninedragon joined #perl6
06:02 rindolf joined #perl6
06:03 ninedragon joined #perl6
06:04 ninedragon joined #perl6
06:04 ninedragon joined #perl6
06:05 ninedragon joined #perl6
06:06 ninedragon joined #perl6
06:24 davido___ joined #perl6
06:32 bjz joined #perl6
06:43 dalek rakudo/nom: 664c427 | TimToady++ | src/Perl6/Grammar.nqp:
06:43 dalek rakudo/nom: carp on any listop if no ws before sigil or quote
06:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/664c427791
06:44 dalek roast: dfc2955 | TimToady++ | S0 (2 files):
06:44 dalek roast: tweak tests for latest bogus listop errors
06:44 dalek roast: review: https://github.com/perl6/roast/commit/dfc29553a1
06:52 laouji_ joined #perl6
07:02 anaeem1 joined #perl6
07:03 yeahnoob joined #perl6
07:04 anaeem1 joined #perl6
07:06 diana_olhovik_ joined #perl6
07:18 telex joined #perl6
07:27 esaym153 joined #perl6
07:35 darutoko joined #perl6
07:39 Hor|zon joined #perl6
07:39 cognominal joined #perl6
07:41 rurban joined #perl6
07:43 Rounin joined #perl6
07:47 vendethiel .tell Kristien regexes http://www.perlmonks.org/?node_id=995856
07:47 yoleaux vendethiel: I'll pass your message to Kristien.
07:50 MadcapJake joined #perl6
07:50 [Sno] joined #perl6
07:52 nwc10 given http://www.breck-mckye.com/blog/2014/12/the-state-of-javascript-in-2015/ and http://hilton.org.uk/blog/javascript-frameworks it's obvious that there's money to be made figuring out WTF to use: http://shop.oreilly.com/product/9781939902085.do
07:53 xinming joined #perl6
07:54 wicope joined #perl6
08:00 xinming joined #perl6
08:02 MilkmanDan "I think I've had milk last longer than some JavaScript frameworks."  Spot on.
08:06 zakharyas joined #perl6
08:12 prime joined #perl6
08:12 prime joined #perl6
08:12 lustlife joined #perl6
08:19 xinming joined #perl6
08:21 Kristien joined #perl6
08:22 Kristien hi
08:22 yoleaux 07:47Z <vendethiel> Kristien: regexes http://www.perlmonks.org/?node_id=995856
08:22 Kristien .tell vendethiel nice :p
08:22 yoleaux Kristien: I'll pass your message to vendethiel.
08:22 vendethiel Kristien :)
08:22 yoleaux 08:22Z <Kristien> vendethiel: nice :p
08:29 sergot morning o/
08:30 Kristien hi sergot
08:32 virtualsue joined #perl6
08:34 larion joined #perl6
08:34 dalek rakudo/nom: dbe1032 | TimToady++ | src/Perl6/ (2 files):
08:34 dalek rakudo/nom: do better job of ejecting before whitespace
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dbe10324b2
08:35 dalek roast: 71f241e | TimToady++ | S32-exceptions/misc.t:
08:35 dalek roast: track error message changes
08:35 dalek roast: review: https://github.com/perl6/roast/commit/71f241e4a7
08:36 dalek nqp: d362467 | TimToady++ | src/HLL/Grammar.nqp:
08:36 dalek nqp: reused MARK should set .from as well as .pos
08:36 dalek nqp:
08:36 dalek nqp: We now use the .from to move the eject symbol to before the last ws
08:36 dalek nqp: rather than after it.  This is particularly important if one or more
08:36 dalek nqp: newlines were included in that whitespace, so that the eject goes on
08:36 dalek nqp: the line that actually caused the error.
08:36 dalek nqp: review: https://github.com/perl6/nqp/commit/d362467d14
08:37 dalek rakudo/nom: c3e1024 | TimToady++ | tools/build/NQP_REVISION:
08:37 dalek rakudo/nom: bump nqp in the night
08:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c3e1024aae
08:40 Hor|zon joined #perl6
08:40 abraxxa joined #perl6
08:40 laouji joined #perl6
08:40 larion joined #perl6
08:41 laouji_ joined #perl6
08:45 TimToady m: my grammar G { regex foo { } }
08:45 camelia rakudo-moar c3e102: OUTPUT«===SORRY!===␤Cannot find method 'ann'␤»
08:46 TimToady I don't think this is my bug, offhand
08:50 Kristien that's a weird bug
08:52 laouji joined #perl6
08:55 FROGGS_ probably something in Perl6::Actions that is meant to be a QAST::<something> is NQPMu
08:55 FROGGS_ --ll-exception will give us a clue
08:57 Hor|zon joined #perl6
09:05 TimToady $coderef := regex_coderef($/, $*DECLARAND, $<nibble>.ast, $*SCOPE, $name, %sig_info, $*CURPAD, $<trait>) if $<nibble>.ast;
09:06 TimToady um, but what if *not* $<nibble>.ast?
09:06 TimToady coderef will be uninit
09:09 lizmat_ TimToady: looking at http://irclog.perlgeek.de/perl6/2015-03-05#i_10225270
09:09 lizmat write string requires an object with REPR MVMOSHandle
09:09 lizmat so no $?DISTRO (or any other $? variables any time soon)  :-(
09:11 dalek rakudo/nom: 43e6159 | lizmat++ | src/core/Distro.pm:
09:11 dalek rakudo/nom: Allow setting of signature/desc on Distro
09:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43e6159026
09:11 dalek rakudo/nom: d4b915b | lizmat++ | src/core/Version.pm:
09:11 dalek rakudo/nom: Allow anything that can be .Str as a Version
09:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d4b915b2e6
09:12 kjs_ joined #perl6
09:14 lizmat TimToady jnthn: oddly enough, it looks like $*DISTRO having been set, causes the precomp loading to fail
09:14 lizmat if I create a $?DISTRO without actually getting the info from $*DISTRO, it works fine
09:17 sqirrel_ joined #perl6
09:22 kaleem joined #perl6
09:23 jnthn o/
09:23 yoleaux 03:21Z <japhb> jnthn: Is it intended that http://irclog.perlgeek.de/perl6/2015-03-05#i_10225547 will result in lockup?  Meaning, if you do max_threads => 1 and then start { start { ... } }, is it a bug or DIHWIDT that it locks up?
09:24 fhelmberger joined #perl6
09:24 FROGGS_ o/
09:25 jnthn .tell japhb DIHWIDT. You've only allowed one processing thread, scheduled two pieces of work, and had the first block the thread. In the future, "await ..." instead of .result should be usable to resolve this; I think .result will always be the blocking thing.
09:25 yoleaux jnthn: I'll pass your message to japhb.
09:26 FROGGS_ jnthn: "We actually set unit-outer on unit dynamically as part of loading the setting" -- where does that happen?
09:27 jnthn FROGGS_: Grep for forceouterctx
09:27 FROGGS_ ahhh
09:27 FROGGS_ (sorry if you had no coffee yet)
09:27 dalek rakudo/nom: c40fa83 | lizmat++ | src/core/Distro.pm:
09:27 dalek rakudo/nom: Get release info from object itself
09:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c40fa837ab
09:32 El_Che joined #perl6
09:32 nine_ nwc10: thanks for those links! I'm just so glad that my conclusion of the research for a project at work was: don't use any of these frameworks, just steal their ideas! A year later with the project not yet online, pretty much all of the contending JS frameworks are obsolete.
09:33 nwc10 they are all second hand from various people. I can't claim credit for finding them, only for cynically aggregating them all into one line
09:35 masak good antenoon, #perl6
09:36 raydiak good morning masak
09:36 larion joined #perl6
09:36 masak nine_: I have no idea about the context, but I agree with nwc10++
09:37 nwc10 jnthn: t/04-nativecall/03-simple-returns.t
09:37 nwc10 is buggy. It's assuming signed char
09:37 nwc10 I can make it fail on x86_64 if I build with -funsigned-char
09:37 nwc10 I've not even looked at the code yet :-)
09:39 * masak .oO( if you're fascinated by the idea of stealing the core ideas of things and using them instead of the hype... we're hiring! )
09:39 * masak is currently teaching a course in AngularJS :)
09:40 TimToady something about my changes is screwing up on JVM but not on MoarVM, but I'm too tired to figure it out tonight
09:41 * TimToady --> bed
09:42 donaldh joined #perl6
09:42 nine_ Whenever I decide whether to use a framework or library I just ask: would I want to maintain this if it got abandoned by the authors? With AngularJS the answer was: 1.7MB of JS?? There's not enough money in the world! I did adopt a couple of Perl modules however.
09:43 espadrine joined #perl6
09:47 abraxxa I've read yesterday that AngularJS 2.0 is way different than 1.x and many are seeking a new framework now
09:48 masak abraxxa: the Angular team has decided to try and replicate the successes of the Perl 6 effort.
09:48 nine_ That's a good one: Seeing job descriptions with Angular, jQuery, Backbone, Handlebars, Ember and basically equates to "Yes we have tried everything and we need you to maintain it now".
09:48 tadzik :D
09:48 masak abraxxa: sorry if that came out dripping with cynicism. :P
09:49 masak abraxxa: "Don't worry, they'll be maintained by separate teams!"
09:49 masak abraxxa: "Don't worry, AngularJS 1.x isn't going away anytime soon!"
09:49 abraxxa masak: i don't use it, just know that it's quite popular
09:49 abraxxa i do webapp, not website so ExtJS
09:49 nine_ masak: the similarities are...striking
09:49 masak abraxxa: I do however credit the Angular people with being forward-thinking and pushing the limits.
09:50 masak abraxxa: that doesn't mean one should tie oneself to their framework, though.
09:50 laouji_ joined #perl6
09:50 masak nine_: the only thing missing is them talking about automatic tools/converters from 1.x to 2.0 -- fully realizing that no such tool will ever be perfect, or even practical.
09:51 nine_ masak: the time scale on the other hand is different by a factor of 5.
09:51 masak nine_: yeah.
09:52 masak nine_: we're approaching a singularity of framework churn.
09:52 masak nine_: you go to bed, and the wildly successful framework from this morning will be horribly dated and unmaintained.
09:52 jnthn nwc10: Hm, probably the .c test file should declare a signed char explicitly.
09:52 rindolf joined #perl6
09:53 nwc10 jnthn: sorry, got distracted by having to tend and care to my work git dance
09:53 * masak .oO( bees do it to point the way to the central repository )
09:53 nine_ http://html9responsiveboilerstrapjs.com/
09:53 nwc10 jnthn: what's "int8" defined as?
09:53 nwc10 sub ReturnByte() returns int8 is native('./03-simple-returns') { * }
09:53 nwc10 is ReturnByte(), -103, 'returning char works';
09:53 jnthn nwc10: signed 8-bit integer
09:55 nwc10 OK. Aha. in 03-simple-returns.c
09:56 jnthn yes
09:57 laouji joined #perl6
10:00 laouji joined #perl6
10:00 jnthn .oO( Is a git dance like a sort dance, except the dancers form trees and DAGs? )
10:01 nwc10 I'm not sure
10:02 nwc10 it's an ugly mess of grafts, rebases, cherry-picks, filter-branch and various checkous
10:02 nwc10 checkouts
10:02 nwc10 and a directory named "truth"
10:02 nwc10 because the Ministry of Truth is hard at work.
10:03 jnthn I'd call the filter-branch one "dare" :P
10:03 nwc10 "one" - who said anything about just one checkout playing filter games? :-)
10:03 nwc10 but I see your joke, and it's appropriate
10:05 nine_ m: multi foo(Int $foo where * > 0) { say "> 0"; nextsame; }; multi foo(Int $foo where * < 10) { say "< 10"; nextsame; }; multi foo($foo) { say "generic"; }; foo(1);
10:06 camelia rakudo-moar c40fa8: OUTPUT«(timeout)> 0␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 10␤< 1…»
10:06 nine_ Is this ^^^ a bug or am I doing something stupid?
10:06 jnthn nine_: It looks rather wrong to me...
10:06 jnthn So my first thought is "bug
10:06 jnthn "
10:07 donaldh r: say 'hi'
10:07 camelia rakudo-moar c40fa8: OUTPUT«hi␤»
10:07 donaldh hmm
10:08 nwc10 jnthn: this is not sufficient to fix it (and I checked, my changes are getting picked up):
10:08 nwc10 -DLLEXPORT char ReturnByte()
10:08 nwc10 +DLLEXPORT signed char ReturnByte()
10:08 nwc10 so the bug is deeper than just that
10:08 pmurias joined #perl6
10:09 pmurias nwc10: the biggest advantage of angular.js over pretty much every framework (other then react.js) is that it's actually written by sane people
10:10 nwc10 jnthn: OK, I think I found it in NativeCall.pm
10:10 nwc10 rebuild, retest
10:10 pmurias nwc10: who value good docs and tests over fancy custom websites and other such stupidity
10:10 donaldh Here on JVM: ./perl6 -e 'say "Hi"'
10:10 donaldh ===SORRY!=== Error while compiling -e
10:10 donaldh A list operator such as "say" must have whitespace before its arguments (or use parens)
10:10 donaldh at -e:1
10:10 donaldh ------> say "Hi"⏏<EOL>
10:11 nwc10 donaldh: does that related to this: http://irclog.perlgeek.de/perl6/2015-03-05#i_10226833 ?
10:11 nwc10 not the timing relative to your arrival - I think he knew something.
10:11 nwc10 note the...
10:12 donaldh nwc10: thanks, i'll dissect.
10:12 nine_ jnthn: I rakudobug'ed it
10:13 pmurias nwc10: and if you are used to the quality of the better things on cpan the usual js framework foolishness is hard to tolerate
10:14 jnthn nine_++ nwc10++
10:14 jnthn Oh, and donaldh++ :)
10:18 virtualsue joined #perl6
10:20 sqirrel_ joined #perl6
10:21 bjz joined #perl6
10:22 pecastro joined #perl6
10:26 donaldh Yep, commit https://github.com/rakudo/rakudo/commit/664c427791 causes breakage on JVM
10:30 laouji_ joined #perl6
10:34 eli-se joined #perl6
10:34 eli-se hi
10:34 FROGGS_ hi eli-se
10:37 eli-se m: (-1).sqrt.say
10:37 camelia rakudo-moar c40fa8: OUTPUT«NaN␤»
10:38 eli-se are there complex numbers in the library?
10:39 eli-se m: 2i.abs.say
10:39 camelia rakudo-moar c40fa8: OUTPUT«2␤»
10:39 eli-se nice :p
10:42 nwc10 jnthn: the world hates me. I'm going to have lunch
10:42 nwc10 http://paste.scsys.co.uk/468893
10:42 nwc10 FROGGS_: any ideas about why PPC64 doesn't believe in "signed char" ?
10:44 jnthn nwc10: Those type names are interpreted by the NativeCall code at VM level, iirc.
10:44 eli-se i being a postfix operator is nice: sub hypot($a, $b) { abs($a + ($b)i) }
10:46 FROGGS_ nwc10: MoarVM/src/core/nativecall.c:35 does not know about signed char
10:46 eli-se "$b i" would be nicer IMO but apparently not allowed :v
10:48 FROGGS_ nwc10: and int8 (and dcbArgChar) defaults to signed
10:48 FROGGS_ nwc10: to handle unsigned we'd had to dcbArgUChar()
10:50 masak "Everywhere I go, I’m asked if I think the universities stifle JavaScript developers by making them learn other languages. My opinion is that they don’t stifle enough of them." -- lol! -- http://hilton.org.uk/blog/javascript-frameworks # nwc10++
10:52 masak nine_: please submit rakudobug for the multi bug, if you haven't already.
10:53 arnsholt FROGGS_: Well, Rakudo/NQP doesn't know too much about signedness in first place =)
10:54 FROGGS_ m: say uint8.^unsigned
10:54 camelia rakudo-moar c40fa8: OUTPUT«1␤»
10:54 FROGGS_ m: say int8.^unsigned
10:54 camelia rakudo-moar c40fa8: OUTPUT«0␤»
10:54 FROGGS_ arnsholt: ^^
10:56 nine_ masak: https://rt.perl.org/Public/Bug/Display.html?id=123989
10:57 masak nine_++
10:57 FROGGS_ NativeCall does not handle uint*, and the backends do not use dcbArgUChar instead of dcbArgChar at all
11:00 abraxxa as NativeCall is now in core where is its git repo now?
11:01 abraxxa FROGGS_: regarding https://github.com/jnthn/zavolaj/issues/47, was that @me?
11:02 FROGGS_ abraxxa: in rakudo...
11:02 abraxxa FROGGS_: and its bug/feature tracker?
11:02 FROGGS_ abraxxa: yes, that was meant as a comment to you to try... dunno if that helps/works
11:03 abraxxa FROGGS_: what impact should that change have?
11:03 FROGGS_ abraxxa: well, zavolaj still exists but often bugs are to fix in the VM so RT is a good place for these bugs
11:04 FROGGS_ abraxxa: I though you disliked CArray[OpaquePointer]... but perhaps I remember wrong
11:04 abraxxa RT has detected a possible cross-site request forgery  for this request, because the Referrer header supplied by your browser  (rakudo.org:80) is not allowed by RT's configured hostname  (rt.perl.org:443) or whitelisted hosts (www.bitcard.org:443,  www.bestpractical.com:443).  A malicious attacker may be trying to modify or access a search on your behalf. If you did not initiate this request, then you should alert your security team.
11:04 nine_ abraxxa: bogus warning
11:05 abraxxa FROGGS_: i'd like to have a syntax which allows me to only write a single line instead of the two
11:05 abraxxa nine_: sure, but you might want to whitelist rakudo.org which links to it
11:07 nwc10 FROGGS_: it can't *just* be that because if I build on x86_64 with -funsigned-char that patch makes it work again
11:07 nine_ j: multi foo(Int $foo where * > 0) { say "> 0"; nextsame; }; multi foo(Int $foo where * < 10) { say "< 10"; nextsame; }; multi foo($foo) { say "generic"; }; foo(1);
11:07 camelia rakudo-jvm c40fa8: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
11:08 nwc10 there is certainly something wrongly assuming that 'char' is like 'short', and the that its default is signed
11:08 FROGGS_ nwc10: I guess we have to be more explicit about signed/unsigned in the moarvm nativecall code...
11:09 FROGGS_ jnthn: https://gist.github.com/FROGGS/663ed0225af1318dc6d2 :o(
11:10 abraxxa FROGGS_: so instead of the current two lines i'd only need: my $hndlpp := Pointer[Pointer].new; ?
11:10 FROGGS_ abraxxa: I think so.... and you can use normal assignment here
11:11 abraxxa i still haven't figured out what the difference between = and := is
11:11 FROGGS_ abraxxa: though, your pointer points to something, no? if that is of some certain kind, then it makes sense to specify it there instead of the implicit void
11:12 FROGGS_ it is basically that:
11:12 FROGGS_ m: use NativeCall; say Pointer[Pointer[void]].new
11:12 camelia rakudo-moar c40fa8: OUTPUT«TypedPointer[TypedPointer[void]]<NULL>␤»
11:12 FROGGS_ (void **)
11:17 colomon joined #perl6
11:17 abraxxa is there a way to specify a minimum required rakudo version?
11:18 FROGGS_ abraxxa: not yet
11:18 abraxxa FROGGS_: ok, thanks
11:18 abraxxa DBDish::Oracle requires at least 2015.02 with the fixed .bytes
11:21 bjz joined #perl6
11:22 abraxxa one more stupid question: should die messages end with \n or not?
11:22 FROGGS_ abraxxa: the backtrace printing should take care of that
11:23 abraxxa i guess i copied it from the other DBDs
11:28 nine_ jnthn: wrt my nextsame enless loop. Are we supposed to reach line 706 in src/vm/moar/ops/perl6_ops.c for each iteration? say(nqp::where(self)); gives me a different answer for every call to Perl6::Metamodel::BaseDispatcher::call_with_capture which seems to be the reason for $!idx never going beyond 1.
11:29 pecastro joined #perl6
11:31 laouji_ joined #perl6
11:33 FROGGS_ jnthn: do you have an idea about my paste?
11:37 abraxxa you might want to close https://rt.perl.org/Public/Bug/Display.html?id=123015 with the info that a Buf.bytes method exists and is fixed in 2015.02 but is missing in the docs
11:37 abraxxa or keep it open until the docs where added
11:37 pecastro joined #perl6
11:40 coffee` joined #perl6
11:54 spider-mario joined #perl6
11:55 jnthn FROGGS_: 'fraid not right away, and I'm quite distracted with some $dayjob things at the moment...sorry.
12:02 FROGGS_ okay, $*W.load_setting does connect the setting with the <unit-outer>, though I got a cut between <unit> and <unit-outer>
12:09 rurban joined #perl6
12:11 eli-se joined #perl6
12:16 dalek rakudo/nom: d0d4ba6 | lizmat++ | src/core/Distro.pm:
12:16 dalek rakudo/nom: Preliminary work for $?DISTRO
12:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d0d4ba6424
12:16 dalek rakudo/nom: db49f3b | lizmat++ | src/core/VM.pm:
12:16 dalek rakudo/nom: Preliminary work for $?VM
12:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/db49f3b7ec
12:23 moar joined #perl6
12:39 rurban1 joined #perl6
12:40 kjs_ joined #perl6
12:41 kaleem joined #perl6
12:47 coffee` joined #perl6
12:48 Ven joined #perl6
12:49 eli-se joined #perl6
12:54 kaleem joined #perl6
13:03 eli-se joined #perl6
13:19 laouji joined #perl6
13:23 ShimmerFairy joined #perl6
13:23 eli-se_ joined #perl6
13:40 muraiki joined #perl6
13:54 virtualsue joined #perl6
14:02 kaare_ joined #perl6
14:05 * lizmat drops a pin
14:05 nine_ lizmat: sssssht!
14:05 * hahainternet collapses over a pile of boxes
14:07 skids joined #perl6
14:10 rindolf joined #perl6
14:14 MadcapJake joined #perl6
14:19 Khisanth joined #perl6
14:26 [particle] joined #perl6
14:28 Khisanth joined #perl6
14:32 masak hahainternet: those were my boxes... 囧
14:34 ab5tract i-put-a-kebab-in-it-and-then-it-netsplit
14:34 hahainternet hey masak
14:34 hahainternet spotted you in a commit message
14:34 masak hahainternet: sometimes I cameo in commit messages.
14:35 ggoebel111111114 joined #perl6
14:36 hahainternet masak: indeed, Tux::CSV or something it was, can't remember what exactly
14:37 masak probably not that one
14:38 hahainternet https://github.com/Tux/CSV/commit/aa29aa4207326d918c8ea96efc91fbf39055a458
14:38 hahainternet prly was
14:38 hahainternet :)
14:39 raiph joined #perl6
14:41 masak ah. :)
14:41 masak Tux++ # commit comments
14:41 hahainternet i gotta devote some time to p6 ASAP but too many things to do
14:41 hahainternet need union support for FFI
14:43 nwc10 OK, PEBKAC (Somewhat)
14:43 nwc10 I think I might have it under control
14:43 donaldh Fix TimToady++'s nqp::index thinkos in Grammar.pm https://github.com/rakudo/rakudo/pull/379
14:43 nwc10 patches should be forthcoming this evening
14:43 nwc10 (for PPC64 and signed/unsigned char)
14:43 nwc10 PPC32 is still a wreck
14:45 donaldh duh, just realised I committed a bigger thinko
14:47 jnthn donaldh: I'm curious why TimToady's original works on Moar, but not JVM. As in, isn't something off in one of the two backends if we're seeing a difference?
14:47 Possum joined #perl6
14:47 donaldh Yeah, sorry, I was thinking regex but it's not. That was my huge thinko.
14:48 donaldh The difference is that nqp::indexfrom on JVM returns a match for the empty string.
14:49 arnsholt jnthn: Speaking of nwc10++'s signed/unsigned char find, do we have any concrete plans for how/if we're going to handle signedness in NQP/Perl 6?
14:49 donaldh Ignore that PR
14:53 jnthn arnsholt: We statically know the types of native things, so largely by keeping track of it in the compiler and emitting different ops when we do division/modulo, conversion to/from big integer, stringification, etc.
14:54 rurban joined #perl6
14:55 rmgk_ joined #perl6
14:56 [ptc] m: sub gather-test($n) { gather for (2,3,*+2 ... * > $n) -> $k { say $k }}; gather-test(5)
14:56 camelia rakudo-moar db49f3: OUTPUT«Unhandled exception: Cannot call 'infix:<>>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a,…»
14:56 [ptc] m: sub gather-test() { $n=5; gather for (2,3,*+2 ... * > $n) -> $k { say $k }}; gather-test()
14:56 camelia rakudo-moar db49f3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GM4Px1bay7␤Variable '$n' is not declared␤at /tmp/GM4Px1bay7:1␤------> 3sub gather-test() { $n7⏏5=5; gather for (2,3,*+2 ... * > $n) -> $␤    expecting any of:␤        postfix␤»
14:57 [ptc] weird, the second one worked in the REPL...
14:57 [ptc] m: sub gather-test($n) { my $enn = $n; gather for (2,3,*+2 ... * > $enn) -> $k { say $k }}; gather-test(5)
14:57 camelia rakudo-moar db49f3: OUTPUT«Unhandled exception: No exception handler located for warn␤   at src/gen/m-CORE.setting:787  (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:warn:29)␤ from src/gen/m-CORE.setting:783  (/home/camelia/rakudo-inst-1/languages/perl…»
14:58 eli-se joined #perl6
14:58 [ptc] ... and that "almost" worked in the REPL.  Gave use of uninitialized value of type Any in numeric context  in whatevercode  as well as the value "2"
14:59 [ptc] am trying to get an example to work, and don't know why the code doesn't work as expected.  Anyone have an idea?
15:00 kaleem joined #perl6
15:00 donaldh r: nqp::rindex('rakudo', '')
15:00 camelia rakudo-moar db49f3: OUTPUT«index start offset out of range␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:01 donaldh r: nqp::index('rakudo', '')
15:01 camelia rakudo-moar db49f3: ( no output )
15:01 donaldh r: nqp::index('rakudo', '').say
15:01 camelia rakudo-moar db49f3: OUTPUT«-1␤»
15:01 donaldh r: nqp::rindex('rakudo', '', 6).say
15:01 camelia rakudo-moar db49f3: OUTPUT«index start offset out of range␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:01 donaldh r: nqp::rindex('rakudo', '', 5).say
15:01 camelia rakudo-moar db49f3: OUTPUT«-1␤»
15:02 spider-mario joined #perl6
15:02 donaldh why does the two arg variant of rindex fail for an empty match?
15:03 moritz bug, I'd say
15:07 Khisanth joined #perl6
15:10 eli-se I'm eating bugs today.
15:10 dalek perl6-examples: a79b8d7 | paultcochrane++ | categories/99-problems/P3 (2 files):
15:10 dalek perl6-examples: [99-problems] extract for loop iteration list into a variable
15:10 dalek perl6-examples:
15:10 dalek perl6-examples: This allows "gather for" to work as expected when passing a variable into
15:10 dalek perl6-examples: the sub which is then used to determine the list of values for the for loop.
15:10 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/a79b8d7fbb
15:13 eli-se Delicious mantes. :3
15:14 ggoebel111111114 joined #perl6
15:18 Khisanth joined #perl6
15:20 laouji joined #perl6
15:24 colomon joined #perl6
15:25 hoelzro o/ #perl6
15:26 eli-se hello hobbs
15:26 eli-se I mean hoelzro :v
15:26 hoelzro =)
15:26 Ven joined #perl6
15:26 hoelzro hello eli-se
15:35 abraxxa where do I find the current NativeCall docs?
15:36 FROGGS_ abraxxa: still in the zavolaj repository
15:36 abraxxa FROGGS_: I thought it was moved to the rakudo repo? i asked earlier
15:36 jnthn The *code* was moved, the docs not yet.
15:36 jnthn And when they do move they probably want to go in doc.perl6.org
15:36 FROGGS_ abraxxa: I give a lot of kudos to anyone who works on merging them into doc.perl6.org
15:37 abraxxa jnthn: i see, thanks
15:38 Khisanth joined #perl6
15:38 abraxxa is there a difference between .encode('UTF-8') and .encode('utf8')?
15:38 FROGGS_ abraxxa: no
15:38 abraxxa is one preferred over the other?
15:39 FROGGS_ the encoding name will be normalized
15:39 FROGGS_ hmmm, no
15:39 abraxxa i just want to be consistent and zavolaj uses utf8
15:42 abraxxa what's the best way to recompile the pm6 files in a git repo and run a test?
15:43 abraxxa i use panda install . at the moment
15:43 FROGGS_ yes, that's what I usually do too
15:44 abraxxa does that use the newest compiled code and not some older, installed version?
15:45 FROGGS_ that is using the code from your repository by making a copy of its directory to a tempdir, compiling it, running its tests and install if successful
15:45 FROGGS_ so even if you already have it installed, the tests will use the just compiled version in that tempdir
15:46 abraxxa ok
15:46 abraxxa i see that there was a change regarding int and long in NativeCall
15:47 FROGGS_ aye
15:47 abraxxa does that mean i must change all ints to longs?
15:48 FROGGS_ the rule basically is: don't use Perl 6's int and Int as params and return types of nativecall subs
15:48 FROGGS_ depends
15:48 FROGGS_ if there is a long in C, it is a long in Perl 6
15:48 FROGGS_ if there is an int is C, it is a int32 in Perl 6
15:49 PerlJam FROGGS_: Where is all of this documented?  :)
15:50 FROGGS_ PerlJam: partly in zavolaj
15:51 FROGGS_ PerlJam: but yeah, I guess I should put that on doc.perl6.org in a nice way... this way I can forget that bloody jvm bug for a moment
15:51 abraxxa i will go through the C function definitions again and update them
15:51 FROGGS_ abraxxa: yeah, otherwise you either have problems on 32 or 64 bit machines
15:51 PerlJam FROGGS_++
15:52 FROGGS_ so, how to doc.perl6.org?
15:52 telex joined #perl6
15:52 hoelzro I was thinking about COERCE on my way home last night, and I thought of a real-world use case for it: https://gist.github.com/hoelzro/06ebf55b6b679ce4cb16
15:52 donaldh FROGGS_: what's the JVM bug?
15:52 FROGGS_ and btw, we have nearly 19k test reports on testers.p6c.org
15:53 FROGGS_ donaldh: the problem that breaks URI
15:53 abraxxa i'll start by rebasing to current DBDish
15:53 colomon joined #perl6
15:53 donaldh URI ?
15:53 FROGGS_ donaldh: it is a precomp issue that appears when URI (the module) is precompiled
15:53 donaldh ah
15:54 Tux__ abraxxa, are you currently working on DBI6?
15:54 dalek nqp: 99f7e1f | donaldh++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
15:54 dalek nqp: Handle empty pattern in index ops on JVM.
15:54 dalek nqp: review: https://github.com/perl6/nqp/commit/99f7e1f305
15:54 dalek nqp: 3d325cf | donaldh++ | t/nqp/59-nqpop.t:
15:54 dalek nqp: Add more tests for string index ops.
15:54 dalek nqp: review: https://github.com/perl6/nqp/commit/3d325cf8e9
15:54 FROGGS_ the conntection between a unit call frame and its unit-outer frame is missing, so it explodes because it cannot resolv dependecies to the setting
15:54 |Tux| FWIW people asked in #amsterdam.pm who was currently working on that
15:54 abraxxa |Tux|: yes, DBDish::Oracle
15:55 donaldh ^ fixes TimToady++'s JVM misbehaviour
15:55 |Tux| abraxxa++
15:55 FROGGS_ donaldh++ # I've guessed that :o)
15:55 donaldh https://github.com/MoarVM/MoarVM/pull/180 is a PR to fix rindex/2 on MoarVM
15:56 abraxxa |Tux|: never done C before...
15:57 |Tux| want to do it inside the perl5 dbi development enviromnet on github?
15:58 |Tux| https://github.com/orgs/perl5-dbi
15:59 FROGGS_ donaldh: I merged your PR
15:59 abraxxa |Tux|: currently it lives at https://github.com/perl6/DBIish and the DBDish::Oracle is only one submodule of it
15:59 donaldh FROGGS_++
15:59 abraxxa |Tux|: i'm not to decide that
16:00 FROGGS_ donaldh: well, thank *you* :o)
16:00 * donaldh did his MoarVM commit
16:00 nwc10 donaldh++
16:00 donaldh *first
16:00 jnthn \o/
16:00 timotimo ooooh
16:01 jnthn .oO( But will there be moar? )
16:01 FROGGS_ donaldh: now you are forced to join #moarvm :P
16:01 virtualsue nobody forced ME to do that :-)
16:02 FROGGS_ virtualsue: ohh, feel belatedly forced now :o)
16:03 rindolf joined #perl6
16:07 donaldh https://github.com/rakudo/rakudo/pull/380 PR to bump NQP revision for the nqp::index fix on JVM.
16:07 FROGGS_ moritz: the nativecall docs should got to http://doc.perl6.org/language.html as 'Native Interface'? does that sound good?
16:08 dalek rakudo/nom: 7b922b3 | donaldh++ | tools/build/NQP_REVISION:
16:08 dalek rakudo/nom: Bump NQP revision to get nqp::index fix
16:08 dalek rakudo/nom:
16:08 dalek rakudo/nom: Fixes TimToady++'s grammar bug on JVM.
16:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b922b369c
16:08 dalek rakudo/nom: bca33b6 | FROGGS++ | tools/build/NQP_REVISION:
16:08 dalek rakudo/nom: Merge pull request #380 from donaldh/nom
16:08 dalek rakudo/nom:
16:08 dalek rakudo/nom: Bump NQP revision to get nqp::index fix
16:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bca33b60a0
16:08 FROGGS_ donaldh: we also hab to bump the MOAR_REVISION after the moar fix, right?
16:08 donaldh I'll do that
16:09 FROGGS_ cool
16:09 mr-foobar joined #perl6
16:12 cognominal joined #perl6
16:17 Khisanth joined #perl6
16:22 zakharyas joined #perl6
16:22 rurban joined #perl6
16:23 dpuu m: grammar G1 {rule TOP { 'x'+ } }; grammar G2 { rule TOP { 'y'+ } }; grammar { rule TOP { ^ <G1::TOP> <G2::TOP> $ } }.parse('x y', :actions(class { method TOP($/) { say 'here' } }))
16:24 camelia rakudo-moar db49f3: OUTPUT«here␤here␤here␤»
16:24 dpuu any way to distinguish the three different "TOP" methods?
16:24 PerlJam dpuu++ good question
16:25 jnthn Not sure if this is a good answer, but $/.CURSOR inside of method TOP can be considered
16:25 jnthn given $/.CURSOR { when G1 { ... }; when G2 { ... }; }
16:26 nine_ jnthn: wrt my nextsame enless loop. Are we supposed to reach line 706 in src/vm/moar/ops/perl6_ops.c for each iteration? say(nqp::where(self)); gives me a different answer for every call to Perl6::Metamodel::BaseDispatcher::call_with_capture which seems to be the reason for $!idx never going beyond 1.
16:26 dalek nqp: 4b07ebf | donaldh++ | tools/build/MOAR_REVISION:
16:26 dalek nqp: Bump MOAR revision to get rindex fix for nqp tests.
16:26 dalek nqp: review: https://github.com/perl6/nqp/commit/4b07ebfc56
16:27 dpuu The general case here is that both G1 and G2 are complex grammars with their own, already existing, actions classes. Not obvious how to compose them
16:27 jnthn dpuu: Yeah, in the Perl 6 grammar we have a LANG rule which does the switch-over
16:28 jnthn dpuu: and keeping tables of languages and actions.
16:29 moritz dpuu: by calling their TOP with a separate action method, somehow
16:29 moritz erm, action class
16:29 jnthn <G1::TOP> is not quite enough
16:29 moritz if you want to delegate parsing to a separate, complex entitiy, you also want to delegate the step above it too
16:29 moritz right
16:30 jnthn I can probably come up with something...
16:30 moritz more like <??{ G1.subparse(..., :actions(..)) }>
16:30 jnthn nine_: I think we shoudln't be making it into the !IS_CONCRETE branch at all...
16:31 jnthn (On the second time)
16:31 jnthn dpuu: I'm in the middle of something else at the moment; will try and write up some example of how to do it in a little bit...
16:32 PerlJam It would be nice if you could just define the relationships between the grammars/actions and Perl would just DTRT.  (i.e. such that you didn't have to explicitly call G1.subparse )
16:33 dpuu OK, thanks, I'll see if I can play around with +moritz' sketch of a solution
16:33 nine_ jnthn: btw. the bug is also reproducable on the JVM
16:41 travis-ci joined #perl6
16:41 travis-ci NQP build passed. Donald Hunter 'Bump MOAR revision to get rindex fix for nqp tests.'
16:41 travis-ci http://travis-ci.org/perl6/nqp/builds/53213801 https://github.com/perl6/nqp/compare/3d325cf8e98d...4b07ebfc566a
16:41 travis-ci left #perl6
16:48 osfameron nine_: question from #catalyst about whether DBIx::Class runs under Inline::Perl5 ?
16:49 abraxxa i don't remember how i found out that size_t is int
16:49 nine_ osfameron: it does
16:49 nine_ osfameron: since about two days after the first commit to Inline::Perl5 ;)
16:49 osfameron woohoo :-)
16:50 abraxxa irc log++
16:50 abraxxa (17:41:18) abraxxa: oratypes.h has the line # define MINSIZE_TMAXVAL (size_t)4294967295 which made me think it's a uint32
16:50 abraxxa does that make sense?
16:50 ribasushi osfameron: DBIC is a pure-perl module, it's the various DBDs that could potentially trip you up
16:51 osfameron ah yes.  though as I::P5 does XS, that's presuambly not a problem either?
16:52 abraxxa FROGGS_: do you know that?
16:52 nine_ XS itself is no issue.
16:52 nine_ I've successfully tried our DBIC schemas with DBD::Pg
16:53 nine_ Pitfalls probably are of the far more surprising category. Maybe if some DBD is extremely picky about data types. But I'd say trying is the only way to find out.
16:54 ribasushi nine_: what is actually involved in running the DBIC test suite through I::P5 ?
16:54 ribasushi i.e. how did you "try it out"
16:55 dpuu rule TOP { ^ <x=.G1::TOP>  { G1.parse($<x>, :actions(A1)) } <y=.G2::TOP>  { G2.parse($<y>, :actions(A2)) } $ }  works, but probably inefficient (I assume it parses the string twice) -- good enough to unblock me though
16:55 PerlJam There's so many P5 people here now that I can't easily tell which channel I'm looking at merely from the conversants.  :)
16:56 TimToady donaldh++
16:56 molaf joined #perl6
16:57 rurban joined #perl6
16:58 abraxxa the Oracle tests have started working again ;)
16:59 abraxxa i changed all ints to int32s
16:59 nine_ ribasushi: nine@sunshine:~> perl6 -I Inline-Perl5/lib -e 'use Inline::Perl5; use Atikon::DB::Timemngt:from<Perl5>; my $schema = Atikon::DB::Timemngt.connect("dbi:Pg:database=timemngt"); say $schema.resultset("Article").find(62).name;'
16:59 abraxxa sword and size_t types
16:59 nine_ Homepage
16:59 abraxxa gotto go, see you tomorrow
17:02 dpuu Actually, I take it back: simply calling Subgrammar.parse doesn't work because there's no namespace encapsulation: any rule in the subgrammar still causes the actions of the supergrammar to be used when they have the same name
17:02 skids Oh, does nativecall have size_t now?
17:03 abraxxa no, Oracle OCI does
17:03 abraxxa and I guess its a int32
17:03 abraxxa i'm still failing at sql parameter binding with IntTypedCArray[int8]<139650419175376>
17:03 abraxxa Segmentation fault (core dumped)
17:07 rurban joined #perl6
17:12 * TimToady always feels very unresolved when the last message in the channel is ^^^
17:15 Juerd Better than ..., though...
17:15 Juerd ...
17:16 vendethiel- joined #perl6
17:24 geekosaur NO CARRIER
17:24 geekosaur :p
17:25 TimToady DESTROYER
17:26 TimToady maybe a BATTLESHIP or two
17:29 jnthn dpuu: https://gist.github.com/jnthn/2ec8ae8a847310f85210
17:31 adu joined #perl6
17:32 donaldh There's a bunch of JVM related tickets that could be resolved.What's the process? Can someone assign them to me?
17:33 moritz donaldh: if the problem is missing permissions in RT, I believe [Coke]++ can help you
17:33 donaldh I only have perms to read and reply, so yes :)
17:34 dalek doc: 661e87d | (Florian Helmberger)++ | lib/Language/5to6.pod:
17:34 dalek doc: fixed typo in section "Special matchers generally fall under the <>
17:34 dalek doc: syntax": surrouned -> surrounded
17:34 dalek doc: review: https://github.com/perl6/doc/commit/661e87d59f
17:34 dalek doc: c452935 | paultcochrane++ | lib/Language/5to6.pod:
17:34 dalek doc: Merge pull request #59 from fhelmberger/master
17:34 dalek doc:
17:34 dalek doc: fixed typo surrouned -> surrounded
17:34 dalek doc: review: https://github.com/perl6/doc/commit/c452935873
17:35 anaeem1 joined #perl6
17:36 * moritz gives fhelmberger a commit bit
17:38 diana_olhovik joined #perl6
17:40 TimToady moritz: any idea why the "Look for new lines" doesn't work (at least in firefox) when there are no lines on the page?
17:41 moritz TimToady: probably some javascript SNAFU
17:41 TimToady .oO(but he repeats himself)
17:41 dpuu m: say grammar{}.^methods
17:41 camelia rakudo-moar bca33b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LMqJhKI5N3␤Whitespace required after keyword 'grammar'␤at /tmp/LMqJhKI5N3:1␤------> 3say grammar7⏏5{}.^methods␤»
17:42 TimToady gotcha!
17:42 dpuu m: say grammar {}.^methods
17:42 camelia rakudo-moar bca33b: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/m-CORE.setting:8946␤  in sub say at src/gen/m-CORE.setting:17976␤  in block <unit> at /tmp/TBdykVYSft:1␤␤»
17:42 TimToady gotus!
17:42 raiph joined #perl6
17:43 jnthn m: say grammar {}.^methods.map(*.name)
17:43 camelia rakudo-moar bca33b: OUTPUT«parse subparse parsefile MATCH MATCH_SAVE INTERPOLATE DYNQUANT_LIMITS OTHERGRAMMAR INDRULE RECURSE orig target from pos prune CAPHASH !cursor_init !cursor_start_all !cursor_start !cursor_start_cur !cursor_start_fail !cursor_start_subcapture !cursor_capture…»
17:43 dalek doc: e7bf359 | moritz++ | lib/Type/Cool.pod:
17:43 dalek doc: Cool.index
17:43 dalek doc: review: https://github.com/perl6/doc/commit/e7bf3599c9
17:43 TimToady so how hard could it be to add a .gist method...
17:44 Kristien joined #perl6
17:44 Kristien hi
17:44 TimToady lo
17:44 jnthn TimToady: Pretty easy, if we want to fix it that way
17:44 eli-se joined #perl6
17:44 TimToady well, we could box up all them nqp thingies inside real objects, is another way
17:44 eli-se Today is a wonderful day.
17:45 jnthn TimToady: Yes, that was my plan A for these things...
17:45 TimToady A wonderful day is today.
17:46 * moritz had a pretty shitty $work day today
17:46 moritz with a release gone bad and half the day spent in meetings
17:47 eli-se A wonderful dy is toady.
17:47 jnthn hugme: hug moritz
17:47 * hugme hugs moritz
17:48 moritz thanks, that helped :-)
17:48 TimToady welcome back to the land of...sanity?
17:48 Ven .oO( when do you plan to leave again? )
17:49 TimToady sanitation, anyway...
17:53 mohij joined #perl6
17:54 eli-se m: my constant i = 42; say (i)i;
17:54 camelia rakudo-moar bca33b: OUTPUT«0+42i␤»
17:55 eli-se nice!
17:55 TimToady that's just from lexical scoping
17:55 TimToady didn't need any of the recent hacks
17:56 eli-se m: my constant i = 1i; my constant negative-one = (i)i; say negative-one;
17:56 camelia rakudo-moar bca33b: OUTPUT«-1+0i␤»
17:56 TimToady m: my constant i = 42; say (OUTER::i)i
17:56 camelia rakudo-moar bca33b: OUTPUT«Cannot call 'postfix:<i>'; none of these signatures match:␤:(Real \a --> Complex)␤:(Complex:D \a --> Complex)␤:(Numeric \a --> Complex)␤:(Cool \a --> Complex)␤  in block <unit> at /tmp/537I6uOVBI:1␤␤»
17:56 TimToady heh
17:56 TimToady m: say i\i
17:56 camelia rakudo-moar bca33b: OUTPUT«-1+0i␤»
17:57 eli-se what is \?
17:57 TimToady m: say i.WHAT
17:57 camelia rakudo-moar bca33b: OUTPUT«(Complex)␤»
17:57 TimToady say OUTER::i.WHAT
17:57 TimToady m: say OUTER::i.WHAT
17:57 camelia rakudo-moar bca33b: OUTPUT«(Any)␤»
17:57 TimToady a degenerate unspace
17:57 TimToady postfixes allow unspace with no space at all
17:58 TimToady so you can say $foo\++ or $bar\i
17:58 TimToady m: say CORE::i.WHAT
17:58 camelia rakudo-moar bca33b: OUTPUT«(Complex)␤»
17:58 TimToady surely OUTER should see the things outside of that...
17:59 TimToady m: my $foo = 42; {{{{ say $OUTER::foo }}}}
17:59 camelia rakudo-moar bca33b: OUTPUT«(Any)␤»
17:59 TimToady hmm
17:59 Rounin joined #perl6
17:59 TimToady I think the original intent was to use OUTER::MY if you wanted that specific lexpad
18:02 TimToady std: my $foo = 42; {{{{ say $OUTER::foo }}}}
18:02 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable $OUTER::foo is not predeclared at /tmp/Nyq1btABQB line 1:␤------> 3my $foo = 42; {{{{ say 7⏏5$OUTER::foo }}}}␤Check failed␤FAILED 00:01 138m␤»
18:02 TimToady hmm
18:02 TimToady maybe not
18:04 jnthn 'OUTER' => sub ($cur) {
18:04 jnthn ...
18:04 jnthn nqp::bindattr_i($stash, PseudoStash, '$!mode', PRECISE_SCOPE);
18:04 TimToady do we have a way to say the other?
18:04 jnthn Seems now
18:05 TimToady *t
18:05 jnthn *not
18:05 jnthn :)
18:05 jnthn There's CALLER (precise) and DYNAMIC for that dimension
18:06 TimToady m: my $*foo = 42; say DYNAMIC::<$*foo>
18:06 camelia rakudo-moar bca33b: OUTPUT«42␤»
18:06 TimToady so we want OUTER::LEXICAL or so
18:07 TimToady std: my $foo = 42; {{{{ say MY::<$foo> }}}}
18:07 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable MY::<$foo> is not predeclared at /tmp/NojuA_U_wt line 1:␤------> 3my $foo = 42; {{{{ say 7⏏5MY::<$foo> }}}}␤Check failed␤FAILED 00:00 139m␤»
18:07 TimToady just checking...
18:07 rindolf joined #perl6
18:09 TimToady though something's a little funny about that factoring
18:10 TimToady std: my $foo = 42; {{{{ my $foo = 21; say OUTER::('$foo') }}}}
18:10 camelia std 28329a7: OUTPUT«Potential difficulties:␤  $foo is declared but not used at /tmp/EghrZSATru line 1:␤------> 3my $foo = 42; {{{{ my $foo7⏏5 = 21; say OUTER::('$foo') }}}}␤ok 00:00 139m␤»
18:10 TimToady m: my $foo = 42; {{{{ my $foo = 21; say OUTER::('$foo') }}}}
18:10 camelia rakudo-moar bca33b: OUTPUT«===SORRY!===␤No such symbol 'OUTER::$foo'␤»
18:10 TimToady m: my $foo = 42; {{{{ my $foo = 21; say ::('$foo') }}}}
18:10 camelia rakudo-moar bca33b: OUTPUT«21␤»
18:11 TimToady m: my $foo = 42; {{{{ say ::('$foo') }}}}
18:11 camelia rakudo-moar bca33b: OUTPUT«42␤»
18:11 mohij o/
18:11 TimToady but bare ::() works like LEXICAL, so why doesn't OUTER::()
18:12 TimToady m: my $foo = 42; {{{{ say OUTER::::('$foo') }}}}
18:12 camelia rakudo-moar bca33b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_T6HhcG4QC␤Name component may not be null␤at /tmp/_T6HhcG4QC:1␤------> 3my $foo = 42; {{{{ say OUTER::7⏏5::('$foo') }}}}␤»
18:15 diana_olhovik_ joined #perl6
18:16 TimToady and maybe we should have OUTERS:: for OUTER::LEXICAL:: and CALLERS:: for CALLER::DYNAMIC::
18:16 TimToady since those situations arise frequently
18:17 TimToady or OUTERISH and CALLERISH if S is too short
18:18 TimToady OUTER::ETC::<$foo>  :)
18:19 TimToady where ETC means keep looking in that dimension...
18:19 FROGGS_ moritz: can I regenerate a single html file after changing something?
18:21 TimToady though the other factoring theoretically allows for CALLER::LEXICAL and OUTER::DYNAMIC, if those aren't non-sensical
18:23 FROGGS_ m: my $foo = 42; {{{{ my $foo = 21; say OUTER::OUTER::OUTER::OUTER::<$foo> }}}}
18:23 camelia rakudo-moar bca33b: OUTPUT«42␤»
18:24 TimToady yes, looking for a wildcard-ish thing to an arbitrary number of OUTERs
18:24 TimToady as jnthn++ points out, we already can do similarly with CALLER::DYNAMIC
18:25 FROGGS_ these OUTERs are also problematic if you have multi subs and have to take the proto into account (which might get eliminated)
18:25 FROGGS_ ohh, that was caller
18:26 TimToady I think we already have to account for inlining
18:26 TimToady and inlining doesn't matter for lexical scopes
18:27 TimToady (well, except for merging lexpads, but we do that already)
18:28 kjs_ joined #perl6
18:31 jnthn An onlystar proto never counts in the CALLER chain
18:31 jferrero joined #perl6
18:32 dalek Heuristic branch merge: pushed 48 commits to perl6-examples by paultcochrane
18:33 jnthn As for compile-time inlining, we're fairly conservative: if we see a pseudo-package, we don't do it, since it'll bust OUTER::
18:33 jnthn We might be...cheating...a little on CALLER
18:33 timotimo are we already doing that? cool.
18:34 jnthn VM-level inlining is easier to deal with in so far as if we hit a lookup we can re-write the stack to uninline too :)
18:34 jnthn Or compensate for it in other ways
18:38 J-L joined #perl6
18:38 J-L Hi!  I have a problem with NativeCall, if anyone's willing to help.
18:39 TimToady you have a problem with NativeCall if no one's willing to help :P
18:39 J-L Basically, I'm trying to implement Window's GetStdHandle as seen on https://msdn.microsoft.com/en-us/library/windows/desktop/ms683231(v=vs.85).aspx .
18:39 J-L I have this declaration:  use NativeCall;  sub GetStdHandle(int) returns OpaquePointer is native('Kernel32') { * }
18:39 J-L Then I run this code:  say 'Before';  my $handle = GetStdHandle(-10);  say 'After';
18:40 J-L The "Before" string prints out, but then my program quits.  Even when I use the perl6 REPL I get booted out of it and go back to the DOS prompt.
18:40 cognominal joined #perl6
18:40 J-L Apparently the program doesn't survive the call to GetStdHandle().  Does anyone know why?
18:40 FROGGS_ J-L: first of all: don't use 'int' there
18:41 FROGGS_ J-L: use either 'int32' or 'long'
18:41 jnthn It's a DWORD in MSDN, so int32
18:41 jnthn Also, maybe needs stdcall
18:42 J-L FROGGS_:  Just tried 'long', and got:  Invalid typename 'long' in parameter declaration.
18:42 FROGGS_ O.o
18:42 J-L FROGGS_:  Also tried 'int32'.  It doesn't give an error, but like at first, it just terminates the program with no error message.
18:42 FROGGS_ J-L: how old is your rakudo?
18:43 J-L jnthn: stdcall ?  What's that?
18:43 FROGGS_ J-L: hmmm, okay, then perhaps you need to try stdcall calling convention
18:43 FROGGS_ gimme a sec
18:43 J-L FROGGS_:  perl6 --version returns:  This is perl6 version 2014.12 built on MoarVM version 2014.12
18:43 jnthn J-L: Try adding "is nativeconf('stdcall')"
18:44 FROGGS_ try this: use NativeCall; sub GetStdHandle(int32) returns OpaquePointer is native('Kernel32') is nativeconv('stdcall') { * }
18:44 FROGGS_ J-L: your NativeCall (and therefore rakudo) is too old to know about long
18:44 J-L Is that "nativeconf" or "nativeconv" ?
18:45 FROGGS_ nativeconv
18:45 jnthn uh, what FROGGS_ wrote
18:45 FROGGS_ like CALLing CONVention
18:45 jnthn .oO( We should speak with one voice... )
18:45 FROGGS_ err, native*
18:45 FROGGS_ *g*
18:45 spider-mario joined #perl6
18:46 J-L That worked!  (At least, the "After" printed out.)  What does adding "is nativeconv()" do exactly?
18:46 FROGGS_ J-L: there are several ways to call into a C library, and this time here you need to choose the non-default
18:47 J-L Oh.
18:47 kjs_ joined #perl6
18:47 FROGGS_ J-L: lookup an article at wikipedia, I can't explain well enough :o)
18:47 jnthn There are different ways to put arguments into CPU registers or onto the stack, and approaches to who should clear them off the stack afterwards.
18:48 jnthn The Windows API on 32-bit machines uses one called stdcall, unlike most C code
18:49 jnthn In the 64-bit world they unified them, and got rid of this annoyance, only annoying thing being that if you write code on 64-bit you'll never discover problems like this until somebody tries it on 32-bit :)
18:49 FROGGS_ true :o)
18:50 J-L So now I want to implement GetConsoleMode() from https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx .
18:50 J-L I have so far:  sub GetConsoleMode(OpaquePointer, int is rw) is native('Kernel32') is nativeconv('stdcall') { * }
18:51 J-L And when I execute the code:  say 'Before'; my int $mode; GetConsoleMode($handle, $mode); say 'After'; $mode.say;
18:51 J-L It just prints 0 as the value of $mode .
18:52 J-L Is my GetConsoleMode() declaration correct?
18:52 J-L Do I have to specify that it returns Bool ?  And if so, how?
18:52 FROGGS_ J-L: it would be correct for a more recent rakudo+nativecall :o)
18:53 FROGGS_ a Bool is probably just an int8
18:54 jnthn FROGGS_: Um, even the "is rw"? :)
18:54 FROGGS_ instead of 'int is rw' you should again forget about plain 'int', but also replace it by OpaquePointer
18:54 jnthn or Pointer[int]
18:54 jnthn ?
18:54 FROGGS_ and then: say nativecast(jnt32, $mode-ptr)
18:54 jnthn Ah :)
18:54 FROGGS_ jnthn: that does not work with 2014.12
18:55 TimToady maybe we should just do rolling star releases now...
18:55 * jnthn thought we were doing monthly...
18:55 FROGGS_ ahh, I need to do the msi...
18:55 * TimToady pictures a star rolling..
18:55 jnthn But...maybe not the MSI
18:55 kaare_ joined #perl6
18:56 FROGGS_ I'll do the msi today
18:56 J-L FROGGS_ & jnthn:  So you're saying the declaration should be:  sub GetConsoleMode(OpaquePointer, OpaquePointer) returns int8 is native('Kernel32') is nativeconv('stdcall') { * }
18:56 FROGGS_ J-L: yes
18:57 FROGGS_ and then the nativecast after calling GetConsoleMode($something, $mode-ptr);
18:57 FROGGS_ J-L: will you upgrade your rakudo if I create a rakudo-star-2015.02.msi today?
18:57 FROGGS_ bbiab
18:58 timotimo FROGGS_: can you perhaps make the target directory for the installation configurable?
18:58 timotimo please?
18:58 FROGGS_ timotimo: unlikely
18:58 timotimo damn :(
18:58 FROGGS_ timotimo: because the install wizard has no buttons :o)
18:59 FROGGS_ and I dont know how easily I can make it have some :P
18:59 J-L FROGGS_:  Yes, absolutely I will upgrade.
18:59 FROGGS_ okay, then I know what I have to do (besides docs)
19:00 J-L Also, yesterday I asked for the Perl 6 equivalent of Perl 5's $^O variable, but didn't get an answer that worked.  Would anyone know another answer, or maybe the new version of rakudo will fix it?
19:01 TimToady m: say $*VM.config<osname>
19:01 camelia rakudo-moar bca33b: OUTPUT«linux␤»
19:02 TimToady did you try that one?
19:04 zby_home joined #perl6
19:04 J-L Excellent.  "say $*VM.config<osname>" worked great!
19:04 J-L Incidentally, wouldn't a new rakudo be called rakudo-star-2015.03.msi today?  (Instead of "2015-02".)
19:05 TimToady well, if it's based on rakudo 2015-02...
19:05 jercos joined #perl6
19:06 J-L TimToady:  Okay, makes sense.
19:08 J-L Incidentally, after implementing GetConsoleMode, I want to implement SetConsoleMode ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx ).
19:10 TimToady J-L: after you've figured this out, maybe you could look at some of the Windows-oriented tasks on http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Perl_6
19:11 zakharyas joined #perl6
19:12 jnthn m: say $*DISTRO.is-win
19:12 camelia rakudo-moar bca33b: OUTPUT«False␤»
19:12 jnthn That's a good way to ask "is this Windows"
19:12 dalek perl6-roast-data: 6ba0506 | coke++ | / (9 files):
19:12 dalek perl6-roast-data: today (automated commit)
19:12 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/6ba0506bb5
19:13 jercos m: say $*DISTRO.is-unix
19:13 camelia rakudo-moar bca33b: OUTPUT«No such method 'is-unix' for invocant of type 'Distro'␤  in block <unit> at /tmp/Y4P5pD4sYe:1␤␤»
19:13 TimToady it's not initialized that I could see
19:13 jnthn TimToady: Forme:
19:13 jnthn perl6-m -e "say $*DISTRO.is-win"
19:13 jnthn True
19:13 TimToady then I guess it is :)
19:13 jnthn *For me
19:14 timotimo well "is-win" is basically "do-i-have-to-do-everything-in-a-very-weird-and-roundabout-way-or-can-i-just-do-it-normally"
19:14 timotimo but that's too long
19:14 timotimo that's also the reason why there is no is-unix
19:14 timotimo :P
19:14 TimToady jercos: the opposite of is-win is obviously is-lose :)
19:14 jercos Haha, true.
19:14 jnthn Surely it's is-fail :P
19:14 jercos I mostly had in mind that .is-unix should return false on Linux, but true on Mac OS X ;)
19:15 TimToady trudat
19:15 [Coke] if someone wants RT privs, I need their rt logind.
19:15 [Coke] *loginid
19:15 * TimToady has no clue
19:15 nwc10 *now* you tell us.
19:16 nwc10 Wouldn't that have been better said 25 years ago? :-)
19:16 TimToady nobody was listening then
19:21 J-L Ooh!  I think I just got SetConsoleMode() working!
19:22 jnthn :)
19:22 * jnthn bbiab
19:26 skids J-L++
19:37 J-L What is the Perl 6 equivalent of Perl 5's:  my $input = <STDIN>;    ?
19:38 moritz my $input = $*IN.get;
19:38 moritz though it chomps by default
19:38 J-L How do you not chomp?
19:39 moritz open() has an option for that
19:39 moritz no idea how do it on $*IN
19:39 moritz what do you need the trailing newline for?
19:40 J-L Just curious.  I'm so used to Perl5's non-chomping behavior that I wonder how to emulate it.  If I do this, does it still chomp?  my @lines = $*IN.get;
19:40 anaeem1 joined #perl6
19:40 moritz that'll give you just one line
19:41 moritz use .lines to get 'em all
19:41 moritz Perl 6 routines don't know in which context they are called
19:41 moritz that's why magic readline was split into .get and .lines
19:42 moritz and maybe because it's better to have to separate methods for two separate actions
19:52 kjs_ joined #perl6
19:55 salva joined #perl6
19:58 b2gills actually having one method return a single item, or multiple items depending on context was the source of a bug in bugzilla
19:59 J-L Is there a Perl6 equivalent to Perl5's IO::Select::can_read() method?
20:07 J-L In Perl 6, how can I tell if a filehandle (such as $*IN) has data ready to read from it?  (Sometimes I would rather not stop and wait for input, if there's no input waiting to be read.)
20:08 moritz J-L: there's currently no API for that, but you could always do it another thread
20:08 moritz J-L: because we have, like, sane threading :-)
20:09 dalek doc: ec6c686 | moritz++ | t (2 files):
20:09 dalek doc: Remove fossils
20:09 dalek doc: review: https://github.com/perl6/doc/commit/ec6c6863cc
20:13 J-L moritz:  So if I want to check for input 100 times, I have to create 100 threads?  That seems a bit overkill.
20:14 PerlJam J-L: I don't think that's what moritz is saying.  Just that you can have one thread reading (either providing values or not) and the other thread doing stuff while it's waiting for values.
20:14 moritz right, what PerlJam said
20:20 moritz m: my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; while $in.status === Planned { my $l = $queue.poll; say $l // "idle" };
20:20 camelia rakudo-moar bca33b: OUTPUT«idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle␤idle…»
20:21 Foxcool joined #perl6
20:22 moritz works better locally here
20:22 PerlJam maybe you need a sleep in there to show that it's not always idle  :)
20:22 moritz m: my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; while $in.status === Planned { my $l = $queue.poll; say $l // "idle"; sleep 0.01 };
20:22 camelia rakudo-moar bca33b: OUTPUT«idle␤»
20:23 moritz m: say get
20:23 camelia rakudo-moar bca33b: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
20:23 moritz huh
20:23 J-L moritz and PerlJam:  Ultimately, I want to query input at multiple times, and do something if there's input.  In other words, I want to implement a non-blocking read.  I could do that in Perl5 with the select() call or using IO::Select::can_read().
20:23 skids Doesn't work really well here.  The idles stop coming on their own at random.
20:24 PerlJam skids: that's weird.
20:24 moritz random is fine
20:24 moritz J-L: well, that's what $queue.poll does in my example; it returns an item if there is one, otherwise an undefined value
20:24 PerlJam skids: wait ... what do you mean "stop coming"?
20:24 J-L Using a thread would totally change the paradigm, as one thread would be continually reading from STDIN, and would interfere with how the rest of the program reads from $*IN.
20:24 skids Just hang. COmpletely.  No more "idle"s
20:25 PerlJam skids: and no more input from $*IN?
20:25 skids Right.
20:25 skids Well, in my case *IN is the console, but no more input.
20:25 moritz J-L: fwiw I'm not arguing against any async/introspective IO, just wanted to point out an alternative
20:26 J-L moritz:  By your example, do you mean:  my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; while $in.status === Planned { my $l = $queue.poll; say $l // "idle"; sleep 0.01 };
20:27 jnthn m: my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; until $in { my $l = $queue.poll; say $l // "idle"; sleep 0.01 };
20:27 camelia rakudo-moar bca33b: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
20:27 jnthn moritz: Once a Promise backed by code starts running, it's status is Running, iirc
20:28 jnthn moritz: Boolify it is the way to check if it reached some conclusion
20:29 skids PerlJam: also tried it with a named fifo.  same basic result: sometimes after an input on the fifo you get 1 or two idles then nothing till the next time you input.
20:31 [Sno] joined #perl6
20:33 J-L moritz:  Your example uses elements I'm not familiar with, so I'll have to study it a bit.  But from what I can tell, it just automatically reads input and puts in a thread-safe list, expecting all non-blocking readers to check that list for existing elements before reading.  Correct?
20:37 skids J-L: That's the basic idea.  The async behavior has been split away from the actual IO operation into a general tool useful for all sorts of stuff.
20:37 muraiki joined #perl6
20:43 moritz jnthn: the better solution is probably to .close the channel after the input is exhausted, and check that
20:44 dalek specs: 3637e65 | TimToady++ | S02-bits.pod:
20:44 dalek specs: doc LEXICAL, OUTERS, and CALLERS pseudo packages
20:44 dalek specs: review: https://github.com/perl6/specs/commit/3637e65faa
20:44 moritz m: my $queue = Channel.new; my $in = start { $queue.send($_) for lines; $queue.close}; until $queue.closed { say $queue.poll // "idle"; sleep 0.001 };
20:44 camelia rakudo-moar bca33b: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
20:45 moritz locally produces an "idle" before the first line
20:45 colomon joined #perl6
20:46 dalek rakudo/nom: 8c56871 | nicholas++ | t/04-nativecall/03-simple-returns.c:
20:46 dalek rakudo/nom: The nativecall test for int8 should use `signed char` explicitly.
20:46 dalek rakudo/nom:
20:46 dalek rakudo/nom: Otherwise on architectures where bare `char` is unsigned, the test fails,
20:46 dalek rakudo/nom: because it returns the wrong value. (-103 + 256, instead of -103)
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8c56871483
20:46 laouji joined #perl6
20:46 dalek rakudo/nom: cccd6cf | TimToady++ | src/Perl6/World.nqp:
20:46 dalek rakudo/nom: do pseudopackage lookups with a hash
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cccd6cf3ed
20:46 dalek rakudo/nom: d3ba345 | TimToady++ | src/core/PseudoStash.pm:
20:46 dalek rakudo/nom: implement LEXICAL, OUTERS, and CALLERS
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3ba345b38
20:47 Ulti are grave accents available for use in Perl6?
20:47 TimToady .u grave
20:47 yoleaux U+0060 GRAVE ACCENT [Sk] (`)
20:47 yoleaux U+00C0 LATIN CAPITAL LETTER A WITH GRAVE [Lu] (À)
20:47 yoleaux U+00C8 LATIN CAPITAL LETTER E WITH GRAVE [Lu] (È)
20:47 Ulti backticks
20:48 TimToady they're available for any use you want them for
20:48 Ulti TimToady I meant more are they used for anything or could I slang in my own use for them
20:48 Ulti cool
20:48 TimToady they don't do qqx though
20:48 TimToady they are reserved (mostly) for user definition
20:48 Ulti generous :)
20:49 TimToady the only place we use 'em right now is in #`{ embedded comments }
20:49 TimToady yeah, you get one character :P
20:49 TimToady well, plus most of Unicode
20:49 Ulti :3
20:49 kjs_ joined #perl6
20:50 TimToady well, technically you get the control codes too
20:50 skids .oO(nobody wanted the backtick)
20:51 Hor|zon joined #perl6
20:52 * Ulti does
20:53 * masak is kind of disappointed that a tombstone emoji didn't show up as the result to the ".u grave" search
20:55 FROGGS_ J-L: http://rakudo.org/downloads/star/rakudo-star-2015.02.msi
20:55 J-L Is there an ungetc() method for $*IN ?
20:55 Ulti .u U+26FC
20:55 yoleaux U+26FC HEADSTONE GRAVEYARD SYMBOL [So] (⛼)
20:56 [Tux] Inline::Perl5 lost 41% performance (it got 41% slower)
20:56 masak Ulti: heh. so it was just "below the fold", then.
20:56 tgt joined #perl6
20:56 [Tux] https://github.com/Tux/CSV/commit/7e7c84fb185fa6ce5c4e027bcbeba166e607c34c
20:57 J-L Thanks, FROGGS_!  Is this new version with Moar?
20:58 FROGGS_ J-L: yes
20:58 FROGGS_ J-L: rakudo star is moar-only for the time being
20:58 J-L Great!  I'll uninstall what I have and install the new one.
20:58 FROGGS_ J-L: just rename your current C:\rakudo
20:59 FROGGS_ so you could switch back Justin Case
21:00 dolmen joined #perl6
21:05 tgt Hi. Rakudo-on-moar's base memory usage has gone up by about 20% (80MB to 95MB) over the last day or so.
21:05 tgt On OS X at least.
21:08 masak breaking news: Angular 2.0 just got a separate website to Angular 1.x.
21:08 * masak sobs, gently
21:09 * Ulti realises he's going to have to write a Slang rather than just sub circumfix:<` `>
21:09 vendethiel- masak: it's been dead to companies for a while now... at least the one I've worked in/talked with :p
21:09 literal tgt: sounds like a job for git bisect
21:09 tgt Yup, git bisecting atm.
21:09 muraiki masak: it's also using typescript now
21:10 jnthn tgt++
21:10 muraiki although the 2.0 website hasn't been updated to reflect that yet
21:10 vendethiel- muraiki: isn't it using atscript (the typescript "superset")?
21:10 masak vendethiel-: that's certainly not true in .se -- training is selling like cupcakes
21:10 masak vendethiel-: atscript and typescrip just merged into typescript
21:10 masak typescript*
21:10 muraiki vendethiel-: http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built-on-typescript.aspx
21:10 vendethiel- oh..
21:10 masak the term "atscript" is hereby retired.
21:11 vendethiel- good...
21:11 muraiki I don't use angular personally, just found it interesting to see from the sidelines :) I use knockout and it works pretty good for simpler webapps
21:11 masak 'The team will look at the traffic to both sites, along with GitHub, in order to determine where the community is still invested. This means that if a majority of traffic is still at angularjs.org, the team will continue to focus resources on 1.X. Angular 1.X will not end life until the majority of traffic has moved to 2.0. "We'll continue releasing Angular 1 releases until the vast majority of you migrate to
21:11 masak Angular 2," said Minar.'
21:11 masak they're so cute when they're young and naive like that.
21:11 vendethiel- ...and when they stated "back then" that 1.x would stop 1 year after the first 2.0 release...
21:11 muraiki what in the world
21:12 muraiki I thought that was a parody you made up
21:12 masak "'Second systems are easy', continued Minar. 'I am totally sober right now', he added."
21:12 muraiki oh
21:12 vendethiel- :DD
21:12 muraiki is it a joke? heh :)
21:12 masak muraiki: the first bit was a real quote, though.
21:12 masak from http://www.infoq.com/news/2015/03/angular-2-concerns-addressed
21:12 vendethiel- masak: that's interesting. It's not like I was even looking for people "hating on it", I just talked with people I knew used angular at work -- in a lot of places, they were going for the removal
21:12 muraiki I'm speechless
21:13 masak vendethiel-: I was teaching it today. full classroom.
21:13 vendethiel- masak: I'm not saying everyone ran away :P
21:13 jnthn Apparently there's a disadoption curve some people are ahead of too :P
21:13 masak vendethiel-: though I keep telling people "use it as a prototyping tool. AngularJS is the VB of 2015. it's fast to implement a fresh idea, before the troubles set in."
21:13 muraiki interesting
21:13 muraiki do you have any experience with ember?
21:14 masak nope. only hearsay.
21:14 masak I know Ember people keep comparing themselves to Angular.
21:14 vendethiel- masak: yeah, that sounds sensible
21:14 masak wondering where they went wrong, PR-wise.
21:14 anaeem1 joined #perl6
21:14 muraiki I recently tried using RxJS along with virtualdom, and it seemed neat but then I realized someone else was already making the same thing and seemed to actually know what they are doing
21:14 nwc10 it's 27 days until April 1st. I think.
21:14 eli-se Use a virtual DOM library with lenses and a global modifyState function that takes a lens and a value.
21:15 eli-se And keep your model immutable.
21:15 muraiki that's what Om does?
21:15 eli-se Yes. It's the only sane way I've ever seen a web UI done.
21:15 masak eli-se: isn't "keep your model immutable" also known as "static HTML"? :P
21:15 muraiki I don't think I can sell my boss on clojurescript, although I've written a simple library in it before
21:16 nwc10 oh my. "A huge complaint about Angular 2 was that there was no migration path."
21:16 nwc10 well d'oh. that's a foresight mistake.
21:16 eli-se masak static HTML without any JavaScript would be ideal, of course, but clients tend to be noobs who need fancy GUIs.
21:16 muraiki but if you like om, check out rxjs... I think you might find its ideas pretty interesting
21:16 nwc10 Inline::AngularJS::1, and sorted! :-)
21:16 muraiki https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
21:17 muraiki ok sorry for getting everybody offtopic onto frontend dev
21:17 muraiki I just appreciate the insight of experienced devs... I've only been programming professionally for a year
21:17 eli-se "There are plenty of bad explanations and definitions out there on the internet. Here is another one."
21:17 muraiki "I wrote my own monad tutorial, and it will definitely make sense to you!"
21:18 Mouq muraiki: Only off topic until we have RakudoJS :P
21:18 muraiki Mouq: hehe :D
21:18 eli-se I don't believe in any concurrency APIs that do not implement CSP.
21:18 tgt jnthn: It's one of d0d4ba6 and db49f3b, the first doesn't build.
21:19 masak eli-se: "Contain, Secure, Protect"? :P
21:19 * masak learned about that CSP recently
21:20 eli-se Blocking I/O is the only correct way of doing I/O. Async I/O is an optimisation that doesn't need to affect APIs.
21:20 muraiki so you're not a fan of the actor model?
21:21 vendethiel- muraiki: I don't think the actor model is related to async IO
21:22 muraiki well, CSP vs CPP (communicating parallel processes)
21:22 eli-se Actor model and CSP are isomorphic.
21:22 eli-se You can implement them in terms of each other.
21:23 muraiki I thought CSP couldn't implement unbounded nondeterminism, which was one of the things that prompted the actor model?
21:23 muraiki disclaimer: noob
21:27 TimToady m: my $foo = 42; {{{{ my $foo = 21; say OUTERS::<$foo> }}}}
21:27 camelia rakudo-moar d3ba34: OUTPUT«42␤»
21:27 eli-se I don't know either. I talk about close approximations of CSP, such as Go.
21:27 TimToady m: my $foo = 42; {{{{ my $foo = 21; say LEXICAL::<$foo> }}}}
21:27 camelia rakudo-moar d3ba34: OUTPUT«21␤»
21:28 flussence joined #perl6
21:28 TimToady someone with a hankering to write tests could do so for LEXICAL, OUTERS, and CALLERS
21:28 eli-se But promises, observables and callbacks are no-go. They require you to think upfront of whether some interface implementation will ever do any I/O that might be desired to be performed asynchronously.
21:29 TimToady we tend to use laziness for that
21:29 eli-se If you design a reader interface with the implementation of an in-memory buffer in mind, and you later want to implement it for a socket or a file, then you're screwed since you didn't anticipate by returning Future[T] instead of T.
21:30 muraiki interesting
21:31 dalek Heuristic branch merge: pushed 49 commits to perl6-examples by paultcochrane
21:31 eli-se So you end up either making the buffer implementation have an asynchronous API (even though it's synchronous) or having a second async API that differs only in the return type being a future
21:31 eli-se or taking a callback or anything isomorphic to that
21:32 eli-se you can solve it with threads or fibers, or by using the continuation monad everywhere, though. I'm a fan of the former.
21:35 dalek perl6-examples: c6f3902 | paultcochrane++ | categories/rosalind/itwv-grondilu.pl:
21:35 dalek perl6-examples: [rosalind] add initial docs for itwv example
21:35 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/c6f3902427
21:38 telex joined #perl6
21:41 tadzik joined #perl6
21:46 J-L FROGGS_:  Okay, I used:  sub GetConsoleMode(OpaquePointer, OpaquePointer) returns int8 is native('Kernel32') is nativeconv('stdcall') { * }
21:46 J-L And now when I call it, I get:  Native call expected return type with CPointer representation, but got a P6int
21:47 FROGGS_ J-L: and you are sure that the error message if for calling GetConsoleMode? I bet it is for calling nativecast later on
21:47 dalek perl6-examples: 536199b | paultcochrane++ | categories/shootout/k-nucleotide.p6.pl:
21:47 dalek perl6-examples: [shootout] use v6; add vim coda
21:47 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/536199bdc5
21:47 FROGGS_ either that, or you pass a native int to GetConsoleMode()
21:49 J-L I'm actually not calling nativecast().  I'm calling exit() right before that.
21:49 FROGGS_ then you pass something odd to GetConsoleMode
21:51 J-L Oh, you're right, FROGGS_.  I passed in an int instead of an OpaquePointer.
21:51 FROGGS_ yeah... the error message is weird though... It assumes it is about return types instead of parameters
21:52 kst` joined #perl6
21:53 J-L Okay... now the script is failing (silently) after the nativcast(int32, $mode) call.
21:53 J-L Basically, I wrote:  my OpaquePointer $mode;  GetConsoleMode($handle, $mode);  say nativecast(int32, $mode);
21:53 TimToady error messages that guess right are awesome, but error messages that guess wrong are LTLTA.
21:53 J-L Is that the wrong usage?
21:54 J-L LTLTA?
21:54 TimToady less than LTA
21:54 muraiki I just built perl6 using rakudobrew and I'm trying to install Inline::Perl5 via panda. However, I get an error "Cannot locate native library... p5helper.so" I see a call to gcc above to make the .so along with 2 warnings, but no errors...
21:54 J-L LTA = Less Than Awesome ?
21:54 FROGGS_ J-L: aye
21:55 FROGGS_ muraiki: you have install libperl-dev or some such?
21:55 muraiki whoops, I bet that's it!
21:55 FROGGS_ muraiki: is there a linker error/warning?
21:55 FROGGS_ J-L: what does this give you before doing the nativecast? say $mode
21:56 J-L FROGGS_:  It says:  (OpaquePointer)
21:57 FROGGS_ J-L: ahh, please do this and try again: my OpaquePointer $mode.=new; GetConsoleMode($handle, $mode); say $mode
21:58 muraiki FROGGS_: bah, I don't have libperl-dev but I also can't install it on my machine as we have a slightly older version of perl than required, and the perl+libperl packages are marked as held. this isn't really something I can change, unfortunately
21:58 muraiki I don't suppose I could do this somehow via perlbrew?
21:58 FROGGS_ :o(
21:58 FROGGS_ muraiki: I am the wrong person to ask
21:58 muraiki thanks anyways :) someday I'll get Inline::Perl5 working on my dev machine... at least it's not that ancient freebsd one I used to have!
21:59 J-L FROGGS_:  Now it says:  OpaquePointer<NULL>
22:00 FROGGS_ J-L: okay, I know what we have to do for rakudo-2015.02: my CArray[int32] $mode.=new; $mode[0] = 0; GetConsoleMode($handle, $mode); say $mode[0]
22:00 FROGGS_ J-L: and change the sub declaration to have CArray as second parameter type
22:00 muraiki FROGGS_: oh wait, I'm a sysadmin noob: I do have libperl-dev installed, albeit one version older than what is currently available in the ubuntu repos. the version I have is 5.14.2-6ubuntu2.2
22:01 FROGGS_ muraiki: I believe that will do
22:01 muraiki hrm
22:02 muraiki yeah, I don't see any errors making p5helper.so, only warnings
22:02 masak 'night, #perl6
22:02 muraiki night
22:02 J-L FROGGS_:  That... seemed to work.  Is the need to use CArray a bug, or is it supposed to be done that way?
22:03 FROGGS_ J-L: it was the only way to achieve what you are doing a few weeks ago...
22:04 J-L So I need to use CArray because it's an output variable?
22:04 FROGGS_ J-L: jnthn++ has done a lot of stuff to support 'int32 is rw' directly, but that landed right after releasing 2015.02 (because it is usually too risky to merge big changes right before a release)
22:05 FROGGS_ J-L: you're using a CArray because that gives you a pointer to a thing (its slot), and the slot is allowed to be modified
22:05 jnthn The CArray trick has been the normal way for quite a while
22:06 J-L FROGGS_ and jnthn:  So seeing that the CArray trick works, will it continue to work in future releases?
22:07 jnthn J-L: Yes, because that's the way C works :)
22:07 jnthn An array of 1 thing is the same as a pointer to a thing.
22:07 jnthn There's just be a neater way to do it in the future too.
22:08 J-L FROGGS_ and jnthn:  Good.  So the "sub GetConsoleMode(OpaquePointer, CArray)" declaration will soon be able to change to "sub GetConsoleMode(OpaquePointer, int32 is rw)", correct?
22:08 larion joined #perl6
22:08 nine_ muraiki: what arebthose warninfs?
22:08 FROGGS_ J-L: yes
22:09 J-L FROGGS_:  Excellent.
22:09 kjs_ joined #perl6
22:09 muraiki nine_: https://gist.github.com/muraiki/b60867f48eebd05260e5
22:09 FROGGS_ J-L: sub GetConsoleMode(Pointer, Pointer[int32]) might also work (then)
22:09 espadrine joined #perl6
22:10 nine_ muraiki: oh yes, looks like too old perl
22:10 muraiki T_T
22:10 muraiki 5.14.2
22:10 nine_ muraiki: I probably should invest some time to support those
22:11 muraiki doh, I was hoping to get a newer version on my new dev VM... but I think before I had 5.10 or something, so this is somewhat better :)
22:11 muraiki nine_: if I perlbrew a newer version will that work? or will it conflict with my older libperl-dev?
22:11 nine_ muraiki: though I find it kind of strange that someine can install some bleeding edge Perl 6 but no recent Perl 5 ;)
22:12 nine_ muraiki: perlbrew should be safe
22:12 muraiki heh, our codebase runs on some old perl versions in production, so I think this is the newest version my boss felt safe using
22:12 muraiki I'll try perlbrew, thanks!
22:12 nine_ muraiki: just follow the Inline::Perl5 README
22:12 J-L FROGGS_ and jnthn:  Now, if I can figure out how to poll STDIN to see if there's input waiting, I can implement non-blocking reads very easily.  There was a sort-of way already given that used Channel, but I'm wondering if there's a more direct way.
22:13 nine_ muraiki: and tell me what's miasing in the docs :)
22:13 ab5tract is there a method similar to at_pos which allows a class to define a custom bind behavior?
22:13 muraiki nine_: no problem, thanks
22:13 nine_ good night all!
22:13 jnthn ab5tract: bind_pos
22:14 J-L FROGGS_:  I tried:  sub GetConsoleMode(OpaquePointer, Pointer[int32]) returns int8 is native('Kernel32') is nativeconv('stdcall') { * }
22:14 J-L ...and I got this compiler error:  Invalid typename 'Pointer' in parameter declaration.
22:14 FROGGS_ J-L: that also happened right after 2015.02
22:15 J-L Ah.
22:15 ab5tract i'm thinking here of something that would allow a class to log any rhs assignments to the bound variable through any of its binds
22:15 MadcapJake joined #perl6
22:18 ab5tract log just being a for instance, filtering based on rhs value could be another
22:18 raydiak could also achieve that with a Proxy, I expect
22:18 ab5tract so it would be a method you define on the bound object's class
22:19 ab5tract raydiak: ah, thanks, i will look at that.
22:19 flussence joined #perl6
22:19 raydiak ab5tract: https://github.com/raydiak/Inline-Lua/blob/master/lib/Inline/Lua/Object.pm6#L139
22:21 * Ulti suspects he is too stupid to create a slang
22:22 Ulti I've got to the point where the compiler just complains it was expecting prefix or term... and I've defined ` ` as a quote which is a value which is a term
22:24 raydiak speaking of bind_pos, I was wondering if I should be using it instead of the thing I just linked, which seems to make binding and slice assignment work as-is
22:25 ab5tract raydiak: quite interesting
22:26 raydiak also was wondering why I had to return a proxy from at_key to get slice assignment to work, when I already had assign_key defined, seems like it ought to just do multiple calls to assign_key
22:27 raydiak but I just wrote all the write access for lua tables last night with deteriorating clarity of thought as it got later, so...keep that in mind but it does seem to be a working model (need to write tests copied from the bash history)
22:33 J-L FROGGS_ and jnthn:  Thanks to your help, I am able to implement non-echoing keyboard input on Windows (using NativeCall with "Kernel32").  Is there a possibility that I could submit my work into a (portable) module that allows non-echoing keyboard input into the Standard build of Perl6?
22:34 dalek rakudo/nom: bbe6949 | jnthn++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:
22:34 dalek rakudo/nom: Share role curries use 6model parametrics.
22:34 dalek rakudo/nom:
22:34 dalek rakudo/nom: This means that Positional[Int] will always lead to the same type
22:34 dalek rakudo/nom: object (or at least, will once the pre-comp bits of 6model parametrics
22:34 dalek rakudo/nom: are also implemented). This resolves various errors like "expected
22:34 dalek rakudo/nom: Array[Str] but got Array[Str]".
22:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bbe6949d94
22:35 jnthn J-L: There's not a "standard build" as such, but certainly you can add it to the module eocysystem then ask if it can be included in Rakudo Star (which is the thing you downloaded the MSI of)
22:36 laouji joined #perl6
22:36 Ulti could someone take a look at this and see where I'm being stupid? https://gist.github.com/MattOates/54d5a294798e1aa7b3ac
22:37 J-L jnthn:  I've never heard of eocysystem.  What is it?
22:37 J-L (I googled 'eocysystem', and I just got links to 'ecosystem'.
22:38 J-L Maybe you meant 'ecosystem'?)
22:39 raydiak Ulti: it looks like you are passing your actions to .parse as a positional instead of a named
22:39 Ulti actions =>
22:39 Ulti !!!
22:39 Ulti thanks raydiak
22:40 Ulti wow got all the slang part right -___- but missed that
22:40 raydiak :)
22:40 Ulti YAY
22:40 Ulti it works!!!
22:40 Ulti that is cool
22:40 raydiak \o/
22:41 Ulti its kind of nice you can just browse through the Rakudo grammar and pick and choose what you want to hack into
22:42 FROGGS_ J-L: that is the "ecosystem": http://modules.perl6.org/
22:42 Ulti hah awesome it even comes up with my compiler panic message >:3
22:42 Ulti wait! I can have compile time sequence validation
22:46 * raydiak is looking forward to adding a few optional syntax extensions to Inline::Lua eventually for things like lua blocks and function definitions and direct method dispatch
22:47 dalek roast: 801ec1e | jnthn++ | S09-typed-arrays/arrays.t:
22:47 dalek roast: Correct a couple of tests; Int !~~ Num.
22:47 dalek roast: review: https://github.com/perl6/roast/commit/801ec1e1b3
22:47 dalek roast: b421638 | jnthn++ | S09-typed-arrays/arrays.t:
22:47 dalek roast: Test for RT#66892.
22:47 dalek roast: review: https://github.com/perl6/roast/commit/b4216388b8
22:47 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=66892
22:48 J-L Say, I'm running:  perl6 -e "say $_ for lines"
22:48 J-L How do I give an EOT signal?
22:48 J-L On Perl5, I would type CTRL-Z and hit return.
22:48 J-L (I'm on Windows, by the way.)
22:49 ab5tract J-L: the Kernel32 gave you away :)
22:49 ab5tract I'm not sure about the EOT signal though
22:50 raydiak J-L: that's a function of your shell, not perl itself, so it should work the same (even if you did the equivalent in an entirely different laguage)
22:50 ab5tract By ecosystem, I believe jnthn meant "those libraries which can be installed with panda"
22:50 raydiak any time you're on windows using cmd.exe, ^Z ought to do it...on *nix it's ^D btw
22:51 jnthn ab5tract: Yes :)
22:51 jnthn J-L: http://modules.perl6.org/
22:51 ab5tract speaking of which.. i have something to contribute along those lines :D
22:51 ab5tract https://github.com/ab5tract/Terminal-Print
22:53 ab5tract it's nowhere near finished, but i feel like it's about time it gets live
22:53 J-L raydiak:  I don't think it's entirely a function of my shell.  When I dabbled with ruby, I had to hit CTRL-break instead of CTRL-C.  When I run     perl -e "while (<>) { print }"   in Perl5, CTRL-Z and ENTER exit just fine.
22:53 raydiak nice...ab5tract++
22:54 ab5tract raydiak: have you run show-love.6 yet? :)
22:55 ab5tract *p6
22:56 ab5tract jnthn: how do i go about getting Terminal::Print into the ecosystem, so to speak
22:56 timotimo Copryright? :)
22:56 avuserow hmm, some of the caller/outer work appears to have given me a way forward with Log::Simple and routing based on the caller's package. (whoever did this)++
22:56 raydiak J-L: you're confusing signal handling, which is what happens with ^C and ^break, with inputting an eof character
22:57 raydiak ab5tract: not yet, but I'll check it out in a few minutes :)  reminds me a lot of the preview output in Pray on the surface of it though
22:58 virtualsue joined #perl6
22:58 avuserow ab5tract: adding something to the ecosystem, see http://doc.perl6.org/language/modules
22:58 ab5tract raydiak: that reminds me that i've been looking forward to looking deeper into pray
22:58 zoosha joined #perl6
22:59 zoosha joined #perl6
22:59 avuserow ab5tract: in short, write a META.info, then send a PR to add that location to https://github.com/perl6/ecosystem/blob/master/META.list
23:01 raydiak ab5tract: sweet :)  I haven't worked on it much in a while, but iirc I was trying to keep it pretty internally sane; let me know what you think
23:01 J-L raydiak:  Ok, so one's ^C and one's ^D (or ^Z+ENTER), but nevertheless ^Z+ENTER works with my Perl5 but not with my Perl6.
23:04 J-L When I type "lines" in my perl6 REPL instance, I can't get out.  Not even CTRL-C works.
23:04 ab5tract J-L: are you using cmd.exe or powershell?
23:05 J-L Meanwhile on Perl5, if I start the debugger with "perl -wde 1" and type:  @a = <>;  I can get out with CTRL-Z and ENTER.
23:05 J-L I'm using cmd.exe .
23:05 raydiak J-L: heh quite right, ^Z doesn't work...^C worked for me to kill it, though I was using -e instead of the repl
23:05 virtualsue_ joined #perl6
23:05 ab5tract it sounds like perl6 is not tuning into the escape sequence
23:05 ab5tract which sounds like it might be a problem with liblinenoise
23:06 raydiak is that what moar uses for console i/o on windows?
23:07 jnthn liblinenoise seems to make things worse on Windows than without it :/
23:07 J-L Someone earlier gave me this code to check to poll for input on STDIN:  my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; while $in.status === Planned { my $l = $queue.poll; say $l // "idle"; sleep 0.01 };
23:07 J-L I'm still trying to figure it out.
23:08 J-L It makes a Promise object, but shouldn't "for lines" never return?
23:08 raydiak apparently EOF doesn't exist on windows terminals and ^Z (the Substitute character) is just a common convention...???...
23:09 Ulti "Cannot find method 'orig'" ring a bell with anyone?
23:09 J-L raydiak:  Yes.  ^Z (plus ENTER) is the standard way to signal EOT on MS-DOS and Windows systems.  At least, I think that's the case.
23:10 J-L The line     $queue.send($_) for lines;    would never terminate, right?  So the promise that runs it would never end, correct?
23:10 dalek rakudo/nom: f19a9a9 | TimToady++ | src/Perl6/Actions.nqp:
23:10 dalek rakudo/nom: catch null regex_def if it gets to Actions
23:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f19a9a9d6e
23:12 diana_olhovik_ joined #perl6
23:12 dalek doc: b3a4cdc | FROGGS++ | lib/Language/nativecall.pod:
23:12 dalek doc: add documentation for NativeCall
23:12 dalek doc:
23:12 dalek doc: This is an extended version of zavolaj's README. Three TODO sections
23:12 dalek doc: were added which will be filled shortly.
23:12 dalek doc: review: https://github.com/perl6/doc/commit/b3a4cdc903
23:12 ab5tract avuserow: thank you :)
23:12 hoelzro FROGGS_++
23:13 ab5tract FROGGS_++ !
23:13 FROGGS_ it should appear here anytime soon: http://doc.perl6.org/language.html
23:13 FROGGS_ and I'll extend it in the next days
23:14 ab5tract jnthn: i was curious about the linenoise choice myself. readline is a bit of a beast, as i understand it, so i wasn't too surprised
23:14 FROGGS_ but for all star users: types pointers and such are not included in 2015.02 but are available via rakudo head+panda (using rakudobrew for example), or by waiting for 2015.03
23:16 ab5tract to see that you had gone with something else. but the pickings seem pretty slim, so i wondered what stood out about linenoise
23:18 raydiak J-L: yeah it looks like we have some bug in how we handle ^Z on the windows console, since, as I'm reading, handling that is the voluntary reponsibility of the program itself under windows
23:18 donaldh joined #perl6
23:19 J-L Ah, Windows, why must you be so different than your Unix brethren?
23:19 jnthn ab5tract: There is an option to build with libreadline also, I think
23:19 jnthn ab5tract: As for linenoise, not sure, was suggested by somebody else :)
23:19 ab5tract ah, i didn't realize that
23:20 ab5tract jnthn: at what layer would one hack one the repl, at the moment?
23:21 FROGGS_ the problem with readline was that we cannot rely on it being available on the system and that we cannot ship it due to license reasons...
23:21 ab5tract is it vm-implementation level, nqp op level, etc
23:21 FROGGS_ and linenoise is quite tiny (a thousand loc IIRC)
23:22 FROGGS_ ab5tract: as a module in Perl 6 as a proof of concept, and then it wants porting to nqp
23:23 ab5tract FROGGS_: so you mean start from scratch in Perl 6, and work backwards once the design is finalized?
23:23 FROGGS_ J-L / ab5tract: enjoy: http://doc.perl6.org/language/nativecall
23:23 cognominal joined #perl6
23:23 FROGGS_ ab5tract: yes
23:24 ab5tract hmmm... that sounds fun :)
23:24 FROGGS_ ab5tract: fast prototyping makes sense here
23:24 FROGGS_ gnight #perl6
23:24 ab5tract gnight FROGGS_ !
23:27 donaldh $*VM.^methods.say
23:27 donaldh r: $*VM.^methods.say
23:27 camelia rakudo-moar bbe694: OUTPUT«BUILD Str gist <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon>␤»
23:28 ab5tract i'm also going to head to sleep
23:28 ab5tract \o #perl6
23:29 gfldex joined #perl6
23:35 zby_home joined #perl6
23:37 J-L I'm trying to learn how the Promise class works.  The above example that uses it doesn't seem to work for me.
23:39 timotimo what above example?
23:44 J-L The above example was:  my $queue = Channel.new; my $in = start { $queue.send($_) for lines; True }; while $in.status === Planned { my $l = $queue.poll; say $l // "idle"; sleep 0.01 };
23:46 jnthn TimToady: On native arrays: which of the methods you expect to find on Array can you expect to have on array? "Just about all of them" is a fine enough answer, and the one I'm kinda expecting.
23:46 jnthn TimToady: Follow up question: what type do we expect .sort, .grep, .map, etc. to give back?
23:47 jnthn TimToady: (I'm going with array (lowercase) as the type for native arrays, though it'll only be meaningful parameterized with a native e.g. array[int], similar to how we discussed at some point)
23:48 jnthn TimToady: One reason the type question is a little interesting: native arrays aren't lazy. .map at so forth usually is. We can easily make map not be. But .pick(*) and .roll(*) are actually infinite, so we couldn't meaningfully do those non-lazy...
23:48 jnthn s/at so forth/and so forth/
23:49 jnthn I'm going to get some rest now, so can wait for answers :)
23:49 dalek rakudo/nom: 2f7d46b | jnthn++ | src/Perl6/Metamodel/MetaMethodContainer.nqp:
23:49 dalek rakudo/nom: Fix "method ^foo(...) { ... }" serialization issue
23:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2f7d46b3ed
23:50 timotimo neato
23:50 jnthn (Yes, the stuff tonight is clearing blockers and starting to sketch out native array stuff.)
23:51 Ben_Goldberg joined #perl6
23:51 raydiak ++jnthn++
23:51 * timotimo cheers
23:52 timotimo and i really want to have sized arrays for inside CStruct :S
23:52 skids joined #perl6
23:54 jnthn Everyone always wants all the things /o\
23:55 * jnthn gets some rest...
23:55 jnthn 'night o/
23:55 raydiak \o
23:57 timotimo gnite jnthn

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

Perl 6 | Reference Documentation | Rakudo