»ö« 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.
00:04 pmurias left
dalek kudo-star-daily: 4164a58 | coke++ | log/ (11 files):
today (automated commit)
00:19
00:19 xiaomiao left 00:22 xiaomiao joined 00:40 kjs_ joined 00:51 Possum left 00:57 aborazmeh joined, aborazmeh left, aborazmeh joined 01:04 aborazmeh left 01:12 aborazmeh joined, aborazmeh left, aborazmeh joined 01:15 espadrine left 01:38 kjs_ left, LLamaRider left 01:39 Sysaxed left 01:40 aborazmeh left 02:35 fernan___ joined, fernand__ left 02:44 ilbot3 left 02:46 ilbot3 joined 02:47 aborazmeh joined, aborazmeh left, aborazmeh joined 02:50 fernan___ left, aborazmeh left, fernand__ joined 02:55 fernand__ left 03:10 rurban left
timotimo turns out the optimizer was only optimizing op "call", never op "callstatic" 03:16
i was trying to find out why the simple comparison ops weren't inlined, but they are no-prob 03:18
03:18 Psyche^ left, Patterner joined
timotimo oh, callstatic is what the optimizer itself sets 03:22
so it shouldn't have to know about that op beforehand ...
03:33 colomon left, skids left 03:34 colomon joined
timotimo well, the optimizer can constant-fold if both arguments are compile-time-known :\ 03:36
so it's at least getting near that part
timotimo goes to bed for today
masak 'night, #perl6 03:43
Mouq 'night masak, timotimo 03:44
03:46 aghbas joined, aghbas left 03:47 skids joined 03:51 fernand__ joined, colomon left 03:52 colomon joined 03:56 noganex joined 03:58 fernand__ left 03:59 noganex_ left 04:29 myp left 04:32 rmgk_ joined, rmgk is now known as Guest89837, Guest89837 left, rmgk_ is now known as rmgk 04:33 myp joined 04:55 fernand__ joined 04:59 fernand__ left 05:19 BenGoldberg left 05:57 fernand__ joined 05:59 vendethiel left 06:02 vendethiel joined 06:21 fernand__ left 07:05 xfix joined 07:15 Mouq left 07:18 fernand__ joined 07:21 davido___ joined 07:23 fernand__ left, davido__ left 07:26 wicope joined 07:30 vendethiel left 07:32 vendethiel joined 07:41 gfldex joined 07:53 diana_olhovik_ joined 08:04 prime left 08:05 prime joined 08:14 darutoko joined 08:17 vendethiel left 08:19 pierrot left, fernand__ joined, pierrot joined 08:25 vendethiel joined 08:37 Kristien joined 08:41 jack_rabbit_ joined, fernand__ left 08:49 jack_rabbit_ left 08:50 virtualsue joined 08:53 rurban joined
moritz \o 08:55
raydiak o/
moritz p: say 42 08:58
camelia rakudo-parrot 114659: OUTPUT«42␤»
moritz oh, it seems to have never cleaned out the install dir
I'll leave it in until it breakds
09:03 pierrot left
moritz b: say 42 09:04
09:04 camelia left 09:05 jack_rabbit_ joined, camelia joined
dalek albot: 51f48fb | moritz++ | evalbot.pl:
remove "b" target (pre-nom rakudo)

it is not available right now, and I am not feeling inclined to build a pre-historic rakudo version
09:06
camelia b : OUTPUT«Can't chdir to '/home/camelia/rakudo/': No such file or directory at lib/EvalbotExecuter.pm line 166.␤ EvalbotExecuter::_auto_execute(HASH(0x3521420), "say 42", GLOB(0x3c4d940), "/tmp/nb66AbgHQ2", "b") called at lib/EvalbotExecuter.pm line 114␤ EvalbotExecuter::_fork_…» 09:07
09:07 ChanServ sets mode: +v camelia
FROGGS[mobile] m: use NativeCall; say nativesizeof long 09:08
camelia rakudo-moar 114659: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ltrbdFwCNY␤Undeclared routine:␤ nativesizeof used at line 1␤␤»
FROGGS[mobile] :o(
dalek albot: 8eb832b | moritz++ | evalbot.pl:
Remove some cruft
FROGGS[mobile] m: say $*PERL.compiler.build-time 09:10
camelia rakudo-moar 114659: OUTPUT«No such method 'build-time' for invocant of type 'Compiler'␤ in block <unit> at /tmp/z8vyDrJIGP:1␤␤»
FROGGS[mobile] m: say $*PERL.compiler
camelia rakudo-moar 114659: OUTPUT«rakudo (2015.2.1.g.1146597)␤»
moritz seems to be stuck 3 days ago 09:11
FROGGS[mobile] yeah :o)
maybe because of --backends=parrot?
moritz Unknown option: gen-parrot
FROGGS[mobile] ahh
or that 09:12
09:12 vendethiel left 09:13 vendethiel joined
FROGGS[mobile] m: say $*PERL.compiler.build-date 09:16
camelia rakudo-moar 114659: OUTPUT«2015-02-19T21:36:18Z␤»
dalek albot: 24c0e57 | moritz++ | / (2 files):
Be birdless

also add non-yet-working, experimental profiling target
09:17
FROGGS[mobile] we need suggestions for typo'd method names
dalek kudo/nom: bc386e1 | moritz++ | docs/release_guide.pod:
Release guide: sign the release tags
09:19
09:19 rindolf joined 09:24 pierrot joined 09:28 spider-mario joined 09:32 diana_olhovik_ left
Kristien Can a class contain classes? 09:35
m: class A { class B { } }; say A.new.B.new
camelia rakudo-moar 114659: OUTPUT«No such method 'B' for invocant of type 'A'␤ in block <unit> at /tmp/g81K8fr9eY:1␤␤»
Kristien :( 09:36
raydiak m: class A { class B { } }; say A::B.new
camelia rakudo-moar 114659: OUTPUT«B.new()␤»
09:37 jack_rabbit_ left, virtualsue left 09:38 fernand__ joined
Kristien m: class A { method m { }; class B { method n { $.m } } }; say A::B.new.n 09:39
camelia rakudo-moar 114659: OUTPUT«No such method 'm' for invocant of type 'B'␤ in method n at /tmp/CDsXcXIb9h:1␤ in block <unit> at /tmp/CDsXcXIb9h:1␤␤»
nine_ .tell TimToady why not use a Junction to define the valid keys/indices for hashes and (multi dimensional) arrays? my int @array[1|2, 3|4]; That would free up the comma for separating dimensions. I saw even you using comma instead of semicolon quite a few times. How are mere mortals supposed to get accustomed to that?
yoleaux nine_: I'll pass your message to TimToady.
09:39 coffee` joined 09:41 virtualsue joined 09:43 fernand__ left
rurban you usually use arrow or assign for that. lua: int array[1 = 2, 3 = 4]; perl => 09:46
09:49 Rounin joined
vendethiel "(deprecated since 1994!)" now now, reading perl changelogs is fun. The deprecation is (probably) older than I am 09:51
Kristien vendethiel: you are deprecated
vendethiel nice.
I sure hope there's a better version of me in another branch...:-)
09:52 rurban1 joined 09:58 pierrot left
moritz squash-merges vendethiel 09:59
10:02 rurban1 left 10:03 pierrot joined
Kristien Does Perl 6 have $[? 10:17
10:18 virtualsue left
moritz Kristien: iirc there is something unimplemented about shaping arrays (so custom indexes ranges per array) 10:18
but nothing global like p5's $[
Kristien cool
10:19 vendethiel left 10:21 vendethiel joined
Kristien ideone.com/FVaqLy :( 10:23
10:24 mj41 joined 10:28 FROGGS joined
FROGGS m: use NativeCall; say nativesizeof long # moritz++ 10:30
camelia rakudo-moar bc386e: OUTPUT«8␤»
FROGGS it's up to date /o/
moritz FROGGS: I've added the --profile-file option to nqp, and it worked there
FROGGS: but it's not working on rakudo
Illegal option --profile-file 10:31
FROGGS: but --profile seems to be only set up in nqp, not in rakudo separately
FROGGS: any idea what's wrong there?
dalek osystem: 543224b | raydiak++ | META.list:
Add Inline::Lua
10:32
moritz huh, doesn't seem to work in nqp either :(
either it broke, or I was delusional yesterday night 10:33
FROGGS moritz: do you mean --profile-filename ?
moritz headdesks 10:34
FROGGS *g*
moar coffee#
-#
10:39 virtualsue joined, fernand__ joined
moritz ... and it seems I broken profiling in rakudo 10:39
Too few positionals passed; expected 3 arguments but got 2
and no routine name, even with --ll-exception
oh, I see why 10:41
FROGGS make the $filename optional 10:42
moritz ... or pass it along 10:43
10:44 Kristien left
moritz tests a fix 10:44
10:46 laouji joined
FROGGS moritz: and please add the $filename param to jvm/parrot also 10:47
moritz FROGGS: jvm has a --profile too? 10:50
FROGGS aye 10:51
dalek p: 4526709 | moritz++ | src/vm/moar/HLL/Backend.nqp:
Unbreak profiling in rakudo
FROGGS method run_profiled($what) {
nqp::printfh(nqp::getstderr(),
"Attach a profiler (e.g. JVisualVM) and press enter");
I even did that once
moritz FROGGS: and how would I process the file name there?
FROGGS you dont... but right now you cannot even call it 10:52
but you are always passing it, undef in this case
moritz so if I make it optional, JVM will be unbroken? 10:54
FROGGS yes, that's what I think
add $filename as an optional param to all three run_profile methods 10:55
moritz right
dalek p: 0e62590 | moritz++ | src/vm/ (2 files):
Unbreak --profile on parrot, JVM
moritz FROGGS++ 10:56
FROGGS m: class Foo is repr<CStruct> { has buf8 $.bar } # that's what I am up to now...
camelia rakudo-moar bc386e: OUTPUT«===SORRY!===␤CStruct representation only handles int, num, CArray, CPointer and CStruct␤»
dalek kudo/nom: 9fc66ca | moritz++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to get profiling fixes
10:57
10:58 fhelmberger joined
dalek albot: c0a1331 | moritz++ | evalbot.pl:
make prof-m target work
10:59
moritz learned about rssh today
11:03 camelia left, camelia joined 11:04 ChanServ sets mode: +v camelia
dalek albot: 0ee2458 | moritz++ | build-scripts/rebuild-rakudo.pl:
Only rebuild the moar backend

parrot is sleeping, and we cannot run the JVM efficiently in the bot context anyway
11:06
moritz niecza: say 42
camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤ at <unknown> <0xffffffff>␤ at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤ at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤ at string…»
nwc10 I assume that perl6.org/compilers/features will be updated in some way now that parrot support is suspended. Would it be a good idea to make Rakudo MoarVM the leftmost column? 11:07
given that it's slightly more green than Rakudo on the JVM
11:13 fernand__ left, telex left 11:14 telex joined
dalek atures: 16d1ec1 | moritz++ | features.json:
Be birdless.

also remove outdated notice about argument type coercion. move r-m column to the left, nwc10++
11:14
11:19 Kristien joined
nine_ learned about rssh just now 11:20
thanks moritz :)
moritz m: say 42
camelia rakudo-moar 9fc66c: OUTPUT«42␤»
moritz prof-m: Date.today for ^100; say "done" 11:21
camelia prof-m 9fc66c: OUTPUT«done␤»
.. Prof: p.p6c.org/453bbe
moritz look, automagic profiling!
that's what I used rssh for: set up an account on www.p6c.org so that camelia can scp the profile files into it 11:22
[ptc] moritz++ 11:23
nine_ wow!
[ptc] that's awesome!
moritz let's see how brittle it turns out to be 11:24
currently it uses a hard-coded output file, because I didn't want to modify camelia more than necessary+ 11:26
FROGGS moritz++ # \o/ 11:28
that's awesome!
moritz ... and I think FROGGS++ had the idea originally :-) 11:29
FROGGS err, no :o)
moritz no? was it timotimo++?
FROGGS that's more likely
moritz FROGGS: keep your ++ and do something awesome with it :-) 11:30
like repr-based (un)pack 11:31
FROGGS ohh, good idea
11:36 virtualsue left
[ptc] moritz: how up to date is perlgeek.de/en/article/5-to-6 compared to doc.perl6.org/language/5to6 ? 11:43
moritz: should perl6.org/documentation/ maybe point to the doc.perl6.org location?
nine_ [ptc]: it already does 11:47
[ptc]: oh you mean redirect not link?
[ptc] nine_: actually, I meant the 5to6 stuff specifically 11:49
wow, haven't seen this error before "Internal error: invalid thread ID in GC work pass"
nine_: I'm wondering if it's worthwhile consolidating some of the documentation 11:50
nine_: e.g. extending the doc.perl6.org/language/5to6 doc to match that discussed in perlgeek.de/en/article/5-to-6 and then pointing the link to the docs.perl6.org site 11:51
nine_: this would give new users the feeling that all documentation comes from one official site 11:52
nine_ [ptc]: which is all the more important considering that there's so much outdated information out there
[ptc] nine_: exactly 11:53
nine_: that would also help give users the impression that the project *is* up to date and consistently moving forward 11:54
vendethiel moritz: I sure hope you didn't squash me too much
nine_ I usually look on doc.perl6.org first, search for advent calendar postings, have a look at the synopsis and disregard everything else
Though I find less and less reason to go beyond doc.perl6.org. It's already amazingly useful and I can't overstate how important this is. 11:56
[ptc] agreed. That's one of the reasons why I'm getting my teeth stuck into the docs :-) 11:57
colomon +1 11:58
12:04 Kristien left
dalek c: 2fc99dd | paultcochrane++ | lib/Type/Mu.pod:
Document Mu.WHERE
12:04
c: b525111 | paultcochrane++ | util/missing-methods.p6:
Escaping qualified method names in missing-methods.p6

This is so that special characters don't get interpreted by the shell when running the command through qqx{}.
c: e01b995 | paultcochrane++ | util/missing-methods.p6:
Hyphenate variable names in missing-methods.p6
c: f8522bf | paultcochrane++ | lib/Type/Mu.pod:
Document Mu.WHY
href="https://perl6.org:">perl6.org: ebdea56 | paultcochrane++ | source/documentation/index.html:
Point to doc.perl6.org Perl 5 to 6 introduction
12:08
12:09 fernand__ joined 12:10 Kristien joined 12:11 abraxxa joined 12:12 FROGGS_ joined
dalek href="https://perl6.org:">perl6.org: f47cdf9 | paultcochrane++ | source/index.html:
Point 5to6 link to doc.perl6.org from main perl6.org page

Missed this one when updating the one from the "documentation" page.
12:13
12:16 FROGGS left
lizmat m: sub f(Int() $a is rw) { say $a.WHAT; $a = 42 }; my Str $b = "65"; f $b; say $b # this should be a compile time error 12:17
camelia rakudo-moar 9fc66c: OUTPUT«(Int)␤Cannot assign to an immutable value␤ in sub f at /tmp/H_jIYuc1EZ:1␤ in block <unit> at /tmp/H_jIYuc1EZ:1␤␤»
lizmat mixing a coercion with "is rw" should fail at compile time
m: sub f(Int() \a) { say a.WHAT; a = 42 }; my Str $b = "65"; f $b; say $b # same for sigilless 12:18
camelia rakudo-moar 9fc66c: OUTPUT«(Int)␤Cannot modify an immutable Int␤ in sub f at /tmp/3s0rKR2IQX:1␤ in block <unit> at /tmp/3s0rKR2IQX:1␤␤»
lizmat I think this is a rakudobug? do others agree ?
12:20 zakharyas joined 12:28 raiph left 12:32 kjs_ joined
dalek pan style="color: #395be5">perl6-examples: abaff30 | paultcochrane++ | 99-problems/P08-eric256.pl:
Skip P08-eric256 on Niecza

This is because this backend doesn't yet implement FIRST.
12:33
pan style="color: #395be5">perl6-examples: 167a424 | paultcochrane++ | 99-problems/P08-eric256.pl:
Replace hard tabs with spaces in P08-eric256
pan style="color: #395be5">perl6-examples: a8ab4f5 | paultcochrane++ | 99-problems/P08-eric256.pl:
Add vim coda in P08-eric256
moritz [ptc]: 5-to-6 is pretty up-to-date (last updated in December or so) 12:34
[ptc] moritz: ok
moritz [ptc]: and I'm not opposed to merging it into doc.perl6.org, as long as the motivation (documenting the "why", not just the "how") remains in tact
[ptc] moritz: ah, that's good to know 12:35
moritz: I noticed that the first example was dated 2008, and I was wondering how up to date everything was
vendethiel "doesn't YET implement"...ha! 12:36
nwc10 moritz: probaby also perl6.org/ needs updating. Currently it says "Rakudo, a compiler running on Parrot, MoarVM, and the JVM." 12:37
[ptc] moritz: I got a comment recently on Twitter that the docs should remove anything dated, and I started to wonder about how old some of the user-facing docs are
the thing is, I *know* that things are quite up to date, however it's not always obvious that that's the case 12:38
vendethiel: well, that's an accurate statement, isn't it? If not, I can update the note in the example file 12:39
vendethiel [ptc]: Niecza is not going to get anything new any soon, i believe :) 12:40
[ptc] vendethiel: ah. I don't know much about the status of that backend; it's hard to keep up sometimes! 12:42
vendethiel [ptc]: right :-).
12:43 fernand__ left
masak good afternoon, #perl6 12:44
vendethiel \o, masak
[ptc] hi 12:45
dalek c: bc6acd0 | paultcochrane++ | lib/Type/IO/Path.pod:
Remove extra 'to'
12:49
12:49 rurban1 joined 12:51 zakharyas left 12:56 abraxxa left
Kristien is there a guide on slangs? 12:57
FROGGS_ m: say buf8.REPR # why is that? 12:58
camelia rakudo-moar 9fc66c: OUTPUT«Uninstantiable␤»
12:58 Ven joined
FROGGS_ m: say Buf[uint8].REPR; say Buf[uint8].new.REPR # so, it need to be punned into a class 12:59
camelia rakudo-moar 9fc66c: OUTPUT«Uninstantiable␤VMArray␤»
dalek pan style="color: #395be5">perl6-examples: 75a0e1b | paultcochrane++ | bin/run-all-examples.pl:
Add a script to run all examples
13:01
vendethiel Kristien: not yet, but you can look at FROGGS_++'s modules like Slang::Tuxic
or tony's lang::sql (can't remember the exact name tho)
Kristien I want to be able to embed AWK code. :P
vendethiel "embed" might be a *tad* too strong, but that seems possible 13:02
FROGGS_ Kristien: then perhaps clone my v5 and strip it down to your needs :o)
vendethiel LOL
13:02 Ven left
Kristien vendethiel: well have it invoke AWK 13:02
FROGGS_ because v5 has a port of nqp's operator precedence parser that we also use for Perl 6's grammar
Kristien: you still have to parse its syntax to know where the block ends within AWK is valid 13:03
Kristien it'd basically be { use awk; … } where it just counts the curly braces and passes the text to awk
FROGGS_ Kristien: then look at slang::tuxic 13:04
Kristien ok :3
At work I work in Python and often have the urge to invoke perl, awk, find etc from Python but it just feels like an ugly hack. 13:06
Well, not find anymore, since Python _finally_ got recursive glob.
lizmat perhaps the other way around is cleaner ?
Kristien nah it's for little things, the Python system is rather large and is run by a web server (gunicorn) 13:07
13:11 FROGGS[mobile] left
dalek pan style="color: #395be5">perl6-examples: c33ca94 | paultcochrane++ | 99-problems/P (66 files):
Use consistent vim coda in 99-problems example set
13:21
pan style="color: #395be5">perl6-examples: d586464 | paultcochrane++ | 99-problems/README:
Wrap paragraphs in 99-problems README
pan style="color: #395be5">perl6-examples: cbe4bc6 | paultcochrane++ | 99-problems/README:
Correct typo in 99-problems
pan style="color: #395be5">perl6-examples: 73e1d6c | paultcochrane++ | 99-problems/99-problems.pod:
Wrap paragraphs consistently
pan style="color: #395be5">perl6-examples: c460cff | paultcochrane++ | 99-problems/ (18 files):
Purge trailing whitespace in 99-problems
vendethiel Kristien: have you seen that video where the guy runs python and php on the same VM, interleaving both (+ html) in a single page? 13:37
vendethiel thinks he's talked about it before
Kristien no
but it sounds like a nightmare
vendethiel probably won't be able to find it anyway... 13:39
13:40 fernand__ joined 13:44 drzsasz left, Sysaxed joined
Sysaxed m: my $c = * * * * *; say $c(2, 3, 4); 13:45
camelia rakudo-moar 9fc66c: OUTPUT«24␤»
Sysaxed haha :D
13:45 mohij joined
Kristien :( 13:46
13:53 diana_olhovik joined
vendethiel *g* 13:53
m: say (****)(3, 3)
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/40E33WXYQ_␤Bogus statement␤at /tmp/40E33WXYQ_:1␤------> 3say (****7⏏5)(3, 3)␤ expecting any of:␤ prefix or term␤ prefix or meta-prefix␤»
vendethiel m: say (*****)(3, 3) 13:54
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SRT6Q7EoSx␤Multiple HyperWhatevers and Whatevers may not be used together␤at /tmp/SRT6Q7EoSx:1␤------> 3say (*****7⏏5)(3, 3)␤»
Kristien OTOH parsing AWK isn't very hard
vendethiel heh.
14:01 locsmif joined 14:03 diana_olhovik left 14:14 fernand__ left 14:28 zakharyas joined
Kristien I like how parsing C++ requires being able to interpret C++ code. 14:30
vendethiel Kristien: *interpret*? 14:38
sure you need a table of symbols and whatnot, ambiguities exist (and the most vexing parse as well) but interpret? 14:39
Kristien You can't parse C++ code without being able to call constexpr functions at compile-time.
You can for example create a syntax error by having a constexpr function return an odd number.
auto x = f<g()>(y); can mean different things depending on the return value of g() 14:40
vendethiel ah yeah, didn't think of constexprs as template arguments 14:42
Kristien coliru.stacked-crooked.com/a/7b1c0c5ff55e02ca
change line 21 to return a non-prime
vendethiel doesn't seem to load here.
oh transient coliru error
hahahha that's true, template specialize a template with true, will SFIAE if the function returns false 14:43
not even SFIAE. it's a syntax error :o) 14:47
Kristien What is SFIAE? 14:57
Substitution failure is an error?
I think you mean SFINAE.
14:58 Kristien left, dolmen joined
vendethiel it was indeed substituion failure is an error, and I did not mean SIFNAE... :P 15:04
m: sub foo{%(do for ^10 -> $a, $b { $a => $b })}; say foo.perl 15:05
camelia rakudo-moar 9fc66c: OUTPUT«("0" => 1, "6" => 7, "8" => 9, "4" => 5, "2" => 3).hash␤»
vendethiel m: sub foo{hash do for ^10 -> $a, $b { $a => $b }}; say foo.perl
camelia rakudo-moar 9fc66c: OUTPUT«("4" => 5, "0" => 1, "6" => 7, "8" => 9, "2" => 3).hash␤»
masak moritz++! # irclog.perlgeek.de/perl6/2015-02-22#i_10156401 15:08
15:10 fernand__ joined
masak |Tux|++ # RT submit spree 15:14
tadzik moritz :O 15:17
dat profiling
awesome
dalek href="https://perl6.org:">perl6.org: 738c157 | moritz++ | source/documentation/index.html:
Link to both my 5-to-6 and the one on doc.perl6.org

as long as the resources are not joined, there is value in having both
15:19
masak tadzik: imagine this: someone decides to implement a new language on top of Moar. (or an existing language.) we provide a bot that they can dump on their channel that gives them (a) code eval and (b) profiling. out of the box. 15:23
heck, doesn't even have to be a programming language. it can be any data format and any transformation.
moritz ... except that they'd still need NQP
masak package that up in the right way, give it a Web 2.0 home page, and there's your killer app.
15:23 jschulz left, timotimo left, Exodist left, dsm left, DrForr_ left, d^_^b left
masak moritz: seems like a fair deal to me. 15:24
15:24 tinita_ joined, d^_^b joined, d^_^b left, d^_^b joined, Grrrr joined, cxreg joined, jschulz joined, dolmen left, DrForr_ joined, hoelzro_ joined, osfameron joined, PerlJam joined, timotimo joined, jtpalmer joined, Exodist joined, Juerd joined, muraiki joined, gargamel joined, Kristien joined, sorear joined 15:25 mtj joined, dsm joined 15:35 espadrine joined 15:36 dolmen joined 15:39 brrt joined
ruoso Aha! I finally understood why I was failing in the Slang... 15:40
only QAST types can be returned by the actions, not arbitrary hashes
and by return I mean "make"
masak seems right. 15:41
moritz well, you can make() whatever you want, as long as you don't hand it to the QAST compiler in the end :-)
ruoso let me try something to confirm that 15:42
ah, you're right... in my randomly tested permutations I didn't try that 15:43
15:44 fernand__ left
ruoso Does NQPMatch have any stringification form? 15:46
15:50 laouji left, laouji joined, laouji left
ruoso I mean any that brings up the structured tree, not the matched text 15:51
15:51 pmurias joined
ruoso aha... dump 15:53
pmurias nqp is supposed to use uncuddled else, like "if {}\nelse {}\n"
ruoso hmm... my slang is being matched by not captured 15:55
pmurias by nqp I mean the code in the nqp repo?
15:58 kjs_ left 15:59 virtualsue joined
ruoso hmm... ok, I think I found another souce of confusion... when a slang delegates to another grammar, it goes fom NQPMatch to Match, and then it fails to be able to include a regular Match object as part of the NQPMatch tree 16:01
FROGGS_ pmurias: yes and no
pmurias: I mean, I don't like so dont do it :P 16:02
pmurias: but yes, there are places where you can see cuddling elses
16:04 lestrrat left 16:06 brrt left 16:07 lestrrat joined
skids wonders if there are such a thing as else-cuddling code trolls. 1.) Cuddle elses on rosettacode to upset people 2.) ... 3.) Profit! 16:08
16:08 Kristien left 16:10 BenGoldberg joined
pmurias I haven't seen much people outside of perl who don't cuddle elses 16:12
16:12 kjs_ joined
huf else cuddling code troll sounds like imperialist pigdog or something :) 16:12
pmurias GNU uses uncuddled elses too 16:13
but they are at best crazy
skids "else cuddling" does have that invective feel ;-) 16:14
ruoso just has another "aha!" moment... the match itself is not exposed, but the wrapping in FOREIGN_LANG exposes .made which does allow me to get the result of my external grammar!
pmurias FROGGS_: what would be best is to be consitent one way or the other 16:16
FROGGS_ pmurias: it is enough for me if it it consistent within the same file
16:17 Exodist left, kjs_ left
pmurias we need someone to write nqptidy, so that our machine slaves can take care of such trifle matters as code formatting 16:17
16:18 brrt joined
dalek p/js: 490c9c7 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Refactor rules compilation.
16:19
p/js: 04230e6 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Document some of the variables used in regex matching.
16:21
16:22 MadcapRusso left
timotimo o/ 16:24
nwc10 good *, pmurias 16:26
pmurias nwc10: hi 16:27
16:31 Ovid_ joined 16:32 MadcapJake joined, brrt left
flussence grumbles at not being able to start a p5 script with "#!/usr/bin/env perl -T" 16:39
16:41 MadcapJake left, fernand__ joined
dalek c: 4172cb1 | moritz++ | lib/Language/objects.pod:
Role punning, parameterized roles
16:47
16:48 Kristien joined 16:51 laouji joined 16:53 dolmen left, rurban1 left 16:55 MadcapJake joined 16:56 laouji left 16:58 MadcapRusso joined 17:00 MadcapJake left
TimToady vv because junctions are not sets 17:06
yoleaux 09:39Z <nine_> TimToady: why not use a Junction to define the valid keys/indices for hashes and (multi dimensional) arrays? my int @array[1|2, 3|4]; That would free up the comma for separating dimensions. I saw even you using comma instead of semicolon quite a few times. How are mere mortals supposed to get accustomed to that?
17:15 fernand__ left
grondilu semicolon are a quite common in languages supporting multidimensional arrays (octave, for one) 17:15
moritz (where octave = Matlab, from a language perspective)
grondilu true, but I tend to favor FOSS :) 17:16
17:16 Ovid__ joined
grondilu notices there is no FOSS in S99, can he add it? 17:17
17:17 Ovid_ left
moritz +0.5 17:18
17:20 rurban1 joined
pmurias what would I need to do to get camelia to support nqp-js? 17:20
Kristien I like how in Go looping over a map starts at a random element. 17:21
To prevent you from thinking there is any ordering.
geekosaur rakudo used to do something like that
(well, not with map, but with some other things(
moritz yes, wit >> iirc
m: say <a b c d e>>>.say 17:22
camelia rakudo-moar 9fc66c: OUTPUT«e␤c␤a␤d␤b␤True True True True True␤»
moritz pmurias: I'll look into setting up
*it up
pmurias: if you want to help, you could write a small shell or perl5 script that rebuilds it 17:24
see github.com/perl6/evalbot/tree/mast...ld-scripts for inspiration
it'll be checked out in ~/nqp-js/
17:25 perl6_newbee joined
perl6_newbee hi all 17:25
moritz \o perl6_newbee
perl6_newbee :-)
I asked google for croak in perl6 but found nothing. Is there such a thing like croak? 17:26
moritz no 17:27
perl6_newbee OK
moritz I wonder how it should be implemented
geekosaur doesnt perl 6 already provide useful backtraces? 17:28
moritz maybe as an attribute for Backtrace, indicating where the backtrace should start
geekosaur (that being the original reason for it, since perl 5 doesn't do backtraces at all)
moritz geekosaur: I hope :-)
17:30 rurban1 left
perl6_newbee I could die in my class, but to show the user always an backtrace is ugly, I think 17:30
moritz well, if it's meant for the end user, no backtrace or line number at all should be shown 17:31
if it's for the programmer who uses your library, a backtrace sounds fine to me
perl6_newbee off course. But I cannot change the die behavour, can I? 17:32
dalek c: 48505c0 | moritz++ | lib/Language/functions.pod:
Document coercion types
moritz perl6_newbee: no 17:35
perl6_newbee ah, I die in the class and catch it in my script. Then I can just say a error to the user or throw the exception again, right 17:36
?
grondilu oh, FOSDEM videos!
oh no, talked to fast. 17:37
perl6_newbee hey cool
grondilu there's a directory tree but no file
video.fosdem.org/2015/
perl6_newbee shouldn't take too long. I am also waiting for the vids
timotimo i'm waiting for the vids as well 17:39
dalek c: 5f45075 | moritz++ | util/update-and-sync:
Remove --no-inline-python

just tried it an interactive session, and it worked fine. Keep the fingers crossed!
17:42
moritz pmurias: the makefile generated by perl Configure.pl --backends=moar,js is a bit borked 17:43
pmurias: when I run 'make' multiple times, it keeps rebuilding some files over and over 17:44
pmurias: (tested on the opensuse box where camelia runs)
dalek albot: 86206cb | moritz++ | evalbot.pl:
add nqp-js target (with nqp-q as alias)
17:46
17:46 camelia left
timotimo nqp-q? 17:46
17:46 camelia joined
moritz 'q' seems to be a common pre- or postfix for js stuff 17:47
timotimo oh? i didn't know that
17:47 ChanServ sets mode: +v camelia
moritz masak++ mentioned that a while ago 17:48
timotimo OK
moritz nqp-js: say('pmurias++')
camelia nqp-js: OUTPUT«pmurias++␤»
moritz it's not rebuilt automatically
[ptc] $n = 5; gather for (2, 3, *+2 ... * > $n) -> $k { $k.say } 17:49
m: $n = 5; gather for (2, 3, *+2 ... * > $n) -> $k { $k.say }
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5JQbPgb_fZ␤Variable '$n' is not declared␤at /tmp/5JQbPgb_fZ:1␤------> 3$n7⏏5 = 5; gather for (2, 3, *+2 ... * > $n) ␤ expecting any of:␤ postfix␤»
[ptc] m: my $n = 5; gather for (2, 3, *+2 ... * > $n) -> $k { $k.say }
camelia rakudo-moar 9fc66c: OUTPUT«Unhandled exception: No exception handler located for warn␤ at src/gen/m-CORE.setting:785 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:warn:29)␤ from src/gen/m-CORE.setting:781 (/home/camelia/rakudo-inst-2/languages/perl…»
[ptc] m: sub pf(Int $n) { gather for (2, 3, *+2 ... * > $n) -> $k { $k.say } }; pf(5) 17:50
camelia rakudo-moar 9fc66c: OUTPUT«Unhandled exception: Cannot call 'infix:<>>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a,…»
dalek albot: e3a593d | moritz++ | build-scripts/rebuild- (6 files):
Remove some outdated rebuild scripts
pan style="color: #395be5">perl6-examples: edbe7bd | paultcochrane++ | bin/run-all-examples.pl:
Add --example-dir option

Which allows a given example set to be run instead of running all of them.
17:51
pan style="color: #395be5">perl6-examples: 1218283 | paultcochrane++ | 99-problems/P17-topo.pl:
Convert Parcel to List in input args

  'a' xx 20 creates a Parcel, which is immutable and thus can't be shift-ed.
Converting the Parcel to a List allows the example to run correctly again.
17:51 kjs_ joined, brrt joined 17:53 brrt left
[ptc] moritz: sorry for effectively removing your 5to6 docs from the website; you're right: before the two documents are merged, it's most certainly worthwhile to link to both 17:53
17:53 [Sno] left
raydiak good morning #perl6 17:59
18:02 diana_olhovik_ joined
pmurias moritz: I'll have to look into the Makefile (make--) 18:06
18:06 [Sno] joined
pmurias moritz: thank you for setting up nqp-js in the evalbot 18:08
18:10 rindolf left 18:11 fernand__ joined 18:13 mohij left 18:16 smls joined
smls Hi all 18:16
dalek p/js: 063ee2d | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement scan.
p/js: 2aaebda | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Remove a debugging leftover.
p/js: 9dd6440 | (Pawel Murias)++ | tools/build/Makefile-JS.in:
Revert "Make sure nqp-m is built before trying to build MoarVM files"

This reverts commit f9660d032d9841d785ec37eb4aac0a0fbe56d03e.
pmurias moritz: the reverted commit should fix the problem 18:17
smls In Perl 5, a sub could be called with the &foo; syntax to use the caller's @_, and with goto &foo; to replace the caller in the stack. 18:18
Does Perl 6 have an equivalent for that?
18:21 rindolf joined
Kristien I thought it turned off prototypes. 18:22
smls &foo(...) turns off protoypes in Perl 5.
(without goto, and with parens)
i.e. they're three different syntactical forms, in addition to the normal foo(...) syntax. 18:23
So yeah, it's a good thing Perl 6 didn't carry over that mess, but at least the goto &foo; form was useful, because it effectively gave Perl tail-call optimiation. 18:24
vendethiel smls: `foo(|@_)` should work 18:25
smls vendethiel: you mean to replace &foo; ?
vendethiel yes
18:25 lsm-desktop is now known as lsm
moritz smls: it just has callsame() for calling the next candidate in a dispatch chain with the same arguments 18:25
raydiak smls: callsame, nextsame, etc do those things including tail call optimization
18:25 lsm is now known as lsm01
moritz m: say Routine.^can('callsame') 18:26
camelia rakudo-moar 9fc66c: OUTPUT«␤»
smls but waht if you *don't* want to call the same sub?
moritz doesn't exist as a method, though I think the design docs talk about that
smls moritz: Imagine a program (say, a game with different game states) that wildly jumps back and forth between a few subroutines 18:31
and never return, unless th program ends
in Perl, you'd use goto &foo; for those jumps so the call stack don't overflow :) 18:32
raydiak it seems to be NYI, but you should be able to say "&foo.nextsame' or something along those lines
the next variants specifically enforce tail-call optimization like you're talking about
smls ah, ok 18:33
raydiak same is for the same params, with is "with other params"
18:33 perl6_newbee left
smls thanks 18:33
raydiak you're welcome :)
18:36 smls_ joined 18:38 smls left
moritz smls_: one could also structure it so that the routines return with the information about where to jump next, and an outer runloop dispatching that 18:39
smls_ right, it was not a good example i guess
moritz which is how most software interpreters work 18:40
smls_ as you'd probably prefer to build a proper state machine for such a game
japhb moritz: There are *many* ways to do interpreteres. The one you described is actually the inner loop of perl5, IIRC.
18:40 laouji joined
moritz japhb: iirc parrot had a similar design 18:40
pmurias smop had something like that only with a polymorphic method call 18:41
japhb Not surprised there. It's an easy design with a pretty tight main loop. :-)
18:42 smls_ is now known as smls 18:44 fernand__ left 18:45 laouji left, khisanth_ joined 18:48 Khisanth left, fernand__ joined 18:51 noganex_ joined 18:52 noganex left
Kristien I wish I could write more Perl code. 18:56
I should see how I can neatly rewrite my log colorer from AWK in Perl 6.
fernand__ I think there's something wrong on array named parameters on MAIN... 18:58
vendethiel Kristien: is it in python atm?
fernand__ sub MAIN (:@requires! where {require $^module}, :@resources!) {
Kristien AWK
vendethiel ohhhh i'm sorry for being blind. hahaha
fernand__ perl6 ResourceManager.p6 --requires=ClassifiedResources.pm6 --requires=ClassifiedResources.pm6 --resources=Ad --resources=User
Could not find file 'ClassifiedResources.pm6 ClassifiedResources.pm6' for module ClassifiedResources.pm6 ClassifiedResources.pm6
Kristien I did write a Python stack trace highlighter, to make it possible to actually find what I'm looking for: github.com/rightfold/tools/blob/ma...ytrace.awk
vendethiel try using "--" to tell perl6 it's not file arguments? uhm 18:59
Kristien It highlights the stack frames that are actually relevant.
fernand__ vendethiel: like this?
vendethiel what's $1 and $2? is it like "split($current_line, default_separator=' ')"?
fernand__ $ perl6 ResourceManager.p6 --requires=ClassifiedResources.pm6 --requires=ClassifiedResources.pm6 --resources=Ad --resources=User --
sorry...
vendethiel fernando___: I thought "perl6 file.p6 -- --arguments" but not sure 19:00
Kristien vendethiel: AWK splits each record, and $n returns the nth field
japhb fernand__: the where that you have there is getting the entire @requires, not each element separately
ruoso I am now getting really close to a working version of github.com/ruoso/Grammar-EBNF/blob...04_slang.t ... The thing I'm missing now is the corect QAST tree to declare a new grammar and to declare the named rule. I already can produce the QAST::Regex for that particular test case...
vendethiel waht's the default field separator, Kristien?
Kristien whitespac
and default record separator is newline
fernand__ but -- means that after that there are no more named parameters, right?
vendethiel ha, that might apply to your scripts, not to perl6... :P 19:01
japhb fernand__: Yes, but you have two elements of @requires, and you are trying to require them both at once
fernand__ japhb: yes, looks like that...
ruoso: Daniel Ruoso?
japhb perhaps: sub MAIN (:@requires! where { require $_ for $^module }, ... 19:02
er
vendethiel Kristien: for lines { my ($file, $tohl) = .split(' '); if $file == 'File' && $tohl.index-of(@ARGV[0]) >= 0 { say ... } }
ruoso fernand__: yep
japhb perhaps: sub MAIN (:@requires! where { require $_ for @^modules }, ...
fernand__ japhb: but is that what shuold it do?
Kristien vendethiel: /\s+/ not ' '
But that works, since Python uses a single space, yes.
japhb fernand__: The where is on the entire parameter; it doesn't unpack collections unless you explicitly ask it to. 19:03
fernand__: for example, you might say: sub foo(@list where *.elems < 10)
fernand__ but when I do Int @nums, it means that each element on @nums is a Int... 19:04
japhb fernand__: I can't help but think you're attempting to do too much in the binding of MAIN ... for example, if it fails the where { require ...} you're going to get a binding failure, which is LTA when you were expecting a require failure. 19:05
fernand__ since the where {...} means a sub type... shouldn't it means that each element should pass that constraint?
japhb fernand__: Actually 'Int @nums' doesn't mean each element is an Int, more precisely it means that you can't bind something to nums that doesn't satisfy the Role constraint Positional[Int]. 19:07
dalek Heuristic branch merge: pushed 33 commits to rakudo/cpp by FROGGS
japhb Which is fine if you're doing normal code, but it's a recipe for heartache with MAIN magic.
colomon rakudo/cpp ? 19:08
japhb The DWIM can only go so far before it converts to WAT
FROGGS_ colomon: aye
japhb colomon: C++ support for NativeCall
colomon ooooooooo
japhb Which is OMG AWESOME for my workplace
colomon japhb++
FROGGS_ :P
japhb Nonono, FROGGS_++
japhb-- # undeserved
colomon FROGGS_++
FROGGS_ :o)
colomon everyone++
fernand__ so, if I add another constraint: Int @nums where {$^num < 10}, it should have the same behavior, right? 19:09
ruoso FROGGS_: is it assuming g++ ABI?
19:09 kjs_ left
colomon FROGGS_: do you actually anticipate having it working at some point? 19:09
masak JavaScript has QUnit. they couldn't call it JUnit, because that's Java's xUnit lib. I have no idea why they chose 'Q'. I don't know of any other JS library that has a 'Q' for that reason.
colomon because that has the potential to be pretty killer for my $work, too
japhb The where is still a constraint on the entire parameter, not its elements.
FROGGS_ ruoso: atm, yes
japhb fernand__: to get what you want, do the subtype:
subtype Small of Int where * < 10;
Small @nums 19:10
fernand__ shouldn't both be the same?
FROGGS_ colomon: some stuff works already... I am binding Box2D while I do the implementation
japhb But *still* you're going to run into the fact that in binding, 'Small @nums' will check whether the argument passes does Positional[Small], it will *not* check if it does Positional and all elements happen to be Small.
colomon doesn’t mean to disparage FROGGS_++’s programming skills at all, just curious whether rakudo/cpp is raw experimentation or practical implementation 19:11
japhb IT's a vast difference in default performance, fernand__ :-)
fernand__: For an array of size N, the current implementation does O(1) work in the binding, but your requested behavior would do O(N) work *for every call* 19:12
FROGGS_ colomon: feels to be more than an experiment :o)
colomon FROGGS_: AWESOME!!!! 19:13
japhb I am really, really hoping FROGGS_ succeeds. Massively good vibes flowing his way on this one. :-)
FROGGS_ hehe
Kristien masak: jQuery!
japhb Also nine_++ yet again for Inline::(Python,Perl5).
masak Kristien: :P 19:14
Kristien: maybe if it was called qQuery...
japhb qq:uery
Kristien masak: en.wikipedia.org/wiki/Jake_Weary
fernand__ japhb: ok... but, that this should work, right? 19:15
sub MAIN (:@requires! where {require all($^module)}, :@resources!) {
or: sub MAIN (:@requires! where {require all(@^module)}, :@resources!) { 19:16
japhb fernand__: Hmmm, I'm actually not sure how that would junction-thread during binding. That one I'd have to try. 19:17
pmurias can we manage C++ interop without parsing headers?
ruoso pmurias: for simple stuff probably
as long as the library has a sane API
japhb pmurias: For things that aren't completely specified by crazy template magic, I would assume so; same way we do with C bindings, just more complex
fernand__ gist.github.com/anonymous/1c8f251561934824e7da 19:18
ruoso it's mostly about doing the name-mangling of the function call
of course if any of those functions take a std::vector<foo> then you don't need just a parser, you actually need a C++ compiler 19:19
japhb fernand__: I'm not entirely surprised that didn't work. Try the loop like I suggested.
AFK
ruoso although, you could probably assume that a template referenced by a method signature would already be instantiated in the library
fernand__ japhb: but shouldn't work?
pmurias can we assume that portably? 19:22
dalek kudo/cpp: 2f34483 | FROGGS++ | t/04-nativecall/11-cpp.t:
test the size of the C++ structures
19:23
19:23 erere joined
erere ... 19:23
masak ... 19:24
erere ;D 19:25
masak winks, smiling widely
erere hi ! just wanted to know that is anyone online or not
masak nope.
no-one here... :) 19:26
erere :d 19:27
nwc10 what he said.
FROGGS_ silence...
erere yep i can see
Kristien Something I'd really love to see is better interop with other languages. 19:28
erere should i learn perl 5 or wait for perl 6? 19:29
FROGGS_ erere: you dont have to wait for Perl 6
Kristien erere: depends on what you want to do.
FROGGS_ it there... downloadable... rakudo.org
it's*
Kristien If you want to maintain shitloads of existing code bases you should learn Perl 5. 19:30
If you are more interested in Perl 5 you should also learn Perl 5.
erere tnx! well i want to use it for securty stuff!
Kristien Otherwise you should learn Perl 6.
erere i know python
Kristien If it's for security stuff you should wait for a stable release.
erere but its not bad to have perl with it! 19:31
well when we will have a stable release? 19:32
19:32 diana_olhovik___ joined 19:33 brrt joined
flussence m: class Table { has Int $.legs where * > 0; } 19:33
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/epKoFikUe5␤Post-constraints on variables not yet implemented. Sorry. ␤at /tmp/epKoFikUe5:1␤------> 3class Table { has Int $.legs where * > 07⏏5; }␤ expecting any of:␤ constraint␤»
fernand__ why is it running twice? gist.github.com/anonymous/7852b78093311f618625 19:34
flussence did something significant happen to make that line ^ stop working?
19:34 diana_olhovik_ left
masak flussence: says it's NYI. 19:35
flussence yeah... but it wasn't NYI last week. :/ 19:36
vendethiel uhm... yes it was :o)
[Coke] Ovid++
masak pretty sure it was.
19:36 slavik joined
vendethiel "where"s are my bread and butter in perl6, and I remember hitting this one for as long as I remember 19:36
timotimo right. you can declare a subtype outside the class, though 19:37
and put the where clause on that
masak yes.
this NYI might even be LHF :P
FROGGS_ erere: this year 19:38
flussence s/last week/2 weeks ago/, my bad
masak flussence: may I politely suggest that you are mistaken on it working, ever? 19:39
timotimo erere: what kind of security stuff are you talking about? 19:40
masak flussence: this one is from early last year: rt.perl.org/Ticket/Display.html?id=122109 19:41
19:41 kjs_ joined
dalek rl6-roast-data: bdc4d50 | coke++ | / (4 files):
today (automated commit)
19:43
flussence masak: I'm probably mistaken, but on the other hand it didn't cause this code I have to abort and fail all its tests when I committed it earlier this month :)
erere tnx ! I AM talking about expolites and pentesting tools like scanners etc 19:44
flussence ...which means it evidently needs more tests
19:44 smls left 19:48 rurban1 joined, jack_rabbit_ joined 19:49 dalek left 19:51 telex left, pnu left, lumimies left, ggherdov left 19:52 mephinet left, raiph joined, telex joined, lsm01 left, geekosaur left, tardisx left 19:53 hoelzro_ left, yogan_ left, hoelzro joined
ruoso pmurias: nothing about C++ is portable 19:53
moritz well, you can port code from C++ to perl... :-) 19:54
ruoso there's no ABI specification... even within a single OS, different compilers may produce incompatible ABIs
Kristien C++ is great. I should implement a lisp interpreter as a C++ template metaprogram.
ruoso and it actually gets even more extra ridiculous, if you are in SunOS, for instance, using the Sun Studio compiler, you have different options on which runtime library to use 19:55
19:56 dalek joined, ChanServ sets mode: +v dalek, pnu joined, geekosaur joined, lsm01 joined
Kristien lol, C++ compilers other than clang and GCC 19:56
ruoso and if you happen to load two libraries built with different runtimes in the same process, even if they never talk to each other, the process will immediately segfault
19:56 rindolf left
flussence sounds a lot like GCC's new C++ ABI fun... 19:57
19:57 mohij joined
arnsholt Kristien: Off the top of my head there's the Intel C++ compiler 19:57
ruoso oh, no... g++ managed to restrict the incompatibility to direct calls between libraries in the two modes
arnsholt And MSVC++
ruoso the SunStudio situation is much more terrible
flussence oh, nvm then 19:58
ruoso but in infinite time, there will only be clang
the C++ standard is getting closer and closer to being "the clang standard"
19:58 tardisx joined
Kristien arnsholt: MSVC is a joke. It implements not even all of C++14. 19:58
Intel's compiler is something I don't know much about other than that it's insanely good at optimising. 19:59
ruoso I'm somewhat sure clang is pretty much the only compiler close to implementing C++14
19:59 fernando___ left
arnsholt Apparently it's (Intel, that is) got a very good math library as well 19:59
Kristien uh I mean C++11
19:59 ggherdov joined, fernando___ joined
ruoso in any case, going with the g++ ABI is probably the only reasonable approach to this probllem 20:00
moritz arnsholt: ... when run on Intel chips. It intentionally cripples performance on AMD chips 20:01
Kristien nice
moritz cow-orkers had "fun" with that
20:02 mephinet joined, jack_rabbit_ left 20:03 spider-mario left 20:07 nyuszika7h left, Rounin left 20:08 lumimies joined
fernand__ I cant use "require" on "where"? 20:08
gist.github.com/anonymous/65b390fef7ca3e6808c0
20:09 nyuszika7h joined, smls joined 20:11 erere left 20:12 yogan joined 20:13 bjz left
[Coke] looks like the trickiest thing in setting up the daily runs for all the NQP backends is that I don't have "test_summary" for nqp. 20:14
will at least get something running shortly that will run moar, moar-jit, jvm, parrot, and js and capture the "make test" output.
timotimo so it seems like the inlining mechanism is working right in the nqp::rand_n(1e0) <= 0e5 case, but it doesn't seem to get the return type of rand_n? 20:15
not 100% sure about that yet
fernand__ m: sub MAIN (:@requires! where *.grep({!require $^mod}) == 0, :@resources!) {say "OK"} 20:18
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TZt9x9euCc␤Undeclared routine:␤ require used at line 1␤␤»
masak flussence: maybe the NYI error is new.
flussence well if it didn't actually work before, that's an improvement! 20:19
masak flussence: yep -- github.com/rakudo/rakudo/commit/4bab4886 20:20
smls In Perl 5, «defined &foo» could be used to check if a named subroutine is defined, and «undef &foo;» to remove a named subroutine.
How would you do those things in Perl 6?
20:20 mohij left
smls m: say if defined &foo { say 'yep' } 20:21
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Bws6clvjlU␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/Bws6clvjlU:1␤------> 3say 7⏏5if defined &foo { say 'yep' }␤ …»
20:21 zakharyas left
smls m: if defined &foo { say 'yep' } 20:21
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/joFr4C9ulp␤Undeclared routine:␤ &foo used at line 1␤␤»
arnsholt moritz: Oh yeah, I'd forgotten about that 20:23
smls m: sub foo { 42}; say foo; &foo = Nil; say &foo 20:26
camelia rakudo-moar 9fc66c: OUTPUT«42␤Cannot modify an immutable Sub␤ in block <unit> at /tmp/75A6_dxDQR:1␤␤»
20:26 rurban left
Kristien smls: names are resolved at compile-time, but defined is evaluated at runtime 20:26
moritz m: my &foo = Nil; foo() if defined &foo;
camelia ( no output )
moritz m: my &foo = sub { say 42 }; foo() if defined &foo;
camelia rakudo-moar 9fc66c: OUTPUT«42␤»
moritz so yes, defined works 20:27
smls heh
but only if the subtoutine was declared
moritz well
rjbs Is there a Plack6? :) 20:28
moritz you can always do a dynamic lookup too
rjbs Plackdo maybe?
moritz rjbs: github.com/supernovus/perl6-psgi/
rjbs thanks much
smls moritz: how?
In Perl 5, «defined &foo» works on a name that was never declared
moritz m: my $name = 'sqrt'; my &foo = &::($name); say foo(9) if defined \&foo 20:29
camelia rakudo-moar 9fc66c: OUTPUT«3␤»
moritz m: my $name = 'sqrt'; my &foo = &::($name); say foo(9) if defined &foo
camelia rakudo-moar 9fc66c: OUTPUT«3␤»
moritz m: my $name = 'wrong'; my &foo = &::($name); say foo(9) if defined &foo
camelia rakudo-moar 9fc66c: OUTPUT«Type check failed in assignment to '&foo'; expected 'Callable' but got 'Failure'␤ in block <unit> at /tmp/qGr4sVtc9Y:1␤␤»
moritz m: my $name = 'wrong'; my $foo = &::($name); say $foo(9) if defined $foo
camelia ( no output )
moritz m: my $name = 'sqrt'; my $foo = &::($name); say $foo(9) if defined $foo
camelia rakudo-moar 9fc66c: OUTPUT«3␤»
moritz smls: ^^
20:30 diana_olhovik___ left
smls m: say defined &::("foo") 20:30
camelia rakudo-moar 9fc66c: OUTPUT«False␤»
smls say defined &::<foo> # curious
m: say defined &::<foo> # curious
camelia rakudo-moar 9fc66c: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤»
moritz bug. 20:32
m: say defined &::('foo')
camelia rakudo-moar 9fc66c: OUTPUT«False␤»
smls m: say defined GLOBAL::("foo") 20:33
camelia rakudo-moar 9fc66c: OUTPUT«False␤»
masak smls: please submit rakudobug.
smls ok
ruoso So, while building the QAST tree in a Slang... I am managing to generate the regex nodes, but I'm kind of failing to find out how to represent the grammar itself with the named tokens... does anyone have a pointer on code examples or docs that would help?
smls are & and GLOBAL supposed to be the same? 20:34
or is there another named form for &::
fernand__ how can I get a type object from a scala with it's name?
smls also, looks like the fosdem videos have finally been uploaded: video.fosdem.org/2015/ 20:35
masak \o/
smls++
smls hm no
lizmat smls: I only see empty directories ?
smls just a directory structure?
Ovid__ Perl dev room’s emtpy
smls :(
smls--
masak .oO( here's how the videos *would* be structured... ) :P 20:36
Lisp had a devroom? cool.
moritz temp @directories = gather { ... }
vendethiel they're all empty :( 20:38
grondilu FOSDEM's guys surely now how to tease their audience :)
s/now/know/
ruoso .oO( maybe the QAST tree should be a repesentation of the MOP operations with GrammarHOW )
brrt \o 20:39
dalek kudo/cpp: 16f80fe | FROGGS++ | lib/NativeCall.pm:
add typed Pointer role to NativeCall

Pointer defaults to Pointer[void], and is needed to correctly mangle C++ symbols. Pointer[void] mangles down to Pv, Pointer[int16] down to Ps, etc.
brrt grondilu: yeah
i was all excited as well
grondilu it's almost a practical joke, frankly.
brrt anyway, does anybody renember the bug with moarvm copying no large than 2gb?
20:40 darutoko left
smls m: sub foo { 42 }; say defined $_ for $::("foo"), MY::<foo>, OUR::<foo>, CORE::<foo>, OUTER::<foo> 20:40
camelia rakudo-moar 9fc66c: OUTPUT«False␤False␤False␤False␤False␤»
masak brrt: rt.perl.org/Ticket/Display.html?id=123796
smls ^^ which pseudo-package are normal subs supposed to be in?
[Coke] pmurias: ping.
brrt masak++
moritz smls: MY, but with sigil 20:41
smls: either &MY::<foo> or MY::<&foo>
[Coke] how does one "ack -1" in ack2?
er.
how does one "ack -a" in ack2?
moritz [Coke]: it's default
smls m: sub foo { 42 }; say defined $_ for &::("foo"), MY&::<foo>, MY::<&foo> 20:42
camelia rakudo-moar 9fc66c: OUTPUT«True␤True␤True␤»
smls m: sub foo { 42 }; say defined &MY::<foo>
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2TYVENaAKL␤Undeclared routine:␤ &MY used at line 1␤␤»
[Coke] moritz: is it really searching all files, or just all known files? 20:43
moritz m: m: sub foo { 42 }; say defined &MY::('foo')
camelia rakudo-moar 9fc66c: OUTPUT«True␤»
moritz [Coke]: all, except those excluded by default (.git dirs, .svn etc.)
[Coke] moritz: danke. 20:44
moritz [Coke]: bitteschön 20:45
[Coke] failure building nqp-js for daily runs on hack.p6c.org - gist.github.com/coke/631cd667d10360e1741d 20:46
s/building/running tests for/ 20:47
raydiak had another creative seizure yesterday and started Inline::Lua which is going surprisingly smoothly so far...feedback, contributions, etc. welcome :) 20:50
moritz npm WARN This failure might be due to the use of legacy binary "node" 20:51
20:52 kjs_ left
[Coke] there appears to be logic in the config step to look for node. 20:53
er, vs. nodejs
moritz [Coke]: yes, I've added that; but I haven't yet figured out how to make nqp-js actually *use* that information :( 20:54
[Coke] oh.
vendethiel m: say 1.numerator 20:55
camelia rakudo-moar 9fc66c: OUTPUT«No such method 'numerator' for invocant of type 'Int'␤ in block <unit> at /tmp/T4h4ZMP7T3:1␤␤»
ruoso Is there a documentation anywhere of all the dynamic variables during the parsing? e.g.: $*PACKAGE, $*DECLARAND...
[Coke] let's see, nqp-js invokes nqp-m ... don't see anywhere where node is actually invoked. digging 20:56
moritz [Coke]: src/vm/js/HLL/Backend.nqp 20:57
calls nqp::shell("node $tmp_file", ...)
[Coke] ok. I can use the script that runs the daily to force that to nodejs until we can fix it. 20:58
testing...
gotta run. laters.
moritz m: say nqp::pid() 20:59
camelia rakudo-moar 9fc66c: OUTPUT«===SORRY!===␤No registered operation handler for 'pid'␤»
moritz m: say nqp::getpid() 21:00
camelia rakudo-moar 9fc66c: OUTPUT«19798␤»
moritz nqp-m: say('tmp.js' ~ nqp::getpid())
camelia nqp-moarvm: OUTPUT«tmp.js19916␤»
dalek p/js: 1246cf6 | moritz++ | src/vm/js/HLL/Backend.nqp:
Include PID in temporary file name
21:01
21:03 brrt left
fernand__ if I have $a = "Int", how can I get the Int object type from $a? 21:03
moritz fernand__: ::($a)
fernand__ thanks!
smls r: say defined $::<foo>
camelia rakudo-moar 9fc66c: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤»
smls p: say defined $::<foo>
21:04 bjz joined
smls camelia only uses Moar now? 21:04
moritz camelia: yes
and std, and nqp-js, and perlito
masak and prof. 21:05
moritz I never managed to get the rakudo-j evalserver running reliably, and startup is too slow in standalone mode
and parrot is ... resting
21:05 rurban1 left
smls i don't have a parrot/jvm rakudo installed locally either 21:05
wonder what they say instead of the MVMArray error 21:06
skids smls: VMArray: Index out of bounds 21:07
But my rakudo-j is old, and running on openjdk.
smls thanks
21:08 BenGoldberg left
moritz I don't think that code was touched recentl 21:08
y
21:09 dolmen joined, rurban joined 21:16 rurban left
smls m: say defined &MY::<foo> 21:16
camelia rakudo-moar 9fc66c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g6c4wxNwrV␤Undeclared routine:␤ &MY used at line 1␤␤»
raydiak r-j from a few days-weeks ago says ===SORRY!===␤VMArray: Index out of bounds␤
smls moritz: what about this ^^ form, is that supposed to work?
moritz smls: I'm not sure; it would be consistent at least 21:17
smls: maybe grep the design docs?
skids $::<foo>:exists also throws out-of-bounds 21:18
21:18 fernand__ left
dalek kudo/nom: 80a5135 | lizmat++ | src/core/Str.pm:
Make substr() a lot faster, make substr-rw() work

Highlights:
  - substr("foo",1) 2.5x faster
  - substr("foo",1,2) 6x faster
  - substr("foo",*-2) 1.5x faster
  - substr("foo",0,*-2) 1.5x faster
  - substr-rw() now accepts the same range of parameters as substr()
substr() is now a multi, with 4 candidates.
The same was attempted with substr-rw(), but apparently the Proxy overhead drowns out any efficiency gains. And the one sub was fixed some todo tests for substr-rw, so I left it at one and only candidate for substr-rw().
21:19
vendethiel lizmat++ # amazing string manipulation improvements for the Perl 21:20
smls moritz: design.perl6.org/S02.html#Symbol_tables shows only examples with $ not &
masak \o/
smls ack '&MY' in specd dir shows no results 21:21
lizmat expect some more improvements as soon as natives ints land properly
*native
21:24 bjz left
FROGGS_ lizmat++ 21:26
21:27 xfix left, Mouq joined
El_Che I wonder if someone here has tried the perl6 support in padre. I am migrating te code (on a github fork) to use Moose. That made me wonder what the state is of perl6 there 21:27
21:28 dolmen left
dalek kudo/nom: d850a9a | lizmat++ | src/core/ (2 files):
substr(Str:D,...) is faster than Str:D.substr(...)
21:28
moritz smls: S02 has examples like PROCESS::<$IN>
smls: and since we extend the TABLE::<$THING> support to $TABLE::('THING'), it just makes sense to also support $TABLE::<THING> 21:29
vendethiel lizmat: good ol' sub vs method :P 21:31
skids lizmat++ yet another achievment. All I've maaged to do so far today is strike black gold, which in these parts means, "I can see my driveway!" 21:32
smls moritz: S02 does mention $::<foo> just not &::<foo>
21:33 bjz joined
Kristien $* variables can also be in packages I hope? 21:34
hmm 21:35
raydiak wonders how hard it might be to convert the pygments p6 support to a Grammar: bitbucket.org/birkenfeld/pygments-...ult#cl-209
Kristien how are they different from regular variables actually?
FROGGS_ Kristien: they are dynamically scoped
Kristien since you still have to use temp keyword
21:35 bjz left
FROGGS_ so they are visible along the callchain 21:35
temp? 21:36
Kristien m: my $*x = 1; sub g { temp $*x = 1; say $*x; }; sub f { temp $*x = 2; g(); say $*x }; f() 21:37
camelia rakudo-moar 9fc66c: OUTPUT«1␤2␤»
Kristien this isn't any different when writing $x instead of $*x
or is the only difference that it's accessible through CALLER?
FROGGS_ m: sub foo { say $*FOO; bar }; sub bar { say $*FOO }; { my $*FOO = 42; foo }; bar 21:38
camelia rakudo-moar 9fc66c: OUTPUT«42␤42␤Dynamic variable $*FOO not found␤ in method gist at src/gen/m-CORE.setting:14920␤ in sub say at src/gen/m-CORE.setting:17683␤ in sub bar at /tmp/V2A1XredxS:1␤ in block <unit> at /tmp/V2A1XredxS:1␤␤»
FROGGS_ see?
m: sub foo { bar }; sub bar { say "bar " ~ $*FOO.defined }; { my $*FOO = 42; foo }; bar 21:39
camelia rakudo-moar 9fc66c: OUTPUT«bar True␤bar False␤»
Kristien oh
so they're not namespaced :(
thought they were more like ^:dynamic in Clojure
or DynamicVariable in Scala
FROGGS_ I dunno what that means actually 21:40
moritz the * is for dynamic variables, yes
use ordinary lexicals if you don't want that :-)
Kristien I was hoping for lexically scoped variables that require you to use temp for setting them. 21:41
I don't see how dynamically scoped variables can possibly be useful if they all share the same namespace.
FROGGS_ they are used to propagate information along the callchain, nothing else 21:42
which does not happen to lexicals
Kristien When would that be useful?
FROGGS_ look at Perl6's grammar :o) 21:43
vendethiel also, look at say and stuff :-)
if you need your application code to output to somewhere else instead of STDOUT, just $*OUT =... (or temp it) and yeehee
FROGGS_ like the statementlist rule sets up $*BLOCK, and every declaration rule that is called via different (in)direct ways can push to $*BLOCK 21:44
Kristien Just saying that it's a nightmare if you use two libraries that happen to set dynamic variables with the same name.
FROGGS_ Kristien: they probably do not call into each other
but yes, dynamic variable kinda pollute your call chain 21:45
variables*
moritz and there's a reason we use lexicals for nearly everything
Kristien I'll avoid them and use temp instead. :)
vendethiel (also, scala's DynamicVariable is a completly broken hack, much like what was introduced at that time, like for lazyness or Application etc)
masak Kristien: there's nothing to prevent you from using a poor man's namespace: variable prefixes. 21:46
Kristien and threadlocal
skids m: package foo { our sub foo {$*bar::f.say} }; my $bar::f = 42; foo::foo; # not sure what that should do, actually.
camelia rakudo-moar d850a9: OUTPUT«Dynamic variable $*f not found␤ in method gist at src/gen/m-CORE.setting:14967␤ in sub say at src/gen/m-CORE.setting:17730␤ in method say at src/gen/m-CORE.setting:1162␤ in sub foo at /tmp/yz88biCyu3:1␤ in block <unit> at /tmp/yz88biCyu3:1…»
masak Kristien: at least then, you'll be protected from everybody else's dynamicals.
Kristien vendethiel: what is broken about it?
vendethiel Kristien: initialization order bugs all over the place, iirc
would need to find the si-ticket
Kristien their implementation is under 20 LOC though 21:49
21:49 mohij joined
moritz "it's easy to get the wrong answer in 20 LOC" :-) 21:51
Kristien and it looks totally fine
the gist of it is a thread-local variable and { val old = current; current = new; try thunk finally current = old }
dalek ast: 5dd29d5 | lizmat++ | S32-str/substr-rw.t:
Unfudge now passing substr-rw() tests
21:52
vendethiel I'm trying to look for a ticket, but there are so many scala bugs reported it's unreal
pmurias [Coke]: pong 21:55
Kristien Coke pong? Beer pong! 21:56
22:00 fernand__ joined
moritz silly pong! 22:10
22:18 laouji joined 22:22 laouji left
dalek kudo/cpp: cb9b608 | FROGGS++ | / (3 files):
allow typed pointers in attrs and as return type

So we can do: `class Foo { has Pointer[long] $.bar }; my $long = $foo.bar.deref`;
22:30
kudo/cpp: fc0b8ec | FROGGS++ | lib/NativeCall.pm:
fix typed pointers when mangling names for C++
22:35
22:36 BenGoldberg joined 22:37 FROGGS_ is now known as FROGGS
Kristien I should implement pong in AWK. 22:41
22:47 MilkmanDan left 22:48 MilkmanDan joined, MilkmanDan left, MilkmanDan joined 22:49 MilkmanDan left 22:50 MilkmanDan joined, Vlavv_ left 22:51 FROGGS left, MilkmanDan left
jnthn evening, #perl6 22:54
masak jnthn! \o/
raydiak \o jnthn 22:55
pmurias jnthn: hi
22:57 bolangi joined 23:03 Vlavv_ joined
timotimo ~hi jnthn 23:04
:)
so many nqp::sayfh(nqp::getstderr(), ...) calls in rakudo now %) 23:07
ruoso jnthn: hi... if you have some time, I think I need some help... I'm trying to implement a Slang for EBNF grammars, and tho I got a lot of progress, I am kind of stuck in figuring out the QAST tree that I'm supposed to return in order to make rakudo compile it as a grammar... the code I have so far is at github.com/ruoso/Grammar-EBNF , the test with my immediate target is github.com/ruoso/Grammar-EBNF/blob...04_slang.t 23:08
jnthn timotimo: Oh? 23:09
ruoso: QAST is about execution, not declaration. Declarations are done by the compiler constructing meta-objects
timotimo jnthn: i'm hunting down why in nqp::rand_n(1e0) <= 0.5e0 the infix:«<=» isn't being compile-time-inlined 23:10
turns out the optimizer doesn't understand that rand_n returns a num
ruoso jnthn: oh, so I should just build closures and use the MOP directly in that case?
jnthn ruoso: That'd be one way to go, for sure
timotimo and calling .returns(num) on the node doesn't help right away because the next step is the optimizer checking nqp::istype($the_thing_that_is_num, $!symbols.Mu)
which i believe doesn't hold ... right?
jnthn ruoso: Rakudo and NQP do a relatively intricate dance wiring up QAST and meta-objects 23:11
ruoso: In no small part 'cus it has to support BEGIN time.
And everything that happens at BEGIN time.
timotimo: nqp::istype(num, Mu) should come out true
timotimo OK
jnthn timotimo: Oh, but you're setting NQP's num on it there...
timotimo so i'll spread out more debug outputs 23:12
yes, that's right
jnthn timotimo: Should probably be $!symbols.num
timotimo OK
jnthn Which may not exist yet
So yeah, that may be the issue you're seeing.
timotimo thanks, i hadn't thought of using $!symbols to get a proper num 23:13
ruoso jnthn: that clarifies a lot... is there any special incantation for programatically creating a grammar and registering tokens within that grammar? Can I use the regex object as a code ref? Or is there a specific protocol for the code in tokens/rules? 23:14
jnthn ruoso: GrammarHOW really is just a subclass of ClassHOW that overrides the choice of default parent class
ruoso: And we .^add_method the Regex code objects 23:15
Regex code objects have an NFA on them.
ruoso cool...
jnthn Which is used to do all the fancy stuff
ruoso back to coding
23:21 wicope left
timotimo hum 23:25
annotating ops ending in _n with "returns num" gets me an "unable to call accepts" when optimizing stuff, because it ends up reporting an inevitable bind failure in ACCEPTS 23:26
23:28 mohij left
timotimo the backtrace is ... peculiar 23:28
gist.github.com/timo/40d630e20e0de3e72e70 - anything obvious stick out to your eye, jnthn? 23:29
ruoso jnthn: oh, one other bit, how do I bind the grammar I created into a package name that I have the string for? 23:31
jnthn ruoso: Hm, not entirely sure I grok what you're after...I typically do type generation-y stuff by populating EXPORT::DEFAULT with the stuff and then having it imported... 23:32
jnthn.net/papers/2015-fosdem-static-dynamic.pdf slide 52 onwards may help 23:33
ruoso my slang looks like: "ebnf-grammar Foo::Bar { ... }" 23:34
jnthn timotimo: Not right off, I'm agraid...
ruoso at the end of this, I expect Foo::Bar to be a GrammarHOW
jnthn *afraid
timotimo jnthn: i should be able to get the line number of the op i'm working on by looking at its .node property and using HLL::Compiler.lineof on it? 23:35
jnthn ruoso: Oh... If you're doing it through the EXPORTHOW mechanism and having it fall out of the normal package_def rule to some degree then that should be taking care of it
ruoso: See my OO::Monitors module for how I get monitor Foo::Bar { ... } doing the right thing.
[Coke] pmurias: did you see my gist? trying to add nqpjs to the daily runs.
(along with all the other nqps)
jnthn timotimo: Not sure...we don't .node every single thing. 23:36
23:36 mj41 left
ruoso jnthn: oh, ok, I suspected that not using pacakge_def was incorrect.... will look at your code 23:36
timotimo mhhh
ruoso jnthn: my search-fu is failing, do you have a more concrete link? 23:37
pmurias [Coke]: I'm looking
jnthn ruoso: It's in the module ecosystem 23:38
ruoso: github.com/jnthn/oo-monitors/blob/...onitors.pm is the file you want
pmurias [Coke]: it seems you need to install node
[Coke]: instead of nodejs
fernand__ Im sorry keep asking dumb questions... but: how can I know if a given obj type is a role? 23:39
ruoso jnthn: thanks...
fernand__: $obj ~~ role;
timotimo jnthn: i've tried a dumb hack and annotate _n ops with ".returns(...Num)" instead; that doesn't cause the error but it also doesn't make nqp::rand_n(1e0) <= 0.5e0 inline the <=
[Coke] ah. based on the error message, I thought it was just a different name. 23:40
timotimo whereas having my num $foo; $foo <= 0.5e0 will inline it properly
fernand__ thaks, I tried $obj ~~ Role...
pmurias [Coke]: it's debian renaming node.js 23:41
fernand__ *thanks
pmurias [Coke]: things out of my control don't tolerate that
ruoso jnthn: right, so now that reminds me of why I was not using package_def... I couldn't find how to hook a different syntax for package_def
jnthn fernand__: Wait, did you mean check if an object does a role, or given a type object check if it corresponds to a role? 23:42
fernand__ 2nd alternative
pmurias I think I should just detect nodejs and tell people to install a proper node 23:43
jnthn fernand__: Hm, there's more than one answer depending on what exactly you care about 23:44
m: say Numeric.HOW.archetypes.composable; 23:45
camelia rakudo-moar d850a9: OUTPUT«1␤»
jnthn m: say Int.HOW.archetypes.composable;
camelia rakudo-moar d850a9: OUTPUT«No such method 'gist' for invocant of type 'NQPMu'␤ in sub say at src/gen/m-CORE.setting:17734␤ in block <unit> at /tmp/vbrdUbGAeL:1␤␤»
jnthn m: say so Int.HOW.archetypes.composable;
camelia rakudo-moar d850a9: OUTPUT«No such method 'Bool' for invocant of type 'NQPMu'␤ in sub prefix:<so> at src/gen/m-CORE.setting:4879␤ in block <unit> at /tmp/Oz165C3oX4:1␤␤»
jnthn Heh
Well, can always 23:46
m: for Int, Numeric -> $t { say so try $t.HOW.archetypes.composable }
camelia rakudo-moar d850a9: OUTPUT«No such method 'Bool' for invocant of type 'NQPMu'␤ in sub prefix:<so> at src/gen/m-CORE.setting:4879␤ in block <unit> at /tmp/XodKsm42r9:1␤␤»
fernand__ jnthn: I am looping throw a class attributes and want to know if the $attr.type is a role
jnthn gah
fernand__: Oh...but...
Oh, that type... 23:47
Anyway, what I should is one way.
*showed
.HOW.archetypes.composable returns a true value if you've got a role
fernand__ jnthn: like this: gist.github.com/anonymous/fc9b1965a61f5aa51725 23:48
dalek p/js: 7c23582 | (Pawel Murias)++ | Configure.pl:
Detect lack of node.js or node.js incorrectly installed as nodejs.
jnthn You can't say ~~ role
pmurias moritz, [Coke]: Configure.pl will now detect nodejs and tell users they have to install node
jnthn That's probably a syntax error 23:49
Try if $atrr.type.HOW.archetypes.composable
Given you're then feeding it to "does", that's probably the right check.
pmurias [Coke]: You might want to try: github.com/joyent/node/wiki/instal...ge-manager 23:50
[Coke] ok. I cheated and linked /usr/bin/node to /usr/bin/nodejs - but we should probably be able to figure that out and invoke node or nodejs correctly. 23:51
fernand__ jnthn: working code: gist.github.com/anonymous/029a0d26422198e7947e 23:52
pmurias [Coke]: no
[Coke]: the problem is that modules don't install correctly on nodejs 23:53
jnthn fernand__: Yes, that's "check if an object does a particular role"
masak 'night, #perl6 23:54
oh, before I leave, three questions:
jnthn Yes. Green. Clouds. 23:55
.oO( If that answers them, I'll be amazed :P )
masak 1. are we writing our Perl 6 grammars (including STD.pm6) in a less extensible way than we could? (extensible wrt macros and slangs)
2. if "no" to question 1, what is it about grammars (and actions) that make them inherently non-extensible? is there some sense in which the "grammars are like classes and extension is like inheritance" doesn't quite get us where we want in terms of extensibility? 23:56
3. is there a better set of tools we could provide instead of grammars and actions that would be more extensible?
really 'night
jnthn 'night, masak 23:57
pmurias are classes that aren't written with extensibility in mind really that extensible?
23:58 Kristien left