»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
Commy hi all 01:26
dalek nda: ec1a18a | (Rob Hoelz)++ | lib/Panda/Fetcher.pm:
Add basic schema support

Works with git://, http+git://, https+git://, and file:// URIs
03:23
nda: 4b11553 | tadzik++ | lib/Panda/Fetcher.pm:
Merge pull request #94 from hoelzro/master

Add basic schema support
ventica o/ 03:56
avuserow \o 04:46
dalek p-js: 22cb065 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Handle some type coercions, nqp::add_n, nqp::say.

nqp::say(1+2) works.
09:24
FROGGS nice 09:25
dalek p-js: 44e7846 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Better unimplemented placeholders.
09:36
p-js: 7404b04 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Handle QAST::SVal.
pmurias is #| and #= implemented? 09:38
they are supposed to attach docs to stuff like 'has $.foo; # This is an example foo attribute' 09:40
dalek p-js: 1793ed7 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Ignore QAST::VM.
09:50
colomon Hmm, smoker run blew up in rakudobrew last night... 10:05
pmurias currently nqp doesn't display/calculate the exact column for errors/backtraces?
FROGGS pmurias: hoelzro is working on #|/#= but does that in a rakudo branch... nqp does not know about these things 10:07
colomon make: *** No rule to make target `m-clean', needed by `clean'. Stop.
Failed running make realclean at /home/smoker/.rakudobrew/bin/rakudobrew line 23.
timotimo colomon: sounds like the configure step itself blew up? 10:10
colomon Dunno. The backtrace isn't helpful. Could easily have been line 113 (run 'make realclean') 10:12
pmurias FROGGS: I guess it can be backported to nqp later on, #|, #= seem awesome for generating methods
and a unified doc page for the modules (like metacpan has) seems very important for our fledgling module ecosystem not to end up batshit insane ;) 10:16
with a cute and strange website for every module, like ruby and javascript stuff has 10:17
FROGGS pmurias: it is unlikely that this gets backported to nqp 10:18
pmurias would it be hard? 10:19
FROGGS I think so 10:20
timotimo oh 10:20
FROGGS also, nqp is meant to be minimalistic
timotimo getting the "no target realclean" happens to me all the time and used to be nonfatal
that's in perl6-bench, though
vendethiel .u Ξ 10:26
yoleaux U+039E GREEK CAPITAL LETTER XI [Lu] (Ξ)
dalek kudo/qast_restructure: 0cae987 | jnthn++ | src/Perl6/Actions.nqp:
Toss clone_qast sub; there's a method for that.
11:55
moritz \o 12:01
moritz [Coke]: what's the use case for making perl6.org more dynamic? 12:03
[Coke]: (re mojo app discussion yesterday)
[Coke]: my main concern is computing resources; feather2 is pretty small host (0.5GB RAM, one CPU) 12:04
it can handle a static page just fine, even when we get a few more visitors
if you somehow want to generate static pages from a mojo app, fine by me :-) 12:05
moritz but it should only be dynamically generated if we have a really good use case 12:05
moritz (or find some other way to address the question of resource usage) 12:07
grondilu std: say enum Squ ("a" .. "h" X~ 1 .. 8); say +e4 12:14
camelia std 0f2049c: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'e4' used at line 1␤Check failed␤FAILED 00:01 126m␤»
grondilu has hard time understanding how enums work :( 12:15
vendethiel m: say enum Squ ("a" .. "h" X~ 1 .. 8); say +e4 12:34
camelia rakudo-moar 356d57: OUTPUT«===SORRY!=== Error while compiling /tmp/1MStgu2NCC␤Undeclared routine:␤ e4 used at line 1␤␤»
vendethiel m: enum Squ ("a" .. "h" X~ 1 .. 8); say Squ.perl;
camelia rakudo-moar 356d57: OUTPUT«Squ␤»
vendethiel m: my @a = ("a" .. "h" X~ 1 .. 8); enum Squ <<@a>>; say a4.perl; # grondilu :P 12:37
camelia rakudo-moar 356d57: OUTPUT«===SORRY!=== Error while compiling /tmp/uI9bPEQPgN␤Undeclared routine:␤ a4 used at line 1␤␤»
vendethiel m: my @a = ("a" .. "h" X~ 1 .. 8); enum Squ <<@a>>; say a1.perl; # for real tho :P
camelia rakudo-moar 356d57: OUTPUT«===SORRY!=== Error while compiling /tmp/DAD8nCfvyX␤Undeclared routine:␤ a1 used at line 1␤␤»
vendethiel well, that works for me :p
FROGGS m: my @a = ("a" .. "h" X~ 1 .. 8); enum Squ <<@a>>; say ::('a1').perl 12:42
camelia rakudo-moar 356d57: OUTPUT«Cannot modify an immutable Squ␤ in block at /tmp/bseAjs8iMu:1␤␤»
grondilu in Carlsen's game, isn't 15...Nxb4 possible? 13:01
since if 16. axb4 Qxa1
or even 15...Bxb4 13:02
dalek kudo/qast_restructure: e431829 | jnthn++ | src/Perl6/Actions.nqp:
Fix is_clearly_returnless for empty block case.

Not sure how this ever really worked out in the past; perhaps a QAST tree mis-construction that's now impossible made it appear to work.
grondilu oops, wrong channel 13:03
sorry
flussence yay, all my modules are green again on the smoketest page :D 13:12
.oO( guess it's time to make a few new red ones... )
13:15
dalek p: 164856c | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/GlobalContext.java:
Ensure print/say ops on JVM write UTF-8.

Fixes issues with CORE.setting generation some folks have been seeing.
13:59
p: 26f36ac | jnthn++ | / (5 files):
Add QAST::NodeList; replace direct QAST::Node use.

This is a prerequisite for moving children out of the QAST::Node base class, which will enable us to save an array allocation and pointer on many node types that don't need children.
14:01
p: bd41f62 | jnthn++ | / (22 files):
Refactor QAST node structure.

Now only nodes capable of holding children get a slot for them and an array allocated, reducing memory. Also take the time to optimize the new methods so we get away with a lot of the late-bound method calls.
p: 2b21569 | jnthn++ | / (25 files):
Merge branch 'qast_restructure'
kudo/qast_restructure: 6f42eca | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to for restructured QAST nodes.
14:02
dalek kudo/nom: 6d23540 | jnthn++ | src/Perl6/Actions.nqp:
Changes to match NQP qast_refactor branch.
14:07
kudo/nom: 54cde6b | jnthn++ | src/Perl6/Actions.nqp:
Merge branch 'qast_refactor' into nom
nwc10 MoarVM, debugging build, ASAN: 14:37
Stage parse : 183.798
Parrot, optimised:
Stage parse : 176.695
timotimo that is crazy. 14:38
nwc10 optimize is faster on MoarVM, mast is 60% of the time of post, mbc less than 10% of the time of pir
jnthn mast is still too slow 14:39
nwc10 I'm not going to argue with you if you say that 14:40
nwc10 t/spec/S06-multi/type-based.rakudo.moar fails the 53rd and final test 14:43
jnthn wtf
That's the one I spent today fixing...
nwc10 did I do something stupid?
works on parrot 14:44
nwc10 Cannot call 'rt107638'; none of these signatures match: 14:44
:(int $a)
:(Str $a where { ... })
[etc] 14:45
jnthn wtf, where the hell did that patch go
argh 14:46
I merged the wrong branch...
timotimo d'oh :)
but qast_refactor is also correct, right?
jnthn uh 14:47
It's a subset of the things, I think
pippo o/ #perl6 14:56
dalek p-js: 3e803c6 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Handle nqp::print.
14:58
p-js: 471cdcb | (Pawel Murias)++ | / (5 files):
Basic support for generating source maps, added a --source-map option which generates a json structure that is then preprocessed by src/vm/js/bin/gen_sourcemap.js.
pmurias goo.gl/xze8e4 # source maps example 15:00
vendethiel pmurias++ #source maps baked in since day 1 ;-) 15:00
pmurias it's day 2 of the rewrite 15:01
vendethiel and not day one of the project. I just meant "while in inception phase"
dalek rakudo/nom: 1f4cae6 | jnthn++ | src/Perl6/Actions.nqp: 15:06
rakudo/nom: A few changes needed by qast_restructure in NQP.
rakudo/nom:
rakudo/nom: Only one known regressions remains, which is related to compile-time
rakudo/nom: inlining of multis.
jnthn That should do the merge properly. :) 15:07
TimToady dalek seems to have got indigestion there... 15:08
nwc10 it's written in Perl 5? 15:09
vendethiel yes 15:09
TimToady n: say enum Squ ("a" .. "h" X~ 1 .. 8); say +e4 15:13
camelia niecza v24-109-g48a8de3: OUTPUT«(Squ)␤35␤»
TimToady someone should update rakudo to do that right 15:14
sort of a mid-hanging fruit
jnthn In theory it's not too hard. In practice, enums show up in CORE.setting...
FROGGS jnthn: when I adopt your qast-*ctor changes, is that the only thing I have to look at? github.com/rakudo/rakudo/commit/a3...99678d6a03 15:34
jnthn FROGGS: yeah 15:35
FROGGS k
jnthn It should not be too drastic
This is the end of the QAST changes also; I think we've streamlined them about as well as we can in ways that'll be outside-visible. 15:36
lichtkind kudos to all this make and ast thingy did the whole parsing in one day, but i can imagine that some libs for ast ops would be needed 15:43
timotimo lichtkind: what do you mean? can you give examples? 15:44
pmurias jnthn: $*WANT in the various QAST::Compilers is just convenience to avoid passing :$want around? 15:45
jnthn pmurias: Yeah
pmurias: :want is only passed to top-level things
lichtkind timotimo: something like metaops on ast subnodes 15:46
timotimo um ... the asts of your match objects can be anything. lists, hashes, code objects, ... 15:48
you can already use totally regular metaops on them if you just "make" the right kind of object in your action methods
lichtkind timotimo: theoretically yes but practically its first hashes of the match struckture and hm have to think more about 15:50
timotimo i don't understand what you mean by that 15:54
pmurias jnthn: src/Perl6/Actions.nqp:448 has what appears to be a duplicated CTXSAVE (with comment indicated *both* that it is inherited from HLL::Actions and that it should be moved there) 15:59
lichtkind the subnode are keys of the local $/ mut cant metaop on the since i need the subnode .ast of each of them
jnthn pmurias: haha :)
pmurias: Probably leftover historical accident. 16:00
lichtkind i mean values of the $/ hash not keys
dalek p-js: 8b5718e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Detect result of CTXSAVE.
16:11
p-js: 51b027a | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Fix indentation.
16:12
pmurias jnthn: do we have a TODO for such things as removal of that?
jnthn No; feel free to put it in RT though 16:14
timotimo do i file a rakudobug or a zavolaj issue for the problem where multiple closures of the same code object will not be distinguished when registered as callbacks and called from C land? 16:17
FROGGS nativecall I'd say
timotimo a test for that would obviously have to go into the nativecall repo
jnthn timotimo: Didn't we fix that in Moar already? 16:20
timotimo in moar, yes 16:20
i haven't tested if it appears in jvm or parrot
do you think these don't have that problem?
pmurias jnthn: I took the liberty of quoting our irc discussion in the ticket
jnthn timotimo: I'm not sure about JVM 16:21
timotimo: Probably in parrot the issue exists
FROGGS v5 has now the qast-restructure too 16:25
currently I try to unbust quantifiers in regexes 16:26
pmurias jnthn: HLL::Compiler.lineof only returns a line but the javascript source maps can also contain a column 16:27
timotimo jnthn: somehow, this thought just popped into my head: 16:28
at some point, someone pointed out how cool it was that we can just put a "proto sub" into the compiler and pass it into the compiled program to have it become part of it 16:29
wouldn't that make the SC that's part of the compiler a dependency of the to-be-compiled program?
i suppose grepping the moarvm bytecode dump of a file for wval calls would give me a map of which SCIDs from which SCs actually end up being referenced 16:30
timotimo i wonder what i'd find 16:30
jnthn timotimo: Yes, but that's not the only situation where such a dependency comes about. 16:31
timotimo OK, so we likely have a whole bunch of dependencies anyway
i suppose that's fair
jnthn Derived grammars are another example 16:32
timotimo ah 16:33
good thing we derive from HLL::Grammar and not NQP::Grammar :)
FROGGS yeah
jnthn Well, I mean when people add cusotm operators 16:42
timotimo ah 16:56
well, a dependency on the core setting is hardly preventable
pmurias jnthn: should I add a HLL::Compiler.columnof? 17:12
dalek kudo-star-daily: 9e969df | coke++ | log/ (13 files):
today (automated commit)
17:19
rl6-roast-data: adf7668 | coke++ | / (3 files):
today (automated commit)
[Coke] moritz: the main concern is that it takes a very long time to generate the static site, making development painful. 17:20
It's too slow for me to work on as is. 17:21
jnthn pmurias: If it'd be useful to you, but perhaps you want to add a line_and_column_of that returns an array [line, column] so make it cheaper... 17:22
mr-foobar air.mozilla.org/language-composition/ perl6 is inevitable :) 17:28
grondilu mr-foobar: is he mentioning Perl 6? 17:30
mr-foobar it's about language composition. watching it :/ the idea of unification is there however 17:31
rindolf Hello Perl6ers. 17:37
TimToady: meow.
pmurias jnthn: line_and_column_of makes much more sense 17:39
grondilu the part about SDE is interesting. Never heard about something like that. 17:39
mr-foobar grondilu: bah RPython + Inline:: 17:51
mr-foobar no static types. I would call it a toy 17:52
grondilu by the way apart from v5 are there currently serious projects to create sublanguages in rakudo? 17:53
I mean, if there was a 'use python' that would have a big wow effect. 17:54
(though I suppose that could be seen as treason from the rest of the perl community) 17:55
hoelzro ahoy #perl6 17:56
pmurias hi 17:57
hoelzro o/ pmurias 18:00
pmurias grondilu: github.com/arnsholt/snake/commits/master
* github.com/arnsholt/snake/
grondilu: but it's not currently developed and it didn't progress much
FROGGS that's nqp though, no? 18:20
I hope that these attempts get ported to Perl 6 when I provide a Slang helper module... 18:21
pmurias FROGGS: yes, it's a very early attempt 18:27
pmurias FROGGS: snake isn't developed at the moment, if someone wants to work on that I'm willing to help but I don't want to work on it by myself 19:01
FROGGS well, I am just going to provide some helper that will make it easier to develop such a slang 19:04
since I am not really a Python fan I will probably not help much on that fron
t
pmurias I haven't used Python myself for a long time 19:07
FROGGS I can help setting up the basics, the the hard work - the details - are nothing for me
grondilu feels bad to have brought that up, since v5 is more important to work on first 19:09
FROGGS grondilu: you don't have to feel bad, one reason to do v5 is to explore how slangs can work 19:10
moritz [Coke]: even if you call mowyw --make ? 19:14
(then it only regenerates files that changed, though it doesn't track changes to include files)
dalek p-js: 9f5f803 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Handle not yet implemented things with a NYI method.
19:18
p-js: 7de6168 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Move comment.
pmurias jnthn: compile_var on both moar and jvm searches all the scopes and sometimes and when it doesn't find the var in any of them it takes the type from returns 19:50
jnthn: when does such a situation happen?
pmurias jnthn: it has a comment "If we didn't find it anywhere, it musta been explicitly marked as lexical. Take the type from .returns and rewrite to a more dynamic lookup." but I don't understand what that means 19:51
jnthn pmurias: "more dynamic lookup" in this case just means "by name" 19:59
pmurias jnthn: but why isn't the lexical declared anywhere? 20:07
jnthn pmurias: Normally it is a post-declaration 20:08
pmurias can we post declare lexicals? 20:10
err, thing other the subs 20:11
* things other then subs
jnthn subs are the typical use case 20:13
In Perl 6 at least
moritz m: sub f() { EVAL 'say $x' }; $x = 42; f() 20:23
camelia rakudo-moar a33da5: OUTPUT«===SORRY!=== Error while compiling /tmp/_w8Ry3RVMJ␤Variable '$x' is not declared␤at /tmp/_w8Ry3RVMJ:1␤------> sub f() { EVAL 'say $x' }; $x⏏ = 42; f()␤ expecting any of:␤ postfix␤»
moritz m: sub f() { EVAL 'say $x' }; my $x = 42; f()
camelia rakudo-moar a33da5: OUTPUT«42␤»
moritz could be considered "post-declared"
jnthn Ah, yes 20:25
masak only if you consider the string 'say $x' to be code :) 20:46
dalek ast: e38ff49 | (David Warring [email@hidden.address] | integration/advent201 (3 files):
jvm and parrot fudges for RT #122497
20:48
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122497
lichtkind goodnight 21:02
dalek kudo/nom: e167669 | jnthn++ | src/Perl6/Actions.nqp:
In UNIT, no need for wasteful clone operations.

There's only ever going to be one anyway, since it's in UNIT. Avoids a little work at startup and saves us some allocations, memory, etc.
22:02
timotimo calling lines() on a file with a gigantic amount of lines ... that will keep all the lines we've gone through so far in memory, right? 22:16
colomon yes 22:17
masak why?
colomon because that's how iterators work at the moment.
unless there have been drastic changes lately I don't know about.
masak bummer :/
that's not... the mental model I have of an iterator (independent of Perl 6). 22:18
jnthn That...wasn't how they were designed to work...
timotimo does subparse really not work with a :pos argument?
masak an iterator is supposed to be this lightweight cursor-y thing. 22:18
colomon admits he might be wrong, and would love to be surprised in a godo way.
colomon …. actually, if you use shift on it it might work? 22:19
timotimo well, lines() uses gather/take
colomon reckons someone is going to have to experiment
timotimo we don't know we're allowed to, right?
unless we get the escape analysis thing going in moarvm %)
colomon is leaving for an outdoor folk festival in about ten minutes.
lue timotimo: IIRC subparse is still anchored to the start, the 'sub' part is that the whole text doesn't have to match to the grammar.
jnthn It's mostly about whether the array/list ends up being bound somewhere...
And so we would have a chance of referring to its values again. 22:20
masak that's what feels weird to me. it definitely *shouldn't* happen in the lines() case. 22:21
jnthn Indeed.
timotimo oh, duh, of course 22:22
lue: thank you.
timotimo yeah, perl6-m at least keeps growing in memory use for lines() 22:27
jnthn ugh
timotimo do we do the same thing for range objects? (well, not if we get the range-for-optimization) 22:28
lue timotimo: S05:4484 22:32
synopsebot Link: perlcabal.org/syn/S05.html#line_4484
lue also, "subparse is anchored to the start and end of the target string" is actually the description of parse() :) 22:33
timotimo er 22:35
lue That part of S05 tells me that you can choose where subparse() starts parsing, it's just that the grammar itself has to match from wherever it's told to start. 22:37
timotimo i should seriously put my head deeper into writing application-level perl6, rather than just core/guts %)
masak 'night, #perl6 23:17
timotimo gnite masak 23:18