Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-24

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:05 avgn5 joined #perl6
00:05 BenGoldberg joined #perl6
00:06 avgn5 p6: say 3;
00:06 camelia rakudo-moar 64e1c7: OUTPUT«3␤»
00:06 * avgn5 notices the '/msg camelia' part...
00:11 avgn5 left #perl6
00:14 rurban joined #perl6
00:23 guru joined #perl6
00:25 guru__ I've just installed rak* 2016.01, tried to install Readline as recommeded, it failed its tests
00:25 guru__ Is this a known problem, or should I start trying to debug?
00:40 k-man joined #perl6
00:40 Ben_Goldberg joined #perl6
00:50 Actualeyes joined #perl6
00:52 rburkholder joined #perl6
00:53 secwang joined #perl6
00:56 sortiz guru__, Readline works well for me, what failed tests or problems you have?
01:18 BenGoldberg_ joined #perl6
01:19 kid511 joined #perl6
01:21 BenGoldberg_ joined #perl6
01:35 travis-ci joined #perl6
01:35 travis-ci Rakudo build failed. Will "Coke" Coleda 'use errata branch for testing, not original tag'
01:35 travis-ci https://travis-ci.org/rakudo/rakudo/builds/111340254 https://github.com/rakudo/rakudo/compare/a02d44b93ff0...b801c3a4cf53
01:35 travis-ci left #perl6
01:40 BenGoldberg_ joined #perl6
01:45 secwang joined #perl6
01:45 BenGoldberg joined #perl6
01:51 TimToady joined #perl6
02:09 secwang joined #perl6
02:23 raiph joined #perl6
02:31 iloveunix joined #perl6
02:32 ka joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:03 noganex_ joined #perl6
03:37 revhippie joined #perl6
03:47 vendethiel joined #perl6
03:49 toddr joined #perl6
03:54 Herby_ joined #perl6
03:54 Herby_ Evening, everyone!
03:55 Herby_ \o
04:04 MadcapJake super quiet in here...
04:06 Herby_ Herby is here!
04:07 Herby_ contemplating how difficult it would be to create a "
04:07 Herby_ "On-Call Schedule" program for my hospital
04:07 Herby_ turns out they don't currently have one
04:08 Herby_ It would have to be a web app of some sort, which I don't think is currently Perl 6's strong suit
04:08 Herby_ but I could be wrong
04:24 toddr left #perl6
04:31 tadzik yeah, webdev is not exactly perl6's strong suit indeed
04:33 tadzik then again, depending on how little you need, we may be able to figure something out :)
04:35 jdv79 p5 has serious webdev chops.  you could do it there and then port over if you like with Inline::Perl5/6 when it suits...
04:36 secwang joined #perl6
04:44 Herby_ yeah, if I was thinking Perl 5 if I started working on it
04:44 Herby_ I'd have to learn Dancer 2 I guess
04:51 jdv79 or mojo or web::simple or cat or, shudder, mason2 if you really need to contort perl into php
04:52 jdv79 sorry jon if you ever read that
05:08 remmie joined #perl6
05:13 Actualeyes joined #perl6
05:17 remmie left #perl6
05:27 MadcapJake .tell Herby_ i'd suggest trying Crust if you do want to peruse webdev in Perl 6
05:27 yoleaux MadcapJake: I'll pass your message to Herby_.
05:45 nakiro joined #perl6
05:45 raiph .tell moritz I'm writing a Type System p6doc page. I've made good progress but will have to pause on it for a couple days. It's not ready to publish in a gist. I wanted to "let #perl6 know" to reduce the chances of duplicated effort.
05:45 yoleaux raiph: I'll pass your message to moritz.
06:03 Cabanossi joined #perl6
06:03 ka joined #perl6
06:06 vendethiel joined #perl6
06:10 dayangkun joined #perl6
06:11 Woodi so Mint ISO was hacked by absentvodka via Wordpress... that blogging platform will beat BIND soon :)
06:25 CIAvash joined #perl6
06:51 vendethiel joined #perl6
06:58 CIAvash joined #perl6
07:01 moritz .
07:01 yoleaux 05:45Z <raiph> moritz: I'm writing a Type System p6doc page. I've made good progress but will have to pause on it for a couple days. It's not ready to publish in a gist. I wanted to "let #perl6 know" to reduce the chances of duplicated effort.
07:05 [Tux] Any news on untouched CRNL RT#127358 and/or UTF8-C8 ?
07:05 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127358
07:05 [Tux] or longdouble perl5 support in Inline::Pelr5
07:05 domidumont joined #perl6
07:08 [Tux] test            23.298
07:08 [Tux] test-t          12.060
07:08 [Tux] csv-parser      50.995
07:11 domidumont joined #perl6
07:27 firstdayonthejob joined #perl6
07:30 vendethiel joined #perl6
07:30 _mg_ joined #perl6
07:36 jeek joined #perl6
07:42 azawawi joined #perl6
07:42 azawawi good morning #perl6
07:43 azawawi https://github.com/azawawi/atom-perl6-editor-tools/blob/master/snippets.md # Supported snippets in Atom Perl 6 editor tools. PRs are more than welcome.
07:50 sno joined #perl6
07:52 adu joined #perl6
07:52 fireartist joined #perl6
07:55 sjoshi joined #perl6
07:57 Ven joined #perl6
07:59 Ven_ joined #perl6
08:12 abraxxa joined #perl6
08:20 darutoko joined #perl6
08:33 tmch joined #perl6
08:33 zakharyas joined #perl6
08:39 john51 joined #perl6
08:43 brrt joined #perl6
08:43 dakkar__ joined #perl6
08:46 rurban joined #perl6
08:51 ely-se joined #perl6
08:54 17WAADLHR left #perl6
08:56 gregf_ joined #perl6
08:57 abraxxa the perl6 --help output is confusing:
08:57 abraxxa --doc                extract documentation and print it as text
08:57 abraxxa --doc=[module]       Use Pod::To::[module] to render inline documentation.
08:58 abraxxa the same parameter controls how pod is displayed and which pod is displayed?
08:59 RabidGravy joined #perl6
09:00 moritz where do you read the "how" aspect?
09:00 moritz it tells you that it renders it as text by default
09:01 abraxxa ReadLine fails its tests on 2016.02
09:01 abraxxa moritz: how do I specify the modulename of which i want to display the docs?
09:02 abraxxa perl6 --doc Some::Module doesn't work
09:02 abraxxa perl6 -M Some::Module --doc neither
09:02 adu_ joined #perl6
09:02 * abraxxa misses a perldoc6
09:02 moritz there's a p6doc in the perl6/doc repo
09:03 abraxxa @Readline: # Type check failed in binding $version; expected Version but got Str ("v6")
09:03 DrForr Sigh.
09:03 abraxxa moritz: but that isn't installed by default when using rakudobrew?
09:04 moritz abraxxa: no
09:06 abraxxa moritz: how can I install it and are there plans to do so by default?
09:06 DrForr Okay, what *should* I be using for the version, I was just using constant LIB = ('readline', 'v6') as someone else was doing.
09:06 * DrForr checks doco again hoping to find something...
09:06 moritz abraxxa: with panda
09:07 moritz abraxxa: and no, no plans; rakudo star ships it by default, and that's what we recommend to do
09:07 abraxxa moritz: ah, great, thanks!
09:07 DrForr Version.new(6)?
09:07 moritz m: say Version.new('v6')
09:07 camelia rakudo-moar 64e1c7: OUTPUT«vv.6␤»
09:07 moritz m: say Version.new('6')
09:07 camelia rakudo-moar 64e1c7: OUTPUT«v6␤»
09:08 kurahaupo joined #perl6
09:08 DrForr quoted, riiight.
09:08 moritz m: say Version.new(6)
09:08 camelia rakudo-moar 64e1c7: OUTPUT«v6␤»
09:08 moritz works without the quotes too
09:09 moritz but in general, versions are strings, not just integers
09:10 DrForr That's what I thougt as well, which is why I just used ('readline',v6) thinking that v-strings were the way to go. 'sokay.
09:11 * DrForr reruns tests.
09:11 moritz oh, nativecall?
09:11 moritz well, C libraries don't share version objects with Perl 6 :/
09:11 * DrForr points at abraxxa's failure report.
09:12 DrForr I'm running test suits now, no worries.
09:13 abraxxa p6doc installed successfully but the command p6doc can't be found in the path
09:14 DrForr abraxxa: Fixed and pushed, give it a try.
09:14 abraxxa DrForr: ok
09:15 abraxxa DrForr++ # ==> Successfully installed Readline
09:17 DrForr Yay.
09:18 abraxxa it seems p6doc wasn't installed by panda...
09:19 abraxxa panda list --installed doesn't work although documented
09:19 wamba joined #perl6
09:19 fireartist it needs to be `panda --installed list` :-(
09:19 fireartist that had me stumped yesterday for a minute
09:19 abraxxa oh, the example is even shows
09:20 abraxxa quite non-standard
09:21 abraxxa have I done something wrong? panda install p6doc
09:21 kurahaupo joined #perl6
09:21 abraxxa but there is no p6doc in the perl6 bin directory
09:22 moritz abraxxa: do other programs show up in your $PATH when you install them via panda?
09:23 abraxxa moritz: i can't find the p6doc file at all
09:23 fireartist I used panda to install Task::Star, and it put p6doc in ~/.rakudobrew/bin/
09:23 abraxxa panda --installed list already takes minutes but doesn't display anything ;(
09:23 vendethiel joined #perl6
09:23 abraxxa there is a p6doc in ~/.rakudobrew/moar-2016.02/install/share/perl6/site/bin/p6doc
09:24 abraxxa but none in ~/.rakudobrew/bin/ where the perl6 executable is and which is in my PATH
09:25 sjoshi joined #perl6
09:25 abraxxa https://github.com/tadzik/Task-Star/blob/master/META.info doesn't show something obvious
09:27 abraxxa strace shows that panda --installed list hangs at epoll_wait(5,
09:28 abraxxa open("/home/ahartmai/perl5/perlbrew/perls/22.1/lib/5.22.1/vars.pm", O_RDONLY) = 5
09:28 brrt suggestion. i get a complaint about p6doc-index build when using it for a single file
09:29 brrt eh, single function
09:29 brrt p6doc -f foobar
09:29 brrt however, p6doc-index build takes a neglible time here
09:29 brrt why not just run it on the first time?
09:31 FROGGS joined #perl6
09:31 fireartist abraxxa: in case it helps, this is what I did yesterday, and got a p6doc in my PATH
09:31 fireartist abraxxa: rakudobrew build moar 2016.02 && rakudobrew switch moar-2016.02 && rakudobrew build panda && panda install Task::Star
09:32 abraxxa fireartist: same there but panda install p6doc instead of Task::Star
09:41 labster joined #perl6
09:44 domm_ joined #perl6
09:47 stmuk_ brrt: PR welcome for p6doc Build.pm :)
09:47 stmuk_ abraxxa: you may have to rakudobrew rehash
09:48 abraxxa stmuk++ # that was it!
09:48 brrt stmuk_: where be the repo
09:48 stmuk_ brrt: panda info p6doc
09:48 brrt aha
09:48 moritz now if panda had a post-install hook which rakudobrew could use...
09:52 tadzik or it can just rehash after each 'panda' run, just in case :)
09:52 abraxxa p6doc does nothing when executed without params
09:52 moritz tadzik: but how does rakudobrew even know that panda ran?
09:52 abraxxa what does rehash do?
09:53 tadzik moritz: rakudobrew generates the 'panda' script that runs the actual panda, so yes
09:53 moritz tadzik: ah right
09:53 stmuk_ its shims all the way down!
09:54 atta joined #perl6
09:54 abraxxa p6doc Net::AMQP hangs too
09:55 stmuk_ abraxxa: its a bug in perl6 -doc
10:07 vendethiel joined #perl6
10:18 abraxxa stmuk_: ok, thanks
10:19 espadrine joined #perl6
10:33 zakharyas joined #perl6
10:37 rindolf joined #perl6
10:41 vendethiel joined #perl6
10:58 CIAvash joined #perl6
11:05 vendethiel joined #perl6
11:07 * stmuk_ receives 40 bottles of Club Mate
11:07 ka joined #perl6
11:10 telex joined #perl6
11:10 dvinciguerra joined #perl6
11:14 Beelu joined #perl6
11:17 Skarsnik joined #perl6
11:18 Skarsnik Hello
11:19 Ven joined #perl6
11:22 DrForr o/
11:23 jnthn o/
11:23 psch o/
11:25 psch 8/25 passes in 03-jvm/interop.t \o/
11:30 psch and the broken bits should be expected, fwiw.  the dying test is the one for CRC32/update([B)V, but list-y marshalling is NYI
11:31 psch curious that it doesn't die with that message though, but with an NPE...
11:34 dalek rakudo/jvminterop: abe034b | peschwa++ | src/vm/jvm/ (2 files):
11:34 dalek rakudo/jvminterop: Get basic JVM Interop working again.
11:34 dalek rakudo/jvminterop:
11:34 dalek rakudo/jvminterop: As in, basic (i.e. natives and their box types) work again, as do simple
11:34 dalek rakudo/jvminterop: callouts, e.g. System.out.println.
11:34 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/abe034b070
11:35 psch s/ types\)/) types/
11:35 FROGGS psch++ # \o/
11:35 tadzik nice!
11:40 rurban joined #perl6
11:42 sjoshi joined #perl6
11:42 psch now to get back into thinking in this somewhat annoying indy abstraction level... :S
11:45 ilmari psch's github username makes me think of peshwari naan
11:45 * ilmari wants curry now
11:45 jnthn Damn...me too :P
11:45 jnthn psch++
11:48 molaf joined #perl6
12:07 brrt joined #perl6
12:17 * FROGGS shakes his fist at the function scoping of variables in javascript
12:18 xinming joined #perl6
12:22 vendethiel joined #perl6
12:25 dvinciguerra joined #perl6
12:25 lizmat good *, #perl6!
12:25 * lizmat wonders whether she should announce the P6W herself on reddit/r/perl6 in the future
12:26 moritz lizmat: or just reddit/r/perl
12:28 * lizmat wishes she should not need to get a reddit login
12:29 sufrostico joined #perl6
12:31 jnthn FROGGS: Use `let` and `const` ;)
12:31 jnthn (And an ES6 => ES-whatever-crap-browsers-run compiler :))
12:32 jnthn Or "transpiler", as the "we don't know what we're building is called a compiler" kids say :P
12:33 moritz lizmat: I can submit the stuff for you if you just /msg me the URL
12:34 lizmat https://p6weekly.wordpress.com/2016/02/22/2016-8-yacr/
12:34 lizmat moritz++
12:35 moritz https://www.reddit.com/r/perl/comments/47cdcw/20168_yacr_weekly_changes_in_and_around_perl_6/
12:36 moritz https://www.reddit.com/r/perl6/comments/47cdfa/20168_yacr_weekly_changes_in_and_around_perl_6/
12:36 moritz lizmat++ # weekly
12:37 timotimo lizmat++ # weekly
12:37 FROGGS jnthn: nah, I jst try to remember the scoping rule... my functions arnt that big so there is hardly a problem
12:37 brrt ohai lizmat
12:37 brrt i would not get a reddit login if i could avoid it
12:38 pierrot joined #perl6
12:38 DrForr moritz: Heh, next week is the last part of my series on regex and grammars, and I'm trying to stay away from the term 'transpiler'. Sounds too much like something from the Hunger Games.
12:38 moritz DrForr: :-)
12:38 moritz DrForr: just call it a compiler, which is what it is :-)
12:38 jnthn FROGGS: tbh, I still use var a load anyway...the main thing that makes it worth it for me is the short syntax for lambdas :)
12:39 jnthn .oO( So much for let over lambda :P )
12:40 lizmat jnthn: I was thinking about augment in precompiled modules
12:40 lizmat I was thinking, maybe that should become a role in precomp, to be mixed in at runtime ?
12:41 jnthn Mixed in to what, exactly?
12:42 jnthn You mix in to objects, which changes the type of an object. Whereas an augment is a mutation on a type.
12:42 lizmat yes, in the scope of the import, the class would get transmogrofied with the role mixed in
12:42 lizmat only for accesses in that scope
12:43 jnthn That isn't the semantics of augment.
12:43 kent\n Archeology q: iirc, Perl5 Moose + Type Constraints stole the idea from Perl6.   Are there other languages which have this concept? Did P6 steal it from one?
12:43 lizmat jnthn: well, maybe we shouldn't call it augment then
12:44 lizmat maybe we should call it an export role to be applied to any creation of objects with the given class
12:44 jnthn That already exists today: constant foo is export = TheType but MyRole
12:45 jnthn And is pre-comp safe
12:45 lizmat yeah, but then people all of a sudden need to say foo.new instead of Bar.new
12:46 jnthn Fine
12:46 jnthn constant TheType is export = SETTING::TheType but MyRole; :)
12:47 Guest84889 joined #perl6
12:47 lizmat would that allow me to export a method "unpack" to Blob ?
12:47 Guest84889 joined #perl6
12:47 lizmat Ah, I guess it would
12:47 jnthn lizmat: Well, with the caveat it only helps Blobs that are created in the scope in question
12:48 jnthn lizmat: And doesn't help, say, Buf which does Blob
12:48 lizmat well, that would work for me  :)
12:48 jnthn So you'd need similar on those too
12:48 lizmat well, rins and repeat yes
12:48 jnthn But you can do a little loop in a BEGIN block and shove things in EXPORT::DEFAULT :)
12:48 kent\n joined #perl6
12:48 kent\n joined #perl6
12:48 lizmat well, I guess that means the death of augment then...
12:49 RabidGravy nah
12:49 psch "Wrong number of arguments passed; expected 2..2, but got 2" # /o\
12:49 jnthn Well, augment is different. :)
12:49 RabidGravy m: role Foo {};  constant Blob = Blob but Foo
12:49 camelia rakudo-moar 64e1c7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wR6K1Aj7_W␤An exception occurred while evaluating a constant␤at /tmp/wR6K1Aj7_W:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Method 'mixin' not found for invocant of class 'Perl6…»
12:49 pmurias joined #perl6
12:49 lizmat yeah, but if we use that for e.g. Str in 6.d, nobody can augment Str down the line, no?
12:50 kent\n wow, I chose a suck time to ask a question, my network flaked out right afterwards :/
12:50 jnthn lizmat: Right, which is why we don't try to solve the "can't see methods from future Perl 6 versions" thing :)
12:50 jnthn So we don't have to augment :)
12:50 lizmat ok
12:52 jnthn kent\n: What are you referring to in partiuclar by type constraints? Lots of languages have type annotations...the incorporation of them into Perl 6 was somewhat guided by work on gradual typing. And the `where` stuff was from work on refinement types, if you mean those bits.
12:53 skids joined #perl6
12:54 jnthn kent\n: Both I became aware of from academic papers, which were shared among various Perl 6 folks back in the Pugs days, iirc.
12:54 jnthn But it was before I was really involved with things :)
12:56 kent\n jnthn: with regards to being able to subclass things like "String" and add additional constraints to things that are "also strings", where in the constraint doesn't actually change the type, just serves as a convenience factor for reliable/reusable validation
12:58 kent\n I was asked if they bore any resemblance to "constraints for haskell type classes" . I don't think they do, but I've had a hard time working out what that is exactly ;)
12:59 jnthn m: subset Id of Str where /^ \w ** 5..10 $/; # You mean things like this?
12:59 camelia rakudo-moar 64e1c7: ( no output )
12:59 tmch joined #perl6
12:59 stmuk_ how are the docs to handled with 6.c and 6.d? I assume the new sections are tagged as version specific somehow?
13:00 * RabidGravy tries to remember why he called his wife's laptop "ozymandius"
13:00 psch m: subset ShortStr of Str where .chars < 5; class DiffStr is Str { }; my ShortStr $shstr = DiffStr.new(:value("foo"))
13:00 camelia rakudo-moar 64e1c7: ( no output )
13:00 psch m: subset ShortStr of Str where .chars < 5; class DiffStr is Str { }; my ShortStr $shstr = DiffStr.new(:value("foobar"))
13:00 camelia rakudo-moar 64e1c7: OUTPUT«Type check failed in assignment to $shstr; expected ShortStr but got DiffStr ("foobar")␤  in block <unit> at /tmp/noz8vSd8Wg line 1␤␤»
13:01 psch hm, can we get the constraint for the subset in that error msg?
13:01 kent\n I think so. I'm just not too familiar with the P6 syntax, and I'm mostly using my knowledge of Moose type-constraints.
13:01 psch feels like that would make it a bit more awesome
13:02 psch it'd probably also have to throw something somewhat different for subsets, similarly to how we already do for constraints in Signatures iirc
13:02 jnthn kent\n: Yeah, the refinement types...some references at https://en.wikipedia.org/wiki/Refinement_(computing)#Refinement_types
13:03 lizmat psch: you of course realize that could be quite a lot of code in the refinement.. ?
13:04 kent\n jnthn++ # that term gives much more useful results when I throw "haskell" at it + google =)
13:04 psch lizmat: "refinement" means the subset constraint?  no, i hadn't though about that, but it seems a good point against getting it there
13:09 Skarsnik what is the tag to make Test stop at the first faillyre?
13:12 arnsholt RabidGravy: Recently re-read Watchmen when you set it up? =)
13:15 RabidGravy unlikely, it's almost certain from the Shelley sonnet
13:15 guru__ joined #perl6
13:17 dalek rakudo-star-daily: a5f00b4 | coke++ | log/ (9 files):
13:17 dalek rakudo-star-daily: today (automated commit)
13:17 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a5f00b4a0b
13:18 arnsholt Yeah, that was my other option. But new computer named after a poem on the inevitability of death was a bit weird, yeah =)
13:20 RabidGravy it's an HP Mini so probably appropriate
13:25 autarch joined #perl6
13:27 dalek DBIish/oracle: b4b0bad | (Sylvain Colinet)++ | / (6 files):
13:27 dalek DBIish/oracle: Remove all the Num stuff in Pg/sqlite/mysql, everything is Rat. Fix the tests
13:27 dalek DBIish/oracle: review: https://github.com/perl6/DBIish/commit/b4b0bad474
13:27 Skarsnik Was a bit 'tricky' to 'fix'
13:27 Skarsnik some drivers does not type Null result
13:28 Skarsnik We will need to add capabilities to the drivers to have proper tests
13:31 sufrostico Hi!
13:31 moritz hello sufrostico
13:31 sufrostico Is there a way to represent the C function pointers (within an struct) by using the native call library ?
13:32 timotimo not yet, sorry!
13:32 timotimo only as an opaque pointer that you cannot invoke
13:32 Skarsnik Well you can as Pointer
13:32 Skarsnik but you will not be able to call it
13:32 timotimo and you cannot yet put a perl6 function into a struct as a function pointer
13:32 Skarsnik but you can still pass it to C
13:33 stmuk_ hmm I can kernel panic OS X by using rakudo to access a non-thread safe library (SDL) with threads
13:33 Skarsnik Oo
13:33 stmuk_ I suspect this is Apple's problem
13:34 jnthn Yup. Wow.
13:35 jnthn A kernel should never let userspace panic it
13:35 kaare_ joined #perl6
13:36 moritz submit an applebug :-)
13:36 moritz presumably a security one
13:36 dakkar joined #perl6
13:36 timotimo well, SDL does opengl stuff, or perhaps the apple-proprietary metal thing
13:36 moritz (hey, you could even get money for that; dunno if apple does that)
13:37 jnthn Was gonna say, if you found one of those on something actually used for servers it'd be a decided DoS vector...
13:37 stmuk_ yeah maybe the apple graphics level is privileged for performance somehow
13:38 DrForr Quartz, no?
13:38 timotimo i think graphics APIs are in general a very good target for crashing systems, which is why some security engineers were very much looking forward to WebGL and friends
13:38 jnthn Windows used to do that :P
13:38 moritz which might lead to interesting privilege escalation
13:38 stmuk_ I may try and golf it if I can get OS X virtualized
13:39 timotimo in general, apple's OpenGL drivers are absolute and utter crap.
13:39 timotimo they don't update them, or something like that
13:39 timotimo well, what do i know :)
13:39 timotimo i know the krita devs (a painting program) are super annoyed by OSX and their stance towards OpenGL on their system
13:40 timotimo BBL
13:40 sufrostico Skarsnik: so... something like this should work  https://gist.github.com/Sufrostico/49a8bb3a92ca62624a8c ?
13:40 RabidGravy Skarsnik, I think there's still a problem with the mysql tests
13:40 timotimo yes, that should work
13:40 sufrostico as long as I don't try to call the functions from perl6 ?
13:41 moritz sufrostico: you should get a redeclaration error
13:41 timotimo well, you want to call those things different names
13:41 moritz also notice that "has" already implies on level of pointer
13:41 ocbtec joined #perl6
13:42 Ven joined #perl6
13:43 sufrostico moritz: why redeclaration error ?
13:43 moritz sufrostico: because you're declaring the attribute 'create' three times
13:44 ocbtec joined #perl6
13:44 Skarsnik sufrostico, yes
13:45 guru__ joined #perl6
13:46 sufrostico moritz: damn copy/paste.
13:46 Skarsnik RabidGravy, damn and I don't have a mysqlservre working to test on this vm
13:46 sufrostico ok, thanks to everyone... going to work on that now
13:46 Skarsnik try GPTrixie if you are binding something x)
13:48 brrt joined #perl6
13:48 rurban joined #perl6
13:51 RabidGravy Skarsnik, I'll take a look later, I installed a mysql on the little computer
13:51 Psyche^_ joined #perl6
13:51 dalek DBIish/oracle: 90e295a | (Sylvain Colinet)++ | t/lib/Test/DBDish.pm6:
13:51 dalek DBIish/oracle: Put the numeric untyped ref data as the right Str
13:51 dalek DBIish/oracle: review: https://github.com/perl6/DBIish/commit/90e295a43d
13:51 Skarsnik I have no idea what is the crash on the Int thingy
13:54 avenj joined #perl6
13:55 avenj joined #perl6
14:03 lizmat jnthn: thinking about the constant Blob is export = SETTING::Blob but Extra
14:03 cdg_ joined #perl6
14:03 lizmat that would not really work if we have two exports to Blob in the same scope  :-(
14:03 lizmat so maybe we need something smarter than SETTING:: ?
14:04 lizmat that would take the one from the scope to be imported into and if it's not there, use the SETTING:: one ?
14:05 sno joined #perl6
14:06 rindolf joined #perl6
14:08 pmurias joined #perl6
14:09 jnthn lizmat: I think it'd give an error rather than silently fail, at least...
14:09 jnthn lizmat: Not sure how we can do soemthing smarter...there's no way at present to reach the scope to import into...
14:10 lizmat :(
14:11 kid51 joined #perl6
14:13 zpmorgan joined #perl6
14:20 skids joined #perl6
14:21 psch aha!
14:21 psch the failing test for CRC32."method/update/([B)V" fails correctly, if LTA
14:22 psch as in, the test is iterating over 'Hello, Java'.encode('utf-8') and passes $_ into that method
14:22 psch m: 'Hello, Java'.encode('utf-8')[0].WHAT.say
14:22 camelia rakudo-moar 64e1c7: OUTPUT«(Int)␤»
14:22 psch ^^^ that's clearly not a byte array though
14:23 psch m: sub f(@a) { say @a.perl }; f 5 # not sure i can get it this pretty though...
14:23 camelia rakudo-moar 64e1c7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h8poR39gEY␤Calling f(Int) will never work with declared signature (@a)␤at /tmp/h8poR39gEY:1␤------> 3sub f(@a) { say @a.perl }; 7⏏5f 5 # not sure i can get it this pretty ␤»
14:23 rurban joined #perl6
14:24 psch m: for 'abc'.encode('utf-8') { $_.say }
14:24 camelia rakudo-moar 64e1c7: OUTPUT«97␤98␤99␤»
14:24 psch that used to give only one iteration when i wrote the tests iirc
14:24 zakharyas joined #perl6
14:25 gorgor joined #perl6
14:27 rurban1 joined #perl6
14:29 jnthn psch: Perhaps changed with GLR single arg rule
14:31 psch m: say utf8 ~~ List
14:31 camelia rakudo-moar 64e1c7: OUTPUT«False␤»
14:31 rurban joined #perl6
14:31 psch m: say utf8 ~~ Iterable
14:31 camelia rakudo-moar 64e1c7: OUTPUT«False␤»
14:31 psch m: say utf8 ~~ Positional
14:31 camelia rakudo-moar 64e1c7: OUTPUT«True␤»
14:32 psch well, it does get me up to 23/25 vOv
14:32 psch i'll have to add tests for wrong argument types though...
14:36 rurban1 joined #perl6
14:41 rurban joined #perl6
14:43 raiph joined #perl6
14:45 _mg_ joined #perl6
14:57 zakharyas joined #perl6
14:58 Actualeyes joined #perl6
15:04 CIAvash joined #perl6
15:09 dalek roast/6.c-errata: 0f3e1f4 | lizmat++ | / (1223 files):
15:09 dalek roast/6.c-errata: Change v6 to v6.c / add v6.c where appropriate
15:09 dalek roast/6.c-errata:
15:09 dalek roast/6.c-errata: All your files are belong to us
15:09 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/0f3e1f4e8b
15:10 hoelzro o/ #perl6
15:12 dalek roast: 85bbd8d | lizmat++ | / (179 files):
15:12 dalek roast: Add use v6 where appropriate
15:12 dalek roast: review: https://github.com/perl6/roast/commit/85bbd8dfd9
15:13 lizmat afk for a few hours&
15:26 Skarsnik this NC-explicit-managed role leakage in dbiish ref data is becoming annoying
15:27 rindolf joined #perl6
15:28 RabidGravy Str,new
15:28 Skarsnik ?
15:29 RabidGravy I found another way of removing roles but creating a new object from the one with the role works
15:30 RabidGravy m: role Foo { };  my $a = "hdhd"; $a does Foo; say $a.WHAT; say Str.new(value => $a).WHAT
15:30 camelia rakudo-moar 64e1c7: OUTPUT«(Str+{Foo})␤(Str)␤»
15:33 Skarsnik Well it's not really a fix in this case
15:33 Skarsnik the ref data have nothing to do with NC, they should not get the role at the first place xD
15:39 xinming joined #perl6
15:45 mkz joined #perl6
15:50 Perleone joined #perl6
15:50 ely-se joined #perl6
15:53 sufrosti1o joined #perl6
15:54 Perleone Something for the PR department: Perl 6 has made it onto the cover of German IT pro magazine "iX": http://www.heise.de/ix/inhalt/thumbnails/2016/03/1.jpg
15:54 Ven_ joined #perl6
15:55 tadzik nice, that's the second IT magazine where Perl 6 makes the cover :)
15:55 Perleone Larger: http://www.heise.de/ix/inhalt/2016/3/titelseite.pdf
15:57 psch tadzik: which was the first one, ooc?
15:57 tadzik psch: Polish "Programista"
15:57 tadzik let me take a pic
15:57 * psch ponders getting the iX tomorrow
15:57 perlpilot What does "endlich verfugbar" mean?
15:58 kent\n joined #perl6
15:58 kent\n joined #perl6
15:58 psch perlpilot: "finally available"
15:58 perlpilot danke
15:58 Perleone "finally available"
15:58 Perleone too slow :>
15:59 tadzik http://i.imgur.com/Cs9VvFQ.jpg
15:59 tadzik it even has half-camelia :P
15:59 psch hah yeah
15:59 psch that's a bit more focused on Perl 6 than the other cover :)
15:59 Perleone The iX article is written by ... (drum roll) ... moritz!
15:59 perlpilot and apparently they are very excited about perl 6
15:59 Perleone moritz++
16:00 psch moritz++
16:00 tadzik moritz++ indeed :)
16:00 timotimo moritz++ # iX article
16:01 xinming joined #perl6
16:03 moritz wow, I didn't know I'd get front-page'd
16:04 perlpilot now all someone needs to do is get a regular Perl 6 column in a reasonably well-circulated magazine or two
16:04 Perleone moritz: And it's a nice contrast to C++, also on the front page
16:06 moritz perlpilot: I do plan to ask them if they want follow-up articles (though I probably won't be able to deliver a regular column)
16:07 perlpilot moritz: #perl6 could tag-team for a regular column
16:07 timotimo all the german #perl6ers?
16:07 moritz perlpilot: my experience with such things has been mixed
16:08 moritz the last advent went surprisingly well
16:08 zakharyas joined #perl6
16:08 moritz but you can see the trouble that timotimo and lizmat are having with p6w (like, not always actually managing to publish it weekly)
16:09 perlpilot aye, it would require some more advanced coordination to do a regular column
16:09 moritz and then a magazine will want a single point of contact, most likely
16:15 kurahaupo joined #perl6
16:19 nemo wow. zoffix must be really sick
16:20 nemo it's been like a week and a half?
16:21 timotimo i think we should really do something about rakudo.org's outdated wordpress installation
16:22 timotimo like, i'm surprised it hasn't gotten pwned already
16:22 skids What, someone has to provide a "back door to the Internet"
16:24 timotimo nemo: i'm a little worried, too :S
16:25 perlpilot timotimo: re rakudo.org ... Ping pmichaud@pobox.com about it.  See what happens.
16:25 timotimo pm is super busy, i'm not sure if i should bother him about stuff like that. especially since i'm probably not the right person to do a migration to the p6c servers for example ...
16:28 nemo timotimo: hedgewars drupal instance is like a decade old :/
16:28 nemo timotimo: no one around willing to go through a painful migration
16:31 * hoelzro parsed initially parsed that "painful migraine"
16:32 geekosaur no. that comes later
16:32 hoelzro hehe
16:32 perlpilot timotimo: if you send him an email, he can ignore it, update WP himself, give you the ability to do it, etc.  If you don't send an email ... we'll still be talking about upgrading WP on rakudo.org next year  :)
16:34 nemo timotimo: I'd just wanted to mention to Zoffix http://manpages.ubuntu.com/manpages/gutsy/man8/im-switch.8.html
16:34 nemo timotimo: since I'd managed to screw up my XCompose on a machine, and this nice lil' utility fixed it
16:34 cdg joined #perl6
16:34 nemo timotimo: (related to perl6 unicode input)
16:34 nemo timotimo: I figured zoffix might be interested since he'd had similar issues
16:38 vendethiel joined #perl6
16:38 zakharyas joined #perl6
16:44 ka joined #perl6
16:45 dfcarpenterak joined #perl6
16:46 [Coke] Anyone pondering a perl 6 talk for yapc::na ?
16:46 lichtkind joined #perl6
16:48 DrForr Several, I just need time to write up talks.
16:50 khw joined #perl6
16:53 zakharyas joined #perl6
16:57 stmuk joined #perl6
17:00 lostinfog joined #perl6
17:02 CIAvash joined #perl6
17:04 yqt joined #perl6
17:12 dalek DBIish: 037c377 | (Salvador Ortiz)++ | lib/DB (9 files):
17:12 dalek DBIish: Rationalize 'use' and 'need' in modules
17:12 dalek DBIish:
17:12 dalek DBIish: With module 'require' fixed, now DBDish.pm loads roles and
17:12 dalek DBIish: other modules only needs DBDish.
17:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/037c377999
17:12 dalek DBIish: 5250f2a | (Salvador Ortiz)++ | lib/DBDish/ (6 files):
17:12 dalek DBIish: Use exported typed Pointers for type safety
17:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/5250f2af03
17:15 sortiz joined #perl6
17:16 tmch joined #perl6
17:16 kurahaupo left #perl6
17:16 [Coke] anyone pondering a response to RT #127601 ?
17:16 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127601
17:17 [Coke] DrForr: I was also fishing for "about what?" :)
17:17 [Coke] (RT) I am working on one now
17:17 timotimo we've been meaning to get loop ( ... ) that return values; do we have that?
17:18 jnthn m: my @list = lazy loop (my $i = 0; $i < 10; $i++) { $i }; say @list
17:18 camelia rakudo-moar 64e1c7: OUTPUT«[...]␤»
17:18 psch ...the example for the lazy list seems awefully contrived
17:18 jnthn m: my @list = lazy loop (my $i = 0; $i < 10; $i++) { $i }; say @list[^10]
17:18 camelia rakudo-moar 64e1c7: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
17:18 jnthn We already have that feature. :)
17:18 timotimo good
17:18 jnthn But the ticket reads like "omfg more than a couple of non-alaphenumeric chars in a row!!!" :P
17:19 timotimo perl6 may not be the right thing for them. though of course a slang can be proposed
17:19 jnthn None of the tickets by that submitter were well researched.
17:19 ugexe m: my @x = 1,2,3,4; my $lazylist = lazy @x; say $lazylist
17:19 camelia rakudo-moar 64e1c7: OUTPUT«(...)␤»
17:19 psch m: my $llist = (0, { $_ + 3 } ...^ * > 10; say $llist.is-lazy
17:19 camelia rakudo-moar 64e1c7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EwnTQlKFnF␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/EwnTQlKFnF:1␤------> 3$_ + 3 } ...^ * > 10; say $llist.is-lazy7⏏5<EOL>␤    expecting any of:␤ …»
17:19 psch m: my $llist = (0, { $_ + 3 } ...^ * > 10); say $llist.is-lazy
17:19 camelia rakudo-moar 64e1c7: OUTPUT«False␤»
17:19 psch hue hue
17:19 psch vOv
17:21 jnthn m: my $llist = lazy (0, { $_ + 3 } ...^ * > 10); say $llist.is-lazy
17:21 camelia rakudo-moar 64e1c7: OUTPUT«True␤»
17:21 jnthn Can mark it easy enough :)
17:21 timotimo well, why isn't it lazy in the first place? :P
17:21 psch yeah, i guess that's just another hint for the "badly researched" comment before
17:22 neilb joined #perl6
17:22 jnthn timotimo: Lazy implementers didn't work hard enough at the halting problem... :P
17:23 * jnthn notes that the loop also introduces state to the program, while the sequence operator is free of it :)
17:23 ugexe a shame he didnt just ask first
17:23 neilb joined #perl6
17:24 jnthn Well, I suspect we'll see an amount of people submitting essentially questions to the bug queue.
17:24 timotimo shouldn't it just set is-lazy by virtue of being a ... operator?
17:24 psch m: my $llist = (0, { $_ + 3 } ... *); say $llist.is-lazy
17:24 camelia rakudo-moar 64e1c7: OUTPUT«True␤»
17:24 jnthn timotimo: I think we've been down the "make more things lazy by default" road and it ended up worse in various cases.
17:25 timotimo hmm. like array access, eh?
17:25 jnthn Well, the big one was trying making gather/take assume lazy.
17:25 timotimo so, um, who will write the reply? :)
17:25 jnthn I thought [Coke]++ said he was working on one? :)
17:25 ugexe m: my @a = 1,2,3,4,5; @a[1]:delete; say @a[0..*]; say @a[lazy 0..*]; # :(
17:25 camelia rakudo-moar 64e1c7: OUTPUT«(1)␤(1)␤»
17:25 timotimo cool
17:27 jnthn ugexe: Marking things lazy is only useful for operations that will do something different.
17:27 jnthn ugexe: And array indexing ain't one of them (yet).
17:27 ugexe its used in method splice
17:27 jnthn Oh?
17:27 ugexe @arr[lazy 0..X]
17:28 ugexe its why .splice and .splice(0) give different results when you @a[1]:delete
17:28 jnthn m: my @a = 1..*; my @b = @a[lazy 3..*]; say @b[^10]
17:29 jnthn Figured that'll hang
17:29 jnthn m: my @a = 1..*; my @b := @a[lazy 3..*]; say @b[^10]
17:29 camelia rakudo-moar 64e1c7: OUTPUT«(timeout)»
17:29 jnthn Figure that one will do
17:29 jnthn *too
17:29 ugexe m: my @a = 1,2,3,4; @a[1]:delete; say @a.splice; my @b = 1,2,3,4; @b[1]:delete; say @b.splice(0)
17:29 camelia rakudo-moar 64e1c7: OUTPUT«(timeout)»
17:29 camelia rakudo-moar 64e1c7: OUTPUT«[1 (Any) 3 4]␤[1]␤»
17:30 jnthn ugexe: But if you remove the lazy does it not behave the same?
17:30 jnthn Oh...or...
17:30 ugexe .splice takes the first method splice candidate, and .splice(0) takes the 2nd or 3rd hitting this: https://github.com/rakudo/rakudo/blob/08710a2bbdaa2060db462c9a84f3df9b0f588ae7/src/core/Array.pm#L688
17:31 ugexe m: my @a = 1,2,3,4,5; @a[1]:delete; say @a[0..4]; say @a[lazy 0..*];
17:31 camelia rakudo-moar 64e1c7: OUTPUT«(1 (Any) 3 4 5)␤(1)␤»
17:31 jnthn Oh, I mis-remembered
17:31 jnthn Something marked lazy will *not* return a lazy list
17:31 jnthn However, it will auto-bound to the elems of the array
17:32 jnthn Or something like that
17:32 * jnthn reads the code more carefully
17:32 zakharyas joined #perl6
17:33 leont joined #perl6
17:33 jnthn Yeah, POSITIONS doesn't do the .eager itself, but rather the things that call it
17:34 jnthn So, I was right in so far as you ain't getting a lazy list back from a lazy slice
17:34 jnthn But wrong in that lazy is useless there
17:34 jnthn And the actual semantics are "keep going until an element doesn't exist"
17:34 ugexe darn, i was just going to ask if the `lazy` could just be removed
17:35 jnthn Or so the comment said
17:35 jnthn Oh no, it's almost right :)
17:35 jnthn See array_slice.pm line 15
17:35 jnthn Anyway, :delete causes EXISTS-POS to return False
17:37 jnthn And so a "lazy" will cause anything beyond a deleted element to be ignored
17:37 jnthn Which I think is what you're seeing
17:37 jnthn So the interesting question is maybe "why is the lazy there" :)
17:37 ugexe yea
17:37 * psch felt @:delete to be somewhat foot-ropey for quite some time
17:38 ugexe heh, jnthn you added the lazy it looks like
17:38 jnthn Very possibly. Doesn't mean I'll remember why. :)
17:38 jnthn Does the commit message say why? :)
17:39 ugexe Make @a[^2] consistent with @a[0,1]
17:39 ugexe That is, it doesn't auto-truncate. Only lazy ranges will now truncate. An infinite range is automatically lazy; the existing behavior is now available as @a[lazy ^2].
17:39 von_cheam joined #perl6
17:39 ugexe there is also a @array[lazy 0..X] in Str.pm (added in same commit)
17:40 jnthn Hmm
17:41 jnthn It may not be needed
17:41 jnthn Since I *think* the code is already bounds-checking $s
17:42 jnthn I guess "remove it and spectest" is one option :)
17:43 jnthn The lazy may have been added conservatively to preserve semantics.
17:44 * jnthn is running a spectest without the lazy ATM
17:44 dalek ecosystem: 15a121e | leont++ | META.list:
17:44 dalek ecosystem: Add Getopt::Long to ecosystem
17:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/15a121e018
17:44 dalek ecosystem: 598a95f | jnthn++ | META.list:
17:44 dalek ecosystem: Merge pull request #160 from Leont/master
17:44 dalek ecosystem:
17:44 dalek ecosystem: Add Getopt::Long to ecosystem
17:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/598a95f3cf
17:45 von_cheam Hello. Total newcomer to Perl6 here! I have a question - is there a way I can convert an array of strings to a single string, delimited by newline characters? I've tried:
17:45 von_cheam for @strings -> $string { $big_string ~= $string ~ '\n'; }
17:45 von_cheam But it doesn't work. (Ultimately what I want to do is write my array of strings to an empty file, but ideally in one go, avoiding multiple reads and writes; if there's a better way of doing this than creating one big newline-delimited string, that's cool too!)
17:46 ugexe @strings.join("\n")
17:46 timotimo the fastest way to create that large string would be @strings.join("\n") in any case
17:46 psch m: my @a = <abc def ghi>; my $str = @a.join("\n"); say $str
17:46 camelia rakudo-moar 64e1c7: OUTPUT«abc␤def␤ghi␤»
17:46 von_cheam Okay, awesome, thanks!
17:46 alpha123 von_cheam: the OS probably buffers multiple reads/writes anyway
17:48 psch von_cheam: note that .join doesn't give you a trailing newline (or whatever else you'd join with)
17:48 timotimo right. if you want a newline at the end, you can .say it into a file handle and get one appended for free
17:48 von_cheam By the by, is this the right place for newbie Perl6 questions, in general, or are you folks mostly here for maintenance, ongoing devolpment of the language, etc.?
17:49 alpha123 if it's related to perl6, you're fine here ^_^
17:49 jnthn dinner &
17:49 von_cheam Magic. Thanks, all!
17:51 virtualsue joined #perl6
17:52 von_cheam left #perl6
17:54 bioexpress joined #perl6
17:56 Actualeyes joined #perl6
17:58 vendethiel joined #perl6
17:59 bioexpress joined #perl6
18:02 bioexpress_ joined #perl6
18:03 bioexpress joined #perl6
18:07 * perlpilot wonders how long before "put" becomes as common as "say"
18:12 [Coke] jnthn: rejected that ticket with something like your code snippet.
18:12 [Coke] I definitely took a deep breath before responding.
18:13 psch [Coke]++
18:13 psch very reasonable reply
18:15 musiKk joined #perl6
18:19 andrewalker joined #perl6
18:20 cognominal joined #perl6
18:21 bioexpress joined #perl6
18:23 cognominal hi, is there a parser of Perl 5 in Perl 6 ?
18:24 perlpilot cognominal: not that I know of
18:26 DrForr [Coke]: Probably Prancer, assuming I can get it into decent shape by then.
18:27 prammer joined #perl6
18:27 jnthn ugexe: Removing the lazy causes a regression
18:27 jnthn ugexe: So, not quite so simple.
18:28 yqt joined #perl6
18:29 bioexpress_ joined #perl6
18:31 guru_ joined #perl6
18:32 ka joined #perl6
18:34 xinming joined #perl6
18:38 addison_ joined #perl6
18:39 vendethiel joined #perl6
18:41 timotimo it could very well be we don't have anything in the docs yet for the combination of lazy and loop
18:42 virtualsue joined #perl6
18:45 leont joined #perl6
18:46 domidumont joined #perl6
18:52 bioexpress joined #perl6
18:56 firstdayonthejob joined #perl6
18:57 [Coke] DrForr: is prancer like dancer but not?
18:57 [Coke] If so, I need some kind of webapp handling I can run in p6, so let me know if I can help.
19:00 DrForr github.com/drforr/perl6-App-prancer
19:01 perlpilot It would be perfect if someone did a talk on Crust too
19:01 RabidGravy I'll really give it a good kicking when I'm done with this stupid XML thing
19:03 timotimo didn't the author of crust actually give a talk? at fosdem maybe?
19:03 RabidGravy I think so
19:03 perlpilot I dunno, but I haven't seen one.
19:03 DrForr One of the authors, yes.
19:03 Hotkeys Hey all
19:04 Hotkeys I've been using panda since I started perl6ing but I was wondering if there's any reason I should switch to zef?
19:04 Hotkeys or should I just stick with panda
19:04 RabidGravy it's whatever works for you really
19:04 Hotkeys are there any major differences?
19:05 Hotkeys or is the functionality more or less the same
19:05 [Coke] right now it's survival of the fittest, I think (panda v. zef)
19:06 [Coke] I wish cpanm would ask me if I meant Vroom when I said vroom
19:06 TimToady .oO(maybe someone should write zenda...)
19:07 Hotkeys just to be clear that's zef x panda?
19:08 TimToady well, zenda sounds cooler than paf
19:08 Hotkeys true
19:09 RabidGravy :)
19:10 Hotkeys oh nice, "Str.trans can now be up to 160x faster"
19:10 Hotkeys that's quite an optimization
19:14 Hotkeys was .trans just really slow before
19:14 Hotkeys or is it now lightning speed
19:14 psch m: for ^500 { "foo".subst(/o/, 'u', :g) }; say now - BEGIN now
19:14 camelia rakudo-moar 64e1c7: OUTPUT«0.2355113␤»
19:15 psch m: for ^500 { "foo".trans("o" => "u") }; say now - BEGIN now
19:15 camelia rakudo-moar 64e1c7: OUTPUT«0.02786291␤»
19:16 psch Hotkeys: i don't think that's lightning speed yet, but i'd guess further optimizations will come from general optimization
19:16 psch i.e. lower method call overhead or things like that vOv
19:16 timotimo oh it's the toady :)
19:17 prammer joined #perl6
19:17 skids .oO("general optimization" verges on an oxymoron :-)
19:17 psch *more* general optimization then :)
19:19 [Coke] .seen ingy
19:19 yoleaux I saw ingy 30 Jan 2016 23:04Z in #perl6: <ingy> {} are special in ""?
19:22 virtualsue joined #perl6
19:23 prammer joined #perl6
19:27 Actualeyes left #perl6
19:27 _mg_ joined #perl6
19:28 leont A while ago someone posted an example of how to make MAIN-HELPER(?) work, anyone still got a pointer?
19:30 prammer joined #perl6
19:30 labster joined #perl6
19:30 leont Ah, google tells me it's MAIN_HELPER, but that doesn't get me far either
19:31 MadcapJake leont, this? https://gist.github.com/hoelzro/7fd925b4f4617a5c46b5
19:31 leont Yes that
19:32 fireartist joined #perl6
19:32 perlpilot but, it should be called MAIN-HELPER to jibe with the other kebab things
19:32 timotimo we have a rule for when things are UNDER_UPPER'd, though
19:32 timotimo like the mop is UNDER_UPPER'd perhaps?
19:32 MadcapJake perlpilot, I think it has to be MAIN_HELPER to work
19:33 lizmat cognominal: you mean something like "v5" ?
19:34 perlpilot timotimo: Well ... where is that rule written?  :)
19:35 leont Now I'm wondering how MAIN_HELPER works with arguments…
19:36 timotimo *shrug*
19:37 perlpilot leont: maybe read src/core/Main.pm to see how the original MAIN_HELPER works?
19:37 perlpilot s/original/default/
19:38 leont Ah, yeah that'd help
19:42 leont It works \o/
19:42 dalek rakudo/nom: 6952bec | lizmat++ | src/core/Buf.pm:
19:42 dalek rakudo/nom: Get rid of unnecessary private methods
19:42 dalek rakudo/nom:
19:42 dalek rakudo/nom: nqp::splice already returns the first argument, so no need for methods
19:42 dalek rakudo/nom: to make it return self
19:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6952bec37d
19:46 Skarsnik is p6-valgrind-m usable?
19:47 timotimo should be, yeah
19:47 timotimo it doesn't really have a way to specify what valgrind tool you want to use
19:48 RabidGravy I've found it quite useful in the past
19:48 timotimo yeah, it's good
19:48 timotimo but it really should also give "--full-cleanup" to moar
19:49 * perlpilot didn't know or had forgotten about perl6-valgrind-m
19:49 timotimo we also have perl6-gdb-m
19:50 perlpilot those would make a good article or two about Perl 6 for some well circulated tech magazine   :)
19:51 perlpilot or maybe a YAPC talk or two
19:57 hoelzro I'm going to try and work on some improvements to the REPL today or tomorrow - I was thinking the next step is to create src/core/REPL.pm and have the higher level functionality live in Perl 6 rather than NQP. Does anyone think this is a *bad* idea?
19:58 wamba joined #perl6
19:59 [Coke] no.
19:59 perlpilot hoelzro: not knowing anything about the implementation, it sounds like an incredibly *good* idea.
19:59 [Coke] nqp doesn't really need an advanced repl.
19:59 hoelzro that's what I'm thinking =)
20:01 perlpilot If someone wanted to switch out the REPL, what would they have to do?  Redefine a sub like we do with MAIN_HELPER?
20:01 SCHAAP137 joined #perl6
20:01 hoelzro hmm...that's an interesting idea.
20:02 hoelzro I had not considered that
20:02 hoelzro I'm thinking that we could have a RAKUDO_REPL env var that specifies the name of a module that extends the existing REPL
20:02 hoelzro if the module is not available, we fall back to the default
20:03 perlpilot If the redefine-a-sub pattern is something we're going to repeat, we may want to namespace such routines.
20:04 hoelzro like CORE::MAIN_HELPER or something?
20:04 cognominal lizmat++ ok, I see indeed that v5 includes a Perl 5 parser in Perl 6  https://github.com/rakudo-p5/v5/blob/master/src/Perl5/Grammar.pm
20:04 hoelzro I don't know if I
20:04 hoelzro ugh
20:05 hoelzro I don't know if I'd call it redefining subs - it's more like shadowing them
20:06 perlpilot yes, something like that.  More like "over shadowing", but you're right :)
20:08 perlpilot hoelzro++ btw
20:09 DrForr cognominal++ lizmat++ # that's what I need for another project...
20:11 * perlpilot must be getting forgetful in his old age ...
20:11 perlpilot I knew about (but had forgotten) v5 as well
20:14 pierrot joined #perl6
20:14 cognominal DrFoor: note that some stuff is pasted from HLL::Grammar, maybe if the grammar were derived from HLL::Parser that would be not ncessary. On the other hand that makes it immune to change in HLL::Parser.
20:14 DrForr Yeah, the methods were familiar.
20:16 musiKk joined #perl6
20:19 yqt joined #perl6
20:26 * DrForr waits to see if Crust::Request doesn't spontaneously die this time 'round. Not sure what was going on, the traceback was useless.
20:40 ely-se joined #perl6
20:50 kjs_ joined #perl6
20:51 kjs_ good evening. quick question if I wanted to generated SQL statements from a JSON file (to store that json file in a database), what would be the best way to go about?
20:51 wamba joined #perl6
20:51 kjs_ s/generated/generate/
20:51 _dolmen_ joined #perl6
20:52 rindolf kjs_: can you use a JSON parser?
20:53 kjs_ rindolf: well that’s what I was thinking - inherit an existing JSON parser and override the methods to Do The Right Thing. But JSON::Fast and JSON::Tiny don’t support inheritance.
20:53 kjs_ but perhaps that’s the wrong way.
20:54 rindolf kjs_: maybe use composition instead of inheritance.
20:54 kjs_ rindolf: mm ok. this isn’t as easy as I thought. Thanks for the hint, I’ll have to read up on that.
20:54 firstdayonthejob joined #perl6
20:55 rindolf kjs_: you're welcome .
20:57 zakharyas joined #perl6
20:58 perlpilot kjs_: look at JSON::Tiny.  You could use its grammar and write your own action class.  other than that, you'd only have to replace from-json which is like 5 lines or something
20:58 kjs_ perlpilot: great, thanks. I’ll look at that.
21:01 leont I think that with a tiny PR to JSON::Tiny, that from-json override isn't necessary either
21:01 leont I would add a :$actions argument to from-json, that defaults to the current value
21:01 moritz kjs_: why not simply use JSON::Tiny, and work no the data structure it returns
21:01 moritz ?
21:02 moritz kjs_: then you'd be totally independent from the JSON implementation, and could easily switch it out later
21:02 leont Probably easier, yes
21:02 leont That's the XY question, really
21:03 kjs_ moritz: yes that’s probably easier. I’m not a perl programmer, but thought about the fact that perl6 has grammars, and I figured that the actions could emit SQl, as if it were the generated code.
21:03 moritz as the maintainer of JSON::Tiny, I strongly discourage subclassing of its action class; it's not part of the documented API
21:03 moritz kjs_: even when you write a compiler, you usually don't emit code from the actions; you first put it into an abstract syntax tree
21:04 kjs_ moritz: yes, right. good point
21:04 moritz and the return value from from-json can act as your abstract syntax tree
21:04 dalek rakudo/nom: 85172b2 | lizmat++ | src/core/Buf.pm:
21:04 dalek rakudo/nom: Eliminate need for extra int unshift/prepend case
21:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85172b2154
21:04 dalek rakudo/nom: fb1be44 | lizmat++ | src/core/Buf.pm:
21:04 dalek rakudo/nom: Don't use CATCH to catch non-int push
21:04 dalek rakudo/nom:
21:04 dalek rakudo/nom: Two reasons:
21:04 dalek rakudo/nom: 1. jnthn++ tells us that blocks with CATCH don't optimize very well.
21:04 dalek rakudo/nom: 2. the resulting private methods can be used in more places
21:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb1be44b97
21:06 moritz kjs_: funny thing is, I recently talked somebody else out of the idea of mucking around with the JSON::Tiny internals :-)
21:08 kjs_ moritz: yes that makes sense now. Don’t know what I was thinking. Is there a function to read JSON from a file?
21:08 perlpilot moritz: clearly someone should make JSON::Huge to go along with JSON::Tiny where JSON::Huge's guts are fully exposed and tweakable.  :)
21:08 kjs_ in J::T
21:08 Skarsnik from-json("myjson.json".IO.slurp)
21:08 Skarsnik something like that
21:08 cdg joined #perl6
21:09 leont I originally based YAMLish's internals on JSON::Tiny's, but it turns out to need way more guts…
21:11 kjs_ Skarsnik: aha that works!
21:12 moritz perlpilot: well, I'm kinda considering that; offer a stream-based API maybe
21:13 perlpilot that would be nice.
21:13 perlpilot Sounds like another potential article for a well-circulated tech mag too  ;)
21:17 sufrostico joined #perl6
21:40 addison_ joined #perl6
21:45 Amnez777 joined #perl6
21:50 timotimo yeah, a stream-based api for json would probably be quite nice
21:50 timotimo i expect JSON::Fast could grow that rather quickly
21:52 timotimo it'd be ... fast ... even :)
21:53 firstdayonthejob joined #perl6
21:54 kid511 joined #perl6
21:57 timotimo hm. will i put that in a sub-namespace?
21:58 timotimo JSON::Fast::Streaming? sounds a bit backwards to have the "authority" in the middle, the functionality at the end and the "group" at the beginning
21:58 sftp joined #perl6
21:59 psch assuming it can be decoupled enough i'd put it as JSON::Streaming and let the user choose the actual 'backend'
22:00 psch no idea if that's actually feasible though
22:00 psch otherwise i'd probably use different EXPORT tags
22:00 psch i.e. < use JSON::Fast :streaming; >, if i don't misremember the syntax
22:01 timotimo so from-json would either be a streaming version or a object-generating version depending on the export tag?
22:02 timotimo i'm not sure i like that
22:02 timotimo well, i could use export tags as well as give the things different names
22:02 timotimo stream-json-from(...) perhaps
22:03 psch hm, yeah, exporting the same symbols with different semantics is a bad idea
22:03 timotimo can you link me to some prior art on streaming json parsers?
22:04 timotimo to see what exact tokens people would expect in the stream?
22:04 timotimo or would they expect to pass an object that has "on-object-enter"-like methods?
22:04 psch *i* personally definitely can't :)
22:04 dalek rakudo/nom: ce32045 | lizmat++ | src/core/Buf.pm:
22:04 dalek rakudo/nom: Make Buf.splice fully functional
22:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ce3204569a
22:05 psch i did find one via google though, in PHP :P
22:05 psch https://github.com/salsify/jsonstreamingparser
22:05 timotimo oke
22:06 psch there's a blog post linked from the github README which is probably better than perusing the source
22:06 timotimo my first idea was to expose the token stream as a lazy list rather than calling methods on an object
22:06 timotimo or even a supply would be neat, that'd allow for chunkwise json to come in, too, and have Supply in, Supply out
22:07 khw joined #perl6
22:08 timotimo does it make things easier to have a class with methods or a given with a bunch of whens?
22:09 Skarsnik why not having both? xD
22:10 timotimo well, i'll have to implement each one that i'd want to support
22:11 psch i'm not sure outputting streamily is that useful
22:11 espadrine joined #perl6
22:11 psch as in, one advantage of streaming parsers is to not keep the *source* in memory
22:12 psch but you'll still want to have finished the source before acting on the data you parsed, no?
22:12 sno joined #perl6
22:12 Skarsnik I am not fan off the object method, but giving callable is very C for me x)
22:14 timotimo why would you want to wait for the document to complete before outputting the stream?
22:14 timotimo that sounds totally wrong to me
22:14 dalek rakudo/nom: 7b2b7a1 | lizmat++ | src/core/Buf.pm:
22:14 dalek rakudo/nom: Move private support methods to the Blob role
22:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b2b7a1765
22:14 TreyHarris joined #perl6
22:14 kaare_ joined #perl6
22:16 psch well, from what i understand you want to use JSON::Fast to get deserialized JSON as data into your perl6 program
22:16 psch which means as a user of JSON::Fast i need nothing less but finished top-level objects
22:17 psch so yeah, maybe the stream doesn't have to be completely finished, but the outer most started scope has to be
22:17 psch i do admit that i'm not really used to thinking with streaming parser, so take that as you may... :)
22:19 ingy hi [Coke]
22:20 timotimo yeah, i think you have the idea of streaming parsers completely wrong :)
22:20 psch eh, i object on the "completely" :P
22:20 psch i'd agree with "mostly" though :)
22:21 timotimo i'm rather sure you want to receive the individual stream parts immediately
22:22 psch probably, yes.  i think this comes down to me not being able to make up a use case
22:24 Skarsnik think of a jhuge html page you only want the header, stopping the processing of the document make sense, before parsing everything
22:24 psch huh.  yes, known early data is definitely a use case
22:24 timotimo fwiw, using a streaming parser for the profiler would also be doable. if chrome came with such a thing
22:25 timotimo i'm not going to implement that, though :)
22:25 timotimo if you have a json structure where you mostly iterate over a bunch of arrays in it, you'll likely be able to benefit from a streaming parser
22:28 timotimo mhhh, with "next", "last", "succeed" and such, the listener that gets the data streamed to could be instructed to do specific things with the stream
22:28 timotimo i wonder if that'd be cool
22:29 kurahaupo joined #perl6
22:30 Skarsnik you mean like parse-json-stuff{sub { START { hey a thing}, END { finished parsing the thing }}} ?
22:31 psch ...i don't get the intent behind having the parser instruct the listener
22:31 timotimo nah
22:31 timotimo sorry
22:31 timotimo i meant the other way around, of course
22:31 psch oh
22:31 kjs_ Does anyone have a suggestion as to how to generate a ‘create table’ statement based on a hash? (which is generated by JSON::Tiny). I’m playing with prepared statements supported by DBIsh, which works great.
22:31 timotimo like "yeah, i don't care about this object at all, just go find the closing brace for me, will ya?"
22:32 psch hm, i'd rather export new CX for that
22:32 psch ControlException, that is
22:32 psch the semantics feel a bit different
22:32 [Coke] ingy: hio. pinged you some other channel.
22:33 [Coke] #pkg, I think.
22:33 Skarsnik kjs_, well iterate over the hash and build the sql request?
22:34 kjs_ Skarsnik: yes, like, construct the sql query and then execute it. I suppose I got spoiled so quickly that it seemed like a naive solution :-)
22:36 perlpilot_ joined #perl6
22:39 psch eh, on the other hand 'next' or 'last' probably read much better than whatever statement_control token could be exported...
22:39 timotimo :)
22:41 timotimo i wonder how the streaming interface ought to handle errors
22:41 timotimo i'm not sure about the "trailing non-whitespace data" for example
22:45 timotimo if that kind of exception could be resumed, maybe something like "comments until newlines are now allowed" could be implemented with a custom listener that advances the $pos and just resumes work on stuff
22:49 sufrostico joined #perl6
22:53 raiph joined #perl6
22:59 mohae joined #perl6
23:03 flussence «error: pathspec '2016.02' did not match any file(s) known to git.» -- I think --gen-moar needs a `git fetch --tags` somewhere...
23:14 hoelzro sortiz: I took a look at your REPL PR, and it looks like it will do the job of handling unfinished "braced" input just fine! I'm a little concerned, however, that it will match too many other expressions for which multi-line mode wouldn't make sense
23:18 yurivish joined #perl6
23:18 vendethiel joined #perl6
23:21 skids joined #perl6
23:22 prammer joined #perl6
23:23 sortiz hoelzro, I do a good amount of testing, and think the the context, for example the test for $inner.pos, results in a safe use. Have you an example of a failed case?
23:24 hoelzro I don't yet, I'm going to try to break it later ;)
23:24 sortiz *that the context*
23:24 TEttinger joined #perl6
23:28 sortiz In the grammar that kind of exceptions are produced when white-space isn't important and the parser can't get the expected token, in combination with the logic of the new eval, testing for end of line, gives me confidence.
23:30 sortiz And, indeed, much more testing is desired.
23:32 dalek rakudo/nom: 0bf86c3 | lizmat++ | src/core/Buf.pm:
23:32 dalek rakudo/nom: Make Blob.new be more like Buf.new.shift
23:32 dalek rakudo/nom:
23:32 dalek rakudo/nom: With regards to error checking and giving sensible error messages.
23:32 dalek rakudo/nom: Also fix some issues with push/unshifting things like Ranges.
23:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0bf86c35b6
23:36 dalek rakudo/nom: a7ec540 | lizmat++ | src/core/Buf.pm:
23:36 dalek rakudo/nom: Fix ordinal number of value with error
23:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a7ec540ef9
23:36 lizmat and with that, I wish #perl6  a good night!
23:40 sortiz 'night lizmat, good trick: ... ~ "ing!
23:42 addison_ joined #perl6
23:45 Trey_ joined #perl6
23:53 RabidGravy right, that's enough. toodles!
23:57 autarch joined #perl6

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

Perl 6 | Reference Documentation | Rakudo