»ö« 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:13
ugjka left
00:20
Bigger left
00:24
Actualeyes joined
00:29
wamba left
00:33
pierre_ joined
00:36
espadrine left
00:39
labster left
00:53
rurban1 left
00:58
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:04
AlexDaniel joined
01:07
xinming left
01:08
xinming joined
|
|||
jnthn | So I finally took the time to write up a full answer on the mutator question. I'm glad, because it comes up every so often, and now I've got my answer to point to: 6guts.wordpress.com/2016/11/25/per...ood-thing/ :) | 01:10 | |
Also my browser doesn't seem to think spell checking is something it wants to do, and it's 2am, so something will have sneaked past me. | 01:11 | ||
But I'm going to sleep now. :) | |||
01:12
xinming left
|
|||
viki | jnthn: night \o :) | 01:12 | |
01:13
xinming joined
|
|||
jnthn | 'night o/ | 01:17 | |
01:20
xinming left
01:21
xinming joined
|
|||
viki | jnthn++ great post :) | 01:24 | |
jnthn: the main thing I've learned is that if I repeat a bad idea often enough, you'll write great blogs on the topic ;) | 01:25 | ||
01:25
xinming left
01:26
xinming joined
|
|||
samcv | is there something i can use that is faster than JSON Tiny, (tried JSON fast but it will fail sometimes saving my hashes) | 01:27 | |
for saving data from hash tables that hold strings | |||
doesn't have to be JSON at all | |||
01:30
Eddward joined
|
|||
viki | So .perl then? :) | 01:32 | |
m: my %h = :42foo; :43bar; my $data = %h.perl; my %new-hash = $data.EVAL; say %new-hash | 01:33 | ||
camelia | rakudo-moar 64343d: OUTPUT«WARNINGS for <tmp>:Useless use of ":43bar" in sink context (line 1){foo => 42}» | ||
viki | m: my %h = :42foo, :43bar; my $data = %h.perl; my %new-hash = $data.EVAL; say %new-hash | ||
camelia | rakudo-moar 64343d: OUTPUT«{bar => 43, foo => 42}» | ||
Eddward | Is there a short hand for assigning the same value to multiple keys in a hash? | 01:37 | |
MasterDuke | m: my @a = <a b>; my %h; %h{@a} = 2 xx @a.elems; dd %h | 01:39 | |
camelia | rakudo-moar 64343d: OUTPUT«Hash %h = {:a(2), :b(2)}» | ||
Eddward | rakudo: my %p ; %p<a b c> = 1 xx *; %p.perl.say | 01:40 | |
camelia | rakudo-moar 64343d: OUTPUT«{:a(1), :b(1), :c(1)}» | ||
Eddward | That works, thanks! | 01:41 | |
MasterDuke | np | ||
01:41
ocbtec left
|
|||
viki | m: my %p = <a b c>.Bag; dd %p | 01:43 | |
camelia | rakudo-moar 64343d: OUTPUT«Hash %p = {:a(1), :b(1), :c(1)}» | ||
MasterDuke | i really like xx *, hadn't thought of that | 01:44 | |
viki | Yeah, neat | ||
01:45
labster joined
|
|||
Eddward | I'm tweaking blogs.perl.org/users/ken_youens-cla...eader.html | 01:45 | |
my %pause is default(.05); | 01:46 | ||
%pause<! ? .> = .3 xx *; | |||
%pause<, ;> = .1 xx *; | |||
: | |||
sleep %pause{$_}; | |||
viki | Eddward: but what about the default? | 01:47 | |
Eddward | my %pause is default(.05); | ||
viki | doh | ||
I need to go sleep :D | |||
Eddward | I've been testing with camelia. I don't know if it actually works. | 01:48 | |
Is there a debian repository for current * releases? | 01:49 | ||
viki | No idea | 01:50 | |
MasterDuke | not sure about a repo, but i believe El_Che makes packages | ||
viki | That's just for regular Rakudo. github.com/nxadm/rakudo-pkg/releases | ||
Eddward | cool | ||
viki | huggable: deb :is: CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases | 01:51 | |
huggable | viki, Added deb as CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases | ||
dalek | c: dc154aa | MasterDuke17++ | doc/Type/Hash.pod6: Add examples using slices |
01:57 | |
synopsebot6 | Link: doc.perl6.org/type/Hash | ||
MasterDuke | Eddward++ | 01:58 | |
02:08
eisen74 left
02:21
pierre_ left
02:25
kalkin- left,
kalkin-_ joined
02:27
pierre_ joined
02:32
pierre_ left
02:33
labster left,
grondilu left
02:37
rpburkholder joined
02:39
setty1_ joined
02:41
setty1 left
02:48
ugjka joined
02:52
eisen74 joined
02:56
eisen74 left
03:01
pierre_ joined
03:02
BenGoldberg joined
03:06
xtreak joined
03:19
AlexDaniel left
|
|||
perlawhirl | anybody awake | 03:21 | |
geekosaur | not very | 03:23 | |
kalkin-_ | half | ||
03:23
kalkin-_ is now known as kalkin-
|
|||
Eddward | turkey coma here | 03:24 | |
MasterDuke | barely | ||
perlawhirl | how does 'perl6 --doc=Markdown' or perl6 --doc=HTML' work? does it just look for any module called 'Pod::To::Foo' | ||
or are HTML and Markdown special cased? | 03:26 | ||
MasterDuke | perlawhirl: github.com/rakudo/rakudo/blob/nom/...s.nqp#L853 | 03:28 | |
perlawhirl | ahh, thanks | ||
03:28
noganex_ joined
|
|||
perlawhirl | MasterDuke++ | 03:28 | |
03:29
canopus left
03:31
noganex left
03:35
canopus joined
03:36
imcsk8_ joined
03:39
imcsk8 left
03:41
labster joined
|
|||
perlawhirl | can I access a modules $=pod from a script? | 03:41 | |
ie, from a separate file | |||
geekosaur | pretty sure you'd have to actually load the module | ||
perlawhirl | so say i have 'Foo.pm'. in another file, say 'foo.p6' I can 'use Foo;' but can I then access Foo.pm's $=pod from foo.p6? | 03:42 | |
PerlJam | perlawhirl: I think you're Foo.pm would need a name to attach it to. (i.e. module Foo or package Foo or class Foo etc.) Then you'd get at it with Foo.WHY | 03:48 | |
s/you're/your/ | 03:49 | ||
ugexe | run('perl6', '--doc', $path-to-code) | 03:50 | |
geekosaur | it also looks like $=pod should have structure including module names, so it should be somewhere inside $=pod? | ||
ugexe | i guess you probably want the structured $=pod | 03:51 | |
geekosaur | but I don't know offhand how that works | ||
perlawhirl | ugexe: yeah. it's just for some minor customer formatting of a module. i could always just add a cmdline option to my modul that spits out $=foo.perl, and eval it into my formatter | 03:52 | |
but i might be overthinking it | |||
PerlJam: yep... my module is a class, so Foo.WHY works for me | 03:53 | ||
thakns | |||
erm thanks | |||
hmm, maybe not. thanks anyways people... I can do what I want by writing a Pod::To::Foo module, but was just trying to be lazy :D | 03:55 | ||
04:00
kyclark_ joined
|
|||
ZzZombo | I don't understand where am I supposed to look for trait docs, the syntax and whatnot? | 04:02 | |
PerlJam | ZzZombo: docs.perl6.org/ search for "trait" perhaps | 04:05 | |
MasterDuke | docs.perl6.org/type/Signature#Para..._Modifiers | ||
PerlJam | MasterDuke++ | 04:06 | |
perlawhirl | Unfortunately, i don't think all the traits are documented, at least not in the one plce | 04:07 | |
some are documented under Routine | |||
docs.perl6.org/type/Routine | |||
PerlJam | There don't seem to be docs on how to make your own traits either | 04:08 | |
perlawhirl | and also some under Variable (because, they are variable traits) | 04:09 | |
docs.perl6.org/type/Variable | |||
PerlJam | Don't forget Attribute too | 04:10 | |
perlawhirl | Perljam: what do you want to do with a custom trait? could a Role serve your purpose? | ||
04:10
pierre_ left
|
|||
perlawhirl | PerlJam: yeah, maybe Language needs a new 'Traits' page | 04:11 | |
PerlJam | I don't want to do anything with them at the moment, but making traits is a reasonable design alternative sometimes. | ||
04:12
kyclark_ left
04:16
khw left
04:20
pierre_ joined
|
|||
PerlJam | Earlier today I translated some Perl 5 code that uses PDL to do some computations into Perl 6. Mostly it looks the same except that I used @foo instead of piddle $foo and there are many operators encased in «». And I got to eliminate a routine because rotor() exists :) | 04:21 | |
If I would have had a routine that could fit a non-linear curve, I could have finished the translation | 04:22 | ||
perlawhirl | rotor is awesome... doing the same thing in languages that do not have a similar routing is typically very ugly | 04:23 | |
04:24
pierre_ left
|
|||
PerlJam | yep. | 04:27 | |
Actual line in the code: my @segs = @p.rotor($n => -($n / 2)); # 50% overlap | 04:28 | ||
:-) | |||
perlawhirl | nice. | 04:29 | |
04:38
pierre_ joined
04:52
kyclark_ joined
04:53
kyclark_ left
04:59
Eddward left
|
|||
gfldex | PerlJam: the ENODOC has been noted | 05:03 | |
05:10
Cabanossi left
|
|||
TEttinger | what does rotor do? I have seen it here a few times as part of code reductions | 05:10 | |
the name isn't at all familiar | |||
05:11
Cabanossi joined
|
|||
PerlJam | TEttinger: it lets you do sliding windows on a list with windows of different sizes (if you want) and different size gaps (if you want) between the windows. | 05:12 | |
so you turn a single list of values into multiple lists of values, each list being your "window" into the original list | |||
TEttinger | oh yeah, that's handy. clojure has it, java oh hell no | 05:13 | |
PerlJam | m: my @a = ^10; dd @a.rotor(3 => 2); | ||
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2), (5, 6, 7)).Seq» | ||
PerlJam | m: my @a = ^10; dd @a.rotor(3 => 2, :partial); | ||
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2), (5, 6, 7)).Seq» | ||
PerlJam | m: my @a = ^10; dd @a.rotor(4 => 2, :partial); | 05:14 | |
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2, 3), (6, 7, 8, 9)).Seq» | ||
TEttinger | so the 2 is the gap? | ||
PerlJam | yep | ||
and a negative gap allows for overlap | |||
m: my @a = ^10; dd @a.rotor(4 => -2); | |||
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2, 3), (2, 3, 4, 5), (4, 5, 6, 7), (6, 7, 8, 9)).Seq» | ||
PerlJam | and I'm clearly tired as I can't think to demo the :partial :) | 05:16 | |
m: my @a = ^10; dd @a.rotor(3 => 1); | |||
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2), (4, 5, 6)).Seq» | ||
PerlJam | m: my @a = ^10; dd @a.rotor(3 => 1, :partial); | ||
camelia | rakudo-moar 64343d: OUTPUT«((0, 1, 2), (4, 5, 6), (8, 9)).Seq» | ||
PerlJam | there | ||
it allows for windows that aren't "full" or a "partial window" | 05:17 | ||
TEttinger | clojure does something similar, it just expresses gap differently. (partition 3 5 (range 10)) ; returns ((0 1 2) (5 6 7)) | 05:18 | |
(partition 4 2 (range 10)) ; returns ((0 1 2 3) (2 3 4 5) (4 5 6 7) (6 7 8 9)) | |||
it is, agreed, really useful | |||
partition-all is the :partial thing | 05:19 | ||
m: my @a = ^10; dd @a.rotor(4 => -4); | 05:20 | ||
PerlJam | can you give multiple different window/gap sizes with partition? | ||
camelia | rakudo-moar 64343d: OUTPUT«(timeout)» | ||
PerlJam | m: my @a = ^10; dd @a.rotor(1 => 2, 3 => 2); | ||
camelia | rakudo-moar 64343d: OUTPUT«((0,), (3, 4, 5), (8,)).Seq» | ||
PerlJam | m: my @a = ^20; dd @a.rotor(1 => 2, 3 => 2); | 05:21 | |
camelia | rakudo-moar 64343d: OUTPUT«((0,), (3, 4, 5), (8,), (11, 12, 13), (16,)).Seq» | ||
TEttinger | in one call? not that I'm aware of. it's possible but would be tricky to implement | ||
perlawhirl | @rotar can also do things like this | ||
TEttinger | why the closing comma after (0,) | ||
perlawhirl | m: say (^12).rotor(3,2,1) | ||
camelia | rakudo-moar 64343d: OUTPUT«((0 1 2) (3 4) (5) (6 7 8) (9 10) (11))» | ||
PerlJam | TEttinger: because it's a one element list. | 05:22 | |
TEttinger | ohhh | ||
that makes sense | |||
I do feel like there's some deeply good ideas in perl 6 that don't really have much chance to get discovered because the language itself is so massive and people may not try to learn the whole (still evolving) thing | 05:24 | ||
it's interesting. as I've learned more programming languages I've really started to return to ones that aren't "maximalist" designs, since I have a chance to actually understand the subtleties of a simpler language where I absolutely would not with Perl6 for years | 05:27 | ||
PerlJam | That's why it's important the people write books and blogs and such. Different people coming from different points of view will highlight different aspects of the language. | ||
Perl 5 has the same problem even if it's on the order of an aleph-0 language and Perl 6 is an aleph-1 :-) | 05:28 | ||
TEttinger | better than a nun-NaN | ||
I don't know what an aleph-n is | 05:29 | ||
is it like a Kardashev civilization type? | 05:30 | ||
(very low numbers currently expected, very high numbers are only found in science fiction) | |||
PerlJam | en.wikipedia.org/wiki/Aleph_number | 05:32 | |
similar I guess | |||
05:34
pierre_ left
05:35
pierre_ joined
|
|||
perlawhirl | I've never fully accepted the argument that a language is too big. I don't know all of perl 5 but I use it to great effect. | 05:36 | |
There's a lot of stuff in your kitched... but you don't need all of it to make an omelette | |||
Perl 6 is big, but most people will use a fraction of, and everyone's fraction, tho it overlaps, is slightly different | 05:37 | ||
PerlJam | perlawhirl: exactly | ||
There are bits of Perl I've *never* used in the 24-ish years I've been programming in it. There are bits I've tried to use, but they turned out to not be really useful (reset is an example of the former and study (when it did something) an example of the latter) | 05:40 | ||
in a sense those things I've never used aren't really part of the language for me, though they may be for someone else | 05:41 | ||
perlawhirl | agreed. the language feature you've never used is integral to someone else | 05:42 | |
well... not integral to _someone_ :D ... i mean... is an integral feature _for_ them. my english isn't working today. | 05:43 | ||
05:45
pierre_ left
05:52
pierre_ joined
05:54
rpburkholder left
05:57
pierre_ left
06:00
rurban joined,
rurban left
06:01
dayangkun joined
06:03
skids left
06:30
zacts left,
xtt joined
06:35
domidumont joined
06:36
rpburkholder joined,
perlawhirl left
06:37
xtt2 joined
06:41
pierre_ joined,
eisen74 joined,
xtt left
|
|||
gfldex | m: &trait_mod:<is>.WHAT.say | 06:42 | |
camelia | rakudo-moar 64343d: OUTPUT«(Sub)» | ||
06:43
BenGoldberg left
06:48
zacts joined
06:53
RabidGravy joined
06:55
domidumont left
07:00
aborazmeh left
07:04
dayangkun left
07:06
rurban joined
|
|||
dalek | c: f06eaad | gfldex++ | doc/Type/Sub.pod6: doc trait_mod (yes, we totally forgot about that) |
07:10 | |
synopsebot6 | Link: doc.perl6.org/type/Sub | ||
gfldex | PerlJam++ # for spotting the ENODOC | 07:11 | |
07:12
seatek joined
07:14
bjz joined
|
|||
gfldex | m: multi sub trait_mod:<is> (Sub $s, :$foo) is foo { say 'is foo called' }; sub bar {}; &trait_mod:<is>(&bar, :foo); | 07:21 | |
camelia | rakudo-moar 64343d: OUTPUT«is foo calledis foo called» | ||
gfldex | Perl 6 is fun :) | ||
07:22
RabidGravy left
|
|||
dalek | c: f383d01 | gfldex++ | doc/Type/Sub.pod6: show how to use traits at runtime |
07:23 | |
synopsebot6 | Link: doc.perl6.org/type/Sub | ||
07:30
pierre_ left
|
|||
dalek | c: f6140d8 | gfldex++ | doc/Language/ (2 files): link to trait_mod |
07:31 | |
07:31
pierre_ joined
07:32
xiaomiao left
|
|||
ZzZombo | gfldex++ | 07:32 | |
thanks for that | 07:33 | ||
gfldex | ZzZombo: it's not complete. Traits are rather involved. | 07:36 | |
ZzZombo | I know. And BTW, how do you pass more arguments? like "sub x is XYZ (param,:param2(val))"? | 07:38 | |
gfldex | i don't think you can without changing the grammar | 07:39 | |
m: class A {}; multi sub trait_mod:<is>(Variable, :$foo){}; my $a is :foo(1, A => 1, 3) = A.new; | |||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Invalid nameat <tmp>:1------> 3it_mod:<is>(Variable, :$foo){}; my $a is7⏏5 :foo(1, A => 1, 3) = A.new;» | ||
ZzZombo | what do you mean then by "A single named argument defines the secondary name and may carry arguments when the trait is called"? | ||
07:39
wamba joined
07:40
xiaomiao joined
|
|||
gfldex | m: class A {}; multi sub trait_mod:<is>(Variable, :$foo){}; my $a is foo(1, A => 1, 3) = A.new; | 07:40 | |
camelia | ( no output ) | ||
gfldex | the single argument can take a list and you can use a subsig to destructure it | ||
(i think) | 07:41 | ||
ZzZombo | I see | ||
07:41
eisen74 left
|
|||
gfldex | m: class A {}; multi sub trait_mod:<is>(Variable, :$foo($first, Pait $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new; | 07:43 | |
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5===Shape declaration with () is reserved; please use whitespace if you meant a subsignature for unpacking, or use the :() form if you meant to add signature info to the function's typeat <tmp>:1------> 3multi sub trait_mod:…» | ||
gfldex | m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pait $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new; | ||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Invalid typename 'Pait' in parameter declaration. Did you mean 'Pair'?at <tmp>:1------> 3t_mod:<is>(Variable, :$foo ($first, Pait7⏏5 $pair, $last) ){}; my $a is foo(1, A =>» | ||
gfldex | m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new; | ||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is foo' in a variable declaration.at <tmp>:1------> 3, $last) ){}; my $a is foo(1, A => 1, 3)7⏏5 = A.new; expecting any of: TypeObject default…» | ||
gfldex | well, you can do the destructureing inside the trait ofc | 07:46 | |
psch | m: multi sub trait_mod:<is>(Variable $, :$foo ($a, *@t)) { }; my $x is foo([1, 2, 3]) = 1 | 07:48 | |
camelia | ( no output ) | ||
psch | m: sub f($a, Pair $p, $b) { }; f 1, a => 1, 2 | 07:49 | |
camelia | rakudo-moar 64343d: OUTPUT«Too few positionals passed; expected 3 arguments but got 2 in sub f at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
psch | gfldex: ^^^ the Pair you pass is a named | ||
m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo(1, 'A' => 1, 3) = A.new; | |||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is foo' in a variable declaration.at <tmp>:1------> 3$last) ){}; my $a is foo(1, 'A' => 1, 3)7⏏5 = A.new; expecting any of: TypeObject default…» | ||
psch | m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo([1, 'A' => 1, 3]) = A.new; | ||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is foo' in a variable declaration.at <tmp>:1------> 3ast) ){}; my $a is foo([1, 'A' => 1, 3])7⏏5 = A.new; expecting any of: TypeObject default…» | ||
psch | ...although that doesn't seem to be the only problem :) | ||
we probably want more detailed error message for "can't apply this trait" i suspect | 07:50 | ||
*messages | |||
m: sub f($a, Pair $p, $b) { }; f 1, 'a' => 1, 2 | |||
camelia | ( no output ) | ||
07:51
xtreak left
07:53
Ven joined
07:54
Ven left
07:55
Ven joined
|
|||
psch | m: multi trait_mod:<is>(Variable $a, :@foo) { }; my $x is foo[1,2,3,:1a] = 1 # vOv | 07:57 | |
camelia | ( no output ) | ||
07:59
xtt joined
|
|||
psch | m: multi trait_mod:<is>(Variable $a, :@foo [$firstpos, *@restpos, :$firstnamed, *%restnameds]) { }; my $x is foo[1,2,3,:1a] = 1 # vOv | 07:59 | |
camelia | ( no output ) | ||
psch | m: multi trait_mod:<is>(Variable $a, :@foo [$firstpos, *@restpos, :$firstnamed, *%restnameds]) { }; my $x is foo[1,2,3] = 1 # vOv | ||
camelia | ( no output ) | ||
07:59
rurban left
|
|||
psch | so, yeah, it can work, but "Can't use unknown trait" is, in some cases, not specific enough. i'm pretty sure we should be able to figure out if we can't apply it because of an argument mismatch | 08:00 | |
08:01
xtt2 left
|
|||
psch | ...maybe just add the invoking argument list to X::Trait::Unknown is enough | 08:05 | |
08:08
geekosaur left
08:09
rurban joined,
rurban left
08:10
geekosaur joined
08:11
dayangkun joined
08:12
pierre_ left
08:15
xtreak joined
08:18
pierre_ joined
08:21
xtt2 joined
08:22
Ven left
08:24
xtt left,
mohae_ joined
08:25
zakharyas joined
08:27
mohae left
|
|||
dalek | c: 7588852 | gfldex++ | doc/Type/Sub.pod6: show how to call traits with multiple arguments |
08:28 | |
synopsebot6 | Link: doc.perl6.org/type/Sub | ||
psch | gfldex++ # docs \o/ | 08:29 | |
08:29
pierre_ left
08:32
Ven joined,
dayangkun left
08:33
domidumont joined
08:34
dayangkun joined
08:36
eisen74 joined,
AlexDaniel joined
08:37
pierre_ joined
08:38
domidumont left
08:39
dayangkun left,
domidumont joined
08:44
g4 joined,
g4 left,
g4 joined
08:45
bjz left
08:52
Ven left
08:57
bjz joined
09:00
labster left
09:01
labster joined
09:08
AlexDaniel left
09:12
pierre_ left
09:14
msdfsd joined,
bjz left
|
|||
msdfsd | Im thinking about joining the perl6 train | 09:14 | |
can I make native executables from perl? | |||
gfldex | no and there is no way to make bundles yet either but that is a planned feature | ||
psch | well, r-j bundles are kinda sorta possible, but experimental at best | 09:15 | |
i'm not sure how well it works with included modules, in any case | |||
msdfsd | well | 09:17 | |
here's to holding for perl7 | |||
09:17
msdfsd left,
xtreak left
|
|||
psch | ...wow | 09:17 | |
09:18
xtreak joined
|
|||
gfldex | Perl | 09:18 | |
Perl 6 is meant to last for 100 years. So that could be a rather long wait for you. | |||
psch | they've already left... vOv | 09:19 | |
DrForr | Another satisfied customer. | ||
psch | and i doubt they're reading the logs -- research doesn't seem to be a thing, considering we have like at least half a dozen tickets concerning that "binary deploy" thing | ||
timotimo | the problem clearly is that now that we've had the stable release of perl6, we can't add anything until perl7 | 09:20 | |
that's how software works, isn't it? | |||
psch | exactly, everything is 1.0 forever | ||
i mean, Perl 5 has been the same for 25 years too vOv | 09:21 | ||
timotimo | famous examples include windows version 2000.0, and google chrome version 54 million 2840.100 | ||
09:21
pierre_ joined
|
|||
DrForr | Why take the time to think when you can just Google an opinion and believe whatever the first link is? | 09:24 | |
psch | honestly, i interpreted "joining the train" as "helping develop" at first anyway | 09:25 | |
09:26
pierre_ left
|
|||
gfldex | i interpret "joining the train" as an empty phrase used by one who has nothing to say | 09:26 | |
psch | right, that's probably more sensible. along the lines of "i want to seem interested but only if you deliver literally everything i demand, and i fully know some demands aren't particularly reasonable" or something..? | 09:28 | |
09:28
andrzejku joined
|
|||
gfldex | my guess would be that the swiftly leaving fellow was send by his boss to check out this new Perl 6-thing he read about in a magazin | 09:30 | |
09:30
pierre_ joined
09:31
rindolf joined
|
|||
DrForr | Can't please 'em all. | 09:33 | |
El_Che | DrForr: if someone could, it would be you :) | 09:39 | |
good day | |||
09:41
labster left
|
|||
DrForr | Wow. Thanks. | 09:41 | |
09:41
BenGoldberg joined
|
|||
DrForr | Incidentally Perl6::Parser now passes 94% of its tests. | 09:42 | |
timotimo | that's good news! | 09:46 | |
09:47
BenGoldberg left
|
|||
seatek | i heard that perl7 will have trains... | 09:48 | |
timotimo | i like trains. | 09:49 | |
DrForr | Take a look at the test suite to see how much it already handles, I think it currently handles files up to 40-50 lines of somewhat dense code. | ||
timotimo | that's ... not very much :( | ||
seatek | that's why we need trains | ||
09:50
chaon joined
|
|||
DrForr | Oh, it's not limited in size in the way you're implying. | 09:50 | |
That's just because RosettaCode samples top out at 50-60 lines, it's perfectly capable of thousands of lines. | 09:51 | ||
timotimo | OK :) | ||
rosettacode.org/wiki/Snake#Perl_6 | 09:52 | ||
^- quite simple code, though. | |||
09:53
zakharyas1 joined
09:56
Ven joined,
bjz joined
09:59
wamba left
10:04
chaon left
|
|||
DrForr | github.com/drforr/perl6-Perl6-Pars...e/master/t | 10:04 | |
Most of the existing issues are (1) comments and (2) contextualizer variables such as $[1]. | 10:05 | ||
timotimo | mhm | 10:06 | |
DrForr | Contextualizer is actually trivial, I was going to take care of it last night but got distracted. | 10:07 | |
10:13
pierre_ left
10:14
andrzejku left,
chee is now known as javascriptisnom
10:17
javascriptisnom is now known as chee
10:20
zakharyas1 left
10:21
pierre_ joined
10:26
perlawhirl joined,
pierre_ left
10:32
xtreak left,
Ven left
10:52
ugjka left
10:57
eisen74 left,
pierre_ joined,
pierre_ left
11:00
AlexDaniel joined
11:10
ugjka joined
11:13
gregf_ joined
|
|||
viki is watching Toronto Perl Mongers slowly imploding :( | 11:13 | ||
One of the emails from organizers gist.github.com/zoffixznet/c2ac5c6...2c00a01060 | 11:14 | ||
11:27
xtt2 left
11:28
rpburkholder left
|
|||
TEttinger | it is toronto and it is probably snowing since it's roughly wintertime. this is a time of year when I'd expect a little less commute tolerance from people not close-by | 11:35 | |
I can't recall the last time I've seen snow | |||
viki | heh | 11:36 | |
Snow wouldn't affect my commute :) And I don't think it's snowing proper yet | |||
TEttinger | is viki zoffix? | ||
viki | Who is Zoffix? | ||
TEttinger | gist is a bit of a giveaway | 11:37 | |
viki | :) | ||
TEttinger | I wonder if there's some emoji IRC and Unicode could work together to support, that is the "Zoffix Synonym Indicator Emoji" | 11:38 | |
DrForr | Who is Zoffix Galt? | 11:39 | |
TEttinger | the lizard wizard vizier | 11:40 | |
11:44
wamba joined
11:46
Ven joined
11:52
bjz_ joined
11:53
bjz left
|
|||
viki | .ask MasterDuke can you look at this ticket? IIRC we decided this was a DITHWIDT and wasn't worth a fix, right? rt.perl.org/Ticket/Display.html?id=128551 | 11:53 | |
yoleaux | viki: I'll pass your message to MasterDuke. | ||
viki | m: say %(:4̈a) | 11:55 | |
camelia | rakudo-moar 64343d: OUTPUT«{a => 0}» | ||
psch | m: say <4̈>.perl | 11:56 | |
camelia | rakudo-moar 64343d: OUTPUT«"4̈"» | ||
psch | m: say val("4̈").perl | ||
camelia | rakudo-moar 64343d: OUTPUT«"4̈"» | ||
viki | Oh, wait, that was for fancy-pants Unicode up in there. | ||
.tell MasterDuke never mind, I now recall what you and TimToady were fixing. This seems to be a different bug that silently fails to do the right thing | 11:57 | ||
yoleaux | viki: I'll pass your message to MasterDuke. | ||
MasterDuke | viki: yeah, similar, but not exactly the same. the other ticket (can't remember the #) was about using 'No ' characters instead of 'Nd'. TimToady ruled against supporting (or specifically checking for) 'No' | 11:59 | |
yoleaux | 11:53Z <viki> MasterDuke: can you look at this ticket? IIRC we decided this was a DITHWIDT and wasn't worth a fix, right? rt.perl.org/Ticket/Display.html?id=128551 | ||
11:57Z <viki> MasterDuke: never mind, I now recall what you and TimToady were fixing. This seems to be a different bug that silently fails to do the right thing | |||
11:59
wamba left
|
|||
psch | m: say :١a # this one i guess? | 12:00 | |
camelia | rakudo-moar 64343d: OUTPUT«Unexpected named argument 'a' passed in block <unit> at <tmp> line 1» | ||
psch | m: say (:١a) # this one i guess? | ||
camelia | rakudo-moar 64343d: OUTPUT«a => 1» | ||
psch | or support for it, probably | ||
viki | That's not a No :) | ||
psch | m: say uniprop("١") | 12:01 | |
camelia | rakudo-moar 64343d: OUTPUT«Nd» | ||
viki | It's the outlier crop of numbers-that-aren't-digits | ||
psch | ahh, 'we decide to allow No instead Nd' is what MasterDuke was saying TimToady was saying..`? | ||
+of | |||
MasterDuke | psch: the opposite | ||
viki | m: :⅒42 | ||
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus statementat <tmp>:1------> 3:7⏏5⅒42 expecting any of: colon pair» | ||
viki | m: :⅒a | 12:02 | |
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus statementat <tmp>:1------> 3:7⏏5⅒a expecting any of: colon pair» | ||
psch | m: say uniprop "⅒" | ||
camelia | rakudo-moar 64343d: OUTPUT«No» | ||
psch | okay i'm bad at reading right now apparently vOv | ||
MasterDuke | 'Nd' is allowed. 'No' is not allowed, and TimToady also thought we shouldn't specifically check for them and give them their own error message | 12:03 | |
heh, 'No' makes things hard to parse. "No No is not allowed" | |||
12:03
AlexDaniel left
|
|||
MasterDuke | s/things/sentences | 12:04 | |
psch | always these persky words with their meanings *shakes fist* | ||
DrForr | inb4 Buffalo buffalo buffalo ... :) | 12:06 | |
12:07
Ven left,
TEttinger left
12:08
rindolf left,
Ven joined
12:09
Ven left,
rindolf joined
12:12
Ven joined
12:15
Ven left
12:19
user9 left
12:20
kd_christoph joined,
kd_christoph left
12:21
user9 joined,
Ven joined
|
|||
timotimo | how do i figure out where in memory my executable is mapped? and especially how big the mapping is and where exactly it starts (and ends) | 12:24 | |
arnsholt | Isn't that one of those things that modern OSes go out of theur way to make hard to figure out? | 12:28 | |
DrForr mutters something about Rowhammer. | 12:29 | ||
timotimo | well, address layout randomization, sure | ||
but i'd like to just concatenate some data to my binary and get at that data later on | |||
or some other simple way to put data into an executable that hopefully doesn't involve running a full compiler | |||
arnsholt | I think there's a separate section in the executable format for that | 12:31 | |
Googling seems to indicate that in ELF at least it's the rodata section | |||
I'm curious what you need this for though | |||
timotimo | *cough cough* | 12:32 | |
arnsholt | Sekkrit projects? =) | ||
timotimo | i don't want to get people's hopes up | ||
anyway, there's lots and lots of stuff that comes after .rodata in the binary i'm looking at right now | 12:33 | ||
the last thing i can see is .symtab and .strtab (which seem to sit at the same offset) | |||
12:34
rpburkholder joined
|
|||
arnsholt | At any rate, ELF stuff is where you're gonna be wanting to look | 12:34 | |
timotimo | on linux at least | ||
arnsholt | Yeah | 12:35 | |
OS X and Windows have different executable formats | |||
perlawhirl | hmm... who feels like helping me bikeshed a module name | ||
I extended Pod::To::Markdown and used a little creative pod to create fenced code blocks | 12:36 | ||
gist.github.com/0racle/e092c62fadd...579118c8b8 | |||
I have a module, but just questioning what a good name for it is... Pod::To::Markdown::SOMETHING | |||
I'm already using this module to render the README.md for my Net::Netmask module... it's really nice to be able to have it automatically generated with code blocks | 12:37 | ||
timotimo | i don't want to have to write a custom ld script :\ | 12:39 | |
12:42
rpburkholder left
|
|||
arnsholt | timotimo: For this kind of stuff, I'm afraid it's hard to get out of that | 12:48 | |
And then you get to implement bindings to the right C functions/libraries to read the data back in =) | 12:49 | ||
timotimo | get what out of what? | ||
arnsholt | "Get out of" intended to mean "escape" in that case | ||
Or was it the second line you were wondering about? | 12:53 | ||
timotimo | i didn't understand the second line, either ;) | ||
i might end up with just fopen on /proc/self/exe :\ | 12:54 | ||
also, we could totally have ABSOL P6 based on bulbapedia.bulbagarden.net/wiki/Abs...%C3%A9mon) | |||
(Almost But Still Only Like Perl6) | |||
arnsholt | Well, once you've stashed data somewhere in the executable, you presumably want to get it back out. There's probably a C library for that | ||
timotimo | if i had a section that goes at the exact end of my binary, i could just grab the address of that section and go nuts | 12:55 | |
13:14
cygx joined
|
|||
cygx | timotimo: there are sevral ways to embed binary data into executables, some more hacky than others | 13:15 | |
but what do you mean by 'doesn't involve running a full compiler' | |||
timotimo | cygx: ideally, i'd have the program prepared to Deal With It, and then just use cat myprogram extradata > enhancedprogram | 13:17 | |
if you want to help me even more, how do i tell ld that i want it to make a .so file usable that i manually mmapped (or rather: that's Just Already There) | |||
cygx | well, with gcc, there's stuff like balau82.wordpress.com/2012/02/19/l...-with-gcc/ | 13:18 | |
personally, I've also just hot-patched a char[] of sufficient size that held a marker string | 13:19 | ||
timotimo | okay, but that's hardly a step up from turning my binary blob into a const char * ... | ||
cygx | then, you can append data to the executable and open the file from disk | ||
timotimo | i feared as much. | ||
cygx | on windows, the proper way to do it would involve resources | 13:20 | |
timotimo | i don't know anything about that | 13:21 | |
but that also involves a compiler? | |||
well ... linker | |||
cygx | yes | ||
timotimo | then i'll go with fopen on /proc/self/exe | ||
13:22
araujo left
|
|||
timotimo | do you have a tip for the .so thing? | 13:22 | |
i mean i could mmap it to a file descriptor, and tell dlopen to open /proc/self/fd/myfiledescriptor | |||
13:22
araujo joined
|
|||
viki | m: gist.github.com/zoffixznet/c90ebeb...b4ceffce3f | 13:23 | |
camelia | rakudo-moar 64343d: OUTPUT«True<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.new<anon|176537216>.ne…» | ||
dalek | c: 86e56be | ZzZombo++ | doc/Type/Sub.pod6: Update Sub.pod6 |
13:24 | |
synopsebot6 | Link: doc.perl6.org/type/Sub | ||
viki | Any idea why my push-all impl is broken? Line 50 is called like 200 times, when it should be just 4 times and the .elems gives 0, when it should give 5 | ||
moritz | ZzZombo: could you please write a bit better commit messages? "Update Sub.pod6" doesn't tell me what you changed, or why | 13:25 | |
ZzZombo | for such small changes? | ||
psch | "Fix typo" is still more meaningful than "Update $file" | 13:26 | |
moritz | ZzZombo: sure. "Fix typo" isn't more to write either | ||
ZzZombo | I didn't write it | ||
moritz | then please do in future :-) | ||
timotimo | that's what github suggests | ||
psch | ah, web commit? | ||
cygx | timotimo: I don't think here's an official way to do such a thing | ||
timotimo | i think you're right | ||
13:27
Ven left
|
|||
cygx | it's possible, but you'll likely have to get your hands rather sirty, so to speak | 13:27 | |
*dirty | |||
first google result: github.com/m1m1x/memdlopen | |||
timotimo | fantastic! only 500 lines of code! | 13:30 | |
that opens /proc/self/maps %) | 13:31 | ||
i'll go with mmap + /proc/self/fd/*, then :) | 13:32 | ||
this will be the worst proof of concept ever conceived, i'm sure | |||
13:34
pierre_ joined
|
|||
viki | Any ideas? | 13:37 | |
Man, this 5-minute chunk of code is now taking 40minutes :( | |||
What I don't get even more is if there's a bug that makes it go 200 iterations, but does it stop there and not go forever? :/ | 13:38 | ||
dudz | evening | ||
dudz tips non existing hat | |||
DrForr | Afternoon. How go things? | ||
dudz | good thank you very much. | 13:39 | |
waiting for my hair to dry and for my body to commence shutdown procedure then i can get some zed's | 13:40 | ||
DrForr | Good luck with that. | ||
13:40
khw joined
|
|||
dudz | what's all the entire gang upto this fine <timezone> ? | 13:40 | |
viki | Trying to make a fast flat.iterator.push-all | 13:41 | |
And failing miserably | |||
13:41
chacalmaneiro joined
|
|||
DrForr | At work, finished with some blogs.perl.org stuff and moving on to other work. | 13:41 | |
chacalmaneiro | test | ||
viki | chacalmaneiro: test successful | ||
psch | m: use Test; ok 1 | ||
camelia | rakudo-moar 64343d: OUTPUT«ok 1 - » | ||
dudz | push is not array related right? | 13:43 | |
psch | m: say Array.^can('push') | ||
camelia | rakudo-moar 64343d: OUTPUT«(Method+{<anon|54735920>}.new push Method+{<anon|54735920>}.new)» | ||
DrForr | The first rule of Tautology club shall be "The initial rule of Tautology club shall be the rule that is observed when joining the club." | ||
psch | dudz: it is, but push-all isn't push, it's part of the Iterator/Iterable interface | ||
13:44
wamba joined,
Ven joined
|
|||
dudz | an iterator doesn't have to be a number does it? | 13:44 | |
viki | dudz: an iterator knows how to produce a sequence of numbers. | 13:45 | |
13:45
chacalmaneiro left
|
|||
viki | dudz: and you can ask it for, say, one value and it'll produce it. The .push-all asks for all values and asks for them to be pushed into a target. | 13:45 | |
ZzZombo | m: say Str.^lookup('Int') | ||
camelia | rakudo-moar 64343d: OUTPUT«Int» | ||
ZzZombo | m: say Str.^lookup('Int').perl | ||
viki | docs.perl6.org/type/Iterator | ||
camelia | rakudo-moar 64343d: OUTPUT«method Int (Str:D $: *%_) { #`(Method|50741328) ... }» | ||
dudz | checking | 13:46 | |
timotimo | wow | 13:47 | |
src/core/bytecodedump.c:425:1: internal compiler error: in get_dynamic_type, at ipa-polymorphic-call.c:1665 | |||
dudz | arh, iterate as in, to proceed through right, not just counting | ||
*question mark placed in the right place ^ | 13:48 | ||
jnthn | timotimo: Uh, wow... | ||
ZzZombo | docs.perl6.org/routine/Int doesn't list Str as having Int(). | ||
Why? | |||
viki | ZzZombo: would it be listed under Str? | 13:49 | |
*wouldn't | |||
dudz | i'm due for a perl6 t-shirt once that project begins *optomistic | ||
*oreilly perl6 book | |||
ZzZombo | Str isn't here at all. | ||
DrForr | dudz: Party on! (I'm working with him on writing it.) | 13:50 | |
viki | ZzZombo: then the asnswer is: no one added it | 13:51 | |
ZzZombo | Uh, I thought it was autogenerated in some way, that assembled individual pieces together? | ||
viki | ZzZombo: well, yeah, but it's taken from documents written by humans. I think in this case the method is provided by Cool | 13:52 | |
dudz | yeah i thought your nickname had some marketing to it DrForr :) | ||
viki | ZzZombo: so it'd be from Language/Type/Cool.pod6 | ||
DrForr | Egads, I'm a brand? | ||
dalek | c: e71be07 | ZzZombo++ | doc/Type/Metamodel/ClassHOW.pod6: Typo |
13:53 | |
synopsebot6 | Link: doc.perl6.org/type/Metamodel/ClassHOW | ||
dudz | kinda, a well respected type, i wonder though, do you own suit's> | ||
*? | |||
viki | blurb on doc github.com/zoffixznet/perl6.party/...oc-content | ||
timotimo | src/core/bytecodedumpsterfire.c:666 | 13:54 | |
dudz | i'm on my way upto lader towards a suit | ||
DrForr | Yes. I use it at OSCON, but that's about it. | ||
dudz | for now i'm a polo shirt/nice trousers that could be ironed | ||
plus i'm a hair brusher and clean face shaver | 13:55 | ||
viki | m: dd IterationEnd | 13:56 | |
camelia | rakudo-moar 64343d: OUTPUT«IterationEnd» | ||
13:56
wamba left
|
|||
timotimo | why exactly does the dependencies+deserialize frame of perl6.moar "loadbytecode" ModuleLoader.moarvm 5 times in a row? :) | 13:56 | |
viki | m: gist.github.com/zoffixznet/eee66dd...80ec77f56c | ||
camelia | rakudo-moar 64343d: OUTPUT«True[["b"], ["c"], [IterationEnd], IterationEnd]» | ||
dudz | when i was growing up we would call it IT, but now they added an extra C, to make it ICT, the C i am still learning that i guess. | ||
viki | :o | ||
DrForr | I'm usually pretty casual; OSCON is an exception simply because others don't really focus on it. | 13:57 | |
viki | Oh, my perl6 is too old to show InterationEnd | ||
dudz | figured it out viki ? | ||
viki | dudz: I think so, I was testing for Iteration end with nqp::istype() rather than nqp::eqaddr | ||
dudz | because the latter is used in your version? | 13:58 | |
viki | I was using the wrong op. | 13:59 | |
13:59
domidumont left
|
|||
viki | 49 minutes wasted on a dumb typo :) | 13:59 | |
dudz | :D | ||
viki | Yey Programming! | ||
dudz | it's good that you found it out though | 14:00 | |
did yourself some troubleshooting and practiced some paitence, and done :) | |||
viki | I also cried a little. | ||
dudz | nice :) | ||
14:01
Ven left
14:02
Ven joined,
domidumont joined
|
|||
dudz | i'm gonna go hangout in a horizontal position with my eye's closed for a bit, i'll be back after :) | 14:06 | |
viki | \o | ||
dudz | *night perl6 community | ||
o/ | |||
timotimo | gnite dudz | 14:08 | |
tbrowder | ref: | 14:10 | |
ZzZombo | what are the possible values for trait declarations? Beside 'is' and 'will'? | 14:12 | |
timotimo | "will" isn't really a trait declaration. it has more to do with phasers | ||
MasterDuke | hides, does, will, of, returns, handles | ||
14:12
zakharyas left
|
|||
tbrowder | ref rakudo downloadable archives: is it worth my time to try to make it able to download and install zef as part of the package, i.e., will a PR be considered that enables that? | 14:13 | |
viki | tbrowder: PR to which repo? | ||
timotimo | probably rakudo/star | 14:14 | |
ZzZombo | and of course you can't make your own "keywords" (what is the name for those, again?) for declaration? | ||
viki | ZzZombo: I'm sure you can with slangs | ||
ZzZombo | I fear that would be a bit far-stretched for the task at han. | 14:15 | |
Unfortunate :( | |||
hand* | |||
psch | the keyword for declarations is declarators, no? | 14:16 | |
viki | Cool, there's pi users in here. | ||
14:17
ChoHag left
|
|||
DrForr | I have a Pi v3, haven't used it yet... | 14:17 | |
14:17
ChoHag joined
|
|||
tbrowder | viki: rakudo | 14:18 | |
i tried rakudo star but gave up... | |||
viki | tbrowder: no, that PR won't be accepted. The repo already has a means to install any module you wish | 14:19 | |
tbrowder | and how is that done? | ||
MasterDuke | tbrowder: someone is working on racoon (making tools/install-dist.pl a little more robust/feature filled i think) | ||
jnthn | timotimo: Pretty sure that you can write any trait_mod:<will> that you want; doesn't have to be about phasers | 14:20 | |
tbrowder | can you name the branch? | ||
timotimo | fair enough | 14:21 | |
MasterDuke | tbrowder: don't know, i think nine is the one working on it | 14:22 | |
timotimo | it's called raccoon | ||
so, how would a respectable person currently write out an unsigned 64bit integer to stdout or to a file? | |||
MasterDuke | anyway, off to go hit a little ball with metal sticks | 14:23 | |
timotimo | good luck! | ||
DrForr | Don't lose it! | ||
timotimo | m: say 0xff_00_11_22_33_44_55_66_77.polymod(255) | ||
camelia | rakudo-moar 64343d: OUTPUT«(221 18446762986173038694)» | ||
timotimo | m: say 0xff_00_11_22_33_44_55_66_77.polymod(255 xx *) | 14:24 | |
camelia | rakudo-moar 64343d: OUTPUT«(221 189 181 219 25 208 73 28 8 1)» | ||
timotimo | m: say 0xff_00_11_22_33_44_55_66_77.polymod(255 xx *).fmt("%x") | ||
camelia | rakudo-moar 64343d: OUTPUT«dd bd b5 db 19 d0 49 1c 8 1» | ||
timotimo | that's certainly not it | ||
m: say 0xff_00_11_22_33_44_55_66_77.polymod(256 xx *).fmt("%x") | |||
camelia | rakudo-moar 64343d: OUTPUT«77 66 55 44 33 22 11 0 ff» | ||
timotimo | now ... do i actually write LE or BE :\ | ||
i'd rather use nativecast :| | 14:25 | ||
14:25
seatek left
|
|||
viki | tbrowder: git clone github.com/zoffixznet/perl6-CoreHa...s-Sourcery CHS; ./perl6 tools/install-dist.pl CHS | 14:26 | |
tbrowder: and yeah, as was mentioned, that way is being improved. | |||
timotimo | oh, i can just print a Buf[uint64] %) | 14:27 | |
oh, i can't | |||
tbrowder | thanks | ||
viki | tbrowder: basically, you say you tried R* and gave up and now you wish to add an installer of 3rd-party software to Rakudo, when R* is meant to be that. The proper approach would be to fix whatever issues you had with R* and improve that distro rather than have some 3rd-party stuff in Rakudo and some 3rd-party stuff in R* | 14:29 | |
timotimo | slurp doesn't have :bin, but .slurp-rest does? | 14:30 | |
viki | s: '.'.IO, 'slurp' | 14:31 | |
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/6434...th.pm#L460 | ||
viki | s: '.'.IO, 'slurp-rest' | ||
SourceBaby | viki, Something's wrong: ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil) in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42 in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33 in block <unit> at -e line 6 | ||
viki | timotimo: they both do, from what I see | 14:32 | |
timotimo | m: say slurp(:bin).perl | ||
camelia | rakudo-moar 64343d: OUTPUT«"Céad slán ag sléibhte maorga Chontae Dhún na nGall\nAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;\nNuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí\nI mo dhiaidh bhí gleanntáin ghlas’ Gha…» | ||
timotimo | that's a string | ||
viki | s: &slurp | 14:33 | |
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/6434...rs.pm#L140 | ||
psch | m: say &slurp.candidates>>.signature | ||
camelia | rakudo-moar 64343d: OUTPUT«((IO::ArgFiles:D $io = { ... }, :$bin, :$enc = "utf8", |c is raw) (Cool:D $path, :$bin = Bool::False, :$enc = "utf8", |c is raw))» | ||
psch | m: say slurp(:bin).WHAT | ||
camelia | rakudo-moar 64343d: OUTPUT«(Str)» | ||
viki | m: $*ARGFILES.slurp(:bin).^name.say | ||
camelia | rakudo-moar 64343d: OUTPUT«Str» | ||
viki | s: $*ARGFILES, 'slurp' | 14:34 | |
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/6434...es.pm#L124 | ||
viki | well, there's ya problem | ||
m: say dir | 14:35 | ||
camelia | rakudo-moar 64343d: OUTPUT«(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".bash_history".IO ".bashrc".IO "mbox".IO ".lesshst".IO "evalbot.log".IO ".cpan".IO "dalek-…» | ||
psch | ah, not passing it on? | ||
viki | It's passing, but it's not excepting it | ||
psch | well, yes | ||
viki | m: "evalbot.log".IO.slurp(:bin).^name.say | ||
camelia | rakudo-moar 64343d: OUTPUT«Buf[uint8]» | ||
viki | *expecting | 14:36 | |
14:37
cibs left
14:38
bjz_ left,
bstamour joined
14:39
cibs joined
|
|||
viki | So, is anyone fixing that already or am I clear to do it? | 14:41 | |
tbrowder | viki: there are already issues on star addressing the problem--basically the problem of not being able to easily modify some of the variables such as DESTDIR-- looks like too much coupling with moarvm and nqp | 14:43 | |
viki | Ah that, yeah | ||
But those are present in Rakudo too :) | |||
tbrowder | gotta go--will look at racoon later | 14:44 | |
14:44
kyclark_ joined
14:46
ugjka is now known as blitter_monist
|
|||
ZzZombo | m: class A { has $!stuff } say A.^attributes(:local).^name | 14:46 | |
camelia | rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Strange text after block (missing semicolon or comma?)at <tmp>:1------> 3class A { has $!stuff }7⏏5 say A.^attributes(:local).^name expecting any of: infix infix stopper…» | ||
ZzZombo | m: class A { has $!stuff }; say A.^attributes(:local).^name | ||
camelia | rakudo-moar 64343d: OUTPUT«List» | ||
viki spectests the fix | 14:47 | ||
ZzZombo | m: say (1, 22/7, 42, 300).first: * > 5, :kv, :end; | 14:49 | |
camelia | rakudo-moar 64343d: OUTPUT«(3 300)» | ||
ZzZombo | m: say (1, 22/7, 42, 300).first: * > 5, :p, :end; | 14:50 | |
camelia | rakudo-moar 64343d: OUTPUT«3 => 300» | ||
ZzZombo | I'm not sure, but isn't 42 happens before 300 but > 5 as well? | 14:51 | |
doesn't* and is* | |||
psch | m: say (1, 2, 3, 4).first(:end) | ||
camelia | rakudo-moar fce1a2: OUTPUT«4» | ||
psch | m: say (1, 2, 3, 4).first() | ||
camelia | rakudo-moar fce1a2: OUTPUT«1» | ||
ZzZombo | fuck | ||
I didn't mean to copy :end | |||
dammit | |||
viki | m: my Blob[uint8] $x .= new: 1, 2, 3; my Blob[uint8] $y .= new: 4, 5, 6; my @blobs = $x, $y; dd [~] @blobs | 14:59 | |
camelia | rakudo-moar fce1a2: OUTPUT«Blob[uint8].new(1,2,3,4,5,6)» | ||
viki | m: my Blob[uint8] $x .= new: 1, 2, 3; my Blob[uint8] $y .= new: 4, 5, 6; my @blobs = $x; dd [~] @blobs | ||
camelia | rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it in block <unit> at <tmp> line 1» | ||
viki | :( | ||
This is mildly annoying | 15:00 | ||
15:01
domidumont left
|
|||
psch | m: say ~(my Blob[uint8] $ .= new: 1,2,3) | 15:01 | |
camelia | rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it in block <unit> at <tmp> line 1» | ||
psch | that's reduce being smart again apparently | 15:02 | |
viki | Wouldn't it be calling infix ~ and not prefix? | 15:03 | |
s: &infix:<~>, \(my Blob[uint8] $x .= new: 1, 2, 3) | |||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/6434...ngy.pm#L20 | ||
viki | s: &infix:<~>, \((my Blob[uint8] $x .= new: 1, 2, 3), (my Blob[uint8] $x .= new: 1, 2, 3)) | ||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/6434...uf.pm#L669 | ||
psch | well, there's no 1-ary infix:<~> that takes Blob | ||
viki | Right, seems there should be | ||
psch | is my actual guess | ||
viki | Just be unity | ||
psch | m: say (my Blob[uint8] $ .= new: 1,2,3).infix:<~> | 15:04 | |
camelia | rakudo-moar fce1a2: OUTPUT«No such method 'infix:<~>' for invocant of type 'Blob[uint8]' in block <unit> at <tmp> line 1» | ||
ZzZombo | m: class A { has $!stuff }; say A.perl | ||
camelia | rakudo-moar fce1a2: OUTPUT«A» | ||
psch | m: say (my Blob[uint8] $ .= new: 1,2,3).&infix:<~> | ||
camelia | rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it in block <unit> at <tmp> line 1» | ||
ZzZombo | m: class A { has $!stuff }; say (A,1).perl | ||
camelia | rakudo-moar fce1a2: OUTPUT«(A, 1)» | ||
15:05
domidumont joined
15:08
Ven left
|
|||
ZzZombo | m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name ) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob') | 15:13 | |
camelia | rakudo-moar fce1a2: OUTPUT«Type check failed for return value; expected A but got Str ("asd") in method set_name at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
viki | ZzZombo: FWIW, camelia can take /msg and there's also #zofbot where you can use her | 15:15 | |
ZzZombo | nice | ||
15:15
Ven joined
15:17
Ven_ joined,
Ven left
|
|||
ZzZombo | can I turn say $package.^attributes(:local) into names of attributes inline in ($m.name,$m,$package,$package.^attributes(:local),$attr).perl? | 15:18 | |
-say | |||
psch | m: class A { has $.a }; say A.^attributes>>.^name | 15:19 | |
camelia | rakudo-moar fce1a2: OUTPUT«List» | ||
psch | m: class A { has $.a }; say A.^attributes>>.name | ||
camelia | rakudo-moar fce1a2: OUTPUT«($!a)» | ||
psch | m: class A { has $.a, $!b, @.c }; say A.^attributes>>.name | ||
camelia | rakudo-moar fce1a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable $!b used where no 'self' is availableat <tmp>:1------> 3class A { has $.a, $!b7⏏5, @.c }; say A.^attributes>>.name» | ||
psch | m: class A { has ($.a, $!b, @.c) }; say A.^attributes>>.name | ||
camelia | rakudo-moar fce1a2: OUTPUT«($!a $!b @!c)» | ||
15:21
kyclark_ left
|
|||
ZzZombo | hey, the trim.chars constraint somebody here suggested earlier doesn't work. | 15:27 | |
method set_name(Str:D $name where .trim.chars) | |||
m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name .trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob') | |||
camelia | rakudo-moar fce1a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed parameterat <tmp>:1------> 3e='unnamed'; method set_name(Str:D $name7⏏5 .trim.chars) returns ::?CLASS:D { $!nam expecting any of: constraint» | ||
ZzZombo | m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where .trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob') | 15:28 | |
camelia | rakudo-moar fce1a2: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Bob' (indicated by ⏏) in method set_name at <tmp> line 1 in block <unit> at <tmp> line 1Actually thrown at: in method set_name at <tmp> line…» | ||
ZzZombo | ^ | ||
viki | ZzZombo: .trim.chars.so or *.trim.chars | ||
ZzZombo | m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where *.trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob') | ||
camelia | rakudo-moar fce1a2: OUTPUT«Type check failed for return value; expected A but got Str ("asd") in method set_name at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
15:28
canopus left
|
|||
ZzZombo | m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where *.trim.chars) returns ::?CLASS:D { $!name=$name;return self } }; say A.new.set_name('Bob') | 15:29 | |
camelia | rakudo-moar fce1a2: OUTPUT«A.new» | ||
ZzZombo | that * stuff is weird for sure | ||
viki | hm .so prolly won't work | ||
ZzZombo: feel free to write it as { .trim.chars } | |||
arnsholt | ZzZombo: Less weird than you might think | ||
It's basically convenience notation for a closure | |||
ZzZombo | that does it even stand for? | ||
psch | "*.chars" is similar to "{ $_.chars }" | 15:30 | |
viki | ZzZombo: `where` smartmatches. plain .trim.chars calls .trim.chars on $_ and returns a number, such a smartmatch will expect the argument be a number. *.trim.chars / { .trim.chars } makes it a smartmatch against a block instead | ||
arnsholt | So *.foo.bar is basically "-> $x { $x.foo.bar }" or alternatively "{ $^x.foo.bar }" (equivalent, using the ^ twigil) | ||
ZzZombo | so does just placing it somewhere implicitly creates one? | ||
15:31
cygx left
|
|||
viki | ZzZombo: not in all places, but basically yeah | 15:31 | |
m: say (* * *)(2, 5) | |||
camelia | rakudo-moar 77e9d4: OUTPUT«10» | ||
viki | m: say {$^a * $^b)(2, 5) | ||
camelia | rakudo-moar 77e9d4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing blockat <tmp>:1------> 3say {$^a * $^b7⏏5)(2, 5) expecting any of: statement end statement modifier statement modifier loop» | ||
viki | m: say {$^a * $^b}(2, 5) | ||
camelia | rakudo-moar 77e9d4: OUTPUT«10» | ||
ZzZombo | how does it determine the borders for the closure? | 15:32 | |
arnsholt | Basically, a each * will become a closure argument, whenever it is used where a term is expected; unless the * term is the entirety of the expression | ||
In the latter case, it becomes the special value Whatever | |||
viki | psch: you say similar.... what are the differences? | ||
psch | m: <abc def ghi>.map({ $_ ~~ /. ** 3/}).say | 15:33 | |
camelia | rakudo-moar 77e9d4: OUTPUT«(「abc」 「def」 「ghi」)» | ||
psch | m: <abc def ghi>.map(* ~~ /. ** 3/).say | ||
camelia | rakudo-moar 77e9d4: OUTPUT«(「abc」 「def」 「ghi」)» | ||
psch | eh, something like that somewhere i think :/ | ||
viki: the difference, in the end, is that * builds a WhateverCode, while { } builds a Block | |||
viki | Ah | 15:34 | |
arnsholt | Given that an expression involving * becomes a WhateverCode, not just a plain block, there's likely something different | ||
psch | viki: and well, if there's different types behind it it's probably because we want to distinquish them | ||
arnsholt | Not sure what though | ||
psch | m: <abc def ghi>.map(*.comb[*]).say # and, well, this kinda silly example | 15:35 | |
camelia | rakudo-moar 77e9d4: OUTPUT«((a b c) (d e f) (g h i))» | ||
psch | m: <abc def ghi>.map({$_.comb[$_]}).say | ||
camelia | rakudo-moar 77e9d4: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5abc' (indicated by ⏏) in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
15:35
pierre_ left
|
|||
psch | mind, i'm aware that even if postcircumfix:<[ ]> wasn't Whatever-special it'd still be two arguments, while the topic usage is the same... | 15:35 | |
15:36
canopus joined
15:37
kyclark_ joined
|
|||
ZzZombo | that's enough Perl 6 for me today. CYA all. | 15:37 | |
viki | \o | 15:38 | |
15:39
brrt left
|
|||
viki | How can I test :enc<Latin-1> works on slurp? | 15:42 | |
15:42
Ven_ left
|
|||
viki | or... well, any :enc | 15:42 | |
moritz | you first write a temp file with a defined Blob | 15:44 | |
and then slurp, and test that the result is as expected | |||
viki | hmm | ||
m: Blob[uint8].new(<10 20 30>).decode.perl.say | 15:45 | ||
camelia | rakudo-moar 77e9d4: OUTPUT«"\n\x[14]\x[1e]"» | ||
viki | m: Blob[uint8].new(<10 20 30>).decode('Latin-1').perl.say | ||
camelia | rakudo-moar 77e9d4: OUTPUT«"\n\x[14]\x[1e]"» | ||
viki | What sort of a blob? | ||
15:46
kyclark_ left
|
|||
viki | m: Blob[uint8].new(174).decode.perl.say | 15:47 | |
camelia | rakudo-moar 77e9d4: OUTPUT«Malformed UTF-8 at line 1 col 1 in block <unit> at <tmp> line 1» | ||
15:48
Ven joined
|
|||
viki | m: Blob[uint8].new(174).decode('Latin-1').perl.say | 15:48 | |
camelia | rakudo-moar 77e9d4: OUTPUT«"®"» | ||
viki | Got it. Thanks | ||
15:53
kurahaupo__ joined
15:55
kurahaupo__ is now known as kurahaupo
16:05
Ven left
16:15
blitter_monist is now known as UgJkA
16:17
domidumont left
16:19
sufrostico joined
16:24
bstamour left
16:25
g4 left
16:26
kyclark_ joined
16:27
kyclark_ left
|
|||
viki kicks dalek | 16:31 | ||
oh, I just had both IRC screens in #perl6 and not one in #perl6-dev | 16:32 | ||
viki unkicks dalek | |||
16:39
kyclark_ joined
|
|||
nine | Very much worth reading: blog.aurynn.com/contempt-culture | 16:41 | |
psch | the font for the italic bits looks really off here oO | 16:43 | |
...in either browser too | |||
not to mention that it's really exhausting to read with all of those there, hooray for devtools that let me easy adjust css \o/ | 16:44 | ||
ilmari | it's using Qucikcsand Italic | ||
16:45
kyclark_ left
|
|||
ilmari | which is the italic version of the one used for the headlines | 16:45 | |
psch | i find the topic a really difficult though | 16:48 | |
because, honestly? i actually do think there's a lot of things about php that are objectively bad | 16:49 | ||
granted, they cleaned up with php7, and i'm at least partly resting on an opinion if formed during working with it about two years ago | |||
s/ if f/ i f/ | 16:50 | ||
viki | psch: isn't that how many folks that say Perl 6 sucks operate? They judge it based on some mailsender script they say in the '90s | 16:51 | |
huggable: php sucks :is: blog.aurynn.com/contempt-culture | 16:52 | ||
huggable | viki, Added php sucks as blog.aurynn.com/contempt-culture | ||
viki | s/say/saw/; | ||
nine | psch: the point is that telling people that the language they use and that makes them feel powerful is objectively bad has probably never attracted anyone to the alternatives you propose. Advertising cool things demonstrating features of your faviourite language however makes people curious. | ||
psch | viki: is it? i worked with php 5.1x (iirc) for about 8 months, building a CRUD application for my then-employer | ||
viki: i'm not going into #php (or wherever) and telling people they should do something else | 16:53 | ||
nine: if that's the point, then i obviously missed it | 16:54 | ||
nine | psch: to be convinced by it, people have to draw a conclusion by themselves. I.e. show them how simple and powerful something in your language is and they will wish they had that when they have to excert much greater effort doing the same in their language. | 16:55 | |
psch: telling them their language is bad because X is so much more tedious than in another language just makes you a hater and one of "them" vs. "us". | |||
psch | nine: but that's absolutely not what i'm reading in that post. the post, to me, is about "please everyone grow out of the inherit tribalism thing that humans have been doing for thousands of years" | 16:56 | |
which is a nice sentiment, but doesn't really help achieve that | |||
huf | so what is that blogpost saying? that there are no objectively bad langauges? or that pointing them out is useless? | ||
viki | wow, nine++ very nice article | ||
huf | or perhaps that objectively bad langauges got that way because their communities lacked people who knew how to make it better? | 16:57 | |
nine | This part sums it up quite nicely: "It’s 2015, and I saw a presenter at a Python conference make fun of Java. How would that feel to people trying to move from Java into something else? I wouldn’t feel welcome, and I’d have learned that the idea that the Python community is welcoming wasn’t true." | ||
Talking down on other languages doesn't help my cause (promoting Perl). It just makes me feel cool and elitist. Trouble is that an elite is by definition a rather small group. | 16:59 | ||
16:59
skids joined
|
|||
psch | oh, i get that, there's lots of practical conclusions to be drawn from "humans like small groups but that alienates other humans and alienating others is bad" | 17:00 | |
huf | and also that people dont actually use their brains much when picking technologies | ||
psch | i just don't find lots of inherit value in blog posts that state that | ||
huf | it's nearly pure feeling | ||
psch | anyway, this is getting to me a bit too much apparently, sorry :) | ||
huf | ... i suppose that happens in the brain too | ||
psch & | |||
17:00
Khisanth left
|
|||
viki hopes there aren't any logs of #css from a decade ago :) | 17:02 | ||
viki was elitist of the elite >:) | |||
viki is looking for a really fast way to determine if stuff matched by d contains any combiners :/ | 17:03 | ||
huf | i moved from the usual teenage elitism straight to complete nihilist despair i think :) | 17:04 | |
viki needs it in straight nqp too | 17:05 | ||
17:13
Khisanth joined
|
|||
viki | No takers? :) | 17:15 | |
I wonder how insane it is to hardcode all Nd chars as a character class. | |||
m: say "7\x[308]" ~~ /^ \d+ $/; | 17:19 | ||
camelia | rakudo-moar 15f51a: OUTPUT«「7̈」» | ||
viki | Maybe not very insane, because it's much faster than \d+ too | 17:20 | |
m: say "{.5811738 / .2907747}x faster" | 17:21 | ||
camelia | rakudo-moar 15f51a: OUTPUT«1.9987083x faster» | ||
17:26
khw left
|
|||
viki | oh never mind, it's slower :( | 17:26 | |
17:26
khw joined
17:30
cdg joined
|
|||
viki | m: gist.github.com/zoffixznet/9aea90b...17678911f3 | 17:31 | |
camelia | rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized backslash sequence: '\d'at <tmp>:14------> 3say "\7⏏5d+ way: {$dd}s"; expecting any of: argument list double quotes term» | ||
viki | m: gist.github.com/zoffixznet/cfe0332...8839b5ebe8 | ||
camelia | rakudo-moar 15f51a: OUTPUT«\d+ way: -1.7459995sliteral way: -1.5470691sdiff: 0.113934925656422%» | ||
viki | m: gist.github.com/zoffixznet/1372003...3b88c575ac | 17:32 | |
camelia | rakudo-moar 15f51a: OUTPUT«\d+ way: 1.6447186sliteral way: 1.54817305sdiff: 0.0587003202616372%» | ||
viki | damn, that's not even all the Nd chars... | 17:37 | |
Probably a good sign that the plan should be abandoned as it's hard to find bugs in | |||
17:48
obfusk left,
obfusk_ joined
17:51
zakharyas joined
18:01
wamba joined
|
|||
ugexe | zef can now take named options after positionals (`--force install Foo`, `install --force Foo` and `install Foo --force` all do the same thing) by moving all options to the front of @*ARGS. Anyone have any ideas for when that would not work as expected? (other than a module name starting with `-`) | 18:08 | |
timotimo | when you have named options that optionally take an argument | 18:09 | |
or when you have named options that always take an argument and you forget to move the argument along | |||
ugexe | you mean using `--target xxx` vs `--target='xxx'`? | 18:11 | |
timotimo | yes | 18:12 | |
ugexe | hmm. any ideas? maybe take the original @*ARGS and turn `--target xxx` into `--target=xxx` before the naive reordering? | 18:14 | |
18:14
firstdayonthejob joined
|
|||
ugexe | er shit it wont be setup right until its reordered | 18:14 | |
timotimo | fair enough. if you can tell when xxx belongs to target or not | ||
japhb | Does MAIN now allow named arguments to not have '=' between key and value? Way back when, that was a hard requirement. | 18:15 | |
japhb hasn't checked the code recently | |||
ugexe | japhb: you're right | 18:16 | |
18:33
jameslenz left
18:42
wamba left
18:45
setty1_ left,
AlexDaniel joined
18:46
setty1 joined
18:47
trnh joined
|
|||
viki | m: dd ^10 .map: {$^a + $^b} | 18:51 | |
camelia | rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 17).Seq» | ||
viki | m: dd ^10 .map: -> ($a, $b) {$a + $b} | ||
camelia | rakudo-moar 15f51a: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature in block <unit> at <tmp> line 1» | ||
viki | Kinda sucks that doesn't work. I was hoping to be able to handle uneven lists in my map | ||
m: dd ^9 .map: {$^a + $^b} | |||
camelia | rakudo-moar 15f51a: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1» | ||
jnthn | dd ^10 .map: -> $a, $b {$a + $b} | 18:52 | |
m: dd ^10 .map: -> $a, $b {$a + $b} | |||
camelia | rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 17).Seq» | ||
jnthn | m: dd ^9 .map: -> $a, $b? {$a + $b} | 18:53 | |
camelia | rakudo-moar 15f51a: OUTPUT«Cannot resolve caller infix:<+>(Int, Mu); none of these signatures match: ($x = 0) (\a, \b) (Real \a, Real \b) (Int:D \a, Int:D \b --> Int:D) (int $a, int $b --> int) (Num:D \a, Num:D \b) (num $a, num $b --> num)…» | ||
jnthn | m: dd ^9 .map: -> $a, $b? {$a + ($b // 0)} | ||
camelia | rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 8).Seq» | ||
viki | Oh damn | ||
jnthn++ | |||
jnthn | The extra parens turns it into an unpack, which is probalby not what you meant :) | ||
viki | Yeah :) | ||
18:55
zakharyas left
|
|||
timotimo | masak: it looks like your latest tweet has its link b0rked by the em-dash in it | 18:56 | |
at least in my tweetdeck it ends up not clickable | |||
not clickable in its entirety, i mean. just the beginning part | |||
tailgate | Is there more documentation to NQP than just what is in the github repo? | 19:00 | |
timotimo | there's the internals workshop course by jnthn | 19:01 | |
it's pretty good | |||
github.com/edumentab/rakudo-and-nq...als-course | |||
tailgate | thanks | ||
timotimo | see the pdf file linked from the readme | ||
tailgate | ooh, this is really nice | ||
19:10
labster joined
|
|||
viki | huggable: \d :is: Match \d without combiners: gist.github.com/zoffixznet/e0cc87a...e-p6-p6-L3 | 19:13 | |
huggable | viki, Added \d as Match \d without combiners: gist.github.com/zoffixznet/e0cc87a...e-p6-p6-L3 | ||
19:21
RabidGravy joined
19:25
Tonik joined,
espadrine joined
19:35
domidumont joined
|
|||
AlexDaniel | Just in case anybody missed the appeare | 19:37 | |
appearance of the new bot* :) | |||
u: 🦋 | |||
unicodable6 | AlexDaniel, U+1F98B BUTTERFLY [So] (🦋) | ||
AlexDaniel | u: {.uniname.words == 13} | ||
unicodable6 | AlexDaniel, U+0753 ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW AND TWO DOTS ABOVE [Lo] (ݓ) | ||
AlexDaniel, U+FBF9 ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM [Lo] (ﯹ) | |||
AlexDaniel, U+FBFA ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM [Lo] (ﯺ) | |||
AlexDaniel, gist.github.com/b8e6eb4b8ba7e67f52...5d46a17fb7 | |||
AlexDaniel | u: {.uniname.words == 0} | 19:38 | |
unicodable6 | AlexDaniel, U+0080 [Cc] () | ||
AlexDaniel, U+0081 [Cc] () | |||
AlexDaniel, U+0084 [Cc] () | |||
AlexDaniel, U+0099 [Cc] () | |||
jnthn | u: {.uniname.contains('BEER')} | ||
unicodable6 | jnthn, U+1F37A BEER MUG [So] (🍺) | ||
jnthn, U+1F37B CLINKING BEER MUGS [So] (🍻) | |||
AlexDaniel | you can just do this: | ||
u: beer | |||
unicodable6 | AlexDaniel, U+1F37B CLINKING BEER MUGS [So] (🍻) | 19:39 | |
AlexDaniel, U+1F37A BEER MUG [So] (🍺) | |||
AlexDaniel | viki: by the way… if I do $message.reply(…) rapidly, the messages are sometimes in a different order. Is it supposed to be this way? | 19:42 | |
viki: for example, I had to add sleep(…) to get the expected result here: github.com/perl6/whateverable/blob...le.p6#L240 | 19:43 | ||
viki | I have the same issue with NeuralAnomaly | ||
geekosaur | irc doesn't guarantee delivery order; it could conceivably be reordered by the server for whatever reason | 19:44 | |
viki | I... not sure if it's supposed to be that way... I kinda figured the async nature of IRC was the cause | ||
AlexDaniel | sooo… the messages are actuall ordered correctly on the IRC::Client side? | 19:45 | |
geekosaur | especially if testing with freenode it's entirely possible that message relay between servers follows different paths for different messages because at the time one message is sent a particular link looks not busy | ||
AlexDaniel | y* | ||
19:46
Tonik left
|
|||
AlexDaniel | viki: perhaps you can add a configurable $message-delay to IRC::Client then? | 19:46 | |
viki | NeuralAnomaly: source | 19:47 | |
NeuralAnomaly | viki, See: github.com/zoffixznet/na | ||
geekosaur | AlexDaniel, you could try adding an output to stdout or file along with the message send to verify they're ordered correctly in the client. but scrambled message order on IRC is quite normal in multi-server configurations like freenode | ||
viki | AlexDaniel: well, I have a sleep of 3 seconds here and they still come outta order: github.com/zoffixznet/na/blob/mast...se.pm6#L99 | 19:48 | |
AlexDaniel | huh | ||
viki | well... tentatively | 19:50 | |
AlexDaniel | yeah, that sounded suspicious | 19:51 | |
3 second delay should be enough… normally | |||
I do understand that in some conditions it may not be so, but come on… | 19:52 | ||
geekosaur | I would think. even, shorter; pastes into a channel usually don't get reordered even at the beginning when the first few lines often get sent quickly (but with a short delay between) | ||
19:55
rindolf left
|
|||
viki | Hm, well, here's the sequence of events: I send commands to a remote shell, awaiting each *write* to complete. Asynchronously, I receive their output and if it matches a pattern, I send a message to IRC. After I send the last command, I sleep for 3 seconds then send `exit` to remote shell and wait for my ssh Proc::Async to exit. I then print a message based on the exit code of Proc::Async.... Now the message | 19:57 | |
generated by the output of one of the commands I sent to remote shell somehow ends up AFTER the message that I send after shutting down ssh | |||
Ahhh | 19:58 | ||
The commands get written right away, but it takes them like an hour to run, so those 3second sleep does nothing at all. | 19:59 | ||
AlexDaniel | so just a tiny delay will fix it for most of the cases | 20:00 | |
viki | And yeah, if you're using the same IRC::Client::Message.reply to send output, then it should be sequentially sent: github.com/zoffixznet/perl6-IRC-Cl...t.pm6#L328 | ||
(most likely the case is the same if you reply by returning from event handlers) | 20:01 | ||
Filters tho, start a new promise, so there may be asynchrony there | |||
kinda weird that they do :/ probaby should be redesigned | 20:02 | ||
20:03
viki-telnet joined
|
|||
viki-telnet | 1 | 20:04 | |
2 | |||
3 | |||
4 | |||
20:04
viki-telnet left
|
|||
viki | Well, that was a copy-paste of a chunk of text into telnet session... Seems in order | 20:04 | |
So *shrug* | |||
Do .prints to IO::Socket::Async get sent sequentially? | 20:06 | ||
20:17
bjz joined
20:30
domidumont left
|
|||
AlexDaniel | viki: maybe not | 20:31 | |
timotimo | you should probably either await, or .then | 20:32 | |
AlexDaniel | viki: um, but you should probably try it several times | ||
because sometimes it is indeed in order | |||
20:32
sufrostico left
20:33
cdg left
20:34
sufrostico joined,
rindolf joined
|
|||
RabidGravy | If I have something like "class Foo { class Bar { } }" is there a part of composition of Foo where it gets to know of Bar, or do I have to grovel round in the stash somehow? | 20:36 | |
also related if I have to do some hack to find out about Bar, would it be completely composed at the time that Foo is composed? | 20:38 | ||
timotimo | just "is export" should do it | 20:39 | |
moritz | a class gets composed right after the closing curly is parsed | ||
viki | m: use nqp; say nqp::sprintf("%f", 42e0) | ||
camelia | rakudo-moar 15f51a: OUTPUT«Directive f not applicable for type VMNull» | ||
viki | What does that mean? | ||
timotimo | somehow you got a null in there | 20:40 | |
viki | hm | ||
m: use nqp; my $a := nqp::list; nqp::push($a, 42e0); say nqp::sprintf("%f", $a) | |||
camelia | rakudo-moar 15f51a: OUTPUT«42.000000» | ||
viki | well, this works for me.. | ||
RabidGravy | moritz, right so by the time the compose of Foo is called the Bar will be fully composed | 20:41 | |
timotimo | well, nqp ops don't really support var args | 20:42 | |
so it makes sense that you've got to pass a list | |||
moritz | RabidGravy: yes | 20:43 | |
viki | Noted. | ||
RabidGravy | cool, I'm toying with a hack where the classes form part of the definition of the outer one | 20:44 | |
timotimo | loadaverage.org/group/perl - wow so much content | 20:46 | |
20:49
nowan left
|
|||
viki | I have another question: are there any other equality operators besides iseq_n and eqaddr? I need to somehow differentiate between 0e0 and -0e0 | 20:49 | |
nqp: nqp::say(nqp::iseq_n(0e0, -0e0)); | 20:50 | ||
camelia | nqp-moarvm: OUTPUT«1» | ||
viki | nqp: nqp::say(nqp::eqaddr(0e0, 0e0)); | ||
camelia | nqp-moarvm: OUTPUT«0» | ||
timotimo | we usually have special ops to ask for special floats | ||
like isnan | |||
viki | don't see one for this case | 20:51 | |
viki relocates | |||
20:52
nowan joined
21:01
cdg joined
21:03
cdg left
21:04
cdg joined
|
|||
viki | nqp: nqp::say(nqp::islt(nqp::atan2(-0e0, -1e0), 0)) | 21:19 | |
camelia | nqp-moarvm: OUTPUT«No registered operation handler for 'islt' at gen/moar/stage2/QAST.nqp:1596 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:compile_op) from gen/moar/stage2/QAST.nqp:5874 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:compile_node) …» | ||
viki | nqp: nqp::say(nqp::islt_n(nqp::atan2(-0e0, -1e0), 0e0)) | 21:20 | |
camelia | nqp-moarvm: OUTPUT«No registered operation handler for 'atan2' at gen/moar/stage2/QAST.nqp:1596 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:compile_op) from gen/moar/stage2/QAST.nqp:5874 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/QAST.moarvm:compile_node)…» | ||
viki | bah | ||
man the docs need a bit of tweaking | |||
nqp: nqp::say(nqp::islt_n(nqp::atan2_n(-0e0, -1e0), 0e0)) | |||
camelia | nqp-moarvm: OUTPUT«1» | ||
21:21
bjz left
|
|||
viki | nqp: nqp::say(nqp::islt_n(nqp::atan2_n(0e0, -1e0), 0e0)) | 21:21 | |
camelia | nqp-moarvm: OUTPUT«0» | ||
viki | ehehe, hax :) | ||
I guess I'll use that, with a XXX next to it | 21:22 | ||
21:28
zakharyas joined
|
|||
viki | or learn to add an op to nqp... tho that sounds hard | 21:31 | |
timotimo | not that hard | 21:33 | |
op goes in oplist.txt, run update_ops.p6, put an implementation into interp.c, add it to nqp's QASTCompilerMAST | 21:34 | ||
on the JVM, you'd write a method into the SomethingSomethingOperationsFactory class and add a little description to QASTOperationsJAST or whatevr it's called | 21:35 | ||
viki | cool, I'll learn to do that then | ||
21:52
Lucas_One left
21:53
trnh left
21:57
TEttinger joined
22:12
bjz joined
|
|||
MasterDuke | viki: your prop-Nd-only token, is it different from <:Nd>? | 22:12 | |
timotimo | yes | 22:13 | |
because when you create a synthetic from a :Nd and some combiner, the synthetic will end up being :Nd, too | |||
MasterDuke | huh, do combiners have a named property? | 22:15 | |
timotimo | a what now? | 22:16 | |
AlexDaniel | eval: my @x = <a b c d>; dd @x[Mu] | 22:17 | |
evalable6 | AlexDaniel, rakudo-moar 15f51a5: OUTPUT«(exit code 1) Cannot resolve caller postcircumfix:<[ ]>(Array, Mu); none of these signatures m…» | 22:18 | |
AlexDaniel, Full output: gist.github.com/deaf9bc9734c2fe08a...53daf19d07 | |||
AlexDaniel | 65 suggestions, great! | ||
MasterDuke | like <:Nd> is digits | ||
22:21
girafe joined,
zakharyas left
|
|||
AlexDaniel | m: my @x = <1 2 3>; my $z = -999999999999999999; say @x[$z] | 22:25 | |
camelia | rakudo-moar 15f51a: OUTPUT«Index out of range. Is: -999999999999999999, should be in 0..Inf in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
AlexDaniel | m: my @x = <1 2 3>; my $z = -9999999999999999999; say @x[$z] | ||
camelia | rakudo-moar 15f51a: OUTPUT«(Any)» | ||
22:37
TimToady left
22:39
TimToady joined
22:40
nowan_ joined
|
|||
timotimo | food and movie time | 22:41 | |
22:43
nowan left
22:51
canopus left
|
|||
kalkin- | m: my @a = 'a' ... 'ﭏ'; say @a | 23:01 | |
and it hangs | |||
camelia | rakudo-moar 15f51a: OUTPUT«(timeout)» | 23:02 | |
kalkin- | m: my @a = 'a' .. 'ﭏ'; say @a # but this works "out" | ||
camelia | rakudo-moar 15f51a: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55296 in block <unit> at <tmp> line 1» | ||
23:03
canopus joined
|
|||
AlexDaniel | what this kind of range actually does? | 23:04 | |
is it this weird stringy thing that barely makes any sense? | |||
kalkin- | Well at least I expected it not to timeout, but actually I thought the range would represent all unicode chars for a to aleph | 23:05 | |
Dunno, may be the second error is valid, but why did it timeout in the case of a lazy range? | |||
viki | It's not a lazy range, but a sequence operator. | 23:06 | |
m: say ("a" ... "ﭏ") | |||
camelia | rakudo-moar 15f51a: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ^H ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ …» | ||
viki | m: say "ﭏ".ords | 23:07 | |
camelia | rakudo-moar 15f51a: OUTPUT«(64335)» | ||
kalkin- | viki: ahh ok sequence :) | ||
viki | well, I'm sure it'll stop once it reached 64335 | ||
hm | 23:08 | ||
espadrine | I can see why this character might be annoying www.fileformat.info/info/unicode/ch.../index.htm | ||
23:09
RabidGravy left
|
|||
viki | espadrine: huh? | 23:09 | |
espadrine: you need better font on your system :) | |||
espadrine | the error blames it on character 55296, aka U+D800 | ||
viki | .u ﭏ | ||
yoleaux | U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ) | ||
viki | espadrine: oh that | ||
23:10
salparadise left
|
|||
viki | m: print ("a" ... "z")[*-1] | 23:10 | |
camelia | rakudo-moar 15f51a: OUTPUT«z» | ||
viki | s: &infix:<...>, \("a", "z") | 23:11 | |
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/15f5...rs.pm#L437 | ||
viki | kalkin-: what were you trying to do anyway? | ||
23:11
ircuse joined
|
|||
kalkin- | viki: nothing in particular, just experimenting | 23:11 | |
viki | m: sink eager 'a', *.succ ... 'ﭏ' | ||
camelia | rakudo-moar 15f51a: OUTPUT«(timeout)» | 23:12 | |
23:12
ircuse is now known as salparadise
|
|||
viki | Kinda embaraccing that I don't know what "a" ... "ﭏ" does | 23:12 | |
viki recalls ranting on a ticket about the current behaviour being fine as is :) | 23:13 | ||
vendethiel | m: sink eager 'a'..'ﭏ' | ||
camelia | ( no output ) | ||
vendethiel | m: my @a = eager 'a'..'ﭏ' | ||
camelia | ( no output ) | ||
TEttinger | viki: maybe chosen because it's FB4F in unicode? (hex) | ||
viki | TEttinger: I don't follow... what's chosen? | 23:14 | |
TEttinger | oh sorry, wasn't sure if the ... was unclear or the second unicode character was not shown | 23:15 | |
viki | m: .say for "a" ... "ﭏ" | 23:17 | |
kalkin-: unless Unicode has a zillion backslashes, I think you may have found a bug | |||
camelia | rakudo-moar 15f51a: OUTPUT«(timeout)abcdefghijklmnopqrstuvwxyz{|}~^H…» | ||
viki | If I run the above, I see a backslash slip through every few seconds | ||
m: .say for ("a" ... "ﭏ").grep: "̿ | 23:19 | ||
camelia | rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus termat <tmp>:1------> 3.say for ("a" ... "ﭏ").grep:7⏏5 "̿ expecting any of: argument list infix infix stopper prefix term» | ||
viki | m: .say for ("a" ... "ﭏ").grep: "̿" | ||
camelia | rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus termat <tmp>:1------> 3.say for ("a" ... "ﭏ").grep:7⏏5 "̿" expecting any of: argument list infix infix stopper prefix term» | ||
viki | m: .say for ("a" ... "ﭏ").grep:{ "̿"} | ||
camelia | rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus statementat <tmp>:1------> 3.say for ("a" ... "ﭏ").grep:{7⏏5 "̿"} expecting any of: prefix term» | ||
viki | (╯°□°)╯︵ ┻━┻ | ||
If I run the above, I see a backslash slip through every few seconds | |||
wtf | |||
sorry, my terminal glitched | 23:20 | ||
AlexDaniel | eval: .ord.say for "a" ... "ﭏ" | 23:22 | |
ok that was a bad idea I guess | |||
23:22
evalable6 left
|
|||
espadrine | that's like coughing and having the house fall down… | 23:24 | |
23:24
evalable6 joined
|
|||
viki | perl6 -e '.say for ("a" ... "ﭏ")[^4000]' | sort | uniq | wc -l | 23:25 | |
425 | |||
AlexDaniel | yea | ||
viki | m: ("a" ... "ﭏ")[^4000].sort.unique.elems.say | ||
camelia | rakudo-moar 15f51a: OUTPUT«735» | ||
viki | s: "a", 'succ', \() | 23:26 | |
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/15f5...tr.pm#L270 | ||
psch | uh, that Sequence end point looks really confusing here..? | ||
AlexDaniel | well, it's right to left… | ||
psch | oohh | ||
viki | psch: it's aleph one | 23:27 | |
psch | nah, it's just aleph | ||
viki | *aleph | ||
psch | but the right to left makes more sense there :) | ||
AlexDaniel | u: m: ("a" ... "ﭏ")[^4000].sort.unique.elems.say | ||
unicodable6 | AlexDaniel, U+003A COLON [Po] (:) | ||
AlexDaniel, U+006D LATIN SMALL LETTER M [Ll] (m) | |||
AlexDaniel, U+0020 SPACE [Zs] ( ) | |||
AlexDaniel, gist.github.com/9f55ace1c5f04bd26b...361754aa5c | |||
psch | i'm still not completely certains what's to come out of that | 23:28 | |
the RTL marker is right behind the first double quote? | |||
AlexDaniel | .u "ﭏ"000] | 23:29 | |
yoleaux | U+0022 QUOTATION MARK [Po] (") | ||
U+0030 DIGIT ZERO [Nd] (0) | |||
U+005D RIGHT SQUARE BRACKET [Pe] (]) | |||
viki | .u ℵ | ||
yoleaux | U+2135 ALEF SYMBOL [Lo] (ℵ) | ||
viki | .u ℵ | ||
yoleaux | U+2135 ALEF SYMBOL [Lo] (ℵ) | ||
AlexDaniel | .u ﭏ"0 | ||
yoleaux | U+0022 QUOTATION MARK [Po] (") | ||
U+0030 DIGIT ZERO [Nd] (0) | |||
U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ) | |||
viki | .u "ﭏ") | ||
yoleaux | U+0022 QUOTATION MARK [Po] (") | 23:30 | |
U+0029 RIGHT PARENTHESIS [Pe] ()) | |||
U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ) | |||
psch | yeah the U+2135 doesn't show here, but ﭏ does | ||
...lamed o.o | |||
anyway, that just caught my curiousitiy. i'll resign to probably-not-knowing, g'night o/ | 23:31 | ||
viki | m: for ("a" ... "ﭏ")[^4000] { state $x = .ord; say "Got {.ord} but has $x before" if $x > .ord; $x = .ord } | 23:32 | |
camelia | rakudo-moar 15f51a: OUTPUT«Got 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 beforeGot 768 but has 831 befo…» | ||
viki | m: say 768.base: 16; say 831.base: 16 | ||
camelia | rakudo-moar 15f51a: OUTPUT«30033F» | ||
viki | m: "\x[300]\x[33F]".uninames.say | ||
camelia | rakudo-moar 15f51a: OUTPUT«(COMBINING GRAVE ACCENT COMBINING DOUBLE OVERLINE)» | ||
viki | m: "\x[300]".succ.uniname.say | ||
camelia | rakudo-moar 15f51a: OUTPUT«COMBINING GRAVE ACCENT» | ||
viki | kyclark: would you be able to rakudobug this? And include link to the chat: irclog.perlgeek.de/perl6/2016-11-25#i_13630211 | 23:33 | |
huggable: rakudobug | |||
huggable | viki, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs | ||
viki | ^ just email to that address (the site option is currently disabled) | ||
23:37
rindolf left
23:40
wamba joined,
bjz left
23:41
firstdayonthejob left
|
|||
viki | oh heh, only now that I copy-pasted that code into my editor do I see the weirdness | 23:47 | |
23:54
espadrine left
23:57
UgJkA left
|