»ö« 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. |
|||
00:09
w_richard_w joined,
p6bannerbot sets mode: +v w_richard_w
00:19
[particle] left
|
|||
Kaiepi | glad i started scripting writing boilerplate because this would've been hell to type manually hastebin.com/cekusifolo.cpp | 00:20 | |
00:20
[particle] joined,
p6bannerbot sets mode: +v [particle]
|
|||
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 | |
00:24
Sgeo_ left
00:29
[particle]1 joined
00:30
[particle] left,
p6bannerbot sets mode: +v [particle]1
00:34
[particle]1 left
00:35
[particle] joined,
p6bannerbot sets mode: +v [particle]
|
|||
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 | |
00:49
[particle] left
00:52
Sgeo joined
00:53
p6bannerbot sets mode: +v Sgeo
00:55
lex joined
00:56
[particle] joined,
p6bannerbot sets mode: +v lex
00:57
p6bannerbot sets mode: +v [particle]
|
|||
lookatme_q | looks like great, that's better than the subset | 01:00 | |
01:01
lex is now known as lindylex
01:02
[particle] left
01:04
[particle] joined
01:05
p6bannerbot sets mode: +v [particle]
01:10
lindylex left
01:14
benjikun left
|
|||
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 | |||
01:42
molaf left
01:47
Kaiepi left
01:50
astj left
01:52
Kaiepi joined
01:53
p6bannerbot sets mode: +v Kaiepi
|
|||
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 | ||
01:54
molaf joined
01:55
p6bannerbot sets mode: +v molaf
02:11
RubioTerra joined,
p6bannerbot sets mode: +v RubioTerra
|
|||
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 | ||
02:12
eliasr left
|
|||
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 | |
02:33
dwarring left
02:46
RubioTerra left
02:50
ptx013 joined
02:51
p6bannerbot sets mode: +v ptx013
02:55
ptx013 left
02:58
uzl joined
02:59
p6bannerbot sets mode: +v uzl
|
|||
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)) | ||
03:22
Waggie28 joined,
Waggie28 left
|
|||
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 | |
03:45
Kaiepi left
03:47
uzl left
03:50
molaf left
03:51
mno joined,
p6bannerbot sets mode: +v mno
03:52
mno left
04:01
benjikun joined
04:02
p6bannerbot sets mode: +v benjikun
04:05
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
04:06
lex joined,
p6bannerbot sets mode: +v lex
04:12
lex left
04:38
w_richard_w left
04:45
Shinobi joined,
Shinobi left
04:47
curan joined,
p6bannerbot sets mode: +v curan
04:49
OGF6 joined
04:50
OGF6 left
04:58
thurin8 joined
04:59
p6bannerbot sets mode: +v thurin8,
thurin8 left
05:00
CIAvash joined
05:01
p6bannerbot sets mode: +v CIAvash
05:02
vrurg left
05:05
vrurg joined,
p6bannerbot sets mode: +v vrurg,
Khisanth left
05:06
vrurg left
05:12
FROGGS_ joined,
p6bannerbot sets mode: +v FROGGS_
05:13
vrurg joined
05:14
p6bannerbot sets mode: +v vrurg
05:18
Khisanth joined
05:19
p6bannerbot sets mode: +v Khisanth
05:31
sauvin joined,
p6bannerbot sets mode: +v sauvin
05:41
vrurg left
05:42
Kaiepi joined,
p6bannerbot sets mode: +v Kaiepi
05:43
vrurg joined,
p6bannerbot sets mode: +v vrurg
05:46
rindolf joined
05:47
p6bannerbot sets mode: +v rindolf
05:52
[particle]1 joined
05:53
[particle] left,
p6bannerbot sets mode: +v [particle]1
05:55
benjikun left,
lindylex joined
05:56
p6bannerbot sets mode: +v lindylex
|
|||
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 | |
06:13
lichtkind left
06:14
espadrine joined
06:15
p6bannerbot sets mode: +v espadrine
06:22
espadrine left
06:25
shareable6 joined,
p6bannerbot sets mode: +v shareable6
06:26
lichtkind joined,
p6bannerbot sets mode: +v lichtkind
|
|||
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. :) | |||
06:36
Summertime left
06:39
Summertime joined,
p6bannerbot sets mode: +v Summertime
06:41
robertle joined
06:42
p6bannerbot sets mode: +v robertle,
aindilis left
06:50
jmerelo joined,
p6bannerbot sets mode: +v jmerelo,
vrurg left
06:56
Kaiepi left
06:57
spycrab0 left,
Kaiepi joined,
p6bannerbot sets mode: +v Kaiepi
|
|||
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 | ||
07:08
lindylex left
07:09
khronosschoty1 joined,
p6bannerbot sets mode: +v khronosschoty1
07:10
khronosschoty1 left
07:13
hph^ joined
07:14
p6bannerbot sets mode: +v hph^,
scimon joined
07:15
p6bannerbot sets mode: +v scimon
07:24
aborazmeh left
07:33
El_Che_ is now known as El_Che
07:56
sftp left,
sftp joined,
p6bannerbot sets mode: +v sftp
08:02
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
08:04
dogbert11 left
08:07
Ven` joined,
p6bannerbot sets mode: +v Ven`
08:10
AlexDaniel left
08:16
janus18 joined
08:17
p6bannerbot sets mode: +v janus18,
dakkar joined
08:18
p6bannerbot sets mode: +v dakkar
08:21
samebchase joined
08:22
p6bannerbot sets mode: +v samebchase,
janus18 left
08:26
lutki_ joined,
lutki_ left
08:30
Ven` left
08:31
Ven` joined,
p6bannerbot sets mode: +v Ven`
08:32
aindilis joined
08:33
p6bannerbot sets mode: +v aindilis
08:44
aindilis left,
aindilis` joined
08:45
p6bannerbot sets mode: +v aindilis`
08:56
l0de4 joined
08:57
p6bannerbot sets mode: +v l0de4
08:58
l0de4 left
08:59
sins- joined
09:00
sins- left,
obserd joined,
c1nil left,
c1nil joined,
p6bannerbot sets mode: +v obserd
09:01
p6bannerbot sets mode: +v c1nil
09:02
obserd left
09:07
kerframil left
|
|||
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 | ||
09:11
lizmat joined
09:12
p6bannerbot sets mode: +v lizmat,
lizmat_ joined
09:13
p6bannerbot sets mode: +v lizmat_
09:14
lizmat__ joined
09:15
p6bannerbot sets mode: +v lizmat__
09:16
lizmat left,
dp37 joined,
dp37 left,
lizmat_ left
09:17
lizmat joined,
p6bannerbot sets mode: +v lizmat
09:18
lizmat__ left
09:19
xinming left
09:25
xinming joined
09:26
p6bannerbot sets mode: +v xinming
09:27
sena_kun joined
09:28
p6bannerbot sets mode: +v sena_kun
09:29
pmurias joined,
p6bannerbot sets mode: +v pmurias
09:35
b2gills left
09:37
Kaiepi left
09:38
sena_kun left,
b2gills joined
09:39
p6bannerbot sets mode: +v b2gills,
sena_kun joined
09:40
p6bannerbot sets mode: +v sena_kun
09:45
lichtkind left
09:58
DarthGandalf left
09:59
jmerelo left
10:20
Ven` left
10:34
HeinzBoettjer joined
10:35
p6bannerbot sets mode: +v HeinzBoettjer,
HeinzBoettjer left
10:42
[particle] joined,
badpixel10 joined
10:43
badpixel10 left,
p6bannerbot sets mode: +v [particle]
10:44
[particle]1 left,
Zx36 joined,
p6bannerbot sets mode: +v Zx36
10:45
Zx36 left
10:48
Kaiepi joined
10:49
p6bannerbot sets mode: +v Kaiepi
|
|||
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 | |
10:52
zakharyas left
|
|||
Kaiepi | oh | 10:54 | |
11:01
[particle] left
11:02
statisfiable6 joined,
p6bannerbot sets mode: +v statisfiable6
11:03
[particle] joined
11:04
p6bannerbot sets mode: +v [particle]
11:15
blackberry9900 joined
11:16
p6bannerbot sets mode: +v blackberry9900
11:17
[particle]1 joined,
Ven` joined,
[particle] left,
p6bannerbot sets mode: +v [particle]1
11:18
p6bannerbot sets mode: +v Ven`
11:21
lizmat left
11:22
Ven` left
11:24
blackberry9900 left
11:25
blackberry9900 joined,
p6bannerbot sets mode: +v blackberry9900
11:29
[particle]1 left
11:35
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
lizmat | weekly: www.facebook.com/groups/perl6/perm...877331093/ | 11:43 | |
notable6 | lizmat, Noted! | ||
11:57
aindilis` left
11:58
[particle] joined,
p6bannerbot sets mode: +v [particle]
12:01
lizmat left
12:03
lizmat joined
12:04
p6bannerbot sets mode: +v lizmat
12:05
jmerelo joined
12:06
astj joined,
p6bannerbot sets mode: +v jmerelo
12:07
p6bannerbot sets mode: +v astj
12:09
blackberry9900 left
12:11
FROGGS_ left,
FROGGS_ joined
12:12
p6bannerbot sets mode: +v FROGGS_
12:14
FROGGS_ left,
FROGGS_ joined
12:15
p6bannerbot sets mode: +v FROGGS_
|
|||
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 | ||
12:20
Ven` joined
12:21
p6bannerbot sets mode: +v Ven`
12:27
zakharyas joined
12:28
p6bannerbot sets mode: +v zakharyas
|
|||
Geth | ¦ doc: JJ self-assigned Undocumented :translate-nl option to Str.encode github.com/perl6/doc/issues/1233 | 12:39 | |
12:44
jmerelo left
12:47
eponym joined,
p6bannerbot sets mode: +v eponym
12:50
epony left
13:00
astj left
13:11
lichtkind joined,
p6bannerbot sets mode: +v lichtkind
|
|||
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) | ||
13:16
vrurg joined,
p6bannerbot sets mode: +v vrurg
13:21
Hoosilon25 joined,
Hoosilon25 left
|
|||
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 | |||
13:27
w_richard_w joined
|
|||
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 | |
13:28
alexghacker left,
p6bannerbot sets mode: +v w_richard_w
|
|||
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 | |
13:29
kaare_ joined
|
|||
lichtkind | haha | 13:30 | |
13:30
p6bannerbot sets mode: +v kaare_
|
|||
lichtkind | masak, but im glad to hear you have family | 13:30 | |
masak | yes, and it's a nice family | 13:31 | |
13:32
molaf joined
13:33
p6bannerbot sets mode: +v molaf
13:34
scimon left
13:35
scimon joined,
p6bannerbot sets mode: +v scimon,
alexghacker joined
13:36
p6bannerbot sets mode: +v alexghacker
13:42
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
13:43
p6bannerbot sets mode: +v aborazmeh
|
|||
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 | |
13:58
curan left
|
|||
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 | |
14:06
CIAvash left,
mww113 joined
14:07
p6bannerbot sets mode: +v mww113,
mww113 left
14:10
aborazmeh left
|
|||
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 | |
14:16
skids joined
14:17
p6bannerbot sets mode: +v skids
14:18
jeromelanteri joined,
p6bannerbot sets mode: +v jeromelanteri
14:20
atk10 joined
14:21
p6bannerbot sets mode: +v atk10,
atk10 left
14:22
FROGGS_ left
14:23
FROGGS_ joined
14:24
p6bannerbot sets mode: +v FROGGS_
|
|||
SmokeMachine | but `Defaults on compound attribute types not yet implemented`... :( | 14:24 | |
14:25
jeromelanteri left
14:28
eponym is now known as epony
|
|||
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 | |
14:38
rorx19 joined
14:39
p6bannerbot sets mode: +v rorx19
14:41
rorx19 left
14:42
FROGGS_ left
14:43
FROGGS_ joined,
p6bannerbot sets mode: +v FROGGS_
14:44
Roamer` joined,
p6bannerbot sets mode: +v Roamer`
14:48
sauvin left
|
|||
masak | I have non-zero exit statuses in 4 spectest files. been a while since I had that, IIRC. | 14:49 | |
14:55
nebuchadnezzar left,
FROGGS_ left
|
|||
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 | ||
14:55
FROGGS_ joined
|
|||
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 | |
14:56
p6bannerbot sets mode: +v FROGGS_
|
|||
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 :) | ||
15:00
sauvin joined,
p6bannerbot sets mode: +v sauvin
|
|||
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 :) | ||
15:16
kerframil joined,
p6bannerbot sets mode: +v kerframil
15:21
Ven` left,
AlexDaniel joined
15:22
AlexDaniel left,
AlexDaniel joined,
p6bannerbot sets mode: +v AlexDaniel
15:23
Ven` joined
15:24
p6bannerbot sets mode: +v Ven`
15:29
jmerelo joined
15:30
p6bannerbot sets mode: +v jmerelo
|
|||
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 | |||
15:34
araraloren joined
15:35
p6bannerbot sets mode: +v araraloren
|
|||
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 | |||
15:50
robertle left
|
|||
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 | ||
15:50
aindilis joined
|
|||
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 | ||
15:51
p6bannerbot sets mode: +v aindilis
|
|||
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 | |||
15:58
Sgeo_ joined
15:59
spycrab0 joined,
p6bannerbot sets mode: +v spycrab0,
jwheare21 joined,
p6bannerbot sets mode: +v Sgeo_,
p6bannerbot sets mode: +v jwheare21
16:00
jwheare21 left,
Sgeo left
16:07
tktech10 joined,
tktech10 left
|
|||
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 | |
16:12
robertle joined,
p6bannerbot sets mode: +v robertle
|
|||
araraloren | Seems like the code works now, but need refactor, thanks #perl6 :) | 16:17 | |
16:17
araraloren left
16:18
molaf left
16:22
GigabytePro21 joined
16:23
p6bannerbot sets mode: +v GigabytePro21,
TreyHarris left
16:24
GigabytePro21 left
16:26
Ven` left
16:32
scimon left,
dakkar left,
tadzik joined
16:33
p6bannerbot sets mode: +v tadzik
16:36
nebuchad` joined,
lizmat left
16:37
p6bannerbot sets mode: +v nebuchad`,
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris,
dogbert17 joined
16:38
p6bannerbot sets mode: +v dogbert17
16:39
nebuchad` is now known as nebuchadnezzar
16:40
kerframil left
16:49
w_richard_w left
16:52
FROGGS_ left,
FROGGS_ joined
16:53
p6bannerbot sets mode: +v FROGGS_
17:17
jmerelo left
17:18
hami joined,
p6bannerbot sets mode: +v hami
17:19
Sgeo_ left,
Sgeo joined
17:20
p6bannerbot sets mode: +v Sgeo
|
|||
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. | |||
17:21
hami left
17:23
deetwelve5 joined
17:24
deetwelve5 left
17:30
Lord_of_Life16 joined
17:31
p6bannerbot sets mode: +v Lord_of_Life16
17:35
molaf joined,
Lord_of_Life16 left
17:36
p6bannerbot sets mode: +v molaf,
borsin5 joined,
borsin5 left
|
|||
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) | |||
17:54
zakharyas left
18:05
tomaw joined,
p6bannerbot sets mode: +v tomaw
18:15
brand012 joined,
brand012 left
18:17
AlexDaniel left
|
|||
pmurias | Juerd: no, it's would need support on the VM level (or be implemented using NativeCall) | 18:24 | |
18:26
johnjohn101 joined,
p6bannerbot sets mode: +v johnjohn101
18:27
sauvin left
18:37
FROGGS_ left,
FROGGS_ joined
18:38
p6bannerbot sets mode: +v FROGGS_
18:51
Woodi left
|
|||
Juerd | Thanks | 19:06 | |
johnjohn101 | hi perl6 people | ||
pmurias | johnjohn101: hi | 19:14 | |
johnjohn101 | haven't heard much from perl 6 land | 19:15 | |
19:17
molaf left
19:18
skids left
|
|||
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 | |
19:22
lex joined
|
|||
johnjohn101 | i just want to know if it's getting faster | 19:22 | |
Juerd | It is | ||
19:22
p6bannerbot sets mode: +v lex
19:23
TreyHarris left
|
|||
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. | ||
19:24
lex is now known as lindylex
|
|||
Xliff | $ perl6 -Ilib t/01-widget.t | 19:26 | |
Failed to register: Timeout was reached | |||
^^ Anyone know what that means? | |||
19:27
eponym joined,
p6bannerbot sets mode: +v eponym
19:28
NeddySeagoon27 joined
19:29
p6bannerbot sets mode: +v NeddySeagoon27
19:30
epony left
19:33
NeddySeagoon27 left,
FROGGS_ left,
FROGGS_ joined
19:34
p6bannerbot sets mode: +v FROGGS_
19:37
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
|
|||
Xliff | Anyone know why perl6 is doing this? | 19:40 | |
19:40
[particle] left
|
|||
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 | ||
19:42
[particle] joined
19:43
p6bannerbot sets mode: +v [particle]
20:20
submain joined
20:21
p6bannerbot sets mode: +v submain
|
|||
moritz doesn't even know what repo Xliff's question relates to | 20:21 | ||
20:24
submain left
20:27
lizmat joined,
p6bannerbot sets mode: +v lizmat
20:31
hph^ left
|
|||
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/ | |||
20:37
Zoffix joined
20:38
p6bannerbot sets mode: +v Zoffix
|
|||
Xliff | OK. I will let you know how that works. | 20:38 | |
Thanks! | |||
sena_kun | np | ||
20:38
rindolf left
|
|||
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» | ||
20:49
molaf joined,
[particle] left
20:50
p6bannerbot sets mode: +v molaf
|
|||
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! | ||
20:58
hph^ joined,
hph^ left
20:59
hph^ joined,
hph^ left,
Zoffix left,
hph^ joined,
hph^ left
21:00
hph^ joined,
hph^ left,
hph^ joined,
hph^ left,
hph^ joined,
hph^ left
21:01
pmurias left
21:03
Zoffix joined,
p6bannerbot sets mode: +v Zoffix
21:04
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
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 | ||
21:09
johnjohn101 left,
supercool25 joined
21:10
supercool25 left,
johnjohn101 joined
21:11
p6bannerbot sets mode: +v johnjohn101
21:12
Bkid27 joined,
Bkid27 left
21:14
Zoffix left
21:17
kerframil joined,
p6bannerbot sets mode: +v kerframil
21:20
pmurias left
21:21
Death91620 joined
21:22
p6bannerbot sets mode: +v Death91620
21:23
Death91620 left
21:26
PityDaFool joined,
PityDaFool is now known as Guest50244
21:27
p6bannerbot sets mode: +v Guest50244
21:31
Guest50244 left
21:37
lindylex left
|
|||
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 | |
21:48
kybr joined,
p6bannerbot sets mode: +v kybr
21:49
johnjohn101 left
|
|||
masak | Zoffix: trying again | 21:52 | |
21:56
pmurias joined
21:57
p6bannerbot sets mode: +v pmurias
21:59
pmurias left
22:01
pmurias joined,
benjikun joined
22:02
p6bannerbot sets mode: +v pmurias,
p6bannerbot sets mode: +v benjikun
|
|||
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 | ||
22:07
molaf left
|
|||
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 | |
22:21
pmurias left
22:23
pmurias joined
22:24
p6bannerbot sets mode: +v pmurias,
pmurias left
22:31
a3f_ left,
a3f joined,
a3f left,
a3f joined,
p6bannerbot sets mode: +v a3f
22:32
p6bannerbot sets mode: +v a3f
22:48
[particle] joined,
p6bannerbot sets mode: +v [particle]
22:52
robertle left
22:55
PotatoGim_ joined,
p6bannerbot sets mode: +v PotatoGim_
22:57
blocked10 joined
22:58
jdv79_ joined,
steven2 joined,
Hor|zon_ joined,
p6bannerbot sets mode: +v blocked10,
ponbiki_ joined,
blocked10 left,
p6bannerbot sets mode: +v jdv79_,
p6bannerbot sets mode: +v steven2,
p6bannerbot sets mode: +v Hor|zon_
22:59
p6bannerbot sets mode: +v ponbiki_
23:01
MilkmanD1n joined,
p6bannerbot sets mode: +v MilkmanD1n
23:02
lizmat left,
MilkmanDan left,
abraxxa left,
jdv79 left,
nuclearsandwich left,
Hor|zon left,
go|dfish left,
PotatoGim left,
PotatoGim_ is now known as PotatoGim
23:04
reportable6 left,
yoleaux left,
perlawhirl joined
23:05
reportable6 joined,
perigrin joined,
p6bannerbot sets mode: +v perlawhirl,
p6bannerbot sets mode: +v reportable6,
nativecallable6 left,
benchable6 left
23:06
p6bannerbot sets mode: +v perigrin,
statisfiable6 left,
bisectable6 left,
shareable6 left
23:07
shareable6 joined,
p6bannerbot sets mode: +v shareable6
23:10
kerframil left
23:11
go|dfish joined,
p6bannerbot sets mode: +v go|dfish
23:12
abraxxa joined
23:13
p6bannerbot sets mode: +v abraxxa
23:16
sena_kun left
23:19
JoseyWales joined
23:20
p6bannerbot sets mode: +v JoseyWales
23:23
benjikun left
|
|||
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 | |
23:58
MilkmanD1n is now known as MilkmanDan
|
|||
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! |