»ö« 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 moritz on 25 December 2014.
timotimo though i think our lowest level IO thingies have locking on themselves already 00:00
but you'll want to have locking for bigger blobs of output, too
masak I'd use .act regardless, just to be on the safe side.
it is the semantics you want here, even if lower levels handle it just fine. 00:01
adu avuserow: how goes the logging?
avuserow .tell adu been at $dayjob all day so no direct hacking on it, just backlogged and read lizmat++'s suggestion about supplies, so I'm doing a bit of reading about it 00:05
yoleaux avuserow: I'll pass your message to adu.
masak 'night, #perl6 00:07
Kristien had an idea: gist.github.com/rightfold/fcbc1be0d35b11d38a84 00:33
I want to implement that.
Kristien wonders whether such shenanigans can be implemented in Perl 6 with a custom HOW 00:39
timotimo sub calls to the other thing? 00:45
so kind of like callsame?
Kristien calling x calls the least derived implementation 00:48
sub() calls the one more derived implementation
I don't know what callsame is.
ugexe it redispatches. you could also use .wrap or augment i imagine 00:54
or .candidates[*-1] maybe 00:57
TimToady m: class B { method f { 'B' } }; class D is B { method f { 'D' } }; say D.*f 01:10
camelia rakudo-moar fec233: OUTPUT«D B␤»
TimToady or you can use .* like that
Kristien I want B.f to call D.f for an object of type D 01:11
and (that object).f to call B.f.
TimToady how do you avoid infinite regress if you come back to B.f? 01:13
and why do you want B to implement the virtual dispatch for you?
Kristien just don't call super in D.f :P
TimToady I didn't :) 01:14
I don't understand why you want to visit B.f twice 01:15
Kristien I don't.
TimToady okay, I misread what you meant
you kinda mean two different things by B.f up there
Kristien "class B { method f { say 'B'; prevsame; } }; class D is B { method f { say 'D' } }; D.new.f" would print "B\nD" 01:16
With some annotation on f to annotate that the mro is reversed of course.
I can be an alternative to documenting that overrides must always use nextsame. 01:20
Kristien well, time to sleep 01:21
bye!
TimToady m: class B { method f { 'B' } }; class D is B { method f { 'D' } }; say D.*f.reverse # :)
camelia rakudo-moar fec233: OUTPUT«B D␤»
TimToady m: class B { method f { 'B' } }; class D is B { method f { 'D' } }; say .can('f').reverse».($_) given D.new 01:24
camelia rakudo-moar fec233: OUTPUT«B D␤»
TimToady still kinda seems like misuse of inheritance 01:27
skids FROGGS++ suggestion to do a "my $!" to keep exceptions from falling out of compunits didn't seem to work. But assigning to $! at the end of the module did. Wonder how naughty that is. 01:33
TimToady sort of a shame that rosettacode.org/wiki/Write_language...CII#Perl_6 actually requires that 'my $/;' 01:42
adu I use figlet for that 01:46
yoleaux 00:05Z <avuserow> adu: been at $dayjob all day so no direct hacking on it, just backlogged and read lizmat++'s suggestion about supplies, so I'm doing a bit of reading about it
adu avuserow: cool
my $dayjob sucked today
yoleaux: tell avuserow cool 01:47
adu is not sure if that worked
ugexe grammar { token TOP { ^ <tell> \s <user> \s <message> } token tell:sym<.tell> { <sym> } token user { <alnum>+ } token message { <after <user>> (.*) } } 02:19
TimToady \s+ probably 02:24
and ; after } if you follow with another statement on the same line 02:25
after is amost certainly wrong
ugexe also <after [<.ws>+ <user>]>
TimToady *alm
you just don't need it 02:26
your TOP rule already guarantees it's after <user>
token message { .* } is about all you need 02:27
or \N* if you want to stop on \n 02:28
m: $_ = "foo"; s:g [(0)] = $0 xx 2; .say; # known? 02:32
camelia rakudo-moar fec233: OUTPUT«foo␤»
TimToady m: my $/; $_ = "foo"; s:g [(0)] = $0 xx 2; .say; # known?
camelia rakudo-moar fec233: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $/␤ at /tmp/4d6DTiJY6l:1␤ ------> my $/⏏; $_ = "foo"; s:g [(0)] = $0 xx 2; .say;␤foo␤»
TimToady m: $_ = "foo"; s:g [(o)] = $0 xx 2; .say; # known? 02:33
camelia rakudo-moar fec233: OUTPUT«fo oo o␤»
TimToady well, works there
m: given "foo" -> $_ is copy { s:g [(o)] = $0 xx 2; .say } 02:35
camelia rakudo-moar fec233: OUTPUT«fo oo o␤»
TimToady m: for "foo" -> $_ is copy { s:g [(o)] = $0 xx 2; .say }
camelia rakudo-moar fec233: OUTPUT«f␤»
TimToady there's the bug 02:36
masakbot ^^
m: for "foo" -> $_ is copy { my $/; s:g [(o)] = $0 xx 2; .say }
camelia rakudo-moar fec233: OUTPUT«fo oo o␤»
TimToady and there's the workaround
m: for "foo" -> $_ is copy { s:g [(o)] = OUTER::<$0> xx 2; .say } 02:37
camelia rakudo-moar fec233: OUTPUT«use of uninitialized value of type Any in string context in block <unit> at /tmp/53Sju6_D4U:1␤␤use of uninitialized value of type Any in string context in block <unit> at /tmp/53Sju6_D4U:1␤␤use of uninitialized value of type Any in string context…»
avuserow adu: I usually backlog here :) for future reference, yoleaux works via '.tell user message' 03:13
adu o hi 03:27
avuserow o/ 03:28
adu I knew I was doing something wrong
raydiak TimToady: #123005 04:08
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123005
avuserow m: sub x {say caller}; x 04:34
camelia rakudo-moar fec233: OUTPUT«===SORRY!=== Error while compiling /tmp/_pzqm4NxEW␤Undeclared routine:␤ caller used at line 1␤␤»
adu raydiak: how goes? 05:29
TimToady raydiak: thanks 06:00
dalek c: d7e1907 | paultcochrane++ | html/css/pygments.css:
Add pygments css colour definitions file
06:21
c: 776d3f4 | paultcochrane++ | template/head.html:
Load pygments style definitions

IO &close: correct link, explain why close is necessary
moritz good morning 06:22
that was the add_pygments_highlighting branch merge
dalek p: 2776313 | jnthn++ | tools/build/MOAR_REVISION:
Bump to latest MoarVM.
08:51
kudo/nom: 168ca22 | jnthn++ | src/vm/moar/ops/container.c:
Update Rakudo scalar contspec for updated API.
kudo/nom: b46a4a9 | jnthn++ | src/vm/moar/ops/container.c:
Chase MoarVM container API change after bump.
kudo/nom: 9c2dc10 | jnthn++ | tools/build/NQP_REVISION:
Bump to latest NQP, to get updated MoarVM.
jnthn (b46a4a9 was a merge commit, turns out the first commit in the native-ref branch was also the one needed for compat with the Moar bump) 08:52
dalek kudo/nom: 8862eb3 | TimToady++ | src/core/Rational.pm:
omit . on Rat with 0 fractional digits
08:57
dalek ast: a25df02 | TimToady++ | S32-num/base.t:
tests for .base with digits, .base-repeating
08:59
TimToady zzz while recompiling everything and spectesting & 09:07
FROGGS[mobile] like in the good old parrot times :p 09:10
moritz m: say pi.base(10, 5);
camelia rakudo-moar fec233: OUTPUT«3.14159␤»
moritz m: say (1/7).base-repeating 09:14
camelia rakudo-moar fec233: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in method base-repeating at src/gen/m-CORE.setting:12103␤ in block <unit> at /tmp/3tmU1_MDCS:1␤␤»
moritz m: say (1/7).base-repeating(10)
camelia rakudo-moar fec233: OUTPUT«0. 142857␤»
moritz m: say (4/7).base-repeating(10) 09:15
camelia rakudo-moar fec233: OUTPUT«0. 571428␤»
moritz m: say (24/7).base-repeating(10)
camelia rakudo-moar fec233: OUTPUT«3. 428571␤»
itz parrot used to run out of VM on a particularly old system of mine 09:19
dalek c: d82788a | moritz++ | lib/Type/Real.pod:
document $digits argument to .base

stolen from the design docs
09:20
TimToady compiles all three backends, some failing tests but no apparent regressions on moarvm spectest 09:23
zzz &
moritz m: printf "%s(%s)", '6.', 3 09:25
camelia rakudo-moar fec233: OUTPUT«===SORRY!=== Error while compiling /tmp/STMjqDTtdG␤Variable '%s' is not declared␤at /tmp/STMjqDTtdG:1␤------> printf "%s(%s⏏)", '6.', 3␤ expecting any of:␤ postfix␤»
moritz m: printf '%s(%s)', '6.', 3
camelia rakudo-moar fec233: OUTPUT«6.(3)»
moritz .ask TimToady wouldn't it more consistent to return Str (the type object) for .base-repeating that exceeds the precision limit? 09:30
yoleaux moritz: I'll pass your message to TimToady.
dalek c: 998065c | moritz++ | lib/Type/Rational.pod:
Document Rational.base-repeating
dalek c: 9a69456 | moritz++ | lib/Language/operators.pod:
Improve docs for infix =:=
09:39
ab5tract .botsnack 09:41
yoleaux :D
dalek c: 7fa0d46 | moritz++ | lib/Language/operators.pod:
Examples for eqv operator
09:47
dalek c: 7588f2b | moritz++ | lib/Language/operators.pod:
infix:<leg>: mnemonic, examples
09:50
Kristien morning 09:55
ab5tract Kristien: good morning :) 10:00
[ptc] has the feeling that moritz++ is some kind of bot... 10:04
m: my %hash = { "a" => 1, "b" => 2, "c" => 3}; say %hash;
camelia rakudo-moar 8862eb: OUTPUT«a => 1, b => 2, c => 3␤Saw 1 call to deprecated code during execution.␤================================================================================␤%hash = itemized hash called at:␤ /tmp/Hl55Fx2VT1, line 1␤Deprecated since v2014.7, will be r…»
[ptc] interesting, that error didn't turn up in my rakudo-moar.... 10:05
[ptc] goes back to the drawing board
nine_ moritz: StartSSL certificates are orders of magnitude cheaper then the competition and they are accepted by all browsers nowadays. Have them in production with good experiences. 10:10
[ptc] m: my %hash = "a" => 1, "b" => 2, "c" => 3; say %hash;
camelia rakudo-moar 8862eb: OUTPUT«a => 1, b => 2, c => 3␤»
[ptc] m: my %hash = "a" => 1, "b" => 2, "c" => 3; say %hash.gist;
camelia rakudo-moar 8862eb: OUTPUT«a => 1, b => 2, c => 3␤»
dalek kudo-star-daily: afd95e2 | coke++ | log/ (14 files):
today (automated commit)
10:18
itz I got my last startssl cert for free
dalek c: 70a983d | moritz++ | type-graph.txt:
Add some more types to type-graph.txt
10:28
itz m: 'ABC'.ords xx 2 10:31
camelia ( no output )
dalek kudo/nom: 98de201 | moritz++ | src/core/Temporal.pm:
DateTime: Fix/add type constraints, fix format specifier in error message
10:37
nine_ After two decades I'm still struggeling to accept how much one can screw up a language: lwn.net/SubscriberLink/633203/40c7d412a07bc317/ 10:38
[ptc] quite right :-) 10:39
especially 1 + "extrajunk" = 2 10:40
nine_ They really want to add strict typing so functions may rely on types of their input parameters just to make it the caller's decision if he really wants to be strict or not... 10:40
dalek kudo/nom: 949b809 | moritz++ | src/core/Proc/Async.pm:
Give all X::Proc::Async exceptions a common role

and make the Proc::Async object that threw it available as an attribute in the common role
10:43
c: 8fdbbb1 | moritz++ | / (2 files):
Document X::Proc::Async

also add X::Proc::Async and friends to the type graph
masak good noon, #perl6 10:56
Ven o/, masakbot
[ptc] masak: o/
dalek ast: 776cec3 | moritz++ | S03-operators/repeat.t:
Fudge failing test (RT #123830)
10:57
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123830
lizmat Mouq: re irclog.perlgeek.de/perl6/2015-02-13#i_10112937 , it will most definitely *not* land before 2015.02 11:46
yoleaux 13 Feb 2015 21:35Z <jnthn> lizmat: Hm, that doesn't quite strike me as correct either. The $!PIO attribute is really a handle...so something along those lines may fit better. I guess we already used IO::Handle...or did that change in newio, or does places with PIO overlap with that anyway? :)
lizmat Mouq: I have good hopes soon thereafter
.tell jnthn the PIO role is consumed by IO::Handle / IO::Socket / IO::Dup (the class handling $*IN and friends) 11:47
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn fwiw, as I stated before, I'm fine with PIO, as it is the Perl Io Object
yoleaux lizmat: I'll pass your message to jnthn.
dalek Heuristic branch merge: pushed 132 commits to roast/newio by lizmat 11:49
dalek ast: 2c3817c | lizmat++ | S03-operators/repeat.t:
Unfudge tests for parrot
11:56
ecs/newio: 634956a | lizmat++ | S16-io.pod:
Oops, fix wrong merge
12:03
[ptc] m: say mkdir "blah" 12:05
camelia rakudo-moar 949b80: OUTPUT«mkdir is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in sub mkdir at src/RESTRICTED.setting:8␤ in block <unit> at /tmp/uA88Lv3L0m:1␤␤»
dalek kudo/newio: 168ca22 | jnthn++ | src/vm/moar/ops/container.c:
Update Rakudo scalar contspec for updated API.
kudo/newio: b46a4a9 | jnthn++ | src/vm/moar/ops/container.c:
Chase MoarVM container API change after bump.
kudo/newio: 9c2dc10 | jnthn++ | tools/build/NQP_REVISION:
Bump to latest NQP, to get updated MoarVM.
kudo/newio: 8862eb3 | TimToady++ | src/core/Rational.pm:
omit . on Rat with 0 fractional digits
kudo/newio: 98de201 | moritz++ | src/core/Temporal.pm:
DateTime: Fix/add type constraints, fix format specifier in error message
kudo/newio: 7418eeb | lizmat++ | / (4 files):
Merge branch 'nom' into newio
lizmat [ptc]: what are you trying to show ?
[ptc] lizmat: I was just interested to see what the error message would be like 12:06
I'm looking at the docs for mkdir and rmdir atm, and they don't seem to do the same as what the spec does
I'm running moarvm, btw 12:07
lizmat which docs are you looking at ?
[ptc] perl6/specs/S32-setting-library/IO.pod and perl6/doc/lib/Type/IO.pod
in my repl, when I try to mkdir, it returns the name of the directory made, but if I try something like mkdir "/moo", it returns effectively $( ) 12:08
the specs say it fails, and I was just playing around to see what a failure would look like on another, more restricted system 12:09
also rmdir returns the name of the dir which was deleted (if it existed) and nothing (not even Nil) if it didn't exist 12:10
lizmat on the restricted system, the mkdir sub is just replaced by something that fails
[ptc] that's ok, I just wanted to see it fail in some way :-)
lizmat well, the *exact* behaviour of mkdir() and friends is currently a bit in flux
both from a synopsis point of view
and from a backend point of vire
*view
[ptc] that's good to know, so it might be an idea to hold off documenting things exactly at this stage 12:11
lizmat the newio branch of "specs" contains description that matches the doc
for mkdir at least
and the newio implementation also matches that 12:12
[ptc] I had the vague feeling that what I was seeing was backend implementation-specific, and what you've said basically confirms that
ok, thanks for the info :-)
lizmat yw 12:13
nine_ lizmat: as long as it's in flux anyway. With mkdir especially I often want it to succeed if the directory already exists, but sometimes I need to treat that as an error. When the API caters to both use cases I'd consider it highly practical. 12:16
dalek ecs: ad449e5 | paultcochrane++ | S32-setting-library/IO.pod:
Format code-like string with C< >
12:17
ecs: 55b6345 | paultcochrane++ | S (5 files):
Merge branch 'master' of github.com:perl6/specs
lizmat it returns a Failure if failed, you can // it if you want to ignore
dalek c: 211ed6e | paultcochrane++ | lib/Type/IO.pod:
Document IO::print
12:19
doc: e510017 | paultcochrane++ | lib/Type/IO.pod:
doc: Document IO::say
moritz nine_, lizmat: mkdir-but-succeed-if-exists could be called declaredir 12:35
lizmat sub mkdir-but-succeed-if-exists(|c) { mkdir(|c) // True }
sub declaredir(|c) { mkdir(|c) // True } # sorry moritz, should read better :-) 12:36
masak assuredir
moritz lizmat: mkdir() // True doesn't cover it 12:37
lizmat moritz: why ?
moritz lizmat: what wouldn't fail when permission denied, no?
lizmat ah, ok 12:38
moritz or if it's a file, not a directory
or if the parent dir doesn't exist
or all the other ways that mkdir can go wrong
lizmat sub declaredir(\path,|c) { mkdir(path,|c) // path.IO.d }
moritz nope
that return False on error, not the Failure
lizmat sub declaredir(\path,|c) { path.IO.d // mkdir(path,|c) } 12:39
moritz now if you change // to || it might work :-) 12:39
m: say "nosuchdir".IO.d
camelia rakudo-moar 949b80: OUTPUT«Failed to find 'nosuchdir' while trying to do '.d'␤ in method gist at src/gen/m-CORE.setting:14669␤ in sub say at src/gen/m-CORE.setting:17426␤ in block <unit> at /tmp/ewedKfJhTw:1␤␤»
moritz ugh
I thought it'd simply return a False 12:40
lizmat yeah, guess we need to check for .e first
in the newio branch, that would work
I think
lemme check
dalek kudo/newio: f7642cc | lizmat++ | src/core/Distro.pm:
Make sure we check dirs when using Distro.tmpdir
12:41
lizmat moritz: well False would mean it exists but is not a dir 12:43
lizmat if anything, it should return Bool in that case 12:43
if it doesn't return a failure
m: say "nosuchdir".IO.d // "huh" 12:44
camelia rakudo-moar 949b80: OUTPUT«huh␤»
moritz lizmat: if something doesn't exist, it's not a directory either
lizmat no, you can't tell
moritz well yes
moritz if it doesn't exist, I can tell it's not a directory 12:44
lizmat m: say "nosuchdir".IO.d // False
camelia rakudo-moar 949b80: OUTPUT«False␤»
moritz
.oO( santa claus isn't a directory )
12:45
lizmat well, if that's what we want to do for the newio branch
I'm fine with that
lizmat m: say "nosuchfile".IO.s 12:46
camelia rakudo-moar 949b80: OUTPUT«Failed to find 'nosuchfile' while trying to do '.s'␤ in method gist at src/gen/m-CORE.setting:14669␤ in sub say at src/gen/m-CORE.setting:17426␤ in block <unit> at /tmp/LVjc8W7yj_:1␤␤»
lizmat m: say "nosuchfile".IO.s // 0 # and for non-boolean cases?
camelia rakudo-moar 949b80: OUTPUT«0␤»
lizmat or -1 ?
dalek kudo/newio: 168fca7 | lizmat++ | src/core/IO/Pathy.pm:
IO::Pathy is only for existing paths
12:50
kudo/newio: f43f963 | lizmat++ | src/core/IOU.pm:
IOU.e should never fail, just return Bool:D
lizmat afk for a few hours 12:52
Kristien say you'd write in Perl a program that needs some assets compiled 13:15
would you use a separate build step or would you do it in a BEGIN?
moritz separate build step
nine_ .tell lizmat path.IO.d // mkdir(path,|c) is prone to very hard to diagnose race conditions
yoleaux nine_: I'll pass your message to lizmat.
dalek c: 36c35e2 | paultcochrane++ | htmlify.p6:
Rename $c -> $pod-element in find-definitions()

This better represents (I believe) the variable's purpose.
13:16
Kristien moritz: why? 13:17
moritz Kristien: because that's what build steps are for 13:18
Kristien OK.
dalek c: 1139ae9 | paultcochrane++ | htmlify.p6:
Rename @c -> @all-pod-elements in find-definitions()
13:25
moritz [ptc]++ 13:30
dalek c: 622daaa | paultcochrane++ | htmlify.p6:
Rename $tg -> $type-graph in htmlify
14:06
arnsholt Kristien: Remember that you're not guaranteed that your program will be run in pre-compiled mode. In that case, you'd end up building the assets on every start-up 14:07
masak [ptc]++ # clarity? in variable names? well, I never! :P
arnsholt Which is probably not what you want
Kristien OK
arnsholt I mean, it could be what you want, but a priori I'd think a separate step is more appropriate 14:10
pmurias re building assets at BUILD time, shouldn't the be rebuilt when their dependencies change? 14:12
itz some odd and inconsistant spec test fails on FreeBSD/Linux 14:13
arnsholt pmurias: Probably. Of course, you *could* implement that kind of logic in a BEGIN =) 14:14
I guess it's just a question of time before someone implements a Make slang =D 14:15
itz ah one is fudged now
pmurias we don't have a decent way to compile Perl 6 yet, so I'm not sure putting compilation of other stuff into makes much sense 14:16
s/into/it/
[ptc] masak: sorry! I'll change them into $x, $xx and $xxx :P 14:17
masak :P 14:19
moritz [Coke]: re irclog.perlgeek.de/perl6/2015-02-11#i_10100787 do you think what's shown now satisfies that? 14:23
dalek p/js: 020a5af | (Pawel Murias)++ | nqp-js:
Do not rm tmp.js in the nqp-js script, it's annoying and potentially dangerous
14:28
p/js: 6c9e703 | (Pawel Murias)++ | src/vm/js/ (4 files):
Pass test 55.

Deserialize closures which have no context. Set the code object on deserialized closures.
pmurias but once we get rid of Makefile doing asset compilation at BEGIN time makes some sense 14:35
moritz pmurias: do you know how I can get 'node' installed on debian? the nodejs package just installs a 'nodejs' binary 14:41
Ven moritz: build it. 14:46
moritz pmurias: or should I teach Configure.pl to probe for nodejs? or allow specifying the binary
Ven: I'd like to avoid that
Ven well...:)
moritz Ven: a different binary name shouldn't be reason to do a custom build 14:47
Ven moritz: no, but an outdated version in packages is.
moritz Ven: but is it?
Ven moritz: pretty sure it is. type nodejs -v and discover
moritz 0.10.29 14:48
vs. 0.12 as the last stable release
not knowing anything about node, that doesn't sound too terrible
moritz ok, I've done a symlink into $HOME/bin for now 14:50
though I'm happy to contribute some code to make the binary name specifyable at Configure.pl time
if that's wanted
Ven pmurias: so, after nqp-js gets tests 19,24,29-32,34,43-45,49,50,52,54,60-63,67,72-74,77-80,83-87 -- will other tests be missing? 14:54
admittedly, some of them can't be passed -- are they "just" skipped? 14:55
Ven is now building nqp-js 15:00
ab5tract .ask lizmat i'm curious what your opinion is re: a quanthash-y symmetric difference op: github.com/rakudo/rakudo/pull/362 15:05
yoleaux ab5tract: I'll pass your message to lizmat.
ab5tract .tell lizmat but even more curious is that infix:<(^+)> seems to break the parser in some really weird way. the operator is unusable when invoked from a file, or when used like (...).Bag (^+) (...).Bag from the repl 15:06
yoleaux ab5tract: I'll pass your message to lizmat.
Ven pmurias: I'm totally new to nqp hacking. Do I get need to re-make && make test everytime I change something? (the answer seems obvious here
pmurias: uglifyjs command seems to be "uglify" here (?) 15:11
pmurias moritz: teaching Configure.pl to probe for nodejs would be great 15:14
Ven: you need to make everything after you change something 15:15
Ven pmurias: mmmh... I'm a bit lost in the sea, tbh. but yeah, I guessed as much
pmurias Ven: there is a HACKING file 15:16
Ven pmurias: yes, I know, I'm reading it
pmurias Ven: re "uglify" we might want to detect that
Ven pmurias: but, i.e., TODO says "list_s", so I tried looking i.e. in Ops.java for a list_s, but none to be found, so I'm guessing I'm looking at the wrong file...:) 15:17
psch o/
pmurias looks
Ven \o psch
psch Ven: Compiler.nqp has the core ops, not all of those map to vm-specific code 15:18
(Compiler.nqp for jvm that is, it's QASTCompilerMAST.nqp for moar)
to clarify, not all are implemented on vm-level
i think that's more correct :)
pmurias src/vm/jvm/QAST/Compiler.nqp 15:20
dalek p/js: 4d5827a | (Pawel Murias)++ | src/vm/js/nqp-runtime/deserialization.js:
Remove empty loop.
15:23
p/js: bf84036 | (Pawel Murias)++ | HACKING:
Mention the other place ops are implemented on the jvm.
Ven psch: thanks. too bad there doesn't seem to have much comments 15:23
pmurias Ven: for implementing list_s it's best to just add a new type to the generic list_* code in src/vm/js/QAST/Compiler.nqp:528 15:24
psch Ven: the add_core_op invocation the file pmurias++ gave above seems commented better than other some other parts the jvm backend to me 15:25
Ven pmurias: ah, is it really that simple :P? 15:29
There's no listing OP <-> test, I'll guess?
pmurias I don't understand
Ven pmurias: I reckon there's no tests currently written for nqp::list_s, right? 15:30
itz twitter.com/fsfe
:)
pmurias I have one ready
psch pmurias: ooc, what's the reason for having "add_op" and "add_simple_op" instead of "add_core_op" as jvm and moar do?
Ven itz: that's a very nice photo of woolfy++ 15:31
dalek p/js: 6820384 | (Pawel Murias)++ | / (2 files):
Add list_s test.
pmurias Ven: as I was just preparing to implement list_s, as it's required for rules 15:32
Ven pmurias: fair enough.
pmurias just add 59 back to run_tests when you implement nqp::list_s 15:33
pmurias psch: add_simple_op is just a helper on top of add_op to allow more concise op definitions 15:34
grondilu say "foo".trans: @$_ Z=> .[].rotate(13) given "a".."z" 15:35
m: say "foo".trans: @$_ Z=> .[].rotate(13) given "a".."z"
camelia rakudo-moar 949b80: OUTPUT«sbb␤»
grondilu m: say "sbb".trans: @$_ Z=> .[].rotate(13) given "a".."z"
camelia rakudo-moar 949b80: OUTPUT«foo␤»
grondilu thought Range supported .rotate so he could do without .[] 15:36
pmurias psch: it's not really clear to me what the difference between "hll" and "core" ops is in the jvm backend 15:37
psch pmurias: hll ops are bound to one specific hll, for starters. e.g. "how do we stringify" differs between python and perl6 15:38
psch pmurias: i don't know if that distinction is consistent throughout NQP though 15:38
pmurias psch: I tend to do things in a test driven manner, when we get to the point where it's neccessary I will add that distinction 15:39
but I'm not jnthn++ so it's hard for me do anticipate how everything will be done as I haven't implemented nqp 3 times before 15:40
psch pmurias: no worries, i was just wondering. not having the distinction might just make it different (than nqp-j or nqp-m) to use nqp-js for other languages 15:41
that's how i understand the difference between add_core_op and add_hll_op at least - ops added with the former exist for every language implemented with NQP, ops added with the latter are bounds to one HLL 15:42
which is kinda fun, because NQP is itself a HLL implemented with NQP...
ab5tract pmurias++ # it's great to see so much progress on nqp-js
pmurias calling both the NQP language and the QAST backend NQP is confusing 15:43
psch QAST is (P++)AST as a parsing structure implemented in NQP 15:44
NQP is bootstrapping and understand languages that emit QAST
NQP emits QAST
and Münchhausen is happy 15:45
in other words, i'm not sure i understand the confusion
pmurias NQP is a language like Perl 6 15:48
but jnthn also calls the whole architecture NQP 15:49
psch in my understanding, NQP is a bootstrapping language and compiler focused on parsing and compilation 15:50
as such, NQP is a prime target for dogfooding and should bootstrap
eh, that was jumbled. "it's bootstrapping because it should bootstrap" 15:51
psch what i mean is that as a language it's made for implementing languages, and thus as a compiler it should bootstrap to prove it's good at what it does 15:52
Ven pmurias: what's $@ in run_tests?
Ven pmurias: "NYI is not defined" :P 15:54
Heap corruption detected: pointer 0x101367fa0 to past fromspace while trying to re-"make" 15:55
Okay, what now :(
Ven make cleans 15:55
Ven pmurias: okay, works with make clean && make, but I'm a bit afraid I'll have to do that every time 15:58
pmurias Ven: $@ in run_tests is used to pass a -v 15:59
Ven pmurias: ah, it's basically "every input"? 15:59
as in, input forwarding 16:00
pmurias command line options forwarding
so we can have src/vm/js/bin/run_tests -v
Ven alright, gotcha
going to fork, make a branch and PR, then
"what's the smallest contribution I can make?"
I found the answer to that one :). gotta start somewhere, tho
pmurias just commit 16:01
Ven: you have a nqp commit bit?
Ven pmurias: I don't
pmurias I can pull the PR then 16:02
Ven alright, then I'll fork and PR
pmurias: #221 16:04
dalek p/js: 5ca166f | vendethiel++ | src/vm/js/ (2 files):
Add nqp::list_s and nqp::push_s, re-enable test 59
16:05
p/js: 2eb3dc1 | (Pawel Murias)++ | src/vm/js/ (2 files):
Merge pull request #221 from vendethiel/js-fix59

Add nqp::list_s and nqp::push_s, re-enable test 59
Ven pmurias: I have *no idea* how die_s should be implemented. Throw an exception :|? 16:06
pmurias Ven: yes, but we will need to walk the contexts to call the handler *before* calling the exception 16:08
dalek p/js: 32535d5 | (Pawel Murias)++ | src/vm/js/ (4 files):
Implement nqp::callercode.
Ven pmurias: it seems nqp-js will really have to ABUSE exceptions a lot
ah, I forgot to update TODO
pmurias as exceptions are resumable in nqp
I'll update the TODO
dalek p/js: 8fffdb7 | (Pawel Murias)++ | TODO:
Update the TODO.
16:09
pmurias Ven: Perl 6 abuses exceptions a lot, it uses them a lot for control flow
Ven pmurias: why did you name all these functions?
Ven pmurias: admittedly, the perl6 VM(s) can optimize for control flow exceptions 16:10
pmurias Ven: the ones with _?
Ven pmurias: yes, but I have my answer now
I didn't read the commit properly 16:11
pmurias: be aware, tho, Function.name is nonstandart, AFAIK
I'm not even sure actually. I know it's not standardly-writeable, at least... (IE fails here)
pmurias IE doesn't seem to support it :( 16:14
we could define our own property
we will need to set up some in browser testing if we want to make sure we are compatible 16:15
dalek line-Perl5: fa2e492 | (Stefan Seifert)++ | / (2 files):
Check minimum Perl 5 version for less confusing errors
16:17
nine_ Seems like Inline::Perl5 requires 5.18 at least. Older perls don't seem to like calls like 'v6::run("say q{Hello World}");' 16:18
pmurias nine_: there is an existing v6 module 16:19
ugexe how do you turn off a modifier in a group? like [:i 'http'] but *not* case sensitive
ugexe er not case insensitive :) 16:20
psch m: say "abCd" ~~ m:i/a b [:!i c] d/ 16:21
camelia rakudo-moar 949b80: OUTPUT«False␤»
psch m: say "abCd" ~~ m:i/a b [ c] d/
camelia rakudo-moar 949b80: OUTPUT«「abCd」␤»
ugexe ah thanks psch
nine_ pmurias: you mean v6-perlito? Only the distribution is called v6. The package is v6-perlito. It's where I got the idea for v6-inline 16:23
pmurias ok
nine_ I guess perl's parser in older versions gets confused, leading to messages like "Bareword found where operator expected at (eval 5) line 6, near "v6::call"" 16:24
dalek p/js: 6aa5d8d | moritz++ | tools/lib/NQP/Configure.pm:
Build a probe for node/nodejs. Not used yet
16:34
moritz pmurias: where is node actually called? I'm too dumb to find it in Makefile-JS.in 16:39
dalek p/js: 4ffd64f | moritz++ | Configure.pl:
probe for node(js) in Configure.pl
16:40
pmurias moritz: src/vm/js/HLL/Backend.nqp 16:47
moritz pmurias: how do I get configure values in there? 16:48
dalek line-Perl6: a477ec6 | (Stefan Seifert)++ | / (3 files):
Lower perl requirement to 5.18
pmurias moritz: not really sure 16:50
literal from S02: "In addition, the double angles allow for comments beginning with #. These comments work exactly like ordinary comments in Perl code." <- Rakudo thinks otherwise and I can't find any spectests for this. Is it still correct? 16:50
nine_ Can I detect in my BUILd method whether an optional named parameter has been passed in even if it is undefined? 16:52
pmurias moritz: we could write a .nqp file at build time with the probed value
moritz: or maybe we could to the probing at runtime? 16:53
dalek line-Perl5: fbff133 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Allow for using NULL as external $p5 for perls without multiplicity

Inline::Perl6 on a perl without multiplicity passes a NULL pointer as my_perl. Detect this correctly and avoid creating a new perl interpreter.
17:03
line-Perl6: 8305f7b | (Stefan Seifert)++ | Perl6.xs:
Support perl without multiplicity
nine_ Done :) 17:04
pmurias: now supporting perl 5.18 and up with and without multiplicity in Inline::Perl6
pmurias nine_: great 17:08
FROGGS nine_++ 17:26
naptastic Is there a list of modules that will be included in the Perl 6 core distribution anywhere? 17:26
FROGGS naptastic: there is only one distribution of that kind atm and is called 'rakudo star' 17:27
TimToady we're adopting the linux multiple distribution model
yoleaux 09:30Z <moritz> TimToady: wouldn't it more consistent to return Str (the type object) for .base-repeating that exceeds the precision limit?
FROGGS naptastic: this is bundled there currently: github.com/rakudo/star/tree/master/modules 17:28
moritz nine_: you can add a *%args and test for %args{$paramtername}:exists
naptastic FROGGS, thanks! That's what I was looking for. 17:28
hoelzro TimToady: not that I disagree, but do you think that having a multiple distribution model could confuse people?
hoelzro I remember being confused about that when I started with Linux 17:28
TimToady sure, but it scales better for success and for evolution of the set of modules 17:29
unlike with P5 where we had to decide in one spot what should be included
hoelzro I see
TimToady we're like the Linux kernel 17:30
except when we're doing Star, which is like, oh, slackware :)
hoelzro I see how it's better for people used to the ecosystem, but I feel it could impact adoption
hoelzro good analogy =) 17:30
masak .oO( except with a less abrasive BDFL )
naptastic :D :D :D 17:31
TimToady in some ways it's a lot less of a problem, since people don't have to load their linux from 20 floppies anymore
hoelzro I think the issue is in a year or two, people may ask "which Perl 6 distribution do I use?"
mst p5's quest to have core be as close as possible to "what you need to bootstrap a cpan client"
flussence it's fine if we're not perfect, as long as all the bits are in place to allow anyone else to come along and do a better job
TimToady but we're trying to avoid the "batteries included but some of them are dead batteries"
hoelzro then again, we kind of have that issue with implementations 17:32
mst is, at least in part, intended to enable perl5 distributions
hoelzro ok, that's a good thing to avoid =)
mst all things considered "batteries included but some of them are leaking acid everywhere" is a worse fate
TimToady mst: yes, we were basically aiming for the kernel vs distribution model from nearly the beginning
mst I mean, FFS, we had *Switch.pm* in core up until 5.13.1 17:33
TimToady for the same reason that P5 now is :)
mst vomits
El_Che mst: "leave my leaking batteries alone! my old code is depending on them!" :) 17:33
naptastic I've been curious, because (mainly as a thought exercise) I've been thinking of how I would design my library
mst hoelzro: basically, having had the alternative problem, I'd much prefer to have the "which one do I use" problem
mst also, well, so long as apps/modules specify their deps in full 17:34
flussence hey, I *liked* Switch.pm (until I used it...)
mst it shouldn't matter that much
hoelzro mst: looking at P5 in hindsight (esp. with your Switch example), it does make more sense 17:35
naptastic (I'm mostly thinking about serialization formats right now... did you know that INI format can be as expressive as JSON?)
hoelzro I guess the onus is ours to make the choice of which distribution to use clearer for new users
mst it can, sort of. I prefer JSONY, which ingy and I cooked up as a less-syntax-JSON
flussence naptastic: yes, but SGML can be as expressive as YAML :)
hoelzro El_Che: even worse is depending on battery acid dripping on the floor =)
naptastic Any time someone complains about Perl--ANYTHING about Perl--I remind them that it could be worse. We could be using PHP. 17:36
TimToady is not sure how much further we can drive a metaphor borrowed from a boa constrictor
naptastic What we have here, is a Swiss Army Chainsaw. What they have there is the training wheels without the bike.
flussence they have a decent template engine but lack a language behind it 17:37
skids Is there any consistent-semantics claim staked on e.g. $myclass.Int( args-to-coercion ) or is that solidly in each class's purview to decide?
nine_ moritz: do you think github.com/niner/Inline-Perl5/commit/fbff13313e is acceptable Perl 6?
arnsholt jnthn: At the 6model level, what's the state of our story for shaped arrays?
skids Like $obj.Int(Str) won't be expected to mean "coerce to a coercion type" right? (Can't think of a use to that)
hoelzro skids: I think that a .Type method can take any args/kwargs it wants, as long as it supports a zero-arity call 17:38
El_Che hoelzro: well, it depends how you define what a battery is. Sometimes batteries do provide stuff that should be core. In my case, I am thinking on Moo. It's probably the first thing I install. 17:39
TimToady coercions should generally not have args, to my mind; they should generally be 1-to-1, or they should be named something else
in particular, if there are multiple values coming in, you have a constructor, not a coercer 17:40
or a composer, if you sill
*will
skids Well, the particular use case I had in mind was something to give one-shot use to Sum akin to P5 $d->digest($addend,...). I was thinking maybe $sum.buf8($addends,...) etc. 17:42
Allowing one-shots for various types. 17:43
pmurias what are the benefits of batteries included distro? It's a bit more convenient as you don't have to install some modules?
TimToady you don't have to pull in as many modules, yes
and each distribution will be tuned for a certain set of standard activities 17:44
so you have the linux(es) for video production, for office use, for (cough) touchscreens, etc
I wouldn't be surprised if there was a linux for model railroading :) 17:45
pmurias I hope we avoid having multiple cpans
Ven_ nine_: any reason for not using `//` instead of === Any? 17:46
TimToady it doesn't matter
Ven_ ah, I guess Nil is p5's undef?
El_Che TimToady: it sounds like you have world domination plans :)
TimToady (mutliple CPANs)
Ven_ OOh that's the base for the commit -_-. I'm so blind
moritz pmurias: "batteries included" might lead to less fragmentation
TimToady if official modules are immutably identified, it doesn't matter where they come from
moritz pmurias: just look at how many OO modules Perl 5 has that are in common use
mst that was nothing to do with batteries being included or not 17:47
TimToady Ven_: yes, Nil is (supposed to be) the most like undef, except when it's not
mst that was to do with there being lots of experimentation until one particular experiment (Moose) was good enough to spawn an ecosystem that became dominant
Ven_ That makes sense. p5 only has "one" undef type? (not Nil Mu Any)
TimToady batteries included would be like the linux kernel trying to also be a distribution
Ven_ well, I guess there's the common supertype that I can't name ATM 17:48
mst this was an improvement over us trying to build something we didn't know how to build yet
flailing randomly on CPAN for years was a distinct improvement over nothing
TimToady Nil is still too much like () in list context, but we'd like to fix that if possible
mst as a way of passing the time until we could steal carefully researched ideas from perl6 ;)
masak :)
flussence pmurias: right now we only have one "cpan" for p6, which is github. Some diversity would be a good thing there...
TimToady well, you should really steal the type system, if you want smartmatching to work right :) 17:49
TimToady I think P5 could usefully steal the various metaoperators though 17:49
pmurias flussence: yes
masak TimToady: it already stole the assignment one :P 17:50
Ven_ masak: All =()= of the world, unite! 17:52
moritz .uni +ב
ENOUNIBOT
flussence .u 1F365
yoleaux U+1F365 FISH CAKE WITH SWIRL DESIGN [So] (🍥)
masak o.O 17:53
moritz .u +ב
yoleaux U+002B PLUS SIGN [Sm] (+)
U+05D1 HEBREW LETTER BET [Lo] (ב)
TimToady .u ユ 17:54
yoleaux U+FF95 HALFWIDTH KATAKANA LETTER YU [Lo] (ユ)
naptastic Stop it. None of this is rendering correctly for me.
TimToady this is all normal UTF-8 17:55
naptastic I know. That's what makes it so sad.
Rounin Just wait until we get started on the hieroglyphs 17:55
TimToady what client/terminal are you on
Rounin I have a soft spot for the squirting penis one
masak naptastic: you should look into fixing that.
Rounin (Yes, it exists)
And the "guy fondling a microchip"
naptastic Hexchat on Gentoo. I probably don't have enough fonts installed. 17:56
Rounin Good evening rindolf!
rindolf Rounin: hi, evening.
masak easy enough to fix, then.
rindolf Rounin: what's new?
Rounin Haha
I'm Rounin! Evening's the time period ;)
TimToady does it make boxes or does it make mojibake?
if it's boxes, it's probably font
flussence naptastic: `emerge unifont` will fix that up
Rounin rindolf: Nothing I think... I'm trolling around the classified ads for new jobs, since I'm bored at work... But it's half-hearted I guess 17:57
TimToady if mojibake, it's probably a missing -utf8 sort of switch somewhere
Rounin rindolf: What's new in your life then?
rindolf Rounin: well, today our telephone (And ergo - ADSL Internet) connection was down for most of the day. 17:58
Rounin :(
masak rindolf, Rounin: glad to see you both here on #perl6. :D
naptastic flussence, thanks! As soon as Thunderbird and Firefox are finished, I'll do that. XD
masak it's Rakudo you're using, yes? 17:59
TimToady apparently hexchat doesn't do font substitution very well, so you get mojibake where you should get boxes
at least as of 2013
Rounin Thanks masak :) 17:59
mst TimToady: I want pluggable operators
TimToady: sadly my "find a horrible hacky way and implement that to embarass competent people into doing it properly" didn't work 18:00
Rounin TimToady: Hm... One would think it used standard GTK+ widgets... But is this on Windows?
Oh, no, Gentoo
Ven_ mst: can I see your implem. ?
mst (unlike for keywords ;)
mst Ven_: uh. I mean, I never worked out a way. 18:00
Ven_: Devel::Declare was the keyword one, Devel::CallParser the proper approach in perl5 core 18:01
Ven_ mst: ah, okay. what about keywords :)?
ah, thanks..
TimToady well, user-defined operators are just gonna be a pain as soon as you get anywhere near the lexer in P5 18:01
TimToady there's a reason we picked an entirely different way to do that, with strict one-pass parsing... 18:02
mst of course. but "that's going to involve crawling horrors" has never stopped me trying before 18:03
TimToady have the appropriate amount of fun :P 18:04
naptastic hueheuhue
mst I think the only way to enjoy writing something like Devel::Declare is to have an inappropriate amount of fun 18:04
once you end up with a file called stolen_chunk_of_toke.c 'appropriate' becomes pretty unreachable ;) 18:05
TimToady s/amount/kind/ :)
rindolf masak: hi, thanks.
Rounin As long as you have The One Function, eval(), you can look forward to all sorts of fun 18:06
mst TimToady: :D
masak rindolf: are you on Rakudo?
Rounin: how about you?
rindolf masak: no, I'm not using Rakudo. 18:07
masak :/
Rounin masak: I'm not on any Perl compiler right now... I program in Java, and on weekends I read "A Dance with Dragons"
masak Rounin: sounds nice :) 18:08
Rounin There are worse things, for sure
TimToady maybe you should sneakily start using rakudo/jvm at work 18:11
and reimplement all you cohort's mile-long Java programs as one-liners 18:12
*cohorts'
Rounin It has occurred to me ;)
I'm already replacing 12-line methods with 1-2-line ones with regexes in them and such
FROGGS that does not help if you get paid by loc :/
masak FROGGS: quit. 18:13
Rounin while(tokenizer.hasNext()) stringBuffer.append(so-and-so) etc.
We have some very old-school code
FROGGS masak: I don't get paid that way luckily
not sure if that is a thing in Germany anyway
Rounin I get paid for just sitting there, personally... But man, is that a boring thing to be getting paid for
masak FROGGS: I think I would just unroll loops all day.
FROGGS hehe 18:14
Rounin Come to think of it, perhaps that was how we got our code
It does look like every loop has been unrolled and every function inlined
And bugs left in 1 out of 200 instances
FROGGS :o(
Rounin It's fun refactoring it though :> 18:15
FROGGS I am an almost-one-man-army that also has to do the support... so, I fix my bugs quickly
Rounin Ah, the good old "development/operations/customer support" position 18:16
FROGGS right 18:17
raydiak moritz: should I be seeing syntax highlighting in the docs?
FROGGS but hey, it also can be a good thing... I do the design also, which is quite pleasing
FROGGS I'd like to have code reviews are a discussion from time to time though 18:17
or a*
Rounin We have caught some troublesome issues during code reviews... I've come to like them a lot 18:19
[ptc] raydiak: I don't think so yet; the server needs the right version of pygments installed for syntax highlighting to appear on docs.perl6.org 18:20
raydiak [ptc]: I see...thanks 18:23
[ptc] raydiak: of course, if you have pygments version 2.0 installed on your machine, after you run htmlify, you should see syntax highlighted docs 18:23
raydiak [ptc]: hadn't tried myself yet, just saw the merge last night, so wanted to make sure someone with the power to fix it was alraedy aware that it's not working yet 18:27
moritz raydiak, [ptc] the problem isn't pygments, it's Pod::To::HTML 18:33
... updated Pod::To::HTML
moritz the next push should[tm] trigger a build with syntax hilighting 18:34
raydiak moritz: thanks! 18:36
dalek c: 6f6938b | moritz++ | htmlify.p6:
Note requirements for pygmentize in comment
18:38
moritz my dummy commit to trigger a rebuild :-) 18:38
raydiak heh I figured it was just a clever way to get someone to contrib something :) 18:40
nine_ Ven: I have used // before, but I need to differ between Any (argument not passed) and Perl5Interpreter (NULL pointer passed). 18:47
moritz ok, build failed 18:48
doc.perl6.org/build-log/build-2015-...0+0000.log
guess why it failed
moritz I ran it as user 'moritz' before 18:48
so there was a /tmp/pod_to_pyg.pod there already 18:49
and not writable for use doc.perl6.org
psch m: class A { method BUILD(Mu :$named) { say $named.perl } }; A.new(); A.new(:named) # nine_ 18:50
camelia rakudo-moar 949b80: OUTPUT«Mu␤Bool::True␤»
psch might help, not sure how exactly your case looks
psch i'd guess a null pointer would come as Nil, which would give you Mu 18:50
oh, nevermind, that doesn't help. not passed is still the type 18:51
moritz nine_: use *%args, and check for %args<argument>:exists
dalek c: 0edfb1a | moritz++ | htmlify.p6:
Try to make temp file safer
18:53
b2gills m: sub test ( Range:D $r ( :$infinate where 0, *% ) ){ say $r }; test ^5; 18:58
camelia rakudo-moar 949b80: OUTPUT«use of uninitialized value of type Any in numeric context in sub test at /tmp/0c2iKN1gRZ:1␤␤0..^5␤»
dalek line-Perl5: c93c77c | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Make init with external $p5 less fragile.

Thanks to moritz++ for the suggestion.
19:04
TimToady m: say « 42 # a comment␤ 43 »
camelia rakudo-moar 949b80: OUTPUT«42#acomment43␤»
TimToady literal: looks like NYI
lizmat .botsnack 19:05
yoleaux :D
13:15Z <nine_> lizmat: path.IO.d // mkdir(path,|c) is prone to very hard to diagnose race conditions
15:05Z <ab5tract> lizmat: i'm curious what your opinion is re: a quanthash-y symmetric difference op: github.com/rakudo/rakudo/pull/362
15:06Z <ab5tract> lizmat: but even more curious is that infix:<(^+)> seems to break the parser in some really weird way. the operator is unusable when invoked from a file, or when used like (...).Bag (^+) (...).Bag from the repl
nine_ moritz: why don't you use File::Temp?
lizmat .tell nine_ do you have a suggestion on how to fix that race condition? 19:05
yoleaux lizmat: I'll pass your message to nine_.
brrt lizmat - happen to know a good spec for copy? 19:06
lizmat brrt: not sure what you mean
nine_ lizmat: the only fix I see is call mkdir() and check for EEXISTS
yoleaux 19:05Z <lizmat> nine_: do you have a suggestion on how to fix that race condition?
brrt is it ok to open-and-create the second file if opening-and-creating the first file doesn't work
for example
lizmat nine_: that suffers from the same race condition
nine_ lizmat: how so? 19:07
lizmat nine_: just as likely as something can remove the dir just after the IO.d
it could well remove it after we just created it
with mkdir() 19:08
IO.d // mkdir() has the same race as mkdir // IO.d 19:09
nine_ lizmat: true. Though mkdir with EEXISTS check should at least be faster
lizmat so it is a race condition that is even harder to fix ? :-)
what I'm getting at, is that in a multi-process world, there are no guarantees unless we have a "stop the world" lock 19:10
and we don't have that as soon as we have to deal with the outside world
nine_ I'm trying to construct a use case that depends on correct information about "did we just create that directory even if it may have been deleted already?". Kinda hard 19:11
lizmat: oh, it may actually fail in the other direction: stackoverflow.com/questions/1586648...-in-python 19:12
brrt i guess what i'm saying is that S16 doesn't really specify the failure conditions of copy
lizmat brrt: well, I guess we could document that 19:16
on Moar, it is really determined by MVM_file_copy in src/io/fileops.c
brrt right, and i'm working on that as we speak
because of the 2gb issue :-) 19:17
lizmat and it seems to open the destination file only when the source file can be opened for reading
brrt right, and when it can be stat
lizmat brrt: wrt the 2GB issue: I have *not* been able to reproduce it 19:17
brrt i have
it's libuv dependent
lizmat libuv version, or underlying OS ?
brrt but that probably differs between linux / os x
well, yeah :-)
lizmat I would think it is the underlying OS's implementation of sendfile()
have you checked that on your OS ? 19:18
brrt nods
i have not, actually
could do that
lizmat indeed.. :-)
brrt but....
libuv doesn't really consider sendfile one of it's core assets
so to speak
lizmat so uv_fs_sendfile doesn't just refer to the OS's sendfile ? 19:19
moritz nine_: I'm kinda against additional dependencies
doc.perl6.org is now syntax hilighted 19:20
[ptc]++
brrt i'm pretty sure that it does, unless you're using windows 19:21
[ptc] moritz: hammer! 19:23
lizmat .tell ab5tract re github.com/rakudo/rakudo/pull/362 , I think colomon / TimToady should shine their light on that 19:30
yoleaux lizmat: I'll pass your message to ab5tract.
lizmat .tell ab5tract I have merely implemented what colomon implemented in niecza 19:31
yoleaux lizmat: I'll pass your message to ab5tract.
masak ab5tract: other xor-like operators have a slightly different behavior when chained. 19:33
(such that order doesn't matter)
Kristien Can you customise MRO? 19:35
lizmat m: say Int.^mro 19:35
camelia rakudo-moar 949b80: OUTPUT«(Int) (Cool) (Any) (Mu)␤»
lizmat it's just a method in the MOP 19:36
afaik
japhb Kristien: with a little MOP work, just about any change in the object system is possible.
Sometimes even easy, actually ....
Kristien cool 19:37
dalek p/longer: 71e9494 | lizmat++ | docs/ops.markdown:
Document nqp::lstat
19:43
p/longer: 2776313 | jnthn++ | tools/build/MOAR_REVISION:
Bump to latest MoarVM.
p/longer: f302b25 | FROGGS++ | / (2 files):
Merge branch 'master' of github.com:perl6/nqp into longer
p/longer: 8ae7b29 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
fix C_TYPE_* constants for nums which also start at -1
Heuristic branch merge: pushed 17 commits to rakudo/longer by FROGGS 19:44
volaj/longer: 6dc894e | FROGGS++ | lib/NativeCall.pm6:
use new trait "is ctype"
brrt what's more, sendfile is far from the only way to copy data between buffers 19:47
on linux 19:48
lizmat true, but it is the only way that doesn't touch userland, no? 19:49
brrt we also have tee and splice 19:50
brrt splice is the really generic one 19:50
brrt but yeah, sendfile is the correct one 19:51
brrt afk for now
dalek ast: 93b3e92 | TimToady++ | S02-literals/quoting.t:
add << #comment >> tests suggested by literal++
20:02
grondilu notices that the 'longer' branches is said to solve the 32bits issues with zavolaj 20:04
TimToady speaking of integer sizes, should NQP provide any support for bit rotations of various integers?
FROGGS grondilu: it solves it, aye 20:08
grondilu TimToady: no quite related, but you once suggested something like 'use nativecall <somelibrary>;'. That'd be insanely awesome. Were you joking or is it doable in a reasonable time?
FROGGS I can't imagine how it is supposed to work... unless it also introduces a new keyword as a replacement for 'sub' 20:09
grondilu I mean, Perl 6 looking in the C library path, possibly looking for C library headers, just as a C compiler would do.
FROGGS ahh, no, we do not care about headers at this point 20:10
grondilu (or rather a C linker)
hum, I switched to the 'longer' branch in rakudo, MoarVM and nqp, and compilation of rakudo failed :/ 20:12
Makefile:397: recipe for target 'blib/Perl6/Metamodel.moarvm' failed
FROGGS grondilu: you pulled right now?
grondilu like a minute or two ago
FROGGS is there an error message? 20:13
grondilu yeah, see the Makefile: line above
but I've just pulled again and it seems I was not up-to-date for nqp
FROGGS yes, well, usually there is something else too
ahh
grondilu tries compiling again 20:14
FROGGS that explains it
because it probably did not find the new constants
lizmat m: say << /home/$*USER >>.perl # this feels wrong, expected ("/home/liz") 20:17
camelia rakudo-moar 949b80: OUTPUT«("/home/", "camelia")␤»
lizmat *or camelia :-)
dalek p/longer: d4ed5bd | FROGGS++ | src/vm/ (2 files):
add C type constants for parrot/jvm
lizmat but is this a rakudobug?
m: say << "/home/$*USER" >>.perl # I guess we need the double quotes ?? 20:19
camelia rakudo-moar 949b80: OUTPUT«"/home/camelia"␤»
grondilu failed to compile again, suspects he did something wrong when pulling, so *
FROGGS grondilu: how do you compile? do you run configure? If so, then you have to pass: --gen-moar=longer --gen-nqp=longer 20:20
grondilu oh
FROGGS grondilu: but I expect that I merge the branches by monday or so
grondilu I did use the same configure options than with nom
do you? I guess I can wait, then. 20:21
FROGGS yeah 20:21
grondilu switches back to nom
dalek kudo/newio: 159c38b | lizmat++ | src/core/Distro.pm:
Refactor tmpdir using private first-rwx-dir
20:23
kudo/newio: c92e49e | lizmat++ | src/core/Distro.pm:
Implement Distro.homedir, preparing for $*HOME
lizmat off to see a Jupiter Ascending & 20:24
FROGGS .oO( Mars is bright tonight. )
Kristien yes 21:09
mars has been bright for a week or two now 21:10
and venus too
it's very nice
masak generated a 12 MB SVG file tonight 22:18
for science! 22:19
it says something about Rakudo nowadays that it's (a) up to the task, and (b) not unreasonably slow. 22:20
Inkscape was brought to its knees, though :P 22:21
timotimo no surprises there, IMO
timotimo i really wonder how a graph-like diff of before/after for spesh graphs could look 22:23
flussence I tried getting graphviz to make a SVG diagram of my installed (OS) packages once. It couldn't even *create* the file without running out of memory, let alone trying to view it... 22:28
timotimo yeah, i know that feeling 22:34
raydiak timotimo: would it work to plot all the paths for both before and after in the same flowchart and highlight the lines and boxes which aren't common to both? (red for before and green for after, or some such) 22:37
avuserow m: sub f($x=60 is rw) {$x++; say $x}; f 22:38
camelia rakudo-moar 949b80: OUTPUT«===SORRY!=== Error while compiling /tmp/KK124_JoHD␤Missing block␤at /tmp/KK124_JoHD:1␤------> sub f($x=60 ⏏is rw) {$x++; say $x}; f␤»
avuserow std: sub f($x=60 is rw) {$x++; say $x}; f
camelia std f9b7f55: OUTPUT«===SORRY!===␤Default expression must come last at /tmp/W6d6MA7gbZ line 1:␤------> sub f($x=60 ⏏is rw) {$x++; say $x}; f␤Unable to parse signature at /tmp/W6d6MA7gbZ line 1:␤------> sub f⏏($x=60 is rw…»
avuserow m: sub f($x is rw = 60) {$x++; say $x}; f 22:39
camelia rakudo-moar 949b80: OUTPUT«===SORRY!=== Error while compiling /tmp/L9ZwKOd6I3␤Cannot use 'is rw' on an optional parameter␤at /tmp/L9ZwKOd6I3:1␤------> ␤»
avuserow std: sub f($x is rw = 60) {$x++; say $x}; f 22:40
camelia std f9b7f55: OUTPUT«ok 00:00 140m␤»
avuserow rakudobug?
masak no, I don't think so. 22:41
or, hm.
I don't immediately see what the problem is with using 'is rw' on an optional parameter... 22:42
sometimes it doesn't bind with the outside, but that's not a show-stopper.
avuserow: please submit it and we can have a discussion of why it should or should not be possible ;)
avuserow okay. so the first one is a LTA error IMO, should I submit that separately? 22:43
dalek p/js: dd4e123 | (Pawel Murias)++ | TODO:
add a callercode portability to IE TODO item
22:45
p/js: d2e9220 | (Pawel Murias)++ | / (3 files):
Make nqp::isinvokable respect nqp::setinvokespec.
avuserow oh, masak. Found this in S06: Since this option forces an argument to be required, it cannot coexist with the ? mark to make an argument optional. (It may, however, be used with = indicating a default, but only if the default expression represents something that is nameable at compile time and that can bind as an lvalue, such as CALLER::<$/> or OUTER::<$_>.) 22:51
synopsebot Link: design.perl6.org/S06.html#Since_thi...e_required
avuserow I'll be back later to file this bug once I get an idea of what that means. 22:55
avuserow away &
masak I don't understand why S06 requires that. 22:56
it seems to me $x could *either* bind to a passed argument (in which case there's no problem) *or* just be its own detached locally defined variable assigned with the provided default (in which case we're also fine). 22:57
I suspect I'm missing something here :)
pmurias masak: provided default, without a = no default is provided 22:59
masak: by a detached locally defined variable you suggest that we should create a temporary variable that will be discarded after the sub finishes? 23:01
masak right. 23:02
pmurias I think that's more likely to cause a weird bug than be useful 23:06
masak I suspect that's the reason, yes.
but S06 doesn't say that, it just pretends it's impossible :)
pmurias it just bans that 23:07
masak right.
raydiak my vote is with masak++...I've also tried to do that quite intentionally in the past and ended up working around the spurrious-feeling limitation with something a little more awkward and/or slow 23:16
masak I'm not sure where I stand, actually. 23:17
I can't recall wanting 'is rw = $some-default'.
and I can't gauge properly if it would be helpful or just lead to weird bugs.
in some sense, it's "well, you asked for it" -- in another sense, it's "you probably shouldn't want that in the first place". 23:18
masak and now... 23:19
*drum roll*
lol! I blogged! strangelyconsistent.org/blog/youre-...-all-alike
Kristien I'm so puzzled.
masak (that took way too long -- sorry. everything takes a long time right now.)
ruoso on moarvm, does it make a difference for the optimizer and the jit if "for 1..10 -> int $x" instead of "for 1..10 -> $x"? 23:23
timotimo masak: there's a loose ")" in there 23:31
masak thanks. 23:32
ruoso on moarvm, does it make a difference for the optimizer and the jit if "for 1..10 -> int $x" instead of "for 1..10 -> $x"?
ah... sorry for the repost 23:33
wrong window for up-arrow-enter
masak timotimo: fixed, should be up shortly.
timotimo :)
masak (fun fact: different Markdown parsers handle parentheses inside of the link syntax differently!) 23:34
dalek kudo/nom: 874caf6 | TimToady++ | src/core/ (2 files):
implementation of polymod method to play with
23:35
TimToady > say 1000000.polymod(60,60,24) 23:36
40 46 13 11
11 days, 13 hours, 46 minutes, 40 seconds
ruoso Oh, now someone can implement somethign to make sense of imperial units :) 23:37
TimToady that's...not possible :P
timotimo masak: is that png file already optipng'd? 23:38
masak timotimo: I... don't know what that means. 23:39
timotimo did you run the huge png file through optipng or pngcrush to make it more efficient?
masak ...no.
timotimo may be worth a try :)
masak I just exported to png from Inkscape.
masak tries 23:40
(apt-get++ for just giving me `optipng` when I ask for it. this is package management in the future, folks.) 23:41
pippo o/ #perl6 23:42
Mouq masak++ # blug
timotimo optipng -o7 is the maximum, IIRC 23:43
it may take quite a while to run, though
given the file is so big
masak timotimo: on default setting, the big file deflated by 13% 23:44
Mouq I imagine with the near-tiling of the file, even a little optimization is going to really trim the file
pippo One question. When we declare "my Int $a" do we declare that on RHS of an assignement we shall have Int or we declare that the RHS will be (if possible) casted to Int?
masak pippo: the former.
Mouq pippo: The syntax for the latter is "my Int() $a" but still NYI, I believe 23:45
or "my Int(Any) $a" if you want to be clearer (take Any, cast to Int)
pippo masak: Mouq: thank you very much. Lokking for Int() to be implemented :-))
timotimo masak: next thing of interest may be: how does lossless webp fare. but this may not be your area of interest at all :)
so maybe i'll try that out myself 23:46
.o( and ... actually, i could encode this in daala and see what happens )
masak :)
Mouq m: sub getInt (Int() $a) { say $a.WHAT }; getInt "1234" # Works in parameters, just not variables 23:47
camelia rakudo-moar 949b80: OUTPUT«(Int)␤»
pippo Mouq: Thanks!
dalek kudo/nom: 0e61279 | TimToady++ | src/core/ (2 files):
polymod yields 1 more result than args unless inf
23:49
dalek kudo/newio: 59ef5f0 | lizmat++ | src/core/Distro.pm:
Make sure we check the default dir as well
23:53
kudo/newio: 6c86e26 | lizmat++ | src/core/Process.pm:
Lazily initialize $*HOME
kudo/newio: 301cf15 | lizmat++ | src/core/io_operators.pm:
Make tmpdir/homedir functional
lizmat and on that note, good night, #perl6! 23:54
masak 'night, lizmat
Kristien After two hours I finally got my algorithm to work. 23:55
Kristien For calculating the optimal layout of a struct by reordering fields! 23:58
masak sounds like it could be exponential in the number of fields. 23:59
Kristien well it has two nested loops