»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
u-ou what usually happens about licensing if you copy an open-source project without reading its code? 00:24
by copy i mean emulate or mimic the behaviour as opposed to copying code 00:25
ugexe en.wikipedia.org/wiki/Clean_room_design 00:32
u-ou thanks 00:33
I guess I just need to license it as if I were using their code? 00:37
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
with my own implementation
ugexe have you looked at the code?
u-ou no
ugexe then it shouldnt matter 00:39
u-ou ok
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:25
(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
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
u-ou maybe i'll talk to the project coordinator 01:34
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:36
geekosaur if you go the rlwrap route, you have to run it yourself (rlwrap perl6) just like any other rlwrap user 01:38
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
if you wanted it to be automatic then you need to install the appropriate perl 6 module, not rlwrap
rlwrap is just sometimes easier to install and doesn't require e.g. API compatibility with any perl modules 01:39
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
will I need to package it myself?
geekosaur "You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor"
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:41
kyan Right, that's why I installed the rlwrap — I didn't see the other two in the distribution 01:42
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
gentoo likely does not package it. use the command it told you, not your distro
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)
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:43
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)
geekosaur er 01:44
zef is perl 6's package manger 01:45
kyan right, if it installs code I'll just make a native Gentoo package for whatever it installs instead... thanks! 01:45
geekosaur zef will look up the appropriate package and install it for you, althoygh it will not help with C libs that come from an OS distribution (but on gentoo this should not be an issue, unlike RH/centos/ubuntu it does not separate runtime and dev packages) 01:46
kyan it won't register it with Gentoo's Portage package manager, though, will it? If I put it in Portage, then I can do integrity checks and everything with the rest of my system. I do the same thing for Firefox addons, npm packages, Kodi plugins, etc.. Any files other than personal data and config being outside of the system package manager is alarming to me 01:48
geekosaur so far as I can see gentoo only packages rakudo, although there appear to be plans to have it do more (it has a perl6 metapackage but all it installs is rakudo so far)
kyan cool, I'll just look at zef and see where it gets the code, and make a Gentoo package for it. Thanks! 01:49
geekosaur also the rakudo ebuild says it will fail if a rakudo, including gentoo's ebuild, is already inastalled
I suggest you *not* use that uynless you like pain
u-ou why don't you just use zef :S
kyan I never let anything into my system outside of Gentoo's package manager. That way, it's all organized and in one place. Helps me feel more sane 01:50
Most languages already have the packages available in Portage, but I guess no one's done that for Perl6 yet 01:51
geekosaur that's nice. so you do that slavishly even then the ebuild itself says it is broken and will bite you?
gitweb.gentoo.org/repo/gentoo.git/...ebuild#n36
kyan I mean, sounds like it's a known issue, so I can just do what it says (unmerge then remerge) if I need to update 01:52
and presumably it'll be fixed at some point anyway
geekosaur translation if you did not understand that message: "you cannot upgrade this, you must removie it and all depndents and reinstall them again""
kyan (don't have to remove all it's dependents, I don't think? Could just force-unmerge it, leaving dependents in place, re-merge, and assuming the new version is ABI compatible be good to go?) 01:53
cuonglm Does rakudo development is frozen in some days? 01:54
kyan Anyway, if it's a known issue it's not something I'll have to really think about, assuming it's fixed soon at some point
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
geekosaur cuonglm, very active development, do you have an RT #? 01:57
cuonglm geekosaur: No, just a TODO in source code, here's relevant PR github.com/rakudo/rakudo/pull/1154 01:59
geekosaur I don't know thta anyone catches random PRs, most stuff is done through RT
and #perl6-dev is probably a better channel to ask about this 02:00
cuonglm geekosaur: thanks 02:02
geekosaur (actually I'd suspect I know who would get notified of PRs.. and he's on vacation) 02:04
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
nige a Cro-based backend service to implement this protocol? langserver.org/ 05:04
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:43
kent\n bonus points if you have it do the right thing when somebody reinstalls the rakudo from source. 06:45
gfldex .oO(WTB title offering blog post) 08:24
gfldex lolibloggedalittle: gfldex.wordpress.com/2017/09/13/go...last-fifo/ 08:45
lizmat gfldex++ 08:49
gfldex: is there a file-test that you can perform to find out if something is a fifo ? 08:51
gfldex `ls` knows so there must be 08:52
lizmat: bash got `-p $fifo` 08:53
lizmat hmmm.... I guess we would need support for that at the MoarVM/nqp level first
Xliff \o 08:56
If I have a class is repr('CStruct'), is it possible for the class to have attributes that are not visible to 'C'? 08:57
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 :)
gfldex lizmat: see `man 2 stat` :)
Xliff jnthn: Er. Not really. Good chance of a segfault.
gfldex m: react { whenever Supply.interval(1) { say .Int } }; 08:59
how do I use Supply.interval ?
camelia (timeout)0
lizmat gfldex: like that, works for me as a one liner 09:00
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 :)
Xliff jnthn: Heh. Well I did not preclude that assumption in the initial description.
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.
So I am taking it that's a no and I have to use a wrapper?
Or a hack.
(I'm thinking hack)
jnthn Xliff: Yeah, I'd pretty much always take the wrapper class approach myself rather than such tricks :)
lizmat Xliff: the timeout is not the issue, the fact that the output only contains 0 *is*
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 :)
lizmat: Yeah, when the bot kills the process due to timeout, we won't get chance to do an orderly flushing
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
Xliff Plus, the output is a count. Not always 0.
jnthn lizmat: Well, we could have the bot sneak a signal handler in before the code, sure 09:05
lizmat: Though a better solution would perhaps be for it to allocate a tty or some such
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.
Xliff &
lizmat the only thing the bot would need is: signal(SIGINT).tap: &exit 09:07
or possibly signal(SIGINT).tap: { exit(255) } if you want another exit value 09:08
sjn hm. just a thought. would it be an idea to create a conveniency function for "signal(SIGINT).tap: { ... }"? e.g. just "SIGINT { ... }" 09:13
jnthn Sounds like something for a module 09:14
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) { })
*probably be
sjn yeah
sjn notices that "whenever" doesn't have it's own entry in the docs 09:16
jnthn Hm, that maybe also means it's not searchable? 09:17
sjn it's mentioned in doc/Language/concurrency.pod6 09:19
so there's *something*
gfldex jnthn: it is searchable
sjn same goes for react 09:20
gfldex both don't got a heading so they wont show up in the ToC
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:56
gfldex scovit: it indeed does what doesn't play well with react. Working on it. 09:59
Xliff So... I was trying to sleep when the hack solution came to me. 10:00
Create another module with non-exported our variables that contain all the extra attributes.
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:01
jnthn: Thoughts? :) 10:02
jnthn our variables?
What if the module is used from multiple threads at the same time?
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
the display in weechat is still full of ?, but i can at least type ümläüt
scovit gfldex: good luck with that! I might suggest this excellent review www.kegel.com/c10k.html 10:10
stmuk I think the OpenBSD xterm does support utf8 now so maybe its a font issue? 10:16
Xliff jnthn: DAMMIT, MAN! I knew you were going to ask that! 10:25
Xliff And I solved THAT one, TOO! 10:25
Well... mostly.
lizmat :-) 10:25
Xliff I would need to write a class that Proxy's the attribute. 10:25
Xliff So STORE would set the value to $attr{$*THREADID} and FETCH would return the same. 10:26
But that's MOAR work, not less!
I know $*THREADID is not the right var. Too tired to go look it up. 10:27
Remember, I was trying to go to sleep 90 minutes ago and had to code this or I'd lose it.
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
i thought i set that
timo1 nope, didn't help 10:30
stmuk timo1: ah! not sure about tmux I'm still in the stone age with screen
Xliff <- screen too 10:30
stmuk despite tina's advocacy :)
Xliff How would you run tmux in a VirtualBox guest? 10:31
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 irclog.perlgeek.de/perl6-dev/2017-...i_15156473
yoleaux gfldex: I'll pass your message to AlexDaniel.
Xliff Now to hope morpheus comes along and guides me to the land of the promised SLEEP!
Xliff &
pmurias scovit: why do you want to use 'macro a is export { quasi { CBuffer.new("Ciao") } }' instead of sub a {CBuffer.new("Ciao")} 10:53
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. docs.perl6.org/routine/get 10:57
scovit pmurias I am still learning how to do things in Perl6. In this case a sub would be best, right? 11:02
in C it was a macro
HoboWithAShotgun m: class foo { has Rat $.bar; }; foo.new( bar => 60 ); 11:05
camelia Type check failed in assignment to $!bar; expected Rat but got Int (60)
in block <unit> at <tmp> line 1
yoleaux 12 Sep 2017 18:47Z <gfldex> HoboWithAShotgun: you can get hold of named params at runtime: gist.github.com/gfldex/44eeaceb7d0...214d0cccfc
HoboWithAShotgun why doesn't this auto convert?
Zoffix HoboWithAShotgun: that's just how the language works.
HoboWithAShotgun: many types can be converted to others. If conversions were done automatically, there'd be less point in using types 11:06
HoboWithAShotgun: there's a corser syntax. Though it's NYI for attributes; you'll need to define your own BUILD or TWEAK submethod 11:07
Zoffix m: -> Rat() $x { dd $x.nude }(42) 11:08
camelia (42, 1)
scovit Zoffix: why not! 11:09
Zoffix scovit: why not what?
scovit .get instead of lines! Apparently you don't even need the :rw flag
'my $fifo = open("radio-fifo-in", :r); while defined $_ = $fifo.get { .say }' 11:10
does waiting and terminates at EOF
Zoffix right; you'd need :w only when also writng and it defaults to :r
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
and in Perl6 too if you want to use the .lines method
instead of .get
HoboWithAShotgun the type docs is just a flat list, i can't find any inheritance tree 11:12
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:14
m: class Foo { has Rat $.x; submethod BUILD (Rat(Cool) :$!x) {} }.new(:42x).x.nude.say 11:15
camelia (42 1)
HoboWithAShotgun "cool", eh? 11:16
moritz docs.perl6.org/type/Cool.html
Zoffix yeah :)
Zoffix It's what the cool kids use ;) 11:17
HoboWithAShotgun: oh, one omission: there's also a Real role that's done by all numerics except for Complex and ComplexStr 11:18
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
Zoffix & 11:19
moritz all the types tend to get unwieldly
gfldex scovit: that's where I'm at right now, but .get might make things easier. gist.github.com/gfldex/ecd1060c8a6...f2722265ab 11:20
scovit: is that you? github.com/scovit?tab=repositories 11:22
scovit yes
Zoffix HoboWithAShotgun: oh and there's also Rational tole that's done by Rat, RatStr, and FatRat :) 11:26
I think now I got 'em all :) 11:27
lizmat humanstate.com/blog/2017/9/13/human...kshop-2017 # small mention of Perl 6
Zoffix You can also inspect the inheritance/roles on anything: 11:27
m <42>.^mro.say 11:28
m: <42>.^roles.say
camelia ((Real) (Numeric) (Stringy))
Zoffix m :<42>.^mro.say
bah. typing of phone sucks Well, you get the idea :)
timo1 Zoffix: that's nothing, i used to ICQ with my nintendo DS using DSLinux at one point :) :) 11:29
Zoffix timo1: heh 11:30
Zoffix timo1: are you timotimo or did we get a new timo? 11:30
timotimo the very same 11:32
lizmat Zoffix: timotimo has opened up tp BSD 11:33
timotimo i was ... forced
lizmat by whom?
stmuk by the stack protection? :) 11:34
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:35
moritz subs work right now :-) 11:37
macros are experimental and pretty limited in functionality
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
while you can access the sub in the A::B:: stash
this might be usefull
timotimo stmuk: the server i run my irc on has been moved 11:44
stmuk ah ... by someone who has developed some security paranioa maybe? 11:49
Zoffix: roughly how much disk space does toaster use? 11:51
moritz three slices? :-) 11:55
stmuk I suspect its more www.rowlett.co.uk/wp-content/upload...ropped.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
well, let me power it up and look at df 12:01
Zoffix Oh wait, I was looking at the wrong thing. 100GB is the size of RAM 12:02
It uses a 10GB drive 12:03
ilesystem Size Used Avail Use% Mounted on
/dev/sda1 9.8G 4.5G 4.8G 48% /
That's after a couple of toast runs.
[Coke] geekosaur: Last I heard, PRs are preferred over RTs with patches.
Zoffix ~/.zef$ du -sh 12:05
1016M .
stmuk: so I guess ~5-10GB will do.
grondilu m: class Foo {...}; class Bar is Foo {...}; class Foo {}; class Bar {}
camelia 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
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 :(
stmuk I assume I can "wget temp.perl6.party/toast.sqlite.db" as a seed db?
Zoffix stmuk: no need. Just run it and it'll create a new db automagically 12:07
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?
ah
Zoffix IIRC the site currently uses oldest commit vs newest commit as a measure of what got burned. 12:09
.tell Skarsnik you were asking how much HDD Toaster needed. I have the answer: irclog.perlgeek.de/perl6/2017-09-13#i_15156762 12:10
yoleaux Zoffix: I'll pass your message to Skarsnik.
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:31
? 13:32
masak there are a lot of use cases that subs cover perfectly well 13:39
anything where you feel like code should be inlined for performance, for example
you don't need macros for that, just a good JIT inliner (which Rakudo has) 13:40
pmurias what's the Perl 6 equivalent of the perl 5 while (<>) {...} 13:43
lizmat for *IN.lines { }
for lines { } actually
with the note that in Perl 6 it will have been chomped already 13:44
moritz lizmat: for line() { }
lizmat line() ?
moritz without the parens, the sub lines gobbles up the block
sorry, lines()
lizmat ah, yes, with parens :-) 13:45
gfldex m: { .say } for lines;
camelia »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.«…
lizmat m: .say for lines 13:45
camelia »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.«…
lizmat no need for a block 13:46
masak the DWIM of "we can skip the parens on this sub call" comes back as the WAT of "accidentally gobbled a block"... 14:00
Zoffix m: sub e { 42 }; say e 14:01
camelia 2.71828182845905
Zoffix :)
m: sub d { 42 }; say d
camelia 42
masak Zoffix: I *think* that's to spec 14:04
moritz m: sub e { 42 }; say e()
camelia 42
moritz it is 14:05
Zoffix masak: yeah, it is. I was just pointing out another WAT with the omitted parens
masak is old enough that "spec" still means "synopses" to him :)
Zoffix: feels like half a WAT at the most (to me) :)
Zoffix heh
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
Zoffix :)
masak Simple Matter Of Writing The IDE
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:07
$*ARGFILES.chomp = False; for lines() {} will turn off auto-chomping 14:09
pmurias lizmat: thanks 14:12
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)
masak pmurias: *nod* 14:14
samcv oh wow i didn't know instead of { } you can also use $( ) 14:19
m: my $var = "hello"; say "word: '$( $var.flip )'"
camelia word: 'olleh'
samcv it's pretty ugly though :P
Zoffix m: my $var = "hello"; say "word: @( $var.flip )[]" 14:24
camelia word: olleh
Zoffix m: my $var = "hello"; say "word: &( *.flip )($var)" 14:24
camelia word: olleh
Zoffix m: my $var = "hello"; say "word: %( z => $var.flip )<z>"
camelia word: olleh
Zoffix :) 14:25
samcv ah so that's why it works 14:26
lizmat yeah, feels a lot like a P5 hack :-) 14:35
samcv i'm getting crashes in p6decontrv 14:43
of perl6_ops.c:340 in the rakudo tree
oops meant to post in #perl6-dev 14:44
stmuk I just saw a "double free or corruption" while toasting Avro (but cant reproduce) 14:48
sjn o/ 14:50
sjn just made his first pull request for rakudo o/ 14:51
moritz sjn++
lizmat just merged sjn's first pull request 14:52
sjn hey, I'm not entirely sure if it works on all platforms :) 14:52
lizmat you mean, there are no tests?
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:54
I just ran the regular ones before pushing 14:55
lizmat sjn: it is deeply appreciated if you do that *before* submitting the PR :-)
which regular ones ?
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:55
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 ?
sjn probably. I think so
lizmat sjn: how many tests do you see?
sjn lizmat: my terminal buffer is all filled up with spectest output now, so I can't answer you any more :-) 14:58
lizmat hehe... increaze da buffer! 14:59
sjn nah, I'll file a bug about decreasing the amount of spectest</lol> :) 15:00
lizmat can confirm spectest is clean after merging sjn's PR :-) 15:02
sjn lizmat has a much faster computer than sjn 15:03
lizmat hopes sjn is aware of TEST_JOBS= env var ? 15:04
Zoffix I think I made it default to 6 jobs now.
sjn I'm not
it looks like some tests are running in parallel
lizmat TEST_JOBS=8 make spectest # use 8 parallel processes for testing 15:05
sjn has only 4 cores
lizmat sjn: this is actually a Perl 5 prove feature, afaik
then TEST_JOBS=4 could be better :-)
Zoffix Yeah, I did: github.com/rakudo/rakudo/commit/80...87a77f19af
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 :-\
Zoffix sjn: run it with t/fudgeandrun t/spec/S06-other/main-usage.t
That will pass it through the fudger and apply fudges, if any
sjn that fails with even more noise (could not find warnings) 15:07
Zoffix huh
sjn: where are you running that from? From rakudo's repo? 15:08
I see some fudges in that file, so it's not expected to pass with just prove6
sjn ah, I'm using prove6 :)
Zoffix Use t/fudgeandrun :)
sjn t/fudgerun is perl5
t/fudgeandrun*
Zoffix Yeah, it's a Perl runner, but it uses Rakudo to run the tests 15:09
sjn ook
Zoffix Perl Harness I mean
sjn yeah, all tests are ok with fudgeandrun
sjn is happy o/
Zoffix \o/ 15:10
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:11
grondilu m: proto f {*}; f() 15:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling f() will never work with declared signature
at <tmp>:1
------> 3proto f {*}; 7⏏5f()
grondilu ^not quite the error I was trying to catch
grondilu was expecting X::AdHoc 15:13
Zoffix was expecting "only proto" error
Zoffix m: class Foo { proto f {} }.f 15:13
camelia No such method 'f' for invocant of type 'Foo'
in block <unit> at <tmp> line 1
grondilu m: proto f {*}; multi f {}; f()
camelia ( no output )
grondilu hum, I tought this wasn't working either :/ 15:14
Zoffix m: Any.splice
camelia Cannot resolve caller splice(Any); Routine does not have any candidates. Is only the proto defined?
in block <unit> at <tmp> line 1
Zoffix I was expecting that error :)
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
Zoffix sjn: some time in 2016. Maybe October 2016 or something 15:16
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)
sjn I've been annoyed about that issure for much longer than that. :-P
Zoffix :)
Don't use rakudobrew :) 15:17
huggable: sauce
huggable Zoffix, Install untested latest development version of Rakudo from source: github.com/zoffixznet/r#table-of-contents
Zoffix should add a note for how to install latest release up there as well
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
Zoffix `git checkout 2017.08` for current release 15:18
pmurias: well, I got one. Same initial setup as rakudobrew and simpler update command
Zoffix And no need to run rakudobrew rehash after installing binaries 15:19
Zoffix I'm talking about: github.com/zoffixznet/r#table-of-contents 15:20
sjn hm. my spectest run failed with t/spec/S11-modules/nested.t and t/spec/S10-packages/basic.rakudo.moar 15:21
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
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
sjn is there any any real work being done on reducing the amount of fudged tests? 15:24
moritz occasionally 15:25
but the low-hanging fruits for that task have been mostly picked by now, so it's hard work
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
Speaking of low-hanging-fruits: 15:28
buggable: tag TESTNEEDED
buggable Zoffix, There are 51 tickets tagged with TESTNEEDED; See fail.rakudo.party/t/TESTNEEDED for details
Zoffix ^ lots of easy opportunity to contribute. Writing tests to cover fixed bugs.
moritz: weird that I get a 500 when I forget to place a second quote: irclog.perlgeek.de/perl6/search/?n...udobrew%22 15:32
Wonder if that's not a hint Bobby Tables might be around 15:33
Zoffix sjn: oh, nine's around in #perl6-dev if you wanted to talk to him about the fixes you made :) 15:35
Zoffix oops... instructions in 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 :)
Zoffix Heh, cool. "C Programming: The Modern Approach" talks about defining a `loop` macro to mean `for (;;) {}` :) 16:50
m: loop { "I've seen that somewhere".say and last } 16:51
camelia I've seen that somewhere
mspo Zoffix: what kind of insane person would do that?
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"
.oO( make a bunch of macros to make C look like Rakudo and use them in MoarVM source code )
16:53
Zoffix mspo: Actually, I think I'm the kind of insane person who will be doing it. for (;;) looks ugly :) 16:54
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:55
leont has seen begin/end macros written by a pascal programmer forced to do C, this road is never a good idea 17:00
Skarsnik Zoffix, I use while (1) for this kind of loop x) 17:01
leont would use while (1) too 17:02
Zoffix :) 17:05
hythm How to get the current file name in $*ARGFILES, I checked methods of $*ARGFILES but could not find it there 17:10
m: $*ARGFILES.filename # something like that
camelia No such method 'filename' for invocant of type 'IO::ArgFiles'
in block <unit> at <tmp> line 1
Zoffix hythm: .path 17:11
hythm m: $*ARGFILES.path # something like that
camelia ( no output )
hythm thankx Zoffix
Zoffix m: $*ARGFILES.path.say
camelia IO::Special.new("<STDIN>")
Zoffix hythm: it's a IO::CatHandle which is basically a normal IO::Handle with all the same methods and attributes: docs.perl6.org/type/IO::CatHandle 17:12
(writer methods just throw a NYI at the moment; no idea what they should do)
And .seek method is speshul in that it doesn't automaticaly switch to next handle in queue when seeking past end 17:13
hythm Zoffix: makes sense. I was looking for a method ".filename", did not notice ".path" 17:15
Zoffix Yeah, sometimes it's hard to know what to look for :) That's why we have humans to help here :) 17:16
There actually used to be a .filename attribute pre-IO-Grant that made IO::ArgFiles an IO::CatHandle: github.com/rakudo/rakudo/blob/d0c2...iles.pm#L3 17:17
As I recall it never worked right tho
hythm Zoffix, that's true. I just read the IO::Path docs, many useful methods are there 17:47
Zoffix \o/ 17:52
moritz leont: oh hai 18:10
leont: on twitter, you mentioned that you liked your approach to parsing indented stuff more than mine
leont: care to elaborate on that? I'm always looking for new perspectives on parsing 18:11
leont I don't like contextual variables, I prefer to pass them as arguments, that's most of the difference really. 18:11
(Well, I don't necessarily dislike them, but in a parser they feel … wrong to me 18:12
moritz leont: do you have experience passing arguments down proto tokens? 18:14
does that work without any hassle?
Zoffix It doesn't work at all
moritz :( 18:15
Zoffix m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo" 18:16
camelia 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"
Zoffix Unless I'm doin' it wrong?
leont See TAP and YAMLish for two highly related approached I took (one took indentation level as argument, the other a litteral string)
Zoffix buggable: eco YAMLish
buggable Zoffix, YAMLish 'A pure perl6 implementation of YAML': github.com/Leont/yamlish
Zoffix :sym has no matches 18:17
leont I'd advice looking at TAP First, YAMLish is rather long and complicated (because YAML)
Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n }; .+ } }.parse: "foo"
camelia 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"
moritz m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n }; .+ } }.parse: "foo"
camelia 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>($…
Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; foo:sym<meow> { { dd $*n } .+ } }.parse: "foo"
camelia 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"
moritz m: grammar { token TOP { <foo(42)> }; proto token foo($) {*}; token foo:sym<meow>($n) { { dd $n } .+ } }.parse: "foo" 18:18
camelia 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
Zoffix m: grammar { token TOP { :my $*n = 42; <foo> }; proto token foo {*}; token foo:sym<meow> { { dd $*n } .+ } }.parse: "foo"
camelia Int $*n = 42
leont I would classify that as a bug in proto tokens
Zoffix That's basically the only workaround I know of :)
moritz: I'm hoping you can fix it :D
The other week someone was asking for it too and there's a ticket from 2014 18:19
This one: rt.perl.org/Ticket/Display.html?id...et-history
ugexe i suspect thats also part of why sprintf isn't thread safe 18:23
moritz does anybdoy want to proof-read my Perl 6 Regexes and Grammar book? 19:30
Zoffix moritz: yeah, I could. Considering I wanted to read properly… kill two birds with one stone, eh? 19:31
*read it
moritz Zoffix: do you prefer a PDF (or epub or so), or markdown sources? 19:32
Zoffix moritz: what's the preferred way to submit corrections? 19:33
moritz Zoffix: git :-)
perlpilot moritz: I'll proofread it 19:34
Zoffix moritz: then I guess markdown sources sound good
moritz perlpilot: I'll need an SSH pubkey to give you access 19:35
Zoffix: git clone [email@hidden.address] 19:36
files are in manuscript/*.md
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 :-)
moritz Zoffix: about two weeks; Oxford comma :-) 19:38
and American English 19:39
Zoffix OK :)
Skarsnik Oxford comma hurt my eyes ! 19:40
Zoffix Oxford comma rules :) 19:41
moritz Skarsnik: blanks before punctuation hurts my eyes :-)
leont That's also my style :-)
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 :-)
Zoffix haha. blanks before punct is French style :)
Skarsnik seriously the oxford comma rule make no sense x)
Zoffix Skarsnik: it adds clarity in many situations and it makes sense to use it consistently
moritz leont: git clone [email@hidden.address] 19:43
perlpilot Skarsnik: www.nytimes.com/2017/03/16/us/oxfo...wsuit.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
Skarsnik perlpilot, I don't even get the mistake in the law 19:47
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 &
Or rather, the ambiguity exists only because Oxford comma is not a hard rule :) 19:52
teatime "This book is dedicated to my parents, Ayn Rand and God." 19:54
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 ;-) 19:59
teatime lol 20:00
tbrowder hi #perl6 20:02
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).
P6steve hello - quick question - I think that this %h<units>:exists being broken is a known issue (127767) - any advice on an alternative phrasing?
tbrowder hi raschipi! 20:08
lizmat RT #127767
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=127767
Skarsnik m: my %h = a => 'b'; say %h<a>:exists; say %h<b>:exists; 20:09
camelia True
False
lizmat P6steve: %h<units>:exists works afaik 20:10
that ticket is really about an LTA error message for !%h<units>:exists
Skarsnik Ho it's !
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:11
ah that';s the ticket %h<units>:!exists thanks! 20:12
Skarsnik tbrowder, hm weird
Skarsnik m: my %h = a => 'b'; say "plop" if ! %h<b>:exists; 20:12
camelia Unexpected named argument 'exists' passed
in block <unit> at <tmp> line 1
tbrowder the sql statement is: select * from tableone where colname = "idx"
Skarsnik Oh yeah that will just return nothing 20:13
tbrowder but the table doesn't exist so i expect an error,
Skarsnik Oh the table
P6steve my brain is going to hurt when this is a private class attribute hash %!h<key>:!exists. ;-) 20:14
P6steve thanks for the guidance 20:15
lizmat there's always %!h.EXISTS-KEY("key") 20:16
lizmat but that would be more typing 20:16
Juerd prefers "not" to "!" because "!" is easily missed when scanning code.
lizmat and it would be cheating a bit
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?
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)
perlpilot m: my %h = a => 'b'; say "plop" if %h<b>:!exists;
camelia plop
Skarsnik I think you need to use a try block yes
Skarsnik yeah you get a X::DBDish::DBError 20:20
but it should have make your code die probably
tbrowder ok i'll "try" the block...thanks Skarsnik 20:23
Skarsnik github.com/perl6/DBIish/blob/maste...ec-error.t some example in that
leont pyrimidine: how is BioPerl6 doing nowadays? 20:32
Zoffix P6steve: you can also use the .not method: %!h<foo>:exists.not
Zoffix uses `unless` in most of such cases 20:33
Skarsnik_ unless is nice :)
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:34
[Coke] TEST_JOBS is different? 20:35
Zoffix Ah, OK :)
[Coke] TEST_JOBS is number of simultaneous files to run. that's in prove, still works fine in docs.
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)
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.)
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
If you see that when using prove, it's a well known bug in prove
Zoffix I think there was a bug in our t/harness6 test runner due to a tripple negative in unless :)
leont (or at least with -j$x)
[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:38
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:40
leont rt.cpan.org/Public/Bug/Display.html?id=108390 20:42
leont Anyone have an opinion if YAMLish should return Lists or Arrays for its data? 21:10
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.
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.
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
mspo yaml has representations for both?
item:\n -foo\n -bar\n -moo
raschipi_ That's a List in a Dictionary, isn't it? 21:20
leont In YAML spec language, that's a sequence in a map 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.
Because it's easy for converting it to an Array. Doing the opposite would be just a waste. 21:23
leont I don't think we have an equivalent a map, right? 21:24
raschipi_ Yeah, there's Map
docs.perl6.org/type/Map
BooK m: say Order::More.succ 21:45
camelia 2
BooK m: say Bool::True.succ
camelia True
BooK why?
why is one going over the end of the items in the enum and not the other?
Zoffix s: True, 'succ', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/963b...ool.pm#L35
BooK I'm not asking how
BooK I have the code under my eyes, I see how :-) 21:46
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
I'm questioning the difference in behaviour between differents enums
Zoffix s: More, 'succ', \() 21:48
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/963b...ric.pm#L31
BooK and in fact, why don't they just rollover? or bounce off the ends back in the reverse direction?
boustrophedon enums! 21:49
Zoffix I was just looking at blame :)
BooK yeah, the second time I didn't complain, because I understood it was for you, not me ;-) 21:49
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
BooK I'm more annoyed with the inconsistency, than at the actual behaviour 21:51
Zoffix "<pmichaud> thus far I think I'm firmly in the camp of "Bool is not an enum"" 21:53
From around here: irclog.perlgeek.de/perl6/2011-07-28#i_4182343
raschipi But is it an Enumeration?
Zoffix I mean, from around the time the Bool.succ/.pred were made to be that way
ugexe i dont understand what sorting is supposed to do with it 21:54
BooK good old $| in Perl5 solved this nicely
tbrowder Skarsnik: i got the try block working now, just need to tweek the handling...thanks!
BooK perl -e 'print $|++ for 0..6; print $/; print $|-- for 0..6; print $/'
0111111 21:55
1010101
lizmat I would argue that the behaviour of Enum.succ going beyond the last value, is a bu
g
BooK lizmat: I'd tend to agree 21:56
m: say False.prec
camelia 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
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
lizmat++ Yeah, I agree too
BooK m: say False.pred
camelia False
lizmat please rakudobug, will look at it tomorrow
BooK the flip-flop behaviour of $| was so cool 21:57
ugexe we have a flip flop operator...
dont know anything else about it, but there is one! 21:58
raschipi More than one, ff and fff 21:59
BooK is it like .. and ... ?
raschipi One is awk-like and the other sed-like 22:00
leont Got to catch them all!… 22:02
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:03
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:05
not *sure* 22:06
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:07
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
\o
BooK Zoffix: yeah, I think it makes more sense to stop whenever your reach the end 22:09
whatever end
will email [email@hidden.address] with hopefully something that makes sense
or better, I could submit a patch that does that, and let someone more knowledgeable make it better
AlexDaniel it's interesting how people were thinking that enum Bool is not going to happen 22:16
and then it just did :)
lizmat also calls it a day 22:17
tbrowder disregard for now, i'm nuking my .zef directory... 22:21
tbrowder that didn't help! zef can't find the deps for META6--do i need the zef "nuke" option? 22:29
tbrowder well, that was drastic, but it looks like starting over will fix the problem (he says while whistling in the dark)... 22:41
timo oh tbrowder, how did your read-write benchmark go after the recent changes to I/O performance? 22:48
ugexe tbrowder: `zef uninstall xxx` for each of those problem dependencies, then they will install 23:26
tbrowder ugexe: too late, i'm starting over! 23:27
ugexe starting over with zef can be done with `zef nuke site home StoreDir` 23:28
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!
ugexe: i did that and am now installing ALL modules for fun! (with a perl6 script, of course!) 23:30
feature request: new zef option install all
raschipi That looks like a feature for the Ecosystem instead, generate a Task::All on a GitHub hook. 23:36
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:46
raschipi Being purpussufully obtuse is really annoying. 23:48
ugexe ive thought about these things for a long time. i'm not sure what you are talking about. 23:49
raschipi "all" means as many as possible. 23:51
ugexe and you don't see how that is not useful? 23:56
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 23:59