ยปรถยซ 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. |
|||
Xliff_ | m: my @a["a"] = 1; @a.gist.say | 00:00 | |
camelia | Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3โ5a' (indicated by โ) in block <unit> at <tmp> line 1 |
||
Xliff_ | Well, there goes THAT commit message. | ||
24c8e172f Make 'my @a["a"]' a bit more awesome | 00:01 | ||
Could someone explain? :) | |||
mornfall | so a LAST within the whenever for the supply i do not want to wait for | ||
jnthn | mornfall: Yes | 00:02 | |
Also if you're multiple different supplies you want to treat this way, you can probably factor it out into a sub | 00:03 | ||
mornfall | no worky :\ | 00:08 | |
i have both a QUIT and a CATCH in the react and (some) exceptions still kill the program | 00:09 | ||
00:09
felher joined
|
|||
jnthn | mornfall: Dunno, I need to sleep now, I can have a look at it some more another time if you've a small reproduction of the problem. | 00:09 | |
mornfall | 'a react block:g nnnn in (the block with the QUIT + CATCH) died because of the exception' | ||
00:10
p6bannerbot sets mode: +v felher,
felher left
|
|||
Xliff_ | Why is this an error? | 00:13 | |
Calling pango_font_map_list_families(Pango::Raw::Types::PangoFontMap, NativeCall::Types::CArray[NativeCall::Types::CArray[NativeCall::Types::Pointer[Pango::Raw::Types::PangoFontFamily]]]) will never work with declared signature (Pango::Raw::Types::PangoFontMap $fontmap, NativeCall::Types::CArray[NativeCall::Types::CArray[NativeCall::Types::Pointer[Pango::Raw::Types::PangoFontFamily]]] $families) | |||
Or have I been working with this code too long? | |||
As far as I can tell, those signatures match. | 00:14 | ||
00:20
mowcat left
|
|||
Xliff_ | Oh hell. | 00:21 | |
Pointer[repr('CPointer')]] throws that error? | |||
00:35
FieldsaBB joined
00:36
p6bannerbot sets mode: +v FieldsaBB
00:58
FieldsaBB left
01:23
ryn1x joined
01:24
p6bannerbot sets mode: +v ryn1x
01:37
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke
01:38
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
timotimo | oh damn you, wordpress | 02:02 | |
it ate a bunch of stuff in scimon's post | |||
well, really only the <d> from the infix:<d> definitions | 02:05 | ||
02:38
evalable6 left,
finanalyst joined
02:39
p6bannerbot sets mode: +v finanalyst
02:42
evalable6 joined
02:43
p6bannerbot sets mode: +v evalable6
02:49
zacts joined,
p6bannerbot sets mode: +v zacts
02:50
vike1 joined
02:51
p6bannerbot sets mode: +v vike1,
vike left
02:52
leont left
03:19
ufobat_ left
|
|||
ryn1x | . | 03:22 | |
buggable | New CPAN upload: Graphics-TinyTIFF-0.0.2.tar.gz by RYNIX modules.perl6.org/dist/Graphics::Ti...cpan:RYNIX | 03:24 | |
Xliff_ | timotimo: Can you nativecast a Blob[uint8] to a CArray[uint8] and vice versa? | 04:01 | |
I know you can use NativeCall::Blob to convert between the two, but would rather a cast be possible. | |||
Would prefer to bind the CArray to the Blob, really. | 04:02 | ||
04:08
Cabanoss- joined,
p6bannerbot sets mode: +v Cabanoss-
04:09
molaf joined,
p6bannerbot sets mode: +v molaf
04:10
Cabanossi left
04:11
ufobat joined
04:12
p6bannerbot sets mode: +v ufobat
04:14
TreyHarris left
04:16
mowcat joined
04:17
p6bannerbot sets mode: +v mowcat
04:34
liamr4c left
04:36
TreyHarris joined,
p6bannerbot sets mode: +v TreyHarris
04:37
lookatme_q left
04:38
lookatme_q joined,
p6bannerbot sets mode: +v lookatme_q
04:39
liamr4c joined,
p6bannerbot sets mode: +v liamr4c
04:40
ryn1x left
|
|||
Xliff_ | m: use NativeCall; my $c = CArray[uint8].new(1, 2, 3, 4); my $b = nativecast(Blob[uint8], $a); $b.^name.say | 04:50 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$a' is not declared at <tmp>:1 ------> 3 3, 4); my $b = nativecast(Blob[uint8], 7โ5$a); $b.^name.say |
||
Xliff_ | m: use NativeCall; my $c = CArray[uint8].new(1, 2, 3, 4); my $b = nativecast(Blob[uint8], $c); $b.^name.say | ||
camelia | Internal error: unhandled target type in sub nativecast at /home/camelia/rakudo-m-inst-1/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 680 in block <unit> at <tmp> line 1 |
||
04:55
kktt joined
04:56
p6bannerbot sets mode: +v kktt,
molaf left
05:00
zacts left
05:22
MasterDuke left
05:24
daotoad joined
05:25
p6bannerbot sets mode: +v daotoad
05:45
robertle left
05:47
lookatme_q left,
lookatme_q joined
05:48
p6bannerbot sets mode: +v lookatme_q
05:49
curan joined,
p6bannerbot sets mode: +v curan
|
|||
holyghost | I've got an argument list with byte arrays working for my C++ perl6, it's based on Objective-C's NSData | 05:51 | |
05:54
w_richard_w joined
05:55
p6bannerbot sets mode: +v w_richard_w
06:17
daotoad left,
daotoad joined
06:18
p6bannerbot sets mode: +v daotoad
06:20
jmerelo joined,
p6bannerbot sets mode: +v jmerelo
|
|||
jmerelo | releasable6: status | 06:20 | |
yoleaux | 18 Dec 2018 21:02Z <moritz> jmerelo: would you find something like gist.githubusercontent.com/moritz/...aving.pod6 helpful in the p6 docs? | ||
releasable6 | jmerelo, Next release will happen when it's ready. 0 blockers. 85 out of 85 commits logged | ||
jmerelo | .tell To tell you the truth, it might be better if you used a real example. If you interpret A, B and C as statements, it might be a bit confusing, because when using that module, A and C are going to run at runtime, B at compile time... The general idea is OK, though... | 06:25 | |
yoleaux | jmerelo: I'll pass your message to To. | ||
holyghost | hi jmerelo, see above | 06:27 | |
hello btw | |||
jmerelo | hi, seeing it now | 06:28 | |
holyghost | I've put some more work into my C++ perl6, it's called UnterPaganPerl6 | 06:29 | |
jmerelo | UnterPagan? | 06:30 | |
holyghost | I'd be glad to make another implementation in full STL | ||
from there | |||
it's a prototype | |||
jmerelo | perl6 is mostly implemented in Perl6. The virtual machine, MoarVM, is implemented in C. | 06:31 | |
holyghost | I know, I have made some classes for vm, architecture etc, it's all in its beginning stages | 06:32 | |
I want to port it to several architectures, it's more a compiler than something else | 06:33 | ||
jmerelo | holyghost: before you go any further, you might want to consider the fact that it took 15 years for a lot of people to take Perl6 from the beginning stages to the Christmas release. | ||
holyghost | ok | ||
06:34
domidumont joined
|
|||
holyghost | I want to use the OOP | 06:34 | |
jmerelo | holyghost: so you might want to pursue other venues that might take you closer to fruition. | ||
06:34
p6bannerbot sets mode: +v domidumont
|
|||
holyghost | of perl6 to make a full OO implementation | 06:34 | |
sorry, | 06:35 | ||
I mean I will only implment OO stuff from perl6 | |||
then people can go on from there | |||
I know there's a standard however | |||
06:35
lookatme_q left
06:36
lookatme_q joined
|
|||
jmerelo | For instance, to write documentation and examples for github.com/theholyghost2/Bayes-Learn, move the code to lib/Bayes/Learn.pm (which is the customary way of doing it), adding continuous integration to the repo, write tests for all functions... | 06:36 | |
06:37
p6bannerbot sets mode: +v lookatme_q
|
|||
holyghost | I'll do that in the future | 06:37 | |
jmerelo | There's 007 by masak too github.com/masak/007 Extremely interesting, experimental language. | ||
holyghost | ok, I'll put it on my list | 06:39 | |
06:40
robertle joined
06:41
p6bannerbot sets mode: +v robertle
06:42
nelsonhb joined
06:43
p6bannerbot sets mode: +v nelsonhb
|
|||
buggable | New CPAN upload: PDF-Class-0.3.3.tar.gz by WARRINGD modules.perl6.org/dist/PDF::Class:cpan:WARRINGD | 06:44 | |
holyghost | HAND jj, I'm afk for while | 06:48 | |
06:49
Cabanoss- left
|
|||
jmerelo | holyghost: see you! | 06:49 | |
06:50
Cabanossi joined
06:51
p6bannerbot sets mode: +v Cabanossi
06:56
eseyman left
07:01
woolfy joined,
woolfy left
07:04
eseyman joined,
p6bannerbot sets mode: +v eseyman
07:08
domidumont1 joined
07:09
p6bannerbot sets mode: +v domidumont1,
jmerelo left
07:11
domidumont left
07:12
alixir12 joined
07:13
p6bannerbot sets mode: +v alixir12
07:15
andrzejku joined
07:16
p6bannerbot sets mode: +v andrzejku
07:17
w_richard_w left
07:18
alixir12 left
07:26
sno left
07:34
rindolf joined
07:35
p6bannerbot sets mode: +v rindolf
07:45
sno joined,
p6bannerbot sets mode: +v sno
07:55
rindolf left
08:00
robertle left
08:03
nadim_ joined
08:04
p6bannerbot sets mode: +v nadim_
08:07
rindolf joined,
dct joined,
p6bannerbot sets mode: +v dct
08:08
p6bannerbot sets mode: +v rindolf
08:10
dogbert17 left
08:16
domidumont1 left
08:33
robertle joined,
p6bannerbot sets mode: +v robertle
08:38
nadim_ left,
finanalyst left
08:40
finanalyst joined
08:41
p6bannerbot sets mode: +v finanalyst
08:43
robertle left
08:55
domidumont joined
08:56
p6bannerbot sets mode: +v domidumont
08:57
cjkinni left,
cjkinni joined
08:58
p6bannerbot sets mode: +v cjkinni
08:59
kktt left
09:00
daotoad left
09:02
dakkar joined,
p6bannerbot sets mode: +v dakkar
09:05
aindilis left
09:14
robertle joined,
sno left,
aindilis joined,
p6bannerbot sets mode: +v robertle
09:15
p6bannerbot sets mode: +v aindilis
09:16
sno joined
09:17
p6bannerbot sets mode: +v sno
09:19
mowcat left
09:33
zakharyas joined
09:34
p6bannerbot sets mode: +v zakharyas
09:35
zakharyas1 joined,
p6bannerbot sets mode: +v zakharyas1
09:37
zakharyas left
09:46
aindilis left
09:53
tobs` joined
09:54
p6bannerbot sets mode: +v tobs`
|
|||
ufobat | whenever i do something in perl6 i find something that is not competly satisfying me | 10:12 | |
jnthn | I get that with pretty much every language/technology. :) | 10:14 | |
ufobat | when i started with perl5 the reason why i wasnt happy was alywas "me being stupid" | 10:15 | |
10:15
averna joined
|
|||
ufobat | now i do PR and issues :-) | 10:15 | |
but i still feel stupid :-) | 10:16 | ||
10:16
p6bannerbot sets mode: +v averna
|
|||
jnthn feels like his brain already left for Christmas vacation this week... :) | 10:17 | ||
ufobat | 2 more days of work still left for me :-) | 10:18 | |
i am on vacation till 6th Jan! | |||
10:18
averna left,
lookatme_q left
10:19
lookatme_q joined
|
|||
jnthn | Don't think I'll be off until the 6th, but yeah, next week I certainly am :) | 10:19 | |
10:20
p6bannerbot sets mode: +v lookatme_q
|
|||
ufobat | hope you will enjoy it! | 10:21 | |
my wife and my 2 children are going home to my moms house for a few days, there will be way to less space for each of us. lets see who first gets anoyed. ;) | 10:22 | ||
buggable | New CPAN upload: IoC-0.0.3.tar.gz by UFOBAT modules.perl6.org/dist/IoC:cpan:UFOBAT | 10:24 | |
ufobat | buggable++ :) | 10:25 | |
tbrowder | jmerelo: i think one way to get p6pod parser only, per jnthnโs thoughts, might be to split the pod grammar/actions into PodGrammar.nqp and PodActions.nqp (which are already there) and then another tool chain/grammar can use that common code for parsing without all of the current p6 code. | 10:27 | |
llfourn | o/ #perl6! is there a way in the language to make :D the default on class attributes and/or sub params? | 10:30 | |
10:31
uvelichitel joined,
uvelichitel left
|
|||
jnthn | m: use parameters :D; sub foo(Int $x) { }; foo(Int) | 10:33 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> use parameters not yet implemented. Sorry. at <tmp>:1 ------> 3use parameters :D7โ5; sub foo(Int $x) { }; foo(Int) |
||
jnthn | No :) | ||
But that's how it'll look once somebody implements it :) | 10:34 | ||
llfourn | jnthn: heh thanks. I thought I remembered this being a TODO a while ago :) | ||
I've been writing a lot of rust recently and not knwoing whether things will be defined gives me a weird feeling in my stomach now :\ | 10:35 | ||
jnthn | It's one of those things that I know I could worry about in theory, but rarely bites me in practice. | 10:37 | |
llfourn | nod. I think I just have to let go of that feeling and only use :D when I actually want to do a runtime check. | 10:41 | |
lizmat | jnthn: about implementing use parameters :D | 10:44 | |
isn't that just a matter of having "use parameters :D" set a dynamic variable and have the parameter parsing look at that ? | 10:45 | ||
jnthn: or am I missing something (less) obvious ? | 10:46 | ||
10:46
domidumont left
|
|||
jnthn | Well, devil will be in the details | 10:48 | |
What does `Str @foo` mean under that pragma? | |||
Geth | gtk-simple: aed9855fb9 | (Jonathan Stowe)++ | 2 files The GTK::Simple::TextView.text needs an 'is rw' to work Fixes #87 |
||
10:49
Cabanossi left,
kurahaupo joined,
aindilis joined
10:50
p6bannerbot sets mode: +v kurahaupo,
andrzejku_ joined,
Cabanossi joined,
p6bannerbot sets mode: +v aindilis,
Averna joined,
p6bannerbot sets mode: +v andrzejku_
10:51
p6bannerbot sets mode: +v Cabanossi,
p6bannerbot sets mode: +v Averna,
Averna left
10:52
Averna joined,
finanalyst left,
p6bannerbot sets mode: +v Averna,
andrzejku left,
andrzejku_ is now known as andrzejku
10:53
finanalyst joined
|
|||
lizmat | jnthn: I assume sub a(Str @foo) ? I guess Positiona[Str:D] ? | 10:53 | |
*Positional | |||
10:53
p6bannerbot sets mode: +v finanalyst
|
|||
jnthn | Or is it Positional:D[Str] ? | 10:54 | |
Note that since these are nominal types, the array being passed would have had to been declared as an Array[Str:D] to match if we take the Positional[Str:D] | |||
lizmat | indeed.... so I guess even more "useless" than it is nonw | 10:55 | |
*now | |||
10:57
finanalyst left
10:58
finanalyst joined
|
|||
jnthn | How is it useless now? | 10:58 | |
But yes, it would maybe put a bit too much of a burden on the caller, if folks already think having to be consistent with what they pass is a burden now | |||
10:58
p6bannerbot sets mode: +v finanalyst
10:59
Averna left,
Averna joined
11:00
Averna left
|
|||
lizmat | m: sub a(Str @a) { dd @a }; a <a b c d> # jnthn people repeatedly think that should work | 11:01 | |
camelia | Type check failed in binding to parameter '@a'; expected Positional[Str] but got List ($("a", "b", "c", "d")) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
lizmat | m: dd List ~~ Positional[Str] | 11:03 | |
camelia | Bool::False | ||
lizmat | m: dd List[Str] ~~ Positional[Str] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> List cannot be parameterized at <tmp>:1 ------> 3dd List[Str]7โ5 ~~ Positional[Str] |
||
lizmat | now, if we could parameterize List *and* <a b c d> would codegen as a List[Str], we'd be in business | 11:04 | |
jnthn | Except all the ways we'd be out of business :) | ||
lizmat | well, yeah | 11:05 | |
jnthn | Tests like `is-deeply $foo.bar(), <a b c d>` for example would suddenly start failing. | ||
lizmat | there's that :-) | 11:06 | |
but that problem exists even without 'use parameters :D' | |||
so I'd not consider that a detail of this particular feature | 11:07 | ||
ufobat | jnthn, lizmat what do you both say for not having any specs/roast-tests regarding %?RESOURCES ? | 11:10 | |
lizmat | ambivalent: feel that we should have tests for the standard CUR implementations that are provided with rakudo | 11:11 | |
ufobat | my worries are not having no tests for the implementation, but more not having a defined interface and expected behaviour. | 11:14 | |
jnthn | We probably should have some on %?RESOURCES; the CUR details need more careful thought/discussion, and are probably in the same camp as the MOP (e.g. we move cautiously, and don't try to spec every detail) | ||
11:28
nadim_ joined
11:29
p6bannerbot sets mode: +v nadim_
|
|||
El_Che | ::::::::;;;@=;<ยดยดยดยดรกรกรกรกmร ``ร $$-- | 11:30 | |
ufobat | m: ::::::::;;;@=;<ยดยดยดยดรกรกรกรกmร ``ร $$-- | 11:33 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Name component may not be null at <tmp>:1 ------> 3::7โ5::::::;;;@=;<ยดยดยดยดรกรกรกรกmร ``ร $$-- |
||
11:38
sno left
11:44
dogbert17 joined
11:45
p6bannerbot sets mode: +v dogbert17
11:48
finanalyst left
11:49
finanalyst joined,
p6bannerbot sets mode: +v finanalyst
|
|||
moritz | after working with python "mixins" (basically just lean classes + multi inheritance) a bit, I can say without a doubt that I prefer Perl 6 roles :-) | 11:51 | |
11:57
lucasb joined,
p6bannerbot sets mode: +v lucasb
12:02
finanalyst left
12:05
fluca1978 joined
12:06
p6bannerbot sets mode: +v fluca1978
12:13
zakharyas1 left
12:25
nelsonhb left
12:56
robertle left
12:59
fluca1978 left
13:28
reach_satori left
13:33
MorayJ joined
13:34
p6bannerbot sets mode: +v MorayJ
13:44
robertle joined,
p6bannerbot sets mode: +v robertle
14:00
finanalyst joined,
p6bannerbot sets mode: +v finanalyst
14:04
zakharyas joined,
p6bannerbot sets mode: +v zakharyas
14:09
kensanata joined,
p6bannerbot sets mode: +v kensanata
14:40
molaf joined,
p6bannerbot sets mode: +v molaf
14:58
molaf left,
nadim_ left
15:11
curan left,
molaf joined
15:12
p6bannerbot sets mode: +v molaf
|
|||
buggable | New CPAN upload: Tomtit-0.0.6.tar.gz by MELEZHIK modules.perl6.org/dist/Tomtit:cpan:MELEZHIK | 15:14 | |
15:23
finanalyst left
15:26
sena_kun joined
15:27
melezhik joined,
p6bannerbot sets mode: +v melezhik,
p6bannerbot sets mode: +v sena_kun
15:28
domidumont joined
15:29
p6bannerbot sets mode: +v domidumont
15:35
Sgeo_ joined
15:36
p6bannerbot sets mode: +v Sgeo_
15:38
Sgeo left
15:43
zakharyas left
15:44
pyrimidine joined
15:45
p6bannerbot sets mode: +v pyrimidine
15:46
hythm_ joined,
p6bannerbot sets mode: +v hythm_
|
|||
hythm_ | p6: my @A; my $b; class C { has @.a; multi method new (:@A) { say 'new1'; self.bless(:@A) }; multi method new (:$b) { say 'new2';self.bless(a => @$b) } }; C.new: :$b | 15:47 | |
camelia | new1 | ||
hythm_ | Should not this dispatch to the second new method? | ||
timotimo | named arguments only work as tie-breakers | ||
and since named arguments are optional by default, either one of them is fine | 15:48 | ||
15:48
lizmat left
|
|||
timotimo | so it'll just take the first one that's defined | 15:48 | |
hythm_ | Aah, makes sense, so just mark them as requured ir use pisitional args. Right? | 15:49 | |
Sorry for typo, (using phone) | |||
melezhik | how do I read a single line from stdout ? lines()? | ||
sena_kun | last? | ||
but, get is better, I think | 15:50 | ||
hythm_ | s/requured/required/ | ||
sena_kun | also prompt. :) | ||
m: say prompt('Ehehe? '); | |||
camelia | Ehehe? ยปWann treffen wir drei wieder zusamm?ยซ | ||
sena_kun | m: my $a = get; say $a; | 15:51 | |
camelia | ยปWann treffen wir drei wieder zusamm?ยซ | ||
sena_kun | also: | ||
m: for lines() -> $a { say $_; last; } | |||
camelia | (Any) | ||
melezhik | get() works fine, thanks! | ||
sena_kun | m: for lines() { .say; last; } | 15:52 | |
camelia | ยปWann treffen wir drei wieder zusamm?ยซ | ||
melezhik | prompt is good too! | 15:53 | |
sena_kun | :) | ||
16:10
rindolf left
16:11
rindolf joined
16:12
p6bannerbot sets mode: +v rindolf,
hythm_ left
16:13
jmerelo joined
16:14
p6bannerbot sets mode: +v jmerelo
|
|||
jmerelo | releasable6: status | 16:21 | |
releasable6 | jmerelo, Next release will happen when it's ready. 0 blockers. 85 out of 87 commits logged | ||
jmerelo, Details: gist.github.com/466dc6dd3eb9ce5901...0a460bdb81 | |||
16:22
MorayJ left
16:28
sno joined
16:29
p6bannerbot sets mode: +v sno
|
|||
dakkar | how bad an idea is it, to use nqp::serialize to store data to disk? | 16:40 | |
I have a (rather large) data structure, that I keep in memory for speed | 16:41 | ||
I'd like it to be kept on disk as well, so I don't have to regenerate it at the next startup of the program | |||
Xliff_ | dakkar: Is it in a module? | ||
timotimo | serialization also has dependencies and such | ||
16:42
Xliff_ is now known as Xliff
|
|||
dakkar | I've seen github.com/FROGGS/p6-Ser/blob/master/lib/Ser.pm | 16:42 | |
timotimo | if you generate the data at compile time with BEGIN, it'll land in the precomp file if it's a module | ||
dakkar | it's runtime data, though | ||
Xliff | Yeah. ^^ That's where I was going. | ||
dakkar | www.thenautilus.net/cgit/MaildirIn...m6?h=bayes โ this thing | 16:43 | |
it's an index of a set of mailboxes | |||
with ~250k messages to scan, I'd like to avoid rebuilding it each time | 16:44 | ||
timotimo | what is it, not regenerate every startup, or must be regenerated all the time? :) | ||
dakkar | โบ | ||
I'll add a "this file was last seen at $time", so I can do a quick scan via stat and update it once it's been loaded | 16:45 | ||
most email messages don't move around while the program is not running | 16:46 | ||
or, if you prefer, updating the structure is quick, building it from scratch is slow | |||
let me start againโฆ | 16:47 | ||
I have this data structure I want to store on disk | 16:48 | ||
the serialisation format is not particularly important, as long as it's quick and not too large | |||
nqp::serialize seems a sensible choice to me, but I don't know enough to be sure | |||
opinions? | 16:49 | ||
jnthn | dakkar: Are you already aware that anything you serialize that way will be invalidated when you, for example, upgrade your Perl 6 version? | ||
s/version/implementation/ | 16:50 | ||
dakkar | "implementation" as in, switch from Moar to JVM? | ||
jnthn | No | ||
Just install a new version of Rakudo | |||
Oh, but that'll do it also :) | |||
timotimo | i'd recommend going with JSON::Fast or MessagePack (whichever one is used in moar's remote debugger library) | ||
jnthn | I'd avoid using nqp::serialize, though. It's built specifically to help support module precompilation. | 16:53 | |
dakkar | jnthn: interesting. I had mis-estimated the stability of the serialisation | ||
so, the format is stable, but the representations of the objects I store may not be | |||
timotimo: I'll have to see how slow those are โบ | 16:54 | ||
jnthn | Well, you'll end up with cross-references to types in CORE.setting | ||
And because nothing in Perl 6 has an absolute name, there's no way to write any kind of dynamic linking | 16:55 | ||
dakkar | ouch | ||
jnthn | So everything just references by index in another table. | ||
Which, given what we need for precomp, is totally fine. | |||
dakkar | so any change in core invalidates all serialised objects | ||
jnthn | Yes. | 16:56 | |
And CORE is linked against other bits of the compiler, so any change there too :) | |||
Xliff | dakkar: If everything can be stored as records, might be easiest just to build a set of repr('CStructs') and use C to write/read from disk. | ||
jnthn | Precomp is just cache, so none of this is a problem: we can regenerate them whenever we need. But that's not so useful for serialization in general :) | 16:57 | |
dakkar | Xliff: I'm not *that* desperate for speed (yet) ๐ | ||
jnthn: (tangential) is there any risk, when deserialising something built from a different rakudo, to get out different objects, without realising? | |||
Xliff | dakkar: Not talking speed, really. Thinking more about stability. | 16:58 | |
If JSON won't work for you, something like that is probably the next way to go, unless you come up with your own serialization format. | |||
Perl5 had Storable, but that was XS-backed. | 16:59 | ||
dakkar | hmm. do I want to write a Perl6 Serial ?โฆ | 17:00 | |
Sereal, even | |||
Xliff | Well, if you have idea's. I'll throw my hat into the ring to help. ;) | ||
jnthn | dakkar: No, or at least, you'd have to be incredibly unlucky | 17:02 | |
(Like, SHA-1 collision unlucky) | |||
dakkar | jnthn: good enough ๐ | ||
Xliff | My eyes are definitely going bad. I first thought that smiley had fangs. | 17:03 | |
dakkar | get a better font ๐ฆ | 17:08 | |
Xliff | Now that's just being cheeky. | ||
:) | |||
dakkar | emojipedia.org/vampire/ | 17:09 | |
and with that, I'll disappear (last workday for two weeks!) | 17:10 | ||
as someone said, have an appropriate amount of fun | |||
17:11
dakkar left
17:13
reach_satori joined
17:14
p6bannerbot sets mode: +v reach_satori
|
|||
jmerelo | Did you check out today's advent calendar entry on interactive desktop apps? perl6advent.wordpress.com/2018/12/...ktop-apps/ | 17:19 | |
.seen tobs | 17:20 | ||
yoleaux | I saw tobs 18 Dec 2018 17:52Z in #perl6: <tobs> beats me | ||
Xliff | .seen scimon | 17:23 | |
yoleaux | I saw scimon 12 Dec 2018 16:38Z in #perl6: <scimon> Neat. | ||
17:26
kensanata left
|
|||
tobs` | jmerelo: the post is in the works, will be ready in due time. | 17:28 | |
jmerelo | tobs`: great :-) Checking, just in case :-) | ||
m: say $*PID, $*PID.perl | 17:31 | ||
camelia | 2857228572 | ||
Altreus | anything in p6 or on the roadmap like decorators in other languages? A syntactic construct that wraps a function around another function or method? | 17:39 | |
tadzik | maybe traits are what you're looking for? | 17:40 | |
Altreus | I was thinking, maybe I could adorn all my methods that return promises, to also create another method that awaits the original one | ||
tadzik | sub foo is route('/bar') { } like in Flask | ||
Altreus | hey I didn't actually think of that | ||
sub foo is Promising { } | 17:41 | ||
jmerelo | Altreus: You can just use functions as any other variable, no special syntax to wrap a function around another. You just do it. | ||
Altreus | can you give an example before I say something silly? :) | ||
jmerelo | Altreus: there's also this docs.perl6.org/routine/%E2%88%98 for function composition | 17:42 | |
Altreus | I'm just thinking that in python you do @somefunction\ndef anotherfunction: ... | ||
jmerelo | Altreus: which is not nice at all. | 17:43 | |
Altreus | ah, antipattern is it | ||
I'm also a fan of answers like this :) | |||
tadzik | every time I teach this I start by explaining that it's just anotherfunction = somefunction(anotherfunction) | ||
jmerelo | you can use f โ g or simply call one from the other | ||
Altreus | can I do that to define a method? sorry if I'm being thick | 17:44 | |
I'm just trying to find the nicest way of reducing boilerplate | |||
I'd like to have counterpart methods to everything that returns a Promise, to provide versions that await it | |||
jmerelo | m: sub foo ( $whatever ) { $whatever*2 }; sub bar ($whatever) { $whatever / 2 }; my $id = foo โ bar; say $id(333) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix โ instead. at <tmp>:1 ------> 3tever) { $whatever / 2 }; my $id = foo โ7โ5 bar; say $id(333) |
||
tadzik | hmm | ||
Altreus: I'd go for a metaclass that dupes all the methods that return a Promise | 17:45 | ||
Altreus | that sounds scary but learnable | ||
jmerelo | m: sub foo ( $whatever ) { $whatever*2 }; sub bar ($whatever) { $whatever / 2 }; my $id = &foo โ &bar; say $id(333) | ||
camelia | 333 | ||
Altreus | I played with metaclasses a little bit when I read the code for one of the orms | ||
tadzik | so, at class composition time: inspect every method you have, if it returns a promise, plug in a new one that awaits the old one | ||
. o O ( can you have metaroles? ) | |||
Geth | doc: 05cd7b6efa | (JJ Merelo)++ | doc/Language/variables.pod6 Improving the page by (slight) rewriting |
17:46 | |
synopsebot | Link: doc.perl6.org/language/variables | ||
17:51
captain-adequate joined
17:52
p6bannerbot sets mode: +v captain-adequate
18:01
jmerelo left
18:02
melezhik left
18:09
oftl left
|
|||
SmokeMachine | m: multi trait_mod:<is>(Routine $r, :$promising) { my &orig := $r.clone; $r.wrap: -> |c { start { orig |c } } }; sub bla is promising { sleep 1; 42 }; my $a = bla; say $a; say await $a | 18:10 | |
camelia | Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Planned) 42 |
||
18:13
ponbiki left
18:22
zakharyas joined
18:23
p6bannerbot sets mode: +v zakharyas
18:26
lucasb left
18:33
sauvin left
18:34
nadim_ joined
|
|||
SmokeMachine | Altreus: ^^ | 18:35 | |
18:35
p6bannerbot sets mode: +v nadim_
18:40
sno left
18:42
sno joined
18:43
p6bannerbot sets mode: +v sno,
markjreed joined
18:44
sno left,
p6bannerbot sets mode: +v markjreed
19:10
zakharyas left
19:11
Scimon joined
19:12
p6bannerbot sets mode: +v Scimon
|
|||
Scimon | Hi | 19:12 | |
19:16
nadim_ left,
Scimon left
|
|||
SmokeMachine | hi! | 19:17 | |
19:19
sno joined,
oftl joined
|
|||
Kaiepi | i ordered the wrong type of ram bro my machine... | 19:19 | |
there is'tn and emoji that escpresses my rage | |||
tadzik | I feel your pain | ||
19:19
p6bannerbot sets mode: +v sno
|
|||
tadzik | I fought my new ram sticks for like a week | 19:19 | |
19:20
p6bannerbot sets mode: +v oftl
|
|||
tadzik | I ended up downclocking them to 2100, otherwise they randomly reboot my system | 19:20 | |
Kaiepi | i think i can gvie it as a preent | ||
19:23
lizmat joined,
p6bannerbot sets mode: +v lizmat
19:24
nadim joined
19:25
p6bannerbot sets mode: +v nadim
19:36
markjreed left
19:42
markjreed joined
19:43
p6bannerbot sets mode: +v markjreed
19:44
Sgeo__ joined
|
|||
Geth | doc: 6bee0a45cc | Coke++ | doc/Language/variables.pod6 whitespace |
19:45 | |
synopsebot | Link: doc.perl6.org/language/variables | ||
19:45
p6bannerbot sets mode: +v Sgeo__
19:48
Sgeo_ left
19:58
ponbiki joined,
p6bannerbot sets mode: +v ponbiki
20:02
zakharyas joined
20:03
p6bannerbot sets mode: +v zakharyas
|
|||
tony-o | m: sub r { say "x"; }; &r.wrap({ say "wrap"; callsame; }); r; | 20:10 | |
camelia | wrap x |
||
20:12
markjreed left
|
|||
Xliff | m: sub r { say "x"; }; &r.wrap({ say "wrap"; callsame; }); | 20:16 | |
camelia | ( no output ) | ||
Xliff | tony-o: Where is wrap documented? | 20:17 | |
SmokeMachine | m: multi trait_mod:<is>(Routine $r, :$promising) { my &orig := $r.clone; $r.wrap: -> |c { Promise.start: &orig.assuming: |c } }; sub bla($int) is promising { sleep $int div 10; $int }; my $a = bla 42; say $a; say await $a | ||
camelia | Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Planned) 42 |
20:18 | |
tony-o | Xliff: docs.perl6.org/type/Routine#method_wrap | ||
Xliff | Thanks. | ||
SmokeMachine | docs.perl6.org/routine/wrap | ||
Kaiepi | i can't wait until my grant progoposal getps approved or denied | 20:27 | |
lizmat | Kaiepi: don't expect that to happen this year... | 20:34 | |
20:34
Actualeyes joined
|
|||
jnthn | Kaiepi: I've been looking over it so I can give feedback. One thing that's not clear: will IO::Socket::Async get all of the features (UNIX sockets, raw sockets, sending descriptors, etc.) that are proposed? Also, where do you see breaking changes being needed? | 20:35 | |
20:35
p6bannerbot sets mode: +v Actualeyes
|
|||
lizmat | Kaiepi: voting doesn't start until after the 22nd... and that typically takes weeks... | 20:35 | |
20:40
domidumont left
|
|||
SmokeMachine | Kaiepi: have you added unix sockets to your proposal? | 20:49 | |
Kaiepi | yes | 20:53 | |
the breaking chganges in IO::SOcket::Async has to do paricularlarly with .listen | 20:55 | ||
yes SmokeMachine | |||
Xliff | m: my $c = CArray[uint8].new(0 xx 10000); say now - INIT.now | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Whitespace required after keyword 'INIT' at <tmp>:1 ------> 3y[uint8].new(0 xx 10000); say now - INIT7โ5.now |
||
Xliff | m: my $c = CArray[uint8].new(0 xx 10000); say now - INIT now | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: CArray used at line 1. Did you mean 'Array', 'array'? |
||
Xliff | m: use NativeCall; my $c = CArray[uint8].new(0 xx 10000); say now - INIT now | 20:56 | |
camelia | 0.0387783 | ||
Xliff | m: use NativeCall; my $c = CArray[uint8].new(0 xx 600000); say now - INIT now | ||
camelia | 1.112439 | ||
Xliff | Is there a faster way to initialize a CArray? | ||
timotimo | Kaiepi: does it have to break? wouldn't it be possible to differentiate between .new.listen and .listen? | ||
Xliff | m: use NativeCall; my $c = CArray[uint8].new(0 xx 6000000); say now - INIT now | ||
camelia | 6.44441923 | 20:57 | |
Xliff | m: (640*480).say | 20:58 | |
camelia | 307200 | ||
Kaiepi | m: m: say awaait IO::SocketLLNET.connect: ':host<google.com>, :80port | 21:01 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at <tmp>:1 ------> 3NET.connect: ':host<google.com>, :80port7โ5<EOL> expecting โฆ |
||
21:02
i1nfusion joined,
p6bannerbot sets mode: +v i1nfusion
|
|||
tobs` | Advent #20 is 95% finished. Now I just need 30 small illustrations and maybe something to eat :') | 21:04 | |
Kaiepi | imt not wusre timotimo. which is part so why i wanna disccuss hous best to impolememnet it | 21:06 | |
tbrowder | hi, #perl6 | 21:08 | |
21:09
dct left
21:11
reach_satori left
|
|||
Kaiepi | timotimo, that's not the probme | 21:11 | |
tbrowder | iโm starting to port a p5 module (Date::Calc) and want to (1) preserve the original sub names and signatures as much as possible and (2) offer an alternative set of names and better signatures. | 21:12 | |
21:13
cbk joined,
p6bannerbot sets mode: +v cbk
|
|||
cbk | what version of rakudo will support perl6.d | 21:13 | |
lizmat | 2018.11 and higher default to it | 21:14 | |
is that the answer to your question ? | |||
earlier versions supported it with "use 6.d.PREVIEW" | 21:15 | ||
21:15
zakharyas left
|
|||
tbrowder | question: as a first cut, is there a better way to offer a different sub name other than, say, โsub new-name($arg) { Old_Name($arg); }โ? | 21:15 | |
cbk | well i think it does. now can i just remove my .rakudobrew dir and install 2018.11? | ||
lizmat | cbk: probably, but I'm no rakudobrew expert | 21:16 | |
tbrowder: if they have the same interface, you can: | |||
cbk | lizmat, ok. Thank you. | 21:17 | |
lizmat | m: constant &MAXIMAX = &max; dd MAXIMAX 42,666 # tbrowder | ||
camelia | 666 | ||
tbrowder | lizmat: is there a special place for seeing butterfly modules and progress? | 21:19 | |
lizmat | modules.perl6.org/t/CPAN5 | 21:20 | |
Geth | perl6.org: 033ba3eb27 | (Tom Browder)++ (committed using GitHub Web editor) | source/resources/index.html update bok status |
21:25 | |
tbrowder | never could type... | 21:26 | |
lizmat: thnx, i always forget that, maybe a big butterfly image and link would help | 21:29 | ||
21:30
robertle left
21:39
cbk left
21:44
reach_satori joined
21:45
p6bannerbot sets mode: +v reach_satori
21:50
Possum left
21:52
andrzejku_ joined
21:53
p6bannerbot sets mode: +v andrzejku_,
Sgeo__ left
21:55
andrzejku left,
andrzejku_ is now known as andrzejku
22:12
lucasb joined,
p6bannerbot sets mode: +v lucasb,
daxim left
22:23
tobs` left
22:25
Kaiepi is now known as Highpie
22:27
sena_kun left
22:34
kurahaupo left
22:35
Praise left
22:37
Praise joined,
Praise left,
Praise joined,
p6bannerbot sets mode: +v Praise
22:39
kurahaupo joined
|
|||
AlexDaniel | u: ๐e | 22:39 | |
unicodable6 | AlexDaniel, U+1D452 MATHEMATICAL ITALIC SMALL E [Ll] (๐) | ||
AlexDaniel, U+0065 LATIN SMALL LETTER E [Ll] (e) | |||
22:40
p6bannerbot sets mode: +v kurahaupo,
kybr left
22:41
tobs` joined
22:42
p6bannerbot sets mode: +v tobs`
|
|||
lucasb | eeeeeeeeeeeeeeeeeeee | 22:51 | |
that github repo drama :) | 22:52 | ||
23:02
Possum joined,
p6bannerbot sets mode: +v Possum
23:03
rindolf left
23:09
nadim left
|
|||
AlexDaniel | lucasb: what drama? | 23:11 | |
AlexDaniel can't see any drama | |||
lucasb | AlexDaniel: I was refering to another thing :) linuxwit.ch/blog/2018/12/e98e/ | 23:14 | |
23:15
Highpie is now known as Highpi
|
|||
lucasb | maybe "drama" wasn't the best word. Anyway, just a confusion in GitHub. :) | 23:15 | |
github.com/eeeeeeeeeeeeeeeeeeeeeee...eeeeeeeeee | |||
the repository is archived and we lost the opportunity of putting a Perl 6 version there :D | 23:16 | ||
tobs | Is today's article 20 minutes overdue or 40 minutes underdue? I don't know if I should "Publish immediately" or not. | 23:18 | |
AlexDaniel | tobs: it's 23:27 UTC | 23:27 | |
tobs | phew :) | ||
that gives me time to fix all the instances of "<>" that were swallowed by the converter | 23:28 | ||
AlexDaniel | lucasb: giving users the ability to create long repo names and then falling apart when a repo with a long name is crated. What a shitshow | ||
created* | 23:29 | ||
what's the longest module possible module name in our ecosystem? Should I create module Foo::๐๐๐๐๐๐๐๐๐๐๐ ? | |||
s/module// | 23:30 | ||
23:31
scovit joined,
p6bannerbot sets mode: +v scovit
|
|||
AlexDaniel | I don't feel like doing it today, but it will be a nice addition to the collection: modules.perl6.org/search/?q=foo%3A%3A | 23:31 | |
scovit | Hi, I am playing with the MOP, I am doing something like ClassObject.^add_method("a", -> $x { $x.say }); | 23:32 | |
Does anybody knows how to add a multi? | 23:33 | ||
Juerd | add_multi_method :) | 23:35 | |
AlexDaniel | m: multi foo(Str, Int $x) { say โint multiโ }; multi foo(Str, Str $x) { say โstr multiโ }; Str.^add_method("a", &foo); Str.a(โ42โ); Str.a(โfooโ) | ||
camelia | str multi str multi |
||
AlexDaniel | m: multi foo(Str, Int $x) { say โint multiโ }; multi foo(Str, Str $x) { say โstr multiโ }; Str.^add_method("a", &foo); Str.a(42); Str.a(โfooโ) | ||
camelia | int multi str multi |
||
scovit | Ok, thanks | 23:36 | |
add_multi_method would have been nice and easy to find ;) | 23:37 | ||
AlexDaniel | add_multi_method exists but I'm not sure how to get it work | ||
jnthn | Same as add_method | 23:46 | |
buggable | New CPAN upload: PDF-ISO_32000-0.0.5.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.5.tar.gz | 23:47 | |
jnthn | Oh, but if you're not keeping the MOP contract and calling add_multi_method without a compose call afterwards, it'll have no effect. :) | ||
23:49
Cabanossi left
23:50
Cabanossi joined
23:51
p6bannerbot sets mode: +v Cabanossi
|
|||
timotimo | tobs: i'm a bit late, but it's not the converter that swallows the <>, it's the wordpress editor when you paste in html | 23:56 | |
it thinks you're trying to put html tags in, notices they're invalid, and just removes them ... or something like that? | |||
tobs | timotimo: yeah, I found that out meanwhile. I'm about to complete my proofreading and then I'm going to add all of them again once and for all. | 23:57 | |
The editor goes ">" โ ">" โ "" when you review the article multiple times. | 23:58 |