Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Psyche^_ joined #perl6
00:00 stmuk joined #perl6
00:01 zacts joined #perl6
00:03 kid51 joined #perl6
00:04 Hotkeys aw there was a lot of line ending commits
00:04 Hotkeys was hoping one would fix windows repl
00:04 MadcapJake what's the preferred panda module way of locating the path to a `so` file?
00:08 TrES2b left #perl6
00:08 * psch .oO( party extraction and reporting language..? )
00:10 psch Hotkeys: i have a suspicion that if you change src/core/IO/Handle.pm:24 to < :$nl-in is copy = ["\r\n", "\x0A"] > the windows repl might work
00:10 Hotkeys also psch I haven't tried linenoise
00:10 psch Hotkeys: i don't think that's a likely fix to arrive in the mainline though
00:10 Hotkeys because panda refuses to build
00:11 Hotkeys http://i.imgur.com/QJZjjRl.png
00:11 Hotkeys JSON gets angry
00:11 psch that's a bit spooky
00:11 psch might be related to the same order-mismatch for line endings though
00:11 Hotkeys maybe
00:11 psch i have no idea how much jnthn++ tests his win build against the ecosystem
00:12 Hotkeys it does build fine on old version
00:12 Hotkeys the one before the breakage
00:12 Hotkeys but not sure if it is the same problem
00:12 psch well
00:12 psch "can't parse objects starting at <\r\n> yet" somehow looks very similar :P
00:12 psch s/ yet/yet
00:13 Hotkeys oh
00:13 Hotkeys I didn't even think about that being a \r\n
00:13 psch ...and s/at/in/
00:13 Hotkeys I was wondering why the message looked so strange
00:16 Ven_ joined #perl6
00:16 psch fwiw, i really don't feel like trying to set up a build env on windows
00:18 FROGGS joined #perl6
00:19 Hotkeys I had to install VS2010
00:19 Hotkeys after trying all of the later versions
00:19 Hotkeys it was quite a hassle
00:20 psch ...yeah :P
00:21 Hotkeys although rakudobrew makes everything after that :D
00:21 Hotkeys makes everything easy *
00:22 psch i am rather comfortable with building rakudo tyvm :P
00:22 retupmoca joined #perl6
00:22 Hotkeys lol
00:22 psch anyway, yeah, aside from trying to change that line in IO/Handle.pm i don't have any immediate ideas
00:22 Hotkeys but if I did that I would have to manually build
00:22 psch i'd have to dig into all the nl handling code, and i'm not sure i wanna do that in the near future
00:22 Hotkeys I guess I could do that
00:23 Hotkeys wait can rakudobrew build from a local thingy
00:23 psch as mentioned, the repl is kind of a low-ish impact feature currently, considering much of the language still needs fixes
00:23 psch hrm, well, maybe not "much", but "significant pieces", maybe
00:24 Hotkeys right
00:24 Hotkeys I just hope it
00:24 psch i think you can just cd into the local rakudobrew checkout and run the config.status that hangs around there..?
00:24 Hotkeys ll get accidently fixed
00:24 psch no clue how you run a text file as "this is a commandline" on win though :P
00:25 psch if nothing else you should be able to copy the content out of it and enter it on the cli :P
00:25 khw joined #perl6
00:25 TEttinger psch: I do that all the time
00:25 TEttinger newlines are new commands
00:25 lsm-desktop joined #perl6
00:26 AlexDaniel .u ∘
00:26 yoleaux U+2218 RING OPERATOR [Sm] (∘)
00:26 psch TEttinger: i don't think i follow, you do what all the time?
00:26 dalek rakudo/nom: 5ffd01f | TimToady++ | src/ (2 files):
00:26 dalek rakudo/nom: allow traits to join the $*BORG
00:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ffd01f33b
00:27 dalek roast: 059757b | TimToady++ | S32-exceptions/misc.t:
00:27 dalek roast: fix over-specific borg error checker
00:27 dalek roast: review: https://github.com/perl6/roast/commit/059757b74c
00:28 Hotkeys I'll give changing the handle.pm thing a shot
00:41 MadcapJake how would I go about locating the filepath of a C library and passing that path to a bunch of `pm6` files? Will perl6 get upset if I have a circular dependency?
00:41 TimToady m: sub foo is export{}; foo();
00:41 camelia rakudo-moar 5ffd01: OUTPUT«5===SORRY!5===␤Trait 'is export' needs whitespace before block␤at /tmp/bG8cGwhgfP:1␤------> 3sub foo is export{}7⏏5; foo();␤Missing block (apparently claimed by 'is export')␤at /tmp/bG8cGwhgfP:1␤------> 3sub foo is export{};7⏏5 f…»
00:43 TimToady .tell Skarsnik I fixed your 'is export{}' LTA message.
00:43 yoleaux TimToady: I'll pass your message to Skarsnik.
00:44 MadcapJake I get the syntax, but what's the idiomatic perl6 way of organizing that? Do I put it in my toplevel module (wouldn't that be a circular dependency?) or I've seen some modules havea  BUILD.pm file, how would I use that technique to load a path into some module files?
00:44 MadcapJake (Most Build.pm files are used to build C files, but I am just looking to access a C library)
00:46 MadcapJake when I try and type `is native('libfluidsynth') for it says it can't locate it so I made a sub that would return the exact path to my `so` file on my machine.  but I want to make it dynamically load for every user and each module file needs to have access to this sub.
00:50 FROGGS joined #perl6
00:50 psch MadcapJake: can't you use Build.pm to write a package that exports the users path to libfluidsynth and import that package in your module?
00:50 * psch doesn't really know much about Build.pm
00:52 MadcapJake How come some modules can just type `libssl` or `libSDL` into the native trait and it Just Works™?
00:52 Hotkeys "Receiving objects:  36% (19924/54131), 40.32 MiB | 89.00 KiB/s"
00:52 Hotkeys jeez
00:52 Hotkeys gonna be here all night
01:01 cygx joined #perl6
01:02 cygx MadcapJake: it Just Works when the library has been installed somewhere the loader looks by default
01:02 cygx on WIndows, that includes anything in PATH
01:09 MadcapJake cygx: any idea where it looks on linux?
01:13 TimToady cygx: by the by, there's already a 32x32 camelia at https://raw.githubusercontent.com/​perl6/mu/master/misc/camelia32.ico
01:14 cygx TimToady: it was less about the icon and more about generating PNG from a text-based format
01:15 cygx MadcapJake: LD_LIBRARY_PATH, /lib, /usr/lib and such
01:16 konobi lo
01:18 Hotkeys psch: I tried the fix you suggested but it didn't help
01:19 Hotkeys it was worth a shot though
01:20 psch Hotkeys: well, in that case it's probably beyond what i can figure out without building on win myself
01:20 psch and i really don't feel up to that
01:20 Hotkeys I might keep fiddling since building manually isn't as spooky as I thought
01:21 psch Hotkeys: it seems to be about nqp confusing the line endings, from a distance
01:22 psch Hotkeys: as in, if you can figure out how exactly the code that check whether we want \n or \r\n acts, you might able to figure it out
01:22 psch well, except if there's a hangup with grapheme composition of \r\n into \n somewhere, that might take a bit more work...
01:22 psch (that's all talking from a "i don't really know how this works" POV though...)
01:23 aborazmeh joined #perl6
01:23 aborazmeh joined #perl6
01:23 Hotkeys its okay I also have no idea how itworks
01:25 psch hm, nqp::getstdin simply gets the stdin_handle from the tc
01:25 psch maybe it just doesn't remember it has to check different line endings..?
01:25 psch oh
01:25 psch or it could be a bug in libuv
01:25 psch 'cause apparently tc->instance->stdin_handle is a uv_stream_t
01:26 MacroniSalad joined #perl6
01:26 psch Hotkeys: well, i'm confident you can figure it out :P
01:26 psch Hotkeys: just keep bashing your head against the code base, it's what i usually do and it seems to work quite well ;)
01:27 zengargoyle MadcapJake: nativecall should *just* work with native('libfoo') if libfoo.(so|dll) is installed where the system expects it.
01:28 zengargoyle or with native('libfoo.so.2') for that matter, but that seems to only match that one thing and not do .dll like searching # as i grok it.
01:28 Hotkeys psch: i'm not so confident :p
01:28 zengargoyle the native(&library) thing when i first saw it was for things that built their own library and installed it along with the .pm6 file
01:29 Hotkeys I might wait til i get home to bash my head into the codebase
01:29 Hotkeys cause it's hard to think about problems while also absorbing lecutre info
01:29 zengargoyle and had the need to search for the actual path where it is finally installed to be able to load it.
01:29 psch Hotkeys: yeah, lecture probably should come first
01:30 Hotkeys I can do code monkey testing in lecture but actually thinking doesn't work as well
01:30 * zengargoyle did this for Algorithm::Trie::libdatrie but hasn't released the version that builds its own library yet.
01:30 cygx 'night, #perl6 o/
01:31 abaugher joined #perl6
01:33 zengargoyle and if you use LibraryMake, it has a couple of functions to help with that.  so you end up with something like Find::Bundled.find("libfoo$so") and the $so is the .so / .dll depending on your system
01:33 zengargoyle and it can look in the place the module was installed and then on down the path to where the system usually installs things.
01:34 zengargoyle there's also LibraryCheck which helps a bit.
01:34 * zengargoyle thinks there should eventually be a NativeCall tutorial of some sort.  it took like a day of digging to figure all this out...
01:36 abaugher joined #perl6
01:37 zengargoyle for your case, i'd make a:  module Module::Base { sub library() is export returns Str { code to find library } }
01:38 zengargoyle and then: use Module::Base; in your other modules and use is native(&library).
01:45 BenGoldberg joined #perl6
01:52 MadcapJake zengargoyle: thanks! That's a great tip!
01:52 * MadcapJake goes off to implement Audio::Fluid::Base
01:53 tokuhiro_ joined #perl6
01:54 MadcapJake how do I keep all my classes in separate files while still allowing users to just type `use Audio::Fluid;` to get access to them all?
01:54 MadcapJake is that handled automatically or do I need to specify a `Fluid.pm6` file just for that?
01:55 psch MadcapJake: you need an 'Audio::Fluid', but that can just import and reexport stuff from lower in the same namespace
01:55 MadcapJake ok got it, thanks!
01:56 psch i feel like being explicit about it being fluidsynth is useful, tbh
01:57 psch 'cause i at least expect the module name to be expressive, and i don't know what fluid audio would be :S
01:57 psch fluidsynth otoh i already know about
01:57 psch but that's just my perspective, take that as you will
01:57 MadcapJake ok I just didn't want to have `Audio::FluidSynth::Synth` but I guess it's better to have recognition
01:58 psch yeah, i'd go with Audio::FluidSynth as the package users usually use
01:58 MadcapJake ok will do!
01:58 psch "use" as in "use Audio::FluidSynth"
01:59 konobi who's in charge of the build/test infrastructure
02:00 skids of rakudo?
02:00 psch konobi: travis integration on github runs basic integration (i.e. "does it build")
02:00 psch konobi: [Coke]++ regularly upload summaries of roast against daily snapshot of rakudo
02:01 konobi psch: mkay... if I was able to get a couple of additional hosts to add to the testing matrix, who should I talk to?
02:02 psch konobi: you're talking about testers.perl6.org?
02:02 psch that's the module-level testing
02:03 psch konobi: afaik, we don't really have a dedicated daily roast run, which i think you're trying to help provide
02:04 psch i think [Coke] runs it semi-manually, but you'd have to ask them if you want to be sure
02:04 psch so, yeah, that's probably who you should talk to :)
02:04 konobi psch: mkay... well, I may hopefully have an illumos host or two available for longerterm use
02:06 flussence psch: parrot used to have a webapp thing for collecting spectest results, and I had a cronjob run it daily. Don't think anyone cared as much back then but I could put it back on if there were a new place to upload them to.
02:08 psch flussence: afaik, the spot to upload them to would be https://github.com/coke/perl6-roast-data nowadays
02:08 psch flussence: although we have http://testers.perl6.org, so something similarly fancy for spectest results might be decent dogfood target...
02:09 psch flussence: no idea if that still fits your scope though
02:09 psch flussence, konobi: for the latter afair FROGGS++ wrote testers
02:10 psch tbh, i'd kinda want a travis-y fail safe, 'cause i know it happens to me that i occassionally forget running spectest after pushing a change
02:11 psch and having something around that says "hey, this commit cause failures here" would be neat, although i'll admit i have no real clue about how much work is involved there
02:11 psch ...i'm not sure how far to push this though
02:12 psch there was talk about backend-specific branches and auto-merging into the mainline after a successful (or maybe non-regressive) spectest
02:12 psch but we still have flappers in a few async tests, so maybe we're not quite yet at a spot where that's actually useful anyway
02:13 psch s/running spectest after/running spectest before/ # uhm...
02:15 psch konobi: i just saw illumos is OpenSolaris.  i have no idea in how far that already works, although i'd expect "generally yes"
02:16 psch i don't know how different things are there, i'm pretty linux-centric..
02:16 psch anyway, i need to get some rest o/
02:16 konobi psch: i've been working on moarvm build on illumos
02:17 konobi psch: but it's basically Solaris... but with gnu tooling
02:18 konobi (since sunstudio is closed)
02:19 isacloud_ joined #perl6
02:20 flussence wonder if rakudo would build on this RPi 1 I've got sitting around... I could definitely leave that running a testing cronjob
02:21 Celelibi joined #perl6
02:21 Juerd_ joined #perl6
02:22 BenGoldberg joined #perl6
02:22 Actualeyes joined #perl6
02:23 flussence joined #perl6
02:25 xpen joined #perl6
02:25 SmokeMachine joined #perl6
02:29 mephinet joined #perl6
02:30 Ben_Goldberg joined #perl6
02:32 pdcawley joined #perl6
02:38 psch joined #perl6
02:45 DrForr_ joined #perl6
02:45 petercom1and joined #perl6
02:45 ponbiki_ joined #perl6
02:45 dalek rakudo/nom: bcebf8e | TimToady++ | src/core/ (5 files):
02:45 dalek rakudo/nom: implement put sub/method
02:45 dalek rakudo/nom:
02:45 dalek rakudo/nom: This is like 'say' insofar as it adds newline, but like 'print' insofar
02:45 dalek rakudo/nom: as it has .Str semantics instead of .gist.
02:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bcebf8e96f
02:45 moznion joined #perl6
02:45 g4 joined #perl6
02:45 silug joined #perl6
02:45 robinsmidsrod joined #perl6
02:45 hoelzro joined #perl6
02:45 rhr joined #perl6
02:45 ponbiki joined #perl6
02:45 krakan joined #perl6
02:45 bitmap joined #perl6
02:45 petercommand joined #perl6
02:45 Bucciarati joined #perl6
02:45 skaji joined #perl6
02:45 DrForr joined #perl6
02:45 xdbr joined #perl6
02:45 xdbr joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:47 Bucciarati joined #perl6
02:48 advwp joined #perl6
03:00 grondilu TimToady: have you considered 'disp' instead of 'put' for this semantics?
03:01 grondilu (or anything else)
03:05 TimToady put is the opposite of get, and disp means too many other things
03:06 raiph joined #perl6
03:07 BenGoldberg joined #perl6
03:07 * [Coke] yawns
03:10 [Coke] Have you considered making say do what put does, and making put do what say does? ;)
03:10 flussence $*OUT.disp doesn't roll off the tongue...
03:11 BenGoldberg joined #perl6
03:11 TimToady [Coke]: yes, I did, in fact
03:11 TimToady but print and put both begin with 'p', and 'put' and 'say' are both 3 letters, so put is obviously the intersection of them :)
03:14 MadcapJake Is there a dynamic variable that can tell me if a user is on a 64 or 32 bit OS?
03:15 lizmat m: say $*KERNEL.bits
03:15 camelia rakudo-moar bcebf8: OUTPUT«64␤»
03:15 lizmat MadcapJake   ^^^
03:15 * llfourn sheds a tear at the beuty of that
03:16 llfourn beauty :\
03:16 MadcapJake cool, thought maybe that was inside $*DISTRO or $*VM, couple useful ones inside $*KERNEL
03:16 MadcapJake m: say $*KERNEL.^methods
03:16 camelia rakudo-moar bcebf8: OUTPUT«(BUILD name version release hardware arch bits signals signal Str gist <anon> <anon> <anon>)␤»
03:17 lizmat m: say $*KERNEL.hardware   # source of .bits: $!bits //= $.hardware ~~ m/_64|w|amd64/ ?? 64 !! 32;
03:17 camelia rakudo-moar bcebf8: OUTPUT«x86_64␤»
03:17 llfourn m: $*KERNEL.panic
03:17 camelia rakudo-moar bcebf8: OUTPUT«Method 'panic' not found for invocant of class 'Kernel'␤  in block <unit> at /tmp/6RKEPH6Cb4:1␤␤»
03:17 llfourn :( NYI?
03:19 MadcapJake whats the difference between .hardware and .arch? I get the same result on my machine ("x86_64")
03:19 lizmat it's all heuristics that's still in flux
03:20 flussence maybe for arm, where you can compile things a zillion different ways for one cpu type...
03:20 MadcapJake oi, that sounds lovely
03:20 * lizmat is tired and goes to bed
03:20 zengargoyle not sure if it comes from the `uname` like source.
03:20 lizmat zengargoyle: look at src/core/Kernel.pm
03:21 lizmat good night, #perl6!
03:21 llfourn o/
03:21 flussence o/
03:21 zengargoyle kernel, machine, hardware, os, all of those things tend to differ on even Linux machines by distro, even moreso going to Solaris.
03:21 flussence I wonder if the values differ for running an i686 kernel on a 64-bit cpu.
03:22 flussence (not sure if there's even a sane way to detect that...)
03:22 zengargoyle $WORK has a large-ish shell script that does many things to get a final description of uname like info.
03:23 zengargoyle yeah, uname
03:24 kaare_ joined #perl6
03:24 * MadcapJake doesn't even know what any of the x86 variations mean
03:26 flussence there's i386, some numbers between that and i686 (=anything with MMX) that few people use, some numbers *after* that one even less used, then it jumps straight to x86_64 and everyone seemingly gave up making up subarch names after that (thankfully)
03:27 zengargoyle and some use amd64 instead
03:27 zengargoyle and some i86pc
03:28 MadcapJake well i have a phenom II x6 which I thought would be amd64 but it's x86_64 apparently
03:28 zengargoyle they're the same.
03:29 MadcapJake oh, ok that's good xD
03:30 zengargoyle IIRC it's more about whether Intel or AMD got the first chip out.
03:30 ShimmerFairy AMD's version of 64-bit x86 won because it was backwards-compatible with the old x86, as I recall
03:31 ShimmerFairy Intel came up with a new and incompatible variant that is certainly in use, but I imagine the "can't run old 32-bit applications on it" thing kept it from "winning" :)
03:32 MadcapJake I'm just thankful I bought an AM3+ board a few years back, FX series AMD CPUs are still in production! That'll be quite the upgrade when I can pony up the cash. From my meager 2.8GHz 6 cores to 4.0 GHz 8 cores in the top-of-the-line FX CPU.  I wonder if I'll have to reinstall linux, anyone ever upgraded a CPU without reinstalling their OS? Is it possible?
03:32 timotimo yeah, that's the ia64 thingie
03:32 flussence it can run them, they're just emulated at speeds rakudo-on-parrot could run rings around :)
03:32 timotimo ShimmerFairy: did you see i commented on a MoarVM github issue that you started?
03:32 ShimmerFairy oh, no, let me check :)
03:33 timotimo Hotkeys, psch, i'd very much accept a pull request to add explody tests to JSON::Fast about the newline stuff!
03:33 timotimo so if you can figure out what exact text gets passed to it there, that'll be a good start
03:33 timotimo probably just a comma followed with \r\n
03:33 ShimmerFairy timotimo: I haven't seen those memory issues lately either, so I'll get around to updating and running a new spectest at some point to make sure :)
03:34 flussence MadcapJake: it'll work fine, as long as you don't have anything compiled with -march=native or the like (because newer AMD chips got rid of 3dnow instructions entirely)
03:35 timotimo ShimmerFairy: i'd prefer not having an open bug for that unless it's somewhat reliably reproducible, so feel free to close the bug if you're not confident in its reproducibility
03:36 MadcapJake ok, then i'm good! if it does crash, it'll be a good excuse to jump from ubuntu to fedora though. xD
03:36 timotimo i'll head to bed now
03:36 ShimmerFairy timotimo: it looked like you closed it already
03:36 timotimo oh?
03:36 timotimo OK, so change that to: if you can reliably reproduce that bug, re-open the issue %)
03:36 timotimo anyway, ttyl!
03:38 ShimmerFairy will do :)
03:51 doublec_ joined #perl6
03:52 BenGoldberg joined #perl6
03:52 Hotkeys I still don't know exactly why the repl is breaking never mind json::fast
03:54 BenGoldberg joined #perl6
03:58 ugexe if you're still talking about windows i thought its been said a few times its that newlines (and hence .lines etc) aren't properly handled yet
03:58 yoleaux 12 Nov 2015 21:33Z <mrf> ugexe: PR made with full passing tests and new RFC additions
03:59 ugexe do my $proc = run "git", "ls-files", :out; say $proc.out.lines; on windows and see what it outputs
03:59 ugexe its one long string with \n between everything
04:00 eternaleye joined #perl6
04:00 sitaram joined #perl6
04:02 sitaram joined #perl6
04:05 Hotkeys ugexe: I know that it's new lines I just don't know ehere it breaks
04:06 Hotkeys like in what file(s) and where in it/them
04:06 Hotkeys somewhere in nqp
04:07 ugexe i imagine the results from greping 'readline' on the nqp repo are a pretty good idea
04:08 ugexe theres not too many
04:15 ugexe my guess would be https://github.com/perl6/nqp/blob​/master/src/HLL/Compiler.nqp#L397
04:17 ugexe i think it should work if that is replaced with $?NL or whatever
04:17 ugexe er nqp wont have $?NL will it
04:20 colomon joined #perl6
04:24 sprocket joined #perl6
04:26 MadcapJake what is the numbering scheme used by some people for their test files? It doesn't seem to be the number of tests.
04:27 ugexe they are supposed to get run in alphabetical order by file name unless otherwise specificed
04:28 ugexe so a lot of people do ##-some_name.t
04:28 MadcapJake oh, some people use a single number, some people use a leading zero number, others just name it however
04:28 ugexe right, or they leave some free numbers for extra tests that might need to be run towards the start/end
04:29 ugexe i.e. tests 10-start.t and 20-end.t
04:29 MadcapJake ohh, that makes sense, that's why there are missing numbers, xD
04:29 ugexe later i can add 19-almost_end.t
04:29 MadcapJake ugexe: thanks! that's been bugging me for a while :P
04:30 ugexe you can stop looking for goat #3 now heh
04:35 raiph joined #perl6
04:45 Oatmeal joined #perl6
04:50 dayangkun joined #perl6
05:47 * grondilu stumbled upon masak's "Javascript has already won" talk.  Fascinating stuff.
05:48 grondilu (all the more reason to look forward to pmurias's work)
05:55 llfourn grondilu: thanks I hadn't seen this one...
06:37 domidumont joined #perl6
06:43 dalek rakudo/nom: 06c0c53 | TimToady++ | src/core/ (6 files):
06:43 dalek rakudo/nom: use --> True where appropriate
06:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06c0c53ea7
06:54 domidumont joined #perl6
06:59 jsimonet joined #perl6
07:01 polettix joined #perl6
07:05 diana_olhovik_ joined #perl6
07:19 [Tux] good morning *6
07:28 adhoc joined #perl6
07:29 [Tux] test             50000    21.186    21.073
07:29 [Tux] test-t           50000    17.626    17.513
07:30 [Tux] Text::CSV = 17.6, CSV::Parser = 25.7 # tony-o tempted?
07:32 [Tux] which means the currently Text::CSV is the fastest (and most versatile) CSV parser for perl6 :) :)
07:34 RabidGravy joined #perl6
07:37 rindolf joined #perl6
07:44 quester joined #perl6
07:46 FROGGS joined #perl6
07:54 brrt joined #perl6
07:54 Averna joined #perl6
07:59 moritz \o/
08:00 virtualsue joined #perl6
08:01 cosimo joined #perl6
08:01 darutoko joined #perl6
08:03 RabidGravy marnin
08:17 RabidGravy making test data on the sofa at 8 in the morning - living the dream
08:18 gfldex m: say Nil ~~ List; sub is-nil-a-list-or-not(--> List){Nil}; is-nil-a-list-or-not().WHAT.say;
08:18 camelia rakudo-moar 06c0c5: OUTPUT«False␤Nil␤»
08:20 moritz Nil and derived classes (like Failure) are an exception to return type checking
08:20 moritz I guess that should be documented somewhere :-)
08:22 cbk joined #perl6
08:26 gfldex m: sub foo([] --> ()){}; foo().WHAT.say;
08:26 camelia rakudo-moar 06c0c5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3jEQG4WjwS␤Malformed return value␤at /tmp/3jEQG4WjwS:1␤------> 3sub foo([] -->7⏏5 ()){}; foo().WHAT.say;␤»
08:26 gfldex can Perl 6 return the empty list from a --> definition for me?
08:29 moritz m: sub foo([]) --> []) { }; say foo([]).perl
08:29 camelia rakudo-moar 06c0c5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0EPwQIro9h␤Missing block␤at /tmp/0EPwQIro9h:1␤------> 3sub foo([])7⏏5 --> []) { }; say foo([]).perl␤    expecting any of:␤        new name to be defined␤»
08:29 moritz m: sub foo([] --> []) { }; say foo([]).perl
08:29 camelia rakudo-moar 06c0c5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/avySa8LffL␤Malformed return value␤at /tmp/avySa8LffL:1␤------> 3sub foo([] -->7⏏5 []) { }; say foo([]).perl␤»
08:29 gfldex m: sub foo([] --> List.new){}; foo().WHAT.say; # kinda LTA
08:29 moritz huh
08:29 camelia rakudo-moar 06c0c5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GT0SCbM3pn␤Type 'List' is not declared␤at /tmp/GT0SCbM3pn:1␤------> 3sub foo([] --> List7⏏5.new){}; foo().WHAT.say; # kinda LTA␤»
08:29 abraxxa joined #perl6
08:30 TimToady m: sub foo(--> Empty){}; foo().WHAT.say;
08:30 camelia rakudo-moar 06c0c5: OUTPUT«(Slip)␤»
08:31 abraxxa joined #perl6
08:32 moritz m: constant EmptyList = (); sub foo( --> EmptyList ) { }; say foo().^name
08:32 camelia rakudo-moar 06c0c5: OUTPUT«List␤»
08:32 moritz m: constant EmptyList = (); sub foo( --> EmptyList ) { }; say foo().perl
08:32 camelia rakudo-moar 06c0c5: OUTPUT«()␤»
08:33 zakharyas joined #perl6
08:34 ely-se joined #perl6
08:53 pecastro joined #perl6
08:57 llfourn m: say Nil ~~ List; sub is-nil-a-list-or-not(--> List:D){Nil}; is-nil-a-list-or-not().WHAT.say;
08:57 camelia rakudo-moar 06c0c5: OUTPUT«False␤Nil␤»
08:58 llfourn m: sub foo(--> Str:D) { Nil }; foo;
08:58 camelia rakudo-moar 06c0c5: ( no output )
08:59 llfourn I swear I have gotten the message for a return type "Expecting Str but got Nil"....
09:00 gfldex The Perl 6 Book will have a whole chapter trying to explain why Nil isn't the undefined value :->
09:01 gfldex m: say Nil.Str;
09:01 camelia rakudo-moar 06c0c5: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/qGQIEV264e:1␤␤»
09:02 gfldex m: printf("%s", Nil);
09:02 camelia rakudo-moar 06c0c5: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.␤Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undef…»
09:02 Ulti I have to confess I have no idea what Nil is for given you have all the type objects?
09:03 llfourn It's to set a value to something so if that value is used it throws an exception. Or at least that's the way I think of it.
09:03 Ulti I use Any like undef
09:04 gfldex if you ask for the weather forcast it's a big difference if someone tells you, he doesn't know the weather forcast or simply doesn't give you any answer
09:04 llfourn mmm yeah it's not meant to be undef
09:04 Ulti llfourn then what's fail/failure for?
09:04 llfourn Util: when you want to attach a message to that exception
09:05 Ulti :S
09:05 Ulti ok
09:05 llfourn this is simply the way I understand it :P
09:05 Ulti I think Nil maybe suffers from being close to null from other languages
09:05 gfldex Nil means: this function was asked for a return value but didn't provide one
09:06 gfldex Failure.new is a value
09:06 llfourn I learned the other day that you can also use it in default values for :D attrs
09:07 llfourn m: class A { has Str:D $.a = Nil }; say A.new;
09:07 camelia rakudo-moar 06c0c5: OUTPUT«A.new(a => Str:D)␤»
09:07 gfldex m: say Failure ~~ Nil; say Failure.new ~~ Nil;
09:07 camelia rakudo-moar 06c0c5: OUTPUT«True␤True␤»
09:11 gfldex m: say Failure.new.defined; say Nil.new.defined;
09:11 camelia rakudo-moar 06c0c5: OUTPUT«False␤False␤»
09:34 kjs_ joined #perl6
09:36 polettix joined #perl6
09:38 pmurias joined #perl6
09:43 Skarsnik joined #perl6
09:58 quester left #perl6
10:06 zakharyas joined #perl6
10:06 jnthn morning, #perl6
10:06 jnthn ooh, no messages :)
10:09 doublec_ joined #perl6
10:10 DrForr_ Must be ready for release :)
10:10 DrForr_ SHIP IT!
10:11 pmurias jnthn: morning
10:12 RabidGravy the weather just went downhill rapidly
10:16 telex joined #perl6
10:21 jnthn RabidGravy: So...good news for coding? :)
10:22 RabidGravy At some point need to go to farm shop and buy vegetables
10:22 RabidGravy :-\
10:23 masak the vegetables will be juicier due to the precipitation
10:25 doublec joined #perl6
10:27 masak alright, who wants to contact http://0.30000000000000004.com/ to add Perl 6 to that list? :)
10:28 stmuk RabidGravy: I thought the only vegetables you liked were barley and hops!
10:28 * masak .oO( graaaaaaains )
10:30 El_Che Does the default new for a class not catch "invalid" attributes? class foo { has $.bar }; Foo.new(bartypo => "foo")
10:30 jnthn No
10:30 masak this is something of a FAQ
10:31 jnthn Note that methods in general quietly discard unused named parameters, so it's consistent
10:31 El_Che mm
10:31 El_Che it will consistently lead to annoying bug
10:31 El_Che s
10:31 sprocket joined #perl6
10:32 masak El_Che: don't worry, the "it shold warn/error" school of thought has a sizeable following. :)
10:32 llfourn $.bar is required can help if it's appropriate
10:32 RabidGravy if it concerns you make multi variants with required named params
10:33 masak but I've never heard a cogent argument *against* S12's "Interface Consistency"
10:33 El_Che well, actually, it's worse than that
10:33 El_Che whay if I think I provide a optional attribute?
10:33 llfourn yes obviously that will be a problem :)
10:37 jnthn Method calls are *generally* more late-bound/sloppy. This is at the same level of "what if I typo the method name", and the answer is things like "we cope with this issue because we like the late binding overall" and "we write tests"
10:37 pmurias m: class Foo {has $!attr};Foo.new(attr=>23)
10:37 camelia rakudo-moar 06c0c5: ( no output )
10:37 doublec_ joined #perl6
10:38 RabidGravy m: 'sub foo(:$foo, *%bits where *.keys.elems == 0) { }; foo(foo => 1, bar => 1)
10:38 camelia rakudo-moar 06c0c5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gM6DHDBT7s␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/gM6DHDBT7s:1␤------> 3elems == 0) { }; foo(foo => 1, bar => 1)7⏏5<EOL>␤    expecting any of:␤        sing…»
10:38 RabidGravy m: sub foo(:$foo, *%bits where *.keys.elems == 0) { }; foo(foo => 1, bar => 1); # even
10:38 camelia rakudo-moar 06c0c5: OUTPUT«Constraint type check failed for parameter '%bits'␤  in sub foo at /tmp/czlROiJ7x7:1␤  in block <unit> at /tmp/czlROiJ7x7:1␤␤»
10:38 RabidGravy there, problem solved
10:38 jnthn But subs check for you by default
10:38 jnthn :-)
10:38 llfourn RabidGravy: that's cool!
10:38 jnthn But yes, you can do that.
10:39 jnthn (For methods)
10:39 RabidGravy for methods, yes, but I haven't cranked up the typing foo
10:39 Woodi hallo #perl6 :)
10:40 RabidGravy marnin
10:41 Woodi is node.js a new PHP ?
10:41 RabidGravy it would be cool to be able to alter the "Constraint type check failed for parameter ... " message
10:41 RabidGravy Woodi, no
10:41 eiro is it a spotted friday troll ? :)
10:41 eiro hello everyone
10:41 Woodi o/ :)
10:41 masak Woodi: no.
10:42 eiro there is no "new php", there is php7
10:42 masak heiro \o
10:42 * pmurias is glad he doesn't have to work on rakudo-php
10:42 El_Che jnthn: let agree in principle and disagree in practice :)
10:42 masak pmurias: :D
10:42 eiro masak, i miss you! tell me you'll be at fosdem ?
10:42 masak eiro: I wish I were. :/
10:43 Woodi I don't mean: on lobal scale... so interned post-PHP will be more divided ?
10:43 RabidGravy even on a personal level, I dislike PHP intensely but have used node.js/javascript without wanting to break things
10:43 Woodi *global there...
10:43 masak eiro: deprioritizing fun confs right now, and prioritizing fun @family :)
10:44 RabidGravy masak++ # damn right
10:44 llfourn whenever I had to dp PHP I always tried to turn everyhing into a client side problem so I could use JS
10:44 Woodi what Perl6 in web page means ? <script>v6-code</script> ?
10:44 eiro masak++ # damn damn right
10:45 masak Woodi: that does seem like the literal meaning, yes.
10:47 Woodi masak: do this require to download megabytes of js code ? :) or just once ?
10:48 masak Woodi: I suppose the runtime would be a big one-time overhead. probably clever things with caching can be done there to make it a one-time cost.
10:48 masak s/one-time//
10:49 El_Che Like MS office that preloads at boot time? :)
10:51 RabidGravy oooh bind_one_param is a bastarding big sub isn't it
10:52 jnthn Yes.
10:53 jnthn Thankfully we compile most signatures and so don't hit it
10:55 pecastro joined #perl6
10:57 Woodi so DBIish::Driver::Native::XxSql changed to DB::XxSql ?
11:00 pmurias masak: caching the runtime is one option, other is some sort of tree pruning like dart uses
11:00 masak pmurias: not-famous-for-its-performance basically-deprioritized-in-favor-of-js Dart?
11:03 Skarsnik hm how do I pass the --prefix for Configure.PL with rakudowbrew? rakudobrew build moar --prefix=/opt/ does not work ~~
11:03 yoleaux 00:43Z <TimToady> Skarsnik: I fixed your 'is export{}' LTA message.
11:03 Skarsnik and hello ^^
11:04 Skarsnik .tell TimToady thx for fixing is export{ message
11:04 yoleaux Skarsnik: I'll pass your message to TimToady.
11:04 Woodi one nice side effect of XS-things in Perl5 was that DBI was central API. but with with more human oriented ffi's we can have usable raw, low-level XxSql APIs; nice for "special" databases features
11:04 luiz_lha joined #perl6
11:07 pmurias masak: Dart is both compiled to js and has it's own VM
11:07 masak pmurias: "tree shaking" seems to make a lot of sense, though.
11:07 masak in fact, I don't see why a codegen step of any kind shouldn't do that.
11:07 pmurias masak: the performance of dart-compiled-to-js is as far as I know awesome
11:07 masak it's just dead code elimination, no?
11:07 Woodi but it allows "I want my own DBI!"... in Perl5 it was "impossible" and all creativity was redirectet on top of DBI. so database interface was "clear"...
11:08 pmurias masak: I think so
11:09 Skarsnik Ok resolved my configure issue ^^
11:09 pmurias masak: dart2js has near javascript performance on most benchmarks and they even beat idiomatically writen js on some of them
11:11 masak pmurias: that's nice.
11:11 masak pmurias: I think I would rather write Dart than ES5.
11:12 masak pmurias: but then again, I'd rather write TypeScript than Dart.
11:12 pmurias it's likely a reason they have up on the Dart VM as the dart2js performance was good enough
11:12 pmurias or is Google backing up out of Dart as whole too?
11:14 Skarsnik Woodi, well you can probably have lowlevel db stuff from a specific lib if someone write the whole binding for it
11:15 brrt masak, what do you mean by treeshaking
11:17 masak brrt: dead code elimination
11:17 brrt oh, ok
11:18 jnthn m: multi foo($x is rw) { print 1 }; multi foo($x) { print 2 }; foo []; for ^2000 { foo $ = []; }
11:18 camelia rakudo-moar 06c0c5: OUTPUT«21111111111111111111111111111111111111​111111111111111111111111111111111111111111111​111111111111111111111111111111111111111111111​111111111111111111111111111111111111111111111​111111111111111111111111111111111111111111111​11111111111111111111111111111111111111…»
11:18 jnthn psch: ^^ exposes a spesh regression
11:18 jnthn (Took me some attempts to get it to show up)
11:18 jnthn So there was one.
11:18 * jnthn will work on it
11:18 masak pmurias: investing more in dart2js rather than the Dart VM is *already* a big policy change/course correction for Google, since their original intent was to make Dart their "high-risk/high-reward" JS *replacement* in the browser
11:19 jnthn uh, that maybe shoulda been on #moarvm :)
11:19 masak pmurias: a vision that must have seemed more realistic to them than to the rest of the world :)
11:19 Skarsnik Did I miss something?
11:19 Skarsnik (skardev)root@pinkpony:/opt/rakudobrew# perl6 --version
11:19 Skarsnik This is perl6 version 2015.10-290-g06c0c53 built on MoarVM version 2015.10-81-gc79bd27
11:19 Skarsnik (skardev)root@pinkpony:/opt/rakudobrew# ./bin/rakudobrew build panda --configure-opts=--prefix=/opt/
11:19 Skarsnik rakudobrew: perl6: command not found
11:20 jnthn masak: Was probably still worth a try, though, to show what happens if somebody really well placed to try that path does so.
11:20 pmurias masak: it's hard to judge how realistic it was without having access to the backroom browser vendors negotiations
11:20 masak jnthn: yes. as a kind of "legal precedent", as it were
11:21 masak pmurias: good point. my mental simulation of those are like this, though: "<non-google_vendor> you can't be serious."
11:30 telex joined #perl6
11:30 stmuk I have a variable in the debugger which I can't print or use in anyway
11:30 stmuk > p $row
11:30 stmuk Cannot create an instance of null type
11:30 stmuk is this a feature or bug?
11:31 stmuk hmm maybe its scope
11:34 jnthn Sounds like a bug, but no idea what
11:41 xpen joined #perl6
11:41 RabidGravy after what seems like a squillion lines of Perl 6 code I have finally used "multi method foo('string literal', ....)" for something
11:42 xpen joined #perl6
11:43 RabidGravy right off out for a bit, play nicely kids
11:45 stmuk don't get blown over
11:46 ely-se joined #perl6
11:55 ilogger2 joined #perl6
12:06 llfourn joined #perl6
12:07 cosimo joined #perl6
12:08 eliasr joined #perl6
12:13 ilogger2 joined #perl6
12:14 cosimo joined #perl6
12:16 cosimo joined #perl6
12:26 ilogger2 joined #perl6
12:27 masak RabidGravy: I find I use it quite a bit in MAIN sometimes.
12:27 timotimo Skarsnik: it's build-panda, not build panda
12:27 timotimo build panda would look for a branch or tag named "panda" inside rakudo
12:28 Skarsnik but I get the same error x)
12:28 timotimo huh.
12:28 timotimo maybe it's time for a rakudobrew nuke :D
12:29 tadzik no no
12:29 tadzik 'build panda' is a special case
12:29 timotimo oh?
12:29 timotimo yay for special cases >_>
12:29 tadzik it's equivalent to build-panda
12:30 Skarsnik It's a fresh install, I just rakudobrew build moar-vm. but a quick look at the script. It does not seem it look at PATH to find perl6. I think it assume it's in the default path rakudobrew build-moar build
12:31 Skarsnik but I make it install in /opt/
12:34 dalek nqp: cb65a58 | jnthn++ | tools/build/MOAR_REVISION:
12:34 dalek nqp: Get MoarVM multi-cache support for rw conts.
12:34 dalek nqp: review: https://github.com/perl6/nqp/commit/cb65a58997
12:37 ilogger2_ joined #perl6
12:37 kid51 joined #perl6
12:38 dalek rakudo/nom: 1704b92 | jnthn++ | tools/build/NQP_REVISION:
12:38 dalek rakudo/nom: Bump for multi cache with `is rw` support.
12:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1704b924fd
12:39 AlexDaniel joined #perl6
12:40 dalek rakudo/nom: 4e3eab6 | peschwa++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
12:40 dalek rakudo/nom: Don't bypass multicache for rwness-aware multis.
12:40 dalek rakudo/nom:
12:40 dalek rakudo/nom: This commit (and branch) depend on MoarVM pull request #291, and can be merged
12:40 dalek rakudo/nom: whenever that PR gets merged (or something equivalent implemented).
12:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4e3eab678c
12:40 dalek rakudo/nom: f3e960e | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
12:40 dalek rakudo/nom: Merge branch 'for-mvm-pr291' into nom
12:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3e960e4c9
12:42 dalek roast: c9874ca | jnthn++ | S06-multi/by-trait.t:
12:42 dalek roast: Optimizer stress test for `is rw` on multis.
12:42 dalek roast: review: https://github.com/perl6/roast/commit/c9874caacf
12:44 moritz http://0.30000000000000004.com/ anybody want to submit a pull request explaining Perl 6's behavior?
12:44 timotimo i'm surprised php does it right
12:45 moritz I'm nearly sure it just truncates the digits, just like python and perl 5 do by default
12:45 tadzik . o O ( for any value of it )
12:46 moritz php5 -r 'echo .1 + .2 == .3;'
12:46 moritz no output (which means false)
12:46 moritz in comparison, php5 -r 'echo 1 + 2 == 3;' prints 1
12:47 timotimo then it should say something to that effect under the result
12:48 moritz $ php5 -r 'printf("%.17f\n", .1 + .2);'
12:48 moritz 0.30000000000000004
12:48 timotimo can't have php look better than perl5 on such a website, now can we :P
12:49 masak "look better" is a bit subjective here :)
12:49 timotimo hah
12:49 masak 0.3 is a short-sighted lie
12:49 masak 0.30000000000000004 is an uncomfortable truth
12:50 * moritz very much prefers Perl 6's comfortable truth
12:50 timotimo :)
12:51 masak I believe Perl 6 and the Scheme dialects on that pages can bask in that comfortable truth together.
12:51 lizmat good *, #perl6!
12:51 masak page*
12:51 sufrostico joined #perl6
12:51 timotimo "but omg performance dood"
12:52 masak good ⁂, lizmat!
12:52 masak timotimo: "I don't care about the answer, I just want it *fast*!"
12:52 lizmat masak o/
12:53 masak \✺
12:53 * lizmat hates it being called at 4:30 am by a telemarketeer
12:54 * masak minds less than he thought being woken up at 05:00 by a cheerful 10mo cherub next to him
12:54 * jnthn hates being called by a telemarketer
12:54 * jnthn mostly hates being called on the phone at all, though
12:54 * masak hates phones
12:55 moritz masak: being woken by a cheerful child isn't all that bad; it's when they're screaming that the un-fun starts
12:55 masak moritz: agreed. screaming: not as fun.
12:55 jnthn Things I don't use my smartphone for much: phone calls :)
12:55 moritz especially since daughter no. 2 currently thinks that seeing her daddy makes her situation worse, not better
12:56 masak phone calls, also known as "unsolicited requests for instantaneous communication by analog audio"
12:56 moritz ... without a proper spam filter
12:56 masak moritz: oh? it's, like, a phase?
12:56 moritz masak: I hope so :-)
12:57 masak :) :/
12:58 masak $cherub always brightens up when daddy materializes. I kinda enjoy that.
12:58 lizmat All tests successful.
12:58 lizmat Files=1073, Tests=50172, 236 wallclock secs (13.14 usr  3.91 sys + 1438.40 cusr 136.73 csys = 1592.18 CPU)
12:59 lizmat of course, the telemarketeer thought it was 10:30 am, but still....  :-)
13:00 lizmat m: say True.pick  # this is a bug, right ?
13:00 camelia rakudo-moar f3e960: OUTPUT«Cannot call pick(Bool: ); none of these signatures match:␤    (Bool:U $: *%_)␤    (Bool:U $: $n, *%_)␤  in block <unit> at /tmp/lUZCd0b9kD:1␤␤»
13:00 lizmat m: say False.pick  # and this
13:00 camelia rakudo-moar f3e960: OUTPUT«Cannot call pick(Bool: ); none of these signatures match:␤    (Bool:U $: *%_)␤    (Bool:U $: $n, *%_)␤  in block <unit> at /tmp/M8tdyb_l5f:1␤␤»
13:00 ilmari m: say Boo.pick
13:00 camelia rakudo-moar f3e960: OUTPUT«5===SORRY!5=== Error while compiling /tmp/llODY5txtM␤Undeclared name:␤    Boo used at line 1␤␤»
13:00 ilmari m: say Bool.pick
13:00 camelia rakudo-moar f3e960: OUTPUT«False␤»
13:00 jnthn m: enum A <b c>; say A.pick
13:00 camelia rakudo-moar f3e960: OUTPUT«b␤»
13:00 lizmat yea, that works
13:00 jnthn m: enum A <b c>; say b.pick
13:00 camelia rakudo-moar f3e960: OUTPUT«(b)␤»
13:01 lizmat it only blows on True/False
13:01 jnthn Yeah, thing so, but I suspect it may go away once nine++'s "make bool more of an enum" work lands
13:01 jnthn *think
13:01 lizmat ah, didn't know he was doing that
13:01 lizmat can we do that, though?
13:01 lizmat I mean, Bool being something from BOOTSTRAP ?
13:01 jnthn Apparently, given his branch has got most of the way there ;)
13:02 jnthn Like most bootstrapping things, it's possible, but you'll probably bash your head against the problem for a while. :)
13:06 lizmat m: sub a(--> True) { 42 }; say a   # this is not an error, or a bug, but a feature ?
13:06 camelia rakudo-moar f3e960: OUTPUT«True␤»
13:06 DrForr_ lizmat: Did you get out of FRA?
13:06 lizmat DrForr_: yes, on just about the *only* LH flight out of FRA
13:07 loren joined #perl6
13:07 timotimo it's a feature as far as i know, lizmat
13:07 lizmat is it a new feature?  it's new to me  :-)
13:07 loren evening, #perl6..
13:07 timotimo i think it's half a year old
13:07 lizmat ok, must have missed the memo.  Cool!
13:08 timotimo :)
13:08 timotimo i think mister toady built it in
13:08 lizmat so this works on Bool / Nil only, right ?
13:08 masak lizmat: I'd say it's a bug that it doesn't fail at runtime.
13:08 lizmat m: sub a(--> True) { 0 }; say a   #
13:08 camelia rakudo-moar f3e960: OUTPUT«True␤»
13:08 jnthn m: sub answer(--> 42) { }; say answer
13:08 camelia rakudo-moar f3e960: OUTPUT«42␤»
13:09 timotimo masak: i think annotating with a value overrides the "return last value of block" thing
13:09 lizmat m: sub a(--> Int) { 42 }; say a   #
13:09 camelia rakudo-moar f3e960: OUTPUT«42␤»
13:09 lizmat doesn't look like it ?
13:09 jnthn masak: If you put a concrete value there, you're saying "use this as the return value"
13:09 timotimo that's not a value, that's a type :)
13:09 masak er.
13:09 masak is that in the spec?
13:09 jnthn masak: If you put a type there, you're saying "check it against this type"
13:09 jnthn Yes
13:09 masak ok, then.
13:09 jnthn Because there's tests for it. :)
13:10 masak heh :)
13:10 lizmat aha, it's the concreteness
13:10 jnthn Think TimToady++ implemented it.
13:10 masak my intuition goes against it, mostly because I think of the signature as more declarative than that.
13:10 masak but I'll accept it and see what happens ;)
13:10 jnthn You're declaring the return value :)
13:11 lizmat m: sub a(--> True) { fail }; say a   #
13:11 camelia rakudo-moar f3e960: OUTPUT«Failed␤  in sub a at /tmp/MZX0gma02P:1␤  in block <unit> at /tmp/MZX0gma02P:1␤␤Actually thrown at:␤  in block <unit> at /tmp/MZX0gma02P:1␤␤»
13:11 lizmat m: sub a(--> True) { Failure.new }; say a   #
13:11 camelia rakudo-moar f3e960: OUTPUT«Failed␤  in block <unit> at /tmp/u6vRAPTGik:1␤␤Actually thrown at:␤  in sub a at /tmp/u6vRAPTGik:1␤  in block <unit> at /tmp/u6vRAPTGik:1␤␤»
13:14 masak I think I half-remember the spec commit that went in for this...
13:15 masak and yes, it was part of the whole loops-at-the-end thing.
13:15 lizmat m: sub a(-->Nil) { Any }; say a   # so Nil is considered a concrete value
13:15 camelia rakudo-moar f3e960: OUTPUT«Nil␤»
13:16 masak it's kind of both a concrete value and a type, I guess.
13:16 masak "singleton type"
13:17 kolikov joined #perl6
13:17 kolikov Hi Perl6 !
13:18 masak hiya kolikov!
13:21 kaare_ joined #perl6
13:21 stmuk "Type check failed in binding <anon>; expected Match but got Nil" has anyone seen an error like that in a simple regexp match?
13:22 kolikov I want to submit a modue ... Am I knocking at the right door ?
13:22 moritz stmuk: sounds more like trying to assign the result of the match, but the match failed (thus returning Nil, not a Match)
13:22 lizmat kolikov: the idea is that you issue a PR to the ecosystem repo
13:22 moritz kolikov: open a pull request against perl6/ecosystem; see http://doc.perl6.org/language​/modules#Distributing_Modules for more details
13:23 lizmat moritz++ # having the right URL handy
13:23 lizmat kolikov++  # for yet another module in the ecosystem!
13:24 sufrostico joined #perl6
13:25 stmuk moritz: I think its in $x ~~ m/^<alpha>/ based on commenting lines
13:25 stmuk and I can't simply reproduce it
13:26 rurban joined #perl6
13:26 kolikov @moritz I have already a git repo here : https://github.com/kolikov/p​erl6-Lingua-EN-Conjugate.git ... what's next ?
13:26 [Coke] (//0.30000000000000004.com/) lot of languages giving 0.3 there.
13:27 rurban the perl example should be 0.1 + 0.2, not printf
13:27 rurban left #perl6
13:28 Skarsnik kolikov, fork perl6/ecosystem, add your module to the Meta.list, commit and make a pull request on the base perl6/ecosystem
13:29 dalek rakudo/nom: cc1ba30 | lizmat++ | src/core/Enumeration.pm:
13:29 dalek rakudo/nom: Streamline Enumeration a bit
13:29 dalek rakudo/nom:
13:29 dalek rakudo/nom: Put in separate candidates for pick/roll
13:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc1ba3047a
13:30 kolikov @Skarsnik Thanks ... still struggling with github, may take time ... hope not more than coding the module ! :)
13:33 vendethiel joined #perl6
13:33 [Coke] m: say "RT: 1049; XMAS: 49; NOM: 8; GLR: 7; JVM: 56; LTA: 88; Need to fix { 49 / 33 } bugs a day until XMAS";
13:33 camelia rakudo-moar f3e960: OUTPUT«RT: 1049; XMAS: 49; NOM: 8; GLR: 7; JVM: 56; LTA: 88; Need to fix 1.484848 bugs a day until XMAS␤»
13:33 [Coke] jnthn++, down from 1.6 or so a day. :)
13:34 DrForr_ kolikov: There's a "pull requests" link on the right-hand sidebar in the project view, click on that and then 'New pull request'.
13:37 virtualsue joined #perl6
13:38 kolikov @DrForr: So I make my pull from here: https://github.com/ugexe/Perl6-ecosystems (perl6 ecosystem)
13:41 raiph joined #perl6
13:43 stmuk oh it is Nil in a match .. has this behaviour changed?
13:44 timotimo i'm kind of scared that it's only 33 days until christmas
13:44 timotimo so much left to do in the general ecosystem or rather tooling
13:52 dalek doc: 5380cbf | (Steve Mynott)++ | bin/p6doc-index:
13:52 dalek doc: apparently fix cannot build index #184
13:52 dalek doc: review: https://github.com/perl6/doc/commit/5380cbfd53
13:52 vytas I think someone could step up ( as Jonathan did for perl6 ) and list most important missing ecosystem parts. I mean I am interested in providing a module while learning, and obviously i would not start with DBI, but maybe I am missing some interesting low hanging fruit
13:52 DrForr_ There's a "most wanted" page somewhere.
13:53 vytas DrForr_, right, didn't know that
13:53 timotimo https://github.com/perl6/perl6-most-wanted
13:53 timotimo also the WANTED document inside perl6/doc
13:54 timotimo https://github.com/perl6/doc/blob/master/WANTED
13:55 zengargoyle good * #perl6
13:55 timotimo hey zengargoyle
13:55 timotimo modules from the ecosystem are also generally not terribly well documented, which is also A Thing that wants fixed
13:56 lizmat breakfast&
13:57 vytas https://github.com/perl6/perl6-most-wan​ted/blob/master/most-wanted/modules.md lists only very few moduels and many has WIP tag. arguably things like ping protocol etc. is not that important
13:57 stmuk I think the problem with ecosystem docs is that people use markdown rather than either p6 pod or p5 pod
13:57 zakharyas joined #perl6
13:58 zengargoyle for myself, documentation of first module was put off by not knowing which parts of POD6 actually worked and not wanting to get it wrong.
13:59 stmuk App::ecoreadme is a simple work around :)
13:59 zengargoyle recently i've been using mi6 which helps with a template and README.md generation
14:00 timotimo e core ad me?
14:02 psch m: multi f(Int $x) { "Int" }; multi f(Int $x is rw) { "rwInt" }; multi f(int $x is rw) { "rwint" }; say f 5 #...?
14:02 camelia rakudo-moar cc1ba3: OUTPUT«rwint␤»
14:02 psch guess hoelzro++ was right all along yesterday, and it's actually complicated :P
14:03 zengargoyle still wanting to determine which Pod2X modules support what parts.  would like to learn to use the #| and #= type stuff some.
14:03 zengargoyle and haven even tried the =alias stuff
14:04 zengargoyle but sorta don't want to document the long and labor intensive way when the future holds such wow.
14:07 virtualsue joined #perl6
14:08 Ven joined #perl6
14:12 ilogger2 joined #perl6
14:20 pmurias_ joined #perl6
14:25 dalek rakudo/nom: 0418755 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
14:25 dalek rakudo/nom: Fix multi-dispatch failure over non-rw.
14:25 dalek rakudo/nom:
14:25 dalek rakudo/nom: Failure to multi-dispatch should consistently report themselves as
14:25 dalek rakudo/nom: such.
14:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0418755b27
14:50 tokuhiro_ joined #perl6
14:57 dalek rakudo/nom: f6b74c4 | peschwa++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
14:57 dalek rakudo/nom: Micro-opt rwness check.
14:57 dalek rakudo/nom:
14:57 dalek rakudo/nom: We don't really need an array there if we don't care what exactly failed, and
14:57 dalek rakudo/nom: we don't care what exactly failed because we aren't throwing Parameter::RW.
14:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f6b74c43bb
14:57 dalek roast: e1b0e58 | peschwa++ | S06-multi/by-trait.t:
14:57 dalek roast: Include a native rw candidate in rwness-aware MMD.
14:57 dalek roast: review: https://github.com/perl6/roast/commit/e1b0e58c14
14:57 dalek roast: 93736e7 | peschwa++ | S0 (3 files):
14:57 dalek roast: Expect Multi::NoMatch instead of Parameter::RW on multis.
14:57 dalek roast:
14:57 dalek roast: cf. Rakudo commit 0418755.
14:57 dalek roast: review: https://github.com/perl6/roast/commit/93736e7f73
14:58 jnthn psch: Do the tests you added in e1b0e58 already pass?
14:59 RabidGravy joined #perl6
14:59 dalek roast: b0d0779 | peschwa++ | S06-multi/by-trait.t:
14:59 dalek roast: Correct test message.
14:59 dalek roast: review: https://github.com/perl6/roast/commit/b0d0779f3c
14:59 RabidGravy rarr!
14:59 psch jnthn: yes
14:59 jnthn oddness
15:00 jnthn m: multi x(int $x is rw) { 1 }; multi x(Int $x) { 2 }; say x(1)
15:00 camelia rakudo-moar 041875: OUTPUT«1␤»
15:00 psch jnthn: yes, i saw that too
15:00 jnthn That doesn't work
15:00 jnthn Compiling a patch for that at the moment
15:00 psch jnthn: that's again the inlining magic isn't it?
15:00 psch as in, if we actually use the param it inlines differently or somesuch
15:00 psch m: multi x(int $x is rw) { $x; 1 }; multi x(Int $x) { $x; 2 }; say x(1)
15:00 camelia rakudo-moar 041875: OUTPUT«2␤»
15:01 jnthn Yeah but...wtf
15:02 loren joined #perl6
15:02 jnthn It just tried to say "ok, never compile-time multi dispatch if there's an is rw multi candidate"
15:02 jnthn And it still goes off and does it anyway :/
15:02 jnthn huh, and it does it with optimization off?!
15:04 jnthn oh, no, now I busted the other test :/
15:05 psch jnthn: generated protos always pass a capture, which trial_bind always lets through
15:06 psch well, i'm sure about the latter part
15:06 psch not sure about generated protos, actually
15:07 polettix joined #perl6
15:11 AlexDaniel m: has $var
15:11 camelia rakudo-moar f6b74c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2NKELZN3lE␤You cannot declare attribute '$var' here; maybe you'd like a class or a role?␤at /tmp/2NKELZN3lE:1␤------> 3has $var7⏏5<EOL>␤    expecting any of:␤        constraint␤»
15:11 AlexDaniel or maybe I want to use “my” instead? :)
15:12 psch right, Actions.autogenerate_proto adds a single capture proto
15:13 pippo joined #perl6
15:13 jdv79 how can a Seq have been iterated when i just created it 
15:13 jnthn psch: Yeah, I think the issue is that the multi-dispatch analysis is actually picking the wrong candidate.
15:13 * jdv79 wonders 
15:13 psch jnthn: yes, analyze_dispatch can't check the containerness of the argument
15:13 AlexDaniel m: my Int Str $var;
15:13 camelia rakudo-moar f6b74c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QtuQ02LKsB␤Multiple prefix constraints not yet implemented. Sorry. ␤at /tmp/QtuQ02LKsB:1␤------> 3my Int Str7⏏5 $var;␤»
15:13 psch jnthn: 'cause it doesn't get any flags for that
15:13 AlexDaniel wow! It is supposed to work!
15:13 El_Che I am kind of confused by private atributes as explained in http://doc.perl6.org/language/objects#Attributes. I fail to call them from a method in the same class:
15:13 El_Che m class Foo { has $.attr; method run(){ say $.attr } }; my $foo = Foo.new(attr=>'bar'); $foo.run()
15:13 El_Che dmanbar
15:13 El_Che damn
15:14 El_Che I mean:
15:14 El_Che m: class Foo { has $.attr; method run(){ say $.attr } }; my $foo = Foo.new(attr=>'bar'); $foo.run()
15:14 camelia rakudo-moar f6b74c: OUTPUT«bar␤»
15:14 El_Che so that ok, but this:
15:14 jnthn m: multi x(int $x is rw) { 1 }; multi x(Int $x) { 2 }; my int $i = 1; say x 1
15:14 camelia rakudo-moar f6b74c: OUTPUT«1␤»
15:14 El_Che m: class Foo2 { has $!attr; method run(){ say $!attr } }; my $foo = Foo2.new(attr=>'bar'); $foo.run()
15:14 camelia rakudo-moar f6b74c: OUTPUT«(Any)␤»
15:14 jnthn psch: I've got a patch making ^^ be 2 locally
15:15 jnthn psch: Without breaking type.t and by-trait.t in S06-multi
15:15 El_Che so a method in the same class can not use a private attribute? It looks like I do something wrong
15:15 kolikov Ok done comit for Lingua::EN::Conjugate ... Note:  Perhaps it would bee good to add this link: https://github.com/perl6/ecosystem to http://doc.perl6.org/language/modules  ?
15:15 psch jnthn: neat.  i couldn't figure that out, mostly got stuck in Optimizer.analyze_args_for_ct_call
15:15 jnthn Took me a couple of goes...
15:15 jnthn Will have to spectest it
15:15 psch well, i'm curious to see it :)
15:16 jnthn Added it to S06-multi/by-trait.t too
15:16 RabidGravy El_Che, if you want the constructor to be able to set the private attributes then you need to provide a BUILD method.  They are after all "private"
15:17 El_Che so private does not mean class private
15:17 kolikov My wrong, link already there ... friday 13th is a bad day for me :(
15:17 rindolf joined #perl6
15:18 jnthn El_Che: You can't set privates using the default constructor
15:18 jnthn Ah, RabidGravy was faster
15:19 El_Che jnthn: thx
15:19 El_Che sorry for the silly question. Just going through the doc while rewriting some code to p6
15:19 RabidGravy El_Che :
15:19 RabidGravy m: class F { has $!foo; submethod BUILD(:$!foo) { }; method say-foo() { say $!foo } }; F.new(foo => "boom").say-foo
15:19 camelia rakudo-moar f6b74c: OUTPUT«boom␤»
15:19 polettix joined #perl6
15:20 jnthn El_Che: The design guide for $!foo attrs is that you should be able to rename any of them inside of the class, and not break anything.
15:20 El_Che it makes senseeeeeeee
15:20 El_Che oops
15:20 El_Che minus some e s
15:20 El_Che thx for the code, RabidGravy
15:21 sprocket joined #perl6
15:22 RabidGravy but my dumb way of looking at is that the new() is called on the type object and the setting of the attributes is done on a newly created object, so in the context of the constructor they are still private
15:24 RabidGravy the BUILD submethod is called on the newly created object so (being the same object) the method is "internal" so you can set the private attributes
15:24 El_Che Don't you declare something prive (e.g. in other languages), to *use* in the same class? The empty submethod feels like some extra plumbing
15:24 El_Che (looking at it from a user's point of view)
15:25 RabidGravy using the private attribute name in the signature is the special sauce there
15:25 moritz actually not special
15:25 moritz it just falls out of signature binding
15:25 softmoth_ joined #perl6
15:26 zengargoyle the BUILD submethod keeps you from having to write a new and worrying about super classes and such.
15:27 jnthn El_Che: The problem isn't your using the private thing in the class, it's expecting the default constructor will let it be set from the outside.
15:29 pippo m: grammar G {rule TOP { ^^<one> <two> <three>$$}; rule one {one}; rule two {two}; rule three {three}}; say G.parse("one two three").values;
15:29 camelia rakudo-moar f6b74c: OUTPUT«(「two」 「three」 「one」)␤»
15:29 RabidGravy anyway on a completely different note, I had the first Shepherd & Neame Christmas Ale of the year just now, last couple of years they've made a rather wussy one in the "session beer" category, but this one is back to normal at a proper full-blooded 7% :)
15:30 pippo ^^ that was returning them in the order they were put in TOP rule. What has changed now?
15:30 psch pippo: the order should never have been reliable there
15:31 psch pippo: it's a hash, and those only accidentally are ordered sometimes
15:31 pippo psch: It was until recently. sigh!
15:31 psch m: grammar G {rule TOP { ^^<one> <two> <three>$$}; rule one {one}; rule two {two}; rule three {three}}; say G.parse("one two three").caps>>.value # gives them ordered by .from
15:31 camelia rakudo-moar f6b74c: OUTPUT«(「one」 「two」 「three」)␤»
15:32 RabidGravy If you want the order to be reliable you need to create an action class that has a means to stash them away in the order they are seen
15:32 timotimo hashes used to be implemented with some extra code to provide ordering in MoarVM, but that code was ripped out quite some time ago
15:32 psch we still have a few tests that only fail because of hash ordering :/
15:32 timotimo so they were ordered, but not because we wanted them to, just because that's what the implementation for hashes we used had
15:32 lichtkind joined #perl6
15:33 pippo psch: TY! I'll use caps as in your ex.
15:33 timotimo "we"?
15:33 * RabidGravy checks
15:33 dalek ecosystem: f9e057a | kolikov++ | META.list:
15:33 dalek ecosystem: Please Add Lingua::EN::Conjugate
15:33 dalek ecosystem:
15:33 dalek ecosystem: See https://github.com/kolikov/p​erl6-Lingua-EN-Conjugate.git
15:33 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f9e057a3a3
15:33 RabidGravy nope nothing to do with me ;-)
15:33 dalek ecosystem: 701c89b | (Steve Mynott)++ | META.list:
15:33 dalek ecosystem: Merge pull request #91 from kolikov/kolikov-add1
15:33 dalek ecosystem:
15:33 dalek ecosystem: Please Add Lingua::EN::Conjugate
15:33 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/701c89be92
15:34 psch r: my @a; @a[0]:zip:zop # this, S32-array/adverbs.t
15:34 camelia rakudo-jvm f6b74c: OUTPUT«2 unexpected named arguments passed (zip, zop)␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:34 camelia ..rakudo-moar f6b74c: OUTPUT«Unexpected named parameter 'zip' passed␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:34 psch although moar here throws only one unexpected named...
15:34 dalek rakudo/nom: c96dedd | jnthn++ | src/Perl6/ (2 files):
15:34 dalek rakudo/nom: Fix rw handling in compile time dispatch.
15:34 dalek rakudo/nom:
15:34 dalek rakudo/nom: We could accidentally let literals match an `is rw`.
15:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c96deddc2a
15:35 jnthn psch: We tend to bail on first problem.
15:37 dalek roast: b738dd0 | jnthn++ | S06-multi/by-trait.t:
15:37 dalek roast: Test for a `is rw` dispatch bug.
15:37 dalek roast: review: https://github.com/perl6/roast/commit/b738dd0c43
15:38 psch m: my @a; @a[*]:kv:zip:zop # ah here
15:38 camelia rakudo-moar f6b74c: OUTPUT«2 unexpected adverbs (zip zop) and unsupported combination of adverbs (kv) passed to slice on @a␤  in block <unit> at /tmp/94tTRpNONO:1␤␤Actually thrown at:␤  in block <unit> at /tmp/94tTRpNONO:1␤␤»
15:38 psch ah, but we sort those now in X::Adverb
15:39 psch so yeah, the test got corrected that way and doesn't actually fail anymore
15:39 jnthn OK, I think we've got is rw in multi dispatch in good enough shape
15:39 * jnthn had hoped that'd be "review patches, apply, close ticket" :)
15:40 psch ...i tried :P
15:41 dalek rakudo/nom: f0c6a02 | lizmat++ | src/core/ (4 files):
15:41 dalek rakudo/nom: Get some crazy optimizations, timotimo++
15:41 dalek rakudo/nom:
15:41 dalek rakudo/nom: http://irclog.perlgeek.de/m​oarvm/2015-11-13#i_11531889
15:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0c6a02c5f
15:41 * zengargoyle bit again by the 'hit space and loose your place' feature of the docs.
15:42 jnthn psch: You got it much of the way :-)
15:43 jnthn RT resolved
15:43 psch jnthn: yeah, things like the opt you made of my moar patch i'm ok with not having known in advance...
15:43 jnthn psch++ # helping get another xmas RT nailed
15:43 psch similarly with the literal stuff
15:43 sprocket hello #perl6!
15:43 rurban joined #perl6
15:45 sprocket i’m wondering if there might be somewhere i could submit a nifty perl6 article to in the next couple weeks.  i’m using p6 and a raspberry pi to run my greenhouse irrigation controller (ie. turning on/off water in different zones, turning on/off heating, monitoring water usage, detecting leaks/blockages)
15:46 psch sprocket: perl6advent would be nice i guess
15:46 jnthn sprocket: Wow, cool! :)
15:46 dalek ecosystem: 799f586 | (Zoffix Znet)++ | server/updatelist.pl:
15:46 dalek ecosystem: Handle "https.git" case in URL normalization
15:46 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/799f58628e
15:47 jnthn Yes, that would make an excellent advent calendar post.
15:47 PerlJam indeed
15:47 sprocket just to give myself a deadline, when does the advent start up? :)
15:47 PerlJam sprocket: Advent is Dec 1 - Dec 24
15:47 colomon sprocket: Dec 1st, natch
15:47 sprocket great, ok
15:48 sprocket i’ll follow up closer to the date then :)
15:48 PerlJam sprocket: do you have a wordpress account?
15:48 colomon sprocket++
15:48 psch sprocket: pick a date between 2nd dec and 25th dec, that's your publishing date :P
15:48 PerlJam sprocket: if not, give me an email address I can send the invite to
15:49 dalek modules.perl6.org: 974451a | (Zoffix Znet)++ | web/lib/P6Project/Info.pm:
15:49 dalek modules.perl6.org: Handle "https.git" case in URL normalization
15:49 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/974451af54
15:49 jdv79 sprocket: how long does it take to compile?
15:50 sprocket start up take a loooong time
15:50 sprocket (or are we talking compiling rakudo?)
15:50 Ven joined #perl6
15:51 PerlJam sprocket: (wordpress account for the Perl6 advent calendar that is)
15:51 RabidGravy sprocket, I was meaning to ask you - does your RPi module enable I2C over the gpio or would one need to make something over the top of it>
15:52 sprocket rabidgravy: that’s coming, i’d just got the bare bones going for what i’d needed
15:52 RabidGravy I'd like to make a P6 version of my Device::PiLite module but am aftaid of the yaks
15:53 RabidGravy cool, cause I gotta have my blinken lights
15:54 ZoffixW joined #perl6
15:54 [Coke] We should probably start soliciting advent posts in general. about that time.
15:54 ZoffixW zengargoyle, what do you mean 'hit space and loose your place'?
15:54 ZoffixW zengargoyle, where, on the docs.perl6.org?
15:54 RabidGravy actually it's not PiLite that uses the i2c that's serial it's the other thingy with the spiral arms of multi-coloured LEDs
15:54 jdv79 compiling rakudo.  but now that you mention it what is the startup delay?
15:54 ZoffixW [Coke], I was only joking about DBD::CSV BTW :) And nice to see someone started Text::CSV. I don't think it was there just a few weeks ago.
15:55 RabidGravy Device::PiGlow
15:55 sprocket jdv79: in terms of compiling rakudo, i don’t recall - i just let it do its thing in the background and went to have dinner, or some other task :)
15:55 |Tux| ZoffixW, I started in October 2014
15:55 sprocket jdv79: let me fire up to test the start up delay
15:56 Calibellus joined #perl6
15:56 jdv79 i thought it was running your greebnhouse or something
15:56 [Coke] Use of Nil in numeric context  in method new at /Users/williamcoleda/perl6/share/p​erl6/site/lib/HTTP/Response.pm6:27
15:56 ZoffixW |Tux|, 0.o hm... what I recall seeing is a mention that Text::CSV is needed and me thinking "man, that would be a large project, so not for me"... Maybe I'm thinking of some other language heh
15:57 sprocket jdv79: it is; i have another pi on my desk right here that i use or dev/testing
15:57 |Tux| define *large* :)
15:58 sprocket jdv79: 0m48.905s for start up
15:58 zengargoyle ZoffixW: it's that the Search box is selected by default.  if you're scrolling through reading docs and then hit space for the next page, BAM you're back at the top of the page with a space in the Search box and a dropdown of all the entries with a space in them.
15:58 ZoffixW |Tux|, well, P5's Text::CSV_XS has tests that run for like 2 minutes and many of them are about all sorts of edge cases :) Not something I'd want to deal with :P
15:58 ZoffixW zengargoyle, aha! I can fix that :)
15:59 [Coke] mmm. I think my original request of "/" to focus on the search box is better, and used on many sites these days. :| The autofocus was a compromise on that.
15:59 zengargoyle i don't know if it's just me, or maybe everybody else expects/likes the Search activated...
15:59 * psch doesn't like pages autofocusing textboxes
15:59 PerlJam Coke++  I'd rather "/" to focus as well.
15:59 ZoffixW [Coke], I'm gonna de-focus it if the user scrolls down a bit
16:00 zengargoyle brilliant
16:00 zengargoyle ZoffixW++
16:00 ZoffixW What sites use "/" to focus stuff? First time I hear of that.
16:00 psch i'd also dislike '/' for searchbox focus, 'cause i use that instead of F3 for searching on the page
16:01 zengargoyle well firefox automatically uses / to search in page.
16:02 hoelzro o/ #perl6
16:02 |Tux| CSV.pm has 1663 lines, the current test suite 2747 lines
16:03 RabidGravy someone who remembers Lotus 1-2-3 probably thought of that / thing
16:05 AlexDaniel Oh, by the way, is it possible to add search query #like_this?
16:05 zengargoyle joined #perl6
16:05 jnthn m: use Test; class A { multi method foo($a) { "general" }; multi submethod foo(Str $a) { "specific" } }; class B is A { }; is B.new.foo("OH HAI"), 'general', 'multi submethod ignored on call on subclass';
16:05 camelia rakudo-moar f0c6a0: OUTPUT«not ok 1 - multi submethod ignored on call on subclass␤␤# Failed test 'multi submethod ignored on call on subclass'␤# at /tmp/EOJfqi2IHz line 1␤# expected: 'general'␤#      got: 'specific'␤»
16:05 AlexDaniel so that you can link it this way: http://modules.perl6.org/#test
16:06 sufrostico joined #perl6
16:06 ZoffixW AlexDaniel, that's already implemented in the mojo-app branch
16:06 ZoffixW http://modules.perl6.org/q/test
16:07 ZoffixW AlexDaniel, I plan to have it ready sometime this weekend.
16:07 RabidGravy anchors would be cool though too
16:08 kjs_ joined #perl6
16:08 ZoffixW RabidGravy, what for?
16:09 kjs_ m: say .1 + .2
16:09 camelia rakudo-moar f0c6a0: OUTPUT«0.3␤»
16:09 RabidGravy for sharing the link without having to do a query or anything
16:09 kjs_ time to add an entry for Perl 6 to http://0.30000000000000004.com/
16:10 RabidGravy it would be trivial to add an anchor to each row
16:10 skids joined #perl6
16:10 ZoffixW .oO( PHP does it right? 0.o )
16:10 kjs_ ZoffixW: see the footnote ;-)
16:10 ZoffixW RabidGravy, yeah and about 6KB of markup :P
16:10 kjs_ PHP converts 0.30000000000000004 to a string and shortens it to "0.3".
16:11 ZoffixW RabidGravy, I rather use the "query thing" that will show a single module instead of linking to one that might not even end up at the top.
16:12 RabidGravy I actually have no strong opinion on the matter
16:12 Ven joined #perl6
16:13 AlexDaniel kjs_: are you going to do this? :)
16:13 kjs_ AlexDaniel: there’s already a pull request for the P6 version i see
16:14 AlexDaniel kjs_: it is not mergeable though
16:14 kjs_ 11 other pull requests - getting a lot of attention from redditers i think
16:14 AlexDaniel ah right, 27 minutes ago
16:14 kjs_ i’d say they’re on top of it
16:15 AlexDaniel attention from redditers? That's a really old website…
16:15 ZoffixW There are actually 2 PRs for P6 :) #11 and #44 They went through 33 Issues/PRs in 6 hours 0.o
16:15 kjs_ hadn’t seen it before
16:18 Skarsnik hm I was looking at adding write support on Config::INI. how about rewrite it to be like http://search.cpan.org/~rsavage/Co​nfig-Tiny-2.23/lib/Config/Tiny.pm ; basicly it give an object that act like a hash of hash where you can call .read and .write to read/write the file
16:19 dalek rakudo/nom: bbad114 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
16:19 dalek rakudo/nom: Multi submethods should not "inherit".
16:19 dalek rakudo/nom:
16:19 dalek rakudo/nom: There were a few ways we could have implemented this. The solution in
16:19 dalek rakudo/nom: this patch is to require an exact type match on the invocant in the
16:19 dalek rakudo/nom: dispatcher. Since the cache does exact type matching, this works out
16:19 dalek rakudo/nom: fine in that case also.
16:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bbad114584
16:19 dalek roast: 1d7f6cb | jnthn++ | S12-methods/multi.t:
16:19 dalek roast: Unfudge test for RT #74646.
16:19 dalek roast: review: https://github.com/perl6/roast/commit/1d7f6cbb61
16:19 Ven jnthn++
16:19 khw joined #perl6
16:20 jnthn That was another xmas one
16:20 jnthn Nicely under 50 now
16:20 RabidGravy Skarsnik, sounds good, do it.
16:21 tadzik Skarsnik: well, Config::INI has write support
16:23 jdv79 whatsup wit self.?foo being ok while $.?foo throws with something about $. and .ins on a fh?
16:23 RabidGravy but Associative support would be cool, just easier to write ;-)
16:23 Skarsnik oh there is an Writer.pm I did not see
16:23 jdv79 self. and $. aren't equivalent?
16:24 dalek rakudo/nom: 3bbc922 | lizmat++ | src/core/Any-iterable-methods.pm:
16:24 timotimo jdv79: that's because .? is a method call feature and $.foo isn't a method call
16:24 dalek rakudo/nom: Make List.sort 30% faster
16:24 dalek rakudo/nom:
16:24 dalek rakudo/nom: And also not lazy: the thing is that there is little point in laziness
16:24 dalek rakudo/nom: on the result of a sort: all data is in memory already, so making things
16:24 dalek rakudo/nom: lazy just adds overhead.  The only case this is slower, is for the
16:24 dalek rakudo/nom: sink-all and count-only iterator cases.  But if you doing a sort in
16:24 dalek rakudo/nom: sink context, or counting number of elements in a sort, you're doing it
16:24 dalek rakudo/nom: wrong anyway.
16:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3bbc922269
16:24 SmokeMachine excuse me, just a question: is there any plan (or is it already being done) to make perl6 runs on iOS devices?
16:24 moritz SmokeMachine: I know of no such plans
16:24 lizmat SmokeMachine: perhaps when we have a javascript backend
16:25 lizmat and then in a browser  :-)
16:25 timotimo lizmat: sorry, you referred to crazy optimizations for ++$i vs $i++, but i was actually looking at the wrong numbers and there is exactly no speedup :(
16:25 zengargoyle jdv79: i think that's a case of trying to catch Perl5-isms
16:25 jdv79 what is $.foo then?  i thought $!foo was the var.
16:25 RabidGravy iOS doesn't support native applications at all?
16:25 jdv79 zengargoyle: the error message makes that much clear:)
16:25 lizmat timotimo: but will there be in the future ?
16:26 timotimo lizmat: probably not the near future :(
16:26 timotimo lizmat: if i can't make it work by myself, it'll have to wait until next year
16:26 SmokeMachine lizmat: no way to compile rakudo, or another compiler, for iOS? maybe moarVM on iOS...
16:26 jnthn In the long run, we'll probably spot when postfix ++ was used and prefix ++ was sufficient and end up with the same code
16:26 zengargoyle more specifically, sometimes the checking is overly eager.
16:27 lizmat jdv79:  $.foo is just short for self.foo   (and it interpolates :-)
16:27 zengargoyle there's probably not a case for 'method that starts with ?' in there so it hits the '$.' is perl 5 first.
16:27 lizmat SmokeMachine: not unless you jailbreak it, I would think, knowing Apple's guidelines for app development
16:27 ugexe ive had instance where $.foo fixes errors caused by self.foo in JVM
16:28 RabidGravy SmokeMachine, is there a way of compiling and installing native applications for iOS?  If so it's try a cross-compile and see how it goes.
16:28 ugexe notable where .foo is a method on a class, and some role is reference foo via $.foo or self.foo
16:28 SmokeMachine RabidGravy: I am not a iOS developer, but you can use objective-c on iOS, objective-c is just a super-set of c... so, I think that could be possible, am i right?
16:28 lizmat timotimo jnthn : but ++nativeint should at one point in the future just become an INC machine op, no ?
16:29 jnthn lizmat: Yeah
16:29 SmokeMachine lizmat: I mean... there are a python interpreter for iOS... (pythonista)
16:29 lizmat SmokeMachine: from the app store ?
16:29 SmokeMachine yes!
16:29 RabidGravy SmokeMachine, haven't the faintest idea, maybe try compiling it with the cross compiler and see what happens
16:30 SmokeMachine lizmat: https://itunes.apple.com/en/ap​p/pythonista/id528579881?mt=8
16:31 AlexDaniel how can I print the name of the current sub? I mean, the sub that I'm in?
16:31 RabidGravy I'm sure if someone cares enough at some point it might happen
16:31 RabidGravy $?ROUTINE.name or something?
16:31 psch m: sub f { &?ROUTINE.name.say }; f #
16:31 camelia rakudo-moar 3bbc92: OUTPUT«f␤»
16:32 psch RabidGravy: the sigil!
16:32 lizmat SmokeMachine: I'm pleasantly surprised
16:32 stmuk was there a META.info lint type program?
16:32 lizmat but alas, nobody yet working on such a beast afaik
16:32 RabidGravy THE SIGILS! THE SIGILS!
16:32 RabidGravy stmuk, I made Test::META for just this purpose
16:33 * lizmat imagines a sequel to PIXELS
16:33 zengargoyle and sometimes &ROUTINE doesn't quite work (already rakudobug'd i believe)
16:33 stmuk I thought I saw something about it!
16:33 SmokeMachine lizmat: and it is used too on a great text editor: https://itunes.apple.com/us/a​pp/editorial/id673907758?mt=8 (from the same developer)
16:33 AlexDaniel hehe
16:34 RabidGravy it may need some features but it checks basic things like does it parse, does it have the required fields, does what it say in provides: actually exist
16:34 SmokeMachine I am watching lots of non programmers learning python only to automate iOS stuff with pythonista and editorial...
16:34 AlexDaniel I'm not sure if camelia is going to show this beauty…
16:34 AlexDaniel m: sub test { BEGIN { say &?ROUTINE.name } }
16:35 camelia rakudo-moar 3bbc92: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xOLiW1xNqN␤An exception occurred while evaluating a BEGIN␤at /tmp/xOLiW1xNqN:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Cannot call method 'name' on a null object␤  at :␤»
16:35 AlexDaniel nested SORRY!
16:35 RabidGravy which is cool and fun and all but hey ;-)
16:36 AlexDaniel I also like how it prints the line number
16:36 AlexDaniel “at :”
16:37 SmokeMachine lizmat: so, do you think that it is possible to port perl6 to iOS?
16:37 lizmat technically, I don't have a doubt
16:37 lizmat Apple policy wise, I'm not so sure  :-(
16:38 * lizmat hopes to be wrong in that respect
16:38 SmokeMachine lizmat: but way would they accept python but perl6?
16:38 Skarsnik tadzik, should I write a new module to have a more oo thing or maybe rewrite your module?
16:38 RabidGravy and "anyone wanting it done enough to make it happen"-wise I have have a doubt
16:38 lizmat SmokeMachine: Apple's rulings are not known to be very consistent
16:41 SmokeMachine lizmat: don't you think that it would worth?
16:41 SmokeMachine lizmat: don't you think that try it would worth?
16:41 lizmat yes, I think it's definitely worth a try!
16:41 lizmat SmokeMachine: so if you're up to it, I would say: go for it!
16:42 RabidGravy Skarsnik, I'd go with providing an alternative interface to the same module
16:43 SmokeMachine lizmat: how do you think that should wort? What should be ported? the VM should be ported?
16:43 grondilu m: my Array[Real] @a; @a[1] = pi  # not sure if that's ok
16:43 camelia rakudo-moar 3bbc92: OUTPUT«Type check failed in assignment to @a; expected Array[Real] but got Num␤  in block <unit> at /tmp/_Q7ycL5pfU:1␤␤»
16:43 timotimo lizmat: could you revert the commit for ++$foo ?
16:43 lizmat timotimo: sure, but why ?
16:44 SmokeMachine *work
16:44 * grondilu understands his mistake
16:44 RabidGravy I.E. rewrie the innards to use a single OO design, but retain the existing interface and provide a new OO type interface
16:44 hankache joined #perl6
16:44 Skarsnik RabidGravy, actually it's a module that export stuff, not a class. So there will be a long name or somthing for the OO class
16:44 RabidGravy sure
16:45 timotimo lizmat: because it's woefully slow
16:45 lizmat so I made it worse ?
16:45 timotimo i believe so. let me check
16:45 timotimo m: my int $i = 0; while ++$i < 10_000_000 { }; say now - INIT now
16:45 camelia rakudo-moar 3bbc92: OUTPUT«5.747536␤»
16:46 timotimo m: my int $i = 0; while ($i = $i + 1) < 10_000_000 { }; say now - INIT now
16:46 dalek rakudo/nom: b627af6 | jnthn++ | src/ (2 files):
16:46 camelia rakudo-moar 3bbc92: OUTPUT«0.0569592␤»
16:46 dalek rakudo/nom: Implement nextcallee.
16:46 dalek rakudo/nom:
16:46 dalek rakudo/nom: Allows you to grab one callee from the current dispatch iterator and
16:46 dalek rakudo/nom: call it many times (callsame moves you through the iterator in a
16:46 dalek rakudo/nom: destructive way).
16:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b627af6410
16:46 timotimo yeah, a factor of 100
16:46 PerlJam grondilu: I dunno ... looks like a bug to me.  You're assigning to an individual element of the array (granted, you get the type wrong), but why would it complain that it's looking for Array[Real]  rather than just Real?
16:47 dalek rakudo/nom: 019a7ff | lizmat++ | src/core/ (4 files):
16:47 dalek rakudo/nom: Revert "Get some crazy optimizations, timotimo++"
16:47 dalek rakudo/nom: This reverts commit f0c6a02c5fc88c45a95375a096467cc021dad3b4.
16:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/019a7ff7ac
16:47 timotimo pff, i got a ++ for the revert, too. shameful!
16:47 jesper_ joined #perl6
16:47 lizmat timotimo: too bad  :-)
16:47 PerlJam m: my Array of Num @a;  @a[0] = pi;
16:47 camelia rakudo-moar 3bbc92: OUTPUT«Type check failed in assignment to @a; expected Array[Num] but got Num␤  in block <unit> at /tmp/W8j3eVLp4x:1␤␤»
16:48 telex joined #perl6
16:49 psch m: my @a of Num; @a[0] = pi
16:49 camelia rakudo-moar 3bbc92: ( no output )
16:50 dalek roast: d88edec | jnthn++ | S12-methods/defer-call.t:
16:50 dalek roast: Some tests for RT #125783.
16:50 dalek roast: review: https://github.com/perl6/roast/commit/d88edec2f3
16:50 pyrimidine joined #perl6
16:50 PerlJam oh, it's "doubling" the Array?  once because of the @ and once because I said Array?
16:51 grondilu PerlJam: I think it's the @ sigil.  my Foo @ is always an array of Foos.
16:51 grondilu so my Array[Real] @ is an array of Array[Real]
16:51 timotimo that's right
16:51 Ven joined #perl6
16:52 grondilu but then I'm not sure how I create an Array[Real]
16:52 PerlJam aye.  Looks like I made the same mistake you did :)
16:52 psch m: my Real @a; @a.WHAT.say; my @b of Real; @b.WHAT.say
16:52 camelia rakudo-moar 019a7f: OUTPUT«(Array[Real])␤(Array[Real])␤»
16:52 lizmat m: my Real @a; @a[0] = 1
16:52 camelia rakudo-moar 019a7f: ( no output )
16:52 lizmat m: my Real @a; say @a[0].WHAT
16:52 camelia rakudo-moar 019a7f: OUTPUT«(Real)␤»
16:53 timotimo tony-o: should we throw JSON::Faster out of the ecosystem now that JSON::Fast has it?
16:53 tadzik Skarsnik: you may want to use Config::INI as a backend for your Config::INI::Object or so :)
16:53 timotimo tony-o: and perhaps make it easier (or just documented) to only grab to-json from JSON::Fast (so that you can get from-json from the more compliant JSON::Tiny)
16:53 grondilu thing is, what I wanted to do initially is : subset Vector of Array[Real]; but then I can't make it work in subroutines.
16:54 timotimo then you'll have to use "is" instead of "of" (is that implemented?)
16:54 PerlJam timotimo: I doubt it
16:54 grondilu m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; f my Array[Real] $
16:54 camelia rakudo-moar 019a7f: ( no output )
16:54 grondilu m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f my Array[Real] $
16:54 camelia rakudo-moar 019a7f: OUTPUT«vector!␤»
16:54 PerlJam m: my @array is Array;
16:54 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LtQmNoCVQX␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/LtQmNoCVQX:1␤------> 3my @array is Array7⏏5;␤    expecting any of:␤        constraint␤»
16:55 grondilu m: my Array[Real] $ = pi
16:55 camelia rakudo-moar 019a7f: OUTPUT«Type check failed in assignment; expected Array[Real] but got Num␤  in block <unit> at /tmp/i368cF5L1P:1␤␤»
16:55 grondilu m: my Array[Real] $ = [pi]
16:55 camelia rakudo-moar 019a7f: OUTPUT«Type check failed in assignment; expected Array[Real] but got Array␤  in block <unit> at /tmp/cjaXOFAgVK:1␤␤»
16:55 timotimo m: my Array[Real] $foo .= new(pi); say $foo.perl
16:55 camelia rakudo-moar 019a7f: OUTPUT«Array[Real].new(3.14159265358979e0)␤»
16:55 grondilu m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f my Array[Real] @ = pi
16:55 camelia rakudo-moar 019a7f: OUTPUT«Type check failed in assignment to @; expected Array[Real] but got Num␤  in block <unit> at /tmp/3EM4GjXyCJ:1␤␤»
16:56 grondilu m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f my Real @ = pi
16:56 camelia rakudo-moar 019a7f: OUTPUT«vector!␤»
16:56 grondilu oh that works
16:56 grondilu I'd swear I had tried that
16:56 timotimo :)
16:56 diana_olhovik joined #perl6
16:56 tony-o [Tux]: not really tempted, not sure why you think it's the most versatile, either.  admittedly i haven't spent 80 weeks of my life on csv parsing, though, so it just might be.
16:56 Skarsnik tadzik, I can probably keep the existing API (that return %hash) and add an exported parse-ini (or from-ini) that return an object
16:57 tadzik Skarsnik: I think you should go ahead and create your own module, one that uses Config::INI under the hood to not duplicate the tricky parts
16:58 Skarsnik I am not fan of having two modules that do exactly the same thing. It lost the user
16:58 timotimo oh tony-o is here :)
16:58 tony-o i'm back :-)
17:00 PerlJam Skarsnik: You could call your module Config::INI and then it's almost as if there's only one module  :)
17:00 RabidGravy Skarsnik, layers of interfaces are cool though - one module does a procedural interface and another that uses that module to provide an OO interface
17:00 jnthn .ask TimToady I've added nextcallee. One outstanding question I can't dig up a previous discussion on: what are the seamtnics of nextsame/nextwith and callsame/callwith if you've exhausted the iterator already? At the moment they all just do nothing and return Nil; that seems LTA for nextsame/nextwith, which probably at least want to return Nil, not continue onwards.
17:00 yoleaux jnthn: I'll pass your message to TimToady.
17:00 zengargoyle m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f Real @ = pi
17:00 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WA_BqImrVh␤Two terms in a row␤at /tmp/WA_BqImrVh:1␤------> 3ub f(Vector $) { "vector!" }; say f Real7⏏5 @ = pi␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤   …»
17:00 tony-o timotimo: what's up?
17:01 Skarsnik RabidGravy, well for now we don't have a nice SEE also section like on cpan x)
17:01 timotimo did you see what i highlighted you with about a screen page up?
17:01 zengargoyle m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f @[Real] = pi
17:01 camelia rakudo-moar 019a7f: OUTPUT«Type check failed in binding <anon>; expected Array[Real] but got Array␤  in sub f at /tmp/ACy0ItXQcJ:1␤  in block <unit> at /tmp/ACy0ItXQcJ:1␤␤»
17:01 mrf m: say "aaaa" ~~ /<?after a>+ a/;
17:01 zengargoyle m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f @ of Real = pi
17:01 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TYy8LZQCJ5␤Confused␤at /tmp/TYy8LZQCJ5:1␤------> 3sub f(Vector $) { "vector!" }; say f @ o7⏏5f Real = pi␤»
17:01 camelia rakudo-moar 019a7f: OUTPUT«(timeout)»
17:02 tony-o timotimo: i didn't until you mentioned it, but i'm agreeable to that.  can we throw some props on that repo?
17:02 timotimo zengargoyle: that really needs the "my" there
17:02 timotimo er ... some props?
17:02 grondilu m: @ or Real
17:02 camelia rakudo-moar 019a7f: ( no output )
17:02 zengargoyle meh, trying to remember something...  didn't think it needs real as @ is automatic state variable
17:02 tony-o credits ^ :)
17:02 yqt joined #perl6
17:02 grondilu m: say @ or Real
17:02 camelia rakudo-moar 019a7f: OUTPUT«[]␤»
17:02 grondilu m: say @ or Real = pi
17:02 camelia rakudo-moar 019a7f: OUTPUT«[]␤»
17:02 timotimo oh, you mean JSON::Fast mentioning the work you did in JSON::Faster?
17:02 timotimo also putting you in the authors
17:03 grondilu m:  @ of Real
17:03 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9Etkpcy45P␤Bogus statement␤at /tmp/9Etkpcy45P:1␤------> 3@ o7⏏5f Real␤    expecting any of:␤        whitespace␤»
17:03 zengargoyle thought i saw TimToady do some fancy typed anonymous var things before
17:03 timotimo where do authors go in the meta6.json file? :S
17:03 tony-o yea, if you don't want to, i don't mind - i'm still agreeable to removing JSON::Faster
17:03 grondilu m:  @[Real]
17:03 camelia rakudo-moar 019a7f: ( no output )
17:03 grondilu m:  @[Real] = pi
17:03 camelia rakudo-moar 019a7f: ( no output )
17:03 grondilu m: say @[Real] = pi
17:03 camelia rakudo-moar 019a7f: OUTPUT«[3.14159265358979]␤»
17:03 tony-o i think it's just authors: []
17:03 grondilu m: say @[Real] = pi, 6
17:03 camelia rakudo-moar 019a7f: OUTPUT«[3.14159265358979 6]␤»
17:03 RabidGravy Skarsnik, I'm of the opinion that none of these modules are *finished* or the APIs settled until  there 's a stable 6.0.0 release and people start using them
17:04 RabidGravy so it's all kind of moot
17:04 grondilu m: subset Vector of Array[Real]; sub f(Vector $) { "vector!" }; say f(@[Real] = pi)
17:04 camelia rakudo-moar 019a7f: OUTPUT«Type check failed in binding <anon>; expected Array[Real] but got Array␤  in sub f at /tmp/bISccKYBZF:1␤  in block <unit> at /tmp/bISccKYBZF:1␤␤»
17:05 timotimo tony-o: https://github.com/timo/json_fast/commit/​3eea641e81fd5680f7a4782d7c6b55c57bd8b522 - look good?
17:05 tony-o haha, extravagant. that works for me man, thank you
17:06 timotimo :3
17:06 timotimo so i'll kick faster out of the ecosystem
17:06 tony-o timotimo++
17:06 lizmat sightseeing&
17:07 dalek ecosystem: ff0327f | timo++ | META.list:
17:07 dalek ecosystem: JSON::Faster has been swallowed by JSON::Fast
17:07 dalek ecosystem:
17:07 dalek ecosystem: perhaps make things a bit less confusing for newcomers.
17:07 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ff0327fac0
17:07 timotimo i've recently seen someone complain about "why do we have JSON::Tiny, JSON::Fast and JSON::Faster?!?" or something
17:07 timotimo that's where i got the idea to throw ::Faster out
17:07 Skarsnik maybe me x)
17:08 JimmyZ JSON::Slow JSON::Slower :P
17:09 timotimo BBIAB :)
17:09 tony-o *intentionally makes the interface callback hell like early node and random sleeps *
17:09 timotimo we don't have a streaming json parser yet
17:09 Skarsnik I should port my dumb Acme module in perl6 but... dealing with IRC color is not fun x)
17:09 PerlJam Having all those JSON modules isn't so bad unless it makes it onerus for the prospective users to choose
17:10 AlexDaniel m: sub { 'Perhaps it should complain about sink context?' }
17:10 camelia rakudo-moar 019a7f: ( no output )
17:10 Skarsnik people are afraid to choose. "What if it's the bad choice?" "What if I use something deprecated?"
17:10 timotimo AlexDaniel: an anonymous sub defined in sink context you mean?
17:10 tony-o choose now, refactor later
17:10 AlexDaniel timotimo: yes
17:10 PerlJam Skarsnik: what tony-o said
17:11 PerlJam Skarsnik: change is inevitable, people need to get used to it :)
17:11 RabidGravy it's all immature, people are still wombling around trying to find what the mpst Perl 6-ish interfaces are
17:12 timotimo does anybody feel responsible for building that download page for perl6.org that leads people to a reasonable rakudo installation?
17:12 PerlJam RabidGravy: people are still doing that for Perl 5 modules too  :)
17:12 RabidGravy make all the things and let the software gods sort it out
17:13 tony-o don't know how many times i've waited for AnyEvent to finish building and then remembered that there's AE and another one that are shinier..
17:13 RabidGravy PerlJam, I think I am going to actually delete several of my Perl 5 modules in the near future
17:14 timotimo RabidGravy: yeah, force those perl5 people to upgrade to perl6! :P
17:14 PerlJam RabidGravy: delete them because ... ?
17:14 Ven joined #perl6
17:14 PerlJam RabidGravy: or ... why not put them up for adoption rather than delete them?
17:14 Skarsnik tony-o, hm I was wondering, maybe add a warning on h:p:x doc that it does not parse html5 well? (or follow the spec) The html5 spec specify how to handle syntax/tag error and such, it's a freaking huge work to write a proper html5 parser it seems
17:14 [Coke] (/ to search) facebook and gmail, for two.
17:16 RabidGravy PerlJam, because I can't see the reason for e.g. Linux::Svgalib, CGI::XMLPost or CGI::Form2XML any more ;-)
17:17 PerlJam RabidGravy: btw, do *you* have an account for perl6advent.wordpress.com?  An article on JSON::Infer might make a good advent post.
17:17 ^elyse^ joined #perl6
17:17 RabidGravy the first is totally broken and I haven't had a bug -report ever for it, so I guess no-one uses it
17:18 jdv79 RabidGravy: (or anyone else that interested)  I'd be interested in feedback on/about https://github.com/jdv/p6-uri2
17:19 jdv79 my lame attempt at "mutable URI" primarily but also try to do it sa "p6ish" as possible
17:19 RabidGravy PerlJam, no, no account but I'd write an article
17:19 tony-o jdv79: not sure if you're doing that for learning or not but i believe ugexe has published some stuff with uri
17:20 PerlJam RabidGravy: give me an email address and I'll send you an invite.
17:20 perlwiz joined #perl6
17:21 jdv79 for learning and because i had a need for mutability and the current URI bugged me
17:21 perlwiz what is wrong with this code rakudo is printing error message
17:21 perlwiz my $i=0 while $i<5{   print "Suman";   $i+=1; }
17:21 [Coke] m: say "Need to fix { 46 / 33 } bugs a day until XMAS";
17:21 camelia rakudo-moar 019a7f: OUTPUT«Need to fix 1.393939 bugs a day until XMAS␤»
17:21 PerlJam perlwiz: needs more space
17:21 jnthn [Coke]: Where does the 33 come from? :)
17:21 PerlJam perlwiz: and some punctuation
17:21 tony-o perlwiz: probably need a ';' after declaring $i
17:21 [Coke] because the december release is 12-17, not 12-25.
17:21 jnthn [Coke]: Also, why does your count always seem to be 1 less than mine? :)
17:22 AlexDaniel jnthn: although indeed I probably “expected wrong”, still it is very non-DWIM, so perhaps it could throw a warning if you try to use “callsame” multiple times? Is it possible?
17:22 * jnthn counts 47 to go
17:22 jdv79 tony-o: iirc ugexe's was meant to be "simple".  i mean for comprehennsive and well built
17:23 [Coke] jnthn: ah, because pbpaste | wc -l is missing a newline somewhere!
17:23 jnthn AlexDaniel: No, but I did ask if callsame on an exhausted iterator should die, in which case you'd have got an error.
17:23 PerlJam btw, anyone else willing to contribute to the Advent calendar?
17:23 [Coke] so yes, all my xmas counts have alwas been off by one. whoops.
17:23 [Coke] m: say "Need to fix { 47 / 33 } bugs a day until XMAS";
17:23 camelia rakudo-moar 019a7f: OUTPUT«Need to fix 1.424242 bugs a day until XMAS␤»
17:23 PerlJam (anyone who may not already have a login)
17:23 PerlJam jdv79: do you have a login for the advent calendar?
17:23 jnthn AlexDaniel: Will implement whatever TimToady++ decides on that :)
17:23 AlexDaniel jnthn: right. OK then :)
17:23 ZoffixW PerlJam, contribute how?
17:23 AlexDaniel jnthn: thanks!
17:23 perlwiz PerlJam My code is my $i=0;
17:23 [Coke] m: say "Need to fix { 47 / 41 } bugs a day until XMAS, if we release on xmas";
17:23 camelia rakudo-moar 019a7f: OUTPUT«Need to fix 1.146341 bugs a day until XMAS, if we release on xmas␤»
17:24 PerlJam ZoffixW: write content  (though, if you want to update the look and feel, that would be tres awesome)
17:24 jnthn Enough for me for today :)
17:24 perlwiz while $i<5 {print "Suman"; $i+=1;}
17:24 AlexDaniel [Coke]: how many xmas blockers are created per day? Approximately?
17:24 perlwiz PerlJam I am getting this error
17:24 perlwiz ===SORRY!=== Error while compiling sum.p6 Whitespace required before < operator at sum.p6:6 ------> <BOL><HERE><EOL>     expecting any of:         postfix
17:25 ZoffixW PerlJam, I probably don't know enough Perl 6 to contribute meaningfully; about look-n-feel, what's the URL to the site / repo?
17:25 jnthn AlexDaniel: We've not been adding to the list, and likely won't add much more
17:25 diana_olhovik joined #perl6
17:25 [Coke] AlexDaniel: approximately zero.
17:26 [Coke] there may be some one offs that get added, but it's unlikely. and there are still going to be monthly releases all year.
17:26 AlexDaniel sounds weird :)
17:26 jnthn perlwiz: Exactly what the error says
17:26 jnthn perlwiz: You have to put whitespace before the < operator
17:26 PerlJam ZoffixW: https://perl6advent.wordpress.com/ is the site.  (that's something I threw together whatever year we first started doing this and it hasn't changed since)
17:27 jnthn Enough for me for today. Going to do dinner, relax, etc. :) o/
17:27 [Coke] jnthn++
17:27 PerlJam ZoffixW: There's no repo, but if you're an admin you can configure things like the graphics, colors, layout, etc.
17:27 TimToady just pretend it's a Friday
17:27 yoleaux 11:04Z <Skarsnik> TimToady: thx for fixing is export{ message
17:27 yoleaux 17:00Z <jnthn> TimToady: I've added nextcallee. One outstanding question I can't dig up a previous discussion on: what are the seamtnics of nextsame/nextwith and callsame/callwith if you've exhausted the iterator already? At the moment they all just do nothing and return Nil; that seems LTA for nextsame/nextwith, which probably at least want to return Nil, not continue onwards.
17:27 ZoffixW PerlJam, MY EYES!!!!
17:27 PerlJam ZoffixW: gimme an email address so that I can invite you
17:27 ZoffixW PerlJam, just kidding :) It looks good to me as is TBH
17:27 ZoffixW PerlJam, cpan@zoffix.com
17:27 PerlJam Well ... it's simple at least :)
17:29 tadzik Skarsnik: yeah, point taken. I have no objections (he he) to giving Config::INI some new (other?) API, if it gives a new possibilities to the user
17:29 ZoffixW TimToady, but it IS Friday! :D
17:29 ZoffixW You scared me for a second, making me think it wasn't :P
17:30 AlexDaniel m: my @a = 1, 2, 3 .. *; .say for @a[0..20]; # whoops! Should've used …
17:30 camelia rakudo-moar 019a7f: OUTPUT«1␤2␤3..Inf␤»
17:31 pippo o/ #perl6!
17:31 pippo left #perl6
17:32 AlexDaniel m: my @a = 1, 25, 3 … *
17:32 camelia rakudo-moar 019a7f: ( no output )
17:32 AlexDaniel m: my @a = 1, 25, 3 … *; .say for @a[0..20];
17:32 camelia rakudo-moar 019a7f: OUTPUT«Unable to deduce arithmetic or geometric sequence from 1,25,3 (or did you really mean '..'?)␤  in block <unit> at /tmp/zEEr4XO3ux:1␤␤»
17:32 AlexDaniel “did you really mean '..'”?
17:33 AlexDaniel what does it mean?
17:33 AlexDaniel aaah
17:33 ZoffixW AlexDaniel, the ... is magical :)
17:33 ZoffixW Oh wait
17:33 AlexDaniel m: my @a = 1, 25, 3 .. *; .say for @a[0..20];
17:33 camelia rakudo-moar 019a7f: OUTPUT«1␤25␤3..Inf␤»
17:33 perlwiz jnthn But why whitespace ? what's the difference between whitespace and no whitespace? Does that has special meaning?
17:33 AlexDaniel so it kinda tells me to do this?
17:33 ZoffixW AlexDaniel, it can't figure out what sequence you wanted
17:33 ZoffixW Um.
17:34 ZoffixW Right.
17:34 AlexDaniel ZoffixW: Yea, I understand that
17:34 ZoffixW m: my @a = 1, 25, 125 … *; .say for @a[0..20];
17:34 camelia rakudo-moar 019a7f: OUTPUT«Unable to deduce arithmetic or geometric sequence from 1,25,125 (or did you really mean '..'?)␤  in block <unit> at /tmp/swDKLWrlUj:1␤␤»
17:34 ZoffixW m: my @a = 0, 25, 50  … *; .say for @a[0..20];
17:34 camelia rakudo-moar 019a7f: OUTPUT«0␤25␤50␤75␤100␤125␤150␤175␤200␤225␤25​0␤275␤300␤325␤350␤375␤400␤425␤450␤475␤500␤»
17:35 TimToady perlwiz: p6 requires whitespace before any infix that could be confused with a postfix, and we use angles as a postfix for literal hash subscripting
17:35 AlexDaniel I just don't find '..' suggestion useful at all. I am probably missing something important
17:35 perlwiz TimToady Yeah I gotch it :)
17:35 TimToady AlexDaniel: sometimes you want to put a range in the middle of an otherwise unrelated list
17:36 TimToady so this is a suggestion if you happened to put ... when you meant ..
17:36 TimToady that's why it's a question, because it's just a guess
17:36 AlexDaniel okay!
17:43 AlexDaniel m: my @a = 1, 2 …… *; say 'hello';
17:43 camelia rakudo-moar 019a7f: ( no output )
17:43 AlexDaniel O_o
17:43 AlexDaniel m: …; say 'hello';
17:43 camelia rakudo-moar 019a7f: ( no output )
17:43 AlexDaniel ah right
17:44 timotimo "stub code executed"?
17:44 TimToady shouldn't be throwing that away
17:44 TimToady m: fail; say 'hello'
17:44 camelia rakudo-moar 019a7f: ( no output )
17:44 TimToady or that
17:45 TimToady worth a rakudobug, if it's not there already
17:45 perlwiz Now time for Perl6Data conference guys just like PyData
17:45 TimToady bring it on! :)
17:46 perlwiz We need to focus more on scientific computing and data crunching
17:46 TimToady we've been anxiously awaiting the PDLers to show up and start hacking
17:46 jdv79 PerlJam: no
17:47 perlwiz doing data analysis in PDL is not that simple as in pandas(python)
17:47 AlexDaniel hmm, can't find anything
17:47 sivoais I've made the start of a Perl5 Pandas (called Data::Frame). It integrates with R.
17:48 arnsholt perlwiz: Sounds like a Perl 6-y version of the pandas API might be a good idea. Well volunteered! =)
17:48 sivoais by the way, I'm on the PDL Porter dev team. :-) I've let some know on the IRC channel before that we need to start thinking about Perl6.
17:48 timotimo so this is about the code around the main program not working with
17:48 sivoais but I'm on a hiatus right now as I finish my thesis. :-)
17:49 timotimo hm, in this case probably &RETURN or the exhaust thingie or something
17:49 perlwiz arnsholt Yeah whatever we urgently require analytic and visualisation tools within perl6 I guess :) :)
17:49 arnsholt I actually have a semi-related project I'd like to get working on
17:49 dalek doc: 29ee496 | (Zoffix Znet)++ | html/js/main.js:
17:49 dalek doc: Clarify what the code is for
17:49 dalek doc: review: https://github.com/perl6/doc/commit/29ee496d37
17:49 arnsholt But like sivoais, it turns out this whole thesis stuff is so time-consuming. Odd that. =)
17:50 colomon joined #perl6
17:50 timotimo perhaps bridge the gap in the mean time with Python::Inline to connect the perl6 api we want with the python code that already exists to do stuff
17:51 sivoais I still promise to take the IPerl <-> IPython work I'm doing and turn that into an IPerl6 :-)
17:51 sivoais but tuits are hard to find over here these days
17:51 arnsholt sivoais: Is that your thesis work?
17:51 perlwiz sivoais eagerly waiting IPerl6!!
17:52 sivoais no, I'm doing image analysis mainly in C/C++ :-) IPerl was something to make quick experiments easier to work with.
17:53 arnsholt Ah, cool
17:53 arnsholt I've looked a bit a the ipython docs, but I haven't been able to figure out how to actually implement a kernel
17:53 timotimo arnsholt: i have
17:54 timotimo https://ipython.org/ipython-d​oc/3/development/kernels.html
17:54 tokuhiro_ joined #perl6
17:55 arnsholt timotimo: Yeah, the problem is the messaging part of it. I probably just haven't sat down and read it with the proper attention, to be honest
17:55 timotimo oh
17:56 timotimo the messaging part i can help you with
17:56 timotimo https://ipython.org/ipython-doc/3/dev​elopment/messaging.html#wire-protocol - it's this
17:56 arnsholt Yeah, that's the tricky bit
17:56 timotimo hah, you think?
17:57 arnsholt Odd, that =)
17:57 kjs_ joined #perl6
17:58 sivoais there are a couple oddities when you get into the details, but the high-level view of Jupyter's/IPython's messaging spec isn't too bad.
17:58 timotimo arnsholt: well then. you'll implement the parts that connect the kernely bits with the messaging stuff, and i'll implement the messaging stuff
17:58 timotimo because the repl connecting things scare me
17:58 sivoais here's where I do all of that <https://github.com/EntropyOrg/p5-Devel-I​Perl/tree/master/lib/Devel/IPerl/Kernel>
17:59 sivoais and the kernel-y bit <https://github.com/EntropyOrg/p5-Devel-IP​erl/blob/master/lib/Devel/IPerl/Kernel.pm>
17:59 arnsholt timotimo: Oh, right. I was thinking about just making sense of the docs. Implementation wise there's sure to be a whole raft of stuff
17:59 timotimo hah
17:59 timotimo fair enough
17:59 timotimo another thing is that i don't really have a good idea of where we stopped with our ZMQ binding :(
17:59 arnsholt Yeah, I remember you wrestling with this back in the day
18:00 arnsholt Yeah =(
18:00 arnsholt So many projects, so few tuits
18:03 perlwiz sivoais Yeah I saw Data::Frame. Its Ok. For data manipulation we need to use concepts like in dplyr and data.table(R) in perl6
18:03 timotimo dplyr?
18:05 sivoais perlwiz: totally agree. It's on my list. I'm trying to create a Perl {5,6} for science project like ROpenSci or SciPy. Something with a good solid set of docs and nice API that learns from the existing tools.
18:06 sivoais timotimo: dplyr is a SQL / LINQ -like API for tabled data in R
18:07 dalek doc: a1f5f53 | (Zoffix Znet)++ | html/js/main.js:
18:07 dalek doc: Unfocus search box when user scrolls a bit
18:07 dalek doc:
18:07 dalek doc: zengargoyle++ for spotting the issue
18:07 dalek doc: review: https://github.com/perl6/doc/commit/a1f5f53f46
18:07 timotimo ah, neat
18:07 timotimo i'll be AFK for a bit
18:11 perlwiz sivoais Loads of thanks. I was wandering why despite perl being older than python it was lagging behind in scientific computing. Why the whole ecosystem of data analytics was lacking in perl? At least now I am relieved that someone's working in it. And even Ruby is picking up in this area(data analytics and visualisation). Why can't perl?
18:13 avalenn joined #perl6
18:13 sivoais This is where I'm starting a rough sketch of things <http://entropyorg.github.io/>. I'm defending very soon (so I need to get back to work :-P), so new things will start happening after that.
18:14 mr_ron joined #perl6
18:18 zengargoylew joined #perl6
18:18 perlwiz sivoais Again many many thanks. I appreciate your work. But for plotting I suggest to use matplotlib. I am never happy with plotting within perl. Bitter truth I should say perl is not better at plotting.
18:20 arnsholt There is no plotting but gnuplot, if you ask me
18:20 arnsholt Especially for thesis-writing, with the epslatex terminal
18:21 * AlexDaniel is waiting for p6lot
18:21 hoelzro I like that name!
18:21 [Coke] tripping over a bug in ignoremark/ignorecase, having trouble golfing it.
18:22 perlwiz sivoais Can you show me documentation how to install IPer kernel?
18:23 sivoais perlwiz: what OS are you on? I need to write more docs for all the OSes
18:23 [Coke] https://gist.github.com/coke/751920fda50cd3196fbd
18:24 [Coke] looks like the check is wandering off the edge of the string. doing a rebuild to see if this changed recently.
18:24 perlwiz sivoais I am on windows
18:24 perlwiz win 10
18:25 perlwiz win 10 64 bit
18:25 AlexDaniel IMO, gnuplot is very painfull to use. Matplotlib worked significantly better for me, but it is not perl-ish enough
18:25 sivoais perlwiz: eep, that's the system I was trying to install on last. You see, I needed to have ZeroMQ4 built on there as a static lib so that I could link the messaging up. That's a WIP.
18:25 AlexDaniel So yeah, please somebody create p6lot!
18:25 [Coke] m: say "Malmö" ~~ m:i:m/^ 'malmo' $/
18:25 camelia rakudo-moar 019a7f: OUTPUT«「Malmö」␤»
18:26 sivoais perlwiz: best bet right now is to spin up a Linux VM and work in there :-(
18:26 [Coke] m: my $a='Malmo'; say "Malmö" ~~ m:i:m/^ $a $/
18:26 camelia rakudo-moar 019a7f: OUTPUT«「Malmö」␤»
18:26 perlwiz AlexDaniel I agree matplotlib and ggplot2 are great in scientific plotting. You can check rbokeh also for interactive plotting.
18:27 [Tux] tony-o, it was not meant to scale down your version!
18:27 sivoais perlwiz: I would recommend something Debian-based since I have some short instructions in the README here <https://github.com/EntropyOrg/p5-Devel-IPerl>
18:27 AlexDaniel perlwiz: actually, I haven't tried ggplot2 yet! Thanks!
18:27 eliasr joined #perl6
18:28 sivoais oh yes, ggplot2 and bokeh are my current favourites. They have clean APIs.
18:29 AlexDaniel wow, bokeh looks great too!
18:30 sivoais perlwiz: if you have the tuits, finishing this for Windows might help <https://github.com/zmughal/p5-Alien-ZMQ4> progress IPerl on Windows. :-)
18:40 dalek doc: 61a22a3 | (Ronald Schmidt)++ | doc/Language/subscripts.pod:
18:40 dalek doc: Update subscripts.pod
18:40 dalek doc:
18:40 dalek doc: Fix broken link to Custom_type_example
18:40 dalek doc: review: https://github.com/perl6/doc/commit/61a22a321e
18:40 dalek roast: 528a22b | TimToady++ | S32-exceptions/misc.t:
18:40 dalek roast: argument now reported as Int rather than int
18:40 dalek roast: review: https://github.com/perl6/roast/commit/528a22bc9c
18:43 tony-o jdv79: the URI stuff ugexe ripped out of zef was from the RFC, not sure if he published it separately
18:43 timotimo hmm, there's gotta be some simple tool that checks a bunch of documents for broken links, right?
18:44 timotimo we could (should?) put that into the travis build for perl6/doc
18:44 tony-o xenu's link sleuth
18:45 timotimo .o( so that's what .xls stands for )
18:46 Begi11110 joined #perl6
18:48 kjs_ joined #perl6
18:49 espadrine joined #perl6
18:50 tony-o i've used xenu on corporate sites to great effect, not sure if you can cli it, though..
18:50 tony-o it'd be an interesting tool to write in P6, i volunteer for that job.
18:51 hahainternet in a loop, is there a succinct way to say 'do this part only once'?
18:51 tony-o first { }
18:51 hahainternet thanks, hard to google for!
18:52 tony-o oops, first isn't the right one - there is a verb for it
18:52 hahainternet no worries, i figured it'd be something like once {} or similar
18:52 hahainternet i don't actually need it now, but as usual i've come across the annoyance in python, so i'm comparing it to p6
18:52 tony-o FIRST
18:53 tony-o m: for ^5 { FIRST { 'sup'.say; }; .say; }
18:53 camelia rakudo-moar 019a7f: OUTPUT«sup␤0␤1␤2␤3␤4␤»
18:53 tony-o can also use LAST and NEXT
18:53 tony-o m: for ^5 { NEXT { 'sup'.say; }; .say; }
18:53 camelia rakudo-moar 019a7f: OUTPUT«0␤sup␤1␤sup␤2␤sup␤3␤sup␤4␤sup␤»
18:54 tony-o m: for ^5 { NEXT { 'sup'.say; }; next; .say; }
18:54 camelia rakudo-moar 019a7f: OUTPUT«sup␤sup␤sup␤sup␤sup␤»
18:54 hahainternet yeah, phasers?
18:54 hahainternet also, thanks :)
18:54 tony-o yea.  np
19:02 perlwiz AlexDaniel sivoais ggvis is also great just like bokeh
19:03 tony-o ugexe is perl6 god
19:03 tony-o like hookah
19:03 ozykhan joined #perl6
19:04 * masak thought hookah was just vaporware
19:04 tony-o nice pun masak++
19:06 zengargoylew is FIRST supposed to work in while loops?
19:06 * sivoais is just here for the puns ;-)
19:06 AlexDaniel zengargoylew: why not?
19:07 tony-o m: while True { FIRST { "sup".say; next; };  break; }
19:07 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8ZHKY2Hlmk␤Undeclared routine:␤    break used at line 1␤␤»
19:07 tony-o m: while True { FIRST { "sup".say; next; };  last; }
19:07 camelia rakudo-moar 019a7f: ( no output )
19:07 zengargoylew well i've rakudobug'd it because it doesn't :P, but not *certain* it shuld
19:07 masak m: role R {}; say R.new # pun!
19:07 camelia rakudo-moar 019a7f: OUTPUT«R.new␤»
19:08 masak sivoais: you're welcome :)
19:09 AlexDaniel tony-o: I'm not sure if next/last are actually working in phasers
19:10 AlexDaniel m: for ^5 { NEXT { last }; .say }
19:10 camelia rakudo-moar 019a7f: OUTPUT«0␤1␤2␤3␤4␤»
19:10 AlexDaniel is it a bug?
19:12 AlexDaniel oh, it actually works in FIRST
19:15 timotimo arnsholt: you know, there's already a thing written in python that'll easily let you build your own kernel; why don't we go via Inline::Python for starts?
19:16 arnsholt timotimo: That's a horrendous hack. I like it! =)
19:16 arnsholt But more seriously, that does sound like a very good idea
19:16 timotimo build it and you'll make a bunchton of people happy
19:16 timotimo like, SO MANY people
19:17 arnsholt Exactly. Link me the Python thingy?
19:17 timotimo gimme a sec
19:17 Skarsnik hm, how to handle $class<a><b>? (maping to hash of hash) I want to write $conf<a><b> = "piko"; but I end with {:a(${:b("piko")})}
19:17 Skarsnik
19:17 timotimo https://ipython.org/ipython-doc/3​/development/wrapperkernels.html
19:17 kolikov left #perl6
19:18 timotimo Skarsnik: i'm not sure i understand what you mean? what's the problem here?
19:18 AlexDaniel Skarsnik: %conf<a><b> ?
19:18 timotimo m: say ${:a(1)}.perl
19:18 camelia rakudo-moar 019a7f: OUTPUT«{:a(1)}␤»
19:18 timotimo m: dd ${:a(1)}
19:18 camelia rakudo-moar 019a7f: OUTPUT«Hash $var = {:a(1)}␤»
19:19 Skarsnik $conf is an object from a class with AT-KEY defined
19:21 Skarsnik it has an internal %hash where I map data into it and display it. I am not to understand why I get a ${}? Should it display {a:((:b("piko"))} if it was a hash of hash?
19:21 arnsholt timotimo: Cheers! Looking at it now
19:26 Skarsnik oh it's the right thing. my bad
19:26 masak m: say "Malmø" ~~ m:i:m/^ 'malmo' $/
19:26 camelia rakudo-moar 019a7f: OUTPUT«「Malmø」␤»
19:26 nys joined #perl6
19:26 masak m: say "Mælmø" ~~ m:i:m/^ 'malmo' $/
19:26 camelia rakudo-moar 019a7f: OUTPUT«「Mælmø」␤»
19:26 masak :P
19:27 flussence «Stage parse      :  80.689» — another drop from 87ish, hopefully it'll stick this time
19:27 yqt joined #perl6
19:28 arnsholt masak: Mælmø, that's how the locals pronounce it, right? =)
19:29 flussence («Stage mast» dropped from 30ish to 28.1 too, looks like everything's a bit faster today for whatever reason)
19:31 pink_mist masak: lol .. no we don't :P
19:31 pink_mist err arnsholt ^
19:31 moritz flussence: a fresh wave of Computrons has arrived at your CPU
19:31 masak arnsholt: totally.
19:31 pink_mist masak: >_<
19:31 masak arnsholt: actually, I've never understood what the locals are saying... :P
19:32 masak arnsholt: I understand people perfectly in Oslo, but here in Mælmø I just draw a blank.
19:33 pink_mist masak: I'm going to haveto go down to malmö and buy you a beer some day =)
19:33 masak pink_mist: I might hold you to that ;)
19:33 masak pink_mist: assuming you're in the vicinity?
19:34 pink_mist masak: helsingborg
19:34 masak ah; I was there today.
19:34 pink_mist ohh =)
19:34 masak $work main office is there.
19:34 masak (we're hiring) :P
19:34 arnsholt masak: Yeah, the dialect is odd. I get periodic reminders of that from Wallander and Broen =)
19:35 masak arnsholt: even the province flag is 50% Sweden and 50% Denmark!
19:36 arnsholt Oh, that's true!
19:36 arnsholt For some reason I'd never connected those dots =D
19:37 masak arnsholt: there's this joke about a yearly tradition where some cessesionists go to the border to Blekinge to dig a (symbolic) ditch to break free of the rest of Sweden.
19:37 pink_mist lol, yeah I've heard about that one :P
19:37 masak arnsholt: the punchline is that the Blekinge people come from their side, and help digging.
19:39 * TimToady also hates the autoselect of the Search box; could it be put where the 1st TAB will select it instead, or make it deselect itself and page down if you type space as the first thing?
19:40 masak +1
19:40 masak is the Search box for people who don't know about Ctrl+F ?
19:40 TimToady it's all very well to say "scoll first" deselects it, but those buttons Don't Work when the search box is selected in my browser
19:40 TimToady and I always scroll using space
19:41 zakharyas joined #perl6
19:44 arnsholt masak: Hee, hee. It's kind of like Bergen here (and Bavaria, I've been told). The Bergeners claim that Bergen is separate from Norway, and everyone else agrees
19:45 labster_ joined #perl6
19:45 TimToady then there's California
19:45 masak and Texas
19:45 masak and Catalonia
19:45 masak and Scotland
19:46 moritz Scotland voted to stay in the UK
19:47 moritz which I totally understand, and it still made me a bit sad
19:48 TimToady for some reason we're still a bit touchy on the subject of seccession over here in the U.S. of A.
19:48 RabidGravy but they asked to join the UK two hundred years ago when they pissed thir entire economy up the walll trying to start a colony in Venezuela
19:49 TimToady *secession
19:49 * masak .oO( a "seccession" is an excession of secession ) :P
19:53 flussence TimToady: awkward question, I found out the other day enums halfway-work where a "unit module" statement does. I kinda like that behaviour, can I keep it?
19:54 RabidGravy flussence, had you considered applying a role to the enum, which does and I believe is always going to work?
19:56 flussence I know that works, but the part I'm not entirely sure about is putting an enum in a *.pm by itself, and being able to "use" that by name...
19:58 RabidGravy module Foo {  our enum Bar <h g k> ... };
19:59 arnsholt timotimo: I've got a prototype echo kernel with Inline::Python. But it turns out my Ubuntu IPython was *ancient*, so I'm upgrading to the most recent version so that it might have an actual chance at working
19:59 ZoffixW joined #perl6
19:59 ZoffixW Am I the only one who's bummed out that subtest takes the test's description AFTER the code block?
20:00 * ZoffixW wonders what the chances are of that changing
20:00 RabidGravy yes
20:00 RabidGravy it's consistent with all the other things
20:00 flussence now that I poke at it some more, it seems I can name the enum anything I want and the «use» always succeeds. hmm...
20:01 moritz in "use Mumble;", the Mumble determines the file name
20:01 ZoffixW RabidGravy, I'd say readability trumps consistency
20:01 ZoffixW I have to skim all the way to the end of the block to find out what the subtest is all about.
20:01 ZoffixW The other functions don't take dozens of lines as the first argument, thus the test decription makes sense there
20:01 RabidGravy er
20:02 Skarsnik Hm, how do I can write attribute in a method that will construct the class?
20:02 moritz attributes are passive
20:02 moritz so an attribute can'te vern construct anything
20:02 moritz *can't ever
20:08 Skarsnik I am not to understand what you are talking about x) I just want to write method read($filename) {$!something = "piko"; return self.bless} without writing self.bless(:something("piko"));
20:10 RabidGravy you mean like "static" methods?
20:11 rurban joined #perl6
20:12 rurban left #perl6
20:12 RabidGravy ie you do Foo.whatever() and still keep internal state
20:12 moritz Skarsnik: why don't you want to write self.bless(...)?
20:12 * ZoffixW suspects some sort of .new-with(...)
20:13 ZoffixW Skarsnik, are you wanting to return a copy of the current object, except with $!something assigned to the new value?
20:15 Skarsnik I have a method read that can replace new. It read a file and should set some attribute according to it. but it does not let me write $!attribute = $value; It just feel dumb to have to pass them all at self.bless
20:17 FROGGS joined #perl6
20:17 ZoffixW Skarsnik, if it's a replacement for new, doing $!attribute is a bit meaningless. If you don't yet have an object, how would the compiler know what $!attribute is?
20:18 ZoffixW You want to change state, but you don't even have state without an object.
20:18 RabidGravy lots of existing patterns for that
20:18 TimToady ZoffixW: some additional carpage from me regarding the search box at http://irclog.perlgeek.de/p​erl6/2015-11-13#i_11534285
20:19 Skarsnik ZoffixW, but does that work in new itself?
20:19 RabidGravy even includinding doing callsame with a different invocant (see e.eg Staticish)
20:20 ZoffixW Skarsnik, why would it?
20:20 ZoffixW Skarsnik, $!attribute is an attribute of an object.
20:21 moritz Skarsnik: in a class (static) method, there is no instance yet, so you can't assign to an attribute yet
20:21 ddrown left #perl6
20:21 moritz Skarsnik: so either you pass it to some form of constructor, of you create the object first, and then initialize it from the inside
20:21 Skarsnik well like in C++, in the constructor the attributes exist.
20:23 molaf joined #perl6
20:23 RabidGravy but new() isn't really the constructor here, bless() is the actual constructor (with I guess CREATE below that)
20:25 Skarsnik so after I call self.bless, the object exist or you are still in a class method (oposed to method of the instance)?
20:26 RabidGravy self.bless returns the new onject which you can call methods on
20:26 moritz Skarsnik: .bless returns the instance
20:26 flussence is :EXPORT on use NYI, or am I holding it wrong?
20:27 moritz flussence: NYI I think
20:27 timotimo arnsholt: i'm so glad you're going ahead with that
20:27 RabidGravy it has to match some "is export(:EXPORT)"
20:29 flussence RabidGravy: this is about the adverb (S11:206), not the thing inside the qw-list
20:31 arnsholt timotimo: Do you know if there's a list of formatting stuff I can use in the kernel.json file?
20:31 Skarsnik I will not have access to private attribute then? I mean like my $self = self.bless; $self.!privateattribute does not work
20:31 arnsholt There's {connection_file} from the example, but the path to the directory the kernel is installed to or something would be nice too
20:31 RabidGravy Skarsnik, no
20:31 RabidGravy it's a different object
20:32 flussence .oO( is the synopsebot around? thought S11:206 would produce a link... )
20:34 Skarsnik RabidGravy, so you can't write different constructor that do stuff to private attribute? or giving them to .bless work?
20:36 RabidGravy you may be looking at BUILD that is called after the object is constructed on the new object with the same arguments
20:37 pippo joined #perl6
20:37 timotimo arnsholt: that's an excellent question!
20:37 arnsholt And I think the answer is: There isn't
20:37 arnsholt Anyways, I don't care at this point
20:37 arnsholt I just hardcoded the path to the Perl 6 script in the kernel file
20:37 arnsholt So now I have something that echoes (via Perl 6)
20:37 arnsholt Now for the hard part: Evaluating stuff
20:38 timotimo yeah, it seems like the very only thing is connection_file
20:41 pippo Question. in a for loop is i possible to get the next iteration's $_? i.e. for 1,2,3,4,5 { say $_; say what would be the next $_} and have then the for continues as if two iterations have been done?
20:42 moritz pippo: you can iterate two items at a time
20:43 moritz m: for <a b c d> -> $a, $b { say "after $a comes $b" }
20:43 camelia rakudo-moar 019a7f: OUTPUT«after a comes b␤after c comes d␤»
20:43 PerlJam pippo: do you only sometimes want to skip 2 ?
20:43 xfix joined #perl6
20:43 abaugher joined #perl6
20:43 PerlJam pippo: or ... why do you want to do this? :)
20:44 pippo PerlJam: Yes it is for some times unknown in th beginning.
20:44 dalek doc: e132d9b | (Zoffix Znet)++ | html/js/main.js:
20:44 dalek doc: Un-focus search box and scroll when SPACE, DOWN, or PAGE DOWN are pressed
20:44 dalek doc: review: https://github.com/perl6/doc/commit/e132d9b85f
20:44 ZoffixW TimToady, ^ that should fix that
20:45 pippo PerlJam: moritz: I need it to parse a file. I know it is mad. Just wondering if it is possible.
20:45 timotimo pippo: there's a method called "rotor" that'll help you
20:46 timotimo i forget the exact way it's invoked
20:46 timotimo m: say (^10).rotor(2=>1).perl
20:46 camelia rakudo-moar 019a7f: OUTPUT«((0, 1), (3, 4), (6, 7)).Seq␤»
20:46 timotimo nope.
20:46 timotimo m: say (^10).rotor(2=>-11).perl
20:46 timotimo oops, very wrong
20:46 PerlJam you have to know ahead of time how you want rotor to function.
20:46 timotimo m: say (^10).rotor(2=>-1).perl
20:46 camelia rakudo-moar 019a7f: OUTPUT«((0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9)).Seq␤»
20:46 camelia rakudo-moar 019a7f: OUTPUT«(timeout)»
20:46 timotimo wait. which one is right now?
20:46 timotimo m: say (^10).rotor(2=>-1).perl
20:46 camelia rakudo-moar 019a7f: OUTPUT«((0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9)).Seq␤»
20:46 timotimo yeah, that's the one
20:47 PerlJam It would be interesting if there was a looping construct like rotor where you could inject the take/skip elements information
20:47 timotimo take the next two, but take a step backwards before taking another two
20:48 moritz pippo: the next value isn't generally known, but knowing the previous value is trivial
20:48 moritz pippo: so you can just re-formulate the problem from the perspective of the next value
20:49 ^elyse^ joined #perl6
20:49 mr_ron left #perl6
20:49 timotimo there's a homomorphism between the two
20:49 timotimo or something
20:49 pippo moritz: OK. I take it as not possible.
20:50 moritz pippo: well, we have presented you several options
20:50 zengargoylew m: my $i = [1,2,3,4]; for @$i -> $j { say $j; say $i.shift if $j == 2; }
20:50 camelia rakudo-moar 019a7f: OUTPUT«1␤2␤1␤4␤»
20:50 pippo moritz: I can of corse reformulate my problem and solve it in another way. But it would have been faster with that.
20:50 moritz pippo: all of them are possible; I just kept on, because it seems you weren't happy with any of them
20:51 timotimo pippo: just have a state variable that the for loop will next if $state-- > 0
20:51 zengargoylew would have expected 1,2,1,3,4
20:51 timotimo or something
20:51 zengargoylew or 1,2,3,4
20:51 zengargoylew not 1,2,1,4
20:52 moritz my \iter = lines().iterator; while IterationEnd !=:= (my $value = iter.pull-one) { say $value; my $next = iter.pull-one; say "Next: $next" }
20:52 moritz m: my \iter = lines().iterator; while IterationEnd !=:= (my $value = iter.pull-one) { say $value; my $next = iter.pull-one; say "Next: $next" }
20:52 camelia rakudo-moar 019a7f: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Next: 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í␤Next: I mo dhiaidh bhí gleanntái…»
20:52 zakharyas joined #perl6
20:53 moritz but that's really the same as iterating two at a time
20:55 timotimo damn, Weird Al is good.
20:55 PerlJam pippo: fwiw, were I you, I would use a variable as timotimo suggests.
20:56 RabidGravy buffalo girls go round the outside
20:56 krunen joined #perl6
20:56 skids m: my $a = Supply.new; my $b = Promise.in(1); my $n = now; react { whenever $b { 42.say; exit; }; sleep 2; 43.say }
20:56 camelia rakudo-moar 019a7f: OUTPUT«43␤42␤»
20:56 skids m: my $a = Supply.new; my $b = Promise.in(1); my $n = now; react { whenever $b { 42.say; exit; }; }
20:56 camelia rakudo-moar 019a7f: OUTPUT«42␤»
20:57 pippo PerlJam: you mean with the state var?
20:57 PerlJam pippo: it doesn't *have* to be a state var, but yes.
20:57 moritz also, you can interate over the indexes instead of the values
20:57 timotimo pippo: you could also have a gather/take in front that does nothing but do the +1/+2 thing
20:57 moritz then youc an easily advance by one
20:58 timotimo pippo: and then you can even communicate across the consumer and the producer...
20:58 pippo moritz: PerlJam: timotimo: Thank you. I'll try that.
20:59 spider-mario joined #perl6
20:59 zengargoylew can one take two at a time from an odd list with -> ($a,$b?)
20:59 timotimo yes, one can
20:59 moritz zengargoylew: yes
21:00 moritz m: for 1, 2, 3 -> $a, $b? { say "$a: {$b // '-'}" }
21:00 camelia rakudo-moar 019a7f: OUTPUT«1: 2␤3: -␤»
21:00 moritz m: for 1, 2, 3 -> $a, $b = '-' { say "$a: $b" }
21:00 camelia rakudo-moar 019a7f: OUTPUT«1: 2␤3: -␤»
21:01 * moritz idly wonders if Perl 6 signature binding is Turing complete
21:01 zengargoylew thinking more probably wouldn't work.  in body take first and if needed use second, if not swap with first and redo body.
21:02 zengargoylew only works if the second item can't be an item that needs a second item tho.
21:06 arnsholt timotimo: IT'S ALIIIIIIVE!
21:07 * arnsholt cackles madly
21:07 timotimo :-)
21:08 arnsholt Do you want me to put it in your iperl6kernel repo?
21:09 timotimo yes
21:13 jdv79 tony-o: they all are;)
21:14 jdv79 PerlJam: I'm not sure i want to write anything but justin@devuyst.com
21:14 timotimo i don't leave my home without my pancreas~
21:16 tokuhiro_ joined #perl6
21:17 timotimo oh lord, iperl6kernel's last commit is 3 years old
21:19 arnsholt timotimo: Incidentally, do you know how to run the kernel as a separate process (so that I can debug it more easily) and connect to it in a separate step?
21:20 timotimo well, just intercept the connection file i suppose?
21:20 timotimo ipython qtconsole foobar.json
21:20 timotimo or something?
21:20 timotimo ah
21:20 timotimo --existing
21:20 timotimo is the right thing to do that
21:22 llfourn joined #perl6
21:25 raiph joined #perl6
21:26 Skarsnik hm why rakudo told me Config::Simple does not define new as defined in the role? Am I blind or something? x) https://gist.github.com/Ska​rsnik/2db25f0b9ab52dc0635b
21:29 raiph hi Skarsnik
21:29 arnsholt timotimo: Could you commitbit me on iperl6kernel?
21:34 Skarsnik Oh multi is part of the signature?
21:36 timotimo haha
21:36 timotimo sure
21:36 timotimo i was f5-ing all the time for a little bit
21:37 pippo left #perl6
21:37 timotimo you're in
21:37 arnsholt Try now =)
21:37 rangerprice joined #perl6
21:37 rangerprice Hi
21:37 rangerprice i need some help
21:38 raoulvdberge joined #perl6
21:38 rangerprice How i can found the number of characters in a file in perl ?
21:38 Skarsnik slurp($filename).chars ?
21:39 timotimo you're totally using Inline::Python wrong :P
21:39 arnsholt I can imagine!
21:39 arnsholt Feel free to fix it =)
21:39 timotimo why did you write python code at all?
21:39 arnsholt Good question, I guess! =D
21:40 pippo joined #perl6
21:40 arnsholt I just got an idea for how to do it and whacked out the code
21:40 timotimo mhm
21:40 rangerprice Fille::Slurp is by default in perl ?
21:40 timotimo 5?
21:41 rangerprice yes
21:41 timotimo no idea
21:41 rangerprice File::Slurp *
21:42 tony-o Skarsnik: don't define new as a multi method
21:42 TEttinger joined #perl6
21:43 timotimo alternatively put a proto in there
21:43 moritz m: say 'README'.IO.s
21:43 camelia rakudo-moar 019a7f: OUTPUT«Failed to find 'README' while trying to do '.s'␤  in block <unit> at /tmp/m4JNTsOtEo:1␤␤Actually thrown at:␤  in block <unit> at /tmp/m4JNTsOtEo:1␤␤»
21:44 Skarsnik m: role R { method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:44 camelia rakudo-moar 019a7f: OUTPUT«===SORRY!===␤Method 'foo' must be implemented by A because it is required by a role␤»
21:44 moritz m: say '/etc/passwd'.IO.s
21:44 camelia rakudo-moar 019a7f: OUTPUT«1310␤»
21:44 Skarsnik m: role R { multi method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:44 camelia rakudo-moar 019a7f: OUTPUT«Cannot call foo(A: Str); none of these signatures match:␤    (A $: *%_)␤    (A $: *%_)␤  in block <unit> at /tmp/sn9yVNSBBn:1␤␤»
21:45 Skarsnik hm
21:46 moritz Skarsnik: did you intentionally create a multi sub and method each?
21:46 Skarsnik I forget a method
21:46 Skarsnik m: role R { multi method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi method foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:46 camelia rakudo-moar 019a7f: OUTPUT«hello␤»
21:46 timotimo happens to the best of us
21:47 timotimo arnsholt: did you know you can derive perl6 classes from python classes with I::P?
21:47 Skarsnik but if I don't put a multi in the role I am not allowed to have another one (it make sense) but it's weird
21:47 timotimo as i said, try putting a proto method in there
21:48 timotimo m: role R { method foo() {...}}; class A does R { proto method foo(|) {*}; multi method foo() {say "foo"}; multi foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:48 camelia rakudo-moar 019a7f: OUTPUT«Cannot call foo(A: Str); none of these signatures match:␤    (A $: *%_)␤  in block <unit> at /tmp/Upi0dk0HCz:1␤␤»
21:48 timotimo m: role R { method foo() {...}}; class A does R { proto method foo(|) {*}; multi method foo() {say "foo"}; multi method foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:48 camelia rakudo-moar 019a7f: OUTPUT«hello␤»
21:48 llfourn Skarsnik: yeah multi foo { ... } doesn't really work as a contraint on the child class afaik
21:48 timotimo m: role R { method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi method foo($a) { say $a}}; my $a = A.new; $a.foo("hello");
21:48 camelia rakudo-moar 019a7f: OUTPUT«===SORRY!===␤Method 'foo' must be implemented by A because it is required by a role␤»
21:48 llfourn as timotimo++ showed you need proto :)
21:48 timotimo see?
21:49 llfourn unfortunetly we have not documented proto yet :\
21:49 Skarsnik hm what proto does exactly? x)
21:49 arnsholt timotimo: Nope! Didn't think that far, TBH. The ipython docs had a Python example, so I just shoved the whole thing in there
21:49 arnsholt But I agree; deriving a Perl 6 class and using that would be a lot cleaner
21:50 llfourn it essentially wraps a bunch of routines checking signature first and then re-dispatching
21:51 arnsholt timotimo: In my defence, the I::P docs are a bit sparse =)
21:51 timotimo the thing is, if you put a bunch of multi methods into something, you'll get a proto generated for you
21:51 timotimo arnsholt: right
21:51 timotimo but when there was already a method in the role you applied, things became a bit troublesome
21:52 timotimo perhaps this could be rakudobugged as an LTA error? because this case should probably be detectable
21:52 llfourn yes, I don't think what Skarsnik is trying to is actually possible atm...
21:52 llfourn to require at least one multi method to be implemented
21:52 timotimo i don't even know what Skarsnik's trying
21:52 timotimo oh, hm
21:52 timotimo that seems difficult, yeah
21:53 Skarsnik I put multi in the role and it work x)
21:53 Skarsnik but will I have trouble with another class that has only one foo ?
21:53 llfourn Skarsnik: give it a try, I think I remember triyng the exact same thing and it didn't work
21:53 timotimo does it properly require the method to be implemented?
21:54 Skarsnik ah good question
21:54 llfourn ie it didn't throw the not implemented error
21:54 grondilu joined #perl6
21:55 Skarsnik yep it did not throw, if I don't define the method
21:56 timotimo right, in that case it's toothless :)
21:57 Skarsnik hm interesting...
21:57 llfourn yes I also just tried it and it doesn't work :\
21:57 Skarsnik when I try to call the method (with only one of them, but still with multi)
21:57 Skarsnik Ambiguous call to 'read'; these signatures all match:
21:57 Skarsnik :(Config::Simple $: $filename, *%_)
21:57 Skarsnik :(Config::Simple $: $filename, *%_)
21:58 llfourn is that because you have a { ... } there as well?
21:58 llfourn do your signature constraints in your proto
21:58 llfourn it seems doing { ... } in a multi is useless atm
21:58 Skarsnik I did not try with proto yet
21:59 Skarsnik yes, I think that the issue
21:59 psch m: class C { multi method f { ... } }; C.new.f
21:59 camelia rakudo-moar 019a7f: OUTPUT«Stub code executed␤  in method f at /tmp/MdZTfJTUWn:1␤  in block <unit> at /tmp/MdZTfJTUWn:1␤␤Actually thrown at:␤  in block <unit> at /tmp/MdZTfJTUWn:1␤␤»
21:59 psch it just doesn't check for stubs when composing multi methods
21:59 psch for anyone who wants to try their hand at MOP-hacking, src/Perl6/Metamodel/RoleToClassApplier.nqp:104
21:59 Skarsnik m: role R { multi method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi method foo($a) { say $a}}; my $a = A.new; $a.foo("hello"); a.foo();
21:59 camelia rakudo-moar 019a7f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SAiOCefGlo␤Undeclared routine:␤    a used at line 1␤␤»
22:00 Skarsnik m: role R { multi method foo() {...}}; class A does R { multi method foo() {say "foo"}; multi method foo($a) { say $a}}; my $a = A.new; $a.foo("hello"); $a.foo();
22:00 camelia rakudo-moar 019a7f: OUTPUT«hello␤Ambiguous call to 'foo'; these signatures all match:␤:(A $: *%_)␤:(A $: *%_)␤  in block <unit> at /tmp/c9ClPMbEQE:1␤␤»
22:00 lab joined #perl6
22:00 psch that's where we do the check for non-multi stubs
22:00 psch a few lines down it doesn't do a similar check for multi stubs
22:00 psch (which might be because we can't be completely sure, but i doubt it.  if anything else we could check for a proto without candidates and throw the same error then)
22:00 psch s/anything/nothing/
22:00 llfourn psch: what do you think the correct behaviour is?
22:01 Zoffix joined #perl6
22:01 psch llfourn: uh, i'm not sure what's in roast, lemme check
22:02 llfourn m: role R { proto method foo {*} }; class A does R { };
22:02 camelia rakudo-moar 019a7f: ( no output )
22:02 llfourn m: role R { proto method foo {*}; multi method foo { ... } }; class A does R { };
22:02 camelia rakudo-moar 019a7f: ( no output )
22:02 llfourn I'm guessing the second one is incorrect
22:03 llfourn but why shouldn't proto just require it by itself
22:03 psch well, i can't find anything that tests a role with a proto applied to a class
22:03 psch i think having a stub or onlystar proto in a role should require the class to implement at least one candidate
22:03 llfourn I mean if you have a type which has a proto but nothing implements a dispatchee isn't that a compile time error?
22:04 psch no, methods are late bound
22:04 psch m: class A { proto method foo {*} }; say "alive"; say A.new.foo
22:04 camelia rakudo-moar 019a7f: OUTPUT«alive␤Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/r55aknHnS7:1␤Cannot call foo(A); none of these signatures match:␤  in block <uni…»
22:05 psch i don't know if we can know that at compile time either
22:05 llfourn I see. so you don't know whether the multi has a candidate until runtime?
22:05 psch until dispatch, yes
22:05 psch m: class A { proto method foo($: ) {*} }; say "alive";
22:05 camelia rakudo-moar 019a7f: OUTPUT«alive␤»
22:06 psch if you never call a proto without candidates there's no problem... :)
22:06 Skarsnik maybe not allow multi method {...}? (or throw a warning if it's role?)
22:07 arnsholt timotimo: Looks like I need to define things in Python after all. I::P doesn't know how to marshal class objects as arguments to Python
22:07 llfourn mm I guess it's just whether it's possible to make something inheriting from you implement a multi method at compose time..
22:08 ugexe why would you disallow multi method in a role? it can be used properly and to great effect
22:08 llfourn role X requires you to implement at least one multi method..
22:08 llfourn ugexe: disallow a stub
22:09 ugexe ah
22:09 timotimo oh, damn :(
22:09 timotimo nine: do you hear that? something's wrong about passing classes across the perl6-python border?
22:10 Skarsnik well maybe you want a multi method foo() { ... } and multi method foo($a) { foo() } in your role. sound like legit code
22:10 arnsholt And I suspect named params are NYI as well
22:11 llfourn Skarsnik: hmm yes that's not a bad point. Maybe you do want to just have a stub mutli candidate...
22:12 rangerprice joined #perl6
22:13 psch Skarsnik: the other way around maybe, yeah
22:14 psch as i said, i'm not convinced what we have is (1) fully designed (and tested) or (2) fully implemented
22:14 psch Skarsnik: "the other way around" means have a param-less candidate in the role that does some default stuff
22:14 psch Skarsnik: so yes, i agree with the notion
22:15 ugexe isnt that what proto method blah(|) { do-stuff(); {*}; do-after-stuff(); }; does?
22:15 psch m: role R { proto method f(|c) {*}; multi method f() { ... }; multi method f($) { self.f() } }; class C does R { multi f() { "doing C-things" } }; C.new.f(1) # resolution also seems a bit lacking
22:15 camelia rakudo-moar 019a7f: OUTPUT«Stub code executed␤  in method f at /tmp/bFMr_J72TA:1␤  in method f at /tmp/bFMr_J72TA:1␤  in block <unit> at /tmp/bFMr_J72TA:1␤␤Actually thrown at:␤  in block <unit> at /tmp/bFMr_J72TA:1␤␤»
22:15 Skarsnik what I am trying to btw is a Config::Simple module that offer a basic way to have a config file. but you can change the 'driver' by calling for example Config::Simple.new("ini"); that why I want 2 new or 2 read method in it; ~~
22:16 espadrine joined #perl6
22:16 MadcapJake Are there any other "type adverbs" like `:D` or is that the only one?
22:16 psch ah, no, braino...
22:17 psch m: role R { proto method f(|c) {*}; multi method f() { ... }; multi method f($) { self.f() } }; class C does R { multi method f() { "doing C-things" } }; C.new.f(1)  # can't decide against the stub before we know it's a stub
22:17 camelia rakudo-moar 019a7f: OUTPUT«Ambiguous call to 'f'; these signatures all match:␤:(C $: *%_)␤:(C $: *%_)␤  in method f at /tmp/D7zG0w0nfk:1␤  in block <unit> at /tmp/D7zG0w0nfk:1␤␤»
22:17 llfourn ugexe: proto doesn't req the child to implement a method. Basically if you do method foo { ... } in a role it requires it but as soon as you put multi it doens't which is unexpected depending on your viewpoint.
22:17 psch that last example of mine could probably be solved in RoleToClassApplier.nqp
22:17 rangerprice mmm
22:18 llfourn MadcapJake: :U # :)
22:18 ugexe :_
22:19 MadcapJake llfourn: thanks! Is there a name for that? Can't seem to find details on those in the docs.
22:21 llfourn MadcapJake: http://docs.perl6.org/language/faq#What_are_​those_%3AD_and_%3AU_things_in_signatures%3F
22:21 ugexe also http://doc.perl6.org/type/Signature#Con​straining_Defined_and_Undefined_Values
22:21 llfourn amusingly it's in the FAQ # hopefully it's somewhere else too!
22:22 * llfourn hopes are satisfied
22:25 MadcapJake Woah this signature page is an eye opener! I think some of this stuff should be moved to the language category (somehow)
22:26 jdv79 is there a way to switch the profiler on/off at runtime?
22:33 masak m: class C { has $.id = $++ }; say C.new.id for ^5
22:33 camelia rakudo-moar 019a7f: OUTPUT«0␤1␤2␤3␤4␤»
22:33 masak another reason we don't need "class attributes" :)
22:34 llfourn what is $ I don't even...
22:35 Skarsnik how can you count the number of instance of a class?
22:35 ugexe its incrementing an anonymous state variable
22:35 jdv79 maintain a custom count?
22:37 llfourn m: class C { has $.id = $ ~= 'foo'}; say C.new.id for ^5;
22:37 camelia rakudo-moar 019a7f: OUTPUT«foo␤foofoo␤foofoofoo␤f​oofoofoofoo␤foofoofoofoofoo␤»
22:37 zengargoylew s/id/instance_count/ :P
22:37 Zoffix joined #perl6
22:37 llfourn ugexe: I see thanks :)
22:37 Zoffix Sheesh! https://twitter.com/unlocalbl​og/status/665297065899986944
22:37 Zoffix A person can't have a beer and hack on some code in peace :P
22:37 Skarsnik well how you -- when you delete?
22:38 jdv79 why do you want an instance count?
22:38 zengargoylew method DESTROY { $!id-- } # eventuall decrement?
22:38 jdv79 no
22:38 zengargoylew no, guess ot
22:38 jdv79 DESTROY is not reliable
22:39 jdv79 i don't know a real answer though.  sorry.  haven't gotten there yet.
22:39 zengargoylew eventual sorta meant when gc'd or if it ever managed to get called.
22:39 masak jdv79: I don't want an instance count. I want a unique ID for each new object I create.
22:39 zengargoylew but since id is copy of $ , wont'work
22:39 jdv79 isn't that $o.WHICH?
22:39 Begi11110 Horror in Paris...
22:40 zengargoylew need a $.destroyed = $++; and method foo { $.id - $.destroyed } :)
22:40 bbkr joined #perl6
22:40 * zengargoylew doesn't think that would work either..
22:41 Skarsnik Not really x)
22:42 zengargoylew would have to .new a sacrificial object and then not include it in the reconing.
22:43 stmuk Zoffix: I'm giving up on the twitter troll
22:43 stmuk finally :)
22:44 zengargoylew left #perl6
22:45 Zoffix stmuk, are you @steve_mynott?
22:48 stmuk yes!
22:48 stmuk http://colinm.org/language_checklist.html :D
22:48 Zoffix stmuk, eh, I've seen many times the exact same nonsense arguments as that dude on Twitter.
22:49 Zoffix "P6 will kill P5! It will take up all the market share!!" "No one cares about P6! Perl is not a strong brand name!" -_-
22:49 Zoffix It's one or the other, dude. Either no one cares about Perl or Perl *is* a strong brand name :P
22:50 stmuk I couldn't believe he honestly thought Perl 5 was perfect
22:51 stmuk it's like he had never used it ;)
22:51 Zoffix :P
22:54 masak I guess the same could be said of most languages. frequent users of it are not likely to lean back and state, "nah, it's perfect like this"
22:54 masak except perhaps Lisp people.
22:55 stmuk most programmers have ideas of how to "improve" their language of choice
22:55 * Zoffix is a "frequent" user of P5, with 97 active dists on CPAN and ~250 released dists in lifetime
22:56 Zoffix On some level, I can see why the people like that guy feel like that. They see something new and unknown. The fear the boogieman.
22:56 Zoffix I felt nervous about P5 before I took time to learn P6.
22:57 Zoffix But I'm really annoyed that people like him—instead of advocating P5's strength—are trying to tear down P6.
22:58 Skarsnik P5 is fine, it just look ulgy sometime comparing to P6 (syntax wise)
22:59 stmuk does he dislike Moose etc I wonder since that changes Perl 5?
22:59 masak Zoffix: I'm less sad about people tearing down Perl 6 than I used to be. Perl 6 will survive that.
23:00 masak Zoffix: in the end, what's important and what I care about is people leaving constructive/positive impressions. like writing scripts/modules/frameworks.
23:00 masak ...and applications.
23:02 Zoffix I think mst has put it most apt and succinctly: http://shadow.cat/blog/matt-s-trout/f_ck-perl-6/
23:02 Zoffix Maybe I should just starting linking to that post instead of arguing :P
23:02 * masak is aware of that post :)
23:03 masak but yes, mst is basically making the same point in that post: it's contributions that matter, not communities grinding against each other.
23:04 Zoffix Yeah
23:06 timotimo vendethiel is in paris, isn't he?
23:07 timotimo jdv79: there's the ops that nqp and rakudo themselves use to start and stop profiling
23:08 timotimo jdv79: but i'm not sure if you can start, stop, start, stop and get correct results at the end
23:08 raiph Zoffix: could you turn your design skills on /r/perl6?
23:09 raiph Zoffix: er, not could you, of course you could, but, *would you be willing to* :)
23:09 Zoffix raiph, not an active reddit user... what does that mean? :)
23:09 masak 'night, #perl6
23:09 Zoffix night
23:09 raiph gnite
23:11 timotimo Zoffix: we can supply our own css rules to make it prettier
23:11 raiph Zoffix: https://www.reddit.com/r/perl6/ and (this prolly won't work without the right privs: https://www.reddit.com/r/perl6/about/stylesheet/)
23:12 Zoffix Looks fine the way it is IMHO
23:13 MadcapJake So I've written an expanded perl 6 language grammar for Atom Editor that is a lot more colorful than the one included in the builtin language-perl.  Check it out and let me know what needs tweaking! https://github.com/MadcapJake/language-perl6fe  Also I plan to add linter support, autocomplete support and atom-build support.
23:13 raiph Zoffix: OK. Thanks. :)
23:13 hoelzro MadcapJake++
23:14 Zoffix w00t!
23:14 Zoffix MadcapJake++ sweet. Gonna try it at $work on Monday :)
23:14 * Zoffix can't run Atom on their home box because too lazy to upgrade to 64-bit box :(
23:17 pink_mist joined #perl6
23:18 timotimo MadcapJake: could you post a screenshot or two?
23:29 pdcawley_ joined #perl6
23:30 bbkr_ joined #perl6
23:43 jdv79 timotimo: ill try that then
23:44 timotimo could just be nqp::startprofiling and nqp::stopprofiling; you can find it in the HLL::Compiler in nqp and/or Perl6::Compiler or Perl6/HLL/Backend.nqp or so
23:52 dalek perl6-roast-data: af7f7d3 | coke++ | / (9 files):
23:52 dalek perl6-roast-data: today (automated commit)
23:52 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/af7f7d3ec0
23:52 dalek rakudo-star-daily: 18e6880 | coke++ | log/ (3 files):
23:52 dalek rakudo-star-daily: today (automated commit)
23:52 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/18e6880ef4
23:52 zengargoyle hrm,  =finish is just supposed to mean no more Perl 6 code after here, not this is the end of POD documentation right?
23:53 kid51 joined #perl6
23:53 [Coke] masak: no, the search box is for searching the -site-, not the -page
23:54 jdv79 with the profiler i was able to obseeve the large diff tween using | and || in regeces though.
23:57 MadcapJake timotimo: yeah let me write up a readme and ill add a screenshot.  The screenshot will have Fira Code as the font as I developed this highlighter to work well with ligatures! B)
23:57 zengargoyle =finish ... block is in all other respects identical to a C<=pod> block.
23:58 zengargoyle perl6 --doc Module.pm6 ignores stuff after =finish :(
23:59 jdv79 ShimmerFairy was or was going to work on pod afaik

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

Perl 6 | Reference Documentation | Rakudo