»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:00
spider-mario left
|
|||
timotimo | gist.github.com/timo/a26ef6942bfed92e4d8e - JSON, ladies and gentlemen!! | 00:01 | |
00:01
bjz left
|
|||
RabidGravy | boom | 00:02 | |
timotimo | i.imgur.com/kEyoHtz.png | 00:04 | |
i've spent about 2 hours on making the text in the entries column monospaced and right-aligned :) | 00:05 | ||
i'm not a smart man | |||
00:05
FROGGS joined
00:06
RabidGravy left
00:14
telex left
00:16
telex joined
00:19
yqt left
00:24
FROGGS left
00:28
FROGGS joined
00:31
tokuhirom joined
|
|||
timotimo | does javascript have something like an infix "defor" operator? | 00:35 | |
00:36
tokuhirom left
|
|||
timotimo | seems like i can use || for this | 00:36 | |
00:38
kjs_ joined
00:55
kjs_ left
|
|||
ugexe | "replace this Array is copy logic" - the missing uppercase r is more distracting than the strange error message itself | 01:00 | |
01:02
FROGGS left
|
|||
dalek | kudo/nom: d192f1c | lizmat++ | src/core/List.pm: Make xx quite a bit faster - 42 xx 100 # no change, was already optimized - rand xx 100 # about 3.5x as fast - 42 xx * # about 5x as fast - rand xx * # about 1.5x as fast The fixed lenghts xx completely build the list in memory. For large values, that may not be such a good idea. On the other hand, you would probably use a * in those cases anyway. Should this turn out to be a problem, then maybe we can switch to an iterator type approach if N > X. Of course, in the "push-all" case, there would be only a performance degredation, so I'm not so sure about such an aproach anyway. The * cases are implemented now as proper Iterators. |
01:11 | |
lizmat | japhb timotimo : spectest clean and implemented in "your" pov :-) | 01:12 | |
and on that thought, I wish #perl6! good night | |||
01:16
FROGGS joined
|
|||
dalek | c: 37b1f83 | (Carl Hayter)++ | doc/Type/Junction.pod: missing > on a C<> breaks formatting |
01:19 | |
timotimo | lizmat: thank you for your consideration! though i'm not 100% comfortable with the necessary compromise in semantics we had to make :( | 01:22 | |
01:24
zakharyas joined
01:27
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:35
bpmedley left
01:36
lolisa left
01:42
edehont left
01:45
leont joined
|
|||
dalek | p: 2480f74 | timotimo++ | src/vm/moar/ (2 files): handle the possibility of elided fields in profile data |
01:47 | |
p: 875ce69 | timotimo++ | src/vm/moar/profiler/template.html: we don't need no trailing spaces |
|||
01:48
TimToady left
|
|||
timotimo | ^- updating NQP is fine even without updating moarvm. updating only moarvm will result in non-functioning profiler html apps | 01:48 | |
01:49
FROGGS left
01:54
xinming left
01:55
xinming joined
01:57
TimToady joined,
colomon joined
|
|||
psch | fwiw, i'm +1 for AlexDaniel++'s qx changes. i'd like &out as replacement for &runout and :shout as replacement for :x on q// | 02:01 | |
AlexDaniel | yaay! | ||
psch: but still, why there must be a quoting adverb for that? | 02:02 | ||
psch | bartolin: there's at least one spectest that exhibits the Mu.new spam you described. it's probably the same that made you bring this up, though... | 02:03 | |
AlexDaniel: definitely hysterical raisins. it's quite embedded in the Perfectly Eclectic Rubish Lister that makes our preferred language | 02:04 | ||
AlexDaniel | psch: uhh… | ||
psch | AlexDaniel: i'll readily admit that there's at least a lot of not-wanting-to-alienate-people-that-know-it behind my reasoning, and finding a different reason would take me some time | 02:05 | |
AlexDaniel: basically, "it's in perl5 and i'd dislike ripping it out just because, if anything just offer a long and cumbersome alternative that seems to do the same" | 02:06 | ||
s/anything/nothing else/ | |||
AlexDaniel | psch: I think that it is good. It gives a chance to think about other alternatives, like &run | ||
psch | AlexDaniel: right, that's the exact opposite of an answer to the same question, motivated by a very different point of origin | ||
AlexDaniel: mind, i'm not saying you're wrong, i'm just saying that we might benefit from keeping something-like-qx around. although i do admit this is probably a negligable (sp?) benefit | 02:07 | ||
AlexDaniel | psch: thanks for your feedback | 02:08 | |
psch | bartolin: on the upside, the r-j build is broken until someone figures out how to split CORE across multiple files and still load it properly, so i think it's fair to let it sit | ||
AlexDaniel: no problem, as i said, i agree with everything except "remove the option to hang your rope with an appropiately dehuffmanized QX alternative" | 02:10 | ||
i really like qshout because it looks somewhat scary :P | |||
as in, shouting in general is somewhat unsafe, because it alerts lots of people you might not want alerted etc. it seems fitting | 02:11 | ||
and, well, removing it seems contra TIMTOWTDI | |||
AlexDaniel | psch: actually, this whole story started from me asking about an equivalent to ShellQuote in perl6. Most likely other people moving from perl5 world will attempt to do the same, which is not what we want… | 02:12 | |
the deprecation message says "use 'runout' or 'shellout' instead", which is perfect | 02:13 | ||
if runout is changed to “out”, then it is even better | |||
psch: so if someone is used to hang his rope here, I don't think that it is a bad idea to say “hey, there is a different place to do that. By the way, here is a safe alternative” | 02:14 | ||
psch | hm, yeah, i suppose i'm too attached to the idea of having an extension to quoting syntax that does something forky | 02:15 | |
AlexDaniel | psch: and you are not the only one :) | ||
psch | i mean, linguistically it sorta makes sense. we're changing language from the one we're in to the one we come from | ||
(that's of course operating from "i like terminals" perspective) | 02:16 | ||
and Q is about changing languages | |||
so there it fits | |||
AlexDaniel | but the output does not equal to the input, does it make sense? | 02:17 | |
psch | that *might* depend on whether the chinese room is sapient or not... | ||
masak | did someone say Q? | 02:18 | |
AlexDaniel | I mean, you don't get a shell-adapted version of your string, what you get is completely different | ||
so to me it sounds like a function, not a quoting construct… | |||
psch | masak: only if you have a remote-controlled car to spare :) | ||
AlexDaniel | but perhaps there are different ways to look at it | ||
psch | AlexDaniel: &map doesn't care if the mapper you write exhibits what you mean either | 02:19 | |
02:19
mike` joined
|
|||
psch | (although Cool breaks the obvious example i had in mind...) | 02:19 | |
maybe that's reason enough to demand a sh-ish grammar for qx//, though | 02:20 | ||
Ben_Goldberg wonders whether a module which monkey patches Str and adds a .shellout or .qx, etc, would be sensible. | 02:21 | ||
psch | as in, the mapper supplied to &map still works according to the current language, but arguments to qx don't work according to what they are understood by | ||
i think that convinces me, actually | |||
if we want a shell-execution adverb to Q it should interpret the thus quoted string as the shell would | 02:22 | ||
AlexDaniel | I agree | ||
psch | what exactly that means is probably up for debate, though | ||
Ben_Goldberg | And the other thing up for debate is, "which shell", because not all of us are on *nix | 02:23 | |
AlexDaniel | Ben_Goldberg: I'd say “perl6” shell! I mean, it would be great if it could autoquote variables… | 02:24 | |
psch | masak: for your last blog post, i was thinking "grok time" for the "check but not CHECK time" you were writing about | ||
masak: that's pretty much a gut reaction though, and might have occured to you already... | |||
AlexDaniel | Ben_Goldberg: it sounds weird, but it would be super cool if the shell quoting was inverted somehow | 02:25 | |
that is, everything is quoted, but you have to “unquote” it explicitly if you want it to break | |||
but that's not what shells do, so I don't know… | |||
timotimo | i missed the 0hr game jam :| | ||
Ben_Goldberg | Sounds like lisp's "`" operator, with "," to unquote things. | 02:26 | |
02:27
uberbaud joined
|
|||
masak | psch: thanks for the suggestion. :) | 02:30 | |
psch: "grok" is not half-bad. I won't commit on it just yet, though. need to use these abstractions a bit more first. | |||
02:33
tokuhirom joined
|
|||
Ben_Goldberg | Here's another interesting way of abstracting processes: metacpan.org/pod/IO::Pipeline | 02:33 | |
02:35
tokuhiro_ joined
02:37
tokuhirom left
02:38
lizmat_ joined
02:39
tokuhiro_ left
02:40
zakharyas left
|
|||
psch | masak: yeah, it's hanging a bit between the "understand how to use fittingly" and "internalize to the point of automation" meanings 'grok' has, but as i said, it's mostly a gut reaction - the other one was "get", but that's too overloaded, albeit a bit more common | 02:41 | |
AlexDaniel | Ben_Goldberg: interesting. I'm not sure if there is any need for that though | ||
02:42
lizmat left
|
|||
AlexDaniel | Ben_Goldberg: For example, run(…, :out).out is very useful in that sense | 02:42 | |
psch | and it probably should be "'getting it' time" then anyway, which is probably worse... | ||
masak | psch: I keep reaching for a meaning a bit like "contextize", i.e. "endow with a surrounding context". because that captures it quite well. | 02:43 | |
02:46
ilbot3 left
|
|||
psch | masak: a bit of thesaurus clicking brought me "merge time", which seems quite good | 02:47 | |
02:48
ilbot3 joined
|
|||
psch | masak: although there might be a bit of lack of clarity on my end, i'm not sure whether it's the time where we know how to handle the quasi or where we know how to insert it | 02:48 | |
02:48
O47m341 joined
|
|||
psch | ...at least i think there's a difference there | 02:48 | |
psch might need to re-read the blog post in the morrow | 02:49 | ||
02:49
SuzieQueue left,
BenGoldberg joined
|
|||
psch | i'll think about that, i suppose | 02:50 | |
and about the jvm stuff too, probably | |||
i have a hunch that 007 could help me explore concepts with that, but that might be horribly misguided :P | |||
anyway, g'night o/ | |||
02:51
Ben_Goldberg left
|
|||
AlexDaniel | BenGoldberg: like this: run('some', 'command', :out).out.lines ==> grep { … } ==> map { … } ==> grep { … }; | 02:52 | |
BenGoldberg: as far as I know it wont build an efficient pipeline right now, but perhaps it would in the future? | 02:53 | ||
.lines is also not lazy | |||
BenGoldberg: but syntactically it is the same thing, isn't it? | 02:54 | ||
BenGoldberg | Pretty close. | 03:04 | |
Anyway, goodnight. Sleep is calling me. | 03:06 | ||
03:06
BenGoldberg left
03:09
AlexDaniel left
|
|||
dalek | ecs/newio: f5e1f86 | labster++ | S32-setting-library/Temporal.pod: Mention RFC 3339 in DateTime (which is what we currently accept), proleptic Gregorian Calendar |
03:20 | |
labster | wait, I was on newio? *sigh* | ||
dalek | ecs: 34443f6 | labster++ | S32-setting-library/Temporal.pod: Mention RFC 3339 in DateTime (which is what we currently accept), proleptic Gregorian Calendar |
03:21 | |
03:21
aristotle joined
|
|||
aristotle | apple.stackexchange.com/questions/...n-terminal | 03:21 | |
labster | I really need to change my prompt to mention to the box name | ||
aristotle | might be of interest to anyone here using a Mac | 03:22 | |
03:22
aristotle left
|
|||
labster | the aristotelian method: infodump and sign off channel :) | 03:24 | |
03:38
leont left
|
|||
dalek | kudo-star-daily: 581381d | coke++ | log/ (8 files): today (automated commit) |
03:50 | |
rl6-roast-data: d1cc57b | coke++ | / (9 files): today (automated commit) |
|||
03:57
FROGGS joined
|
|||
masak | psch: we know how to handle the quasi by the time we evaluate it. identical in spirit to when you have a string "OH HAI, $person" -- you know what the string will be exactly when you reach that expression and $person is in scope and has a certain value. | 04:00 | |
psch: this happens before the quasi gets spliced into mainline code somewhere. the weird-and-wonderful bit is that the mainline code is a *different* context than where the quasi was evaluated, but the code from the quasi "remembers" where it was evaluated, kind of in analogy to closure semantics | 04:02 | ||
concretely, if there's a $foo variable in the Qtree from the quasi, then variable lookup will go looking in the quasi's context, not in the mainline's. | 04:03 | ||
I'm digging into exactly these details right now in 007. it's tricky to get right -- or, rather, I suspect it's one of those "easy once you know how" skills. | 04:06 | ||
04:14
khw left,
raiph left
04:29
bjz_ left
04:34
tokuhirom joined
04:39
tokuhirom left
04:41
kid51 left
04:44
baest left,
baest joined
04:45
z8 left
04:51
tokuhiro_ joined
04:56
tokuhiro_ left,
labster left
04:58
labster joined
04:59
skids joined
05:00
mike` left
05:05
z8 joined
05:06
acrussell joined
05:09
z448 joined
05:11
z8 left
05:20
kmel joined
05:29
bjz joined
05:34
kmel left
05:40
kaare_ joined
05:43
dayangkun joined,
bjz left
05:51
dayangkun left,
ggoebel left,
Thigh joined
05:53
bjz joined
05:56
Thigh left
05:59
bjz left
06:01
bjz joined
06:11
Zoffix joined
06:21
z448 left
06:24
rurban joined
06:31
uberbaud left
06:34
skids left
06:36
tokuhirom joined,
_dolmen_ joined
06:40
tokuhirom left
07:02
aborazmeh left
07:05
abaugher left
07:06
abaugher joined
07:22
ribasushi left
07:30
rindolf joined
07:31
ribasushi joined
07:36
azawawi joined
|
|||
azawawi | m-star: require MIME::Base64; say MIME::Base64.encode('foo'); | 07:37 | |
07:37
tokuhirom joined
|
|||
azawawi | star-m: require MIME::Base64; say MIME::Base64.encode('foo'); | 07:37 | |
camelia | star-m 2015.09: OUTPUT«Could not find symbol '&Base64' in block <unit> at /tmp/1hgCtm7lUH:1Actually thrown at: in block <unit> at /tmp/1hgCtm7lUH:1» | ||
azawawi | m: require MIME::Base64; say MIME::Base64.encode('foo'); | ||
camelia | rakudo-moar cd7766: OUTPUT«Could not find MIME::Base64 in any of: file#/home/camelia/.perl6/2015.10-14-gcd77669/lib inst#/home/camelia/.perl6/2015.10-14-gcd77669 file#/home/camelia/rakudo-inst-1/share/perl6/lib file#/home/camelia/rakudo-inst-1/share/perl6/vendor/lib…» | ||
azawawi | hi #perl6 | 07:38 | |
rindolf | azawawi: hi! What's new? | 07:41 | |
azawawi: how's the weather there? | |||
07:41
sunnavy left
07:42
tokuhirom left
|
|||
azawawi | rindolf: dusty lol | 07:42 | |
07:42
sunnavy joined
|
|||
rindolf | azawawi: ah. :-(. | 07:42 | |
azawawi: here it's raining. | |||
azawawi | rindolf: cool | ||
rindolf: hopefully it will rain here also :) | |||
rindolf | azawawi: yes. | 07:43 | |
azawawi | rindolf: what are you working on these days? | ||
rindolf | azawawi: I'm working on Mageia Linux, Project Euler, various CPAN distributions, Freecell Solver - stuff like that. | 07:44 | |
azawawi | rindolf: im actually reading more code for implementing more selenium drivers in Perl 6. | 07:45 | |
rindolf | azawawi: ah. | ||
azawawi | rindolf: so far the python version seemed to be the most well written along with the Perl 5 version :) | ||
rindolf: the ruby bindings to selenium code is like OOP for the sake of OOP | 07:46 | ||
rindolf: github.com/azawawi/perl6-selenium-webdriver/ | |||
rindolf: im now working on the firefox driver after finishing the json wire webdriver protocol with phantomjs/ghostdriver | 07:47 | ||
rindolf | azawawi: Rakudo is still very slow from my experience with it. | ||
It's frustrating. | |||
azawawi | rindolf: i know :) | ||
rindolf: i was working on some code that day and then wrote back a Perl script to do the same... and i was like... Perl 6 is so slow :) | |||
rindolf: startup time is cutting back on my developer productivitiy as far as i noticed. but it is normal at this stage. | 07:48 | ||
rindolf | azawawi: bye! I'm going to rest. | ||
masak | lizmat_: haha -- I know I'm brain damaged by CT when I read your irclog.perlgeek.de/perl6/2015-10-24#i_11429273 and my mind goes "category of weird errors! what the heck would you take the morphisms to be!?" :P | ||
azawawi | rindolf: enjoy :) | ||
rindolf: bye | 07:49 | ||
masak .oO( from the category of things I don't expect many others to find amusing ) | |||
azawawi | masak: hi there | ||
masak | aloahoy | ||
azawawi | masak: so what's recommended self.xyz or $.xyz? | 07:51 | |
07:51
zacts left
|
|||
masak | azawawi: I think consensus is "don't do $.xyz unless there's a good reason". but people might draw the line for that differently. | 07:52 | |
some say "don't do it unless $!xyz actually is an attribute" | |||
others say "it's OK as long as $.xyz acts like an accessor in practice" | 07:53 | ||
azawawi | masak: from my experience (so far) $.xyz has troubles when using in BUILD(...) | ||
ShimmerFairy | I've taken a liking to $.xyz as a way of saying "I expect subclasses to give me this attribute-ish as something different than I would have", particularly in string interpolation stuff :) | ||
masak | azawawi: well, in BUILD I wouldn't use anything with a '.', because the object is not fully constructed. | ||
azawawi: calling (non-sub)methods on a not-fully-constructed object is suspect, design-wise. | 07:54 | ||
ShimmerFairy: yes, string interpolation is a temptation to mis-/over-use the $.xyz syntax :) | |||
07:55
petercommand left
|
|||
azawawi | masak: i think we need to draw a diagram for newbies to explain the whole object construction thing in Perl 6 | 07:55 | |
masak: the sequence, what's allowed, what's not... that is | |||
masak | agreed. | ||
ShimmerFairy | masak: well, it came in handy in places like class MyErrorBase { method gist() { "Error: $.message " } method message() { "boring default" } } :) | ||
masak | though moritz++ already has at least one nice post about that | 07:56 | |
azawawi | coming from a Java background, i was like why did we complicate that :) | ||
masak | azawawi: the complications are in Java as well, believe me. | ||
azawawi | masak: well I use everyday :) | ||
masak | azawawi: I had a bug in a piece of code with exactly what we're talking about, not one month ago. | ||
azawawi | masak: s/use/use it/ | ||
ShimmerFairy | masak: as a way of saying "There a thing called 'message' that's more-or-less an attribute, and I want whatever the class wants me to get as a 'message'" | ||
masak | azawawi: Java's .new is like a combined Perl 6's .new/.BUILD | 07:57 | |
07:57
sunnavy left
|
|||
masak | ShimmerFairy: aye. in that case, I would say that .message is "sufficiently accessor-like" | 07:57 | |
ShimmerFairy: what I mean is that some people might object to, say, calling $.activate on a method .activate that had side effects | 07:58 | ||
ShimmerFairy | masak: yeah, that seems a bit weird to me :) . As far as I'm concerned, if you think of the method call as really an attribute-like thing that you want subclasses to override, that's what you use. | 07:59 | |
07:59
sunnavy joined
08:00
z8 joined
|
|||
azawawi | :) | 08:04 | |
08:06
_dolmen_ left
08:08
firstdayonthejob joined
08:09
rurban left
|
|||
masak | ShimmerFairy: I guess I think of it from the (Eiffel) perspective of queries vs commands. | 08:17 | |
08:19
domidumont joined
08:24
ecocode joined
08:31
petercommand joined
08:37
z448 joined
08:38
tokuhirom joined
08:39
vendethiel joined
08:40
z8 left
08:41
[particle] joined
08:42
tokuhirom left,
[particle]1 left,
darutoko joined
|
|||
dalek | kudo/curli: 5e45f99 | (Stefan Seifert)++ | src/core/CompUnitRepo/Locally.pm: Make CompUnit::Repository::need actually load the found module |
08:44 | |
09:00
z448 left
|
|||
vendethiel | m: class A { has $!a; method BUILD(:$!a!) {}}; A.new | 09:27 | |
camelia | rakudo-moar cd7766: OUTPUT«Required named parameter 'a' not passed in method BUILD at /tmp/IFt3iKzHsz:1 in block <unit> at /tmp/IFt3iKzHsz:1» | ||
09:27
bjz left
|
|||
vendethiel | "bang-fence" | 09:27 | |
09:30
edehont joined
09:34
bjz joined,
vendethiel left
|
|||
[Tux] | test 50000 37.623 37.508 | 09:37 | |
test-t 50000 38.952 38.837 | |||
09:41
kjs_ joined
09:45
kjs_ left
09:46
RabidGravy joined
09:58
tokuhiro_ joined
10:07
pmurias joined
|
|||
RabidGravy | whassup? | 10:15 | |
10:19
ifim left
10:20
azawawi left
|
|||
dalek | kudo/curli: d751433 | (Stefan Seifert)++ | src/core/CompUnit (3 files): Replace use of @*INC by $*REPO for loading modules. CompUnitRepo.load_module now creates a CompUnit::DependencySpecification and $*REPO.need for loading modules. |
10:23 | |
10:26
virtualsue joined
10:27
tokuhirom joined
10:36
tokuhirom left
10:39
tokuhiro_ left
|
|||
skaji | { temp %*ENV<FOO> = "1" }; { temp %*ENV<BAR> = "1"; run "ls" } | 10:44 | |
the above code exits with "Cannot unbox a type object" | |||
10:44
void1 joined
|
|||
skaji | is this expected? | 10:45 | |
moritz | no; looks like a bug | ||
skaji | OK, I will raise a RT ticket. Thanks. | 10:46 | |
(note: { temp %*ENV; %*ENV<FOO> = "1" }; { temp %*ENV; %*ENV<BAR> = "1"; run "ls" } is works) | 10:47 | ||
10:49
tokuhiro_ joined,
tokuhiro_ left
10:50
tokuhiro_ joined
10:57
azawawi joined
|
|||
azawawi | hi | 10:57 | |
is there any p6 module to deal with unzipping an archive? | |||
10:57
TEttinger left
|
|||
moritz | azawawi: I'm not aware of one | 10:58 | |
azawawi | moritz: thx | ||
moritz | though with 400+ modules in the running, it's easy to lose overview :-) | 10:59 | |
10:59
Actualeyes joined
11:01
cognominal left
|
|||
itz_stmuk | its the most wanted | 11:04 | |
^ in the most wanted | |||
11:04
spider-mario joined,
Actualeyes left
|
|||
RabidGravy | nice little hack for someone on a Sunday afternoon | 11:05 | |
azawawi, it is possible that Compress::Zlib might be persuaded to do it depending on the version of zip used | 11:08 | ||
11:10
virtualsue left
|
|||
azawawi checks | 11:10 | ||
11:13
Alina-malina left
|
|||
azawawi | RabidGravy: Compress::Zlib is too low level (i.e. stream) | 11:14 | |
RabidGravy | then it seems you found something to do this afternoon ;-) | 11:15 | |
azawawi | finally it is raining :) | ||
rindolf: yes! | |||
rindolf | azawawi: awesome! | 11:16 | |
azawawi | RabidGravy: yup but i need to focus on firefox/webdriver thing first :) | ||
RabidGravy: thx for the info though. I was not aware of the Compress:: namespace in modules.perl6.org | 11:18 | ||
11:27
bpmedley joined
11:29
Actualeyes joined
|
|||
lizmat_ | .botsnack | 11:30 | |
yoleaux | :D | ||
synbot6 | om nom nom | ||
tadzik | :D | ||
lizmat_ | need to appease the bots! | 11:31 | |
11:31
lizmat_ is now known as lizmat
|
|||
lizmat | .botsnack | 11:31 | |
yoleaux | :D | ||
synbot6 | om nom nom | ||
11:32
cognominal joined
11:33
tokuhirom joined
11:36
AlexDaniel joined
11:37
Begi1114 joined,
tokuhirom left
|
|||
azawawi | m: %*ENV<FOOBAR> = 1; my $p = Proc::Async.new("foobar"); $p.start; | 11:41 | |
camelia | rakudo-moar cd7766: OUTPUT«Proc::Async is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:1 in method new at src/RESTRICTED.setting:32 in block <unit> at /tmp/V2PGgqJTb9:1» | ||
azawawi | i found a possible mini bug in Proc::Async | 11:42 | |
"This type cannot unbox to a native string" when you use %*ENV<FOOBAR> = 1 | |||
it took me a while to figure out what happened lol | 11:43 | ||
skaji | %*ENV<FOOBAR> = 1.Str; | 11:44 | |
AlexDaniel | actually, the problem is not with Proc::Async | 11:46 | |
it seems like everything is affected | |||
%*ENV<FOOBAR> = 1; run("echo"); | |||
%*ENV<FOOBAR> = 1; qx/echo/; | |||
same error everywhere | |||
azawawi | i see | 11:47 | |
AlexDaniel | azawawi: will you report that or should I do it? | ||
azawawi | please report it. im busy writing code for automating firefox :) | 11:48 | |
AlexDaniel: thx | |||
AlexDaniel | ok | ||
RabidGravy | azawawi, AlexDaniel I think skaji just reported this about an hour ago | 11:49 | |
they may or may not have RT'd | 11:50 | ||
11:50
pecastro joined
|
|||
AlexDaniel | RabidGravy: indeed! | 11:50 | |
RabidGravy | yeah rt.perl.org/Ticket/Display.html?id=126447 | ||
11:52
pecastro_ left
|
|||
lizmat | FWIW, looking at that now | 11:53 | |
note that if you say = "1", it works ok | 11:54 | ||
RabidGravy | lizmat++ | ||
AlexDaniel | lizmat: but the bug report does not make any sense to me, actually | 11:55 | |
lizmat: there it is written as "1" | |||
11:55
virtualsue joined
|
|||
azawawi | so after looking at selenium language bindings (python,rb,...) i found really something | 11:55 | |
bartolin | lizmat: looks like there is also RT #125953 about the same problem | 11:56 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125953 | ||
azawawi | bad logic/code does propagate to language ports in the end :) | ||
lizmat | well, I took azawawi's line, and that failed for me, and didn't with "1" | ||
11:56
lucasb_ joined
|
|||
lizmat | so #126447 may be a different issue altogether | 11:56 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126447 | ||
lizmat | yeah, it's really #125953 I'm looking at | 11:57 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125953 | ||
bartolin | lizmat++ | ||
pmurias | azawawi: you mean bugs get ported over to language ports? | 11:58 | |
11:58
ggoebel joined
|
|||
azawawi | pmurias: yup bad logic that is | 11:59 | |
pmurias: and over-designed feature sets | |||
11:59
rupert160 joined
12:00
rupert160 left
|
|||
RabidGravy | azawawi, there are shit developers out there? who knew? ;-) | 12:01 | |
azawawi | pmurias: to explain, to automate firefox you need to create a temporary profile folder for it, unzip the extension which acts as web driver (http/json) and then communicate with it directly. | 12:02 | |
pmurias: in selenium code it is like 3 different classes which you jump back and forth to understand code lol | 12:03 | ||
12:04
AlexDani` joined,
Actualeyes left
12:05
AlexDaniel left
|
|||
RabidGravy | on a complete un-related is iit a design decision to not allow type constraints on "our" variables or basically a NYI or something else? | 12:06 | |
12:11
virtualsue left
12:14
bjz_ joined
12:15
bjz left,
kid51 joined
12:16
Actualeyes joined
|
|||
lizmat | RabidGravy: I think it was an implementation decision | 12:19 | |
AlexDani` | weird. I've never thought about it | 12:20 | |
12:22
diana_olhovik_ joined
|
|||
dalek | ast: a5831ca | usev6++ | S32-exceptions/misc.t: Add test for RT #125780 |
12:24 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125780 | ||
12:31
AlexDani` is now known as AlexDaniel
12:32
pmurias left
|
|||
AlexDaniel | m: our Str $foo | 12:35 | |
camelia | rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s9dl8D4LAmCannot put a type constraint on an 'our'-scoped variableat /tmp/s9dl8D4LAm:1------> 3our Str $foo7⏏5<EOL> expecting any of: constraint» | ||
AlexDaniel | expecting any of: constraint? | 12:36 | |
12:36
Axord joined
|
|||
lizmat | yeah, LTA error message | 12:39 | |
12:43
leont joined
|
|||
lucasb_ | m: say so False S& False | 12:45 | |
camelia | rakudo-moar cd7766: OUTPUT«True» | ||
lucasb_ | ^^ This little one still here. Maybe few people use the 'S' metaop | ||
AlexDaniel | m: 'x' <= 25 | 12:46 | |
camelia | rakudo-moar cd7766: OUTPUT«WARNINGS:Useless use of "<=" in expression "'x' <= 25" in sink context (line 1)Earlier failures: Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5x' (indicated by 7⏏) in block <unit> at /tmp/W…» | ||
lizmat | RabidGravy AlexDaniel skaji spectesting fix | 12:48 | |
AlexDaniel | hm, it cuts it, but the “Final error:” is “Cannot call Real(Failure: ); none of these signatures match: (Mu:U \v: *%_)” | ||
12:49
^elyse^ joined
|
|||
leont | Does anyone have an idea of how expensive the gradual type is? | 12:52 | |
12:53
^elyse^ left
|
|||
lizmat | leont: if you don't specify a type, all type checking is done against Any | 12:53 | |
so: type checking is done *always* | 12:54 | ||
already | |||
leont | Ah, ok | ||
lizmat | it's just checking against Any if you don't specify anything more strict | ||
AlexDaniel | well, this sounded like there's no difference if you specify a type or not | 12:55 | |
lizmat | indeed, there is no execution speed difference | ||
12:55
Alina-malina joined
|
|||
AlexDaniel | but in reality it should be faster if you do, since then there's no need to mess with type checks and stuff | 12:56 | |
12:56
El_Che_ is now known as El_Che
|
|||
lizmat | well, if you're using simple types... I mean, if you specify a type that has a where in it, it *will* be slower because it needs to execute that code | 12:56 | |
typechecks are done on C-code, *very* low level | |||
*in | |||
AlexDaniel | in fact, even if you don't specify the type, it seems like it will do that automatically… at least that's what I understood from jnthn talks | 12:57 | |
with a drawback that it might have to deoptimize it in the future | |||
lizmat | yes, it will be of type Any | ||
AlexDaniel | lizmat: well, on what level? | 12:58 | |
lizmat | AlexDaniel: deopt why ? | ||
leont | Then I'll keep my types, and may add a few more | ||
(and try to not add too many subsets | 12:59 | ||
AlexDaniel | lizmat: well, if your code always gets a Str in runtime, then it makes sense to optimize it for Str. Just to get the instruction count lower | ||
lizmat: if then all of sudden it gets something else, then you have to rewind that… | 13:00 | ||
I could be wrong, but that's how I understood it | |||
lizmat | ah, yes | ||
leont | Do return types on subs/methods help in avoiding those checks? | 13:02 | |
AlexDaniel | leont: I'd say yes, but it's hard to measure how much you actually win in terms of wallclock time | 13:03 | |
leont: so if I were you I would not care about this. What I would care about is the self-documenting code | |||
leont: if the types are specified everywhere, arguably it is easier to read | 13:04 | ||
though I don't say that you always should do that | |||
lucasb_ | r: say ('abc' x 2 ~ '1234').substr(4) | 13:06 | |
camelia | ( no output ) | ||
..rakudo-moar cd7766: OUTPUT«bcabc1» | |||
lucasb_ | j: say ('abc' x 2 ~ '1234').substr(4) | ||
camelia | rakudo-jvm cd7766: OUTPUT«bc1234» | ||
leont | Given how much C++ I've been doing lately, adding the types feels fairly natural to me ;-) | ||
lucasb_ | don't know why rakudo-jvm had no output in the first eval | 13:07 | |
AlexDaniel | well, what if we try it again? | ||
r: say ('abc' x 2 ~ '1234').substr(4) | |||
camelia | rakudo-moar cd7766: OUTPUT«bcabc1» | ||
..rakudo-jvm cd7766: OUTPUT«bc1234» | |||
AlexDaniel | r: say ('abc' x 2 ~ '1234').substr(4) | ||
camelia | rakudo-moar cd7766: OUTPUT«bcabc1» | ||
..rakudo-jvm cd7766: OUTPUT«bc1234» | |||
AlexDaniel | r: say ('abc' x 2 ~ '1234').substr(4) | 13:08 | |
camelia | rakudo-jvm cd7766: OUTPUT«bc1234» | ||
..rakudo-moar cd7766: OUTPUT«bcabc1» | |||
AlexDaniel | go figure | ||
lizmat | oh, wow | ||
looks to me jvmis correct | 13:09 | ||
lucasb_ | indeed. this is an old one | ||
leont | How heavy is compiling rakudo-jvm compared to rakudo-moar? | 13:10 | |
AlexDaniel | leont: by heavy you mean? | ||
lizmat | takes about 4x as long on my machine | ||
leont | Memory-wise mainly | ||
ShimmerFairy | lizmat: how so? I have a hard time seeing why moar isn't the correct one | ||
leont | But CPU is also useful to know | ||
moritz | last I tried, I needed about 3GB RAM | 13:11 | |
lucasb_ | ShimmerFairy: It looks like a off-by-one error, but I think moar is wrong, don't you? | ||
ShimmerFairy | lucasb_: no? | ||
AlexDaniel | ShimmerFairy: please explain… | ||
ShimmerFairy | r: say 'abcabc1234'.substr(4) | ||
camelia | rakudo-{moar,jvm} cd7766: OUTPUT«bc1234» | ||
ShimmerFairy | must've miscounted in my head the first time :) | 13:12 | |
AlexDaniel | ShimmerFairy: by the way, thanks for your comment | ||
lizmat | r: say (('abc' x 2) ~ '1234').substr(4) | 13:13 | |
camelia | rakudo-moar cd7766: OUTPUT«bcabc1» | ||
..rakudo-jvm cd7766: OUTPUT«bc1234» | |||
13:13
parsonsNose joined
|
|||
awwaiid | AlexDaniel: well... specifying types everywhere, IMO, is a double edged sword. Working with haskell code I see few things I don't care for. One is that by not allowing type inference you end up having to edit lots of code if you change a type. Another is that instead of having like $name they have Name $n, and then in the body use one-letter variable names with the excuse that you can look up to see the type of the variable. | 13:14 | |
parsonsNose | why is `perl6 -e 'my ($x,$y,$i) = (0,1,1); while ($i < 1000000) {$y += $x ; $x = $y - $x ; $i += 1 } ; say $y;'` using up 6GB of RAM before plateauing? | ||
ShimmerFairy | AlexDaniel: you're welcome. I hope I was better able to describe how I view :x in a long comment as opposed to short IRC statements :) | 13:15 | |
moritz | parsonsNose: looks like a bug to me | ||
parsonsNose: some weird conditions not triggering a GC run | |||
parsonsNose | *sad face* this is on rakudobrew moar | ||
AlexDaniel | ShimmerFairy: well, I still completely disagree, but it's good to have different opinions :) | 13:16 | |
moritz | parsonsNose: care to submit that via email to [email@hidden.address] | ||
parsonsNose | Sure thing | ||
AlexDaniel | wow, it is so hungry for ram | 13:17 | |
13:21
loren joined
|
|||
AlexDaniel | my: my $x = 0; my $y = 1; for 1..1000000 { $y += $x; $x = $y - $x; }; say $y; | 13:22 | |
whoops, I meant m: | |||
but it does not matter, what I wanted to say is that it eats the whole memory too | |||
13:23
domidumont left
13:24
ggoebel left
|
|||
AlexDaniel | parsonsNose: how many digits are there in the final result? | 13:25 | |
parsonsNose | something like 20k... I'll check | ||
loren | m: my $x = 1; if ($x = 0) { say "invoke me"; }; $x = 2; if ($x = 0) & ($x = 1) { say $x; } | 13:27 | |
camelia | rakudo-moar cd7766: OUTPUT«1» | ||
loren | why the second if condtion '($x = 1)' be calculated | 13:28 | |
azawawi | github.com/azawawi/perl6-selenium-...firefox.p6 # POC: Automating firefox process through Perl 6 selenium webdriver :) | 13:29 | |
parsonsNose | 208k | ||
moritz | loren: are you realizing you're not using comparison (==) but assignment (=) ? | ||
parsonsNose | (took a while) | ||
loren | that's not point | ||
lucasb_ | well, 1 is true | ||
AlexDaniel | I thought that this would help: $y += $x; $x -= $y; $x *= -1; but no | ||
lucasb_ | 0 is not | ||
moritz | loren: the problem is that you're reading and writing from a variable in the same statement with no sequence point | 13:30 | |
loren: both assignments return $x (the, variable, not its value) | |||
loren | m: my $x = 1; if ($x = 0) { say "invoke me"; }; $x = 2; if ( 0 ) & ($x = 1) { say $x; } | ||
camelia | ( no output ) | ||
13:30
ggoebel joined,
raiph joined
|
|||
moritz | loren: so both expressions return $x (which evaluates to 1), and & is not short-circuiting | 13:30 | |
ShimmerFairy | loren: did you mean && perchance? | 13:31 | |
(a single & makes a Junction) | |||
moritz | loren: your statement is equivalent to do { $x = 1; $x & $x } | ||
parsonsNose | Bug report sent, anyway. Feel like the original code should've worked. For comparison, scala uses about 300MB with equivalent code | ||
loren | OK, moritz i know it . | ||
I will take some look '&&' | 13:32 | ||
awwaiid | azawawi: that's pretty awesome! | 13:34 | |
loren | I just sae '&' operator , ignored '&&' | ||
13:35
tokuhirom joined
13:36
mayuresh joined
13:39
mayuresh left,
tokuhirom left
13:43
ngie joined
13:48
FROGGS_ joined
13:52
FROGGS left
|
|||
masak | loren: heh. most of the time you'll want '&&', I think. | 13:54 | |