»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Kaiepi glad i started scripting writing boilerplate because this would've been hell to type manually hastebin.com/cekusifolo.cpp 00:20
buggable New CPAN upload: AttrX-Mooish-v0.0.1.tar.gz by VRURG cpan.metacpan.org/authors/id/V/VR/...0.1.tar.gz 00:21
lookatme_q :) 00:40
buggable New CPAN upload: AttrX-Mooish-v0.0.2.tar.gz by VRURG cpan.metacpan.org/authors/id/V/VR/...0.2.tar.gz 00:41
Kaiepi m: use nqp; my $size = 1; my native sa_family_t is nativesize(nqp::unbox_i($size)) is Int is unsigned { } 00:43
camelia ===SORRY!===
Cannot unbox a type object (Any) to an int.
Kaiepi m: use nqp; my Int $size = 1; my native sa_family_t is nativesize(nqp::unbox_i($size)) is Int is unsigned { }
camelia ===SORRY!===
Cannot unbox a type object (Int) to an int.
Kaiepi m: use nqp; my Int $size = 1; my native sa_family_t is nativesize(nqp::box_i($size)) is Int is unsigned { }
camelia ===SORRY!===
Arg count 1 doesn't equal required operand count 3 for op 'box_i'
timotimo you need a compile-time-known value in the trait
Kaiepi fuck
timotimo or use the MOP to build it up 00:44
Kaiepi would it work if i handled it in a BEGIN block?
timotimo as long as the int $size is in there as well
how come you don't know the size at compile time?
Kaiepi because what i'm trying to do is define some native types for sa_family_t, socklen_t, etc. based off a nativecall function that returns a struct containing the size of the type and whether or not it's unsigned 00:45
i might be able to do that at compile time though 00:46
timotimo yes, you definitely can 00:47
lookatme_q looks like great, that's better than the subset 01:00
Kaiepi timotimo, when i try to run this, it tells me i can't look up attributes in a Native::Socket::const_info class hastebin.com/upiyukapax.pl 01:19
m: BEGIN { my \size = 4; my native foo is Int is nativesize(size) is unsigned { } } 01:21
camelia 5===SORRY!5=== Error while compiling <tmp>
'foo' cannot inherit from 'nativesize' because it is unknown.
at <tmp>:1
Kaiepi m: use NativeCall; BEGIN { my \size = 4; my native foo is Int is nativesize(size) is unsigned { } }
camelia 5===SORRY!5=== Error while compiling <tmp>
'foo' cannot inherit from 'nativesize' because it is unknown.
at <tmp>:1
Kaiepi m: BEGIN { use NativeCall; my \size = 4; my native foo is Int is nativesize(size) is unsigned { } } 01:22
camelia 5===SORRY!5=== Error while compiling <tmp>
'foo' cannot inherit from 'nativesize' because it is unknown.
at <tmp>:1
Kaiepi hm
geekosaur one issue here that might or might not be related to *this* error: the name size exists at compile time, but its value isn't until runtime. but needs to be compiletime to be used in a trait 01:23
BEGIN my \size = 4;
timotimo or just "constant size = 4" 01:28
Kaiepi m: BEGIN { use NativeCall; constant size = 4; my native foo is Int is nativesize(size) is unsigned { } } 01:31
camelia 5===SORRY!5=== Error while compiling <tmp>
P6opaque: missing attribute protocol in compose of foo
at <tmp>:1
Kaiepi m: BEGIN { use NativeCall; constant int size = 4; my native foo is Int is nativesize(size) is unsigned { } } 01:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing initializer on constant declaration
at <tmp>:1
------> 3BEGIN { use NativeCall; constant int7⏏5 size = 4; my native foo is Int is nativ
Kaiepi m: BEGIN { use NativeCall; constant Int size = 4; my native foo is Int is nativesize(size) is unsigned { } }
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing initializer on constant declaration
at <tmp>:1
------> 3BEGIN { use NativeCall; constant Int7⏏5 size = 4; my native foo is Int is nativ
Kaiepi m: constant size = 4; BEGIN { my native foo is Int is nativesize(size) is unsigned { } } 01:33
camelia 5===SORRY!5=== Error while compiling <tmp>
P6opaque: missing attribute protocol in compose of foo
at <tmp>:1
timotimo "native" isn't supposed to be used by users 01:34
Kaiepi oh 01:35
this is my latest attempt without native, but it segfaults hastebin.com/rahevihude.rb 01:36
timotimo you know that CStruct will do a pointer dereference, right? 01:37
Kaiepi wdym? like making the c for __socklen_t__ return a pointer to a struct wouldn't require changing the sub to return Pointer[const_info]? 01:40
timotimo correct
Kaiepi i'll see if that fixes this
timotimo returning a struct from a c function isn't specced clearly
we actually had windows crashes because we were trying to use a struct value returned from a function
Kaiepi timotimo, i changed it to pass the struct to the c function instead of having the c function initialize it and it works now 01:53
timotimo that's a good idea
that makes memory ownership handling simpler, too
Kaiepi thanks for the help 01:54
timotimo YW
RubioTerra Hello 02:11
This little program steadly consumes memory: 'use Inline::Perl5; use Mojo::DOM:from<Perl5>; Mojo::DOM.new("<html><body><h1>Hey!</h1></body></html>") for ^1_000_000;' 02:12
RubioTerra Shouldn't it gc the objects 02:12
?
timotimo i don't know how exactly Inline::Perl5 handles memory, but yeah, it should 02:19
RubioTerra Yes, I suspect it has something to do with Inline::Perl5 02:24
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)) 02:59
yoleaux 31 Jul 2018 21:26Z <MasterDuke> uzl: i would probably say "prepending : to each variable", since it comes before the variable name
camelia ( no output )
yoleaux 31 Jul 2018 21:32Z <MasterDuke> uzl: also, you have '$surname' in the aliases example signature, but use '$last-name' in the body of the routine
31 Jul 2018 21:33Z <MasterDuke> uzl: oh, and you say two kinds of aliases, but both of your list items are numbered 1
uzl .tell MasterDuke You're right! It should be 'prepending' given that it comes before the variable. I couldn't get the numbered list right so I went with bullet points instead. Overall, great catch. Thanks! 03:04
yoleaux uzl: I'll pass your message to MasterDuke.
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9))
camelia ( no output )
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); sat $y; 03:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
sat used at line 1. Did you mean 'set', 'say'?
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y;
camelia (7/8 1/2 5/6 19/20 15/16 13/14 3/4 9/10 17/18 11/12)
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y.sort;
camelia (1/2 11/12 13/14 15/16 17/18 19/20 3/4 5/6 7/8 9/10)
MasterDuke uzl: since it looks like i didn't say it in the .tells, good article 03:06
yoleaux 03:04Z <uzl> MasterDuke: You're right! It should be 'prepending' given that it comes before the variable. I couldn't get the numbered list right so I went with bullet points instead. Overall, great catch. Thanks!
uzl Thank you very much, MasterDuke! It's all thanks to #perl6. Everyone here is very helpful! 03:09
m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y.sort;
camelia (1/2 11/12 13/14 15/16 17/18 19/20 3/4 5/6 7/8 9/10)
uzl m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y.sort.join(' '); 03:11
camelia 1/2 11/12 13/14 15/16 17/18 19/20 3/4 5/6 7/8 9/10
uzl How would I get something like this => '1/2 3/4 5/6 7/8 9/10 11/12 13/14 15/16 17/18 19/20' for $y?
MasterDuke m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y.sort)+*).join(' '); 03:18
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3('/') }, $x.Str.comb(/\d+/); say $y.sort7⏏5)+*).join(' ');
MasterDuke m: my $x = set(set(0,1), set(10,11), set(12, 13), set(14, 15), set(16, 17), set(18, 19), set(2, 3), set(4, 5), set(6, 7), set(8, 9)); my $y = map { sort($^a+1, $^b+1).join('/') }, $x.Str.comb(/\d+/); say $y.sort(+*).join(' '); 03:19
camelia 1/2 3/4 5/6 7/8 9/10 11/12 13/14 15/16 17/18 19/20
zostay m: my $x = (1..20).rotor(2).map(*.Set); $x.say; # will save some typing, btw 03:21
camelia (set(1 2) set(3 4) set(5 6) set(7 8) set(10 9) set(11 12) set(13 14) set(15 16) set(17 18) set(19 20))
uzl MasterDuke: That was straightforward. What's the '+*' doing here? 03:22
MasterDuke uzl: doing a numeric sort. you were sorting strings, so it defaulted to string sort, and the string "11" comes before the string "2" 03:24
uzl That makes sense. Thanks! 03:25
lindylex I al trying to match all the words in a string that start with a vowel. I though this would work. I created a character class and the used word bound ending with a blank space. This is what I tried : say "Match all the words of a string starting with a lowercase vowel :: ".match(/ <[aeiou]><|w><|w>\s /, :global); 05:58
tyil .tell benjikun can I get access to the questionaire so I can see if I can help out in one way or another 06:32
yoleaux tyil: I'll pass your message to benjikun.
7 Aug 2018 21:16Z <benjikun> tyil: Yeah, I am. :)
CIAvash m: say "Match all the words of a string starting with a lowercase vowel :: ".match(/ <|w><[aeiou]>\w* /, :g); 07:00
camelia (「all」 「of」 「a」 「a」)
lindylex CIAvash : I found two ways to do this. ONE : say "Match all the words of a string starting with a lowercase vowel amen :: ".match(/ <|w><[aeiou]>\w*<|w> /, :global); 07:01
TWO : say "Match all the words of a string starting with a lowercase vowel amen :: ".match(/ << <[aeiou]>\w* >> /, :global);
CIAvash m: say "Match all the words of a string starting with a lowercase vowel :: ".words.grep: *.starts-with: any <a e i o u>;
camelia (all of a a)
lindylex CIAvash : that is cool 07:02
Interesting no need for the closing word boundary. It terminates because there is a blank space after the atom. 07:04
Nite and thanks 07:07
Geth doc: cd318ffa3b | (JJ Merelo)++ | doc/Language/operators.pod6
Rewrites example and text to avoid repetition

This fixes #2237, but also refers to #1924. It's always better to have two valid examples, than to have a single one.
Another alternative is, of course, to eliminate indexing of one of them, but this is probably better.
09:10
synopsebot Link: doc.perl6.org/language/operators
Kaiepi m: my List ($a, $b) = ((1,2), (3,4)); say $a, ' ', $b 10:49
camelia (1 2) (3 4)
Kaiepi m: my List (@a, @b) = ((1,2), (3,4)); say $a, ' ', $b
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared. Did you mean '@a'?
at <tmp>:1
------> 3my List (@a, @b) = ((1,2), (3,4)); say 7⏏5$a, ' ', $b
Kaiepi m: my List (@a, @b) = ((1,2), (3,4)); say @a, ' ', @b
camelia [(1 2) (3 4)] [] 10:50
Kaiepi m: my Int (@a, @b) = ((1,2), (3,4)); say @a, ' ', @b
camelia Type check failed in assignment to @a; expected Int but got List ($(1, 2))
in block <unit> at <tmp> line 1
Kaiepi why does this happen with @?
jnthn Because @ in a list assignment swallows up all the things 10:51
Kaiepi oh 10:54
lizmat weekly: www.facebook.com/groups/perl6/perm...877331093/ 11:43
notable6 lizmat, Noted!
Geth doc: 90ca7aff21 | thundergnat++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Fix minor typo
12:20
synopsebot Link: doc.perl6.org/language/operators
Geth ¦ doc: JJ self-assigned Undocumented :translate-nl option to Str.encode github.com/perl6/doc/issues/1233 12:39
lichtkind how do i create type object of self made class ? 13:12
masak m: class SelfMade {}; say SelfMade # <--- type object 13:15
camelia (SelfMade)
lichtkind hej masak o/ 13:24
that not what i asked but i got it :)
masak I disagree -- that is what you asked ;) 13:25
lichtkind yes and it was right i just was few steps ahead, my error was elsewhere 13:26
masak .oO( who are you to come here and tell me what you actually meant ) :P
lichtkind see you in schottland?
masak unfortunately I must schkip that conf :/
lichtkind ah 13:27
but its near you
masak I can't travel so easily what with a young kid and all 13:27
I hope to be able to join GPW in 2019
lichtkind no to be clear it is what I asked for but I was focussed on my mistakes and there were two and elsewhere 13:28
masak masak's advice is provided as-is; we take not responsibility for how it's used, and for possible interactions with mistakes elsewhere; breaking the seal means voiding the warranty, which didn't properly exist in the first place 13:29
lichtkind haha 13:30
lichtkind masak, but im glad to hear you have family 13:30
masak yes, and it's a nice family 13:31
SmokeMachine is there a way to add methods on a specific array type? I mean: `Array[MyClass].my-custom-method` 13:53
AlexDaniel` mmm, plush camelia is so cute 13:54
masak AlexDaniel`: _and_ fire-proof! 14:01
SmokeMachine is there possible to specialise a Positional[MyClass], I mean: every time some one uses `my MyClass @bla` it gets a custom class. something like: `class Positional[MyClass] does Positional {...}`(probably it could not be a class) 14:04
SmokeMachine m: class C {}; role Array[C] does Positional {}; dd my C @bla; 14:11
camelia ===SORRY!===
No appropriate parametric role variant available for 'Array'
lizmat SmokeMachine: create a different class and use the syntax "my @bla is YourClass"
you would have to supply your own .STORE then though 14:12
SmokeMachine lizmat: thanks! 14:14
SmokeMachine but `Defaults on compound attribute types not yet implemented`... :( 14:24
SmokeMachine m: class A { method to-many { class Bla does Positional[A] {}.new } }; class C { has A @.a = .of.to-many }; say C.new.a 14:31
camelia Type check failed in assignment to @!a; expected A but got A::Bla (A::Bla.new)
in block <unit> at <tmp> line 1
SmokeMachine is there any way to do something like that? ^^ 14:32
masak I have non-zero exit statuses in 4 spectest files. been a while since I had that, IIRC. 14:49
Roamer` hi, I've got something that I'm not sure is a bug or me not completely understanding the implications of having a sub with no parameters; it happens on both 2018.05 and 2018.06 (right now I have no other versions to test with) 14:55
m: use v6.c; sub version() { return "1.1" }; say @*ARGS ?? version!! "nah"
camelia nah
Roamer` m: use v6.c; sub version() { return "1.1" }; say @*ARGS ?? version !! "nah" 14:55
camelia Non ast passed to WANTED: NQPMu
5===SORRY!5=== Error while compiling <tmp>
Your !! was gobbled by the expression in the middle; please parenthesize
at <tmp>:1
------> 3return "1.1" }; say @*ARGS ?? version !!7⏏5 "nah"
expecting…
Roamer` the only difference is the space before the "!!" 14:56
Roamer` and, yes, if I parenthesize the version call, it works 14:56
timotimo i'd assume that's from version!!0 not being valid
Roamer` m: use v6.c; sub version() { return "1.1" }; say @*ARGS ?? (version) !! "nah"
camelia nah
timotimo so it's clear there that it's not double prefix ! there
6c: sub version() { return "1.1" }; say @*ARGS ?? version!! "nah" 14:57
6c: sub version() { return "1.1" }; say @*ARGS ?? version !! "nah"
committable6 timotimo, ¦6c (31 commits): «nah␤»
timotimo, gist.github.com/a6badcb70528d3d4e5...7f12ecc602 14:58
timotimo it's been the same ever since 2016.01
the internal error at the start, "non ast passed to wanted", should definitely go
Roamer` timotimo, so you're saying I should file a bug and let people fight it out in the bug discussion what exactly should be done about it? :) 14:59
timotimo that sounds like a good plan to me 15:00
Roamer` thanks :)
timotimo you can put a link to irc or copy-paste the text for easy availability of the info i just added using the bots 15:00
Roamer` thanks, will do 15:01
buggable New CPAN upload: Digest-BubbleBabble-0.0.2.tar.gz by KAIEPI cpan.metacpan.org/authors/id/K/KA/...0.2.tar.gz
timotimo thanks :)
jmerelo releasable6: status 15:30
releasable6 jmerelo, Next release in ≈10 days and ≈3 hours. 4 blockers. 81 out of 367 commits logged (⚠ 9 warnings)
jmerelo, Details: gist.github.com/453dd7517ba4b257e4...270d964f08
araraloren m: my $s = supply { say "called foo"; emit 42; }; react { whenever $s { say $_; }; wheneever $s { say $_; } }; 15:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> 3 { whenever $s { say $_; }; wheneever $s7⏏5 { say $_; } };
expecting any of…
araraloren m: my $s = supply { say "called foo"; emit 42; }; react { whenever $s { say $_; }; whenever $s { say $_; } };
camelia called foo
called foo
42
42
araraloren so, the supply will execute twice when I tap it twice ? 15:36
jmerelo araraloren: that seems to be the case, yes. 15:37
timotimo yes, the supply block's body will be called for every time it's tapped
use .share on the supply to get another supply that can be tapped any number of times without re-executing the original block
araraloren How can I have multi tapped but execute once ? 15:38
okay
jmerelo araraloren: it's not "executed", it's "sent" to "subscribers", but pretty much that's how it works.
araraloren :/ but it executed
timotimo jmerelo: no, araraloren is correct
araraloren m: my $s = supply { say "called foo"; emit 42; }; $s.=shared; react { whenever $s { say $_; }; whenever $s { say $_; } };
camelia No such method 'shared' for invocant of type 'Supply'. Did you mean 'share'?
in block <unit> at <tmp> line 1
araraloren m: my $s = supply { say "called foo"; emit 42; }; $s.=share; react { whenever $s { say $_; }; whenever $s { say $_; } }; 15:39
timotimo oh?
camelia (timeout)called foo
araraloren what happened
timotimo dunno
araraloren m: my $s = supply { say "called foo"; emit 42; }; $s.=share;
camelia called foo
araraloren m: my $s = (supply { say "called foo"; emit 42; }).share; 15:40
camelia called foo
timotimo oh, i know
the 42 got emitted before any of the taps were made
m: my $s = Supply.interval(0.1).share; sleep 0.6; my $t = $s.tap({ .say }); sleep 3; $t.close 15:41
camelia 6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
timotimo as you can see you miss the first few values
araraloren m: my $s = (supply { say "called foo"; emit 42; }).share; react { whenever $s { say $_; }; whenever $s { say $_; } };
seems like it can't work in this way 15:42
camelia (timeout)called foo
timotimo it times out because the supply is never closed it seems like
jnthn Correct
timotimo i mean, share perhaps doesn't forward the close from $s
jnthn Thing is, how can it know that you're ready?
araraloren how to share a supply which return from a function
timotimo yeah
araraloren I create a sub return a supply 15:43
I want multi subscribes can receive the data emited
timotimo make it possible to tell the source of the supply itself when it's okay to start?
araraloren m: my $s = sub { supply { say "called foo"; emit 42; } }(); react { whenever $s { say $_; }; whenever $s { say $_; } }; 15:44
camelia called foo
called foo
42
42
araraloren It's like above ^
but it called twice, so that's mess up my code
jnthn Pass in a Promise to the sub and make it not start emitting any values until that is kept, then keep it after all the `whenever`s are set up
araraloren But that's can not solve the problem, the Supply still execute twice ? 15:47
timotimo shouldn't
let me code it up
araraloren okay, thanks
timotimo m: sub make-it(Promise $start-it) { supply { say "called"; await $start-it; say "started"; emit 42 } }; my $p = Promise.new; my $shared = make-it($p); react { whenever $shared { say "one $_" }; whenever $shared { say "two $_" }; say "set up whenevers"; $p.keep(1); say "kept the promise" }; 15:49
camelia called
called
set up whenevers
kept the promise
started
one 42
started
two 42
timotimo oh?
jnthn You forgot to call .share? :) 15:50
timotimo m)
yes i did
timotimo m: sub make-it(Promise $start-it) { supply { say "called"; await $start-it; say "started"; emit 42 } }; my $p = Promise.new; my $shared = make-it($p).share; react { whenever $shared { say "one $_" }; whenever $shared { say "two $_" }; say "set up whenevers"; $p.keep(1); say "kept the promise" }; 15:50
camelia (timeout)called
timotimo i think it's a bug that .share sets up a supply that doesn't .done when the source supply is .done
oh, ok
araraloren I think it's something wrong with the share
timotimo it immediately waits forever for the await 15:50
maybe? 15:51
jnthn sub ($start) { supply whenever $start { emit 42 } }
Something like that
timotimo omg could my ssh session stop lagging
timotimo m: sub make-it(Promise $start-it) { supply { say "called"; whenever $start-it { say "started"; emit 42 } } }; my $p = Promise.new; my $shared = make-it($p).share; react { whenever $shared { say "one $_" }; whenever $shared { say "two $_" }; say "set up whenevers"; $p.keep(1); say "kept the promise" }; 15:51
camelia called
set up whenevers
kept the promise
started
one 42
two 42
timotimo there it is
thanks jnthn
araraloren okay, jnthn++ 15:52
jnthn We could also try to have a ref-counting version of share but notice that this doesn't actually save you from data loss in this case either
araraloren though the code looks like a little ugly :) 15:53
I will have a try
buggable New CPAN upload: Attribute-Predicate-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 16:11
araraloren Seems like the code works now, but need refactor, thanks #perl6 :) 16:17
Juerd Does Perl 6 have a way to guarantee overwriting or free()ing a string? Like SecureString in .NET 17:21
This is for passwords, private keys, etc.
timotimo i don't think it does, no 17:39
b2gills A secure string would need support from the VM, as the garbage collector copies data around. 17:46
timotimo actually, the string data isn't on the managed heap
a string carries around a malloced piece of data containing the string's content, unless it's a stranded string, in which case it links to multiple string objects 17:47
but if the string exists in the source code or otherwise gets into the precompilation, it'll also be in the .moarvm file, which gets mmapped, as well as the decoded string heap (which is "just" string objects, so see above for the malloced data storage)
pmurias Juerd: no, it's would need support on the VM level (or be implemented using NativeCall) 18:24
Juerd Thanks 19:06
johnjohn101 hi perl6 people
pmurias johnjohn101: hi 19:14
johnjohn101 haven't heard much from perl 6 land 19:15
Juerd johnjohn101: What would you like to hear? 19:21
johnjohn101: Maybe p6weekly.wordpress.com/ has what you're looking for? :)
johnjohn101 ok thanks 19:22
johnjohn101 i just want to know if it's getting faster 19:22
Juerd It is
robertle is 19:23
there such a thing as slowly getting faster? ;)
johnjohn101 well no.... 19:24
moritz it's slowly getting faster.
johnjohn101 i'm going to have to try it again. been a year.
Xliff $ perl6 -Ilib t/01-widget.t 19:26
Failed to register: Timeout was reached
^^ Anyone know what that means?
Xliff Anyone know why perl6 is doing this? 19:40
Xliff $ perl6 -Ilib t/01-widget.t 19:40
Failed to register: Timeout was reached
I was working with NativeCall code when it happened, but now... no matter what I do on this piece of codfe, this is all I get. 19:41
I have rm'd the .precomp dirs. No changed.
Rakudobrewed and no change.
If someone has an idea on what it could be, please just drop me a PM or send a message through yoleaux 19:42
moritz doesn't even know what repo Xliff's question relates to 20:21
Xliff moritz: It's my own project, but I've never seen that error before. 20:31
And it doesn't seem to go away for that script, even though I've reverted the changes. 20:32
If you want to know the exact piece of code, here you go:>
github.com/Xliff/p6-GtkPlus/blob/f...dget.t#L53 20:33
Just out of curiosity, why doesn't an (Int) signature map naturally to (uint32)? 20:34
Or (uint64)?
sena_kun Xliff, it doesn't seem like a Perl 6-specific error.
Xliff ?
sena_kun see e.g. gitlab.gnome.org/GNOME/gnome-contr.../issues/30 20:35
Xliff Is that GTK throwing that error>
sena_kun seems so, yeah.
of course, I have no clue why.
:)
but still, it isn't rakudo/nativecall/moarvm or whatever in this area, judging by google responses.
Xliff 'kk 20:36
sena_kun but 150 results are not very... nice.
Xliff, did you try reboot?
Xliff Hum. No. 20:37
sena_kun some people write it may(should) help to restore the state.
Xliff Doing that now. Got bless VMs.
s/Got/God/
Xliff OK. I will let you know how that works. 20:38
Thanks!
sena_kun np
sena_kun bbs.archlinux.org/viewtopic.php?id=233715 <- may be a relevant thread. 20:39
Zoffix johnjohn101: FWIW, I doubt you'll see anything groundbreaking, compared to last year, other than some specific examples. A bunch of work in the last year involved getting in place pieces that will make it easier for us to optimize stuff (like new JIT that took more than a year to develop), but don't exactly offer perf improvements immediatelly yet.
johnjohn101: try in another year :D
c: 2017.06,HEAD my $x = <1/3>; my $y = $x**600000; say (now - ENTER now), " seconds" 20:48
committable6 Zoffix, ¦2017.06: «7.29975270 seconds␤» ¦HEAD(74ea72e): «0.01227456 seconds␤»
Zoffix one of the specific examples, but other stuff got slower 20:50
c: 2017.06,HEAD my $x = <1/3>; $x += $x for ^2000_00; say now - ENTER now
committable6 Zoffix, ¦2017.06: «0.97538701␤» ¦HEAD(74ea72e): «7.521223␤»
Zoffix Like this ^ and not everythign has been mopped up after that change (though the plus itself won't get back to old speeds) 20:51
Well, eventually it might, but not due to mopping up :)
lizmat weekly: medium.com/@jcoterhals/perl-6-smal...20fdb18a3b 20:52
notable6 lizmat, Noted!
Zoffix masak: can you try again on head and file any failures you get? I had some floppers when first fix for R#2158, but now it's been good. 21:05
synopsebot R#2158 [closed]: github.com/rakudo/rakudo/issues/2158 [SEGV][regression][tests committed][⚠ blocker ⚠] :enc<utf8-c8> on Proc drops content / SEGVs
buggable New CPAN upload: Method-Also-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 21:41
masak Zoffix: trying again 21:52
benjikun pmurias: are you still working on perl6 with graalvm compatibility 22:07
yoleaux 06:32Z <tyil> benjikun: can I get access to the questionaire so I can see if I can help out in one way or another
benjikun .tell tyil Yeah, I'll add you as a collaborator. What's your email? 22:08
yoleaux benjikun: I'll pass your message to tyil.
MasterDuke benjikun: yeah, i've done some easy work, pmurias has done the complicated stuff 22:11
github.com/perl6/nqp/tree/truffle 22:12
benjikun I see, sweet 22:15
SmokeMachine how can I "export" a dynamically created type? 23:30
m: sub bla { my \Type = Metamodel::ClassHOW.new_type(); 42 }; say bla; say Type 23:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Type used at line 1
geekosaur the usual way? "our", or return it and assign the result 23:36
you weren;t expecting a rumtime generated type to somehow rewrite the compiler to know about it? 23:37
SmokeMachine m: sub bla { our \Type = Metamodel::ClassHOW.new_type(); 42 }; say bla; say Type
camelia 5===SORRY!5=== Error while compiling <tmp>
our scoped term definitions (only 'my' is supported at the moment) not yet implemented. Sorry.
at <tmp>:1
------> 3sub bla { our \Type7⏏5 = Metamodel::ClassHOW.new_type(); 42 };
expectin…
jnthn Also note that the type vs. routine distinction is a compile time decision, so you'd have to construct the type at compile time at the very least.
The typical way to do these things is the construct them in a sub EXPORT and export them into the scope of the thing that does a `use` of the module, or similar.
*is to 23:38
SmokeMachine I have a `class MetamodelX::Model is Metamodel::ClassHOW` that creates the type you wrote and its ResultSet (another type)... there are no way to access its ResultSet?
but if I do it at the EXPORT sub I'll cannot use the `model` that wasn't exported yet... 23:40
jnthn Yeah, I don't know the full context of what you're trying to do :)
But metamodel stuff does run at compile time at least
SmokeMachine jnthn: I have am trying to do this work: 23:41
jnthn One way would be to install the ResultSet type in the package of the type created by the custom meta-object
SmokeMachine but B::ResultSet is created by the model's `compose` www.irccloud.com/pastebin/LcxpKfce/ 23:42
jnthn: sorry, I didn't get it... how could I do that? 23:44
jnthn SmokeMachine: You got the meta-object code handy so I can explain it in terms of the code you have? 23:45
but effectively, if you have like method compose($obj) { ... } then somewhere in there you'd do $obj.WHO<ResultSet> = ...the-type...;
SmokeMachine jnthn: a little big... (im sorry) www.irccloud.com/pastebin/L65rpi0b/ 23:46
jnthn Ah, OK, so like what I said but you take \type in the compose method, so it's type.WHO<ResultSet> = ... 23:48
Call bla in place of the ... and arrange for it to return the type it makes 23:49
Should work out well
SmokeMachine jnthn: that worked!!! 23:51
thank you very much!
jnthn :) 23:52
SmokeMachine jnthn: there is something wrong... :( 23:56
www.irccloud.com/pastebin/gejB2EdA/
it thinks that `B::ResultSet.new(filter => Red::F...` isn't a `B::ResultSet` 23:57
jnthn Intersting...
Maybe := instead of =
Sleep time for me...'night
SmokeMachine the same... :( 23:58
SmokeMachine thank you! 23:58
jnthn OK, then not sure, and too tired to think much more about it now :)
Good luck!
o/
SmokeMachine thanks!