Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-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 pyrimidi_ joined #perl6
00:01 mr-foobar joined #perl6
00:15 cono joined #perl6
00:24 u-ou what usually happens about licensing if you copy an open-source project without reading its code?
00:25 u-ou by copy i mean emulate or mimic the behaviour as opposed to copying code
00:32 ugexe https://en.wikipedia.org/wiki/Clean_room_design
00:32 mr-foobar joined #perl6
00:33 u-ou thanks
00:37 u-ou I guess I just need to license it as if I were using their code?
00:38 ugexe if you are copying their code you need to abide by their license
00:38 u-ou the thing I'm concerned about is that I'm copying ideas and behaviour
00:38 u-ou with my own implementation
00:38 ugexe have you looked at the code?
00:38 u-ou no
00:39 ugexe then it shouldnt matter
00:39 u-ou ok
01:01 someuser joined #perl6
01:02 mr-foobar joined #perl6
01:11 ribasushi joined #perl6
01:25 japhb Uh ... be aware that in some jurisdictions there are other forms of IP (Intellectual Property) for which it does not matter whether you looked at the other product's code -- or were even aware it existed.  You can be liable anyway.  If you're concerned, talk to an IP lawyer in your jurisdiction.  It's the only way to be sure.
01:26 japhb (I Am Not A Lawyer, just aware that blanket statements about IP are generally as legally risky as ... well, any other major generalization.)
01:26 Cabanossi joined #perl6
01:31 kyan Hi, I just installed rlwrap per the message when I first open perl6, but I still can't use arrow keys to navigate, etc.. Is it needed to recompile perl6?
01:31 mr-foobar joined #perl6
01:34 u-ou maybe i'll talk to the project coordinator
01:35 kyan joined #perl6
01:36 kyan Hi, I just installed rlwrap per the message when I first open perl6, but I still can't use arrow keys to navigate, etc.. Is it needed to recompile perl6? (not sure if that message came through, the irc glitched out)
01:38 geekosaur if you go the rlwrap route, you have to run it yourself (rlwrap perl6) just like any other rlwrap user
01:38 geekosaur rlwrap is not something that other programs know about, in fact it's specifically designed for use with commands that have no clue about readline
01:38 geekosaur if you wanted it to be automatic then you need to install the appropriate perl 6 module, not rlwrap
01:39 geekosaur rlwrap is just sometimes easier to install and doesn't require e.g. API compatibility with any perl modules
01:40 kyan Um, I'm not rly sure what that means exactly... I see the package Term-Readline-Perl in my distribution (Gentoo), but no Perl 6 one
01:40 kyan will I need to package it myself?
01:40 geekosaur "You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor"
01:41 geekosaur if you do one of the first two then you may have to supply an appropriate and compatible readline or linenoise library (e.g. beware of Apple's "readline", which isn't; also the Linenoise module may bundle the linenoise C lib at this point)
01:42 kyan Right, that's why I installed the rlwrap — I didn't see the other two in the distribution
01:53 geekosaur the third one lets you avoid any compatibility issues since any rlwrap command will work the same way, but you have to run rlwrap manually
01:53 geekosaur gentoo likely does not package it. use the command it told you, not your distro
01:53 kyan Ok, I think I'm using regular GNU readline, but don't have a perl 6 readline package (or really *any* perl 6 packages beyond the perl 6 app itself)
01:53 Actualeyes joined #perl6
01:53 geekosaur or if gentoo does package it then you'll need to find out what they called it. likely easier to just use zef to install it
01:53 kyan Oh, so I need to package it myself then, ok, thanks! (I never use built in package things, I'm assuming "zef" is basically like "npm" except for Perl6)
01:53 geekosaur er
01:53 geekosaur zef is perl 6's package manger
01:54 ilbot3 joined #perl6
01:54 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:54 cuonglm I made a PR 2 day ago but do not receive any response from core developers
01:54 * kyan joined the CC list for that bug, so I'll keep track of it
01:57 geekosaur cuonglm, very active development, do you have an RT #?
01:59 cuonglm geekosaur: No, just a TODO in source code, here's relevant PR https://github.com/rakudo/rakudo/pull/1154
01:59 geekosaur I don't know thta anyone catches random PRs, most stuff is done through RT
02:00 geekosaur and #perl6-dev is probably a better channel to ask about this
02:01 mr-foobar joined #perl6
02:02 cuonglm geekosaur: thanks
02:04 geekosaur (actually I'd suspect I know who would get notified of PRs.. and he's on vacation)
02:05 ChoHag joined #perl6
02:09 yoleaux joined #perl6
02:11 noganex joined #perl6
02:11 Cabanossi joined #perl6
02:17 silug joined #perl6
02:19 rosalind joined #perl6
02:33 mr-foobar joined #perl6
03:11 R0b0t1_ joined #perl6
03:26 Cabanossi joined #perl6
03:30 Actualeyes left #perl6
03:33 mr-foobar joined #perl6
03:40 Cabanoss- joined #perl6
03:45 llfourn joined #perl6
04:25 Cabanossi joined #perl6
04:29 R0b0t1_ joined #perl6
04:34 Kyo91_ joined #perl6
04:56 Actualeyes joined #perl6
04:57 nige joined #perl6
05:03 nige I don't have the spare tuits for this - but hoping someone else might ... this strikes me as a good idea - creating a Perl 6 language server that supports multiple frontend IDE/editors
05:03 mr-foobar joined #perl6
05:04 nige a Cro-based backend service to implement this protocol? http://langserver.org/
05:20 wamba joined #perl6
05:21 xtreak joined #perl6
05:40 Cabanossi joined #perl6
05:50 llfourn joined #perl6
05:59 domidumont joined #perl6
06:04 domidumont joined #perl6
06:05 espadrine joined #perl6
06:08 R0b0t1_ joined #perl6
06:16 piojo joined #perl6
06:34 Kyo91_ joined #perl6
06:43 astj_ joined #perl6
06:43 kent\n kyan: mostly we haven't worked out how to do Perl6 modules yet, because doing it with our tools is a bit hard, but if you manage something sensible, hit me or xiaomiao up about it and it might land in some tree :)
06:45 kent\n bonus points if you have it do the right thing when somebody reinstalls the rakudo from source.
06:59 jonas1 joined #perl6
07:15 b2gills joined #perl6
07:17 darutoko joined #perl6
07:18 lustlife joined #perl6
07:22 lustlife joined #perl6
07:24 wamba joined #perl6
07:31 huf joined #perl6
07:36 mr-foobar joined #perl6
07:49 domidumont joined #perl6
07:56 Cabanossi joined #perl6
08:05 mr-foobar joined #perl6
08:24 zakharyas joined #perl6
08:24 * gfldex .oO(WTB title offering blog post)
08:26 Cabanossi joined #perl6
08:26 xtreak joined #perl6
08:28 grondilu joined #perl6
08:29 robertle joined #perl6
08:30 xtreak joined #perl6
08:36 mr-foobar joined #perl6
08:38 dakkar joined #perl6
08:45 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2017/09/13/goto-the-last-fifo/
08:48 cog_ joined #perl6
08:49 lizmat gfldex++
08:51 lizmat gfldex: is there a file-test that you can perform to find out if something is a fifo ?
08:52 gfldex `ls` knows so there must be
08:53 gfldex lizmat: bash got `-p $fifo`
08:53 lizmat hmmm....  I guess we would need support for that at the MoarVM/nqp level first
08:53 xtreak joined #perl6
08:56 Cabanossi joined #perl6
08:56 Xliff \o
08:57 Xliff If I have a class is repr('CStruct'), is it possible for the class to have attributes that are not visible to 'C'?
08:58 Xliff Or would I need a wrapper class (which would blow up all of my code)
08:58 jnthn Well I guess if you put them at the end then C wouldn't care :)
08:58 gfldex lizmat: see `man 2 stat` :)
08:58 Xliff jnthn: Er. Not really. Good chance of a segfault.
08:59 gfldex m: react { whenever Supply.interval(1) { say .Int } };
08:59 gfldex how do I use Supply.interval ?
08:59 camelia rakudo-moar 3f4a9f: OUTPUT: «(timeout)0␤»
09:00 scovit joined #perl6
09:00 lizmat gfldex: like that, works for me as a one liner
09:01 Xliff gfldex: Bot don't like things that go on forever.
09:01 jnthn Xliff: Well, I'm assuming you are allocating the memory in the first place. If you aren't then of course it's not going to work :)
09:01 Xliff jnthn: Heh. Well I did not preclude that assumption in the initial description.
09:02 lizmat gfldex: buffering appears to be the issue
09:02 Xliff But as a general practice using NativeCall.... it's always good when class matches struct.
09:02 Xliff So I am taking it that's a no and I have to use a wrapper?
09:02 Xliff Or a hack.
09:02 Xliff (I'm thinking hack)
09:02 jnthn Xliff: Yeah, I'd pretty much always take the wrapper class approach myself rather than such tricks :)
09:02 lizmat Xliff: the timeout is not the issue, the fact that the output only contains 0 *is*
09:03 Xliff jnthn++: Your wisdom is appreciated, but my stubborn practicality needs a hack or there is a lot of rewriting in my future.
09:03 jnthn :)
09:03 jnthn lizmat: Yeah, when the bot kills the process due to timeout, we won't get chance to do an orderly flushing
09:04 Xliff That was my point. This goes on forever, so the bot will timeout and drop the output.
09:04 lizmat jnthn: if the bot is killed with a ctrl-c like signal, we could catch that and do an orderly shutdown
09:04 Xliff Plus, the output is a count. Not always 0.
09:05 jnthn lizmat: Well, we could have the bot sneak a signal handler in before the code, sure
09:05 jnthn lizmat: Though a better solution would perhaps be for it to allocate a tty or some such
09:06 Xliff But I yam prolly speaking to the choir at this point. And I have done my coder thing for today. Time for more re-jiggering for XML::LibXML
09:06 gfldex lizmat: also, `open` blocks on fifos (until they are opened on the other end for writing). Not sure if that is desireable.
09:06 * Xliff &
09:07 lizmat the only thing the bot would need is: signal(SIGINT).tap: &exit
09:08 lizmat or possibly signal(SIGINT).tap: { exit(255) }  if you want another exit value
09:13 sjn hm. just a thought. would it be an idea to create a conveniency function for "signal(SIGINT).tap: { ... }"? e.g. just "SIGINT { ... }"
09:14 jnthn Sounds like something for a module
09:15 sjn nah. seeing .tap in the code is a good signal to newbies to read up on a useful feature :)
09:15 jnthn (In more realistic cases you'd probably writing whenever signal(SIGINT) { })
09:15 jnthn *probably be
09:15 sjn yeah
09:16 * sjn notices that "whenever" doesn't have it's own entry in the docs
09:17 jnthn Hm, that maybe also means it's not searchable?
09:19 sjn it's mentioned in doc/Language/concurrency.pod6
09:19 sjn so there's *something*
09:19 gfldex jnthn: it is searchable
09:20 sjn same goes for react
09:20 gfldex both don't got a heading so they wont show up in the ToC
09:22 lustlife joined #perl6
09:26 Cabanossi joined #perl6
09:31 Actualeyes left #perl6
09:37 mr-foobar joined #perl6
09:53 timo1 joined #perl6
09:56 scovit gfldex++: if I may dare a comment, "my $fifo = open("radio-fifo-in", :rw); for $fifo.lines { .say }" does blocking the same way as Perl5 and uses 0% cpu (like it is supposed to)
09:59 gfldex scovit: it indeed does what doesn't play well with react. Working on it.
10:00 Xliff So... I was trying to sleep when the hack solution came to me.
10:00 Xliff Create another module with non-exported our variables that contain all the extra attributes.
10:01 Xliff That way I don't need to re-write code. And yes, that is very hackish, but serviceable since regular users shouldn't need the functionality, so the existing API is unaffected.
10:02 Xliff jnthn: Thoughts? :)
10:02 jnthn our variables?
10:02 jnthn What if the module is used from multiple threads at the same time?
10:05 timo1 joined #perl6
10:09 timo1 using openbsd for the first time, a throwback to my first year of linux ... tar requires the j for the x, but tells me it already knows i should have put j. cool. then no utf8 support. cool. wonder what's next ...
10:09 timo1 the display in weechat is still full of ?, but i can at least type ümläüt
10:10 scovit gfldex: good luck with that! I might suggest this excellent review http://www.kegel.com/c10k.html
10:11 simonm joined #perl6
10:11 dakkar joined #perl6
10:16 stmuk I think the OpenBSD xterm does support utf8 now so maybe its a font issue?
10:23 xtreak joined #perl6
10:24 gregf_ joined #perl6
10:25 Xliff jnthn: DAMMIT, MAN! I knew you were going to ask that!
10:25 Xliff And I solved THAT one, TOO!
10:25 Xliff Well... mostly.
10:25 dakkar joined #perl6
10:25 lizmat :-)
10:25 Cabanossi joined #perl6
10:25 Xliff I would need to write a class that Proxy's the attribute.
10:25 ShalokShalom_ joined #perl6
10:26 Xliff So STORE would set the value to $attr{$*THREADID} and FETCH would return the same.
10:26 Xliff But that's MOAR work, not less!
10:27 Xliff I know $*THREADID is not the right var. Too tired to go look it up.
10:27 Xliff Remember, I was trying to go to sleep 90 minutes ago and had to code this or I'd lose it.
10:29 timo1 stmuk: i'm ssh'd in and have weechat inside tmux
10:29 timo1 ah, maybe because TERM is screen and not tmux-256color
10:29 timo1 i thought i set that
10:30 timo1 joined #perl6
10:30 timo1 nope, didn't help
10:30 stmuk timo1: ah! not sure about tmux I'm still in the stone age with screen
10:30 Xliff <- screen too
10:30 stmuk despite tina's advocacy :)
10:31 Xliff How would you run tmux in a VirtualBox guest?
10:36 Xliff Nevermind. It's not what I thought it was. Still neat though.
10:36 gfldex .tell AlexDaniel you may want to have a look at https://irclog.perlgeek.de/perl6-dev/2017-09-13#i_15156473
10:36 yoleaux gfldex: I'll pass your message to AlexDaniel.
10:36 Xliff Now to hope morpheus comes along and guides me to the land of the promised SLEEP!
10:36 * Xliff &
10:41 sproctor joined #perl6
10:50 pmurias joined #perl6
10:53 pmurias scovit: why do you want to use 'macro a is export { quasi { CBuffer.new("Ciao") } }' instead of sub a {CBuffer.new("Ciao")}
10:55 Cabanossi joined #perl6
10:57 Zoffix scovit: FWIW, there's also .get method that fetches one line at a time. Seems a more appropriate tool than a Seq .lines returns if you want it to block stuff. https://docs.perl6.org/routine/get
11:00 knobo joined #perl6
11:02 scovit pmurias I am still learning how to do things in Perl6. In this case a sub would be best, right?
11:02 scovit in C it was a macro
11:04 HoboWithAShotgun joined #perl6
11:05 HoboWithAShotgun m: class foo { has Rat $.bar; }; foo.new( bar => 60 );
11:05 yoleaux 12 Sep 2017 18:47Z <gfldex> HoboWithAShotgun: you can get hold of named params at runtime: https://gist.github.com/gfldex/44eeaceb7d021c82e63b11214d0cccfc
11:05 camelia rakudo-moar 3f4a9f: OUTPUT: «Type check failed in assignment to $!bar; expected Rat but got Int (60)␤  in block <unit> at <tmp> line 1␤␤»
11:05 HoboWithAShotgun why doesn't this auto convert?
11:05 Zoffix HoboWithAShotgun: that's just how the language works.
11:06 Zoffix HoboWithAShotgun: many types can be converted to others. If conversions were done automatically, there'd be less point in using types
11:07 Zoffix HoboWithAShotgun: there's a corser syntax. Though it's NYI for attributes; you'll need to define your own BUILD or TWEAK submethod
11:08 Zoffix m: -> Rat() $x { dd $x.nude }(42)
11:08 camelia rakudo-moar 3f4a9f: OUTPUT: «(42, 1)␤»
11:09 scovit Zoffix: why not!
11:09 Zoffix scovit: why not what?
11:09 scovit .get instead of lines! Apparently you don't even need the :rw flag
11:10 scovit 'my $fifo = open("radio-fifo-in", :r); while defined $_ = $fifo.get { .say }'
11:10 scovit does waiting and terminates at EOF
11:10 Zoffix right; you'd need :w only when also writng and it defaults to :r
11:11 HoboWithAShotgun allright, so what it the basic number type
11:11 scovit yes, but in Perl5, you need "+<" for waiting, which stands for read+write
11:11 scovit and in Perl6 too if you want to use the .lines method
11:11 scovit instead of .get
11:12 HoboWithAShotgun the type docs is just a flat list, i can't find any inheritance tree
11:14 Zoffix HoboWithAShotgun: Numeric is a role done by all numerics. There is Int, Num, Rat, FatRat, and Complex. They have allomorphic subclasses IntStr, NumStr, RatStr, and ComplexStr. All of these inherit from Cool class which is objects that can be viewed as both stringa and numbers. And these, like most other types inherit from Any and Mu. There's also a number of native numerics
11:15 Zoffix m: class Foo { has Rat $.x; submethod BUILD (Rat(Cool) :$!x) {} }.new(:42x).x.nude.say
11:15 camelia rakudo-moar 3f4a9f: OUTPUT: «(42 1)␤»
11:16 HoboWithAShotgun "cool", eh?
11:16 moritz https://docs.perl6.org/type/Cool.html
11:16 Zoffix yeah :)
11:16 lizmat joined #perl6
11:17 Zoffix It's what the cool kids use ;)
11:18 Zoffix HoboWithAShotgun: oh, one omission: there's also a Real role that's done by all numerics except for Complex and ComplexStr
11:18 Zoffix Docs for individual types have the tree showing inheritance, though you're right, I don't know if we have one good map showing inheritances amd doings of all the types
11:19 * Zoffix &
11:19 moritz all the types tend to get unwieldly
11:20 gfldex scovit: that's where I'm at right now, but .get might make things easier. https://gist.github.com/gfldex/ecd1060c8a6fb6bda96b4af2722265ab
11:22 gfldex scovit: is that you? https://github.com/scovit?tab=repositories
11:22 scovit yes
11:25 [ptc] joined #perl6
11:26 Cabanossi joined #perl6
11:26 Zoffix HoboWithAShotgun: oh and there's also Rational tole that's done by Rat, RatStr, and FatRat :)
11:27 Zoffix I think now I got 'em all :)
11:27 lizmat http://humanstate.com/blog/2017/9/13/humanstate-represents-at-swiss-perl-workshop-2017   # small mention of Perl 6
11:27 skids joined #perl6
11:27 Zoffix You can also inspect the inheritance/roles on anything:
11:28 Zoffix m <42>.^mro.say
11:28 Zoffix m: <42>.^roles.say
11:28 camelia rakudo-moar 3f4a9f: OUTPUT: «((Real) (Numeric) (Stringy))␤»
11:28 Zoffix m :<42>.^mro.say
11:28 Zoffix bah. typing of phone sucks Well, you get the idea :)
11:29 timo1 Zoffix: that's nothing, i used to ICQ with my nintendo DS using DSLinux at one point :) :)
11:30 Zoffix timo1: heh
11:30 Zoffix timo1: are you timotimo or did we get a new timo?
11:32 orac1e_ joined #perl6
11:32 timotimo the very same
11:33 lizmat Zoffix: timotimo has opened up tp BSD
11:33 timotimo i was ... forced
11:33 lizmat by whom?
11:34 stmuk by the stack protection? :)
11:35 scovit pmurias: the point of the discussion yesterday was that putting the #defines in a constant, in that case, was the worst thing to do, putting them in a variable was second worst. sub and macro seems equivalent to me but maybe you have a point for sub over macro?
11:37 moritz subs work right now :-)
11:37 moritz macros are experimental and pretty limited in functionality
11:37 xtreak joined #perl6
11:41 scovit moritz++. I found a + for sub over macro in this case. If you have a macro exported in module A::B, which is used by module A, then if you use module A the macro will be unaccessible
11:41 scovit while you can access the sub in the A::B:: stash
11:41 scovit this might be usefull
11:44 timotimo stmuk: the server i run my irc on has been moved
11:49 stmuk ah ... by someone who has developed some security paranioa maybe?
11:51 stmuk Zoffix: roughly how much disk space does toaster use?
11:52 nadim joined #perl6
11:54 rindolf joined #perl6
11:55 moritz three slices? :-)
11:55 rindolf joined #perl6
12:00 stmuk I suspect its more http://www.rowlett.co.uk/wp-content/uploads/2016/08/Premier-32-Slot-cropped.jpg
12:00 Zoffix stmuk: the VM I use it on has 100GB and I think it used to be 20 or 10 and more than 1 toast run would fill it up. Basically, it needs enough space to store all the modules + their bytecode
12:01 Zoffix well, let me power it up and look at df
12:02 Zoffix Oh wait, I was looking at the wrong thing. 100GB is the size of RAM
12:03 Zoffix It uses a 10GB drive
12:03 Zoffix ilesystem      Size  Used Avail Use% Mounted on
12:03 Zoffix /dev/sda1       9.8G  4.5G  4.8G  48% /
12:03 Zoffix That's after a couple of toast runs.
12:03 [Coke] geekosaur: Last I heard, PRs are preferred over RTs with patches.
12:04 domidumont joined #perl6
12:05 Zoffix ~/.zef$ du -sh
12:05 Zoffix 1016M .
12:05 Zoffix stmuk: so I guess ~5-10GB will do.
12:05 grondilu m: class Foo {...}; class Bar is Foo {...}; class Foo {}; class Bar {}
12:05 camelia rakudo-moar 80e069: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤'Bar' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed)␤at <tmp>:1␤»
12:06 stmuk oh that not quite as bad as I feared .. was considering "zef uninstall" after the install but probably not worth it
12:06 * grondilu was hoping he could make a big section with predeclaration at the top of his compunit :(
12:06 stmuk I assume I can "wget https://temp.perl6.party/toast.sqlite.db" as a seed db?
12:06 simonm joined #perl6
12:07 Zoffix stmuk: no need. Just run it and it'll create a new db automagically
12:08 Zoffix stmuk: and old db is kinda useless. It was made over a month ago. If you use its data as a measure for previous commits instead of re-running them now, there's a chance modules broken by changes to modules will show up as false positives for breakage due to rakudo changes.
12:08 stmuk wouldn't using a seed db make historic comparisions easier?
12:08 stmuk ah
12:09 Zoffix IIRC the site currently uses oldest commit vs newest commit as a measure of what got burned.
12:10 Zoffix .tell Skarsnik you were asking how much HDD Toaster needed. I have the answer: https://irclog.perlgeek.de/perl6/2017-09-13#i_15156762
12:10 yoleaux Zoffix: I'll pass your message to Skarsnik.
12:21 maettu joined #perl6
12:40 Cabanossi joined #perl6
12:42 wamba joined #perl6
12:55 eliasr joined #perl6
12:59 mcmillhj joined #perl6
13:00 rgrau joined #perl6
13:00 cdg joined #perl6
13:05 cdg_ joined #perl6
13:06 mr-foobar joined #perl6
13:18 someuser joined #perl6
13:28 cgfbee joined #perl6
13:28 Levex joined #perl6
13:31 pmurias scovit: re subs for macros, why use a fairly weird experimental feature when there is a fundamental part of the language that serves that purpose
13:32 pmurias ?
13:39 masak there are a lot of use cases that subs cover perfectly well
13:39 masak anything where you feel like code should be inlined for performance, for example
13:40 masak you don't need macros for that, just a good JIT inliner (which Rakudo has)
13:40 Cabanossi joined #perl6
13:43 pmurias what's the Perl 6 equivalent of the perl 5 while (<>) {...}
13:43 lizmat for *IN.lines { }
13:43 lizmat for lines { }  actually
13:44 lizmat with the note that in Perl 6 it will have been chomped already
13:44 moritz lizmat: for line() { }
13:44 lizmat line() ?
13:44 moritz without the parens, the sub lines gobbles up the block
13:44 moritz sorry, lines()
13:45 lizmat ah, yes, with parens :-)
13:45 gfldex m: { .say } for lines;
13:45 camelia rakudo-moar 80e069: OUTPUT: «»Wann treffen wir drei wieder zusamm?«␤   »Um die siebente Stund‘, am Brückendamm.«␤     »Am Mittelpfeiler.«␤         »Ich lösche die Flamm.«␤ »Ich mit«␤␤         »Ich komme vom Norden her.«␤        »Und ich vom Süden.«…»
13:45 lizmat m: .say for lines
13:45 camelia rakudo-moar 80e069: OUTPUT: «»Wann treffen wir drei wieder zusamm?«␤   »Um die siebente Stund‘, am Brückendamm.«␤     »Am Mittelpfeiler.«␤         »Ich lösche die Flamm.«␤ »Ich mit«␤␤         »Ich komme vom Norden her.«␤        »Und ich vom Süden.«…»
13:46 lizmat no need for a block
13:46 mienaikage joined #perl6
13:51 MasterDukeMobile joined #perl6
13:53 lancew joined #perl6
13:59 pyrimidine joined #perl6
14:00 masak the DWIM of "we can skip the parens on this sub call" comes back as the WAT of "accidentally gobbled a block"...
14:01 Zoffix m: sub e { 42 }; say e
14:01 camelia rakudo-moar 80e069: OUTPUT: «2.71828182845905␤»
14:01 Zoffix :)
14:01 Zoffix m: sub d { 42 }; say d
14:01 camelia rakudo-moar 80e069: OUTPUT: «42␤»
14:04 masak Zoffix: I *think* that's to spec
14:04 moritz m: sub e { 42 }; say e()
14:04 camelia rakudo-moar 80e069: OUTPUT: «42␤»
14:05 moritz it is
14:05 Zoffix masak: yeah, it is. I was just pointing out another WAT with the omitted parens
14:05 * masak is old enough that "spec" still means "synopses" to him :)
14:05 masak Zoffix: feels like half a WAT at the most (to me) :)
14:05 Zoffix heh
14:06 masak I mean, you hit F12 or whatever in your IDE, and it takes you to the definition of `e` in the setting, no? :P
14:06 jnthn Sure, after you write the IDE... :P
14:06 Zoffix :)
14:06 masak Simple Matter Of Writing The IDE
14:07 Zoffix pmurias: FWIW, we have Perl's magic args-as-files handling generalized and you can make your own handles from multiple sources: .say for lines IO::CatHandle.new: @*ARGS, $*IN, <foo foo2>, :!chomp, :enc<latin1>
14:09 Zoffix $*ARGFILES.chomp = False; for lines() {} will turn off auto-chomping
14:12 pmurias lizmat: thanks
14:13 * stmuk starts toasting Bs
14:13 pmurias masak: hooking up Perl 6 into an existing IDE would also work (and seems like better/easier than writing a whole custom IDE)
14:14 masak pmurias: *nod*
14:15 CIAvash[m] joined #perl6
14:15 tadzik joined #perl6
14:15 mack[m] joined #perl6
14:15 M-Illandan joined #perl6
14:15 tyil[m] joined #perl6
14:15 unclechu joined #perl6
14:15 wamba[m] joined #perl6
14:15 ilmari[m] joined #perl6
14:15 Matthew[m] joined #perl6
14:15 wictory[m] joined #perl6
14:15 xui_nya[m] joined #perl6
14:15 Garland_g[m] joined #perl6
14:19 samcv oh wow i didn't know instead of { } you can also use $( )
14:19 samcv m: my $var = "hello"; say "word: '$( $var.flip )'"
14:19 camelia rakudo-moar 80e069: OUTPUT: «word: 'olleh'␤»
14:19 samcv it's pretty ugly though :P
14:19 llfourn joined #perl6
14:24 Zoffix m: my $var = "hello"; say "word: @( $var.flip )[]"
14:24 camelia rakudo-moar 80e069: OUTPUT: «word: olleh␤»
14:24 margeas joined #perl6
14:24 Zoffix m: my $var = "hello"; say "word: &( *.flip )($var)"
14:24 camelia rakudo-moar 80e069: OUTPUT: «word: olleh␤»
14:24 Zoffix m: my $var = "hello"; say "word: %( z => $var.flip )<z>"
14:24 camelia rakudo-moar 80e069: OUTPUT: «word: olleh␤»
14:25 Zoffix :)
14:25 Cabanossi joined #perl6
14:26 samcv ah so that's why it works
14:34 Aaronepower joined #perl6
14:35 lizmat yeah, feels a lot like a P5 hack  :-)
14:36 Kyo91_ joined #perl6
14:43 samcv i'm getting crashes in p6decontrv
14:43 samcv of perl6_ops.c:340 in the rakudo tree
14:44 samcv oops meant to post in #perl6-dev
14:44 mr_ron joined #perl6
14:47 zakharyas joined #perl6
14:48 stmuk I just saw a "double free or corruption" while toasting Avro (but cant reproduce)
14:50 sjn o/
14:51 * sjn just made his first pull request for rakudo o/
14:51 moritz sjn++
14:52 * lizmat just merged sjn's first pull request
14:52 cognominal joined #perl6
14:52 sjn hey, I'm not entirely sure if it works on all platforms :)
14:52 lizmat you mean, there are no tests?
14:54 sjn I have no idea how to test the automatic MAIN Usage text generation
14:54 sjn I'll run the spectest suite with that change
14:55 sjn I just ran the regular ones before pushing
14:55 lizmat sjn: it is deeply appreciated if you do that *before* submitting the PR  :-)
14:55 lizmat which regular ones ?
14:55 Cabanossi joined #perl6
14:55 moritz sjn: if you load Test::Util (in t/spec/), you get an is_run method that launches a rakudo and gives you access to the output
14:57 sjn lizmat: the ones that are run when you do a "rakudo build moar"
14:57 lizmat I have no idea what tests those are.  is that the same as "make test" perhaps ?
14:57 sjn probably. I think so
14:57 lizmat sjn: how many tests do you see?
14:58 sjn lizmat: my terminal buffer is all filled up with spectest output now, so I can't answer you any more :-)
14:59 lizmat hehe... increaze da buffer!
15:00 sjn nah, I'll file a bug about decreasing the amount of spectest</lol> :)
15:00 Actualeyes joined #perl6
15:01 Skarsnik joined #perl6
15:02 * lizmat can confirm spectest is clean after merging sjn's PR  :-)
15:03 sjn lizmat has a much faster computer than sjn
15:04 * lizmat hopes sjn is aware of TEST_JOBS=  env var ?
15:04 Zoffix I think I made it default to 6 jobs now.
15:04 sjn I'm not
15:04 sjn it looks like some tests are running in parallel
15:05 lizmat TEST_JOBS=8 make spectest  # use 8 parallel processes for testing
15:05 * sjn has only 4 cores
15:05 lizmat sjn: this is actually a Perl 5 prove feature, afaik
15:05 lizmat then TEST_JOBS=4 could be better  :-)
15:05 Zoffix Yeah, I did: https://github.com/rakudo/rakudo/commit/8019c15bb84d0039cd6968946d25d787a77f19af
15:06 Zoffix In my tests, I found the best bang for the core you get with setting jobs to 1.3x number of cores.
15:06 sjn prove6 t/spec/S06-other/main-usage.t failed :-\
15:06 Zoffix sjn: run it with t/fudgeandrun t/spec/S06-other/main-usage.t
15:06 Zoffix That will pass it through the fudger and apply fudges, if any
15:07 sjn that fails with even more noise (could not find warnings)
15:07 Zoffix huh
15:08 Zoffix sjn: where are you running that from? From rakudo's repo?
15:08 Zoffix I see some fudges in that file, so it's not expected to pass with just prove6
15:08 sjn ah, I'm using prove6 :)
15:08 Zoffix Use t/fudgeandrun :)
15:08 sjn t/fudgerun is perl5
15:08 sjn t/fudgeandrun*
15:09 Zoffix Yeah, it's a Perl runner, but it uses Rakudo to run the tests
15:09 sjn ook
15:09 Zoffix Perl Harness I mean
15:09 sjn yeah, all tests are ok with fudgeandrun
15:09 * sjn is happy o/
15:10 Zoffix \o/
15:11 Zoffix sjn: and I left a comment on your PR, but it was more of a "oh, I remember this topic of discussion from before". I see the PR was already merged, so :)
15:12 grondilu m: proto f {*}; f()
15:12 camelia rakudo-moar 62fd50: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling f() will never work with declared signature ␤at <tmp>:1␤------> 3proto f {*}; 7⏏5f()␤»
15:12 grondilu ^not quite the error I was trying to catch
15:13 * grondilu was expecting X::AdHoc
15:13 * Zoffix was expecting "only proto" error
15:13 Zoffix m: class Foo { proto f {} }.f
15:13 camelia rakudo-moar 62fd50: OUTPUT: «No such method 'f' for invocant of type 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
15:13 grondilu m: proto f {*}; multi f {}; f()
15:13 camelia rakudo-moar 62fd50: ( no output )
15:14 grondilu hum, I tought this wasn't working either :/
15:14 Zoffix m: Any.splice
15:14 camelia rakudo-moar 62fd50: OUTPUT: «Cannot resolve caller splice(Any); Routine does not have any candidates. Is only the proto defined?␤  in block <unit> at <tmp> line 1␤␤»
15:14 Zoffix I was expecting that error :)
15:15 sjn Zoffix: when did nine++ commit something? I was specifically looking to reduce the usage noise, and that hasn't really changed in a while?
15:15 ccakes joined #perl6
15:16 Zoffix sjn: some time in 2016. Maybe October 2016 or something
15:16 Zoffix sjn: I think the change was in one of the CompUnit:: classes, where it changed what the name for the installed binary is or something (/me has no clue about that area of the codebase)
15:16 sjn I've been annoyed about that issure for much longer than that. :-P
15:16 Zoffix :)
15:17 Zoffix Don't use rakudobrew :)
15:17 Zoffix huggable: sauce
15:17 huggable Zoffix, Install untested latest development version of Rakudo from source: https://github.com/zoffixznet/r#table-of-contents
15:17 * Zoffix should add a note for how to install latest release up there as well
15:17 pmurias Zoffix: we do need a nicer way of building/install rakudo+zef so that people don't use rakudobrew when they don't have to
15:18 Zoffix `git checkout 2017.08` for current release
15:18 Zoffix pmurias: well, I got one. Same initial setup as rakudobrew and simpler update command
15:19 Zoffix And no need to run rakudobrew rehash after installing binaries
15:20 Zoffix I'm talking about: https://github.com/zoffixznet/r#table-of-contents
15:21 sjn hm. my spectest run failed with t/spec/S11-modules/nested.t and t/spec/S10-packages/basic.rakudo.moar
15:22 Zoffix sjn: try running them again with t/fudgeandrun t/spec/S11-modules/nested.t t/spec/S10-packages/basic.t
15:22 sjn this was by using "make spectest" in the rakudo root dir
15:22 Zoffix sjn: those flop once in a while. I think they try to use the same test module file or something and there's a clash somewhere
15:23 sena_kun joined #perl6
15:24 sjn is there any any real work being done on reducing the amount of fudged tests?
15:25 moritz occasionally
15:25 moritz but the low-hanging fruits for that task have been mostly picked by now, so it's hard work
15:25 Zoffix Haven't heard of anyone activelly doing that. Most (all?) of them are ticketed in RT, so they get fixed whenever the ticket get fixed
15:28 Zoffix Speaking of low-hanging-fruits:
15:28 Zoffix buggable: tag TESTNEEDED
15:28 buggable Zoffix, There are 51 tickets tagged with TESTNEEDED; See http://fail.rakudo.party/t/TESTNEEDED for details
15:28 Zoffix ^ lots of easy opportunity to contribute. Writing tests to cover fixed bugs.
15:32 Zoffix moritz: weird that I get a 500 when I forget to place a second quote: https://irclog.perlgeek.de/perl6/search/?nick=nine&amp;q=only+rakudobrew%22
15:33 Zoffix Wonder if that's not a hint Bobby Tables might be around
15:35 Zoffix sjn: oh, nine's around in #perl6-dev if you wanted to talk to him about the fixes you made :)
15:36 troys joined #perl6
15:36 mr-foobar joined #perl6
15:44 pyrimidine joined #perl6
15:45 pyrimidine joined #perl6
15:50 someuser joined #perl6
15:50 levex joined #perl6
15:52 pyrimidine joined #perl6
15:52 tejr joined #perl6
15:52 kyan joined #perl6
15:53 Zoffix oops... instructions in https://github.com/zoffixznet/r used $HOME/install/… instead of $HOME/rakudo/install/… for one of the paths :)
15:53 * Zoffix should practices the self-preachings and start using that bash alias on all the boxes :)
15:56 pyrimidine joined #perl6
15:58 pmurias joined #perl6
16:01 pyrimidine joined #perl6
16:02 replacementimo joined #perl6
16:10 xinming_ joined #perl6
16:11 Cabanossi joined #perl6
16:14 cdg joined #perl6
16:20 Hor|zon joined #perl6
16:32 cdg_ joined #perl6
16:33 mr-fooba_ joined #perl6
16:43 dogbert17 joined #perl6
16:44 tejr left #perl6
16:47 nohuhu joined #perl6
16:49 leont joined #perl6
16:49 mcmillhj joined #perl6
16:50 Zoffix Heh, cool. "C Programming: The Modern Approach" talks about defining a `loop` macro to mean `for (;;) {}`  :)
16:51 Zoffix m: loop { "I've seen that somewhere".say and last }
16:51 camelia rakudo-moar 2574f8: OUTPUT: «I've seen that somewhere␤»
16:51 mspo Zoffix: what kind of insane person would do that?
16:52 mspo or is the book some kind of satire? :)
16:52 Zoffix Nah, it's just a section about preprocessor. The loop macro *is* followed by "changing language syntax is usually not a good idea"
16:53 Zoffix .oO( make a bunch of macros to make C look like Rakudo and use them in MoarVM source code )
16:54 Zoffix mspo: Actually, I think I'm the kind of insane person who will be doing it. for (;;) looks ugly :)
16:54 robertle joined #perl6
16:55 pmurias moritz: I have encoutered a few fudged tests that are fossils and/or don't make sense, so I'm pretty sure there are some remaining that just need to be removed
16:56 Cabanossi joined #perl6
17:00 * leont has seen begin/end macros written by a pascal programmer forced to do C, this road is never a good idea
17:01 Skarsnik Zoffix, I use while (1) for this kind of loop x)
17:01 khw joined #perl6
17:02 * leont would use while (1) too
17:05 Zoffix :)
17:07 AlexDaniel joined #perl6
17:10 hythm How to get the current file name in $*ARGFILES, I checked methods of $*ARGFILES but could not find it there
17:10 hythm m: $*ARGFILES.filename # something like that
17:10 camelia rakudo-moar 2574f8: OUTPUT: «No such method 'filename' for invocant of type 'IO::ArgFiles'␤  in block <unit> at <tmp> line 1␤␤»
17:11 Zoffix hythm: .path
17:11 hythm m: $*ARGFILES.path # something like that
17:11 camelia rakudo-moar 2574f8: ( no output )
17:11 hythm thankx Zoffix
17:11 Zoffix m: $*ARGFILES.path.say
17:11 camelia rakudo-moar 2574f8: OUTPUT: «IO::Special.new("<STDIN>")␤»
17:11 lancew joined #perl6
17:12 Zoffix hythm: it's a IO::CatHandle which is basically a normal IO::Handle with all the same methods and attributes: https://docs.perl6.org/type/IO::CatHandle
17:12 Zoffix (writer methods just throw a NYI at the moment; no idea what they should do)
17:13 Zoffix And .seek method is speshul in that it doesn't automaticaly switch to next handle in queue when seeking past end
17:15 hythm Zoffix: makes sense. I was looking for a method ".filename", did not notice ".path"
17:16 Zoffix Yeah, sometimes it's hard to know what to look for :) That's why we have humans to help here :)
17:17 Zoffix There actually used to be a .filename attribute pre-IO-Grant that made IO::ArgFiles an IO::CatHandle: https://github.com/rakudo/rakudo/blob/d0c2abeb62f66ad5e15081eb408dc1e49e2d9876/src/core/IO/ArgFiles.pm#L3
17:17 Zoffix As I recall it never worked right tho
17:24 domidumont joined #perl6
17:38 ChoHag joined #perl6
17:47 hythm Zoffix, that's true. I just read the IO::Path docs, many useful methods are there
17:48 leont joined #perl6
17:49 rouking joined #perl6
17:50 nige joined #perl6
17:52 Zoffix \o/
17:57 skids joined #perl6
18:04 knobo joined #perl6
18:06 mr-foobar joined #perl6
18:08 Kyo91_ joined #perl6
18:10 moritz leont: oh hai
18:10 moritz leont: on twitter, you mentioned that you liked your approach to parsing indented stuff more than mine
18:11 moritz leont: care to elaborate on that? I'm always looking for new perspectives on parsing
18:11 Cabanossi joined #perl6
18:11 leont I don't like contextual variables, I prefer to pass them as arguments, that's most of the difference really.
18:12 leont (Well, I don't necessarily dislike them, but in a parser they feel … wrong to me
18:14 moritz leont: do you have experience passing arguments down proto tokens?
18:14 moritz does that work without any hassle?
18:14 Zoffix It doesn't work at all
18:15 moritz :(
18:16 Zoffix m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo"
18:16 camelia rakudo-moar 9f1d03: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$n' is not declared␤at <tmp>:1␤------> 3; proto token foo($) {*}; foo:sym<meow>(7⏏5$n) { { dd $n }; .+ } }.parse: "foo"␤»
18:16 Zoffix Unless I'm doin' it wrong?
18:16 leont See TAP and YAMLish for two highly related approached I took (one took indentation level as argument, the other a litteral string)
18:16 Zoffix buggable: eco YAMLish
18:16 buggable Zoffix, YAMLish 'A pure perl6 implementation of YAML': https://github.com/Leont/yamlish
18:17 Zoffix :sym has no matches
18:17 leont I'd advice looking at TAP First, YAMLish is rather long and complicated (because YAML)
18:17 Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n }; .+ } }.parse: "foo"
18:17 camelia rakudo-moar 9f1d03: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3 foo {*}; foo:sym<meow> { { dd $*n }; .+7⏏5 } }.parse: "foo"␤»
18:17 moritz m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo"
18:17 camelia rakudo-moar 9f1d03: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter ; (must be quoted to match literally)␤at <tmp>:1␤------> 3{*}; token foo:sym<meow>($n) { { dd $n }7⏏5; .+ } }.parse: "foo"␤Malformed regex␤at <tmp>:1␤------> 3}; token foo:sym<meow>($…»
18:17 Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n } .+ } }.parse: "foo"
18:17 camelia rakudo-moar 9f1d03: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3en foo {*}; foo:sym<meow> { { dd $*n } .7⏏5+ } }.parse: "foo"␤»
18:18 moritz m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n } .+ } }.parse: "foo"
18:18 camelia rakudo-moar 9f1d03: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤  in regex foo:sym<meow> at <tmp> line 1␤  in regex foo at <tmp> line 1␤  in regex TOP at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:18 Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; token foo:sym<meow> { { dd $*n } .+ } }.parse: "foo"
18:18 camelia rakudo-moar 9f1d03: OUTPUT: «Int $*n = 42␤»
18:18 leont I would classify that as a bug in proto tokens
18:18 Zoffix That's basically the only workaround I know of :)
18:18 Zoffix moritz: I'm hoping you can fix it :D
18:19 Zoffix The other week someone was asking for it too and there's a ticket from 2014
18:19 Zoffix This one: https://rt.perl.org/Ticket/Display.html?id=122972#ticket-history
18:20 andrzejku joined #perl6
18:20 espadrine joined #perl6
18:23 ugexe i suspect thats also part of why sprintf isn't thread safe
18:26 andrzejku joined #perl6
18:27 cdg joined #perl6
18:34 cdg joined #perl6
18:38 wamba joined #perl6
19:10 Cabanossi joined #perl6
19:12 timo joined #perl6
19:23 raschipi joined #perl6
19:24 mcmillhj joined #perl6
19:30 moritz does anybdoy want to proof-read my Perl 6 Regexes and Grammar book?
19:31 Zoffix moritz: yeah, I could. Considering I wanted to read properly… kill two birds with one stone, eh?
19:31 Zoffix *read it
19:32 moritz Zoffix: do you prefer a PDF (or epub or so), or markdown sources?
19:33 Zoffix moritz: what's the preferred way to submit corrections?
19:33 moritz Zoffix: git :-)
19:34 setty1 joined #perl6
19:34 perlpilot moritz: I'll proofread it
19:34 Zoffix moritz: then I guess markdown sources sound good
19:35 moritz perlpilot: I'll need an SSH pubkey to give you access
19:36 moritz Zoffix: git clone git@tina.perlgeek.de:perl6regex.git
19:36 moritz files are in manuscript/*.md
19:38 Zoffix moritz: sweet. What's my due date and which subset of English are you using (American, UK, etc)?
19:38 moritz perlpilot: same git clone instruction for you :-)
19:38 ChoHag joined #perl6
19:38 mcmillhj joined #perl6
19:38 moritz Zoffix: about two weeks; Oxford comma :-)
19:39 moritz and American English
19:39 Zoffix OK :)
19:40 Skarsnik Oxford comma hurt my eyes !
19:40 geekosaur joined #perl6
19:41 Zoffix Oxford comma rules :)
19:41 moritz Skarsnik: blanks before punctuation hurts my eyes :-)
19:41 leont That's also my style :-)
19:42 moritz and bdfoy's code layout also hurts my eyes :/
19:42 leont And actually, I do want to proof read it too, given that I tend to do more grammar stuff than most :-)
19:42 Zoffix haha. blanks before punct is French style :)
19:42 Skarsnik seriously the oxford comma rule make no sense x)
19:42 Zoffix Skarsnik: it adds clarity in many situations and it makes sense to use it consistently
19:43 moritz leont: git clone git@tina.perlgeek.de:perl6regex.git
19:44 perlpilot Skarsnik: https://www.nytimes.com/2017/03/16/us/oxford-comma-lawsuit.html  :-)
19:44 moritz if somebody also wants the PDF in a dropbox folder, /msg me the email address that I should send the invitation to
19:47 Skarsnik perlpilot, I don't even get the mistake in the law
19:51 Zoffix Skarsnik: without the Oxford comma the text is ambiguous. Does it mean ("packing for shipment" || "distribution for (a) (b) (c)) or ("packing for " ("shipment" || "distribution for (a) (b) (c)"))
19:51 * Zoffix &
19:52 Zoffix Or rather, the ambiguity exists only because Oxford comma is not a hard rule :)
19:54 teatime "This book is dedicated to my parents, Ayn Rand and God."
19:55 orac1e_ joined #perl6
19:59 perlpilot teatime: if Ayn Rand and God are really the parents, that comma should be a colon or a dash.    It's just another case of people not using all the punctuation available to them.   And those people should learn Perl  ;-)
20:00 teatime lol
20:01 Aaronepower joined #perl6
20:02 tbrowder hi #perl6
20:05 geekosaur joined #perl6
20:05 pyrimidine joined #perl6
20:06 P6steve joined #perl6
20:07 pyrimidi_ joined #perl6
20:08 raschipi hi tbrowder
20:08 tbrowder i'm working with DBIish and trying to figure a clean way to detect an error. after a statement prepare and execute i have tested both the statement handle and the db handle for .err and so far neither has shown an error even though i think it should (testing for a key in a non-existent table, sqlite3).
20:08 P6steve hello - quick question - I think that this %h<units>:exists being broken is a known issue (127767) - any advice on an alternative phrasing?
20:08 cdg joined #perl6
20:08 tbrowder hi raschipi!
20:08 lizmat RT #127767
20:08 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=127767
20:09 Skarsnik m: my %h = a => 'b'; say %h<a>:exists; say %h<b>:exists;
20:09 camelia rakudo-moar b706b8: OUTPUT: «True␤False␤»
20:10 lizmat P6steve: %h<units>:exists works afaik
20:10 lizmat that ticket is really about an LTA error message for !%h<units>:exists
20:10 Skarsnik Ho it's !
20:11 lizmat use %h<units>:!exists if you want to check for non-existence
20:11 P6steve thanks liz - reading the RT to more closely understand prefix:<!> relation
20:12 P6steve ah that';s the ticket %h<units>:!exists thanks!
20:12 Skarsnik tbrowder, hm weird
20:12 pyrimidine joined #perl6
20:12 Skarsnik m: my %h = a => 'b'; say "plop" if ! %h<b>:exists;
20:12 camelia rakudo-moar b706b8: OUTPUT: «Unexpected named argument 'exists' passed␤  in block <unit> at <tmp> line 1␤␤»
20:12 tbrowder the sql statement is: select * from tableone where colname = "idx"
20:13 Skarsnik Oh yeah that will just return nothing
20:13 tbrowder but the table doesn't exist so i expect an error,
20:13 Skarsnik Oh the table
20:14 pyrimidine joined #perl6
20:14 P6steve my brain is going to hurt when this is a private class attribute hash %!h<key>:!exists. ;-)
20:15 P6steve thanks for the guidance
20:16 lizmat there's always %!h.EXISTS-KEY("key")
20:16 pyrimidine joined #perl6
20:16 lizmat but that would be more typing
20:16 * Juerd prefers "not" to "!" because "!" is easily missed when scanning code.
20:16 lizmat and it would be cheating a bit
20:17 Juerd And in real life, it's less noisy because your hash will probably be called something longer than 'h'.
20:17 Skarsnik tbrowder, how do you call the statement? *don't remember much about dbiish* execute fail?
20:19 tbrowder anyway, do i need a try block to catch an error in DBIish or is there a way to test the handles. i tried to read the DBIish module guts but it's not clear to me. i'll post the code and be back later...
20:19 [Coke] lizmat, Zoffix: btw, I added TEST_THREADS to a few of the async-using tests in perl6-doc, which is how many running tasks you want to allow from a single file. (didn't see any prior art)
20:19 perlpilot m: my %h = a => 'b'; say "plop" if %h<b>:!exists;
20:19 camelia rakudo-moar b706b8: OUTPUT: «plop␤»
20:19 Skarsnik I think you need to use a try block yes
20:19 pyrimidi_ joined #perl6
20:20 Skarsnik yeah you get a X::DBDish::DBError
20:20 Skarsnik but it should have make your code die probably
20:22 pyrimidine joined #perl6
20:23 tbrowder ok i'll "try" the block...thanks Skarsnik
20:23 Skarsnik https://github.com/perl6/DBIish/blob/master/t/41-sqlite-exec-error.t some example in that
20:24 cdg_ joined #perl6
20:27 Skarsnik_ joined #perl6
20:30 knobo joined #perl6
20:31 pyrimidine joined #perl6
20:32 leont pyrimidine: how is BioPerl6 doing nowadays?
20:32 Zoffix P6steve: you can also use the .not method: %!h<foo>:exists.not
20:33 * Zoffix uses `unless` in most of such cases
20:33 Skarsnik_ unless is nice :)
20:34 Zoffix [Coke]: what do you think about using TEST_JOBS instead of TEST_THREADS to match the name we use for this purpose in roast and nqp?
20:35 [Coke] TEST_JOBS is different?
20:35 Zoffix Ah, OK :)
20:35 [Coke] TEST_JOBS is number of simultaneous files to run. that's in prove, still works fine in docs.
20:36 P6steve hey zoffix I may try the look of .not - I confess that sin my style mixing unless with if can lead to twisty passages
20:36 [Coke] this is "I have one test file, how many threads can I use simultaneously". it's a crappy api because TEST_THREADS=5 TEST_JOBS=10 make xtest is suddenly maybe 50 threads. (but it defaults to 2, which seems reasonable)
20:36 pyrimidine joined #perl6
20:36 leont What's really needed is a job server like gmake uses
20:36 [Coke] trying with the latest rakudo (with jnthn's scheduler updates) prove isn't showing me any progress. it's just 0/318 ... and then done.)
20:37 Zoffix P6steve: :) yeah, I've seen some of those :)
20:37 leont But prove doesn't use that, and rakudo (or actually moar) doesn't expose the functionality I need to implement it in perl6 yet
20:37 leont If you see that when using prove, it's a well known bug in prove
20:37 Zoffix I think there was a bug in our t/harness6 test runner due to a tripple negative in unless :)
20:37 leont (or at least with -j$x)
20:38 [Coke] leont: never seen that issue with prove before.
20:38 [Coke] so when I just compiled a new rakudo that tweaks threading, seemed a likely culprit. maybe we're just tickling it now. *dunno*
20:40 goofy joined #perl6
20:40 Cabanossi joined #perl6
20:40 leont It only happens under very specific circumstances. The cause is well understood, the fix requires rewriting at least half of prove/TAP::Harness.
20:41 nige joined #perl6
20:41 pyrimidine joined #perl6
20:42 leont https://rt.cpan.org/Public/Bug/Display.html?id=108390
20:43 pyrimidine joined #perl6
20:52 orac1e_ joined #perl6
20:58 knobo joined #perl6
21:01 sena_kun joined #perl6
21:07 aindilis` joined #perl6
21:08 raschipi_ joined #perl6
21:10 leont Anyone have an opinion if YAMLish should return Lists or Arrays for its data?
21:12 TEttinger joined #perl6
21:13 pyrimidine joined #perl6
21:16 pyrimidi_ joined #perl6
21:16 Zoffix Lists :)
21:16 raschipi_ leont: I would be glad if it were a Seq, actually.
21:16 Zoffix There are some perf perks to Lists, so it's nice to get those by default.
21:18 leont My current refactor accidentally makes them lists (used to be arrays), still not sure if this is good or bad
21:18 raschipi_ Well, I don't think parsing YAML in a as-needed basis would be feasible now that I think of it, so it should be a List.
21:19 raschipi_ leont: It's good. Returning Arrays was a bug you just fixed.
21:19 leont Yeah, as-needed is definitely too much of a complication
21:19 mspo yaml has representations for both?
21:19 mspo item:\n -foo\n -bar\n -moo
21:20 raschipi_ That's a List in a Dictionary, isn't it?
21:22 leont In YAML spec language, that's a sequence in a map
21:22 skids joined #perl6
21:22 leont My question is really "should a YAML sequence translate to a Perl6 List or a Perl6 Array"
21:22 raschipi_ List, for sure.
21:23 raschipi_ Because it's easy for converting it to an Array. Doing the opposite would be just a waste.
21:24 leont I don't think we have an equivalent a map, right?
21:24 raschipi_ Yeah, there's Map
21:24 raschipi_ https://docs.perl6.org/type/Map
21:30 raschipi joined #perl6
21:35 Kyo91_ joined #perl6
21:36 pyrimidine joined #perl6
21:40 Cabanossi joined #perl6
21:45 BooK m: say Order::More.succ
21:45 camelia rakudo-moar 963b28: OUTPUT: «2␤»
21:45 BooK m: say Bool::True.succ
21:45 camelia rakudo-moar 963b28: OUTPUT: «True␤»
21:45 BooK why?
21:45 BooK why is one going over the end of the items in the enum and not the other?
21:45 Zoffix s: True, 'succ', \()
21:45 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/963b28d19/src/core/Bool.pm#L35
21:45 BooK I'm not asking how
21:46 pyrimidine joined #perl6
21:46 BooK I have the code under my eyes, I see how :-)
21:47 BooK but why was it decided that True.succ would be True, and not 2, or conversely why isn't Order::More.succ simply Order::More
21:47 BooK I'm questioning the difference in behaviour between differents enums
21:48 Zoffix s: More, 'succ', \()
21:48 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/963b28d19/src/core/Numeric.pm#L31
21:48 BooK and in fact, why don't they just rollover? or bounce off the ends back in the reverse direction?
21:49 BooK boustrophedon enums!
21:49 Zoffix I was just looking at blame :)
21:49 pyrimidi_ joined #perl6
21:49 BooK yeah, the second time I didn't complain, because I understood it was for you, not me ;-)
21:50 ugexe "succ is short for "successor"; it returns the next enum value. Bool is a special enum with only two values, False and True. When sorted, False comes first, so True is its successor. And since True is the "highest" Bool enum value, its own successor is also True."
21:50 Zoffix Order::More uses just your generic .succ/.pred from Numeric, while Bool was made to its current behaviour in 2011. I'd guess it was just special-cased for Bool because it really feels more like its own thing rather than just any old Enum
21:51 BooK I'm more annoyed with the inconsistency, than at the actual behaviour
21:53 Zoffix "<pmichaud> thus far I think I'm firmly in the camp of "Bool is not an enum""
21:53 Zoffix From around here: https://irclog.perlgeek.de/perl6/2011-07-28#i_4182343
21:53 raschipi But is it an Enumeration?
21:53 Zoffix I mean, from around the time the Bool.succ/.pred were made to be that way
21:54 ugexe i dont understand what sorting is supposed to do with it
21:54 BooK good old $| in Perl5 solved this nicely
21:54 tbrowder Skarsnik: i got the try block working now, just need to tweek the handling...thanks!
21:54 BooK perl -e 'print $|++ for 0..6; print $/; print $|-- for 0..6; print $/'
21:55 BooK 0111111
21:55 BooK 1010101
21:55 lizmat I would argue that the behaviour of Enum.succ going beyond the last value, is a bu
21:55 lizmat g
21:56 BooK lizmat: I'd tend to agree
21:56 BooK m: say False.prec
21:56 camelia rakudo-moar 963b28: OUTPUT: «No such method 'prec' for invocant of type 'Bool'. Did you mean any of these?␤    asec␤    grep␤    pred␤    sec␤␤  in block <unit> at <tmp> line 1␤␤»
21:56 Zoffix With the standard Numeric way, False.pred and .succ would always return a truthy value, while True.succ would still be true, and True.pred would be false. Just feels to be all over the map
21:56 Zoffix lizmat++ Yeah, I agree too
21:56 BooK m: say False.pred
21:56 camelia rakudo-moar 963b28: OUTPUT: «False␤»
21:56 lizmat please rakudobug, will look at it tomorrow
21:57 BooK the flip-flop behaviour of $| was so cool
21:57 ugexe we have a flip flop operator...
21:58 ugexe dont know anything else about it, but there is one!
21:59 raschipi More than one, ff and fff
21:59 BooK is it like  .. and ... ?
22:00 raschipi One is awk-like and the other sed-like
22:02 leont Got to catch them all!…
22:03 tbrowder ref: META6.json: the old Test:: META seems not to work as it used to. What is the recommended way to have a meta test now for a user module, use META6::Bin?
22:05 BooK if False.pred was True, then repeatedly .prec on a Bool would flip/flop while repeatedly .succ on a Bool would stay True after a short while
22:05 BooK while that sounds cool for Bool, not it would be wise to generalize for any Enum (going forward to stop at the max, going backwards you rollover)
22:06 BooK not *sure*
22:07 Zoffix If we make it go to max for .succ and stop there and go to min for .pred and stop there, we'll maintain the current Bool.succ/.pred behaviour, while fixing Order stuff :)
22:08 Zoffix I'm not a fan of what Perl does. All of these special tricks is exactly why people who hate it hate it: too complex to learn all of them (and keep them learned).
22:08 * Zoffix calls it a day
22:08 Zoffix \o
22:09 BooK Zoffix: yeah, I think it makes more sense to stop whenever your reach the end
22:09 BooK whatever end
22:09 BooK will email rakudobug@perl.org with hopefully something that makes sense
22:09 BooK or better, I could submit a patch that does that, and let someone more knowledgeable make it better
22:16 AlexDaniel it's interesting how people were thinking that enum Bool is not going to happen
22:16 AlexDaniel and then it just did :)
22:17 * lizmat also calls it a day
22:18 pyrimidine joined #perl6
22:21 tbrowder disregard for now, i'm nuking my .zef directory...
22:27 pyrimidine joined #perl6
22:29 tbrowder that didn't help!  zef can't find the deps for META6--do i need the zef "nuke" option?
22:33 replacementimo joined #perl6
22:36 cdg joined #perl6
22:38 vendethiel- joined #perl6
22:41 tbrowder well, that was drastic, but it looks like starting over will fix the problem (he says while whistling in the dark)...
22:48 timo oh tbrowder, how did your read-write benchmark go after the recent changes to I/O performance?
22:52 adu joined #perl6
23:11 Cabanossi joined #perl6
23:26 ugexe tbrowder: `zef uninstall xxx` for each of those problem dependencies, then they will install
23:27 tbrowder ugexe: too late, i'm starting over!
23:28 ugexe starting over with zef can be done with `zef nuke site home StoreDir`
23:29 ugexe although you'll have to reinstall zef after
23:29 tbrowder timo: i'm still cleaning up, and rw tests are next in line--i'll report to jnthn and here when i get there.  i do agree with jnthn that results of ASCII reads now are  "good enough" for now that p6 beats p5 in utf8!
23:30 tbrowder ugexe: i did that and am now installing ALL modules for fun! (with a perl6 script, of course!)
23:30 tbrowder feature request: new zef option install all
23:30 replacementimo joined #perl6
23:30 geekosaur joined #perl6
23:36 pyrimidine joined #perl6
23:36 raschipi That looks like a feature for the Ecosystem instead, generate a Task::All on a GitHub hook.
23:41 Cabanossi joined #perl6
23:46 ugexe "all" is too ambiguous - all the versions? all the auths? if (NYI) optional dependencies are listed, which dependency path gets chosen that corresponds to "all"?
23:48 raschipi Being purpussufully obtuse is really annoying.
23:49 ugexe ive thought about these things for a long time. i'm not sure what you are talking about.
23:51 raschipi "all" means as many as possible.
23:56 ugexe and you don't see how that is not useful?
23:59 ugexe installing multiple old versions that may no longer work for instance. not only is this probably not what someone really wanted, but it also introduces all sorts of possible conflicts/interactions between the multiple versions

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

Perl 6 | Reference Documentation | Rakudo