»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
colomon | timotimo: en.wikipedia.org/wiki/Sierpi%C5%84ski_curve | 00:00 | |
00:02
Alina-malina joined
|
|||
timotimo | i was hoping i could maybe making something animated | 00:05 | |
but first i'll implement about 100000000 methods so that i can draw stuff onto gtk widgets, like the GtkDrawingArea | |||
00:05
thou joined
00:10
dwarring left
|
|||
BenGoldberg | Has anyone written a grammer for C using perl6 grammars? | 00:15 | |
It would be pretty cool if you could parse the header file of some C library, and automatically generate the perl6 bindings. | 00:16 | ||
00:26
virtualsue left
|
|||
cognominal | A grammar good enough to gather the informations necessary for an etags equivalent would be nice | 00:28 | |
00:37
thou left
00:40
hoverboard joined
00:49
daxim left
00:51
thou joined
|
|||
BenGoldberg | Writing it entirely in perl6 is likely to be lots of work... maybe something more like the perl5 module Convert::Binary::C, which uses an open-source C preprocessor library ... | 00:51 | |
cognominal | yea, preprocessor directives don't always align with syntactic boundaries. | 00:56 | |
00:57
btyler joined
|
|||
timotimo | m: sub test(:$foo?) { say $foo.Bool.Int }; test; test :foo(1); test :foo<100>; | 00:58 | |
camelia | rakudo-moar f1b05d: OUTPUT«011» | ||
dalek | k-simple: 3df1d25 | (Timo Paulssen)++ | lib/GTK/Simple.pm6: GTK::Simple::Switch (gtk_switch) |
01:05 | |
k-simple: 330b860 | (Timo Paulssen)++ | lib/GTK/Simple.pm6: widget size request and get_allocated_width/height |
|||
k-simple: b6cb6dc | (Timo Paulssen)++ | lib/GTK/Simple.pm6: first step towards GTK::Simple::DrawingArea |
|||
BenGoldberg | Err, my point is more that it uses an already written library (ucpp), and making a perl interface, rather than writing a C grammar entirely in perl... but that's also important ;) | ||
timotimo | i'd be quite happy if people tried out the gtk-simple stuff | 01:10 | |
01:12
dayangkun joined,
wingfold joined
01:13
FROGGS_ joined
01:14
wingfold_ left,
Sqirrel left
01:17
FROGGS left
01:20
Su-Shee_ joined
01:23
Su-Shee left
01:25
klapperl_ joined
01:29
Sqirrel joined,
klapperl left
01:31
wingfold_ joined
01:35
wingfold left
01:38
woosley joined
01:41
rindolf joined
|
|||
timotimo goes down the rabbit hole of gtk | 01:46 | ||
01:50
hoverboard left
01:53
hoverboard joined
01:55
zengargo1le joined
|
|||
timotimo | panda is still hanging in "installing" in rebootstrap.pl | 01:56 | |
"reinstalling", that is | |||
ren1us | does perl6 have any equivalent for java's "super" keyword or super() constructor call? | 01:57 | |
timotimo | yeah, nextwith/nextsame/callwith/callsame | 01:58 | |
ren1us | awesomeness | 01:59 | |
02:13
wingfold_ left
02:14
wingfold joined
02:18
wingfold left
02:27
SevenWolf joined
02:34
Mouq joined
|
|||
dalek | c/redesign: 4bcefef | Mouq++ | htmlify.p6: Get rid of superstitious .[0] |
02:36 | |
c/redesign: 84eabe7 | Mouq++ | template/header.html: Move search label inside search box |
|||
c/redesign: 766740e | Mouq++ | html/css/style.css: Get rid of space between selected menu item and sub-menu |
|||
c/redesign: 48f8964 | Mouq++ | / (3 files): Realize that index.html isn't being generated properly The really correct way to do it is to turn index.html into an index.pod and find some place to put it |
|||
c/redesign: 123caf2 | Mouq++ | TODO: Add TODO file |
|||
Mouq | (I was offline for a while today) | ||
yoleaux | 15 Jun 2014 11:30Z <pippo> Mouq: I found the solution for irclog.perlgeek.de/perl6/2014-06-10#i_8850807 see irclog.perlgeek.de/perl6/2014-06-15#i_8873951 | ||
Mouq | \o/ pippo++ :) | ||
02:38
thou left
02:40
virtualsue joined
02:42
thou joined
|
|||
Mouq | m: $¢ # -_- | 02:49 | |
camelia | rakudo-moar f1b05d: OUTPUT«===SORRY!=== Error while compiling /tmp/oytTYL24nFUnsupported use of $¢ variableat /tmp/oytTYL24nF:1------> <BOL>⏏$¢ # -_- expecting any of: statement list prefix or term …» | ||
Mouq | std: $¢ | ||
camelia | std 0f2049c: OUTPUT«ok 00:01 122m» | ||
02:50
daxim joined
|
|||
Mouq | std: sub rand (Real $n) { $n.rand }; say rand 15 | 02:50 | |
camelia | std 0f2049c: OUTPUT«===SORRY!===Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/VwYAL8c0kw line 1:------> sub rand (Real $n) { $n.rand }; say rand⏏ 15Parse failedFAILED 00:01 128m» | ||
03:02
daxim left
03:06
colomon left
|
|||
Mouq | m: =pod X<a> | 03:11 | |
camelia | ( no output ) | ||
Mouq | m: EVAL '=pod X<a>\n\nsay $=pod' | ||
camelia | ( no output ) | ||
Mouq | m: EVAL "=pod X<a>\n\nsay $=pod" | ||
camelia | rakudo-moar f1b05d: OUTPUT«» | ||
Mouq | m: EVAL "=pod X<a>\n\nsay $=pod.perl" | ||
camelia | rakudo-moar f1b05d: OUTPUT«Nil» | ||
Mouq | hm? | ||
m: =pod X<a>say $=pod.perl | 03:12 | ||
camelia | rakudo-moar f1b05d: OUTPUT«Array.new(Pod::Block::Named.new(name => "pod", config => ().hash, content => Array.new(Pod::Block::Para.new(config => ().hash, content => Array.new("", Pod::FormattingCode.new(type => "X", meta => Array.new(), config => ().hash, content => Array.new("a")),…» | ||
Mouq | That's segfaulting locally... | ||
Wait, no, that's fine | 03:13 | ||
m: =pod X<a|b,c;d,e>say $=pod.perl | |||
camelia | rakudo-moar f1b05d: OUTPUT«(signal )» | ||
Mouq | r: =pod X<a|b,c;d,e>say $=pod.perl | 03:14 | |
camelia | rakudo-jvm f1b05d: OUTPUT«(timeout)» | ||
..rakudo-moar f1b05d: OUTPUT«(signal )» | |||
..rakudo-parrot f1b05d: OUTPUT«Array.new(Pod::Block::Named.new(name => "pod", config => ().hash, content => Array.new(Pod::Block::Para.new(config => ().hash, content => Array.new("", Pod::FormattingCode.new(type => "X", meta => Array.new(["b", "c"], ["d", "e"]), config => ().hash, con…» | |||
Mouq | parrot++ | ||
That used to work, so I'm pretty sure MoarVM's doing something wrong there | 03:15 | ||
03:16
daxim joined,
dayangkun left
03:20
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
03:29
dayangkun joined
03:30
thou left
|
|||
ren1us | if a method attempts to call another method in the same object instance, and you don't include the self. prefix, shouldn't it see that method as a candidate to call? | 03:31 | |
as in, if i do: class A = { method b = {}; method c = { b; }; }, shouldn't that be legal? | 03:32 | ||
i assume that unless you provide the object instance as a prefix, it only looks for subs | |||
03:33
kaare_ joined
|
|||
ren1us | woops, take out all of the = in that example | 03:34 | |
moarvm is saying b is undeclared (self.b works), and assuming that's not a bug, i would suggest that, in the absence of a matching sub, consider methods | 03:39 | ||
03:47
hoverboard is now known as level_level
03:48
benabik joined
03:49
level_level is now known as hoverboard
03:52
[Sno] left
04:00
simcop2387 left,
mikegrb left
04:01
simcop2387 joined,
mikegrb joined
04:02
geekosaur joined
04:03
sunnavy joined
04:27
kaare_ left
04:32
thou joined
04:48
kaare_ joined
04:49
SamuraiJack joined
04:57
BenGoldberg left
05:13
hoverboard left
05:19
[Sno] joined
05:20
vendethiel left
05:39
btyler left
05:51
cognominal left,
dayangkun left
05:52
cognominal joined
|
|||
Mouq | ren1us: If you want a shorthand by which to call "b", you can use $.b instead. If what you really want is a lexically scoped subroutine, you can just write class A { my sub b {}; method c { b; } } | 05:55 | |
Although I believe "my" is implicit for a sub | |||
m: class A { sub b { 42 } }; say b | 05:56 | ||
camelia | rakudo-moar f1b05d: OUTPUT«===SORRY!=== Error while compiling /tmp/gMTNE268bSUndeclared routine: b used at line 1» | ||
Mouq | Yeah | ||
cognominal | m: class A { sub b { 42 } }; say A.b | 06:00 | |
camelia | rakudo-moar f1b05d: OUTPUT«No such method 'b' for invocant of type 'A' in block at /tmp/X9IPsldoh_:1» | ||
Mouq | .tell timotimo I tried gtk-simple, but on the latest MoarVM it dies with "Attribute $!gtk_widget not declared in class GTK::Simple::Switch at lib/GTK/Simple.pm6:535", which is a bogus error... | 06:12 | |
yoleaux | Mouq: I'll pass your message to timotimo. | ||
Mouq | I've been having a lot of issues with Moar lately... | 06:13 | |
cognominal | I tought redefining a multi function from the setting with a function with the same signature would hide it. I can't yet find the spec part that would confirm or infirm that behavoir. | 06:18 | |
Mouq | cognominal: It does, are you talking about my line with rand above? | 06:19 | |
Because rand is actually a term rather than a multi | 06:20 | ||
m: say rand + 15 | |||
camelia | rakudo-moar f1b05d: OUTPUT«15.3216027729761» | ||
cognominal | no, I am trying to have a slurp test for an URI and load the file in that case. Maybe my code is wrong | ||
06:21
igorsutton joined
|
|||
Mouq | m: sub grep (|anything) { say "Local, unspecific dispatch called" }; grep 1, 2, 3 | 06:22 | |
camelia | rakudo-moar f1b05d: OUTPUT«Local, unspecific dispatch called» | ||
Mouq | m: sub grep (*@a) { say "Local, unspecific dispatch called" }; grep 1, 2, 3 | 06:23 | |
camelia | rakudo-moar f1b05d: OUTPUT«Local, unspecific dispatch called» | ||
Mouq | m: multi grep (|anything) { say "Local, unspecific dispatch called" }; grep 1, 2, 3 | ||
camelia | rakudo-moar f1b05d: OUTPUT«Ambiguous call to 'grep'; these signatures all match::($test, *@values):(Any |anything) in block at /tmp/PlUfXqv05E:1» | ||
Mouq | Ahhh | ||
cognominal: I can't really say without looking at it. I'd be happy to help you more, but I'm heading to bed | 06:24 | ||
06:24
telex left
06:25
thou left
06:26
telex joined
06:27
Mouq left
06:38
kaleem joined,
kaleem left,
kaleem joined
|
|||
cognominal | r: multi sub say(\x) { $*OUT.print("I print what I want\n") }; say('hi'); | 06:38 | |
06:39
anaeem1_ joined
|
|||
camelia | rakudo-parrot f1b05d: OUTPUT«Ambiguous call to 'say'; these signatures all match::(Any \x):(Any \x) in any at gen/parrot/BOOTSTRAP.nqp:1220 in sub say at gen/parrot/CORE.setting:13682 in block at /tmp/tmpfile:1» | 06:39 | |
..rakudo-jvm f1b05d: OUTPUT«Ambiguous call to 'say'; these signatures all match::(Any \x):(Any \x) in any at gen/jvm/BOOTSTRAP.nqp:1212 in block at /tmp/tmpfile:1» | |||
..rakudo-moar f1b05d: OUTPUT«Ambiguous call to 'say'; these signatures all match::(Any \x):(Any \x) in block at /tmp/tmpfile:1» | |||
06:40
FROGGS_ left
06:43
Grrrr joined
06:50
dmol joined
06:53
FROGGS_ joined
|
|||
cognominal | S13 speaks of adding cases to a amulti, not of a definition in UNIT hiding one of the setting, both having same signature. | 07:01 | |
07:03
zakharyas joined
07:16
darutoko joined
07:18
pecastro left,
salv0 joined
07:24
dayangkun joined
|
|||
cognominal | jnthn, should it be possible or not to hide a multi method in a setting by one in UNIT? Currently it says ambiguous call. | 07:25 | |
Timbus | r: multi sub say(\x) is default { $*OUT.print("I print what I want\n") }; say('hi'); | ||
camelia | rakudo-{parrot,jvm,moar} f1b05d: OUTPUT«I print what I want» | ||
cognominal | ho, nice | 07:26 | |
Timbus | should also.. | 07:27 | |
m: multi sub say(\x) is default { $*OUT.print("I print what I want\n"); nextsame; }; say('hi'); | |||
camelia | rakudo-moar f1b05d: OUTPUT«I print what I wantI print what I wanthi» | ||
Timbus | kewl | ||
jnthn | cognominal: write a proto | 07:28 | |
in the scope you want to hide the outer candidates | 07:29 | ||
cognominal | ok, so many way to do it, and I was unable to find any :( | ||
Timbus++, jnthn++ | 07:30 | ||
07:31
denis_boyun_ joined
|
|||
cognominal | is not UNIT a more derived scope than SETTING? | 07:33 | |
ok, it is. That the very point jnthn used in his answer about the proto. | 07:41 | ||
07:52
dayangkun left
07:54
dayangkun joined
07:55
dayangkun left
07:56
dayangkun joined,
dayangkun left
07:57
dayangkun joined
08:00
krunen joined
08:02
spider-mario joined
|
|||
masak | antenoon, #perl6 | 08:05 | |
ren1us: subs are not methods, and introducing syntax which muddles the two together does not feel like a good idea. | 08:07 | ||
ren1us: that said, what you're suggesting (fall back to method lookup when sub lookup fails) is *possible*, and could probably be attempted in a module. | |||
sergot | o/ | 08:08 | |
masak | ren1us: would you expect the semantics to be "look for methods in the surrounding class", or "look for methods using ordinary method lookup (possible in classes in the inheritance chain)" ? | ||
moritz | fwiw we've had such a fallback already, once. It was a bad idea. | 08:13 | |
(or was it from method to sub?) | |||
08:19
dayangkun left
|
|||
masak | hm, wasn't that mediated by some marker or other? | 08:28 | |
masak seems to recall putting a '*' before a routine name in the declaration | |||
moritz | there's 'is export' these days | 08:31 | |
which exports a method as a sub | |||
08:35
kivutar joined
|
|||
masak | in practice, I never use that. | 08:40 | |
methods are methods. | |||
FROGGS_ | a contract is a contract is a contract | 08:41 | |
(but only between Ferengies) | |||
masak | that seems to be the consensus on p5 CPAN as well, where the syntactic distinction between subs and methods isn't even there. | ||
08:42
erkan left,
dayangkun joined,
dakkar joined
08:43
jjk joined
08:45
Su-Shee_ is now known as Su-Shee,
jjk left,
jjk joined
08:46
pecastro joined
08:51
cibs left
08:52
SamuraiJack left
08:59
SevenWolf left
09:07
cibs joined
09:21
igorsutton left
|
|||
FROGGS_ | TimToady: should Buf have a split method? | 09:21 | |
09:22
dayangkun left
09:23
oetiker left,
oetiker joined
09:24
donaldh joined
09:29
dayangkun joined
09:30
fhelmberger joined
|
|||
masak | lizmat: can I remove S17-concurrency-OLD.pod? if not, what's blocking on doing so? | 09:30 | |
or "what is it blockng on?", rather | |||
dalek | ecs: f04f0ab | (Elizabeth Mattijsen)++ | S17-concurrency-OLD.pod: Remove old S17 |
09:33 | |
masak | \o/ | ||
lizmat++ | |||
09:42
dayangkun left
09:46
dmol left
09:47
Psyche^_ joined
09:51
Psyche^ left
09:53
Ven joined
|
|||
masak | r: class Conf { has @.boxes where { all(@$_) >= 0 } }; my $c = Conf.new(:boxes[ 2, 2, -1 ]); say $c.perl | 09:55 | |
camelia | rakudo-{parrot,jvm,moar} f1b05d: OUTPUT«Conf.new(boxes => Array.new(2, 2, -1))» | ||
masak | should this be allowed? | ||
moritz | nope | 09:56 | |
Ven | m: class Conf { has @.boxes where { say @$_.perl; all(@$_) >= 0 } }; my $c = Conf.new(:boxes[ 2, 2, -1 ]); say $c.perl | 09:57 | |
camelia | rakudo-moar f1b05d: OUTPUT«Conf.new(boxes => Array.new(2, 2, -1))» | ||
Ven | masak: It doesn't even look like the `where` is evaluated | ||
dalek | p: 2657b1e | (Elizabeth Mattijsen)++ | tools/build/MOAR_REVISION: Bump MOAR_REVISION |
||
Ven | "make: write error Failed running make install at /Users/foo/.rakudobrew/bin/rakudobrew line 23." Oh :( | 09:58 | |
moritz | "write error" looks like "disc full" to me | ||
Ven | Actually, moar-HEAD doesn't contain a `bin` directory. | ||
ChoHag | If I have three attributes in a class (%.a, %.b, %.c) how can I write a method in which one of the arguments determines which attribute to process the other arguments with? | 09:59 | |
Ven | ChoHag: I'm not sure I understand | ||
moritz | I think ChoHag wants indirect lookup | ||
ChoHag | method bar { eval "say \%.$^a" } achieves it, uglily. | ||
Ven | oh. $a.'arg'; | ||
lizmat | feels to me you need one @.hashes attribute, and an index | ||
moritz | since the attributes are exposed with accessors, you can use self."$name"() | 10:00 | |
masak | what lizmat said. | ||
maybe binding will help here somehow, too. | |||
ChoHag | lizmat: Maybe. I'm not too happy with the design but I want to see where it goes. | ||
moritz | m: class A { has $.a = 42; has $.b = 23; method x ($which) { say self."$which"() } }; A.new.x('b') | 10:01 | |
camelia | rakudo-moar f1b05d: OUTPUT«23» | ||
masak | r: class C { has $.x where * > 0 }; say C.new(:x(-42)).x | ||
camelia | rakudo-{parrot,jvm,moar} f1b05d: OUTPUT«-42» | ||
masak submits rakudobug | |||
ChoHag | moritz: Don't self.foo and %.foo act differently if the attribute is exposed? | ||
moritz | ChoHag: well yes, the % is also a contextualizer | ||
ChoHag: but a % contextualierizer on a % attribute is a no-op | |||
10:02
colomon joined
|
|||
Ven | moritz: not a disc full, I have 200go free. | 10:02 | |
ChoHag | Doesn't self.attribute restrict write access to the attribute as a method caller would? | ||
as it would be to a consumer of the class, I mean. | 10:03 | ||
Ven | `.` is the getter | ||
(and is virtual) | |||
Ven remembers what lizmat told him 'bout this :) | |||
ChoHag doesn't | |||
moritz | ChoHag: yes | 10:04 | |
lizmat | $.foo uses the getter method to fetch the value of the attribute, and is subclassable | ||
moritz | ChoHag: you can try to experiment with ::('$!a') and stuff like that | ||
lizmat | $!foo accesses the attribute directly | ||
moritz | ChoHag: but I don't know if object-scope indirect method notation is implemented | ||
though in the end, you can always go through the MOP | 10:05 | ||
once you have the Attribute object, you can go through bind_value to set things, iirc | |||
(or was it set_value?) | |||
masak | niecza: class C { has $.x where * > 0 }; say C.new(:x(-42)).x | 10:06 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«===SORRY!===Postconstraints, and shapes on variable declarators NYI at /tmp/DuTwCq0lY5 line 1:------> class C { has $.x where * > 0 ⏏}; say C.new(:x(-42)).xUnhandled exception: Check failed …» | ||
masak | at least Niecza knows it can't. | ||
ChoHag | Sorry phone. | 10:07 | |
Hmm. | 10:08 | ||
moritz | .oO( some people have a smart phone, some have a sorry phone ) |
||
masak | sorry phones are the phones of the future, though. | ||
ChoHag | Mine's not so smart. | ||
masak | I'd rather have a phone that's sorry than one that thinks it's smart. | ||
moritz tried to purchase a dumb phone, bought something on ebay for 15euro, and still got something that can ran opera, capture videos, and do all that annoying stuff that drains the battery | 10:09 | ||
ChoHag | The problem is, at a pinch, ssh on the phone is useful. | 10:10 | |
masak | moritz: surely that must be a viable niche market that someone has pounced upon? "buy this phone -- it does next to *nothing*! battery time is *great*!" | ||
ChoHag | Shop where old people shop. | ||
You will eventually anyway. | 10:11 | ||
dalek | kudo/nom: 6dd2e80 | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION: Bump NQP_REVISION |
||
cognominal | moritz, in 10 years, maybe we will have trouble to shop for a dumb watch :) | 10:12 | |
moritz | masak: there's a marked for mobile phones for elderly people | 10:13 | |
masak: somehow I was convinced I'm not their target market. Maybe I'm wrong. | |||
cognominal | I want a watch that only displays time? oh, you can use a watch for that? I use it to monitor my glycemy. | 10:14 | |
ChoHag | Is there a standard idiom to move an entry from one hash to another? | 10:16 | |
cognominal | my father has bought a smart phone. It is shared with my mother which is hermetic to all things digital so she cannot use it. | ||
Ven | Nope, rakudobrew still writeerrors, even with sudo | 10:17 | |
ChoHag | In 5: $x{$foo} = delete $y{$foo}; # I think | ||
Ven | In rakudo's install.txt, the "install only one backend" examples have no --backends= | 10:18 | |
ChoHag | %x{$foo} = %y{$foo}:delete; # ? | 10:19 | |
Ven | Are "short argument names" implemented in rakudo ? | 10:22 | |
cognominal | Ven: I think you mean by that a degenerated use of subsignature | 10:27 | |
masak | moritz: old people kinda have a point in this case | 10:29 | |
cognominal | m: > sub hi( :who(:w $w)) { say $w }; hi(:w<Ven>); hi(:who<Ven>) | 10:32 | |
camelia | rakudo-moar f1b05d: OUTPUT«===SORRY!=== Error while compiling /tmp/lUXjIR243VPreceding context expects a term, but found infix > insteadat /tmp/lUXjIR243V:1------> >⏏ sub hi( :who(:w $w)) { say $w }; hi(:» | ||
cognominal | m: sub hi( :who(:w $w)) { say $w }; hi(:w<Ven>); hi(:who<Ven>) | ||
camelia | rakudo-moar f1b05d: OUTPUT«===SORRY!=== Error while compiling /tmp/sE_pvF5tEIMalformed parameterat /tmp/sE_pvF5tEI:1------> sub hi( :who(⏏:w $w)) { say $w }; hi(:w<Ven>); hi(:wh expecting any of: statement list …» | ||
10:42
Pleiades` left
10:45
jnthn joined
10:47
Pleiades` joined
10:49
rindolf left
|
|||
Ven | Why do I get a write error on `make`, srsly >_> | 11:00 | |
Oh, it actually works. | 11:01 | ||
tadzik | ahahaha, DSON | 11:02 | |
yoleaux | 14 Jun 2014 05:55Z <thou> tadzik: Do you have any feedback on github.com/tadzik/panda/pull/80 ? | ||
tadzik | xfix++ | ||
oh! | |||
xfix .oO( nice, I get extra karma for absolutely nothing ) | 11:03 | ||
Ven | xfix: for dson ;) | ||
in META.info, version has to be x.y.z or * ? | |||
dalek | nda: da6558d | (Tim Smith)++ | / (2 files): Define make-default-ecosystem in Panda::App Enable Panda::App to be used by other tools to set up the same ecosystem that bin/panda uses. |
11:05 | |
nda: 035ffc6 | (Tim Smith)++ | / (3 files): Rename '.work' to '.panda-work' |
|||
nda: 2714f9f | tadzik++ | / (4 files): Merge pull request #80 from softmoth/master Factor out make-default-ecosystem() for external scripts |
|||
tadzik | Ven: I don't think we ever specified that | 11:06 | |
11:06
Pleiades` left
|
|||
Ven | tadzik: mmh. I'd like to know to make a xyz tool | 11:06 | |
tadzik sort of expected github.com/xfix/Acme-DSON/blob/master/META.info to be in DSON | |||
xfix | tadzik: wouldn't work. | ||
Otherwise, I would do that. | |||
tadzik | I know it can't be, but that'd be hilarous nonetheless | 11:07 | |
especially after seeing the README | |||
Ven | It could be, then compiled ;) | 11:09 | |
11:11
Pleiades` joined
11:13
dmol joined
|
|||
xfix | tadzik: I originally planned README.md, like I do in my other projects, but I decided to make plain text file that is DSON itself, because the module itself is a joke anyway. | 11:13 | |
Ven | tadzik: github.com/xfix/Acme-DSON/pull/1 | 11:16 | |
xfix | Ven: not valid DSON. | ||
Object literals end with 'wow'. | |||
Ven | xfix: fixed already | 11:17 | |
xfix | Merged. | ||
Also, it seems that DSON removed 'next'. | 11:19 | ||
I'll update DSON now. | |||
Ven | xfix++ :D | 11:20 | |
xfix | Done. | 11:22 | |
11:26
wingfold joined
11:27
brrt joined
|
|||
masak | how do I mark the last statement in a routine, in the case it is a statement-modifier for loop, as being the return value? | 11:29 | |
11:29
wingfold left
|
|||
masak | put it in parens? | 11:29 | |
masak consults S04 on this | |||
Ven | masak: statement-modifier for loop ? | ||
masak | Ven: ... if ... for ...; | 11:30 | |
oh, parens is what doctor S04 orders. | |||
or the 'lazy' keyword. | |||
I think I prefer the parens in this case; a bit less obtrusive. | 11:31 | ||
masak is writing a blog post | |||
11:32
kurahaupo joined
|
|||
Ven | m: say foo; sub foo { (1 if True for ^5); } | 11:33 | |
camelia | rakudo-moar f1b05d: OUTPUT«1 1 1 1 1» | ||
Ven | .oO( That's a pretty bad way to write 1 x 5 ) |
11:34 | |
masak | m: say foo; sub foo { 1 if True for ^5 } | 11:35 | |
camelia | rakudo-moar f1b05d: OUTPUT«Nil» | ||
masak | that's what I ran into. | ||
I'm writing fairly FP-ish code, fwiw. | |||
so I guess I had the expectation of implicit return of the (lazy) list. | |||
tadzik | we need dsonlint.com | 11:36 | |
Ven | masak: would be inconsistent with for vs do for | 11:39 | |
masak: FWIW, ruby gets away with it because it doesn't really have a `for` construct | |||
(I mean, gets away with implicit returns everywhere and performance) | 11:40 | ||
CoffeeScript doesn't get away with it and plenty of time we see people add `null` at the end of their functions not to have a `for` loop at the end of the function | |||
masak | that's the situation Perl 6 used to be in before TimToady++ changed the spec. | 11:41 | |
but (especially after what just happened) I realize that this is a damned-if-you-do-damned-if-you-don't kind of design decision. | |||
11:43
SamuraiJack joined
|
|||
Ven | Most definitely. | 11:46 | |
As I said -- Ruby niftily (?) gets away with it because Array#each returns itself. | |||
(In LS, we allow you to prefix your function sigil with ! to remove the implicit return) | 11:47 | ||
11:49
igorsutton joined
11:50
dmdr joined
11:51
spider-mario_ joined,
spider-mario left
11:52
spider-mario_ left
11:55
spider-mario joined
11:56
colomon left
|
|||
masak | just wanted to point out that the REPL currently dies after ~50 evaluations, with the error "Spesh: failed to fix up handlers (-1, 110, 110)" | 12:03 | |
lizmat | better than ~13 :-) | 12:04 | |
Ven | "Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.dylib'" :'( | ||
lizmat wonders whether "is cached" would make sense on a class | 12:05 | ||
Ven | lizmat: on a BUILD, maybe | ||
Anytime I try to access to perl6 outside of my rakudo directory, it blows up | |||
lizmat | well, but then you would have to have a BUILD or new or bless | ||
Ven: gist ? | |||
Ven | lizmat: gist of ? | 12:06 | |
lizmat | the blowup? | ||
Ven | lizmat: "Unhandled exception: failed to load library 'dynext/libperl6_ops_moar.dylib' at <unknown>:1 (/Users/notliz/os/rakudo/perl6.moarvm::303)" | ||
12:07
psch joined
|
|||
psch | hi #perl6 | 12:07 | |
lizmat | psch o/ | ||
Ven: sorry, doesn't ring a bell :-( | |||
Ven | I already had that last time I built rakudo on a debian. | ||
Do I need to have the .dylib in my path or something ? | |||
psch | i found a segfault! | ||
look at RT#69492 | 12:08 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=69492 | ||
psch | *looking | ||
trying to get .name for a anon named segfaults moar | |||
+parameter | |||
masak | yes, definitely better than ~13. | 12:09 | |
psch | additionally, i think the test for the ticket isn't quite sufficient, i.e. even sub foo {} has at least one ':'; but i don't think testing for ':($' instead is much better | ||
Ven | masak: tried both 13 and 50 here, doesn't fail running | ||
Also tried on my windows last time, definitely doesn't blow up at 13. | |||
Here is moar, my windows has parrot. | |||
lizmat | Ven: fwiw, I have some symlinks to perl6 executables in my path, maybe that makes a difference ? | 12:10 | |
Ven | lizmat: Absolutely no clue .. | ||
I'll try and rebuild ... | 12:11 | ||
nope, no luck. | 12:15 | ||
my perl is 5.16, so that didn't blew up. | 12:17 | ||
lizmat | after the Configure, the version of perl5 should really not matter | ||
Ven | I'll reconfigure and remake. | ||
12:18
bebus joined
|
|||
FROGGS_ | masak: "Spesh: failed to fix up handlers (-1, 110, 110)" this was fixed a week ago | 12:18 | |
Ven | FROGGS_: hey -- is your windows build process documented somewhere ? | ||
FROGGS_ | hmmm, maybe it got reintroduced... | ||
Ven: build what? I usually do not build windows itself :o) | 12:19 | ||
12:19
bebus left
|
|||
Ven | FROGGS_: rakudo* | 12:19 | |
FROGGS_ | ahh, star | ||
Ven | FROGGS_: wait, you mean you're not bill gates ? | ||
FROGGS_ | *g* | ||
I have a 10 line walkthrough of the build process, hold on | 12:20 | ||
Ven | Nope, reconfigured, remaked. remakeinstalled. still won't work. | ||
What am I to do if I can't p6 while I'm supposed to work ?! | |||
FROGGS_ | coffee? | 12:21 | |
Ven | FROGGS_: wait, you mean you're not the coffee guy either ? | ||
FROGGS_ | and office sleep should be very healthy also | ||
I am a coffee guy | |||
Ven | FROGGS_: wait, you mean you're not the pillow guy either ? | ||
FROGGS_ | :P | ||
every morning it fells like I should consult my pillow more often | 12:22 | ||
Ven: gist.github.com/FROGGS/b9b848250062860e61de | |||
Ven | FROGGS_: WHIPE rakudo ? Boi, what did this kid do to you ? :P | 12:23 | |
FROGGS_ | Ven: rename it to 'rakudo_' :o) | ||
Ven | FROGGS_: (I was just jokign with WHIPE/WHIP) | 12:24 | |
FROGGS_ | this is for rakudo@parrot star btw, in case you want to build for more just adjust step 6, and forget about step 7 and 8 | ||
hmmm, what word was I thinking of? | |||
Ven | FROGGS_: wipe ? | 12:25 | |
FROGGS_ | ahh, yes! :D | ||
masak | FROGGS_: seems I have a slightly ould Rakudo built. I'll rebuild and see if the problem goes away. thank you. | 12:27 | |
Ven | Don't tell me nobody ever got a dylib missing with moar ? The two times I built it, I got it :o) | 12:28 | |
FROGGS_ | mine is also old, so I cannot test right now | ||
(too many stuff I fiddle right now) | |||
Ven: I've never seen such an error on my linux or windows box :P | 12:29 | ||
so, perhaps these OSes are superior? | |||
Ven | FROGGS_: I got it on linux and osx | 12:30 | |
I'll try building jvm too. | 12:31 | ||
masak | also, if it were up to me, we would hide the output from declaring a sub in the REPL. | 12:32 | |
that makes no-one happy. | |||
Ven | m: sub f {} | 12:33 | |
camelia | ( no output ) | ||
Ven | m: sub f { say 1 } | ||
camelia | ( no output ) | ||
12:33
sqirrel_ joined
|
|||
Ven | masak: ? | 12:33 | |
[Coke] yawns. | 12:34 | ||
masak | Ven: in the REPL. | 12:36 | |
12:36
Vlavv left
|
|||
masak | Ven: not using camelia. | 12:36 | |
Ven will check his REPL when he gets one | |||
Ven fixed his perl 6. | 12:38 | ||
masak | also, while I'm proposing things: I suggest we abolish .gist, and instead make .Str more .gist-like. | 12:39 | |
the (IMO useless) distinction between concatenating values (which uses .Str) and &say-ing values (which uses .gist) is very distracting, and leads to bugs, which leads to sadness. | 12:40 | ||
lizmat | $ ack 'method gist' src/core | wc -l | ||
43 | |||
12:41
dayangkun joined
|
|||
Ven | Now to get panda. | 12:42 | |
12:42
guru joined,
guru is now known as Guest64859
|
|||
[Coke] | masak: +1 from me on eliminating .gist | 12:42 | |
12:42
Guest64859 is now known as ajr_
|
|||
[Coke] | Good luck getting TimToady to agree, however. :) | 12:43 | |
lizmat | fwiw, not many gist methods have identical .Str methods | 12:44 | |
FROGGS_ | hmmmm, but .gist and .Str and a Match are very different | ||
Ven | panda has no versioning ? | 12:46 | |
FROGGS_ | Ven: what do you mean exactly? | ||
Ven | oh, yeah, that story about removing META.info and just using :<ver> ? | ||
masak | maybe some .gist methods have non-identical .Str methods because one of them sucks. | 12:47 | |
note (again) that Python has *one* way to stringify things. essentially .perl, but nicer. | |||
FROGGS_ | Ven: we will always have META.info (META6.info soonish) for distributions | ||
masak | Perl 6 has *three*. (.Str .gist .perl) | ||
moritz | sometimes the .Str method sucks, because it's very often p5 heritage | ||
masak | moritz: which we have partially gotten rid of. | ||
see boolean stringification, for example. | |||
12:48
Vlavv joined
|
|||
masak | used to be 0 and 1. no-one seems to mind that it's now False and True :) | 12:48 | |
FROGGS_ | masak: propose something for Match | ||
masak | FROGGS_: let me think. | ||
m: "foo" ~~ / f (o)* /; say $/.Str; say $/.gist; say $/.perl | 12:49 | ||
camelia | rakudo-moar 6dd2e8: OUTPUT«foo「foo」 0 => 「o」 0 => 「o」Match.new(orig => "foo", from => 0, to => 3, ast => Any, list => ([Match.new(orig => "foo", from => 1, to => 2, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "foo", from => 2, to…» | ||
FROGGS_ | hmmm, perhaps I could live with .Str and .perl for Match | ||
betterworld | masak: python has at least str() and repr() :) | ||
masak | betterworld: oh, troo | ||
moritz | IMHO it would be fine if Match.Str was used on default output, and the .gist still be available | ||
masak | betterworld: but they are often equal, at least for the built-ins. | ||
moritz | for manual calling | ||
FROGGS_ | Match.perl is not very readable though, and Match.gist is the opposite | 12:50 | |
m: say Int.Str; say Int.gist; say Int.perl | |||
camelia | rakudo-moar 6dd2e8: OUTPUT«use of uninitialized value of type Int in string context(Int)Int» | 12:51 | |
FROGGS_ | I want to keep all three :/ | ||
I would be fine if say would use .Str instead of .gist though | |||
12:53
dmdr left
|
|||
moritz | note that 'Int' is available more idiomatically as .^name | 12:59 | |
Ven | `$version ~~ / $<major>=\d '.' $<minor>=\d /; my %h = ($_ => $/{$_}.Int for $/.keys);` isn't there a more elegant way of doing this ? | 13:01 | |
13:02
erkan joined
|
|||
lizmat | make it a Version object? | 13:02 | |
FROGGS_ | moritz: yes, but when I do 'say $something.^name', I don't see the value if it isnt a type object | ||
Ven | That seems really overkill | ||
I don't have any checking with Version, either | 13:04 | ||
lizmat | you were asking more "elegant", that could be overkill :-) | 13:06 | |
awwaiid | if version is so fundamental, maybe we should have $something.^version :) | 13:07 | |
Ven | and I can't modify Version.parts. | ||
lizmat | hmmm... I'm not sure how TimToady would feel about making it mutable | 13:10 | |
13:10
molaf joined
|
|||
Ven | I just resorted to split. | 13:11 | |
13:11
jnap joined
|
|||
moritz | FROGGS_: well, .^name is the shortest way to get the type name, even if it's an instance | 13:12 | |
FROGGS_ | moritz: I know | ||
but want to know from $something is what is inside, so .gist gives me a value if it has one or the typename | 13:13 | ||
that is, I don't want the type name if it has a value | |||
moritz | well, it really depends on the use case | 13:14 | |
there are lots of situations when I'm interested in the type | |||
like, when a dispatch failed | |||
masak | r: say [2, 0] eqv (2, 0) | 13:21 | |
FROGGS_ | False | ||
masak | this just surprised me. expected True. | ||
camelia | rakudo-jvm 6dd2e8: OUTPUT«(timeout)» | ||
..rakudo-{parrot,moar} 6dd2e8: OUTPUT«False» | |||
FROGGS_ | I guess it is because the LHS is an item | ||
Ven | github.com/Nami-Doc/xyz.pm6 It works \o/ | 13:22 | |
./xyz --patch will update your file, commit the change, tag the new version and push the tag | |||
FROGGS_ | such magic! | ||
:D | |||
13:23
flaviusb joined
|
|||
lizmat | shouldn't that be META6.json ? | 13:25 | |
as the default I mean? | |||
Ven | Oh, I broke my perl 6 again. | 13:28 | |
dalek | kudo/nom: 4dd2cc4 | (Elizabeth Mattijsen)++ | tools/build/Makefile-JVM.in: Make sure S17-supply/watch_path.t actually compiles |
||
Ven fixed it again | 13:29 | ||
Not sure how I can go with both a .pl and one with a shebang, though :( | |||
13:29
sqirrel_ left
|
|||
Ven | perl6 is cool for shell scripts, it is. | 13:30 | |
But I should be working at | |||
lizmat | [Coke]: I'm seeing S04-phasers/in-loop.t fail reliably on jvm now: gist.github.com/lizmat/2bbcb4f8799f689da1ff | 13:31 | |
is this something you've seen before? | 13:32 | ||
timotimo | masak: fwiw, python has two ways to stringify things; str and repr | ||
yoleaux | 06:12Z <Mouq> timotimo: I tried gtk-simple, but on the latest MoarVM it dies with "Attribute $!gtk_widget not declared in class GTK::Simple::Switch at lib/GTK/Simple.pm6:535", which is a bogus error... | ||
donaldh | lizmat: I've seen that for a while now. | ||
timotimo | oh, someone else told you that already | ||
lizmat | ah, ok... it;s just that since a long time, I wasn't able to complete the spectest on jvm | 13:33 | |
13:33
FROGGS_ left
|
|||
Ven | Oh, project euler is down | 13:33 | |
timotimo | oh, interesting error | ||
donaldh | lizmat: the in-loop tests are all marked todo but exit ungracefully on JVM so a better fudge might be required. | 13:34 | |
13:35
noganex joined
|
|||
dalek | k-simple: 5b28644 | (Timo Paulssen)++ | lib/GTK/Simple.pm6: fix GTK::Simple::Switch, hopefully |
13:35 | |
13:36
bluescreen10 joined
13:42
FROGGS_ joined
|
|||
FROGGS_ | lizmat: you are right of course # META6.json | 13:43 | |
13:44
psch left
|
|||
masak | Ven: did you know that you can indent the heredocs in Perl 6, so that they follow the indent of the rest of the code? | 13:46 | |
Ven | masak: yes | ||
13:46
psch joined
|
|||
masak | timotimo: yes, betterworld++ pointed that out. that would be like us having .Str and .perl, I guess. | 13:47 | |
13:47
kaleem left
|
|||
masak | Ven: did you also know that a usage message is automatically generated for you? (and there are probably ways to trigger it in your xyz.pl program) | 13:48 | |
Ven | masak: --help can't be generated with %* | ||
masak | you might be better off overriding USAGE, in any case. | ||
Ven | %* catches --help | ||
so no, I can't | 13:49 | ||
FROGGS_ | the normal way would be to add a MAIN(:$help!), MAIN(:$minor!), MAIN(:$major!) and MAIN(:$patch!), | 13:51 | |
masak | well, this one seems to be able to do combinations. is that a feature? | 13:52 | |
13:57
anaeem1_ left
13:58
btyler joined
|
|||
masak | m: my $s = set; $s (|)= 42; say $s | 14:05 | |
camelia | rakudo-moar 6dd2e8: OUTPUT«===SORRY!=== Error while compiling /tmp/BfwH5vp3JDTwo terms in a rowat /tmp/BfwH5vp3JD:1------> my $s = set; $s ⏏(|)= 42; say $s expecting any of: postfix infix stopper inf…» | ||
masak | m: my $s = set; $s = $s (|) 42; say $s | ||
camelia | rakudo-moar 6dd2e8: OUTPUT«set(42)» | ||
14:05
oetiker left
|
|||
masak | something is wrong with the assignment variants of the set operators. | 14:05 | |
14:05
oetiker joined
|
|||
masak | m: my $s = set; $s ∪= 42; say $s | 14:06 | |
camelia | rakudo-moar 6dd2e8: OUTPUT«===SORRY!=== Error while compiling /tmp/eDMlNVCBBNTwo terms in a rowat /tmp/eDMlNVCBBN:1------> my $s = set; $s ⏏∪= 42; say $s expecting any of: postfix infix stopper inf…» | ||
masak | m: my $s = set; $s = $s ∪ 42; say $s | ||
camelia | rakudo-moar 6dd2e8: OUTPUT«set(42)» | ||
masak submits rakudobug | |||
14:08
thou joined,
pdcawley joined
|
|||
lizmat | could it be some internal attribute of the set operators is not correct ? | 14:09 | |
masak | no idea. | ||
so, FIRST doesn't run if there are no iterations. | 14:16 | ||
jnthn | And nor does LAST any more. | ||
masak | which phaser do I use if I want to run even when there are no iterations? | ||
moritz | INIT? | ||
masak | (I want to do an unconditional once-only take in a 'gather for') | 14:17 | |
moritz: trying. | |||
m: say (gather for 1..3 { take $_ }) | |||
camelia | rakudo-moar 6dd2e8: OUTPUT«1 2 3» | ||
masak | m: say (gather for 1..3 { INIT take "OH HAI"; take $_ }) | 14:18 | |
camelia | ( no output ) | ||
masak | o.O | ||
I... | |||
masak submits rakudobug | |||
r: say (gather for 1..3 { INIT take "OH HAI"; take $_ }) | |||
camelia | ( no output ) | ||
..rakudo-parrot 6dd2e8: OUTPUT«take without gather in block at gen/parrot/CORE.setting:533 in block at gen/parrot/CORE.setting:569 in block at /tmp/tmpfile:1» | |||
masak | oh. | ||
Parrot may actually have a point. | |||
moritz | masak: maybe you want gather { take "bla"; for 1..3 { ... } } | 14:19 | |
masak | moritz: yes, that'd work. | ||
moritz: I was just wondering if there is a phaser that does this. | |||
moritz | masak: on 2015-04-01 I'll propose a NORMAL phaser that runs as part of the normal code execution path | ||
masak: or maybe I'll call it BORING | 14:20 | ||
lizmat | r: unless do for (1) { FIRST say "first" } { say "none" } | ||
camelia | rakudo-{parrot,jvm,moar} 6dd2e8: OUTPUT«firstnone» | ||
lizmat | surprised to see the "non" in this case | ||
r: unless do for () { FIRST say "first" } { say "none" } | |||
camelia | rakudo-{parrot,jvm,moar} 6dd2e8: OUTPUT«none» | ||
lizmat | actually, I think a NONE phaser would make sense here | 14:21 | |
for () { NONE say "none" } | |||
masak | moritz: :) | ||
moritz | masak: and the companion phaser BORAT fires mostly at random, and must be written with an additional trailing { | 14:23 | |
[Coke] | lizmat: Trying to find a git grep that will tell me the answer to your question, but sounds like you already found it. | 14:26 | |
donaldh: any more suggestions on preventing the jvm daily roast from failing using the eval server? | |||
masak | moritz: does it still adhere to the '}'-at-end-of-line-ends-statement rule? | ||
14:27
colomon joined
14:28
kaare_ left
|
|||
moritz | masak: well no, otherwise the trailing { would be a statement on its own | 14:29 | |
[Coke] | donaldh: have you any idea how to bundle perl6 in a jar we could invoke from eclipse? | 14:31 | |
donaldh | [Coke]: no, I tried to reproduce your problem, but without any success so far. I may need to create a VM with limited memory to force the same behaviour. | 14:32 | |
[Coke] | donaldh: we can probably get you a login on the roast box to play with. | ||
have you tried using the perl6-roast-data runners to duplicate the issue? | 14:33 | ||
donaldh | [Coke]: Bundling perl6 in a jar would be a fun project. Eclipse lets you deploy plugins that expand on the filesystem so would support the current module loading. A more sophisticated approach would involve module loading using a ClassLoader | 14:35 | |
I could have a go at embedding perl6 for eclipse. Do you have a use case in mind? | 14:36 | ||
[Coke] | ... and I just realized I don't need the jar bundled in eclipse, I could do what I wanted as a standalone thing to start. | 14:37 | |
donaldh: I do coldfusion development for a living. All the editors suck in various ways. I want to make a pretty printer/linter using a perl6 grammar. | |||
so then folks can use whatever they want to edit, but we can all agree on a standard formatting. (by which I mean, I agree, and they conform. :) | |||
I could use something like ANTLR, but perl6 seems much nicer. | 14:38 | ||
14:38
amirite left
|
|||
donaldh | yeah, I agree | 14:38 | |
14:38
[Sno] left
14:39
fhelmberger left
|
|||
[Coke] | I have some crappy tests now written in coldfusion, but they can't handle things like embedded HTML/JS/CSS/SQL | 14:39 | |
(which grammars would also be good for.) | |||
donaldh | This gist was the result of me running the perl6-roast-data runner: gist.github.com/donaldh/57020f86459600eedaa5 | ||
[Coke] | ok, so you're not getting any unexpected failures. | 14:40 | |
donaldh | My next step is to repeat the perl6-roast-data run inside a memory limited vm. | ||
donaldh was thinking of embedding perl6 inside the perl epic editor. | 14:41 | ||
colomon | perlcabal.org down? | ||
lizmat | works for me | ||
however, it is bad need of an update | 14:42 | ||
colomon | huh | ||
14:42
treehug88 joined
|
|||
colomon | looking at github.com/perl6/specs/blob/master...ary/IO.pod at the moment, and it seems pretty okay (and I suspect completely up to date). | 14:42 | |
lizmat | colomon: hmmm...perlcabal.org gives the pugscode.org website | 14:43 | |
some VirtualHost mixup ? | |||
[Coke] | here's more info than I've gotten before: gist.github.com/coke/27f00d0bed4929b8ec1b | ||
^^ donaldh | 14:44 | ||
donaldh | [Coke]: I spent a bit of time over the weekend trying to figure out why the JVM retains so much on the heap during a spectest run. Unfortunately the profiler crashes when I try to use it so I'm having to use blunter tools. | ||
colomon | lizmat: you're right. perlcabal.org is coming out Pugs, and perlcabal.org/syn/ (which is always where I go) is… err, it's back now. :) | 14:47 | |
also seems to be completely up-to-date? | |||
moritz | s/Pugs/Mu | 14:54 | |
/ | |||
donaldh | [Coke]: Yeah, you got a hotspot VM dump that basically says a native alloc failed. | 14:58 | |
lizmat | FROGGS_: is there any reason why CompUnitRepo::Distribution has a .Hash instead of a .hash ? | 14:59 | |
FROGGS_ | lizmat: hmmm, no | 15:00 | |
15:00
erdic joined
|
|||
[Coke] | donaldh: was hoping there was something more interesting in there than that. ah well. :) | 15:02 | |
masak is having a lot of fun solving a mathematical problem in Perl 6 today | |||
15:04
anaeem1 joined
|
|||
Ven | masak: project euler is down tho :( | 15:05 | |
15:06
pecastro left
|
|||
masak | found this problem on Twitter. | 15:07 | |
15:07
anaeem1 left
|
|||
masak | it's been sloshing around in my brain for two days. | 15:07 | |
15:07
anaeem1 joined
15:08
anaeem1 left
15:09
denis_boyun_ left
|
|||
dalek | p/pmc2c_orig: 1aa8cd9 | rurban++ | src/vm/parrot/pmc/ (7 files): pmc2c_orig: optimize 6model pmcs for the new pmc2c Annotate several PMC methods for unneeded or manual GC write barriers. This requires the new pmc2c from parrot 6.5.0 This is 2-4% faster for the nqp testsuite. $ perf stat -r2 prove -r --exec "./nqp-p --vmlibs=nqp_dyncall_ops" t/nqp t/hll t/qregex t/p5regex t/qast t/serialization |
15:13 | |
lizmat | rurban++ for not giving up on rakudo on parrot | 15:14 | |
[Coke] | rurban++ # agreed. | 15:19 | |
masak | rurban++ # the more backends, the better | 15:21 | |
lizmat | FROGGS_: I'm considering renaming CompUnitRepo::Distribution to just Distribution | 15:24 | |
as the Distribution itself does not necessarily have anything to do with CompUnitRepo's just yet | 15:25 | ||
and we might have Distributions without any installed CompUnit's, just consisting of data files et all | |||
FROGGS_ (or anybody else): thoughts? | 15:26 | ||
FROGGS_ | +1 | 15:27 | |
15:31
Ven left
15:32
igorsutton left
15:34
rindolf joined
|
|||
masak | +1 | 15:35 | |
15:39
zakharyas left
15:40
brazuca joined
|
|||
masak | what's the current way to define something to intercept MyType($a, $b, $c) ? | 15:41 | |
lizmat | .wrap ? | 15:42 | |
masak | never mind, I'll just use a sub with a lowercase letter instead. | 15:43 | |
lizmat | or do you mean PARAMETERIZE_TYPE ? | ||
masak | yes, that seems to be what I wanted. lizmat++ | 15:47 | |
but I think my current approach is nicer. | |||
lizmat | PARAMETERIZE_TYPE is not specced, afaik, and a temp hack at best (was my impression) | 15:48 | |
15:51
stux joined
15:52
xinming joined
|
|||
masak | m: class C { method Str { "overridden" } }; say C.new.gist | 15:53 | |
camelia | rakudo-moar 4dd2cc: OUTPUT«C.new()» | ||
15:53
dmol left,
kaare_ joined
|
|||
masak | m: class C { method gist { "overridden" } }; say C.new.Str | 15:53 | |
camelia | rakudo-moar 4dd2cc: OUTPUT«C<140282296048608>» | ||
15:55
xinming_ left
|
|||
dalek | ecs: 480e2ef | (Elizabeth Mattijsen)++ | S22-package-format.pod: Elaborate some more on S22: Describe: - CompUnitRepo specification (e.g. "inst:name<work>:/installed_modules") - Distribution class - %*CUSTOM_LIB - %*INC and other various tweaks, fixes and elaborations |
16:00 | |
lizmat | masak: you're getting the .Str.gist | ||
timotimo | what am i doing wrong if my blog gets most of its hits on each monday before i even posted the weekly post? >_> | 16:02 | |
lizmat | not posting early enough? | ||
actually, I think this is because it's mentioned in Gabor's Perl Weekly mail | |||
16:03
brrt left
|
|||
timotimo | heh :) | 16:03 | |
could be | 16:04 | ||
lizmat | under Weekly collections | 16:05 | |
Beginning of inlining, some GSoC work materializes, DSON encoder/decoder | |||
timotimo | ah, that's last week's | ||
masak | yes, it's got to be because of szabgab++'s newsletter. | 16:10 | |
segomos_ | or people are trying to get back into the swing of work | 16:14 | |
and not working | |||
16:15
denis_boyun_ joined
|
|||
donaldh | timotimo: You said you'd post every Monday. I check during my day but it's usually not posted. | 16:15 | |
timotimo | right | 16:17 | |
16:17
brazuca left
|
|||
betterworld | once the blog post is there, people stop refreshing their browsers | 16:17 | |
timotimo | i should write "monday evening" | ||
donaldh | what TZ are you in? | 16:23 | |
timotimo | GMT+1 i believe; CEST | 16:24 | |
16:24
molaf_ joined
16:25
brrt joined
|
|||
donaldh | Oh okay, evening must stretch pretty late for you ;-) I am in GMT and don't usually see your post until Tuesday. | 16:26 | |
donaldh makes mental note to check for post on Tuesdays | |||
16:26
denis_boyun___ joined
16:27
molaf left
|
|||
donaldh is running rakudo.jvm.sh on a VM with 3GB RAM for [Coke]++ | 16:27 | ||
16:27
denis_boyun_ left
|
|||
timotimo | p6weekly.wordpress.com/?p=180&s...f1b2a1ed81 - feedback much appreciated | 16:28 | |
especially mentions of things i've forgotten | |||
16:29
erkan left
16:33
denis_boyun___ left
|
|||
FROGGS_ | ohh, inline got merged? | 16:33 | |
timotimo | aye | 16:35 | |
and the revisions got bumped, too | |||
16:35
brrt left
|
|||
btyler | "I'ven't", while logical, would probably get you a slap on the wrist from a grammar teacher :) | 16:36 | |
timotimo | i'dn't've decided against it, even if you told me that. | ||
btyler | any news from sergot++'s gsoc work? | 16:39 | |
16:39
jnap left
|
|||
timotimo | no new blog post yet | 16:40 | |
[Coke] | donaldh++ | ||
16:42
dmol joined,
hoverboard joined,
ajr_ left
16:43
guru joined,
guru is now known as Guest62139
16:44
Guest62139 is now known as ajr_,
Rotwang joined
16:45
SamuraiJack left
|
|||
lizmat | timotimo: maybe explain a little more about what is so special about the JIT? | 16:53 | |
that it changes the "return 12 - 6" to machine code (is the way I understand it) | |||
timotimo: maybe add "of the past years" to the mention of dwarring++ 's work ? | 16:54 | ||
timotimo | can do, thanks | 16:55 | |
16:55
amirite joined
16:56
dakkar left
16:57
donaldh left
|
|||
rurban_ | timotimo: you could add that the new parrot release 6.5.0 includes Chirag's work already. "Released with 6.5.0" | 16:59 | |
and all roast spectests pass now (again) on parrot | 17:00 | ||
timotimo | ah, great! | ||
tadzik | timotimo: | ||
oh, I was going to mention I'ven't too | |||
timotimo | why the hate for i'ven't? | 17:01 | |
rurban_ | parrot added also namealiases for control chars, which went away with ICU 5.2 | ||
lizmat | rurban_: does that mean we need to bump nqp's PARROT_REVISION ? | ||
tadzik | it looks like something between Elvish and Cthulu fhtagn | ||
however you write the latter :) | |||
timotimo | rurban_: we do 100% of the spectests on parrot with 6.5.0? | ||
rurban_ | not yet. not yet released officially. tomorrow | ||
I pushed a roast pull request to FROGGS, with that it passes. | 17:02 | ||
lizmat | ok, will test after release then :-) | ||
timotimo | oke! :) | ||
17:02
SamuraiJack joined
17:03
jnap joined
|
|||
rurban_ | I will remove the namealias skips on the spectests also. Currently disabled because of ICU madness | 17:03 | |
17:04
flaviusb left,
brrt joined,
brrt left
|
|||
timotimo | going to publish now | 17:04 | |
lizmat | timotimo++ | 17:05 | |
dalek | kudo/nom: fc9dcee | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local (3 files): Introduce CompUnitRepo.short-id |
17:07 | |
17:07
ajr_ left
|
|||
timotimo | FROGGS_: it'd be pretty excellent if there'd be a guide/example/blogpost about the thing where scripts installed via panda (or something) can differentiate between different installed versions and stuff | 17:08 | |
you know what i mean, right? | |||
even though i fail at expressing it %) | |||
dalek | kudo-star-daily: 9ff98d1 | coke++ | log/ (13 files): today (automated commit) |
17:10 | |
kudo-star-daily: 30f02b2 | coke++ | log/ (14 files): today (automated commit) |
|||
rl6-roast-data: 9a69a12 | coke++ | / (6 files): today (automated commit) |
|||
rl6-roast-data: da46d70 | coke++ | / (6 files): today (automated commit) |
|||
kudo/nom: 7e66d3e | (Elizabeth Mattijsen)++ | / (5 files): Part 1 CUR::Distribution -> Distribution migration |
17:14 | ||
17:14
SamuraiJack left
|
|||
ChoHag | How can I create a class (or role?) which calls a method when an instance of the class is used in a string/numeric/etc (the Cool types) context? | 17:15 | |
timotimo | well, at least .Str can just be used as a method | 17:16 | |
otherwise there's .Numeric, .Real, .Num, .Int and .Bool | |||
lizmat | method Numeric for + context | ||
method Bool for ? context | |||
timotimo | ah, numeric is the right one? | ||
lizmat | m: say $*USER; say +$*USER; say ~$*USER | 17:17 | |
camelia | rakudo-moar 4dd2cc: OUTPUT«p6eval (1005)1005p6eval» | ||
lizmat | Numeric is the one I use in src/core/Process.pm | ||
17:18
denis_boyun_ joined
|
|||
psch | m: for 1,2,3, { say 3 } # RT#66776; this throws Comp::Group - i've replaced the one Comp::AdHoc with a narrower type (which sits in a PR now) but i'm wondering if it should just not throw Comp::Group? | 17:21 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=66776 | ||
camelia | rakudo-moar 4dd2cc: OUTPUT«===SORRY!===Expression needs parens to avoid taking the blockat /tmp/dpdNaCFi7L:1------> for 1,2,3, { say 3 }⏏ # RT#66776; this throws Comp::Group - iMissing block (apparently taken by expression)at /tm…» | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=66776 | ||
ChoHag | So just provide those few functions which call (variations on) my foo method? | ||
psch | m: class A { method Numeric { 5 }; method Str { "five" }; method Bool { False } }; my A $a .= new; say +$a; say ~$a; say so $a # practical example for ChoHag | ||
camelia | rakudo-moar 4dd2cc: OUTPUT«5fiveFalse» | ||
ChoHag | thankyou | ||
dalek | kudo/nom: 6ca805d | (Elizabeth Mattijsen)++ | src/core/Distribution.pm: Part 2 CUR::Distribution -> Distribution migration |
17:22 | |
17:28
jnap left,
jnap joined
|
|||
psch | i think it does need the Comp::Group for the missing block case at least, if only for the cursor position for pointing to where the block is missing and which expression took it... | 17:31 | |
17:32
denis_boyun_ left
|
|||
lizmat | ah, ok | 17:32 | |
merging | |||
dalek | kudo/nom: ec27142 | (Pepe Schwarz)++ | src/ (2 files): Added X::Syntax::BlockTaken and use it from the Grammar. |
||
kudo/nom: 09134a7 | lizmat++ | src/ (2 files): Merge pull request #280 from peschwa/nom Added X::Syntax::BlockTaken and use it from the Grammar. |
|||
lizmat | psch++ | ||
psch | lizmat: i had $.what as 'Expression' and no ternary, but that means the caller has to hand in "Function" for the other case | 17:33 | |
lizmat | yeah, got that now :-) | ||
I had misread :-) | |||
psch | alright, thanks for merging | ||
i'll push the tests | |||
dalek | kudo/nom: aaa82dd | (Elizabeth Mattijsen)++ | src/core/IO.pm: No need for two calls to .print |
17:34 | |
17:37
[Sno] joined
17:44
denis_boyun joined
17:47
carlin joined
|
|||
dalek | ast: d6b8fac | (Pepe Schwarz)++ | S32-exceptions/misc.t: Added tests for PR 260/RT#66776 |
17:49 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=66776 | ||
17:59
denis_boyun left
18:02
vendethiel joined
|
|||
lizmat | cycling& | 18:04 | |
dalek | kudo/nom: 6e0ac15 | (Elizabeth Mattijsen)++ | src/core/IO.pm: Don't bother calling .gist for Strings |
18:05 | |
18:18
hoverboard is now known as moistcherry,
rindolf left
18:22
rindolf joined
18:31
Mouq joined
|
|||
psch | oh shucks, i didn't even mention the right PR in my roast commit :( | 18:38 | |
that aside, anyone who can tell me something about this? gist.github.com/peschwa/863b4d839e0024388052 | |||
in case it matters, i'm running a pae enabled 32bit debian vm | 18:39 | ||
xfix | It's a bug. | ||
Perl 6 should never SIGSEGV, unless you call C functions. | |||
[Coke] | p6: my $f = 5; $f.isa(Scalar) | ||
camelia | rakudo-jvm 6e0ac1: OUTPUT«(timeout)» | 18:40 | |
( no output ) | |||
[Coke] | seems fine here. what version of perl6 are you running? | ||
18:40
moistcherry is now known as hovercraft,
colomon left
|
|||
psch | This is perl6 version 2014.05-197-gba608c6 built on MoarVM version 2014.05-123-g87221ba | 18:40 | |
fwict it only happens with passing Scalar to .isa | 18:41 | ||
Scalar.^mro dies as well i just found out | 18:44 | ||
18:44
labster joined,
denis_boyun_ joined
|
|||
psch | .^name works; not sure what else i should/could try | 18:47 | |
[Coke] | psch: please try updating your copy of moar. it's over a month old. :) | 18:49 | |
psch | huh, that's curious; i ran Configure.pl after make realclean | 18:50 | |
18:50
colomon joined
18:51
dwarring joined
|
|||
flussence | are you doing the "use rakudo's Configure.pl to build everything" method? | 18:51 | |
psch | flussence: yes, is there a better one? | ||
flussence | that's fine, but you might need to also `make clean` in the nqp/moar subdirs separately. | ||
psch | oh, i didn't; i'll do that | 18:52 | |
thanks | |||
cognominal | is there a way to use HLL::Grammar from rakudo? I have asked the question a few month ago and it was no. But things may have move since then. | 19:00 | |
FROGGS_ | m: use NQPHLL:from<NQP> | 19:04 | |
camelia | ( no output ) | ||
FROGGS_ | cognominal: but this is a dangerous path... | ||
cognominal: what do you want to achieve? | |||
19:04
dmol1 joined
19:05
dmol left
|
|||
cognominal | FROGGS_, I want to use the EXPR rule | 19:05 | |
FROGGS_ | hmmmm, I've got a Perl 6 version here... | ||
19:05
denis_boyun_ left
|
|||
cognominal | May be I need to translated HLL::Grammar from nqp to rakudo | 19:05 | |
ho, that would be nice | 19:06 | ||
19:06
rindolf left
|
|||
FROGGS_ | github.com/rakudo-p5/v5/blob/nqp_t...ar.pm#L632 | 19:06 | |
19:07
denis_boyun joined
19:08
hovercraft is now known as moistcherry
19:11
itz joined
|
|||
dalek | c/redesign: 3d00cff | Mouq++ | / (2 files): Detect multiple subkinds on routines + note if a subkind can't be found This is useful for those routines defined as both a sub and method, of which Perl 6 has many |
19:11 | |
19:19
darutoko left
19:23
[particle] left
19:24
[particle] joined
19:26
Psyche^_ left,
Psyche^ joined
19:30
treehug8_ joined
|
|||
dalek | c/redesign: f019036 | Mouq++ | / (3 files): Update handling of the now listy Documentable.subkind |
19:30 | |
19:32
treehug__ joined
19:33
treehug88 left
19:34
treehug8_ left,
moistcherry is now known as LurkingStalker
19:37
denis_boyun___ joined
19:38
denis_boyun left,
LurkingStalker is now known as hoverboard
19:39
brrt joined
19:43
jnap left
|
|||
masak | m: sub infix:«~~>»($premise, $conclusion) is looser(&infix:<max>) { !$premise || $conclusion } | 19:46 | |
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/Z2H_EHRDi2Can't use unknown trait 'is looser' in a sub+{precedence} declaration.at /tmp/Z2H_EHRDi2:1------>  expecting any of: rw parcel hidden_from_backtrace pure…» | ||
masak | "unknown trait"? | ||
the error report is cut off early, but "looser" is in the list of the traits it expects. | |||
lizmat | I'm not sure "is looser" is really implemented | 19:49 | |
ah, I see what the problem is | 19:50 | ||
sub +[precedence] !~~ Routine | |||
masak | m: say &infix:<max> | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«Sub+{<anon>}.new()» | ||
dalek | c/redesign: 3b8e741 | Mouq++ | / (2 files): Rename .subkind to .subkinds |
19:51 | |
c/redesign: 57ef3c5 | Mouq++ | htmlify.p6: Abstract index writing process |
|||
masak | lizmat: why wouldn't it match Routine. it's a subclass, no? | ||
moritz | known bug | ||
my: my &c = ¨ | |||
m: my &c = ¨ | |||
camelia | rakudo-moar 6e0ac1: OUTPUT«Type check failed in assignment to '&c'; expected 'Callable' but got 'Sub+{<anon>}' in block at /tmp/KTRbI9uBLb:1» | ||
moritz | same bug | 19:52 | |
(already submitted) | |||
lizmat | masak: &die has "is hidden_from_backtrace" | ||
which makes it not mach | |||
*match | 19:53 | ||
masak | ah :/ | ||
ok, anyone know an operator I can use that's just looser than || ? | |||
er, rephrasing. | |||
ok, anyone know how I can write to make my operator just looser than || ? | |||
the one who cracks this gets a favorable mention in the blog post I'm writing... :) | 19:54 | ||
segomos_ | looser how? | ||
[Coke] | precedence wise. | ||
19:55
jnap joined
|
|||
[Coke] | so if you have an expression with || and his new operator… | 19:55 | |
segomos_ | ah didn | 19:56 | |
ah didn't see his example earlier | |||
lizmat | perhaps the answer lies in src/core/Precedence.pm | ||
masak | segomos_: it's Perl 6 terminology. tighter/looser instead of higher/lower. | ||
ooh, 'is prec' :) | |||
lizmat++ | |||
m: sub infix:«~~>»($premise, $conclusion) is prec<j=> { !$premise || $conclusion } | 19:59 | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/ChSx1DYSymCan't use unknown trait 'is prec' in a sub+{precedence} declaration.at /tmp/ChSx1DYSym:1------>  expecting any of: rw parcel hidden_from_backtrace pure d…» | ||
masak doesn't understand where the error comes from | |||
Mouq | m: sub infix:<ll> ($a,$b) is looser(&[||]) { "$a ll $b" }; say 1 ll 2 | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/UQKd4RUvPdRoutine given to looser does not appear to be an operatorat /tmp/UQKd4RUvPd:1------> » | ||
masak | surely the sub isn't a sub+{precedence} before 'is prec' has been applied!? | 20:00 | |
Mouq | m: sub infix:<ll> ($a,$b) is looser(&infix:<||>) { "$a ll $b" }; say 1 ll 2 | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/cczdqQvn11Routine given to looser does not appear to be an operatorat /tmp/cczdqQvn11:1------> » | ||
masak | Mouq: infix:<||> is too special. I already tried that. | ||
Mouq | Huh | ||
segomos_ | those were Ls | ||
masak | arguably, it *should* work. but it doesn't. | ||
segomos_: no, in the 'is looser'. | |||
segomos_: doesn't matter what the op being defined is called. | 20:01 | ||
masak compromises for now and uses parens :( | |||
20:02
SevenWolf joined
|
|||
lizmat | masak: using is prec or is looser doesn't make a difference as they use the same basic mechanism to find what to apply to | 20:02 | |
and that's børked atm | |||
masak | in conclusion, I cannot set precedence right now? | 20:04 | |
lizmat | it appears like that, on any operator you define | 20:05 | |
would be my conclusion | |||
FROGGS_ | isn't there a test for that? | ||
20:06
SevenWolf left
|
|||
masak | I saw tests in roast with operators defined with precedence, yes. | 20:07 | |
20:07
SevenWolf joined
|
|||
masak | don't know if they are in spectest.data, though. | 20:07 | |
lizmat | t/spec/integration/advent2012-day19.t | ||
for instance | |||
20:08
mr-foobar left
|
|||
dalek | ast: 0a4db36 | (Elizabeth Mattijsen)++ | integration/advent2012-day19.t: Fix typo |
20:10 | |
jnthn | S06-traits/precedence.t is in spectest.data | 20:13 | |
Passes 9 out of 10 tests | 20:14 | ||
lizmat | jnthn: is the a performance difference between using $x and \x as a parameter to a method ? | ||
*there | |||
jnthn | Potentially. | 20:15 | |
lizmat | + multi method print(IO::Handle:D: Str:D \x) { | ||
+ nqp::printfh($!PIO, nqp::unbox_s(x)); | |||
would that make sense ? | |||
jnthn | Str !~~ Iterable | ||
lizmat | (rather than $value, which is what the param is called now) | ||
jnthn | So I think it optimizes away the need for a Scalar container there. | ||
lizmat | ok, then I'll commit | 20:16 | |
jnthn | So $x is going to perform as well as \x | ||
In that case. | |||
lizmat | ah, so it *doesn't* make sense | ||
git reset --hard # so much for that opt :-) | 20:17 | ||
moritz | git reset --that-hurt | 20:22 | |
Mouq | This doc work is soo boring :P It takes an eternity to re-gen the docs. I really need to implement caching of some sort.. | 20:23 | |
lizmat | "is cached" to the rescue? | ||
20:23
guru joined
|
|||
Mouq | lizmat: Unfortunately, I mean cacheing between runs | 20:24 | |
PerlJam | Mouq: continuous deployment :) | ||
yoleaux | 15 Jun 2014 11:32Z <pippo> PerlJam: I found the solution for irclog.perlgeek.de/perl6/2014-06-10#i_8850807 see irclog.perlgeek.de/perl6/2014-06-15#i_8873951 | ||
20:24
guru is now known as Guest32892,
Guest32892 is now known as ajr_
|
|||
lizmat | no one is stopping you from implementing "is persistent" :-) | 20:24 | |
Mouq | :) | 20:25 | |
jnthn | Mouq: Thanks for reporting the Moar SEGV earlier; fixed in 462402be7f. | 20:26 | |
dalek | c/redesign: d7a28e7 | Mouq++ | htmlify.p6: Write out routine sub-indices |
20:27 | |
Mouq | jnthn: \o/ Thank you :) | ||
jnthn | gist.github.com/peschwa/863b4d839e0024388052 also doesn't SEGV with that fix for me | 20:28 | |
dalek | kudo/nom: 09a1674 | (Elizabeth Mattijsen)++ | src/core/IO.pm: Small opt on IO.print: not sure |
||
kudo/nom: ccc5193 | (Elizabeth Mattijsen)++ | src/core/Deprecations.pm: Fix obsolete variable deprecations |
|||
jnthn | Please could somebody with a Panda commit bit apply this Windows fix: gist.github.com/jnthn/8b51ba6d9757d84a4957 | 20:32 | |
20:32
psch left,
virtualsue left
20:33
maelus joined
|
|||
ChoHag | Does anyone know of any documentation describing how to define and use new traits on class attributes? | 20:33 | |
20:34
itz left
|
|||
dalek | ast: 19bd159 | (David Warring [email@hidden.address] | integration/advent2011-day11.t: removed guff |
20:34 | |
ast: 68b1ae8 | (David Warring [email@hidden.address] | integration/advent2011-day15.t: adding advent 2011 day 15 |
|||
PerlJam | ChoHag: There's probably an advent calendar entry about it, but I don't think there's "documentation" as such. (I do think that would make a good blog post though to help the next guy) | 20:35 | |
dalek | c/redesign: 4494168 | Mouq++ | / (2 files): Use placeholder= rather than value= in search bar This way, "Search" disappears when focus is put in the textarea |
||
ChoHag | Yeah I've given up (in the best of ways) expecting full on documentation for much of perl 6. | 20:36 | |
Mouq | PerlJam: Or, you know, we could add some info to perl6/doc about it :P | ||
20:37
itz joined,
kaare_ left
|
|||
PerlJam | Mouq++ yeah, that too :) | 20:37 | |
jnthn | r: multi trait_mod:<is>(Mu $what_is_it, :$curious!) { say $what_is_it.WHAT }; class A { has $.x is curious; } # I really don't know what this does :) | ||
camelia | rakudo-{parrot,jvm,moar} 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileCan't use unknown trait 'is curious' in an attribute declaration.at /tmp/tmpfile:1------>  expecting any of: rw readonly box_target» | 20:38 | |
jnthn | oops | ||
m: multi trait_mod:<is>(Mu $what_is_it, :$curious!) { say $what_is_it.WHAT }; class A { my $.x is curious; } # I really don't know what this does :) | |||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/fPr8ahe8pzCan't use unknown trait 'is curious' in a variable declaration.at /tmp/fPr8ahe8pz:1------> s_it.WHAT }; class A { my $.x is curious⏏; } # I really don't know what…» | ||
jnthn | Hmm | ||
Oh...dammit | |||
PerlJam | See?!? Even *jnthn* doesn't know how to do it! ;) | ||
jnthn | I bet the "helpful" error message hides the candidate I'm after. | ||
ChoHag | Well if this place doesn't know I don't see what hope I have... | 20:39 | |
jnthn | Oh, but it tells me what I wanted to know. | ||
m: multi trait_mod:<is>(Variable:D $var, :$curious!) { say "in trait mod" }; class A { my $.x is curious; } | |||
dalek | kudo/nom: 3911c1c | (Elizabeth Mattijsen)++ | t/spectest.data: Add advent2011-day15 tests |
||
camelia | rakudo-moar 6e0ac1: OUTPUT«in trait mod» | ||
jnthn | ChoHag: Well, that's how you can declare a trait that gets applied there. | ||
ChoHag | What's the :D ? | 20:40 | |
jnthn | "Definite" (not a type object) | ||
Mostly me being paranoid, 'cus I'm used to defining traits in core. :) | |||
masak | how do I sort two arrays (of known equal length) in lexicographic order, i.e. comparing elements pairwise and sorting on the first differing element? | 20:47 | |
the shorter the solution, the better. | |||
preferably, I'd like to just use some metaop, but I don't really see how. | 20:48 | ||
dalek | c/redesign: ff624ef | Mouq++ | htmlify.p6: Operators are routines This gets as far as generating the index files, but dies trying to hack together the urls for the operators. On a positive note, some of the steps involved to make this work are also steps toward generalizing the documentation of types, routines, etc. |
||
jnthn | masak: Hm, example? | 20:49 | |
lizmat | masak: would the result still be 2 arrays ? | ||
Mouq | sub infix:<sort> ($a, $b) { sort $a, $b }; @a Zsort @b # ?? | ||
Don't we have a zip :by(&sort), actually? | 20:50 | ||
m: say zip (1,2,3), (4,5,6) | |||
camelia | rakudo-moar 6e0ac1: OUTPUT«1 4 2 5 3 6» | ||
Mouq | m: say zip (1,2,3), (4,5,6), :by(&sort) | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«1 4 2 5 3 6» | ||
Mouq | m: say zip (1,2,3,9), (4,5,6,7), :by(&sort) | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«1 4 2 5 3 6 9 7» | 20:51 | |
Mouq | Hm :( | ||
masak | lizmat, jnthn: I currently have what I want as `sub array-comp(@xs, @ys) { [||] @xs »cmp« @ys }` | ||
looking for better/shorted suggestions. | |||
shorter* | 20:53 | ||
jnthn | That's already quite short :P | ||
20:53
stux left
|
|||
Mouq | any @xs Zcmp@ys :P | 20:53 | |
jnthn | Zcmp may allow it to short-circuit more effectively... | 20:54 | |
masak | yes, good idea. | ||
`any` doesn't do what I want, tho' | |||
20:57
stux joined
|
|||
dalek | p: 9bb18da | (Elizabeth Mattijsen)++ | tools/build/MOAR_REVISION: Bump MOAR_REVISION |
20:57 | |
vendethiel | Isn't there a neater way to write ` my @parts = $version.split('.'); for @els.kv -> $k, $v { @parts[$k]++ if $v; } @parts.join('.');` ? I feel like I'm missing something | 20:58 | |
20:59
hoverboard left
|
|||
dalek | c/redesign: 8569817 | Mouq++ | htmlify.p6: Make sure we sort sub-index output |
20:59 | |
lizmat | testing bumped NQP_REVISION now | 21:01 | |
Mouq | "@parts = $version.split('.') Z+ ?<<@els; @parts.join('.')", though that's not exactly readable | ||
Technically it should be <<+<< insetad of Z+ | 21:02 | ||
jnthn | Rakudo's startup time seems to have got quite a bit worse since the last relesae | 21:05 | |
21:05
pecastro joined
|
|||
vendethiel | $version.split('.').map(* + @els[(state $)++].Int).join('.'); | 21:06 | |
Okay, now I think I'm doing perl 6, not "ruby/python/php in perl 6" | |||
lizmat | jnthn: this last MOAR version bump also seems to have a negative effetc :-( | ||
running spectest a 2nd time | |||
vendethiel | Mouq: thanks, I went with ^ but yours is funny too P | ||
jnthn | Well, since the last MOAR_REVISION bump there was only 462402b | 21:08 | |
21:09
Rotwang left
|
|||
jnthn | lizmat: Which is just an extra NULL check to avoid a SEGV. So seems...ulikely | 21:09 | |
lizmat | indeed, was noise on my side | ||
dalek | kudo/nom: 54e264e | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION: Bump NQP_VERSION |
21:10 | |
21:10
bluescreen10 left
21:11
Psyche^ left,
araujo left
|
|||
jnthn | lizmat: OK, phew :) | 21:11 | |
21:11
Psyche^ joined
|
|||
jnthn | lizmat: Is tehre any new/extra setup work of note since the last relesae? | 21:11 | |
lizmat is looking at the log | |||
21:12
sivoais joined
|
|||
jnthn | lizmat: Also this: | 21:12 | |
Mouq | vendethiel: Cool :) | ||
jnthn | - $out.print(x.gist); | ||
- $out.print("\n"); | |||
+ $out.print(x.gist, "\n"); | |||
Will be slower | |||
'cus it hits the slurpy candidate of print | |||
Which is gonna be WAY slower than the Str-taking one. | |||
lizmat | even if you're calling it twice? | ||
jnthn | Yes. | ||
lizmat | and have an extra alias? | ||
jnthn | Because iterating the slurpy is some method calls :) | 21:13 | |
21:13
araujo joined
|
|||
lizmat | ok, will rewrite | 21:13 | |
jnthn | Furthermore, the Moar inliner, when we get it, will be able to take a good shot at inlining the two simple .print calls | ||
lizmat | but creating a candidate for Str:D does make sense, no? | 21:14 | |
jnthn | Uh, well, when the inliner can inline Rakudo methods properly | ||
lizmat | so we don't have to do the .gist ? | ||
jnthn | 6e0ac15e5 makes a lot of sense | ||
aaa82dd9 doesn't | |||
You are timing these before/after, I guess? :) | |||
vendethiel | Mouq: it's actually far more complicated haha :'( | 21:15 | |
lizmat | only globally CPU in the spectest | ||
jnthn | Oh | ||
lizmat | but it's more or less in noise levels in the spectest | ||
jnthn | But...these things are very benchmarkable. | 21:16 | |
Right. | |||
But a loop doing printing will show it up | |||
Not to mention that it could make a good perl6-bench contribution; I think we've no IO tests tehre. | 21:17 | ||
s/tests/benchmarks/ | |||
21:19
hoverboard joined
|
|||
vendethiel | Mouq: well... I ended up with this | 21:21 | |
Mouq: $version.split('.').map({any(@els[0..(state $)++]) ?? ( (state $)++ ?? 0 !! $_ ) !! $_}).join('.'); | 21:22 | ||
jnthn | lizmat: Taking a read through CORE.setting to see if I spot anything that way... | ||
timotimo | i'm glad to see that commandline argument passing with utf8 stuff works out of the box in rakudo perl6 | 21:23 | |
lizmat | jnthn: wow, what a difference: | ||
$ time 6 'for ^100000 { say "foo" }' >/dev/null | |||
real0m4.296s | |||
user0m4.090s | |||
after: $ time 6 'for ^100000 { say "foo" }' >/dev/null | 21:24 | ||
real0m1.269s | |||
user0m1.096s | |||
sys0m0.163s | |||
jnthn | lizmat: With what change? | ||
timotimo | what the hell did you do? o_O | ||
lizmat | undo my "optimization" | ||
jnthn | And this is why to benchmark :P | ||
lizmat | hehe, wish we had a Banchmark module | ||
vendethiel | .oO( and a banchee ) |
||
jnthn | Comitting optimizations without benchmarking them is like drinking from a random bottle you find in the shed. It might be nicely matured homebrew you forgot about, or it could are arsenic. | 21:25 | |
*be | |||
lizmat | .oO( "This could go either way" ) |
||
lizmat wonders how many people get the 3rd rock reference | |||
vendethiel | Now I really wish state++ was allowed. | 21:26 | |
lizmat | as opposed to? | 21:27 | |
vendethiel | (state $)++ | ||
m: sub a { state++ }; say a; say a; | |||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/_qr9KjsKH3Malformed stateat /tmp/_qr9KjsKH3:1------> sub a { state⏏++ }; say a; say a; expecting any of: scoped declarator» | ||
Mouq | std: state$++ | ||
camelia | std 0f2049c: OUTPUT«===SORRY!===Malformed state at /tmp/_6tsot63i8 line 1:------> state$⏏++ expecting twigilParse failedFAILED 00:00 122m» | ||
Mouq | std: ++state$ | ||
camelia | std 0f2049c: OUTPUT«ok 00:00 122m» | ||
lizmat | std: state++ | ||
camelia | std 0f2049c: OUTPUT«===SORRY!===Malformed state at /tmp/8A9psL5di1 line 1:------> state⏏++ expecting any of: name scoped declarator statement end statement listParse failedFAILED 00:01 121m» | ||
dalek | osystem: dddcfd6 | segomos++ | META.list: Update META.list adding HTTP::Server::Async |
21:28 | |
vendethiel | m: say (++state$) | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«1» | ||
vendethiel | ooh. | ||
timotimo | yay! | ||
segomos_++ | |||
segomos_ | super basic - time to build out some middlewares for it :-) | ||
vendethiel | too bad that ... | 21:29 | |
m: say [++state$]; | |||
camelia | rakudo-moar 6e0ac1: OUTPUT«===SORRY!=== Error while compiling /tmp/uj5DPj5b8pUnsupported use of $] variable; in Perl 6 please use $*PERL_VERSIONat /tmp/uj5DPj5b8p:1------> say [++state$]⏏;» | ||
vendethiel | maybe TimToady++ will want to "fix" this one too. | ||
lizmat | wonder if we could define ++state and state++ as syntactic sugar for (++state$) and (state $)++ respectively | ||
segomos_ | m: say state$ | ||
camelia | rakudo-moar 6e0ac1: OUTPUT«(Any)» | ||
vendethiel | lizmat: I'd like it ;-) | 21:30 | |
segomos_ | what is that supposed to do? | ||
ChoHag | What does "Returns the package (class/grammar/role) to which this attribute belongs." mean in the documentation of Attribute.package? | ||
timotimo | segomos_: does the server parse the complete body of the request before calling the registered callables? | ||
segomos_ | timotimo: yea - i should add that to the readme | ||
ChoHag | I get something back, but every time I use it perl just says "Method <something, like gist> not found for invocant of class 'Foo'" | 21:31 | |
timotimo | segomos_: i don't like that :) | ||
ChoHag | I want to be able to adjust the class at compile time with an attribute trait. | ||
lizmat | "adjust the class" as in re-bless (p5 speak?) | ||
ChoHag | No. In this case, adjust a class (not instance) attribute it holds. | 21:32 | |
segomos_ | timotimo: what should it do/ | ||
ChoHag | But I expect that adding (meta-)attributes or methods should follow roughly the same lines. | ||
timotimo | segomos_: consider websockets; IMO it should call the callables as soon as the headers are finished being parsed | ||
btyler | segomos_: woah, this is super cool. will play with it this evening :) | 21:33 | |
vendethiel | "github.com/Nami-Doc/xyz.pm6/commit...55dc1131", eww but works. | ||
segomos_ | timotimo: couldn't that lead to problems if you need the POST data (or whatever) to be completed? | ||
ChoHag | class foo { my @bar; has $baz is bingly; }, where bingly does something to @bar. | ||
segomos_ | btyler: thanks :-) | ||
lizmat | ChoHag: S12:793 | ||
synopsebot | Link: perlcabal.org/syn/S12.html#line_793 | ||
ChoHag | bingly being defined as: multi trait_mod:<is>(Attribute $a, :$bingly!) is export { ... } | ||
timotimo | segomos_: of course the data should be retrievable in a blocking manner if the user wants it | 21:34 | |
segomos_ | timotimo: ahh i got you, call registered subs and *if* post data is requested then block until it's complete | ||
jnthn | ChoHag: .package is the class the attribute is declared in | ||
timotimo | IMO the registered subs ought to block by themselves | ||
ChoHag | jnthn: So what can I do with it? | 21:35 | |
segomos_ | brb | ||
ChoHag | $a.package.foo complains as above for just about any foo. | ||
jnthn | ChoHag: Call a meta-method on it typically | ||
21:36
isBEKaml joined
|
|||
ChoHag | $a.package.^foo? | 21:36 | |
That complained, but I only tried one thing... | |||
jnthn | I'm not sure the .^ shortcut works because the default parent wasn't yet added | ||
But you can get at it with .HOW | |||
Which always works. | |||
timotimo | segomos_: also, the registered handlers could say "i'm not interested" ASAP if only the headers are needed to decide | ||
so you can reach the correct handler with less delay | |||
ChoHag | Ah. | ||
Now where was that documentation I found on class meta methods... | 21:37 | ||
vendethiel | Golf ! {any(@els[^++state$]) ?? ( (state $)++ ?? 0 !! $_ + 1 ) !! $_} | ||
dalek | kudo/nom: 354c5c5 | (Elizabeth Mattijsen)++ | src/core/IO.pm: Properly optimize say/note, jnthn++ Committing optimizations without benchmarking them is like drinking from a random bottle you find in the shed. It might be nicely matured homebrew you forgot about, or it could are arsenic. |
||
jnthn | m: multi trait_mod:<is>(Attribute:D $attr, :$foo!) { my $pkg = $attr.package; $pkg.HOW.add_method($pkg, 'foo', method () { say 'look a foo' }) }; class A { has $.x is foo }; A.foo | 21:38 | |
camelia | rakudo-moar 3911c1: OUTPUT«look a foo» | ||
jnthn | ChoHag: ^^ may help | ||
ChoHag | It does. Thanks. | ||
There's some in S12 here too. | 21:39 | ||
timotimo | lizmat: so are say and note now faster than they used to be a week ago or is it back to the way it was recently? | ||
lizmat | they should be faster for a single Str | ||
because there is no .gist done on them | |||
but that's the only difference | 21:40 | ||
timotimo | ah, that's good! | ||
21:41
donaldh joined
|
|||
vendethiel | the $] kills me :'( | 21:41 | |
segomos_ | timotimo: awesome, gonna implement that - | ||
donaldh | [Coke]: Here's the perl6-roast-data results from earlier: gist.github.com/donaldh/c37b5fdf96da8f5e6e7f | 21:42 | |
dalek | ecs: 309a882 | (Elizabeth Mattijsen)++ | S22-package-format.pod: Some more S22 tweaks, introducing .parse-spec |
21:43 | |
21:43
rurban joined
21:44
dmol1 left
|
|||
timotimo | segomos_: in general, websocket support would be pretty nifty | 21:45 | |
segomos_ | i might try to tackle that next, i've used them but never read about how they work | 21:46 | |
21:46
dmol joined
|
|||
dalek | c/redesign: 4a477cb | Mouq++ | htmlify.p6: Get operators-as-routines to work |
21:47 | |
c/redesign: ec0abda | Mouq++ | sketch/ (22 files): Remove sketch dir No longer needed |
|||
btyler | segomos_: hmm, I seem to be segfaulting r-m with great regularity on the echo example (just curl-ing localhost:8080) -- have you noticed the same? | ||
segomos_ | btyler: moar has a bug where it seg faults, it only works with java right now | 21:48 | |
i think there is a race condition or something on the moar implementation | 21:49 | ||
btyler | segomos_: ok, glad it isn't just me | ||
segomos_ | because it will sometimes respond and sometimes won't, and sometimes it will segfault depending on .. something :-) | 21:50 | |
lizmat | segomos_: is this still on the latest and greatest after the Moar/NQP version bumps I did today? | 21:51 | |
segomos_ | lizmat: i'll check it out | ||
btyler | lizmat: I tried with master/master/nom as of 20 minutes ago and still found the segfault | 21:52 | |
lizmat | :-( | ||
21:52
SevenWolf left
|
|||
masak | lol! I blogged! strangelyconsistent.org/blog/boxes-and-pebbles | 21:52 | |
lizmat | I guess jnthn / nwc10 still have some heavy debugging ahaed | ||
masak | (long post. but hopefully worthwhile.) | 21:53 | |
ChoHag | What does 'will' do (attribute trait)? | ||
21:53
SevenWolf joined
|
|||
ChoHag | Set the default value? | 21:53 | |
[Coke] | donaldh: looks much better than what I get. :) | ||
lizmat | ChoHag: set a phaser for the variable | 21:54 | |
[Coke] | I only have 1GB of swap | ||
ChoHag | Oh it's always somethi (new and) weird... | ||
donaldh | We will need to look at the exact config on the roast server. | ||
lizmat | my $dbh will leave( { .disconnect }; | ||
ChoHag | So what's a phaser then? | ||
donaldh | Maybe increasing the swap would be a good start | ||
ChoHag | I read something about that I didn't understand. | 21:55 | |
[Coke] | wrong box. | ||
ChoHag | Or remember. | ||
[Coke] | one sec. | ||
lizmat | S04:1387 | ||
synopsebot | Link: perlcabal.org/syn/S04.html#line_1387 | ||
ChoHag | Ah yes those. | ||
[Coke] | 3954MB Mem, 0MB Swap (per htop) | ||
ChoHag | Hmm. | 21:56 | |
jnthn | lizmat: Result. | 21:57 | |
donaldh | Can you add some swap? | ||
jnthn | lizmat: src/core/Inc.pm takes nearly 0.1s to execute | ||
lizmat: Which accounts for the startup time regression. | 21:58 | ||
21:58
colomon left
|
|||
lizmat | well, that's code that came from the eleven branch merge | 21:59 | |
I'm actually refactoring a lot of that | |||
jnthn | OK | ||
Well, anything to make it not be a huge startup time regression would be really great. | |||
lizmat | I must also point out that maybe a lot of that is because a lot of directories are being tested | 22:02 | |
btyler | pretty wild watching the JVM JIT warm up: I ran wrk against segomos_'s async http server. first round was ~6 requests/second, 2nd: 13, 3rd round: ~40 | 22:03 | |
22:03
colomon joined
22:04
dmol left
|
|||
btyler | 40 requests a second is well into "servicable for a wide variety of webapps" territory, so that's pretty neat :) | 22:04 | |
granted it's an empty echo, but still | |||
jnthn | lizmat: I don't really have the energy to dig through the code, I'm afraid. I can just say that of all the code we run in CORE.setting's mainline at startup, Inc.pm accounts for over two thirds of the time. | 22:05 | |
lizmat | ok, will see what I can do about that | ||
jnthn | lizmat++ | ||
tadzik | btyler: I read that as "MoarVM JIT" and my heart stopped a little :) | ||
22:05
dmol joined
|
|||
btyler | seems to be holding steady around 45-50 rps, with the occasional uncaught exception taking the server down | 22:06 | |
lizmat | tadzik: be patient :-) | ||
btyler | tadzik: heh, sorry :P | ||
[Coke] | donaldh, moritz: can we add swap to host07? | ||
22:07
brrt left
|
|||
jnthn | btyler: Got a link for me to the script that SEGVs on Moar? | 22:07 | |
segomos_ | github.com/tony-o/perl6-http-serve...r/examples | ||
either of those jnthn | |||
btyler | jnthn: github.com/tony-o/perl6-http-serve...server.pl6 | ||
ran it and then curl localhost:8080 | 22:08 | ||
jnthn | When I run it, it just says "closed" | 22:10 | |
And exits immediately. | |||
dalek | c/redesign: ee92b0b | Mouq++ | / (2 files): Generate operator index |
22:11 | |
22:11
treehug__ left
|
|||
jnthn | oh, it's 'cus port 8080 was in use | 22:12 | |
lizmat | jnthn: seems that at least .06 of startup time is spent setting up CUSTOM_LIB | 22:15 | |
and testing whether directories exist | |||
dalek | c/redesign: c0bdd05 | Mouq++ | htmlify.p6: Make sure infixes in lib/Type work and stop generating html/op dirs |
||
lizmat | I'll refactor it so that @*INC will contain strings initially only | 22:16 | |
22:16
amirite left
|
|||
lizmat | to be turned into actual objects (or removed from @*INC) when they're actually needed | 22:16 | |
jnthn: it feels like overkill to turn @*INC into an iterator | 22:17 | ||
masak | 'night, #perl6 | 22:21 | |
timotimo | masak: nice post! | ||
lizmat | gnight masak | 22:22 | |
jnthn | 'night, masak | 22:25 | |
lizmat: yeah, think so | |||
22:29
isBEKaml left,
rurban left
22:30
spider-mario left
22:34
denis_boyun___ left,
colomon left
22:35
kivutar left,
rurban joined
22:36
colomon joined
|
|||
jnthn | btyler, segomos_: I'm wondering if the issue is that .write is async, but it seems there's nothing being done with the Promise that is returned | 22:38 | |
So .close happens on the socket before the writing is done | |||
It's SEGVing 'cus of a missing "did we close the handle" check | |||
I'll fix that tomorrow, but I think that needs addressing in the module. | 22:39 | ||
Is socket writing on an async socket actually async on the JVM? | |||
timotimo | maybe it isn't and that's the cause of the problem :) | 22:40 | |
jnthn | Well, maybe it isn't and that's why the module works there :P | 22:41 | |
22:42
Araq joined
|
|||
timotimo | er, i mean: the cause of the lack of the problem | 22:42 | |
Araq | timotimo: ! | ||
timotimo | hi there! | 22:43 | |
22:44
carlin left
22:47
xragnar_ joined,
xragnar is now known as Guest14585,
Guest14585 left,
xragnar_ is now known as xragnar
22:49
ren1us left
22:50
btyler left,
telex left
22:52
telex joined
22:56
colomon left
22:59
hoverboard left
|
|||
jnthn | sleep & | 23:02 | |
timotimo | gnite jnthn | 23:03 | |
kurahaupo watches jnthn perform "sleep" in the background while continuing other tasks :) | |||
g'nite | 23:04 | ||
23:05
itz left
|
|||
lizmat | gnight jnthn | 23:06 | |
23:06
Alina-malina left
23:07
Alina-malina joined
|
|||
lizmat also calls it a day | 23:11 | ||
gnight, #perl6! | |||
timotimo | gnite lizmat | 23:12 | |
23:14
donaldh left
23:18
ajr_ left
|
|||
segomos_ | jnthn: so is moar representative of what that async socket stuff is actually doing? | 23:19 | |
or should be doing? is the thought that the jvm is in a workaround mode for async soxkets? | |||
23:19
dmol left
23:22
hoverboard joined
23:31
hoverboard left
23:37
BenGoldberg joined
23:43
BenGoldberg left,
BenGoldberg joined
|