»ö« 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. |
|||
timotimo | i don't see what i did differently from colomon's initial posting | 00:03 | |
colomon | ? | ||
00:04
rGeoffreeey joined
|
|||
timotimo | i have my @a; for (1 .. SCALE) { @a.push: $_ } | 00:04 | |
it doesn't show the ridiculous difference in performance between before and after jnthn's for sink fix in my graphs: t.h8.lv/p6bench/for_push_sink.html | 00:05 | ||
00:06
PZt joined
|
|||
colomon | timotimo: why doesn't it go out to the 16384 column? | 00:06 | |
00:09
augustus joined
|
|||
timotimo | colomon: there's a number called "enough time" or something in the benchmark framework | 00:09 | |
it will double the scale until the test takes longer than enough time | 00:10 | ||
augustus | So I read that work on the JVM has made a lot of progress. Does it do enough to be worth playing with? Are there any instructions on how to set it up? | 00:12 | |
yoleaux | 7 Jul 2013 04:01Z <raiph> augustus: example of grammar dynamically building grammar: rosettacode.org/wiki/Parse_EBNF#Perl_6 | ||
colomon | timotimo: I can't tell you exactly what is going on, but something is really, really wrong with that graph. | ||
timotimo | augustus: it's fun to play with. our module installer doesn't work with it (to my knowledge), but it doesn't lack many features and it's got nice performance in many cases | 00:13 | |
startup time is horrible, though | |||
but you can play with threads on it ;) | |||
colomon | On my Mac, pushing 8192 values one by one takes 1 second total under the latest jakudo. | ||
that's not counting startup time | |||
6.6s with startup time | 00:14 | ||
so that's | |||
r: 8192 / 6.6 | |||
camelia | rakudo 117beb: ( no output ) | ||
colomon | r: say 8192 / 6.6 | ||
camelia | rakudo 117beb: OUTPUT«1241.212121» | ||
colomon | 1241 iterations per second | ||
augustus | timotimo: So is it part of Rakudo, or is it a separate download/build? I'm just unsure how to get started. | ||
colomon | or 8192 per second not counting startup time | 00:15 | |
unless you're doing timings on a raspberry pi, I greatly doubt my system is actually 10x faster than yours | |||
timotimo | you get the same repo, and then you use ConfigureJVM.pl in nqp/ and in / and then you get a "perl6" binary (shell script actually) that you can just run after you "make install" | 00:16 | |
so basically you git clone github.com/rakudo/rakudo and inside you clone github.com/perl6/nqp and inside nqp you ConfigureJVM.pl, make, make install and in rakudo you ConfigureJVM.pl --with-nqp=nqp/install/nqp, make, make install | |||
that's all. you do need at least java7 to do it, though | |||
i have an idea why it may be wrong actually | 00:17 | ||
augustus | timotimo: Ok, that sounds pretty easy then. Once built, I can just run my scripts like nothing's different? | ||
timotimo | yes, indeed | ||
well, that's the idea anyway | |||
augustus | :) | ||
timotimo | if you have trouble, you're probably running into some bug and should report that here, but so far things have been going great | ||
be sure to try the async sub :3 | 00:18 | ||
augustus | ok cool. Do you have any idea whether anybody else is looking into running in a servlet environment? eventually I want to go that direction | ||
timotimo | i don't know of any such plans. if you experiment with that, i'd be interested to read your blog posts ;) | 00:20 | |
augustus | In general, how much work is involved "thunking" between p6 and java? | ||
I would assume that I would make simple wrapper classes in java that call into simplified perl code since java obv won't understand p6 objects | 00:21 | ||
timotimo | i can link you to code for both directions, hold on | 00:22 | |
augustus | cool | 00:23 | |
timotimo | huh, where is the evalserver at | 00:25 | |
ah, in nqp | |||
github.com/perl6/nqp/blob/c154ef8d...erver.java - this is how you execute nqp-based code from java | 00:26 | ||
augustus | ok lemme take a look | 00:27 | |
timotimo | github.com/rakudo/rakudo/blob/5cab...reading.pm - this is how you use java classes from inside perl6 | ||
(the latter will get a layer of sugar coating at one point) | |||
augustus | is it hooking up stdin and stdout to sockets, or is the socket part a superflous part of this example? | 00:29 | |
timotimo | the socket is to connect with the evalclient | 00:30 | |
it's to get a spectest run through in less than 2 days ;) | |||
the startup time really is dreadful | |||
augustus | just trying to understand the overall architecture here. the nqp interpreter is being fired up in another thread, and then connected to with a socket? | 00:31 | |
in this example, where is the perl6 code that's being fed in? | |||
hmm, it's being fed in as an arg? | 00:32 | ||
timotimo | it's being fed in via the socket | ||
evalclient receives the code to be executed as a filename as well as the secret token | |||
it connects to the evalserver (the java code you have in front of you) and that in turn runs the code and then sends the output back to the eval client | 00:33 | ||
00:33
btyler left
|
|||
timotimo | in fact, the evalclient seems to send over the args or something | 00:33 | |
else if (cmdStrings[1].equals("run")) { <- here begins the interesting part | 00:34 | ||
augustus | I think i'm getting it, you pass in the name of the class that you want to run the main function of | ||
yeah I see the Ops.invokeMain, trying to see where Ops gets initialized | 00:35 | ||
hmm must be static function | |||
00:35
xinming left
|
|||
timotimo | wait, class? main function of? | 00:36 | |
are we talking about the same thing | |||
? | |||
augustus | well the "usage" indicates you provide a main class as I read it | ||
via the --app | |||
"Usage: %s [-bind-stdin] -cookie <name-for-access-token-file> -app <main-class>\n" | 00:37 | ||
timotimo | oh? | ||
00:37
xinming joined
|
|||
timotimo | that's weird. but i don't know java and haven't properly looked at that code yet | 00:37 | |
augustus | on a cursory reading it appears that it's searching for <main-class> and then running that, and compalins if it doesn't have an entry point? | ||
timotimo | but that's not the interesting part anyway ;) | 00:38 | |
and you're right, this Ops.invokemain comes from a class full of static methods | |||
augustus | I see it setting up a compilation unit, but I can't tell if it is feeding it some code to compile or not | 00:39 | |
timotimo | colomon: t.h8.lv/p6bench/for_push_sink.html <- you were right. i forced it to not keep the stuff around, so that it properly syncs | 00:40 | |
colomon | that's crazy better, eh? | ||
timotimo | yes! :) | 00:41 | |
much better asymptotical behavior | |||
00:41
snoopy joined
|
|||
augustus | aha, I think I'm starting to get it. There's the startup command, which is what I was looking at, and then after startup, you send individual commands in the form of "run some-stuff ..." | 00:43 | |
so the actual code getting run is what gets parsed out from the socket in argv | |||
and then passed in to invokeMain | |||
snoopy | colomon: CSS::Grammar failures should be fixed - was misusing Buf | ||
colomon | snoopy++ | 00:44 | |
00:45
rGeoffreeey left
|
|||
augustus | timotimo: can you pass JAVA_HOME to ConfigureJVM.pl? It seems to be using /usr/bin/java which is too old | 00:51 | |
timotimo | sorry, no clue :( | 00:55 | |
augustus | a quick examination of the source says no. probably a good idea to add that, as lots of java people have lots of different java versions installed. | ||
I can probably start a new shell, put the right java at the front of the path | 00:57 | ||
01:03
btyler joined
|
|||
augustus | This may be a dumb question, but is the JVM restricted to NQP, or is it full perl6? I'm still a little hazy on how much functionality is in NQP. | 01:07 | |
timotimo | rakudo is implemented in nqp. both work on jvm | 01:09 | |
augustus | ahh, ok. You boostrapped nqp, and that allowed full Rakudo. So I'm actually running Rakudo on JVM. Somehow I thought Rakudo was like the compiler. Is the perl6 code getting turned into byte code? | 01:11 | |
01:12
ajr joined,
ajr is now known as Guest35762
|
|||
timotimo | yes, it is | 01:13 | |
you can generate your perl6 code into .jar files | |||
01:13
Guest35762 left
|
|||
timotimo | you'll still need the runtime, which isn't small, and it seems like no matter wether or not you have any possibility at all to run eval from your script, you'll have to carry around the grammar and compiler | 01:14 | |
augustus | Ok, cool. So Rakudo is like the implementation of the runtime? | ||
just trying to understand which piece is the compiler, although in perl6 land that may be a fuzzy distinction because of eval capabilities? | 01:15 | ||
timotimo | well, a part of the runtime functionality comes from nqp, a part comes from rakudo | ||
rakudo is "the compiler" + core setting ("standard library" if you will) and runtime stuff ("open this file", ...) | |||
01:16
Celelibi joined
|
|||
timotimo | rakudo: my $foo := nqp::list(); nqp::push($foo, 1); say nqp::atpos($foo, 0); | 01:17 | |
camelia | rakudo 117beb: OUTPUT«1» | ||
timotimo | as you can see, you still have nqp stuff available in your rakudo-based perl6 code | ||
so it's kind of intermingled | |||
augustus | At some point I'd have to see a diagram I think. I get the gist of most of it, but I feel some distinctions are eluding me. ATM I don't think those dinstinctions are important (to me) | 01:18 | |
timotimo | i don't think they are, no | ||
augustus | Ok, just got Hello World to run! Thanks for your help! | 01:20 | |
01:20
stevan_ joined
01:22
stevan_ left
|
|||
augustus | hey, where the code says my \JVMThread, in p6, the \ no longer means reference right? Does it mean opaque or something similar? | 01:23 | |
timotimo | it means something like "no container for this", but i'm not sure about the specifics | ||
i interpret it as "pass this thing as raw as possible, don't make a container, i'll be careful with it" | 01:24 | ||
augustus | k. I'm gonna try and see if I can do a simple hello world by calling System.out.println. That would probably be a good example. | 01:25 | |
timotimo | if you get a \ argument, you can use things like nqp::iscont to figure out if there's a container, for instance | ||
PerlJam | I thought the important thing about \foo was that it didn't accidentally provide a context (like $foo provides and item context) | 01:26 | |
s/and/an/ | |||
timotimo | perhaps | ||
augustus | also, := (with the colon) is creating an alias, kind of like a reference in C++? | 01:27 | |
timotimo | that's comparable, yes | 01:28 | |
its most common use case for me is preventing assignment to a list (on the left) to eagerly slurp up something that i want to be lazy | |||
r: say "begin"; my @lazy := 1..*; say "alive"; my @a = 1..*; say "never reached"; | |||
camelia | rakudo 117beb: OUTPUT«beginalivenever reached» | ||
timotimo | er, sorry :) | 01:29 | |
r: say "begin"; my @lazy := 1..*; say "alive"; my @a = 1...*; say "never reached"; | |||
camelia | rakudo 117beb: OUTPUT«beginalivenever reached» | ||
timotimo | ... that's ... embarassing | ||
r: say "begin"; my @lazy := 1..*; say "alive"; my @a = for 1..* { $_ }; say "never reached"; | |||
camelia | rakudo 117beb: OUTPUT«===SORRY!===Word 'for' interpreted as a listop; please use 'do for' to introduce the statement control wordat /tmp/4WfYfvI7E9:1------> @lazy := 1..*; say "alive"; my @a = for⏏ 1..* { $_ }; say "never reached";Unexpected blo… | ||
PerlJam | augustus: re \foo, see S06:1257 | ||
synopsebot | Link: perlcabal.org/syn/S06.html#line_1257 | ||
timotimo | well, you get the idea. | ||
augustus | I think so :) | 01:30 | |
PerlJam | timotimo: p6 is far lazier than you give it credit for ;) | 01:31 | |
timotimo | :) | ||
augustus | so I see stuff like \JVM."method/methodname()" so I'm guessing that's how I run a java method. Any idea how I would access System.out, which is a static object? | 01:32 | |
timotimo | no :( | ||
01:54
jaldhar left
|
|||
augustus | I'm not sure where to look for the logic that is parsing out 'method/methodname' to understand the syntax. It must be different for static functions. I tried accessing a static method of System rather than accessing out, but no dice. | 01:55 | |
timotimo | that's JVM internal i believe | 02:00 | |
augustus | hmm that never occurred to me lol | 02:03 | |
02:04
orafu left,
OuLouFu joined,
OuLouFu is now known as orafu
|
|||
augustus | also even though everything is static, I need to create a new object. I see now that I have a TypeObject, but I probably need a JavaObjectWrapper to call functions | 02:04 | |
* I probably need to create a new object. just guessing here | 02:05 | ||
02:07
Celelibi left
02:12
raiph joined
02:13
btyler left
|
|||
raiph | augustus: aiui: nqp is a relatively small p6 subset (lang, compiler and runtime) | 02:18 | |
not a strict subset, but pretty close | |||
rakudo is a full p6 (compiler and runtime) that is written in itself as far as possible and in nqp for most of the rest | 02:19 | ||
augustus | raiph: unless I'm bootstrapping a new environment, I get the impression that I shouldn't have to use NQP directly | ||
raiph | right | ||
02:20
benabik left
|
|||
raiph | NQP is playing the role of C in perl5 | 02:20 | |
augustus | right now I'm just trying to get a feel for how big of a challenge it will be to make some servlets (or similar) in perl6 and run them in Tomcat for example | ||
02:20
benabik joined
|
|||
raiph | (one key advantage is that if you know P6, it's a lot easier to become a guts hacker) | 02:21 | |
augustus | yes, that seems nice | ||
raiph | i think you're way early | ||
diakopter | .. Larry's giving the SotO | ||
.. and they're not streaming it | 02:22 | ||
........ and theyre not even recording it | |||
!! | |||
raiph | that's bizarre | ||
diakopter | well, I haven't seen a recording of it for 7 years | 02:23 | |
augustus | raiph: it seems like most of the hard bits are in place, but we're not to a point of having docs so if there's nobody online when I'm here, I'm left to dig around and guess and check ;) | ||
raiph | augustus: yes. it's more extreme than usual too | ||
cuz it's not even yet caught up with parrot | 02:24 | ||
colomon | .tell jnthn … if gather / take on long lists is a problem, is it also affecting lines()? | ||
yoleaux | colomon: I'll pass your message to jnthn. | ||
raiph | augustus: and jnthn and sorear are the main guys to ask questions | ||
and sorear has been away for a while | |||
and jnthn is going away for a week | 02:25 | ||
timotimo | diakopter: why isn't it like at a concert where every person holds up their phone and records? | 02:26 | |
augustus | well I'm certainly just fiddling around at this point | ||
02:26
jaldhar joined
|
|||
augustus | well thanks everyone for the help, but it's closing time in these parts | 02:27 | |
timotimo | good night! :) | ||
02:27
augustus left
|
|||
raiph | good night | 02:28 | |
diakopter: are you at oscon, or just in touch with folk in the room? | 02:38 | ||
02:40
colomon left
02:42
PZt left
03:00
lue joined
03:17
fridim_ joined
03:31
preflex left
03:33
preflex joined,
ChanServ sets mode: +v preflex
03:54
BenGoldberg left
04:32
raiph left
04:44
birdwindupbird joined
04:47
xiaoyafeng joined,
crab2313 joined
04:51
SamuraiJack joined,
xiaoyafeng left
05:02
raiph joined
05:04
cbk left
05:45
hypolin joined
|
|||
lizmat | good *, #perl6! | 05:51 | |
jnthn: spectesting the var-traits branch, it seems to have broken "is dynamic" | 05:52 | ||
or alternately, "is dynamic" was a noop before, breaks now, and the tests in t/spec/S02-names/caller.t were bogus / are bogus now | 05:53 | ||
05:55
wtw joined
|
|||
lizmat | also: "is TypeObject", e.g. as in "my %h is KeyBag", previously probably a noop, now breaks | 05:58 | |
we seem to have an unspecced mention of "is context" in "t/spec/S03-binding/scalars.t", that previously appeared to pass | 06:02 | ||
"will start" now bombs, rather than being a noop | 06:04 | ||
06:05
hypolin left
|
|||
lizmat | I guess this is generally for "will (phaser)" | 06:05 | |
"is readonly" apparently is not specced as a variable trait, but is spectested as such in t/spec/S06-traits/is-readonly.t, and now bombs | 06:09 | ||
06:12
fridim_ left
|
|||
lizmat | same applies for "is rw" | 06:13 | |
06:13
iSlug joined
|
|||
lizmat | This concludes my testing on the "var-traits" branch | 06:14 | |
06:20
sqirrel joined
06:22
raiph left
06:26
raiph joined
|
|||
lizmat | spectesting fixes for "is rw", "is readonly" | 06:26 | |
06:30
raiph left
06:32
FROGGS joined
06:35
PZt joined
06:36
vishal_ joined
|
|||
vishal_ | hii | 06:36 | |
whats new in perl . | 06:37 | ||
.6 | |||
lizmat | hi vishal_ , when was the last time you checked ? | ||
vishal_ | hi lizmat ...its my first time .... | 06:38 | |
lizmat | have you checked perl.org ? | 06:39 | |
perl6.org rather | |||
if you're well versed in Perl 5, you might find perlgeek.de/en/article/5-to-6 an interesting read | 06:40 | ||
vishal_ | honestly speaking .. no | ||
i chcked from other sites | |||
06:41
cbk joined
|
|||
vishal_ | ok i 'll get through it . | 06:41 | |
FROGGS | vishal_: this might be a start too: en.wikipedia.org/wiki/Perl_6 | ||
vishal_ | is it good to stick to perl .. and not to go after many languages .... | 06:42 | |
just in regard to future prospect . | |||
FROGGS | good question | ||
lizmat | as we say in dutch: "We of WC-Duck recommend WC-Duck" | 06:43 | |
FROGGS | IMO you always benefit the more languages you know | ||
dalek | kudo/var-traits: c428a37 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Add "is readonly" and "is rw" traits on variables |
06:44 | |
lizmat | that was LHF | ||
vishal_ | guys i have started git too as a part of project ... @ rakudo | ||
the link u share contains info. of git ..... | 06:45 | ||
lizmat | vishal_: you mean the link in the messages from dalek? | ||
those are simply references to changes to Perl 6 just made | 06:46 | ||
FROGGS | vishal_: so a dev can review the commits of another, and everybody knows what's going on | ||
vishal_ | yes.. | 06:48 | |
dalek | kudo/var-traits: 7b901bd | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Add stubs for "is dynamic" and "is context", so at least they don't bomb like before |
06:51 | |
kudo/var-traits: c73fd26 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Add "is TypeObject" and "of TypeObject" traits |
06:58 | ||
kudo/var-traits: 17f6fe0 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Some code cosmetics and comments in variable traits |
07:02 | ||
07:14
rindolf joined
07:19
itz joined
07:23
fhelmberger joined
07:24
jlaire left
07:25
kaleem joined,
jlaire joined
07:26
domidumont joined
|
|||
lizmat | breakfast& | 07:28 | |
07:32
dayangkun joined,
dayangkun left
|
|||
hoelzro | r: @*ARGS=('foo', '--type=value', 'bar') sub MAIN(*@args, *%kwargs) { say @args; say %kwargs; } | 07:37 | |
camelia | rakudo 117beb: OUTPUT«===SORRY!===Two terms in a rowat /tmp/zxdbCGbrsp:1------> @*ARGS=('foo', '--type=value', 'bar') ⏏sub MAIN(*@args, *%kwargs) { say @args;  expecting any of: postfix infix stopper infix or meta-infix… | ||
hoelzro | =( | ||
so, I think I found another bug with MAIN | |||
07:40
domidumont left,
domidumont joined
07:43
rindolf left,
rindolf joined
|
|||
lizmat | std: my $a will leave 42 | 07:49 | |
camelia | std c2215f0: OUTPUT«===SORRY!===Missing block at /tmp/0Lp963n3G8 line 1:------> my $a will leave ⏏42Parse failedFAILED 00:00 42m» | ||
dalek | kudo/var-traits: f4b2ce4 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Stub phaser traits: alas, dispatch is not yet successful |
07:51 | |
07:52
xinming left
07:53
xinming joined
|
|||
lizmat | Is there a difference between "my Int $a", "my $a is Int" and "my $a of Int" ? | 07:54 | |
JimmyZ | I think Syn said it | 07:55 | |
GlitchMr | lizmat: Only 'my Int $a' works. | 07:56 | |
lizmat | well, currently, yes | 07:57 | |
GlitchMr | Two others are syntax errors. | ||
std: my $a is Int | |||
camelia | std c2215f0: OUTPUT«ok 00:00 42m» | ||
GlitchMr | Or not | ||
timotimo | hehe :) | ||
GlitchMr | n: my $a is Int | 07:58 | |
camelia | niecza v24-88-g1f87209: OUTPUT«===SORRY!===Trait name not available on variables at /tmp/HnYyj0a4bo line 1 (EOF):------> my $a is Int⏏<EOL>Potential difficulties: $a is declared but not used at /tmp/HnYyj0a4bo line 1:------> my ⏏[3… | ||
JimmyZ | lizmat: search Container in S02 | ||
timotimo | can === cause "cannot look up attributes in a type object"? | ||
GlitchMr | In Rakudo is/of means nothing. | ||
For simple scalar variables. | |||
In Niecza, it's an error. | |||
STD doesn't notice. | |||
timotimo | r: class FooThing { has $.col; }; FooThing.new() === FooThing.new(); | ||
camelia | rakudo 117beb: ( no output ) | ||
GlitchMr | "is" means the scalar itself is implemented by a class. | 07:59 | |
lizmat | ok, so "my Int $a" and "my $a of Int" is the same | 08:00 | |
08:00
sqirrel left
|
|||
timotimo | r: class FooThing { has @.foo; }; FooThing.new.foo.push(1) | 08:00 | |
camelia | rakudo 117beb: ( no output ) | ||
GlitchMr | No | ||
timotimo | ... huh | ||
GlitchMr | Actually, let me check | ||
lizmat | JimmyZ++ | 08:01 | |
timotimo tries to modernize Druid | 08:02 | ||
08:02
rindolf left
08:03
rindolf joined
|
|||
GlitchMr | Actually, yes | 08:03 | |
Sorry for confusion | |||
JimmyZ | r: my Hash[Array] %book; | 08:04 | |
camelia | rakudo 117beb: ( no output ) | ||
08:07
daxim joined
|
|||
dalek | kudo/var-traits: fca7ef6 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make variable "is" trait a stub again, it is not the same as "of" |
08:09 | |
08:09
rindolf left
|
|||
timotimo | apparently there once was a "defined" | 08:09 | |
08:09
rindolf joined
|
|||
timotimo | what's the modern equivalent? blah.defined, right? | 08:09 | |
GlitchMr | defined | 08:10 | |
Or method | |||
timotimo | # Looks like you failed 24 tests of 30 | ||
GlitchMr | rn: my Int $variable; say defined $variable; say $variable.defined; | ||
camelia | rakudo 117beb, niecza v24-88-g1f87209: OUTPUT«FalseFalse» | 08:11 | |
GlitchMr | std: my Int $variable; say defined $variable; say $variable.defined; | ||
camelia | std c2215f0: OUTPUT«ok 00:00 43m» | ||
timotimo | r: my Int $var; say !defined $var; | ||
camelia | rakudo 117beb: OUTPUT«True» | ||
timotimo | huh? | ||
GlitchMr | $var contains (Int), the class itself. | ||
So it isn't defined. | |||
timotimo | right. | 08:12 | |
08:12
bbkr joined,
bbkr left
|
|||
timotimo | i was confused because i thought i had been getting an error from that syntax | 08:12 | |
but that turns out not to be the case | |||
GlitchMr | rn: say (9/7).new(7, 3) | ||
camelia | rakudo 117beb, niecza v24-88-g1f87209: OUTPUT«2.333333» | ||
GlitchMr | Interesting. I guess it's because instances of objects also have .new. | 08:13 | |
timotimo | an excellent way to not get the changes you expect is to forget make, but then use -Iblib/lib | ||
arnsholt | timotimo: I do that with alarming frequency =) | 08:14 | |
GlitchMr | rn: say Date.new.new.new.new.new('2011-11-11') | 08:15 | |
camelia | niecza v24-88-g1f87209: OUTPUT«===SORRY!===Undeclared name: 'Date' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36)  at /home/p… | ||
..rakudo 117beb: OUTPUT«2011-11-11» | |||
timotimo | aaaah, i get what caused the error | 08:17 | |
it looked like ok defined foo, "some message" | |||
apparently the code at one point hoped for "defined" to not grab the "some message" as well | 08:18 | ||
r: use Test; my Int $a; ok !defined $a, "everything is okay"; | 08:19 | ||
camelia | rakudo 117beb: OUTPUT«===SORRY!===CHECK FAILED:Calling proto of 'defined' will never work with argument types (Int, Str) (lines 1, 1) Expected: :(Mu )» | ||
GlitchMr | The issue is that Perl 6 doesn't have prototypes (of course, you can use prefix:<defined>, but I don't think any builtin function does that). | ||
timotimo | right | ||
GlitchMr | Well, Perl 5 prototypes. | ||
timotimo | yes | 08:21 | |
moritz | we had 'defined' as a prefix, and it was confusing as hell | ||
timotimo | "result: PASS" | 08:23 | |
08:23
rindolf left
08:24
rindolf joined
|
|||
dalek | kudo/sized-arrays: cecbc1b | Arcterus++ | src/ (2 files): Sized arrays now work for attributes |
08:27 | |
kudo/sized-arrays: 0ca221e | jonathan++ | src/ (2 files): Merge pull request #185 from Arcterus/sized-arrays Sized arrays now work for attributes |
|||
08:27
cognominal__ left
|
|||
timotimo | jnthn: good day :) | 08:30 | |
FROGGS | hi timotimo | 08:31 | |
hi all | |||
JimmyZ | hi | 08:32 | |
FROGGS | hi JimmyZ | ||
JimmyZ: what are your plan atm? | |||
timotimo | heyo froggs | 08:33 | |
JimmyZ | FROGGS: waiting for bootstarp? I guess | ||
*bootstrap | |||
FROGGS | yeah | ||
that would be awesome | |||
JimmyZ | the most blockers now are not that LHF | 08:34 | |
FROGGS | jnthn: if you can tell me something I could prepare/do for that to make it easier for you, please tell me :o) | ||
I mean, there are still some ops missing (the ones without tests), but dont think they are immediately needed | 08:36 | ||
08:36
rindolf left
08:37
rindolf joined,
ecocode joined
08:44
kivutar joined
08:49
rindolf left,
rindolf joined
08:50
sqirrel joined
|
|||
timotimo | oh wow! | 08:53 | |
the text display for druid appears to be working again! | |||
the computer players like to build high, high towers it seems | |||
jnthn | FROGGS: Well, one next step is getting the MAST nodes file to compile, and after that getting QAST -> MAST compiler also building on Moar | 08:58 | |
yoleaux | 02:24Z <colomon> jnthn: … if gather / take on long lists is a problem, is it also affecting lines()? | ||
09:00
rindolf left
09:01
rindolf joined
|
|||
FROGGS | jnthn: I'll look into that | 09:01 | |
09:04
kivutar left
|
|||
jnthn | yayz, vacation tomorrow | 09:05 | |
lizmat: I suspect we'd find trait stuff missing all over teh place :) | |||
FROGGS | :o) | ||
jnthn | *suspected | ||
lizmat: I think is context and is dynamic may be "synonyms" (one is the old word for the other) | 09:07 | ||
timotimo | well, there you have it: github.com/timo/druid/ | 09:08 | |
jnthn | lizmat: Are all the var traits spec'd? | ||
09:11
SamuraiJack_ joined,
SamuraiJack left
09:13
kivutar joined
09:22
rindolf left,
rindolf joined
|
|||
lizmat | jnthn: is context then probably is the older one, right? | 09:23 | |
09:23
dmol joined
|
|||
jnthn | lizmat: If it's not in spec, then I guess so... | 09:23 | |
lizmat | is context is not in the spec | 09:24 | |
jnthn | lizmat: Yeah, just searched and found the same... | ||
is dynamic is there | |||
And oes what I recall is context doing | |||
lizmat | also, with regards to "of TypeObject" | ||
jnthn | So I think "is dynamic" is the current name for that | ||
lizmat | wouldn't that be as simple as doing TypeObject.new into the value of the variable ? | ||
jnthn | Note .new | 09:25 | |
*not | |||
It's also about setting the constraint I guess | |||
09:25
wk joined
|
|||
jnthn | Needs .set_of or so, and then I guess set the value and perhaps default too. | 09:25 | |
my $x of Int; should come out working like my Int $x; | 09:26 | ||
09:26
wk is now known as Guest50868
|
|||
lizmat | I think we just established earlier todat that "my Int $x of Foo" is specced and not the same as my Foo $x; | 09:28 | |
jnthn does wonder a little if is and of should be handled specially inside the Actions... | |||
my Int $x of Foo should probably be an error. | |||
std: my Int $x of Foo; | |||
camelia | std c2215f0: OUTPUT«===SORRY!===Invalid type name at /tmp/ZaBXEa5klx line 1:------> my Int $x of ⏏Foo; expecting typenameParse failedFAILED 00:00 42m» | ||
jnthn | std: my Int $x of Num; | ||
camelia | std c2215f0: OUTPUT«===SORRY!===Extra 'of' type; already declared as type Int at /tmp/FFqQAwo39x line 1:------> my Int $x of Num⏏;Check failedFAILED 00:00 42m» | ||
jnthn | Like that. | ||
They're saying the same thing. | 09:29 | ||
dalek | kudo/var-traits: 624a6e7 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: "is context" is old for "is dynamic", so we don't need it |
||
jnthn | The other interesting one is "is" | ||
JimmyZ | std: Class Foo {}; my Int $x of Foo; | ||
camelia | std c2215f0: OUTPUT«===SORRY!===Two terms in a row at /tmp/bgM9RJxqSV line 1:------> Class ⏏Foo {}; my Int $x of Foo; expecting any of: feed_separator infix or meta-infix infixed function statement modifier loopParse failedFAILED 00:00 | ||
..43… | |||
timotimo | that depends on what your definition of 'is' is, jnthn | 09:30 | |
jnthn | my int32 @x of Buf # probably wants to work... | ||
darnit | |||
my int32 @x is Buf # probably wants to work... | |||
Which is like | |||
lizmat | S02:487 | ||
synopsebot | Link: perlcabal.org/syn/S02.html#line_487 | ||
jnthn | my @x is Buf of int32; # though I guess that may parse differently... | ||
Yes, the spec seems to be agreeing with what I just said :) | 09:31 | ||
of means "what can we store in this container type" | |||
is means "what type of container is it" | |||
timotimo: It is what it is... :P | 09:32 | ||
lizmat | of course | ||
.oO( what a nice name for a variable trait: "of course" ) |
|||
jnthn | Anyway, I'm open to "is Type" and "of Type" being treated specially in Actions rather than being actual trait dispatches... | 09:33 | |
moritz | until somebody creates a class rw { } :-) | 09:34 | |
jnthn | :P | ||
yeah | |||
I'm fine with trying to figure out how to really implement them as traits too | |||
But if we do that, there will certainly be an ordering dependency. | 09:35 | ||
my $x is readonly is SomeOtherThing; # oops, set readonly too early | |||
That may work out depending how we do it, I guess... | |||
jnthn guesses he should be wary of cheating, since cheating normally gets caught... :) | 09:36 | ||
lizmat | why would order matter here, I mean they work on the same containerdescriptor? | ||
or do you mean the readonly will stop further changes to the variable? | 09:37 | ||
jnthn | I guess it works in that case in so far as we can migrate the container descriptor to the new container type | ||
The tricky one really is "is" | 09:38 | ||
Because it's not tweaking, it's an entire replacement | |||
lizmat | ok | 09:41 | |
09:42
pmurias joined
09:44
rindolf left,
rindolf joined,
rindolf left
|
|||
lizmat | what's this syntax about ? "@$+arrayref" | 09:46 | |
with "my $arrayref is dynamic = list(1,2,3);" before it | |||
09:46
crab2313 left
|
|||
jnthn | o.O | 09:47 | |
I have NO idea!! | |||
lizmat | test was being marked for "is dynamic", but was in fact testing @$+ syntax | 09:48 | |
jnthn | std: my $arrayref is dynamic = list(1,2,3); say @$+arrayref | ||
camelia | std c2215f0: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/CYosDEEgBl line 1:------> $arrayref is dynamic = list(1,2,3); say ⏏@$+arrayrefUse of uninitialized value $first in string eq at STD.pm line 66215.Use of uninitializ… | ||
lizmat | that's the error I get | ||
jnthn | lizmat: I wonder if it's meant to be @$*arrayref, which is what would make sense given the "is dynamic"... | ||
lizmat | ah, ok, maybe a leftover from the "is context" days | 09:49 | |
jnthn | perhaps | ||
lizmat | std: my $arrayref is dynamic = list(1,2,3); say @$*arrayref | ||
camelia | std c2215f0: OUTPUT«ok 00:00 45m» | ||
09:51
SamuraiJack__ joined
|
|||
lizmat | tests pass if I change to @$*, so I assume that is what we want to test | 09:52 | |
jnthn | :) | 09:54 | |
lizmat | last test in t/spec/S04-statements/lift.t still fails | 09:55 | |
09:55
SamuraiJack_ left
|
|||
lizmat | this in conjunction with "lift" | 09:55 | |
maybe "is context" *was* already working as it should? | |||
jnthn | We don't implement lift, so I'd be very surprised if that test works... :) | 09:56 | |
lizmat | std: my $a is context | ||
camelia | std c2215f0: OUTPUT«ok 00:00 42m» | ||
lizmat | std: my $a is foo | ||
camelia | std c2215f0: OUTPUT«ok 00:00 42m» | ||
lizmat | I guess the "eval_dies_ok" was failing for the wrong reason, and the change now but the breakage outside of the eval | 09:57 | |
I'll put a skip around it | |||
shall I create a branch for these test fixes? | 09:58 | ||
jnthn | lizmat: To merge when var-traits merges? Sounds sane. | ||
lizmat | the only blocker I really see at the moment is "will leave BLOCK" not finding the trait mod | ||
and thus dieing (whereas it was silently failing before) | 09:59 | ||
jnthn | Why can't we add a trait mod for it? | ||
lizmat | multi trait_mod:<will>(Variable:D $v, Block:D :$begin ) { | ||
is what I have so far | |||
it won't find it | |||
09:59
pmurias_ joined
|
|||
jnthn | That needs to be a required named arg | 09:59 | |
As they are optional by default | 10:00 | ||
:$leave! should do it | |||
lizmat | grrr | ||
lemme check | |||
pmurias | jnthn: in nqp is it possible to declare a contextual without binding any value to it? (for testing purposes) | ||
that is avid my $*FOO binding a NQPMu to $*FOO? | 10:01 | ||
jnthn | pmurias: Well, what are you expecting it to have? | ||
lizmat | so, wrt to "will": I guess we need to create a closure with $_ being aliased to the variable, and add that to the appropriate phaser | ||
jnthn | pmurias: You can always := nqp::null() I guess | ||
lizmat: I was trying to work out how to do those. It's really tricky. | |||
lizmat: Because of course there are gonna be *many* variables. | 10:02 | ||
lizmat: Oh, maybe it's OK though...'cus the block is in the right place.... | |||
hmmm | |||
lizmat: The problem is how to get the variable passed into the block as its topic I guess. | |||
lizmat | if you need better optimization, create a single phaser | ||
yes, that's one of the things I don't see right now | 10:03 | ||
the second one is adding the phaser: or is that as easy as doing Block.add_phaser? | |||
jnthn | There's probably a decent solution, I just don't immediately have it. | ||
That second bit is easy enough, in theory | |||
lizmat | let's start by adding the phaser | 10:04 | |
I can fiddle with the rest next week | |||
10:04
pmurias_ left
|
|||
jnthn | OK. I suspect it shall be non-trivial... | 10:04 | |
lizmat | adding the phaser? | ||
jnthn | No, the other bit :) | ||
lizmat | $ perl6 -e 'my $a will leave { .say }=42' | 10:05 | |
===SORRY!=== | |||
Cannot call 'trait_mod:<will>'; none of these signatures match: | |||
:(Variable:D $v, Block:D :leave(:$leave)!) | |||
jnthn | odd | 10:07 | |
r: class A { has $!x will build { 42 } } | |||
camelia | rakudo 117beb: OUTPUT«===SORRY!===Cannot call 'trait_mod:<will>'; none of these signatures match::(Attribute $attr, Block :build(:$build)!)at /tmp/013PAOuwQz:1------> » | ||
jnthn | d'oh, that one doesn't work either... | 10:08 | |
lizmat: Does trying Code instead of Block help? | |||
lizmat | lemme check | ||
jnthn | If so then (a) fine, maybe, and (b) something may have bitrat | ||
lizmat | nope, same error, differen list of candidates | 10:13 | |
s/Block/Code/ | |||
10:13
colomon joined
|
|||
lizmat | maybe it fails on the Variable:D match ? | 10:13 | |
jnthn | That'd be odd given the other traits work with that | 10:14 | |
lizmat: Maybe take the second constraint off and see what you get passed? | |||
lizmat | was just thinking that, checking | ||
dalek | kudo/sized-arrays: 1a8914a | Arcterus++ | src/Perl6/World.nqp: Allow different values for attribute sizes |
10:18 | |
kudo/sized-arrays: 37246ac | jonathan++ | src/Perl6/World.nqp: Merge pull request #186 from Arcterus/sized-arrays Allow different values for attribute sizes |
|||
lizmat | jnthn: even without constraint, it is not finding the traitmod | 10:19 | |
jnthn | lizmat: ohh | 10:20 | |
lizmat | is Perls/Actions, line 3634 correct ? | 10:21 | |
Perl6 | |||
jnthn | yeah, that's what I was just looking at | ||
It calls it as trait_mod:<will>($declarand, $block, :leave) for example | |||
So that's why the dispatch fails | 10:22 | ||
lizmat | it should be :leave($block) ? | ||
jnthn | Good question... :) | 10:28 | |
timotimo | shouldn't it be :$leave? | ||
or that, yeha | |||
jnthn | Well, the correct signature is | ||
multi trait_mod:<will>(Attribute:D $attr, $block, :$build!) { ... } | |||
for example | |||
timotimo | "will build"? | 10:29 | |
jnthn | We could change the way we dispatch to trait_mod:sym<will> if the spec doesn't say one way or the other, I guess... | ||
timotimo: yes, it exists :) | |||
timotimo reads spec | 10:30 | ||
10:30
cognominal joined
|
|||
timotimo | cannot be found with google >_> | 10:30 | |
10:35
cognominal left
|
|||
lizmat | jnthn: apparently, doing .set_of on the ContainerDescriptor, is not enough to make it "stick" like specifying it with a type object as prefix | 10:38 | |
aka: my Int $x, works, my $x of Int doesn't quite | |||
jnthn | lizmat: "stick"? | 10:39 | |
lizmat | $ perl6 -e 'my $x of Int = 42' | ||
Type check failed in assignment to '$x'; expected 'Int' but got 'Int' | |||
jnthn | lizmat: Missing nqp::decont somewhere, maybe | ||
lizmat | trying | ||
indeed, missing decont | 10:44 | ||
10:46
colomon left
|
|||
timotimo | àu contâiner | 10:46 | |
jnthn | :P | 10:47 | |
dalek | kudo/var-traits: 9057f2d | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make "will phaser {]' parameter mandatory |
||
kudo/var-traits: 68ece49 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make sure we decont the "of" so that it works, suggested by jnthn++ |
|||
timotimo | oh god no mismatching braces | ||
jnthn | omg...the world will end! | 10:48 | |
lizmat | oops | ||
what now? | |||
10:48
Celelibi joined
|
|||
jnthn | "will phaser {]' | 10:49 | |
mismatched brackets AND quotes :P | |||
lizmat | what can I say, I like to break things :-) | ||
jnthn | ;-) | 10:50 | |
lizmat | and occasionally forget to press the shift key :-) | ||
10:57
kivutar left
|
|||
lizmat | hmmm….. "of" still has another problem: | 10:58 | |
$ perl6 -e 'my %h of Int' | |||
===SORRY!=== | |||
Can not get attribute '$!descriptor' declared in class 'Scalar' with this object | |||
jnthn | What's your of impl look like? | 10:59 | |
lizmat | nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of(nqp::decont($of)); | ||
jnthn | huh... | ||
lizmat | I guess it needs to check for "meta" containers as hashes and arrays ? | ||
jnthn | um, did you mean $v.var.VAR.WHAT? | 11:00 | |
But yeah, probably... | |||
lizmat | the line was really cat-licensed from your "is default: implementation | ||
.oO( oops, I did it again) |
|||
jnthn | I can't get everything right :P | 11:01 | |
But yeah, is default will be wrong also then :) | 11:02 | ||
11:02
xenoterracide joined
|
|||
lizmat | seems to work for single containers | 11:03 | |
$ perl6 -e 'my $a is default(42); say $a' | |||
42 | |||
but indeed equally wrong for meta-containers: | 11:04 | ||
$ perl6 -e 'my @a is default(42)' | |||
===SORRY!=== | |||
Can not get attribute '$!descriptor' declared in class 'Scalar' with this object | |||
jnthn | Right. | ||
lizmat | will do some tests | 11:05 | |
dalek | kudo-js: 3acc37a | (Pawel Murias)++ | runtime/ctx.js: Stop silently ignoring failed lookups and binds. |
11:06 | |
kudo-js: 0fa2ec8 | (Pawel Murias)++ | / (3 files): Implement qastnode. Marke lexicals that are not explicitly bound to anything in the Ctx so that contextual lookup works correctly. Pass test 34-rxcodeblock.t |
|||
jnthn | pmurias++ | ||
11:09
mtk left,
jaldhar left
11:12
mtk joined
|
|||
lizmat | is default with $v.var.VAR.WHAT gives: | 11:16 | |
$ perl6 -e 'my @a is default(42)' | |||
This type does not support elems | |||
11:17
colomon joined
11:23
vishal_ left
|
|||
lizmat | r: my @a:=42 # LTA error message ? | 11:24 | |
camelia | rakudo 117beb: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Int' in block at /tmp/QqFNGBXo9Y:1» | ||
timotimo | r: my @old = "hello".comb; push @old, ' ' xx (15 - +@old); say @old; | 11:26 | |
camelia | rakudo 117beb: OUTPUT«h e l l o » | ||
timotimo clears up "RAKUDO: " naggings from druid | 11:27 | ||
rakudo surely has come a long way those four years | |||
r: my $subname = "foobar"; say "sub foobar" ~~ / 'sub ' $subname / | 11:28 | ||
camelia | rakudo 117beb: OUTPUT«「sub foobar」» | ||
dalek | kudo/var-traits: 5204a3f | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Added additional dereference, as suggested by jnthn++ It doesn't break anything new, and makes some other errors messags more sane. |
11:29 | |
11:29
colomon left
|
|||
FROGGS | nqp: say(nqp::objprimspec(42)) | 11:31 | |
camelia | nqp: OUTPUT«0» | ||
FROGGS | nqp-jvm: say(nqp::objprimspec(42)) | ||
camelia | nqp-jvm: OUTPUT«1» | ||
lizmat | jnthn: looks like MetaModel::ArrayType only has a "array_type" attribute | 11:32 | |
jnthn | lizmat: ? | 11:33 | |
lizmat: Why are you looking at that? | |||
lizmat | well, to get "my @a is Int" to work | ||
11:33
crab2313 joined
|
|||
jnthn | Ah | 11:33 | |
lizmat | well, to get "my @a of Int" rather | ||
jnthn | That's something completely different :) | ||
lizmat | sorry, I meant "my @a of Int" | ||
$ perl6 -e 'my @a of Int; say @a[0]' | 11:34 | ||
(Any) | |||
r: my Int @a; say @a[0] | 11:35 | ||
camelia | rakudo 117beb: OUTPUT«(Int)» | ||
11:35
sqirrel left
|
|||
jnthn | Yeah, best I can suggest is looking at how %container_info gets populated when it sets that stuff up | 11:35 | |
lizmat | ok, will do | 11:36 | |
fwiw: I'm completely blocked on "will phaser {}" | 11:37 | ||
but I think we can merge the branch | 11:38 | ||
and unfudge some passing TODO's, and changes some "todo"s into "skip"s | |||
jnthn | You managed to fix the trait signatures, though? | 11:39 | |
lizmat | you mean: $ perl6 -e 'my $a will leave { .say }' | 11:41 | |
===SORRY!=== | |||
Cannot call 'trait_mod:<will>'; none of these signatures match: | |||
no | |||
:-( | |||
jnthn | What did you change it to? | ||
lizmat | back to Block, as Code or no constraint did not fix the problem | ||
jnthn | oh, you didn't do the 3-arg way I said? | ||
lizmat | did I miss something ? | 11:42 | |
you mean in Actions? | |||
11:42
sqirrel joined
|
|||
jnthn | < jnthn> multi trait_mod:<will>(Attribute:D $attr, $block, :$build!) { | 11:42 | |
Or Variable and :$leave! in your case. | |||
lizmat | missed that :-( | ||
will do now | 11:43 | ||
jnthn | ah :) | ||
lizmat | with regards to adding the phaser, I assume some call to Block.add_phaser () ? | 11:46 | |
11:46
jaldhar joined
|
|||
lizmat | for the block typy things ? | 11:46 | |
jnthn | Yeah | ||
You need to add it to the scope where the variable is being declared | |||
Which *should* be something like $var.block.add_phaser('LEAVE', $block) or so | 11:47 | ||
lizmat | and how do I look up that scope? &?BLOCK ? | ||
okidoki, will try | |||
jnthn | No, it's meant to be supplied by the Variable instance you get | ||
I never tried it, but I put in code that should do it. | |||
lizmat | will see | ||
signature dispatches now | 11:48 | ||
jnthn | yay | ||
FROGGS | jnthn: in nqp/parrot, smo_id is short for six model object... ? | ||
dalek | kudo/var-traits: a593d80 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Correct signature for "will phaser {}" dispatches, suggested by jnthn++ |
11:49 | |
11:49
jaldhar left
|
|||
jnthn | FROGGS: type ID | 11:49 | |
FROGGS: Parrot gives all dynpmcs a unique ID | |||
FROGGS: So really any mention of it means "is this a 6model object" | |||
11:49
jaldhar joined
|
|||
FROGGS | k | 11:49 | |
jnthn | FROGGS: Over on JVM, eveyrthing is one...on Parrot we have a frothy mix :) | ||
FROGGS | yeah, right | 11:50 | |
11:52
colomon joined
|
|||
lizmat | working almost: $ perl6 -e 'my $a will leave { say $a }' | 11:54 | |
===SORRY!=== | |||
Variable '$a' is not declared | |||
$ perl6 -e 'my $a will leave { say "Goodbye" }' | 11:55 | ||
Goodbye | |||
I guess the first can be fixed by having $_ aliased to the variable | |||
jnthn | The first looks...tricky | 11:57 | |
std: my $a will leave { say $a } | |||
camelia | std c2215f0: OUTPUT«ok 00:00 44m» | ||
jnthn | Hm | 11:58 | |
Wonder how STD does it | |||
We register variables a little too late, it seems... | |||
lizmat | maybe the mod_trait should pre-register the variable? | 12:00 | |
traiit_mod | |||
.oO( shouldn't get up at 6:30 ) |
12:01 | ||
jnthn | No, I suspect it goes deeper than that :/ | 12:03 | |
lizmat | I guess aliasing the variable to $_ will have the same probem? | 12:10 | |
problem | 12:11 | ||
12:11
fridim_ joined
|
|||
jnthn | There's a rather tricky compile time (when the trait applies) / runtime boundary issue here. | 12:12 | |
I'll have to think for a bit how to solve it. | |||
It may need some kind of custom op... | |||
12:12
Celelibi left
|
|||
lizmat | well, some of these now work | 12:12 | |
which is a hell of a lot more than before | |||
12:13
bluescreen10 left
|
|||
lizmat | and the syntax doesn't bomb anymore | 12:13 | |
12:13
Celelibi joined,
skids left
|
|||
jnthn | aye | 12:13 | |
dalek | kudo/var-traits: 4856368 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: First sort of functional phasers implementation with "will" variable trait |
12:14 | |
lizmat | $ perl6 -e 'my $a will leave { say "Goodbye" }' | ||
Goodbye | |||
$ perl6 -e 'my $a will pre { say "Hello" }' | 12:16 | ||
Hello | |||
moritz | \o/ | ||
lizmat | moritz! | 12:17 | |
moritz | lizmat! | ||
12:19
kivutar joined
|
|||
dalek | ast: 2d48e36 | (Elizabeth Mattijsen)++ | S0 (3 files): Fix tests relating to "is context", which apparently now is "is dynamic" |
12:20 | |
moritz | and... | ||
features! | |||
lizmat | need to have some new things for next months changelog! | ||
jnthn | Aye :) | 12:21 | |
We Blob/Buf and related improvements also for this one :) | 12:22 | ||
12:23
PacoLinux joined
|
|||
lizmat | S04:1457, shouldn't that be "will first" ? | 12:25 | |
synopsebot | Link: perlcabal.org/syn/S04.html#line_1457 | ||
lizmat | there is no START phaser, is there ? | 12:26 | |
gfldex | r: say Array ~~ Positional; subset Foo of Int|Str; sub s(Foo @foos){}; my Foo @a = 1, 'a'; s(@a); | ||
camelia | rakudo 117beb: OUTPUT«TrueConstraint type check failed for parameter '@foos' in sub s at /tmp/TNqMfsEC9x:1 in block at /tmp/TNqMfsEC9x:1» | ||
gfldex | huh? | 12:27 | |
r: say Array ~~ Positional; subset Foo of Int|Str; sub s(Foo @foos){}; my @a = 1, 'a'; s(@a); | |||
camelia | rakudo 117beb: OUTPUT«TrueNominal type check failed for parameter '@foos'; expected Positional but got Array instead in sub s at /tmp/80tIdRmhAN:1 in block at /tmp/80tIdRmhAN:1» | ||
12:27
dmol left
|
|||
lizmat | Int|Str maybe coerced into an Array? | 12:27 | |
12:28
Celelibi left
|
|||
gfldex | What i want to do is to have a typed list of Int|Str. jnthn told me to have it as a subset. However, I fail to convince rakudo to accept it as a type constrain in a signature. | 12:28 | |
12:29
Celelibi joined
|
|||
gfldex | is there any spec test on subsets as type constrain in a signature? | 12:29 | |
gfldex goes have a look himself | |||
12:29
xinming left
12:30
dmol joined
|
|||
lizmat | apparently "is start" seems reserved for state variables | 12:33 | |
12:33
xinming joined
|
|||
moritz | gfldex: any reason not use Cool instead of Int|Str? | 12:33 | |
12:33
sqirrel left,
daniel-s_ joined
|
|||
moritz | I mean, what about Rat, Num and all other similar types? | 12:33 | |
gfldex | it's just some random types | ||
moritz | r: subset Foo of Cool where Int|Str; sub f(Foo) { }; f(42); f([]) | 12:34 | |
camelia | rakudo 117beb: OUTPUT«Constraint type check failed for parameter '' in sub f at /tmp/KQQeYm92q9:1 in block at /tmp/KQQeYm92q9:1» | ||
gfldex | I actually have something reasonable (i hope) where it doesnt work. Little big that stuff for golfing. | ||
moritz | gfldex: 'subset Foo of Int|Str' doesn't do what you want. 'subset Foo of <common base typ> where <contraint>' is what you need | 12:35 | |
12:36
dmol left
|
|||
gfldex | r: gist.github.com/gfldex/6088554 | 12:40 | |
camelia | rakudo 117beb: OUTPUT«Nominal type check failed for parameter '@nodes'; expected Positional but got Array instead in sub html at /tmp/K5pRZNM9QU:11 in block at /tmp/K5pRZNM9QU:15» | ||
gfldex | moritz: doesn't work for me either. Could you have a look at my gist? | 12:41 | |
dalek | kudo/var-traits: 5622d4a | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Add provisional "will start" state variable trait |
12:42 | |
timotimo | that doesn't do what you want to; it'd only work if you have my HTML-nodes @foo and pass that | ||
moritz | gfldex: the problem is that what you pass in is just a plain Array | ||
gfldex: not an Array[HTML-nodes] | |||
so, best not to use typed arrays at all for now | |||
lizmat | moritz? isn't that not eating our own dogfood? | 12:43 | |
pmurias | jnthn: would it be ok if I refactored out the code that serializes the sc into a seperate method? | ||
jnthn: that would allow me to monkey patch my serialization "caching" hack in without copy&paste | 12:44 | ||
jnthn | pmurias: sounds ok to me | ||
lizmat | jnthn: the Variable.$.block attribute: is that intend for "will start" ? | 12:45 | |
12:45
dmol joined
|
|||
jnthn | If you're going to use typed arrays, you simply have to pass an array declared with a type in the first place. | 12:45 | |
It doesn't enforce it by checking all the elements of a (potentially lazy) thing, but by the declared type. | |||
lizmat: It's intended to let you get at the block where the variable is being declared. | 12:46 | ||
lizmat | ah, ok | ||
timotimo | r: my Int @foo := gather { take 1; take 2; take 3; take "oh god no!" }; say @foo[^2]; say "alive!"; say @foo[^10]; say "hopefully not alive?" | ||
camelia | rakudo 117beb: OUTPUT«Type check failed in binding; expected 'Positional' but got 'List' in block at /tmp/0kHkC7NbQ_:1» | ||
gfldex | jnthn: so a slurpy types array will never work in perl6? | ||
timotimo | hmm. | ||
gfldex: i once proposed to have rakudo throw an error, but people warned me it might have ecosystem fallout | 12:47 | ||
r: sub foo(Int *@a) { say @a }; foo(1, 2, 3); | |||
camelia | rakudo 117beb: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Array instead in sub foo at /tmp/fIpfy_LAsw:1 in block at /tmp/fIpfy_LAsw:1» | ||
timotimo | right. i wanted to replace that with a specific error message | ||
github.com/timo/rakudo/compare/fai...urpy_early | 12:48 | ||
gfldex | i would welcome such an error message | 12:51 | |
timotimo | sign the petition ;) | ||
12:51
PacoLinux left
|
|||
moritz | gfldex: lists in general have the problem that they can be infinite, so you aren't allow to reify them to check the types of the contents | 12:51 | |
12:52
PacoLinux joined,
sqirrel joined
|
|||
moritz | either we need to find a good solution, or forbid typed arrays (except for primitive types) | 12:52 | |
timotimo | native arrays can't be infinite? | 12:53 | |
pmurias | what's the idiomatic way of returning two values from a method in nqp? | ||
[$first,$second]? and my $ret = ...;$first = $ret[0];$second = $ret[1] on the caller side? | 12:54 | ||
gfldex | moritz: infinite lists come from a generator function with a gather/take. Would it not be possible to have a proper return type on the function and take check for that type? | 12:56 | |
JimmyZ | my ($1, $2) = $ret? | ||
12:57
dmol left
|
|||
FROGGS | JimmyZ: not in nqp | 12:57 | |
jnthn | pmurias: That's about as good as you get | 12:58 | |
timotimo | gfldex: not really a generator function per se; sometimes it's not even a block | 13:00 | |
moritz | gfldex: infinite lists also come from the series operator, .map on inifinte ranges etc. | ||
gfldex: and in some of these cases the error message would come from inside a core function, not from use-space code | |||
that would be very, very weird | |||
pmurias hopes when he actually gets to use full Perl 6 he won't be stuck in using the NQP subset ;) | |||
13:06
dmol joined
13:16
dayangkun joined
13:18
sqirrel left,
sqirrel joined
|
|||
FROGGS | are these tests supposed to fail? t/spec/S03-operators/set.rakudo.parrot and t/spec/S06-other/main-usage.rakudo.parrot? | 13:20 | |
lizmat | not sure | 13:22 | |
FROGGS | hmmm, main-usage passes when I run it separately | ||
13:22
dmol left
|
|||
lizmat | could it be that these are awaiting the var-traits branch merge ? | 13:22 | |
13:23
dmol joined
|
|||
gfldex | r: subset Foo of Cool where Int|Str; my Foo @a; say @a ~~ Foo; | 13:23 | |
camelia | rakudo 117beb: OUTPUT«False» | ||
gfldex | bug? | ||
FROGGS | lizmat: dunno about the set fails, but if it works when running directly it cant be because of newly added stuff | 13:24 | |
13:24
PacoLinux left
|
|||
colomon | gfldex: no, @a is an Array, not a Foo | 13:25 | |
moritz | gfldex: why would it be a bug? | ||
gfldex | if i tell it to be a Foo with my Foo @a; I assume it would be a Foo | 13:26 | |
dalek | p: 1541771 | (Tobias Leich)++ | / (2 files): fixed nqp::objprimspec |
||
FROGGS | r: say my Int @a ~~ Int | ||
camelia | rakudo 117beb: OUTPUT«False» | ||
FROGGS | r: say my Int @a ~~ Array | ||
camelia | rakudo 117beb: OUTPUT«True» | ||
FROGGS | r: say my Int @a ~~ Array # <---- an array where there elements are Ints | ||
camelia | rakudo 117beb: OUTPUT«True» | ||
dalek | kudo/var-traits: 367739f | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make "my $a will foo" die with a more awesome error message |
13:27 | |
13:27
jaldhar left
|
|||
lizmat | $ perl6 -e 'my $a will foo {}' | 13:27 | |
===SORRY!=== | |||
You can not 'will foo' on a variable | |||
FROGGS .oO( "You shall not want foo on a variable!" ) | 13:28 | ||
13:28
stevan_ joined
|
|||
jnthn | lizmat: Hm, that looks unlike the normal trait mod dispatch errors? | 13:28 | |
lizmat | $ perl6 -e 'my $a will foo {}' | ||
===SORRY!=== | |||
Cannot call 'trait_mod:<will>'; none of these signatures match: | |||
:(Attribute $attr, Block :build(:$build)!) | |||
:(Variable:D $v, $block, @*huh) | |||
:(Variable:D $v, $block, :begin(:$begin)!) | |||
plus long list is what you would normally get on "will foo". I found that LTA | 13:29 | ||
gfldex | r: subset Foo of Cool where Int|Str; sub s(Foo @f){}; my Foo @a; s(@a); # why does that fails? | ||
camelia | rakudo 117beb: OUTPUT«Constraint type check failed for parameter '@f' in sub s at /tmp/Emyw_2MsdA:1 in block at /tmp/Emyw_2MsdA:1» | ||
jnthn | Yes, but hiding the list of options is LTA too... | ||
dalek | p: ff5be6e | (Pawel Murias)++ | src/vm/parrot/QAST/Compiler.nqp: Factor out the serialization into a seperate method for easier overriding. |
||
lizmat | ah, ok, in that sense | ||
jnthn | lizmat: Some combination of the two may we nice. | 13:30 | |
lizmat | yes, indeed | ||
jnthn | lizmat: Like, we provide some context to say it was about the variable decl. | ||
gfldex | std: subset Foo of Cool where Int|Str; sub s(Foo @f){}; my Foo @a; s(@a); | 13:32 | |
camelia | std c2215f0: OUTPUT«Potential difficulties: @f is declared but not used at /tmp/_ME8z3xAGZ line 1:------> et Foo of Cool where Int|Str; sub s(Foo ⏏@f){}; my Foo @a; s(@a);ok 00:00 46m» | ||
lizmat | so, how do I get to the dispatcher object so that I can call dispatchees on it? | ||
jnthn | You should find that it's throwing a typed exception on dispatch failure | 13:33 | |
13:33
daxim left
|
|||
jnthn | I suggest looking specifically for that exception type and it should contain the stuff you need | 13:33 | |
lizmat | yes, but my error message is *before* we have an exception | 13:34 | |
jnthn | huh? | ||
lizmat | multi trait_mod:<will>(Variable:D $v, $block, |c ) { | ||
die "You can not 'will {c.hash.keys}' on a variable"; | |||
jnthn | oh... | ||
I thought you were doing it higher up, in World or so... | 13:35 | ||
Well, &trait_mod:<will>.candidates would get you the list | |||
lizmat | okidoki | ||
13:35
btyler joined
|
|||
lizmat | seems lower in this case is better, so the error message can be more to the point, no? | 13:36 | |
jnthn | Well, maybe, but otoh we may be able to do better with a generaler solution | 13:38 | |
r: sub foo() is barf { } | |||
camelia | rakudo 117beb: OUTPUT«===SORRY!===Cannot call 'trait_mod:<is>'; none of these signatures match::(Mu:U $child, Mu:U $parent):(Mu:U $type, :rw(:$rw)!):(Mu:U $type, :nativesize(:$nativesize)!):(Mu:U $type, :unsigned(:$unsigned)!):(Mu:U $type, :hidden(:$hidden)!):(M… | 13:39 | |
lizmat | ok, will look at that as well, but later | ||
jnthn | Well, what I'm saying is that a solution that improves all of these may be possible | ||
Plus it could include a nice indication of where the error is. | |||
13:41
sqirrel_ joined,
[Coke]_ is now known as [Coke],
sqirrel left
|
|||
dalek | kudo/var-traits: cbc2ce3 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Temporary more/less LTA error message for 'my $a will foo' |
13:42 | |
lizmat | ok, going off for some cycling & dinner | ||
jnthn | ok :) | ||
lizmat | jnthn: if I don't chat with you before you go, have a NICE holiday! | 13:43 | |
jnthn | lizmat: I'll be about this evening, I suspect...but thanks! :) | ||
lizmat | the branch can be merged, as far as I'm concerned | ||
later! & | |||
[Coke] needs more coffee, some motivation, and perhaps a bottle of scotch. | 13:45 | ||
colomon | jnthn: I haven't let it run fully yet, but jakudo seems to be completely outperforming parrakudo on my big task from yesterday. (That is, I've let jakudo complete it in 11 minutes, and shut the parrakudo run off after a couple of hours.) | 13:48 | |
jnthn | colomon: wow | ||
[Coke] | O_o | 13:49 | |
colomon | btw, jnthn did you see timotimo's push benchmark from yesterday? massive, massive improvements. :) | 13:50 | |
jnthn | yes :) | ||
13:52
skids joined
|
|||
colomon | my son is showing me a map he drew from my tree (I am the Cheshire Cat, you see) to where he parked his X-wing. | 13:52 | |
13:54
benabik left
|
|||
FROGGS | *g* | 13:55 | |
13:56
benabik joined,
benabik left
|
|||
pmurias | jnthn: if I want to add a role to a class at runtime I should call HOW.add_role and then HOW.compose? | 14:02 | |
14:03
yoleaux left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
14:04
SamuraiJack__ left,
benabik joined
14:05
domidumont left,
fhelmberger left
14:08
sqirrel_ left
|
|||
jnthn | pmurias: To a class, rather than mixing into an object? I guess somehing like that, then, yes | 14:09 | |
r: class A { }; role R { }; augment class A does R { }; say A ~~ R | |||
camelia | rakudo 117beb: OUTPUT«===SORRY!===augment not allowed without 'use MONKEY_TYPING'at /tmp/nHglhLFwNe:1------> { }; role R { }; augment class A does R ⏏{ }; say A ~~ R expecting any of: scoped declarator generic role»… | ||
jnthn | r: use MONKEY_TYPING; class A { }; role R { }; augment class A does R { }; say A ~~ R | 14:10 | |
camelia | rakudo 117beb: OUTPUT«True» | ||
jnthn | That's what's going on in this case. | ||
pmurias | is there a sensible reason why mixing stuff into nqp::getcomp('QAST') gets ignored? | 14:11 | |
the name returned by .HOW.name doesn't change and methods aren't added? | |||
jnthn | You can't mix in to a type object; maybe that's the issue? | 14:12 | |
pmurias | pastie.org/8177996 | 14:13 | |
14:13
sqirrel joined
|
|||
pmurias | jnthn: aha | 14:14 | |
14:14
grondilu joined
14:21
PacoAir joined
14:24
fhelmberger joined
|
|||
grondilu | How is the javascript backend going? | 14:24 | |
pmurias | jnthn: add_role/compose creates an ambigious dispatch exceptions from the multimethod | ||
grondilu: I'm working on grammars atm, it's passing a part of nqp tests, it can't still bootstrap itself | 14:25 | ||
moritz | how does the performance feel, compared to nqp-on-parrot? | 14:26 | |
pmurias | I'm not running anything besides tests on it right now, so I only feel the startup | 14:27 | |
which is dominated by the compilation speed | 14:28 | ||
14:28
fhelmberger left
14:30
grondilu left
|
|||
pmurias | moritz: but the performance right now should be pretty horrible as I'm doing things like emitting nqp.op.add_i(a,b) instead of a+b | 14:30 | |
14:31
bluescreen10 joined
|
|||
jnthn | r: say 141.base(16) | 14:32 | |
camelia | rakudo 117beb: OUTPUT«8D» | ||
14:35
btyler left,
sqirrel left
14:37
Psyche^_ joined
|
|||
[Coke] | :D | 14:39 | |
14:40
Psyche^ left,
btyler joined
|
|||
timotimo returns from a lengthy reading session in the shade of his balcony | 14:43 | ||
pmurias | jnthn: is it possible to remove a method using the metamodel? | ||
jnthn | pmurias: Not really | ||
pmurias: Though method_table gives you back the real hash | |||
pmurias: So if you remove the key from it you are manipulating the real table used to compute method caches, I guess :) | 14:44 | ||
14:44
benabik left
|
|||
jnthn | It's a weird thing to want to do :) | 14:44 | |
pmurias | I want to override a method | 14:45 | |
but removing the method using the method_table and add_method should work | |||
needless to say it's not very elegant | 14:46 | ||
jnthn | Why can't you do it the normal way, using inheritance or something? | ||
Why change the thing nqp::getcomp returns, when you could just nqp::bindcomp an updated thing? | |||
pmurias | hmm, I should try that | 14:47 | |
jnthn | r: say 149.base(16) | 14:53 | |
camelia | rakudo 117beb: OUTPUT«95» | ||
14:54
sqirrel joined
14:56
avarab is now known as avar
14:58
rindolf joined
15:02
jaldhar joined
15:03
Guest50868 left
15:05
kaleem left
15:12
jaldhar left
15:13
xinming left,
wk joined
15:14
wk is now known as Guest29595,
jaldhar joined
15:15
xinming joined
15:16
benabik joined
15:17
cognominal joined
15:19
kaleem joined
15:24
wtw left
|
|||
dalek | kudo-js: 0ba95ba | (Pawel Murias)++ | / (4 files): Mix in a role with the single serialization "hack", instead of using a custom NQP branch. Update the nqp submodule. Update the serialization format version to 6. |
15:25 | |
15:27
kivutar left
|
|||
dalek | kudo-js: f89475e | (Pawel Murias)++ | run_tests: Add passing test 69,71,73 to run_tests. |
15:29 | |
pmurias | jnthn: we should propably delete the cached_serialization branch | ||
15:30
iSlug left
15:33
logie left
|
|||
jnthn | pmurias: sure...if it's never getting merged, etc. | 15:34 | |
pmurias: You have a commit bit to do it, yes? :) | |||
pmurias | it seems to be still visible on github | 15:38 | |
I did git push origin --delete cached-serialization | |||
should I use the github "Delete branch" button? | |||
FROGGS | git push origin :cached-serialization | 15:39 | |
jnthn | What FROGGS said. It's a weird syntax, but actaully a degenerate case of the more general refspec syntax. | 15:41 | |
Same thing that lets you do git push origin HEAD~2:master to push all but the last two commits, for example. | |||
benabik | --delete should do the same thing. | ||
jnthn | Oh? :) | 15:42 | |
benabik: How new is that, ooc? | |||
pmurias | 1.7.0 | ||
the github ui just seems to have a bug and hasn't noticed the branch is deleted yet | 15:43 | ||
dalek | kudo-js: 44fee2f | (Pawel Murias)++ | run (2 files): Implement nqp::atpos_i, pass test 74. |
15:47 | |
15:50
jaldhar left
|
|||
[Coke] | pmurias++ | 15:55 | |
15:58
Shozan is now known as SHODAN
|
|||
[Coke] | OH NOES ITS SHODAN | 16:01 | |
... I wonder if I still have a machine I can play that game on. hurm. | |||
16:01
ecocode left
|
|||
SHODAN | B-b-b-e quiet, insect! | 16:01 | |
timotimo | [Coke]: i recently managed quite well with dosbox and the mouseview patch; even got it at a pretty high resolution :) | 16:02 | |
"recently" is one or two years ago | |||
16:02
FROGGS[mobile] joined
|
|||
SHODAN | yep works in dosbox | 16:03 | |
and if anyone is interested, you can help with sf.net/projects/abysmal :) | 16:04 | ||
16:05
FROGGS left
16:07
pmurias left
16:11
kaleem left
16:14
shinobicl joined
16:19
FROGGS joined
|
|||
FROGGS | what are you talking about? | 16:19 | |
timotimo | shodan is the antagonist of critically acclaimed first-person action role playing game System Shock | 16:22 | |
16:25
cognominal left
|
|||
timotimo | oh, huh | 16:31 | |
r: my @a = <a b c d e f g>; for @a -> $a, $b?, $c?, $d? -> $_ is copy { $_ //= ''; say "$a $b $c $d" }; | 16:32 | ||
camelia | rakudo 117beb: OUTPUT«===SORRY!===Missing blockat /tmp/rO8LiRozjG:1------> c d e f g>; for @a -> $a, $b?, $c?, $d? ⏏-> $_ is copy { $_ //= ''; say "$a $b $c expecting any of: postfix infix stopper parameterized block … | ||
timotimo | r: my @a = <a b c d e f g>; for @a -> $a, $b?, $c?, $d? { for $a, $b, $c, $d -> $_ is copy { $_ //= ''; say "$a $b $c $d" } } | ||
camelia | rakudo 117beb: OUTPUT«a b c da b c da b c da b c duse of uninitialized value of type Mu in string context in block at /tmp/HYiTzpfkew:1e f g use of uninitialized value of type Mu in string context in block at /tmp/HYiTzpfkew:1e f g use of uninitialized value of type Mu in … | ||
timotimo | that's not the error i was getting. hold on. | ||
... that's not the output i expect at all! | 16:33 | ||
jnthn | timotimo: Did you mean to put that say outside of the inner loop? | 16:35 | |
timotimo | what i got was Nominal type check failed for parameter 'lhs'; expected Any but got Mu instead | ||
for the //= | |||
er, yes i totally did. thanks! | |||
it can be quite hard to do these one-liners properly in just an irc client | 16:36 | ||
r: my @a = <a b c d e f g>; for @a -> $a, $b?, $c?, $d? { for $a, $b, $c, $d -> $_ is copy { $_ //= ''; print "$_ " }; print "\n" } | |||
camelia | rakudo 117beb: OUTPUT«a b c d e f g Nominal type check failed for parameter 'lhs'; expected Any but got Mu instead in sub METAOP_TEST_ASSIGN:<//> at src/gen/CORE.setting:14713 in block at /tmp/XRK1XOPx2R:1 in method reify at src/gen/CORE.setting:6542 in method reify at src/gen… | ||
timotimo | is that an "is copy" bug? | ||
jnthn | r: my $x = Mu; say $x // 42 | 16:37 | |
camelia | rakudo 117beb: OUTPUT«42» | ||
jnthn | r: my $x = Mu; $x //= 42; say $x | ||
camelia | rakudo 117beb: OUTPUT«Nominal type check failed for parameter 'lhs'; expected Any but got Mu instead in sub METAOP_TEST_ASSIGN:<//> at src/gen/CORE.setting:14713 in block at /tmp/own174feeY:1» | ||
jnthn | There's the bug | ||
timotimo | ah, pointy blocks have Mu instead of Any as their type, right? | 16:38 | |
jnthn | Right | ||
timotimo | so in reality, metaop_test_assign should really just be able to handle undefined values of mu? | ||
jnthn | It's od though, 'cus | ||
sub METAOP_ASSIGN(\op) { -> Mu \a, Mu \b { a = op.( a // op.(), b) } | |||
} | |||
oh, test assign! | |||
yes, should be Mu | 16:39 | ||
timotimo | i can make a spectest and patch later | ||
jnthn | Should take Mu \lhs | ||
16:39
vk_ joined
|
|||
timotimo | r: say " four".subst(" ", " ").perl | 16:44 | |
camelia | rakudo 117beb: OUTPUT«" four"» | ||
timotimo | r: say " eight".subst(" ", " ").perl | ||
camelia | rakudo 117beb: OUTPUT«" eight"» | ||
timotimo | huh. weird. | ||
jnthn | Want :g? | ||
timotimo | nope, but what i did want was min instead of max :) | ||
timotimo is writing a short perl script to arrange words and numbers in columns of 20 and "compensate" for too long columns in the next column | 16:45 | ||
not really working though | |||
16:45
rindolf left
|
|||
PerlJam | timotimo: use formats ;) | 16:45 | |
16:46
iSlug joined
|
|||
timotimo | i was going to, but that would have been fiddly with compensation, too | 16:47 | |
16:55
birdwindupbird left
16:57
Guest29595 left
|
|||
[Coke] | Did damian implement formats for six, or only five? | 17:00 | |
17:01
rindolf joined,
estrabd left
|
|||
[Coke] | hopefully will be easier with sprintf fixes in the pipeline. | 17:03 | |
17:11
spider-mario joined
|
|||
colomon | pipeline? | 17:14 | |
[Coke] | ... or are you done now? ;) | 17:15 | |
pmichaud_ | good afternoon, #perl6 | 17:16 | |
jnthn | o/ pmichaud | 17:17 | |
[Coke] | pmichaud: hio! | ||
timotimo | huh. | ||
$=pod<dictionary>[0].content[0] works, but BEGIN { $=pod<dictionary>[0].content[0] } doesn't; do i have to use a later-but-still-compile-time phaser if i want to access pod because it's composed when parsing is finished? | 17:18 | ||
jnthn | timotimo: Did you try CHECK? | ||
timotimo | i will now | 17:19 | |
i wasn't sure if check was compile time, but now i remember (impossible dispatches are check-time errors after all!) | |||
colomon | [Coke]: I'm not done done, but most of the basic functionality is there. The only issues I'm really aware of is returning unwanted zeros at the end with %g and not handling NQP bigints properly. | 17:20 | |
timotimo | postcircumfix:<{ }> not defined for type Array :( | ||
oh, maybe i shouldn't use curlies? | |||
nope :( | 17:21 | ||
17:24
iSlug left
17:27
rindolf left
|
|||
timotimo | d'oh i think the error was coming from somewhere else. should have used --ll-exception to be sure | 17:27 | |
dalek | rl6-roast-data: dfdf4ee | coke++ | / (5 files): today (automated commit) |
17:44 | |
17:46
vk_ left
|
|||
[Coke] | getting IO-Socket-INET failures on rakudo.pvm - "took too long" | 17:46 | |
17:51
btyler left
17:54
fridim_ left
18:06
btyler joined
18:08
crab2313 left
18:26
SamuraiJack__ joined
18:28
konundra joined
18:33
Rix left
18:34
lorn joined
18:39
xenoterracide left,
xenoterracide joined
|
|||
lizmat | [Coke]: wrt to IO-Socket-INET failures: I put in those checks | 18:46 | |
18:47
wk joined
|
|||
lizmat | that test is hanging 7 x 20 seconds on certain actions: this smells of a timeout / buffering issue that needs to be worked out before we can really start to use sockets in rakudo | 18:47 | |
[Coke] | ok. they're failing. | ||
18:47
wk is now known as Guest36807
|
|||
lizmat | I put in 20 or so checks: each gets 5 seconds to complete. If it takes more than 5 seconds, it's a fail | 18:47 | |
all of the failing tests take exactly 20 seconds to run | 18:48 | ||
like the issues we found yesterday with push and sink context, there is something really wrong there! | 18:49 | ||
pmichaud o/ | |||
18:50
Rix joined
18:53
Guest36807 left
|
|||
lizmat | [Coke] am I correct in seeing that the IO-Socket-INET errors don't occur on rakudo.jvm ? | 18:59 | |
if so, is that because they pass, or because they aren't run? | |||
19:01
sqirrel left
|
|||
jnthn | Aren't run; there are no sockets yet on JVM | 19:05 | |
timotimo | i don't think we have sockets on rakudo.jvm yet | ||
TimToady | lizmat: yes, START is gone; START was renamed to statement_prefix:once | 19:14 | |
lizmat | but "is start" as a variable trait, is still supposed to be there, right ? | ||
TimToady | because it's not really a phaser that changes time of execution, just whether it executes | ||
I don't know what it would mean | |||
state $x = 0; is really just: once my $x = 0; | 19:15 | ||
lizmat | sorry, I meant "will start" | ||
TimToady | there is no "start" time | ||
lizmat | so S04:1457 is obsolete / bogus ? | 19:16 | |
synopsebot | Link: perlcabal.org/syn/S04.html#line_1457 | ||
TimToady | it's just in the line of normal execution, only it just does it once | ||
lizmat | as is S04:1480 ? | ||
synopsebot | Link: perlcabal.org/syn/S04.html#line_1480 | ||
TimToady | yes, obsolete | ||
didn't see that when I made the START -> once transition, because it wasn't uppercase :) | 19:17 | ||
dalek | kudo/var-traits: 4c5a6c0 | (Elizabeth Mattijsen)++ | src/core/Variable.pm: Make variable trait "is TypeObject" fail with a better message for now |
||
TimToady | START was badly named anyway... | 19:18 | |
lizmat | well, it was a start :-) | 19:20 | |
.oO( feelings of dëjà vu ) |
|||
I'm about to merge the var-traits branch | 19:24 | ||
after that, "is default" should work on typed scalars | |||
and "will phaser {}" will sort of work as well | |||
19:28
wk_ joined
|
|||
dalek | ast: 2baf5cf | (Elizabeth Mattijsen)++ | S02-types/key (2 files): Hopefully correctly change "is KeyXxxx" to "of KeyXxxx", tests pass |
19:36 | |
moritz | fwiw I can confirm that the last two tests of t/spec/S32-io/IO-Socket-INET.t time out on parakudo | 19:41 | |
dalek | ast: a9ee8a3 | moritz++ | S32-io/IO-Socket-INET.sh: [sockets] report timeout when the server was actually killed |
19:46 | |
19:47
athomason joined
|
|||
moritz | r: say Buf.new().elems | 19:47 | |
camelia | rakudo 117beb: OUTPUT«0» | ||
dalek | ast: c009fef | moritz++ | S32-io/IO-Socket-INET.pl: [sockets] do not hardcode length of buffer |
19:50 | |
moritz | all of this is just prettifying things, not actually fixing anything :( | ||
dalek | ast: e23388c | (Elizabeth Mattijsen)++ | S02-types/key (2 files): Fudge keyset/keybag tests: the tests were for "is KeyBag/Set" after all |
||
Heuristic branch merge: pushed 20 commits to rakudo/nom by lizmat | 19:51 | ||
moritz | r: say Buf.new() eqv Buf.new(); | 19:52 | |
camelia | rakudo 117beb: OUTPUT«True» | ||
moritz | lizmat, jnthn: the socket tests on parakudo hang here: say $binary eqv $recv ?? 'OK-7' !! 'NOK-7'; | 19:54 | |
it's not the sockets that timeout, but the eqv | |||
jnthn | wtf! | 19:55 | |
Does Buf eqv somehow have crazy bad performance? | |||
lizmat | and the watchdog makes it show up as 20 second timouts? | 19:56 | |
moritz | lizmat: correct | ||
lizmat is glad she added the timeout tests :-) | |||
moritz | I just did | ||
my Buf $b1 = slurp('README', :bin); | |||
my Buf $b2 = slurp('README', :bin); | |||
say $b1 eqv $b2; | |||
jnthn | [&&] $a.list Z== $b.list | ||
moritz | and it exceeds my patience, nearly | ||
jnthn: I guess I wrote that code, once :/ | 19:57 | ||
jnthn | It's cute ;) | ||
timotimo | cute code, but probably abysmal performance :D | ||
does [&&] know how to short-circuit? | |||
moritz | ok, 39s for comparing two Buf copies of the README | ||
jnthn | timotimo: I sure hope so... | 19:58 | |
moritz | timotimo: I think so, but they actually are the same | ||
timotimo | oh, right. | ||
moritz | $ wc -c README | ||
5052 README | |||
so, the sockets test (4096 bytes) will probably take just as long | |||
timotimo | r: [&&] (True xx 100, False, True xx 10000); say time - CHECK time | 19:59 | |
camelia | rakudo 117beb: OUTPUT«2» | ||
timotimo | yeah, that seems good | ||
or maybe that didn't flatten. | |||
jnthn | r: my $b = ('a' x 10000).encode; my $n = now; $b.list; say now - $n | 20:01 | |
camelia | rakudo 117beb: OUTPUT«0.80859796» | ||
moritz | ok, eq is much faster than eqv | ||
timotimo | is it also correct? | ||
moritz | and eq just compares stringification of .list | ||
timotimo | ah, that's how | ||
moritz | so quite some potential for optimization still | 20:02 | |
jnthn | $a.list eq $b.list is not exactly fast either :) | ||
moritz | aye | ||
I'll do the coward's patch (change eqv to use eq), which will get the tests passing | |||
timotimo | hey | ||
how about you eqv the .list's of both? | |||
moritz | and let somebody else do the Real Work[tm] | ||
dalek | ast: 9bdb8f9 | (Elizabeth Mattijsen)++ | S02- (2 files): Unfudge now passing tests after merge of var-traits branch |
20:03 | |
moritz | timotimo: probably slower than eq | ||
timotimo | OK | ||
timotimo imagines one could do something like memcmp by exposing a nqp op for buf equality | |||
jnthn | moritz: I'm doing a better eqv patch here | 20:04 | |
The README buf comp is 14s here o.O | 20:05 | ||
jnthn builds the improvement | |||
moritz | jnthn: great, then I can abort my slow-as-hell spectest here :-) | ||
lizmat | that should take up to 2 minutes off the spectest, if run in parallel probably around 1 minute | 20:06 | |
wallclock | 20:07 | ||
moritz | because the inet tests don't time out anymore? | 20:08 | |
lizmat | indeed… in parallel test, the IO-Socket-INET was always the last to finish | ||
20:08
bruges joined
|
|||
lizmat | about 1 minute *after* all the other tests finished | 20:08 | |
TimToady: I wonder whether .push shouldn't have a ":bind" adverb, to bind the values to the list, rather than copying | 20:10 | ||
consequently, I think .classify and .categorize should have the same :bind adverb and pass that through to .push | 20:11 | ||
20:11
omeranon left
|
|||
lizmat | TimToady: does that make sense? | 20:11 | |
also, I think KeyBag might want to have a .classify and .categorize as well | 20:12 | ||
if you're just interested in counts | |||
r: my $x is readonly=5 # is this supposed to work? | 20:15 | ||
camelia | rakudo 117beb: ( no output ) | ||
lizmat | r: my $x is readonly=5; say $x # is this supposed to work? | ||
camelia | rakudo 117beb: OUTPUT«5» | ||
timotimo | lizmat: i believe so (i read it in an RT somewhere) | ||
"is readonly" shoud allow assignment exactly once | |||
jnthn | Around 14 times faster | ||
moritz | \o/ | ||
timotimo | ... it's a start ;) | 20:16 | |
jnthn | It'll deal with the spectest fallout at least. | ||
moritz | though 1s for comparing 4k of buffer two ways still isn't too great | ||
jnthn | yeah | ||
lizmat is looking forward to spectest that! | 20:17 | ||
moritz | push! push! push! | ||
fwiw the speedup from my patch was only a factor 8 | |||
jnthn | oh, I was spectsting rather than pushing :P | 20:19 | |
timotimo | what speaks against doing it as a nqp op? at least for the native buffer objects it should be ridiculously fast with just a memcmp | ||
jnthn | timotimo: Nothing other than not got time for that righ tnow | 20:20 | |
timotimo | cool. i could try it some time then :) | ||
moritz | .oO( push or it didn't happen ) |
||
lizmat | .oO( it's not like it's a 6.1kg baby ) |
20:22 | |
dalek | kudo-star-daily: 0adb160 | coke++ | log/ (5 files): today (automated commit) |
20:24 | |
kudo-star-daily: 4f061b6 | coke++ | log/ (5 files): today (automated commit) |
|||
kudo-star-daily: 0a644e5 | coke++ | log/ (5 files): today (automated commit) |
|||
kudo-star-daily: f9c5066 | coke++ | log/ (5 files): today (automated commit) |
|||
20:25
omeranon joined
20:27
btyler_ joined
20:30
btyler left
20:33
wk_ left
|
|||
moritz | anybody want to spectest gist.github.com/moritz/6092037 for me? | 20:37 | |
moritz -> sleep | 20:38 | ||
lizmat | will do, moritz, and gnight! | ||
…. building | 20:40 | ||
dalek | kudo/nom: 35818f8 | jnthn++ | src/core/Buf.pm: Optimize Buf.eqv a bit. |
20:41 | |
lizmat | will spectest that in a few minutes :-) | 20:51 | |
lizmat wishes for a phaser to be executed after a thunk has executed | 20:52 | ||
would be a nice way to solve the "my $x is readonly=5" problem | |||
jnthn: would you object if I changed the "rw" attribute in ContainerDescriptor to "readonly" and switch the meaning around? | 20:55 | ||
jnthn | lizmat: We used to have it that way around and changed it. | ||
lizmat | and the reason was? | 20:56 | |
jnthn | lizmat: Turns out readonly being the default tends to be righter in more cases. | ||
lizmat: Certainly we've had a bunch less bugs this way around... | |||
lizmat | couldn't you set the default to 1? | 20:57 | |
jnthn | What problem would swapping it around solve? | 20:58 | |
lizmat | currently, this doesn't work:"my $x is readonly=5" | ||
because $x is readonly before the 5 is assigned | |||
jnthn | Right. | ||
The solution to that is probably to treat initializers differently to normal assignments. | 20:59 | ||
lizmat | but wouldn't that cause a lot of overhead? | ||
my idea was: | |||
jnthn | Depends how you do it, but the parser already distinguishes the two | ||
lizmat | ContainerDescriptor.readonly: possible values: 0 = rw, 1 = readonly, >1 readonly, but allow N-1 assignments | 21:00 | |
jnthn | That won't work | ||
lizmat | then in rakudo_scalar_store update the readonly in the descriptor when needed | 21:01 | |
jnthn | You need one assignment per incarnation of the variable, not one i the lifetime of the program. | ||
21:01
SamuraiJack__ left
|
|||
lizmat | ah, ok | 21:01 | |
good point | |||
lizmat scratches that idea | |||
jnthn | I think it wants to be something related to the initializer, though. | 21:02 | |
lizmat | moritz: spectest is clean gist.github.com/moritz/6092037 | ||
jnthn | We already know that has to be special. | ||
In fact, we already do specail things there for state vars. | |||
lizmat | ok, will check the parser for initializations, and state vars in particular | ||
now buiilding / spectesting jnthn's Buf optimization | 21:03 | ||
21:04
skids left,
dayangkun left
21:05
pmurias joined
|
|||
pmurias | pmichaud: ping | 21:05 | |
21:05
konundra left
21:08
Timbus joined,
colomon left
21:12
sqirrel joined
21:16
spider-mario left,
dayangkun joined
|
|||
lizmat | jnthn/moritz: alas, no improvement in t/spec/S32-io/IO-Socket-INET.t, still 7 failures because of timeout after 20 seconds | 21:19 | |
jnthn | wtf | 21:20 | |
FROGGS | gnight o/ | 21:21 | |
lizmat | wish I had better news | ||
gnight FROGGS! | |||
I assume moritz' patch was unrelated? | |||
21:27
sqirrel left
21:28
grondilu joined
|
|||
grondilu | While trying to rebootstrap panda: | 21:29 | |
==> Testing File::Tools | |||
t/01-file-find.t ...... Failed 1/10 subtests | |||
lizmat | jnthn: wrt to "my $x is readonly=5", I guess some magic would need to be added at Actions, around line 1792, right ? | ||
21:29
colomon joined
|
|||
lizmat | $past := assign_op($/, $past, $<initializer>[0].ast); | 21:30 | |
jnthn | lizmat: yeah | ||
lizmat: We already have an nqp::assignunchecked op, which skips the rw check and the type check... | |||
lizmat | aha, ok | ||
jnthn | lizmat: But we kinda want the type check still... | ||
The idea is that the optimizer will rewrite assignments it proves are safe at some point in the future, though. | 21:31 | ||
grondilu ran PERL6LIB=lib perl6 t/01-file-find.t | |||
not ok 10 - found one of two files due to X::IO::Dir | |||
# got: '2' | |||
# expected: '1' | |||
# Looks like you failed 1 tests of 10 | |||
21:32
FROGGS[mobile] left
|
|||
lizmat | so line 4680, change 'p6store' to 'assignunchecked' depending on a condition ? | 21:33 | |
21:35
athomason left
|
|||
jnthn | Maybe something like it...suspect it may involve a little more than that. | 21:40 | |
lizmat | I think we're going about this the wrong way | ||
I think the "is readonly" trait needs to be applied after initialization | 21:41 | ||
*not* doing things unchecked | |||
otherwise, "my $a=42; my $b is readonly := $a" will still not create a readonly container | |||
so I'm wondering something in the form of a .whence? | 21:42 | ||
grondilu | tadzik: in t/01-file-find.t the last test finds two files instead of one expected. Yet in t/dir1 there are indeed two files named file.bar. One in t/dir1/ and the other in t/dir1/another_dir/. | 21:44 | |
jnthn | lizmat: WHENCE is closer... | ||
lizmat: I think you're confusing things by talking about trait application as if it were a runtime thing, which it's not. | |||
However, the single assignment *is* a runtime thing. | 21:45 | ||
21:46
btyler_ left
|
|||
lizmat | but each .WHENCE only gets executed once, no? | 21:47 | |
and then gets nulliified | |||
the readonly trait needs to be applied after the first assignment? | 21:48 | ||
and the .WHENCE is basically just a closure, no? | |||
I know it was made to prevent auto-vivification, but this feels like a good re-purpose of that functionality | 21:49 | ||
this approach would not add any overhead to the current low level scalar_store code | 21:50 | ||
21:50
FROGGS left
|
|||
lizmat | for all other assignment | 21:50 | |
s | |||
jnthn | WHENCE is currently quite high overhead, though. | 21:51 | |
lizmat | if (!PMC_IS_NULL(scalar->whence)) { ? | ||
or the Parrot_pcc_invoke_from_sig_object(interp, scalar->whence, cappy); ? | 21:52 | ||
the thing is, most other approaches would add overhead to *all* assignments | |||
jnthn | The latter | ||
A p6storeevenifro wouldn't... :) | 21:53 | ||
lizmat | well, it would only be done once | ||
but would that also solve the case for binding? | |||
my $a is readonly := $b ? | |||
jnthn | Hm. I'd tended to see "is readonly" being about the container... | 21:54 | |
Which you replace when binding... | |||
otoh, we make sure type checks are enforced on binding | |||
21:55
bluescreen10 left
|
|||
jnthn | That said, we can catch such cases statically... | 21:55 | |
lizmat | so you're saying we can't have a "read only" and a "rw" view on the same container | ||
I mean, if we can't use "is readonly" with binding | 21:56 | ||
then we lose all use for "is readonly" | |||
because if we can only use that for right values, then we might as well die with a message "please bind to the right value" | 21:57 | ||
aka my $x := 42 | |||
21:58
btyler joined
22:02
bluescreen10 joined
|
|||
lizmat | the more I think about it, the more it doesn't make sense to have "is readonly" on variables | 22:04 | |
either you alias it to a literal, which makes it read-only | 22:05 | ||
or you alias it to another container, and get the same .rw status whether you want it or not | |||
add to that the fact that "is readonly" is not specced for variables | 22:06 | ||
grondilu is confused by what lizmat says | |||
lizmat | it is specced for subs and parameters | ||
afaik, but not for variables | |||
grondilu | indeed | ||
oh ok | 22:07 | ||
22:07
colomon left
|
|||
jnthn | Well, seems we're now looking at lang design, not impl :) | 22:07 | |
lizmat | well, remove implementation rather than change lang design | 22:08 | |
22:08
colomon joined
|
|||
lizmat | anyways, I'm gonna sleep over it, been a long. long day | 22:08 | |
I shouldn't get up at 6:30 and then go on until after midnight | |||
so I'm going to catch some shuteye | 22:09 | ||
jnthn: have fun in Switzerland! Come back safe! | |||
sleep& | |||
jnthn | Will try to do so ;-) | 22:10 | |
'night | |||
jnthn figures he should catch a few hours of rest sometime soon, given his early flight... :) | |||
22:12
benabik left
22:14
census joined
|
|||
census | hey! | 22:14 | |
22:16
xinming left,
xinming joined
22:18
FROGGS joined
22:20
colomon left
22:21
bluescreen10 left
|
|||
jnthn | vacation; bbiaweek & | 22:21 | |
22:53
shinobicl left
22:58
BenGoldberg joined
23:01
odoacre_ left
23:08
pmurias left
23:15
skids joined
23:16
dmol left
23:20
cbk left
23:29
cooper left
|