»ö« 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. |
|||
00:04
n1lp7r joined
00:05
kyclark joined
00:12
n1lp7r left
00:20
RabidGravy left
|
|||
timotimo | you know how there's now no longer a list of subs you have to remember "which work on $_ if no argument given and which don't" | 00:20 | |
we usually say "well, now you can .say" | |||
but now there's the list of methods of Any that might be interesting to you that you'd have to remember | |||
so you can decide whether you can .subname or have to .&subname | |||
00:25
n1lp7r joined
00:26
pierre_ joined
00:29
jcallen_ joined,
Jonis_ left,
Jonis joined
00:30
jcallen left
00:31
espadrine left
00:36
mohae_ left,
n1lp7r left
|
|||
SmokeMachine____ | hi! | 00:37 | |
this should work? | |||
m: use experimental :macros; sub a(:$b!){}; macro m($b){quasi{ a(:{{{$b}}}) }}; m("bla") | |||
camelia | rakudo-moar f2df2c: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub a at <tmp> line 1 in any at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
SmokeMachine____ | m: use experimental :macros; sub a(:$b!){}; macro m($b){quasi{ a(:b({{{$b}}})) }}; m("bla") | ||
camelia | rakudo-moar f2df2c: OUTPUT«Too many positionals passed; expected 0 arguments but got 1 in sub a at <tmp> line 1 in any at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
00:38
mohae joined
|
|||
SmokeMachine____ | should one of those work? | 00:38 | |
should any of those work? (sorry) | 00:39 | ||
00:39
r_i_d left,
r_i_d joined
|
|||
kyclark | lpaste.net/181419 | 00:41 | |
I’m working on a script to find overlapping genes. I’m not getting expected output. Perl is reporting overlap when there is none. | 00:42 | ||
Sample input data given at the top. | |||
Comments/suggestions welcome! | 00:43 | ||
Maybe it’s too late and I should try again tomorrow. | 00:46 | ||
AlexDaniel | SmokeMachine____: well, macros do not work at the moment | 00:53 | |
SmokeMachine____: so yes, it should work in the future… hopefully :) | |||
SmokeMachine____ | AlexDaniel: does not work at all? | 00:58 | |
AlexDaniel | kyclark: and the expected output is? | ||
SmokeMachine____: yeah, I think so | |||
SmokeMachine____ | 😞 | ||
AlexDaniel | kyclark: ah, I see | 00:59 | |
00:59
BenGoldberg joined,
kaare_ joined
|
|||
kyclark | Expected is that the last two overlaps should not appear | 01:03 | |
r_i_d | ls | 01:04 | |
In writing tests, how do you "use" the file you want to test? | 01:05 | ||
AlexDaniel | kyclark: a, pft | 01:06 | |
kyclark: they actually overlap | |||
kyclark: this part: %gene1<pos>[0,*-1].join('..') | |||
kyclark: assumes that the list is ordered | |||
but it is not | |||
01:06
adu left
|
|||
AlexDaniel | kyclark: change it to this and you'll see what is going on: %gene1<pos>.sort[0,*-1].join('..') | 01:07 | |
01:08
cdg joined
|
|||
r_i_d | I have two files, a program.pm6 and a program-test.pm6. How do I make the test aware of the program file? | 01:10 | |
AlexDaniel | r_i_d: not sure, but maybe you want to set PERL6LIB env variable to . or use 「use lib '.';」 in one of the files | 01:11 | |
kyclark: the problem itself, however, is slightly different | 01:14 | ||
m: .say for ‘7235’..‘9016’ | |||
camelia | rakudo-moar f2df2c: OUTPUT«7235723672257226721572167135713671257126711571167035703670257026701570168235823682258226821582168135813681258126811581168035803680258026801580169235…» | ||
r_i_d | i just tried use lib '.'; and it failed with "Undeclared name:". | ||
AlexDaniel | kyclark: so it looks like you have to do this: pos => [+%data<start> .. +%data<end>], | 01:15 | |
kyclark: … honestly ranges with numeric Strs hardly make any sense… and that's what you have encountered | |||
r_i_d: what's the full error? Perhaps something is indeed undeclared? :) | 01:16 | ||
r_i_d | the program declares an object -- the test works fine inside the program, but fails when in it's own .t file. | 01:18 | |
the failure is that the object is undeclared, so I'm not linking it right. | 01:19 | ||
AlexDaniel | r_i_d: well, the dot means that it should be in the current directory. Maybe that's not the case? If so, provide another path? | 01:20 | |
r_i_d | It's just the two files in the same directory file.pm6 and test-file. Do I have to declare it in the test file like I would in C? | 01:23 | |
01:26
cdg left
01:28
labster left
01:29
_slade_ left
|
|||
r_i_d | I don't have panda (I'm on a raspberry pi) so I cant build a module with a DATA6.json file. I'm just trying to test an object to learn how testing works in perl6. I can't imagine it being complicated. | 01:29 | |
01:31
user9 left
|
|||
grondilu | r_i_d: I have a raspberry pi and I have pand installed. | 01:31 | |
*panda | |||
(I'm not using it much lately, though) | |||
(ever since I've realized even a VM is much faster than a Pi) | 01:32 | ||
r_i_d | i just want to 1: declare a class in a .pm6 file and 2: declare an object of that class in a .t file. Nothing fancy | 01:33 | |
grondilu | it's very simple | ||
gfldex | r_i_d: did you export the class? | ||
grondilu | $ echo -e "unit class Foo;" > Foo.pm6; echo "use Foo;" > test.t; perl6 -I. test.t | 01:34 | |
(also use Test; of course) | 01:35 | ||
r_i_d | oh. | 01:36 | |
grondilu | did that help? | ||
01:37
gfldex left
|
|||
grondilu | (the suspense is killing me) | 01:37 | |
r_i_d | oops | 01:40 | |
I succeeded in overwriting my document with "unit class Foo;" | 01:41 | ||
but I think I'm on the right track. | |||
my file is gone, but perl doesn't complain about an undeclared object. | 01:43 | ||
01:48
MasterDuke joined
01:49
bob777 joined
|
|||
grondilu | you may have a ~ backup | 01:52 | |
kyclark | AlexDaniel, thanks! This fixes it: | ||
pos => [+%data<start> .. +%data<end>], | |||
You were right on. | 01:53 | ||
r_i_d | I don't need it, it was just a dummy object. | ||
AlexDaniel | kyclark: docs.perl6.org/language/traps#Stri.../Sequences | 01:55 | |
kycl | |||
kyclark | Thanks very much. It makes sense now. | 01:56 | |
AlexDaniel | kyclark: basically I'd just wipe stringy ranges from the language… this is such a fail… | 01:57 | |
one of the greatest ideas behind perl 6 is different operators for numeric stuff | |||
and yet we managed to step into the same turd with .. op | 01:58 | ||
kyclark | I would agree with that. It’s something I dig about Haskell. I know the operator has my back, will throw up on bad types. | ||
r_i_d | :grondilu Thank YOU! This works perfectly. | ||
tbrowder | ugexe: changes to zef look good! thanks! | 02:11 | |
ugexe: i should say they work great! | 02:13 | ||
dalek | ateverable: dc40d25 | MasterDuke17++ | Whateverable.pm6: Be less restrictive about mime types Allow any mime type that contains 'text/plain' or 'perl' in it. Also, attempt to decode the response based on the given charset, so ISO-8859-1 should be supported in addition to UTF-8. Closes #17. |
02:14 | |
02:28
pierre_ left
02:31
r_i_d left
|
|||
grondilu took the liberty to create an issue about the enumeration constants discussed earlier: | 02:32 | ||
github.com/perl6/roast/issues/147 | |||
02:34
wamba joined
02:35
pierre_ joined
02:39
pierre_ left
02:42
noganex joined
02:46
noganex_ left,
zacts joined
|
|||
pmichaud | ...can we or should we figure out a way to separate rakudobug tickets from language change request tickets? | 02:53 | |
yoleaux | 22 Aug 2016 13:59Z <[Coke]> pmichaud: if I can have access to edit web pages on rakudo.org | ||
02:53
pierre_ joined
|
|||
pmichaud | for example: RT #129131 is a language RFC, not a rakudo bug. | 02:53 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129131 | ||
pmichaud | yoleaux: tell [Coke] You're currently listed as an editor on rakudo.org... shall I increase that to "administrator"? | 02:55 | |
.tell [Coke] You're currently listed as an editor on rakudo.org... shall I increase that to "administrator"? | |||
yoleaux | pmichaud: I'll pass your message to [Coke]. | ||
BenGoldberg | m: my $foo = '7236'; say ++$foo; | 03:04 | |
camelia | rakudo-moar f2df2c: OUTPUT«7237» | ||
BenGoldberg | m: my $foo = '7236'; say ++$foo.WHAT; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Cannot resolve caller prefix:<++>(Str); none of these signatures match: (Mu:D $a is rw) (Mu:U $a is rw) (Int:D $a is rw) (int $a is rw) (Bool $a is rw) (Num:D $a is rw) (Num:U $a is rw) (num $a is rw) in …» | ||
BenGoldberg | m: my $foo = '7236'; (++$foo).WHAT.say; | ||
camelia | rakudo-moar f2df2c: OUTPUT«(Str)» | ||
pmichaud | m: .say for 'file08.jpg'..'file15.jpg' | 03:05 | |
camelia | rakudo-moar f2df2c: OUTPUT«file08.jpgfile07.jpgfile06.jpgfile05.jpgfile18.jpgfile17.jpgfile16.jpgfile15.jpg» | ||
BenGoldberg | m: ‘a00.b’..‘a16.b’ | ||
camelia | rakudo-moar f2df2c: OUTPUT«WARNINGS for <tmp>:Useless use of ".." in expression "‘a00.b’..‘a16.b’" in sink context (line 1)» | ||
BenGoldberg | m: .say for ‘a00.b’..‘a16.b’ | 03:06 | |
camelia | rakudo-moar f2df2c: OUTPUT«a00.ba01.ba02.ba03.ba04.ba05.ba06.ba10.ba11.ba12.ba13.ba14.ba15.ba16.b» | ||
BenGoldberg | m: .say for ‘a00.b’..‘a10.b’ | ||
camelia | rakudo-moar f2df2c: OUTPUT«a00.ba10.b» | ||
BenGoldberg | m: ‘a00.b’.SUCC.say; | 03:07 | |
camelia | rakudo-moar f2df2c: OUTPUT«Method 'SUCC' not found for invocant of class 'Str' in block <unit> at <tmp> line 1» | ||
BenGoldberg | m: ‘a00.b’.succ.say; | ||
camelia | rakudo-moar f2df2c: OUTPUT«a01.b» | ||
pmichaud | that last one looks like a rakudobug to me. | ||
the 'a00.b'..'a10.b' one. | |||
m: .say for 'a00.bb'..'a10.bb' | 03:08 | ||
camelia | rakudo-moar f2df2c: OUTPUT«a00.bba10.bb» | ||
BenGoldberg | Pretty strange :) | ||
pmichaud | m: .say for 'a00.txt'..'a10.txt' | ||
camelia | rakudo-moar f2df2c: OUTPUT«a00.txta10.txt» | ||
pmichaud | m: .say for 'a00.txt'..'a11.txt' | ||
camelia | rakudo-moar f2df2c: OUTPUT«a00.txta01.txta10.txta11.txt» | ||
pmichaud | m: .say for 'a01.txt'..'a11.txt' | ||
camelia | rakudo-moar f2df2c: OUTPUT«a01.txta11.txt» | ||
pmichaud | m: .say for 'a01.txt'..'a12.txt' | ||
camelia | rakudo-moar f2df2c: OUTPUT«a01.txta02.txta11.txta12.txt» | ||
BenGoldberg | m: .say for '0b000' .. '0b111' | ||
camelia | rakudo-moar f2df2c: OUTPUT«0b0000b0010b0100b0110b1000b1010b1100b111» | ||
BenGoldberg | m: .EVAL.say for '0b000' .. '0b111' | 03:09 | |
camelia | rakudo-moar f2df2c: OUTPUT«01234567» | ||
BenGoldberg | m: .EVAL.say for '0o00' .. '0o77' | 03:10 | |
camelia | rakudo-moar f2df2c: OUTPUT«0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525…» | ||
BenGoldberg | m: .EVAL.say for '0x00' .. '0xff' | ||
camelia | rakudo-moar f2df2c: OUTPUT«01234567895===SORRY!5=== Error while compiling /home/camelia/EVAL_10Confusedat /home/camelia/EVAL_10:1------> 030x0:7⏏5<EOL> expecting any of: colon pair» | ||
BenGoldberg | m: .say for '0x00' .. '0xff' | 03:11 | |
camelia | rakudo-moar f2df2c: OUTPUT«0x000x010x020x030x040x050x060x070x080x090x0:0x0;0x0<0x0=0x0>0x0?0x0@0x0A0x0B0x0C0x0D0x0E0x0F0x0G0x0H0x0I0x0J0x0K0x0L0x0M0x0N0x0O0x0P0x0Q0x0R0x0S0x0T…» | ||
03:15
zacts left
|
|||
pmichaud | that also looks like a bug to me. | 03:16 | |
timotimo | is it? | ||
pmichaud | m: say '0x00'.succ | ||
camelia | rakudo-moar f2df2c: OUTPUT«0x01» | ||
pmichaud | m: say '0x09'.succ | ||
camelia | rakudo-moar f2df2c: OUTPUT«0x10» | ||
timotimo | don't we only do the magic succ-ing when the ends are in a magic sequence? | ||
pmichaud | possibly. | 03:17 | |
timotimo | like 0 to 9 or a to z or something | ||
pmichaud | According to S05 (which I accept may be out of date), ranges for non-numeric types are formed by repeatedly doing .succ on the values | 03:18 | |
03:19
brrt` joined
|
|||
pmichaud | so, if that's the case, it seems to me that after '0x09' I should get '0x10' in the range sequence. | 03:19 | |
not '0x0:' | |||
timotimo | right. well, i *think* the current behaviour for things that are not recognized to be of the same sequence is to go through unicode codepoints until you wrap | 03:21 | |
pmichaud | okay, so that's a change from S05. | ||
03:22
brrt left
03:24
kyclark left
|
|||
BenGoldberg | According to docs.perl6.org/language/traps#Stri.../Sequences rakudo is actually doing what it's supposed to. | 03:25 | |
Which is to say, it's not supposed to use .succ on the whole string, supposedly since if that was what you'd wanted, you could easily write: $first, *.succ .. $last | 03:26 | ||
03:26
Xliff joined
|
|||
timotimo | you mean ..., yes? | 03:27 | |
BenGoldberg | Yes. | ||
03:27
Actualeyes left
03:40
wamba left
03:41
Actualeyes joined
|
|||
shantanu | Is there a way to implement observable streams in Perl 6 like RxJs or RxPy? I love promises but it looks like observables could provide a little more useful functionality for event based programming. | 03:49 | |
AlexDaniel | pmichaud: we don't have any other place to submit language change tickets, so it seems like [RFC] tickets are exactly for that purpose now | ||
timotimo | shantanu: Supply is exactly what observable streams are | 03:50 | |
and they are already implemented for you | |||
shantanu | ohh thanks for that!! :) | 03:51 | |
timotimo | they are really cool, and we have a bunch of combinators, too. like you'd expect from the other implementations of Rx* | ||
a big part of the concurrency primitives are modelled with a big influence from C# | |||
shantanu | C#? I am not fluent in that. | 03:52 | |
timotimo | me neither | ||
but our master of technical design is fluent in it, among many other things | |||
shantanu | It does look really cool! | ||
timotimo | the "supply"/"react" and "whenever" syntax is *really* nice | 03:53 | |
Xliff | Why am I getting this error? "You cannot create an instance of this type (Color)" | 03:56 | |
timotimo | check what it's HOW is | 03:57 | |
it's potentially a PackageHOW | |||
Xliff | Yeah. PackageHOW. | 03:58 | |
shantanu | HOW? | ||
timotimo | yeah, HOW | ||
a bit different from WHAT | |||
shantanu | ohh ok | ||
timotimo | m: say Int.WHAT; | ||
camelia | rakudo-moar f2df2c: OUTPUT«(Int)» | ||
timotimo | m: say Int.HOW | ||
camelia | rakudo-moar f2df2c: OUTPUT«Perl6::Metamodel::ClassHOW.new» | ||
timotimo | m: subset Foo of Int where 10 < * < 99; say Foo.HOW | 03:59 | |
camelia | rakudo-moar f2df2c: OUTPUT«Perl6::Metamodel::SubsetHOW.new» | ||
timotimo | package test { }; say test.HOW | ||
m: package test { }; say test.HOW | |||
camelia | rakudo-moar f2df2c: OUTPUT«Perl6::Metamodel::PackageHOW.new» | ||
shantanu | m: use Supply; say Supply.HOW; | 04:00 | |
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===Supply is a builtin type, not an external module» | ||
shantanu | m: say Supply.HOW; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Perl6::Metamodel::ClassHOW.new» | ||
shantanu | m: say Supply.WHAT; | ||
camelia | rakudo-moar f2df2c: OUTPUT«(Supply)» | ||
Xliff | So how do I change a PackageHOW to a ClassHOW? | 04:01 | |
timotimo | switching something's HOW from one thing to another is not possible | ||
when you have a PackageHOW, you have a package of things | |||
shantanu | my $a = Supplier.new; say $a.HOW; | ||
m: my $a = Supplier.new; say $a.HOW; | |||
camelia | rakudo-moar f2df2c: OUTPUT«Perl6::Metamodel::ClassHOW.new» | ||
timotimo | i expect the ClassHOW-ed thing you want is inside that package somewhere | ||
shantanu | m: my $a = Supplier.new; say $a.WHAT; | 04:02 | |
camelia | rakudo-moar f2df2c: OUTPUT«(Supplier)» | ||
Xliff | perl6 -e 'require ::("Color"); say ::("Color").HOW.^name' --> Perl6::Metamodel::ClassHOW | ||
timotimo | and you can't .new that? | 04:03 | |
Xliff | However when I do that in a script, it becomes "Perl6::Metamodel::PackageHOW" | ||
I can new the former, but not the latter. | |||
timotimo | well, something else is off, then | ||
Xliff | And I don't know why there's a difference. | ||
timotimo | is it the difference between grey and gray again :P | 04:04 | |
do you perhaps have -I in one and not the other? | |||
04:07
skids left
|
|||
Xliff | Yes | 04:09 | |
No change using -I | |||
And no, I think this is more subtle than "gr(e||a)y" | 04:10 | ||
Or at the very least more annoying. | |||
timotimo | i can imagine | ||
sorry about it :( | |||
Xliff | :/ | ||
I'm wondering if it's something to do with the "unit module" or "unit package" behavior. | 04:12 | ||
04:12
MasterDuke left,
khw left
04:13
skids joined,
harmil left
|
|||
Xliff | Because things I am doing in "perl6 -I..." shouldn't be so significantly different when those same things are done in a file based compunit. | 04:14 | |
(I almost said "script", but this isn't a script) | |||
And that should really read "perl6 -e..." | |||
04:21
kyclark joined
|
|||
grondilu | trying to make Perl 6 shine on HN: news.ycombinator.com/item?id=12387492 | 04:21 | |
04:24
kyclark left
|
|||
Xliff | timotimo: Golfed. | 04:24 | |
I will RT | |||
Actually, before I do, I will gist and let ppl check it out. | |||
04:30
Actualeyes1 joined,
Actualeyes left
04:31
skids left
|
|||
Xliff | gist.github.com/Xliff/6fa8e4e6283e...0c708948aa | 04:31 | |
And yes... at this point I wll except ¯\_(ツ)_/¯, but I just wanted to get that piece of weirdness out there. | 04:33 | ||
Wow! All it took was a ::! | 04:35 | ||
perl6 -Ilib -e 'unit package Color::Test; INIT { require ::("Color"); }; sub test { ::("Color").HOW.^name.say }; test' | |||
Perl6::Metamodel::PackageHOW | |||
04:43
pierre_ left
04:45
pierre_ joined
04:49
pierre_ left
04:50
notostraca joined
04:52
TEttinger left,
notostraca is now known as TEttinger
04:53
MilkmanDan left
04:57
labster joined
05:11
MilkmanDan joined
05:28
MilkmanDan left
05:54
CIAvash joined
05:55
pierre_ joined,
brrt joined
06:01
pierre_ left
06:06
pierre_ joined
06:10
Xliff left
06:11
Xliff joined
06:22
brrt left
06:25
darutoko joined,
firstdayonthejob joined
|
|||
domm | what's the correct syntax to import Perl5 functions using Inline::Perl5? | 06:26 | |
I need 'use Data::Random qw(:all)' in a p6 script | |||
hm, $p5.call('Data::Random::rand_words'); | 06:31 | ||
06:31
margeas joined
|
|||
domm | works, but is not too nice | 06:31 | |
ok, back onto the bike... | |||
moritz | ... to bikeshed :-) | 06:32 | |
domm | :-) | ||
06:33
BenGoldberg left
|
|||
Xliff | domm: 'use Inline::Perl5; my $varable; my $p5 = Inline::Perl5.new; p5.run('use Data::Random qw(:all); $variable = rand_words...'); | 06:35 | |
With correct quoting this time... | |||
domm: "use Inline::Perl5; my $varable; my $p5 = Inline::Perl5.new; p5.run('use Data::Random qw(:all); $variable = rand_words...');" | |||
nine | domm: use Data::Random:from<Perl5> <all>; | 06:36 | |
Xliff | Or that. nine++ (and more succinct) | ||
nine: If you have time, can you look at this gist and tell me if it's a bug? | |||
gist.github.com/Xliff/6fa8e4e6283e...0c708948aa | |||
nine | Maybe it _is_ a good idea to give my talk again :) | ||
domm: use Data::Random:from<Perl5> <:all>; # correct version with the colon before all | 06:38 | ||
06:46
firstdayonthejob left
|
|||
nine | Xliff: easier way to reproduce: unit package Color::Test; use Color; ::("Color").HOW.^name.say | 06:49 | |
Xliff | Huh | ||
Any ideas as to solution? | 06:50 | ||
I'm trying to write a module where the use of the Color class is optional. | |||
06:52
bbkr left
|
|||
nine | Actually, this could just be a plain merge_globals bug | 06:53 | |
06:56
brrt` left
|
|||
geekosaur | isn't this the thing where it creates packages for intermediate levels (so Color::Test implicitly creates package Color containing package Test)? | 06:56 | |
(in terms of namespacing, at least) | 06:57 | ||
nine | yes | ||
Xliff | O_o | ||
I think I actually grokked that! | 06:58 | ||
\o/ | |||
nine | But it should replace the package with the class. Otherwise Color.new doesn't even work | ||
Xliff | Exactly my problem. | ||
geekosaur | right; possibly these should be different namespaces somehow. I think there may be some RTs about related issues already | ||
(noodling) so maybe you get a Color that has a PackageHOW only if the name is not already in use, otherwise it is accessible via a PACKAGE:: namespace. in a case like this where it' | 07:00 | ||
s created first, the compiler should see that and arrange to not make the package one directly accessible | |||
...or maybe packages just shouldn't be in the default namespace as such but the PACKAGE:: namespace is checked by things that care, and if you want to access it directly you must specify | 07:01 | ||
Xliff | Would that be $?PACKAGE... or something else? | 07:04 | |
nine | The odd thing is that merge_globals should already DTRT. When it detects that the target is a stub (PackageHOW) and the source is a e.g. a class, it takes all symbols from the package, adds them to the class and replaces the package with the class. | 07:05 | |
geekosaur | I'm thinking of "pseudo-packages" docs.perl6.org/language/packages#P...o-packages | ||
nine | github.com/rakudo/rakudo/blob/nom/...r.nqp#L132 | 07:06 | |
geekosaur | see, I always considered that a hack... mostly because there kept being weird bugs | ||
like, oh, this one | |||
nine | But the weird bug in this case is just that it doesn't seem to do this at all. | ||
If the plan was followed through, it would work just fine. | 07:07 | ||
07:09
pierre_ left
07:11
nadim_ joined,
pierre_ joined
07:18
leont left
07:22
zakharyas joined
07:40
aindilis left,
jonas2 joined
07:47
domidumont joined
07:51
domidumont left
07:52
smls joined,
domidumont joined
07:55
g4 joined
|
|||
Xliff | Here's an odd one: "no EXPORT sub, but you provided positional argument in the 'use' statement" but there is an export sub in the module being imported. O_o | 08:01 | |
08:01
leont joined
|
|||
Xliff | github.com/Xliff/p6-color-names/bl...mes.pm#L38 <- Proof | 08:02 | |
Generates error: perl6 -Ilib -e 'use Color::Names <:b>; dd color("gray42")' | |||
smls | Xliff: That's the same problem I had yesterday. Moving the `sub EXPORT` above the `unit package Color::Names;` should make it work. | ||
no idea *why* that's required though | 08:03 | ||
Xliff | smls: That's going to be hell on scoped sub names, though. | 08:04 | |
smls | ¯\_(ツ)_/¯ | ||
Xliff | I mean, if I am going to export routines outside of the EXPORT scope, how would I do it? | 08:05 | |
::() doesn't seem to work. | |||
08:06
dakkar joined
|
|||
Xliff | Returning this from sub EXPORT: | 08:06 | |
# cw: Really want a SELECTIVE way to load these, instead of doing | |||
# them all at compile time. | |||
Gar... | |||
Returning this: | 08:07 | ||
{ | |||
'&color' => ::("&Color::Names::color"), | |||
'&hex' => ::("&Color::Names::hex"), | |||
'&rgb' => ::("&Color::Names::rgb") | |||
} | |||
And trying the script above, I get: "Too many positionals passed; expected 0 arguments but got 1" | |||
So do I need to export signatures, too? | |||
moritz | you don't need to export signatures | 08:08 | |
Xliff wishes you could grep repositories on GitHub | 08:09 | ||
moritz | Xliff: are those our-subs? | ||
Xliff | Um. No. | ||
moritz | then the namespaced lookup won't work | ||
Xliff | Seems like they work because I'm not getting a "not found" error. I am getting a "I can't find a signature match" error. | 08:10 | |
However I will try. | |||
moritz | and any reason you're not just using export tags? | ||
Xliff | Same ish. | ||
Can you use EXPORT tags with a custom sub EXPORT? | 08:11 | ||
I thought that rendered the tags useless. | |||
Again... will try. | |||
Oh. LOL. Already had 'em in. | |||
So export tags AREN'T working. | |||
Again, on suggestion from smls++, sub EXPORT is moved ouside of unit package scope. | 08:12 | ||
08:12
MilkmanDan joined
|
|||
smls | Xliff: It's just what cygx++ suggested to me... :) | 08:13 | |
Xliff | Again I need a custom sub EXPORT. | ||
So based on current rakudo behavior, export tags are superfluous. | |||
At least with current implementation, which I am stubborly still attached to. | |||
Give me a few more days with this roadblock. | 08:14 | ||
凸ಠ益ಠ)凸 | |||
08:15
vytas joined
|
|||
Xliff | Emoticon was for roadblock... not for #channel. | 08:15 | |
08:18
cgfbee left
|
|||
TimToady sitting in Munich waiting for MUC --> DEV --> SJC | 08:25 | ||
08:25
cgfbee joined
|
|||
moritz waves from just 200km away | 08:32 | ||
nine waves from 183km away | 08:34 | ||
lizmat waves from 576 km away :-) | 08:39 | ||
08:41
pierre_ left
|
|||
leont waves from a good 100km further than lizmat :-p | 08:43 | ||
08:50
pierre_ joined
08:55
pierre_ left
08:57
pierre_ joined
09:07
leont left
|
|||
TimToady boarding & | 09:08 | ||
09:09
diego_k joined
09:10
diegok left
|
|||
Xliff | Now getting this in parse stage: "Cannot find method 'merge-symbols': no method cache and no .^find_method" | 09:11 | |
09:11
lizmat left
|
|||
El_Che | I had a look yesterday at the packaging options (as a consequence about what rakudo a user must install). Pretty hellish | 09:11 | |
Xliff | Error goes away when I remove sub EXPORT; | 09:12 | |
Just for the halibut, I will rakudobrew. | |||
09:13
go|dfish left
09:15
RabidGravy joined
|
|||
Ulti | anyone reported the broken rakduobrew builds? | 09:17 | |
nine | El_Che: what do you mean? | 09:20 | |
09:22
mls left
|
|||
El_Che | nine: I was looking for a fast way to create debs/rpms/what-have-you for rakudo. | 09:22 | |
nine: so users can install an up to date pkg instead of rakudobrew | 09:23 | ||
moritz | El_Che: if you provide some debian/ dirs for building the .deb packages, I'm willing to build a pipeline/process that automtaically runs the builds and uploads them into a repo | 09:27 | |
El_Che | moritz: I was looking at that specifically. What do we want exactly. Something less integrated in the OS, but quickly built: github.com/jordansissel/fpm | 09:29 | |
Xliff | Ulti: Just rebuild rakudo with no problems. | ||
El_Che | "Proper" packages will be supplied by the OS. I was thinking in putting everything in /opt/rakudo or something like that | ||
nine | El_Che: creating rpm packages is actually quite simple: build.opensuse.org/package/view_fi...c?expand=1 | 09:31 | |
ambs | does this ring any bell? --- paste.perldancer.org/2pO6zrOjkNpPz | ||
El_Che | moritz: maybe an anti-pattern, but docker killed my packaging efforts for $work (I used to produce rpms for our apps) | ||
nine | build.opensuse.org/package/view_fi...c?expand=1 | ||
build.opensuse.org/package/view_fi...c?expand=0 | |||
El_Che: with a bit of luck those even build on other distributions or may be easily adaptable. | |||
El_Che | nine: you're extraordinary. I got an headache looking at the opensuse build system docs (and the zillion dead links) | ||
nine | ambs: I suspect that you are running a very old perl6 version? | 09:32 | |
moritz | El_Che: I'm fine with fpm | ||
melezhik | Hi all! | ||
ambs | nine: ok, it might be | ||
nine | El_Che: yes, took me quite a while to figure it out. But once you got through that the build service is just awesome | ||
melezhik | Anybody suggest a simple logger for perl6? | ||
moritz | note(), say(), github.com/moznion/p6-Log-Minimal | 09:33 | |
nine loves note | |||
melezhik | mortiz: thanks, Log::Minimal does not allow to write into file? | 09:35 | |
El_Che | moritz, nine: there is also this: github.com/alanfranz/fpm-within-docker . But I don't think running someone elses containers --never mind how easy they make the process-- to produce packages is a good idea | ||
smls | Did Rakudo's start-up time improve recently? | 09:37 | |
`perl6 -e ''` takes 0.14s now on my PC, I thought it had been 0.18s before but I could be mistaken. | 09:38 | ||
ambs | nine: exactly that. thanks | 09:39 | |
smls | Or could switching from rakudobrew to building from git perl nine's instructions, have affected that? | ||
*per | |||
nine | smls: I can't imagine rakudobrew having an influence on that. I claim it's innocent for once :) | 09:40 | |
moritz | iirc rakudobrew adds a layer of shell scripts around executables, but that shouldn't make 0.04s difference | 09:42 | |
Xliff | LOL, nine++ # /me hugs his rakudobrew | ||
09:42
bjz joined
|
|||
Xliff | Is there a mechanism for supplying dummy export tags? | 09:43 | |
09:43
pmurias joined
|
|||
Xliff | I can get "sub EXPORT(*%a)" to work, but not "sub EXPORT (*@a)" without a parse error. However "sub EXPORT (*%a)" will bail at parse without a supplied export tag matching argument to the use statement. | 09:44 | |
09:46
mls joined
|
|||
pmurias | are there any bad consequences of me publishing a rough 0.0.1 nqp-js version on npm? (it's not really meant for direct use just for easier building of rakudo.js) | 09:46 | |
Xliff tries to imagine shoe-horning rakudo.js into a browser. | 09:47 | ||
pmurias: Any ideas as to the size of rakudo.js? | |||
pmurias | Xliff: I don't have a currently build one as I was mostly working on nqp-js recent, and I haven't tried minifing it | 09:52 | |
Xliff: rakudo.js will need to be included on REPLs | 09:53 | ||
Xliff | Aaieee... minifyinh. | 09:54 | |
...minifying, even. | |||
Ok, I can just feel RTs future pain from the minifying bugs. | 09:55 | ||
(depending on what you use to minify) | |||
It's been a while since I've had to worry about minifying Javascript. | |||
Fortunately, I have never had to write JS where it was necessary to Hide What Was Done for $work. | 09:56 | ||
09:56
Actualeyes1 left
|
|||
pmurias | nqp-js is currently 9.5M unminified with currently no effort spend in reducing the size of the emitted code | 09:56 | |
nqp-js-running-on-top-of-js | 09:57 | ||
09:58
go|dfish joined
|
|||
pmurias | Xliff: re minification bugs, I think the current minifiers have different settings where you can set how much potential breakage you want | 09:58 | |
10:00
bjz left
|
|||
Xliff | Ah! That's nice. | 10:00 | |
I've never bought the minifying-for-size argument, but then again, I've not written a suite of JS over 250k...ever. | 10:01 | ||
OOB - HAH! Oh Charlie Stross. You usually get the future right, but the references about MIPS is just.... cute. | 10:02 | ||
10:07
pierre_ left
|
|||
konobi | oh wow... just looked at arrayref declarations of attributes or modifiers in Moose for the first time in a long time | 10:10 | |
10:10
cgfbee left
|
|||
konobi | i remember adding it for practicality reasons (and somewhat for compositionality) but now that I look back on it, I can't decide if it's the best representation | 10:11 | |
10:12
Actualeyes joined
10:13
pierre_ joined
|
|||
timotimo | anyone want to write a .ASSIGN for CArray? :) | 10:16 | |
tadzik | oh, Moose. I actually haven't heard that name in a long time :o | ||
it's Moo, Moo, Moo for everything I do | |||
10:18
cgfbee joined
|
|||
Xliff | timotimo: What would be involved for that? | 10:18 | |
timotimo | Xliff: take a list and fill the CArray with it; look at the native array roles' implementation of ASSIGN for inspiration | 10:19 | |
10:19
bjz joined
|
|||
Xliff | Is that MoarVM or Rakudo? | 10:20 | |
pmurias | konobi: if I want to release a rough version of nqp-js on npm (which will be mostly intendend for building rakudo.js) how should I mark that people should beware before using it | ||
timotimo | that's rakudo | ||
Xliff | timotimo: ./nqp/MoarVM/src/6model/reprs/MVMArray.c | 10:24 | |
? | |||
timotimo | no, in rakudo | 10:26 | |
under src/core/ | |||
well, the CArray thing is in lib/NativeCall somewhere | |||
10:28
aindilis joined
|
|||
Xliff | moar-nom/lib/NativeCall/Types.pm6 | 10:29 | |
However I see references to ASSIGN-POS, but no .ASSIGN anywhere in rakudo source. | |||
timotimo | oh | ||
Xliff | Lemme modify grep. | ||
timotimo | i think i meant to say STORE | ||
Xliff | Heh. | 10:30 | |
timotimo | that's the method that should make "my @foo := CArray[int].new; @foo = Bool.roll(100_000)" work | 10:32 | |
rather than having to "for Bool.roll(100_000) { @foo.push($_) }" | 10:33 | ||
Xliff | timotimo: I'll try looking into this. I will let you know if I have to throw my hands up in defeat. | 10:34 | |
timotimo | thanks for taking the time! | ||
timotimo is AFK for a bit | |||
Xliff | np | ||
timotimo | i hope others can assist :) | ||
Xliff | Yeah. There's a whole lot of nqp here to unravel. I can understand most of Array's STORE, but mapping that into the proper assignment methods may tricky for me. | 10:42 | |
Will look more into it, tomorrow (ie Tuesday, EDT, pm) | 10:43 | ||
I am up way past my bedtime... again. | |||
(will someone please mute that massive fusion generator in the sky, please?) | |||
<-- vampire | 10:44 | ||
10:45
dLeCamarae joined
|
|||
Xliff | And it looks like CArray is missing some attributes in Array and List. | 10:46 | |
10:46
pierre_ left
|
|||
Xliff goes *poof* | 10:46 | ||
10:46
Xliff is now known as Xliff_zzzzz
|
|||
mst | timotimo++ # Oh. My. Gods. | 10:59 | |
timotimo | mst: what did i do wrong? :( | 11:01 | |
mst | < timotimo> mst: Opan GangnaMSTyle! | ||
timotimo | oh, hehe. | ||
mst | that was *AWFUL* | ||
hence the ++ | |||
Xliff_zzzzz | HAHAHAHA! | ||
timotimo | i was pretty proud of that one | ||
nine | Well spotted :) | ||
11:02
labster left
|
|||
timotimo | shit. with this tweet i've doomed myself to write a Shakespeare-based regex slang :( | 11:08 | |
twitter.com/loltimo/status/770578530879012865 | |||
smls | m: say (reverse 1 .. 100_000_000_000_000_000_000_000_000)[^2] | 11:10 | |
camelia | rakudo-moar f2df2c: OUTPUT«(100000000000000000000000000 99999999999999999999999999)» | ||
smls | Nice, Range.reverse returns a Seq that iterates the range backwards efficiently | ||
timotimo | everything else would be terrible :) | 11:11 | |
smls | This is why I love the GLR, jnthn++ | ||
timotimo | but how do we actually implement that ... :P | ||
nine | reverse(@a) calls @a.reverse which in the case of a Range returns a reverse-iterator | 11:12 | |
timotimo | oooh | 11:13 | |
dLeCamarae | Guys, I have this Perl Web app. When I run it at home, a call to Web::App::Dispatch.new(SCGI.new) works; at work it fails with an argument error. Weirdest thing ever. | ||
nine | So it's actually more an artifact of using OO | ||
moritz | dLeCamarae: unless it's written in Perl 6, I recommend asking in #perl | ||
nine | moritz: the .new suggests it's indeed Perl 6 | 11:14 | |
dLeCamarae | It is in Perl 6, of course. What do you take me for, a slug? :-D | ||
Only Perl 6 and Haskell for the foreseeable future. Life is too short. | |||
moritz | dLeCamarae: no offense meant, we just get a high number of 5ers asking here by mistake | ||
11:15
ilmari_ is now known as ilmari
|
|||
timotimo | can you give us your perl6 --version for both at home and at work? | 11:15 | |
moritz | dLeCamarae: so, have you compared rakudo versions on boht machines? | ||
dLeCamarae | (And, if God wills it, another, this-time-complete Pugs; Perl 6 in Haq! Yay!) | ||
At work: | |||
This is Rakudo version 2016.06-83-gb93043a built on MoarVM version 2016.06-9-g8fc21d5 implementing Perl 6.c. | 11:16 | ||
This is the one that fails. It seems that, with it, Web::App::Dispatch.new sends a second argument to Web::App (which it inherits from), failing in the process, while on the home setup it does not. Let me try to log into home and get the version. | 11:18 | ||
Hmm ... my Tor access to home is failing. :-( | |||
github.com/supernovus/perl6-web/bl...pp.pm6#L11 | |||
That is the line that complains, but only in this setup. In every other it works. It says here: | 11:19 | ||
Too many positionals passed; expected 1 argument but got 2 | |||
in method new at /home/revence/.rakudobrew/moar-nom/install/share/perl6/site/sources/336A8A6602DE7CDDA67F44458EC605AD94184E17 (Web::App) line 11 | 11:20 | ||
in method set-up at ./egrapha.pl6 line 799 | |||
And that line 799 in egrapha.pl6 is: | |||
my $wapp = Web::App::Dispatch.new(SCGI.new(:$port)); | |||
nine | dLeCamarae: you linked to Web::App.new but showed code for Web::App::Dispatch.new | 11:21 | |
dLeCamarae | So, this follows the spec pretty closely, and it works every time at home. A pity I cannot get the version on that side; I doubt, though, that it would be the one that has to chang. | ||
nine | ah is Web::App; sorry for the noise | 11:22 | |
dLeCamarae | nine Okay, hold on, let me get the other one. | ||
Yes, they are the same. It inherits pretty directly, especially the new. Alas, it is weird here. | |||
nine | self.bless(*, :$engine) looks suspicious? | ||
I think the * there should have been gone for a long time. | |||
dLeCamarae | I think it does. | 11:23 | |
Okay ... pull requests revving up. But why does it work on my other Rakudo Star? | |||
nine | Because most probably the one at home is older | ||
dLeCamarae | Hmm. | ||
nine | Don't remember exactly when but lizmat fixed that a couple months ago | ||
11:24
TEttinger left
|
|||
dLeCamarae | I have been leaving behing Rakudo installations for some 10 years now, so I would not be surprised. But I always say use v6.c in all my code now; should it not catch such an inconsistency? | 11:24 | |
timotimo | we've deprecated putting a * as the first argument to bless a long time ago, and completely removed it at some point, too | 11:27 | |
are you able to get the version you're using at home? | 11:28 | ||
nine | More or less. The spec test suite doesn't even cover all the features implemented in rakudo. There's no hope at all for it covering 100 % of the non-features, e.g. being able to pass invalid parameters. The * was such an oversight. | ||
11:31
cyphase left
11:32
cyphase joined
|
|||
pmurias | npm install -g nqp-js-on-js; nqp-js-on-js -e 'say("Hello World")' works | 11:34 | |
11:36
akosgheri joined
|
|||
tbrowder | help: trying to execute a prog and get error about no such file in /path2rakudosharedist*hash*/ no such file; i get no error when i comment out a module i use, but the module has been uninstalled. any way to fix a corrupted compunit repository? | 11:44 | |
nine | tbrowder: can you paste more details like the actual paths somewhere? | ||
tree output of the repository in question could also be helpful | 11:45 | ||
tbrowder | i can do that; give me a few minutes... | 11:46 | |
masak | today's fun puzzle: how can you demonstrate whether a prefix op that you declared is tighter than another prefix op that you declared? | 11:47 | |
(hi #perl6) | |||
mst blinks | |||
I'm not sure how precedence even works for prefix ops | 11:48 | ||
I mean, like, in general | |||
timotimo | yeah, since prefixes hug the thing they prefix so tightly anyway | ||
masak | mst: that's the reaction I was expecting | ||
timotimo | i could imagine asking whether a prefix is tighter than a postfix | ||
masak | it does make sense. let me explain. | ||
yes, what timotimo said. | 11:49 | ||
consider pre- and postfixes to share a precedence space | |||
mst | ooooh, right | ||
masak | then they can compete for eval-first | ||
...and that's also the answer to the riddle | |||
moritz | well, my approach would be create a postfix operator with the same precedence as one of the prefix operators | ||
timotimo | aye | ||
masak | moritz: correct. | ||
or a nearby precedence, is enough | |||
moritz | and then one prefix against the artificial postfix | ||
timotimo | ++@foo[1] | ||
masak | for actual code that demonstrates this (currently a bug in 007), see github.com/masak/007/issues/189 | 11:50 | |
mst | right, sorry, you said 'one prefix op precedence higher than another prefix op' | ||
that's the one I can't understand | |||
masak | mst: yes, I said that. | ||
mst | if we're allowing postfixes as well, the question makes more sense | ||
masak | mst: you test them *through* a postfix. | ||
mst: that's the only way you can get an observable. | |||
mst | aha | ||
timotimo | right, the postfix is just the piece of litmus paper | ||
masak | right | 11:51 | |
mst | yes, ok, I now follow | ||
neat :D | |||
jnthn | m: say infix:<cmp> (&prefix:<|>, &prefix:<++>)>>.prec>>.<prec> | ||
camelia | rakudo-moar f2df2c: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1» | ||
jnthn | m: say infix:<cmp> |((&prefix:<|>, &prefix:<++>)>>.prec>>.<prec>) | ||
camelia | rakudo-moar f2df2c: OUTPUT«Less» | ||
masak | not all of us have your fancy introspection, sir :P | ||
moritz | introspection is cheating! | ||
:-) | |||
masak | introspection is technique! | 11:52 | |
moritz | (and cheating is technique... ) | ||
masak: hah, we're in resonance again! | |||
masak | was gonna say | ||
it's the famous .se-.de entanglement | |||
11:54
obfusk left,
obfusk joined
11:55
smls_ joined,
smls left
|
|||
tbrowder | nine: the repository file tree is here: "gist.github.com/tbrowder/3880cbf51...61094b6c7" | 11:56 | |
11:57
ilbot3 left,
canopus left
|
|||
Xliff_zzzzz | Help: Is it not possible to grab the arguments to a custom "sub EXPORT()" before it goes looking for export tags. Or any way I can force dummy export tags. Since my error occurs in "stage parse" I am a little worried this is not possible. | 11:58 | |
nine | tbrowder: how exactly did you uninstall a dist? | 11:59 | |
Xliff_zzzzz | Currently, I can only do "sub EXPORT(*%l)". rakudo bails on "sub EXPORT(*@l)" if positional is given. | ||
timotimo | well, yeah, :foo and :bar are named arguments, of course | ||
tbrowder | nine: i was in the directory containing the module, under construction, and executed: "zef uninstall ." | 12:00 | |
Roamer` | *head scratch* am I misunderstanding something about what Hash[type] $var is supposed to mean? I mean... | ||
m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<a> = 7.62; dd $wtf; dd $wtf<a>; my Int:D %fine; %fine<a> = 7.62; | |||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = :a(7.62))Rat <element> = 7.62Type check failed in assignment to %fine; expected Int:D but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | Yeah, well I don't give a toss about export tags, really. I just want to pass custom arguments to EXPORT so I can do some magic. | 12:01 | |
nine | tbrowder: please try removing /usr/local/rakudo-git.d/share/perl6/site/short/8144BFF032FBA84D9128DCD60D2A111A91A29BC8 | ||
Roamer` | ...how exactly did it manage to put a Rat into a Hash[Int:D]? | ||
12:01
gabiruh joined
|
|||
tbrowder | nine: WILCO | 12:01 | |
nine | Roamer`: Hash[Int:D] means the keys are defined Ints | ||
moritz | nine: but that didn't validate either, because there's a Str key in there | 12:02 | |
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<2> = 7.62; | ||
nine | So...wait a second. Then you shouldn't be able to assign to <a> | ||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = "2" => 7.62)Rat <element> = 7.62Type check failed in assignment to %fine; expected Int:D but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<a> = 7.62; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = "2" => 7.62)Rat <element> = 7.62Type check failed in assignment to %fine; expected Int:D but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<a> = 700 | ||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = "2" => 7.62)Rat <element> = 7.62» | ||
Roamer` | oooookay, so I had indeed grossly misunderstood things, but there's still some good about to come out of it? :) | 12:03 | |
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<a> = 700; dd %fine | ||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = "2" => 7.62)Rat <element> = 7.62Hash[Int:D] %fine = (my Int:D % = :a(700))» | ||
12:03
ilbot3 joined
|
|||
tbrowder | nine: success!! thanks!! how did you know what to remove? | 12:03 | |
Xliff_zzzzz | First, requires int keys. Last requires int Values. | ||
12:04
pierre_ joined
|
|||
nine | tbrowder: the directories in short/ are just the SHA-1 hashes of the short-name of modules. The files contained in such directories are named after the dist that contains such a module. You seem to have removed the dist but not the short-name lookup directory. | 12:04 | |
12:04
canopus joined
|
|||
nine | tbrowder: helps a lot being the one who implemented all of that :) | 12:04 | |
Roamer` | Xliff_zzzzz, ahh, I get it now... almost | 12:05 | |
12:05
user9 joined
|
|||
Roamer` | Xliff_zzzzz, is there then a syntax that would allow me to specify a *type* (like e.g. a function return type) of a hash containing arrays of strings? | 12:05 | |
I thought Hash[Array[Str:D]] was it, but apparently not | |||
Xliff_zzzzz | Aiee! | ||
Roamer`, That specifies key types. | 12:06 | ||
So all keys must be Array[Str:D] | |||
tbrowder | nine: thanks a heap--i'm putting that in my notes. is that documented some where? sounds like a good candidate for the docs... | ||
Roamer` | Xliff_zzzzz, yep, I almost got that part, although I still don't get what moritz and nine are wondering - how does $wtf<a> work then :) | ||
nine | ugexe: see tbrowder ^^^. zef uninstall . left a short-name lookup file. I assume zef just uses CURI.uninstall and I guess the local version of the dist does no longer contain the module the short-name lookup belonged to. | ||
moritz | Roamer`: it's most likely a bug somewhere | 12:07 | |
nine | tbrowder: sounds like a better candidate for a fix. There's even a comment about this in the uninstall method. | ||
Roamer` | moritz, yeah, I thought so, I'll report it. still, any ideas about a function returning a hash of arrays of strings? :) | ||
(and, yes, of course I can encapsulate everything into objects or even subsets of classes, but still...) | 12:08 | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf; $wtf<a> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<2> = 7.62; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in assignment to $wtf; expected Hash[Int:D] but got Hash (${}) in block <unit> at <tmp> line 1» | ||
moritz | Roamer`: have you tried it with a %-variable? | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] $wtf; $wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<2> = 7.62; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in assignment to $wtf; expected Hash[Int:D] but got Hash (${}) in block <unit> at <tmp> line 1» | ||
Roamer` | Xliff_zzzzz, you need to initialize the variable when you declare it (another thing that kind of threw me, maybe another bug?) | 12:09 | |
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] %wtf; %wtf<2> = 7.62; dd $wtf; dd $wtf<2>; my Int:D %fine; %fine<2> = 7.62; | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$wtf' is not declared. Did you mean '%wtf'?at <tmp>:1------> 3my Hash[Int:D] %wtf; %wtf<2> = 7.62; dd 7⏏5$wtf; dd $wtf<2>; my Int:D %fine; %fine<» | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] %wtf; %wtf<2> = 7.62; dd %wtf; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in assignment to %wtf; expected Hash[Int:D] but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Roamer` | Xliff_zzzzz: try my Hash[Int:D] $wtf .= new(); | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D] %wtf; %wtf<a> = 7.62; dd %wtf; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in assignment to %wtf; expected Hash[Int:D] but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | Roamer: I am trying without the .new for a reason. | ||
Roamer` | ah, right | ||
Xliff_zzzzz | Looks like there is type checking weirdness when attempting to attach a type check to keys. | 12:10 | |
But that's just my Wild Aassed Guess based on 2 minutes with camelia. | |||
m: use v6.c; my Hash[Int:D, Int:D] $wtf; $wtf = Hash[Int:D, Int:D].new; $wtf<a> = 2; | 12:11 | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in binding to key; expected Int:D but got Str ("a") in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D, Int:D] $wtf; $wtf = Hash[Int:D, Int:D].new; $wtf<2> = 2; | ||
camelia | ( no output ) | ||
smls_ | m: my Array[Str] %hash; %hash<foo> = Array[Str].new("a"); %hash<foo> = ["b"]; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in assignment to %hash; expected Array[Str] but got Array ($["b"]) in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | And there you go. | ||
m: use v6.c; my Hash[Any, Int:D] $wtf; $wtf = Hash[Any, Int:D].new; $wtf<a> = 2; | 12:12 | ||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in binding to key; expected Int:D but got Str ("a") in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | m: use v6.c; my Hash[Int:D, Any] $wtf; $wtf = Hash[Int:D, Any].new; $wtf<a> = 2; | ||
camelia | ( no output ) | ||
Roamer` | Xliff_zzzzz, hmm, I *thought* I'd seen the Hash[something, something] syntax, I should've tried it | ||
Xliff_zzzzz, thanks | |||
Xliff_zzzzz | Wow. So it's Hash[ValueType, KeyType].... | 12:13 | |
Feels a little backward byt. | |||
s/byt/but/ | |||
jnthn | Just consistent parameter order | ||
12:13
kyclark joined
|
|||
jnthn | Hash[ValueType] is a hash with the specified value but keys coerced to strings | 12:13 | |
smls_ | Yeah, it would be weird if the optional one came first. | ||
Roamer` | btw, here's another one, is it a bug of dd? Part of the reason I thought it was Hash[ValueType]... | ||
m: use v6.c; my Array[Str:D] %foo; %foo<a> = Array[Str:D].new(<a b c>); dd %foo; | |||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Array[Str:D]] %foo = (my Array[Str:D] % = :a(Array[Str:D].new("a", "b", "c")))» | ||
Xliff_zzzzz | Roamer`, why do you think that's a bug? | 12:14 | |
Roamer` | Xliff_zzzzz, because the way the dd output starts ("Hash[Array[Str:D]]") suggests to me that this is how I should declare a hash with arrays as values | 12:15 | |
brb | 12:16 | ||
Xliff_zzzzz | Hummm..... | ||
tbrowder | nine: can you check my issue #100 in zef and ensure i said the right thing" thanks VERY much! | ||
12:16
smls_ is now known as smls
12:17
gfldex joined
12:19
domidumont left
12:21
domidumont joined
|
|||
nine | tbrowder: added my findings | 12:23 | |
tbrowder | thanks | ||
12:26
kyclark left
|
|||
nine | Sometimes programming really is like a game of chess. You stare at a piece of code for half an hour, occasionally stroking your beard. And then change a single line to fix the bug. | 12:28 | |
masak | nine: "single line" tends to correlate with "good architecture", IME | ||
arnsholt | And exponentially long time-to-bug-found, sometimes | 12:31 | |
12:32
wamba joined
|
|||
masak | dunno if I see any correlation between time-to-bug-found and architecture quality... there probably is one, but it's not entirely immediate to me. | 12:33 | |
in both cases you need to go and look; you need to get in a certain state of mind, etc | |||
Xliff_zzzzz | Can someone tell me if something like "sub EXPORT(*%l)" can parse "use MyModule <:a :b :c>" without the need of having those export tags present in the code? | 12:35 | |
Hmmm.... Or can I cheat and use dummy tags, but that would require adding dynamic subs to a package. | |||
Roamer` | jnthn, did you just suggest that Hash[ValueType] $foo should constrain $foo to only accepts values of this type? I guess you must have missed my original golf snippet then, so here it is again... | 12:37 | |
m: use v6.c; my Hash[Int:D] $wtf = Hash[Int:D].new(); $wtf<a> = 7.62; dd $wtf; dd $wtf<a>; my Int:D %fine; %fine<a> = 7.62; | |||
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Int:D] $wtf = (my Int:D % = :a(7.62))Rat <element> = 7.62Type check failed in assignment to %fine; expected Int:D but got Rat (7.62) in block <unit> at <tmp> line 1» | ||
Roamer` | jnthn, how did I put a Rat into a Hash[Int:D]? | ||
12:38
adu joined
|
|||
jnthn | Roamer`: No idea. o.O Probably by constructing it directly, and uncovering a bug (because all the tests do it the `my Int:D %fine` way, I guess). Please RT. | 12:39 | |
Roamer` | jnthn, ok, I will, thanks | ||
CIAvash | m: Hash[Str, Int].new: 1,2 | 12:44 | |
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in binding to x; expected Str but got Int (2) in block <unit> at <tmp> line 1» | ||
CIAvash | what is x? | ||
m: Hash[Str, Str].new: 1,2 | |||
camelia | rakudo-moar f2df2c: OUTPUT«Type check failed in binding to key; expected Str but got Int (1) in block <unit> at <tmp> line 1» | ||
12:47
kyclark joined
12:50
MasterDuke joined
12:54
MasterDuke left
|
|||
timotimo | internal name, apparently | 12:54 | |
12:55
rindolf joined
13:01
patrickz joined
|
|||
patrickz | pmurias++ #nqp-js on npm, yay! | 13:03 | |
13:04
domidumont left
13:05
domidumont joined
|
|||
timotimo | jnthn wrote he "Elimianted" something ... i wonder how that works | 13:05 | |
13:05
sufrostico joined
|
|||
dalek | c: 02f4ff8 | gfldex++ | doc/Language/typesystem.pod6: show how to test for classness and enumness |
13:08 | |
Xliff_zzzzz | OK. | 13:09 | |
13:09
M-Illandan left
|
|||
Xliff_zzzzz | Another question. How can I access PACKAGE::EXPORT from a BEGIN phaser? | 13:09 | |
13:09
Sgeo left,
ilmari[m] left
|
|||
Xliff_zzzzz | %PACKAGE::EXPORT doesn't work. Neither does ::("PACKAGE::EXPORT"). | 13:09 | |
13:09
ilmari[m] joined
|
|||
Xliff_zzzzz | ::("%PACKAGE::EXPORT") isn't the same thing. | 13:10 | |
13:15
M-Illandan joined
|
|||
melezhik | Hi! One question concerning perl6 gramma | 13:19 | |
timotimo | grammophone :D | ||
melezhik | well, I mean grammar | ||
let's say I have two tokens foo and bar | 13:20 | ||
13:20
skids joined
|
|||
perlpilot | yes, perl 6 grammars hold the key to world peace | 13:20 | |
masak .oO( grammarophobe ) | |||
perlpilot | (unfortunately, the world doesn't have a lock that will accept that key) | ||
mst | ugexe: why did your one liner wrt Build.pm need ::("Build") even though it had -MBuild on it btw? | 13:21 | |
melezhik | I want to define that both token could be in input data | ||
13:21
adu left
|
|||
melezhik | obviously token TOP { <foo> | <bar> } does not work | 13:21 | |
nine | melezhik: how is that obvious? | 13:22 | |
perlpilot | melezhik: did you mean both tokens could be simultaneously in the input? | 13:23 | |
melezhik | ok, let me reshape my statement. I mean if input data has entries matched <foo> token and if the come first then only action binded to <foo> will be trigered | ||
despite the fact input data may have entires matched to <bar> token | 13:24 | ||
yes, exactly | |||
I want to fire actions on both <foo> and <bar> sort of entries | 13:25 | ||
moritz | you could have <foo> & <bar> to require both to match | ||
melezhik | but every time it will be only <foo> or onle <bar> | ||
moritz | so you could do something like [<foo> & <bar>] || [<foo> | <bar> ] | ||
though let me add that this is a pretty atypical use case for regexes or grammers | 13:26 | ||
arnsholt | melezhik: Are the entries matched *either* a foo *or* a bar, or can they be both at once? | ||
melezhik | mortiz: well, sounds good, but what if I have many of such types, like <foo>, <bar>, <baz> , then it's getting complicated | ||
arnsholt | It's not quite clear to me what you mean | ||
moritz | melezhik: I'm not called moritz. | ||
arnsholt | moritz: You're Spartacus? =) | 13:27 | |
moritz | melezhik: then you instead find a common way to tokenize your input, and do the rest in user-level code | ||
melezhik | sorry for typo moritz: | ||
moritz | arnsholt: moricus! | ||
masak .oO( Ave Imperator, moritzuri te salutant ) | 13:28 | ||
melezhik | moritz: not sure if I understand what you mean | ||
arnsholt | melezhik: Anyways, are you quite sure what you want isn't just /[<foo> | <bar>]+/? | 13:29 | |
moritz | melezhik: I mean that regexes and grammars aren't a good tool to find all possible ways to parse a string | ||
melezhik | yes I am sure | ||
13:29
MilkmanDan left
|
|||
moritz | melezhik: so instead you use regexes what they are good for, and parse in just one, more primitive way | 13:29 | |
melezhik: and write user-space code to generate all the possible ways to combine the primitive matches into more advanced matches | 13:30 | ||
perlpilot notes that P6 does have an :exhaustive modifier ;) | |||
melezhik | moritz: yes, I know how to do what I need in primitive way, using plain regexp, I wanted to have it via grammars | ||
moritz wants a pony in his grammar | 13:31 | ||
melezhik | sadly if I can't have grammars which works like I say ... | ||
13:31
MilkmanDan joined
|
|||
perlpilot | m: "foo" ~~ m/(foo)/; say @(); say "@()"; | 13:36 | |
camelia | rakudo-moar 68443f: OUTPUT«(「foo」)@()» | ||
perlpilot | Should @() interpolate withing double quoted strings? I think it should. | ||
Xliff_zzzzz | masak: "We who are about to die, salute you!" ??? | 13:38 | |
m: "foo" ~~ m/(foo)/; say @(); say "{@()}"; | 13:39 | ||
camelia | rakudo-moar 68443f: OUTPUT«(「foo」)foo» | ||
CIAvash | m: "foo" ~~ m/(foo)/; say @(); say "@()[]"; | ||
camelia | rakudo-moar 68443f: OUTPUT«(「foo」)foo» | ||
masak | Xliff_zzzzz: yes, but note the extra "z" | ||
Xliff_zzzzz: (it's a famous quote. even has its own Wikipedia page. gladiators used to said it to the emperor.) | 13:40 | ||
Xliff_zzzzz | masak: I didn't grok that so it fell into my ignore-and-hope-for-the-best filter | ||
13:40
lambd0x joined
|
|||
masak | Xliff_zzzzz: sometimes my jokes are too clever for my own good. I subject #perl6 to them anyway (sometimes) because in my mind, this channel is associated with geeky in-jokes | 13:41 | |
13:44
cdg joined
|
|||
arnsholt | FWIW, I thought it was pretty amusing =) | 13:44 | |
masak | arnsholt++ is on my mental checklist of people who would get the reference at-sight | 13:45 | |
perlpilot | I dunno ... I thought it should have been "mortizuri" to keep things consistent ;) | ||
masak | perlpilot: but the actual word is "morituri" | ||
I did consider both, but the way I did it fits better with the original word | |||
perlpilot | sure, but it all started from the "mortiz" typo | ||
masak | that spelling always reminds me of The Adams Family, for some reason | 13:46 | |
perlpilot | ITYM "Addams Family" :) | ||
masak | oh, I most likely do | ||
masak hangs his shed in hame | 13:47 | ||
lambd0x | Hello everybody! | ||
timotimo | greetings lambd0x | ||
masak | helloooo λ0x | ||
ugexe | mst: is just an artifact from when it used to be `require "Build.pm"` (before that stopped working for some Build.pm) | 13:48 | |
[ptc] | moritz: it's Perl6, so I'm sure you *can* have a pony in your grammar ;-) | 13:49 | |
mst | ugexe: ah. how come that stopped working but 'use' still does? | ||
moritz | speaking of nerdy (and slightly off-topic) things, I recommend the "Talk Nerdy" podcast: carasantamaria.com/podcast/ | ||
about hour-long interviews with scientists, science communicators, authors and other funny folks | |||
kyclark | How can I unpack a list of pairs in a for loop? | 13:50 | |
m: my @pairs = foo => 11, bar => 12; for @pairs -> [$key, $val] { put "$key = $val" } | |||
camelia | rakudo-moar 68443f: OUTPUT«Type check failed in binding to <anon>; expected Positional but got Pair (:foo(11)) in block <unit> at <tmp> line 1» | 13:51 | |
moritz | m: for a => 1, b => 2 -> (:$key, :$value) { say $key } | ||
camelia | rakudo-moar 68443f: OUTPUT«ab» | ||
ugexe | mst: specifically I dont know. -M happens to take a different module loading path which somehow worked around the problem (which was precomp related) | ||
moritz | kyclark: ^^ | ||
mst | weird | 13:52 | |
kyclark | moritz, how/why does that work? I see I can’t use :$val but have to say :$value. Is it calling a method on the Pair? | 13:53 | |
moritz | kyclark: yes | 13:54 | |
kyclark: it works for all objects, not just pairs | |||
timotimo | melezhik: i think you can go with / [ .*? "foo" .*? ] & [ .*? "bar" .*? ] /, but that could have some catastrophic backtracking, so may have to fiddle around a bit more | ||
moritz | kyclark: (and the [] unpacking in a signature only works for list-like things) | ||
timotimo | melezhik: personally, i woudln't do it with regex, but with a contains-substring-check :) | 13:55 | |
actually, if you put ^ at the beginning and end inside the brackets could work well | |||
moritz | then you could just as well match two separate regexes | ||
13:55
kurahaupo joined
|
|||
kyclark | OK, then for my case a List will be a better structure. Thanks. | 13:55 | |
ugexe | mst: it might have been fixed recently. the problem seemed related to precompiling the modules used by the Build.pm and nine did some commits that looked related | 13:56 | |
melezhik | as It told, it is going to be very complicated if one have many data tokens ( not only <foo> and <bar>) | ||
and in some case there are only a <foo> entires, and probably this solution won't work ... | 13:57 | ||
timotimo | well, the thing is, you're going against what regex wants. you're not caring about "match this first, then this" | ||
melezhik | or only <bar> entries in input data | 13:58 | |
timotimo | you want "does this match anywhere? does this other thing match anywhere? how about this thing?" | ||
personally, i'd split it into one .match or ~~ per token you want to find | |||
melezhik | I want 2 things 1) match all possible entries, if any (foo,bar, etc) 2) once entries matched - fire an actions for them ( this point is result of previous one ) | 13:59 | |
and third thing - I want to do it with a single perl6 grammar | 14:00 | ||
moritz | but why? | 14:01 | |
timotimo | you can have "method TOP" which calls a match for each token | ||
and runs the action methods manually perhaps? | |||
melezhik | moritz: why what? why I want it via perl6 grammar? | 14:02 | |
timotimo | yes, why indeed | 14:03 | |
moritz | melezhik: yes. And why do you want to do it in the first place? | 14:04 | |
melezhik | ahh, I already have a perl5/simple regexps implementation for my parser, I wanted to port it to perl6, then I noticed a perl6 grammar which I found quite interesting and potentially minimizing a code to express such a things | 14:05 | |
arnsholt | Do you have an example of the kind of text you're trying to parse? | ||
melezhik | sure | ||
arnsholt | This feels like an X Y problem | ||
melezhik | this is dsl specification - github.com/melezhik/outthentic-dsl...ode-syntax , I want to port it to perl6 using perl6 grammars, looks like I stick | 14:07 | |
14:07
harmil joined
|
|||
melezhik | let's have a simple case, I want to express generators: expression and regexp: expression in a single perl6 grammar rules | 14:08 | |
I know how to do this for every type of entry (regexp: and generator:) but when I need to have may grammar to match any of them I fail | |||
like <generator> | <regexp> does not work | 14:09 | ||
timotimo | well, with a grammar, it's anchored at start and end | ||
melezhik | as if generator entires comes first in input stream then grammar matches them and stop | ||
timotimo | so in order for that to work it has to find generator at the beginning and it has to reach the end. alternatively, regexp has to come at the beginning and go to the end | ||
melezhik | and other vise if regexp: entries comes first then grammar find them and stop ( ignoring generator entries ) | 14:10 | |
timotimo | entries? | 14:11 | |
oh, sorry | |||
it's confusing that the parts of the regexp are named "regexp" and something else :) | |||
so, did you try my solution with the .*? and the & in-between? | |||
harmil | melezhik: I think it could perhaps be clearer if you didn't specify the implementation via grammars that you think works, but rather an example text you wish to parse and the ultimate goal you wish to accomplish with it e.g. "1 + 2" and "I want to end up with a parse tree that looks like OP('+", VALUE("1"), VALUE("2"))". | 14:13 | |
melezhik | yes, your solution works | ||
then only concern is the number of entires types | 14:14 | ||
harmil | I say this coming in late, and only having skimmed the history, but I'm not clear on what you actually want to accomplish, here. | ||
melezhik | I have many like - generators, code, regexp, plain strings, asserts, text blocks ( you may take a look at the doc link I shared ) | ||
harmil : an ultimate goal is to port github.com/melezhik/outthentic-dsl...ode-syntax to perl6, and I am going to use grammars if it possible | 14:16 | ||
timotimo | what does "plain regular text within asserts range" mean? | ||
arnsholt | melezhik: gist.github.com/arnsholt/4ee0fa479...2beb922b7d | 14:17 | |
That's a sketch of how I'd start | |||
The different declarations in your DSL are distinct, so it's a question of either mathing one kind of declaration or another | |||
Then, if some of them share functionality, that's a question of how you structure the underlying logic classes, not the AST building | |||
timotimo | it already says your DSL is line-based | 14:18 | |
14:19
khw joined
|
|||
timotimo | so i wonder why you would want to use a full-text-at-once based thing, which is pretty much what grammars are | 14:28 | |
you'd have to re-create a line-by-line thing in grammars | |||
it's not hard, but you could leave it out completely if you wanted | |||
mst | if you can't do line-by-line how do you have a repl? | 14:29 | |
14:34
kyclark left
|
|||
timotimo | the repl actually evaluates each line separately | 14:36 | |
which is something we'd like to change in the future, too | |||
we've wanted to change that for a long time, actually | |||
smls | m: my $str = "a"; dd (($str ~~ /b/) // "").Str | 14:38 | |
camelia | rakudo-moar 68443f: OUTPUT«""» | ||
smls | ^^ is there a neater way to stringify a regex match, with 'no match = empty string'? | 14:39 | |
my $str = "a"; say ~($str ~~ /b/) // "" | |||
m: my $str = "a"; say ~($str ~~ /b/) // "" | |||
14:39
nbg23 left
|
|||
camelia | rakudo-moar 68443f: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1» | 14:39 | |
smls | ^^ Would be cool if this worked, but I suppose there's no Failure-like system for warning? | 14:40 | |
*warnings | |||
14:45
acrussell joined
|
|||
timotimo | you can "quietly { ... }" | 14:46 | |
m: say quietly ~Nil | |||
camelia | rakudo-moar 68443f: OUTPUT«» | ||
timotimo | m: say ~Nil | ||
camelia | rakudo-moar 68443f: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1» | ||
moritz | m: say quietly ~('a' ~~ /x/) | ||
camelia | rakudo-moar 68443f: OUTPUT«» | ||
moritz | m: say quietly ~('x' ~~ /x/) | ||
camelia | rakudo-moar 68443f: OUTPUT«x» | ||
14:51
kyclark joined
|
|||
melezhik | arnsholt: thanks for giving a hint, I will examine your draft soon more precisely , basically my code looks very familiar to what you suggest, I will let you know if run into troubles, | 14:51 | |
kyclark | Are there profiling tools for Perl 6? | 14:52 | |
14:53
lostinfog joined
|
|||
timotimo | kyclark: we have "perl6 --profile ..." | 14:53 | |
kyclark | Oh, cool. Sorry, should have been obvious. | ||
timotimo | hardly :) | 14:54 | |
14:55
pierre_ left
14:57
g4 left
14:58
cdg left
|
|||
gregf_ | llegedly | 14:58 | |
oops :/ sorry | |||
15:00
cdg joined
15:10
sakuya joined
15:11
pmurias left,
cdg left
|
|||
perlpilot | It would be neat if we had something like alpha.trycarbide.com/ for Perl 6 | 15:15 | |
15:22
rmmm left,
lambd0x left
|
|||
Xliff_zzzzz | Carbide would be a good thing for nqp.js, though.... right? | 15:23 | |
I would shudder to think of the work necessary to get that working for MoarVM. | 15:24 | ||
But stilll...nifty. | |||
sakuya | Is IO::Socket::INET support bind a local port like perl5 does . | 15:25 | |
15:25
jonas2 left
|
|||
sakuya | perl5 code : IO::Socket::INET->new( PeerAddr => '127.0.0.1', PeerPort => 3333, LocalPort => 23356,Proto => 'tcp'); works fine | 15:25 | |
perl6 : IO::Socket::INET.new(:host<127.0.0.1>, :port(3333), :localhost<127.0.0.1>, :localport(23356); not working | 15:26 | ||
15:27
zacts joined,
Khisanth left
15:28
rmmm joined
|
|||
[Coke] | timotimo: (angular 2) nope, sorry. Did find docs on how to make a single-page pre-built app, though. | 15:28 | |
yoleaux | 02:55Z <pmichaud> [Coke]: You're currently listed as an editor on rakudo.org... shall I increase that to "administrator"? | ||
15:33
cognominal left
|
|||
[Coke] | .tell pmichaud that question predates you fixing the thing I couldn't fix | 15:40 | |
yoleaux | [Coke]: I'll pass your message to pmichaud. | ||
15:40
Khisanth joined
|
|||
[Coke] | .tell pmichaud regarding segregating roast queue vs. rakudobug queue - no, I don't think it's worth our time necessarily to force the tickets into the right queues. We can probably do just as well by having some metadata about tickets in RT | 15:41 | |
yoleaux | [Coke]: I'll pass your message to pmichaud. | ||
[Coke] | .tell pmichaud for some tickets, it's easy or obvious to move them; but anyone working on anything in the toolchain or lang spec is going to deal with RT. | 15:42 | |
yoleaux | [Coke]: I'll pass your message to pmichaud. | ||
15:45
MetaZoffix joined
|
|||
geekosaur | sakuya, docs.perl6.org/type/IO$COLON$COLON...method_new | 15:46 | |
MetaZoffix | 🎺🎺🎺 There are currently 55 RFC tickets: perl6.fail/t/RFC I invite users to review and comment on those RFCs, so the core devs would have some feedback about the proposed changes. | 15:48 | |
15:52
ufobat joined
15:56
patrickz left
|
|||
sakuya | geekosaur, the page has not what i want | 15:57 | |
dalek | line-Perl5: dd99758 | niner++ | configure.pl6: Fix configure.pl6 on rakudo-j Sadly $*VM.config keys are not standardized among backends. |
15:58 | |
16:00
cognominal joined
16:02
sakuya left
16:03
cdg joined
16:05
edehont joined
16:07
canopus left
16:10
domidumont left
16:14
itaipu joined
16:16
canopus joined
|
|||
nine | moritz++ # thanks for perl6-all-modules making my life easier | 16:16 | |
16:16
zacts left
16:21
rudolfochrist joined
16:26
MetaZoffix left
16:32
canopus left
16:39
canopus joined
|
|||
moritz | nine: you're welcome. Nice that others find it useful too | 16:42 | |
timotimo | i just cloned it again the other day, but i wasn't good enough to find the right grep incantation for what i wanted to know | 16:43 | |
moritz | timotimo: what did you want to know? | 16:45 | |
16:46
lizmat joined
|
|||
timotimo | wanted to know more about export/import tags | 16:46 | |
16:46
rudolfochrist left
|
|||
moritz | if/how they are used? | 16:46 | |
16:47
ChoHag left
16:49
dLeCamarae left
|
|||
kyclark | m: my @y = (1..10), (5..11), (12..15); my $x = (2..7); for @l -> $y { say so $x (&) $y } | 16:49 | |
camelia | rakudo-moar 68443f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '@l' is not declaredat <tmp>:1------> 3 (5..11), (12..15); my $x = (2..7); for 7⏏5@l -> $y { say so $x (&) $y }» | ||
kyclark | Sorry | 16:50 | |
m: my @y = (1..10), (5..11), (12..15); my $x = (2..7); for @y -> $y { say so $x (&) $y } | |||
camelia | rakudo-moar 68443f: OUTPUT«TrueTrueFalse» | ||
kyclark | Anyway to do that with hyper operator (>>)? | ||
timotimo | i was trying to help out xliff with the color names module | ||
16:51
woolfy joined
|
|||
nine | moritz: in case you wonder. That's what I just used it for: github.com/perl6/toolchain-bikeshe...a2faa31593 | 16:55 | |
16:56
pierre_ joined
17:00
pierre_ left
17:15
leont joined,
zakharyas left
17:17
MilkmanDan left,
mephinet joined
17:22
mcmillhj joined
17:26
MilkmanDan joined
17:40
firstdayonthejob joined
17:41
leont left,
rudolfochrist joined
17:42
dakkar left,
margeas left
17:45
LeCamarade joined
|
|||
LeCamarade | This is Rakudo version 2016.04 built on MoarVM version 2016.04 | 17:45 | |
implementing Perl 6.c. | 17:46 | ||
Hmm. | |||
Time for an upgrade. | |||
mst | LeCamarade: do you happen to have a local::lib setup for perl5 and feel like testing something? | 17:47 | |
17:50
domidumont joined
|
|||
LeCamarade | I do not really understand Perl 5 stuff anymore (if ever), but I guess I can run whatever you have. | 17:50 | |
I mean, I do not know what local::lib would even be. I guess a library of some sort. | 17:51 | ||
Xliff_zzzzz | Moritz: How large is p6-all-modules | 17:52 | |
I may need to do some grep diving myself. | |||
17:54
skrshn joined
|
|||
skrshn | Newbie question | 17:54 | |
m: sub avg(Int @n) { ([+] @n) / @n.elems }; say avg(1..10); | |||
camelia | rakudo-moar 68443f: OUTPUT«Type check failed in binding to @n; expected Positional[Int] but got Range (1..10) in sub avg at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
Xliff_zzzzz | Well... 187M; (Answering my own question)++ | 17:55 | |
That's actually not bad. | |||
skrshn | m: sub avg(Int @n) { ([+] @n) / @n.elems }; say avg([1..10]); | 17:56 | |
camelia | rakudo-moar 68443f: OUTPUT«Type check failed in binding to @n; expected Positional[Int] but got Array ($[1, 2, 3, 4, 5, 6, 7...) in sub avg at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
kyclark | m: sub avg(*@n) { ([+] @n) / @n.elems }; say avg(1..10); | 17:57 | |
camelia | rakudo-moar 68443f: OUTPUT«5.5» | ||
kyclark | You can't put constraints on slurpy args. I've learned this the hard way. | ||
17:59
MasterDuke joined
|
|||
MasterDuke | m: sub avg(Int @n) { @n.sum / @n.elems }; say avg(Array[Int].new(1..10)) | 17:59 | |
camelia | rakudo-moar 68443f: OUTPUT«5.5» | ||
18:00
rudolfochrist left
|
|||
tailgate | How do I get File::Spec::Functions? | 18:00 | |
MasterDuke | tailgate: you could clone and install it manually, or use panda or zef | 18:02 | |
tailgate | Ah. I tried variations of `panda install File::Spec` and it wasn't in the ecosystem | ||
and it's a dependency for perl6/doc | 18:03 | ||
Xliff_zzzzz | Much of the nitty gritty EXPORT examples seem to be in rakudo-p5 | ||
MasterDuke | you may need to do a 'panda update' first | ||
kyclark | tailgate, I've been using the $*SPEC object for those functions, but I confess I hold my nose. I do not like that black magic and would prefer to explicitly bring in the module/functions I want. | 18:04 | |
Tell me if there is a better way. | |||
Xliff_zzzzz | Some of this looks promising... | 18:05 | |
18:06
bob777 left
|
|||
MasterDuke | tailgate: ahh, that's a Perl 5 module | 18:07 | |
18:07
itaipu left
|
|||
MasterDuke | kyclark: you might be interested in SPEC::Func | 18:07 | |
18:08
leont joined,
itaipu joined
|
|||
kyclark | MasterDuke, how do I pull up docs on things like that? "perl6 --doc SPEC::Func" doesn't work. | 18:08 | |
MasterDuke | kyclark: i'm not actually all that sure. i usually just go directly to the repo, github.com/zoffixznet/perl6-SPEC-Func in this case | 18:09 | |
kyclark | OK, that's useful. Thanks! | 18:11 | |
18:22
itaipu left
18:23
domidumont left
18:27
itaipu joined
|
|||
Xliff_zzzzz | \o/ | 18:30 | |
\o\ | |||
/o/ | |||
Almost working. | |||
I need to do "use Color::Names <a>.list" for some reason. | |||
Otherwise I get a weird error. | |||
If I "use Color::Names <a b>", it's a proper list and I don't need to .list | 18:31 | ||
Doing "multi sub EXPORT($a)" doesn't seem to work. | 18:32 | ||
m: dd <a> | |||
camelia | rakudo-moar 68443f: OUTPUT«"a"» | ||
Xliff_zzzzz | m: dd <a>.WHAT | ||
camelia | rakudo-moar 68443f: OUTPUT«Str» | ||
18:34
cdg left,
MetaZoffix joined
|
|||
MetaZoffix | Xliff_zzzzz: what's your export sub is like? Sounds like you just need to make it slurp | 18:35 | |
sub EXPORT (*@names) { ... } | |||
kyclark: there's no magic. Perl 6 has dynamic variables. $*SPEC is a dynamic variable that has one of the IO::Spec::* objects in it (which, depends on the OS), and that object privides the methods you seek. | 18:36 | ||
m: my $obj = $*SPEC; say $obj.splitpath: "a/b/c"; | 18:37 | ||
camelia | rakudo-moar 68443f: OUTPUT«( a/b/ c)» | ||
MetaZoffix | m: with $*SPEC { say join .dir-sep, .splitpath: "a/b/c"; | ||
camelia | rakudo-moar 68443f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3 say join .dir-sep, .splitpath: "a/b/c";7⏏5<EOL>» | ||
MetaZoffix | m: with $*SPEC { say join .dir-sep, .splitpath: "a/b/c"; } | ||
Xliff_zzzzz | MetaZoffix, has always slurped. | ||
camelia | ( no output ) | ||
Xliff_zzzzz | However if I don't specify argument to "use", I get "Cannot find method 'merge-symbols': no method cache and no .^find_method | 18:38 | |
" | |||
MetaZoffix | Got code you can pastebin? | ||
Xliff_zzzzz | MetaZoffix: Already pushed to GitHub --> github.com/Xliff/p6-color-names/bl...ames.pm#L7 | 18:39 | |
18:41
girafe joined
|
|||
MasterDuke | Xliff_zzzzz: btw, [email@hidden.address] $_ eq @a.any })' could be [email@hidden.address] | 18:43 | |
MetaZoffix | Xliff_zzzzz: is "Missing serialize REPR function for REPR VMException" your "weird error"? | ||
MasterDuke | m: my @a = <a b c d e f>; my @b = <c d z x f>; say @a.grep(@b.any) | 18:44 | |
camelia | rakudo-moar 68443f: OUTPUT«(c d f)» | ||
Xliff_zzzzz | MetaZoffix, one of them.... yeah | 18:45 | |
MasterDuke++ # Conciseness! | |||
MetaZoffix | No idea. It may something to do with doing require in "mainline" or something. I had to avoid that in some of my modules. | 18:47 | |
nadim_ | Hi, do we have something that can give us an object size, in bytes, like Devel::Size? | 18:50 | |
18:50
gabiruh left
|
|||
MetaZoffix | m: my @a = <a b c d e f>; my @b = <c d z x f>; say @a.Set{@b}:k | 18:50 | |
18:50
DANtheBEASTman left
18:51
kaare__ joined,
camelia joined,
M-Illandan left,
sufrostico left,
kaare_ left,
krunen_ left,
DrForr left,
sjn left,
japhb left,
pmichaud left
|
|||
skrshn | MasterDuke: thanks | 18:51 | |
18:51
sufrostico joined
18:52
rindolf left,
krunen left,
Ulti left,
masak left
|
|||
MetaZoffix | benchable6: HEAD m: for ^10000 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.Set{@b}:k } | 18:52 | |
18:52
literal left,
avar left
|
|||
benchable6 | MetaZoffix, starting to benchmark the 1 given commits | 18:52 | |
MetaZoffix, ¦«HEAD»:3.6870 | |||
MetaZoffix | benchable6: HEAD m: for ^10000 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.grep(@b.any) } | ||
benchable6 | MetaZoffix, starting to benchmark the 1 given commits | ||
18:52
sjn joined,
benchable6 left,
hanekomu joined,
masak joined,
bitmap left,
japhb joined,
pmichaud joined,
krunen_ joined
18:53
BooK joined
|
|||
Xliff_zzzzz | Well this is good progress for me! 95% complete. | 18:53 | |
18:53
ChanServ sets mode: +v camelia,
Ulti joined,
avar joined,
avar left,
avar joined
|
|||
Xliff_zzzzz | MetaZoffix++; MasterDuke++, timotimo++ | 18:53 | |
18:54
benchable6 joined
|
|||
MasterDuke | bench: compare HEAD for ^10000 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.Set{@b}:k } ||| for ^10000 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.grep(@b.any) } | 18:54 | |
benchable6 | MasterDuke, starting to benchmark the 1 given commits | ||
MetaZoffix | benchable6: so... any word on that bench I asked you to do? | ||
ooh, neat | |||
MasterDuke | it died on the second one | ||
18:55
Matthew[m] left,
sufrostico left,
benchable6 left
|
|||
MetaZoffix | bench: compare HEAD for ^100 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.Set{@b}:k } ||| for ^100 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.grep(@b.any) } | 18:55 | |
MetaZoffix chuckles | 18:56 | ||
MasterDuke | the server is in the middle of building old commits | ||
18:56
bitmap joined,
DANtheBEASTman joined,
chee joined,
gabiruh joined,
benchable6 joined
|
|||
MetaZoffix | bench: compare HEAD for ^100 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.Set{@b}:k } ||| for ^100 { my @a = <a b c d e f>; my @b = <c d z x f>; say @a.grep(@b.any) } | 18:56 | |
benchable6 | MetaZoffix, starting to benchmark the 1 given commits | ||
18:57
M-Illandan joined,
Bucciarati joined
18:58
DrForr joined
|
|||
benchable6 | MetaZoffix, gist.github.com/9d2ec8216117a1b2fc...22f0b3876e | 18:58 | |
18:59
ugexe left
19:00
literal joined
|
|||
harmil_wk | MetaZoffix: what's ||| | 19:01 | |
I don't see it in the Routines doc | |||
MetaZoffix | harmil_wk: new operator we ivented. Makes stuff run about 1000x faster :P | ||
harmil_wk: it's a special syntax for benchable6 robot to specify to different pieces of code to bench | |||
*two | |||
MasterDuke | fyi, you can do more than two | 19:02 | |
harmil_wk | Ah, darn, I was about to go retrofit my modules for turbo mode. :-) | ||
MetaZoffix | bench: compare HEAD my @r; for ^100 { my @a = 1e5..1e6; my @b = 1.1e5..1.1e6; @r.push: @a.Set{@b}:k } ||| my @r; for ^100 { my @a = 1e5..1e6; my @b = 1.1e5..1.1e6; @r.push: @a.grep(@b.any) } | 19:03 | |
benchable6 | MetaZoffix, starting to benchmark the 1 given commits | ||
19:04
krunen joined
|
|||
El_Che | If you build rakudo from source, it clones nqp from github and builds it first. If you build nqp it needs moar first. Circular dependecies much? (~_~) | 19:04 | |
19:04
rindolf joined
19:05
frew joined
|
|||
MasterDuke | MetaZoffix: btw, the compare option is a little fragile. because of the way it runs the code, it will complain about some things (like declaring a sub in each option with the same name) | 19:05 | |
El_Che | (If you try to build a pkg, you don't want it to dynamically clone a master branch remotely) | ||
19:07
benchable6 left,
nebuchadnezzar left
|
|||
MasterDuke | huh, it's still running your benchmark, don't know why it quit | 19:08 | |
Xliff_zzzzz | Weird... now I am getting this "Cannot invoke this object (REPR: Uninstantiable; EXPORT)" if I define multi EXPORTs | ||
MetaZoffix | MasterDuke: a wild guess is it's not parallelizing the requests, so it wasn't able to respond to a ping request 'cause it's busy doing the bench | 19:09 | |
Also... why is it taking so long to run it? There are just 100 iterations? | |||
19:09
nebuchadnezzar joined
19:10
darutoko left,
Matthew[m] joined
|
|||
MetaZoffix | Oh, I guess I over-did it with the array sizes | 19:10 | |
MasterDuke | it runs each option 10 times | 19:11 | |
MetaZoffix | oh | ||
Well, even 1 time is taking forever on my box so.. If it's still running, it may be useful to kill it :P | |||
MasterDuke | and the server is pretty busy right now building+compressing commits | 19:12 | |
19:12
lostinfog left
|
|||
MasterDuke | ha, will do | 19:12 | |
19:13
benchable6 joined
|
|||
MetaZoffix | m: say "It would've taken more than {(9.930 + 127) * 2000 / 60} minutes" | 19:15 | |
camelia | rakudo-moar 68443f: OUTPUT«It would've taken more than 4564.333333 minutes» | ||
MetaZoffix | Had to kill @a.Set{@b}:k version after 2 minutes, for a single iteration. | 19:16 | |
19:16
MetaZoffix left
|
|||
nine | El_Che: it only clones nqp if you tell it to with --gen-nqp | 19:21 | |
skids | m: enum FF <zero one two three>; FF(2).perl.say; FF(two).perl.say | 19:25 | |
camelia | rakudo-moar 68443f: OUTPUT«FF::twoFF::two» | ||
skids | m: enum FF <zero one two three>; FF(FF(2)).perl.say; | ||
camelia | rakudo-moar 68443f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in typename; couldn't find final ')' at <tmp>:1------> 3enum FF <zero one two three>; FF(FF(7⏏052)).perl.say;» | ||
19:27
ugexe joined
19:32
wamba left
19:35
Wiertek joined
19:40
setty2 joined
19:41
rindolf left
19:42
Actualeyes left
19:46
rindolf joined
19:48
MasterDuke left
19:54
MasterDuke joined
19:55
eliasr joined
19:56
CIAvash left,
Wiertek93 joined
19:57
smls left
19:58
cdg joined
20:00
Wiertek left,
Wiertek joined
20:04
Wiertek93 left,
cpage_ left,
cpage_ joined
|
|||
El_Che | nine: yes, I get the --gen thing. But when you try to build nqp (to suppy to the rakudo build) it needs moar. I'll have a look later | 20:05 | |
[Coke] | --gen-nqp implies --gen-moar, IIRC. | ||
20:06
espadrine joined
|
|||
[Coke] | too much backlog: what's the question? | 20:06 | |
moritz | [Coke]: it's the other way 'round | 20:07 | |
[Coke]: --gen-moar implies --gen-nqp | 20:08 | ||
El_Che | 1:04 < El_Che> If you build rakudo from source, it clones nqp from github and builds it first. If you build nqp it needs moar first. Circular dependecies much? (~_~) | ||
21:05 < El_Che> (If you try to build a pkg, you don't want it to dynamically clone a master branch remotely) | |||
[Coke]: I was looking at packaging, i.e. without the "generate from github part" | |||
[Coke] | it's not circular; rakudo needs nqp needs moar. | 20:09 | |
El_Che | but moar is not release as a tar? | ||
(or part of the rakudo dist?) | |||
moritz | sure there are more tarballs | ||
20:10
pecastro left
|
|||
moritz | El_Che: take a look at a the rakudo-star makefile; it works with tarballs | 20:10 | |
[Coke] | El_Che: moarvm.com/releases.html | ||
El_Che | moritz: great tip. Thanks | ||
20:11
rudolfochrist joined,
pmurias joined
|
|||
[Coke] | if you're packaging, I would recommend doing as the macports port does and have 3 packages. | 20:11 | |
pmurias | perlpilot: is that carbide thing usable for big programs or just for short snippets | ||
El_Che | [Coke]: I am looking if fpm and docker could be a base for simple packages (I was thinking ubuntu and centos) | 20:12 | |
20:12
labster joined
|
|||
[Coke] | I know most of those words. | 20:12 | |
pmurias | perlpilot: there are a lot of things that are ultra awesome for short things but don't scale at all | 20:13 | |
[Coke] | on docker, there's already a prebuilt thing that includes docker/nqp/moarvm | ||
El_Che | [Coke]: I have my own rakudo docker image (using rakudobrew) for my apps | ||
[Coke] | sorry includes rakudo/nqp/moarvm | ||
El_Che | [Coke]: this docker is to build packages | ||
[Coke] | ... why? | 20:14 | |
... nevermind. | |||
The time it would take you to explain it to me isn't going to help you. :) | |||
El_Che | so we get rpms & debs for poeple to install that want to try it | ||
the docker part is that everyone here can run it, and create the packages when needed | 20:15 | ||
20:15
rudolfochrist left
20:16
calopter joined
|
|||
El_Che | asking users to compile it themselves may be a deterrent, and several people here consider rakudobrew a rakudo dev tool not meant for end users | 20:17 | |
[Coke] | "the docker part is" ahhhh, thanks | ||
20:17
TEttinger joined
|
|||
El_Che | [Coke]: the easy way it to create full vm's, but that's not portable | 20:18 | |
[Coke] | yah, that would have been a lovely option to have for the macports so everyone had the tools to build a port. Great idea. | 20:19 | |
20:19
skrshn left
|
|||
calopter | Hi! Is there a perl6 equivalent to haskell's iterate function? I'm looking for a way to generate a lazy list from a seed value and a function that produces the next element | 20:23 | |
geekosaur | docker's kinda not really a thing on OS X (you can build and use it, but it's controlling virtualbox. there is zero chance cgroups get added to the OS X kernel) | ||
moritz | calopter: yes, the sequence operator can do that | ||
m: say (1, { $_ * 2 + 5} ... *)[^10] | 20:24 | ||
camelia | rakudo-moar 68443f: OUTPUT«(1 7 19 43 91 187 379 763 1531 3067)» | ||
El_Che | geekosaur: yeah, I had specifically Ubuntu 16.04 and Centos7 in mind | ||
calopter | moritz: Thanks! | ||
geekosaur | that was aimed more at [Coke]'s comment re macports | ||
[Coke] | geekosaur: I'm using the native Docker.app now | ||
geekosaur | sure, and it's using a vbox under the covers | 20:25 | |
El_Che | I had a look at Snap (the multi distro pkg by Ubuntu) but I haven't seen it in the wild yet | ||
geekosaur | docker needs cgroups, otherwise it can only control a hypervisor | ||
[Coke] | geekosaur: I'm not sure if by vbox you mean something as heavyweight as the oracle VirtualBox app which it was using before. | ||
it's not using that now | |||
geekosaur | pretty sure it's using the virtualizaton engine under the covers. there's plenty of references to docker on os x and how it has no choice but to control a hypervisor | 20:26 | |
*maybe* they have some cut-down version that can partially --- but only partially --- simulate it using the sandbox framework. | |||
but that will have lots of limitations | 20:27 | ||
(and for some uses it's even slower than a hypervisor) | |||
El_Che | [Coke]: fpm does also create osx pkg files, but I'm not sure how the crosscompiling would work in that case | ||
(you can run it natively of course) | |||
20:27
itaipu left,
pecastro joined
20:28
itaipu joined
|
|||
calopter | moritz: would this approach work with a stateful object like Inline::Perl5 WWW::Mechanize? I'm looking to build a lazy list of webpages, crawling from one to the next with follow_link() | 20:28 | |
geekosaur | [Coke], also confusing the issue is 10.11 has a framework for wrapping hypervisors, which means it can be using one without you seeing it... | 20:30 | |
(there might even be a minimal hypervisor in there, which might be used by the sandbox on 10.11) | |||
El_Che | geekosaur: what you're describing is the exact way that it will work on windows (through hyper-v onder the covers) | 20:31 | |
geekosaur | yeh | ||
geekosaur already knew windows uses hyper-v for WoW (32 bit windows apps running in 64-bit windows) | |||
El_Che | github.com/mist64/xhyve <-- probably the one on osx | 20:32 | |
hharnisc.github.io/2016/06/16/deve...-2016.html | 20:34 | ||
geekosaur | indeed " The Docker engine is running in an Alpine Linux distribution on top of an xhyve Virtual Machine on Mac OS X " | ||
there you go | |||
moritz | calopter: sure, why not? | ||
geekosaur vaguely familiar with xhyve, knows it's modeled after bhyve (freebsd's answer to linux-kvm) | 20:35 | ||
20:35
cpage_ left
|
|||
calopter | moritz: Cool. Coming from haskell so still wrapping my head around interacting with stateful stuff :) Thanks! | 20:35 | |
moritz | calopter: though that sounds like something you might want to write as gather while condition { fetch; parse; take $result } | ||
calopter | moritz: that does sound good! | 20:36 | |
geekosaur | the early betas were using virtualbox; I didn't know they'd switched to xhyve for the release | ||
20:40
pullphinger joined
|
|||
El_Che | [Coke]: mac ports is pretty neat | 20:43 | |
looking at the ports now | |||
20:45
jjido joined
20:52
zengargoyle left,
jjido left
20:53
jjido joined,
espadrine left
20:54
zengargoyle joined
20:59
zengargoyle left
21:00
skids left,
pmurias left,
zengargoyle joined
21:01
Wiertek left
21:04
cpage_ joined
21:13
mcmillhj left
|
|||
El_Che | ok, the container is building some stuff. I am curious :) | 21:19 | |
21:19
calopter left
21:22
nadim_ left
21:23
edehont left,
nadim_ joined,
pullphinger left
|
|||
El_Che | root@09a2f80615fe:~# /opt/rakudo/bin/perl6 -v | 21:26 | |
This is Rakudo version 2016.08.1 built on MoarVM version 2016.08 | |||
implementing Perl 6.c. | |||
this could work \o/ :) | |||
21:27
rindolf left
21:29
acrussell left
21:30
kyclark left
|
|||
harmil_wk | If I have two Promises, a long-running task and a timeout (ala Promise.in($seconds)) what should I do when the timeout happens to terminate the other Promise? | 21:31 | |
timotimo | harmil_wk: check for the timeout regularly inside your work code | ||
harmil_wk | Unfortunately, that work code is calling into a library that might take too long. This is testing code. What I really want to do is shoot it in the head... | 21:32 | |
21:32
jjido left
21:33
mcmillhj joined
|
|||
timotimo | you can use NativeCall's CPointer to write to a memory location that's shared that you know will crash the thread without crashing the whole application | 21:34 | |
harmil_wk | That seems ... graceless, but I guess it would work. There's really no ability to terminate a thread? | ||
21:34
jjido joined
|
|||
harmil_wk | But thank you for answering, I don't want you to think I'm not grateful, just grumbly | 21:35 | |
21:38
mcmillhj left,
AndyBotwin joined
|
|||
timotimo | i think at some point we may get a "cause that thread to have an exception thrown" feature | 21:40 | |
but terminating threads is pretty problematic | |||
when you have the possibility to throw an exception, you can get things like "proper clean-up of shared resources and locks" | 21:42 | ||
21:43
edehont joined
|
|||
leont | terminating threads cleanly is very non-portable, AFAIK | 21:44 | |
21:45
edehont left
|
|||
timotimo | that's what i've heard, yes | 21:46 | |
21:46
mcmillhj joined,
margeas joined
|
|||
timotimo | i must say python's "KeyboardException" or "KeyboardInterrupt" or something seemed really cool until i tried to use it with a Real Program in the wild | 21:46 | |
leont | I mainly know it because of some completion script that doesn't like being killed with control-C | 21:47 | |
timotimo heads towards bed | |||
leont | It annoys me every time | ||
timotimo | lik dis if you cri everitim | 21:48 | |
21:51
mcmillhj left
|
|||
El_Che | I am under the impression that panda and zef do not have something to specify a --prefix to be installed, am I right? | 21:51 | |
ugexe | zef has -to / --install-to | ||
El_Che | ugexe: also for zef itself? | 21:52 | |
ugexe | sure | ||
El_Che | ok, trying, thx | ||
21:54
nadim_ left
21:56
woolfy left
|
|||
El_Che | ugexe: probably extremely silly, but zef complains about the dir: paste.ubuntu.com/23113650/ | 21:59 | |
ugexe: the idea is to add zef to a fresh compiled rakudo in order to pkg it | |||
ugexe | did you read the README? | 22:00 | |
El_Che | yes, sorry if I missed something | ||
ugexe | github.com/ugexe/zef#custom-instal...-locations | ||
El_Che | thx | ||
it works | 22:03 | ||
22:03
grondilu left,
mcmillhj joined,
bbkr joined
22:04
cpage_ left
|
|||
leont | lizmat: have an issue for that test counter issue | 22:04 | |
Will try to polish tomorrow | 22:05 | ||
22:07
kyclark joined
22:08
mcmillhj left,
Sgeo joined
|
|||
TimToady waves from DEN | 22:09 | ||
lizmat waves from LJU (well, actually a few clicks away from that) | 22:11 | ||
leont | I challenge you to pronounce it properly! :-p | 22:14 | |
22:14
jjido left
22:15
mcmillhj joined
|
|||
El_Che | ugexe: I wanted to provide a generic zef on a system localtion so the user could install what I needed. I didn't take into account that when I do that, zef will try to install modules in this path (no writable to the user). | 22:15 | |
leont | ugexe: I'd really like a zef on TAP::Harness | ||
El_Che | ugexe: so it's probably better the user installs his own zef | 22:16 | |
22:18
itaipu left,
firstdayonthejob left
|
|||
El_Che | ugexe: maybe the config.json could help me here | 22:18 | |
good night, going to bed | 22:19 | ||
22:19
itaipu joined,
mcmillhj left
22:20
maybekoo2 joined
|
|||
dalek | c: 8cfffc2 | coke++ | doc/Type/Range.pod6: remove trailing whitespace |
22:22 | |
22:24
maybekoo2 left
22:25
maybekoo2 joined
22:27
skids joined
22:33
Wiertek joined,
mcmillhj joined
22:35
cpage_ joined
22:36
kyclark left
|
|||
ugexe | leont: it already exists, you just have to disable the 2 default testing adapters that come first in the config: `perl6 -Ilib bin/zef --/prove --/default-tester test .` | 22:38 | |
22:38
mcmillhj left
22:40
RabidGravy left
|
|||
ugexe | github.com/ugexe/zef/blob/master/l...ce/TAP.pm6 # just basics | 22:41 | |
the indirect names are used so that older rakudos don't complain | 22:42 | ||
El_Che: you can also install your modules invoking zef directly; it never needs to be installed at all | 22:48 | ||
22:48
Wiertek left
|
|||
leont | Ah, cool | 22:48 | |
22:51
kurahaupo left
22:52
mcmillhj joined
22:56
harmil_wk left
22:57
mcmillhj left
23:05
leont left,
Cabanossi joined
23:06
akosgheri left
23:21
mcmillhj joined
23:26
mcmillhj left
|
|||
skids | could someone with the appropriate bits flag RT#124251 as testsneeded? | 23:32 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124251 | ||
23:52
mcmillhj joined
23:53
MasterDuke left
23:56
mcmillhj left
23:58
pierre_ joined
|