»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:16 orafu joined, MayDaniel left 00:19 tokuhiro_ joined 00:54 cognominal left 00:56 atrodo left 01:29 ifim left 01:31 whiteknight joined, wamba left 01:35 erkan left 01:36 fgomez left 01:37 cogno joined 01:39 dayangkun joined, dayangkun left, whiteknight left 01:43 fgomez joined 01:47 bowtie left 01:50 cogno left 01:58 PacoAir left 02:46 ifim joined 03:05 cognominal joined 03:20 hash_table left 03:22 zjmarlow joined 03:34 tokuhiro_ left 03:42 am0c joined 03:51 Chillance left 03:53 orafu left, orafu joined 04:00 cognominal left
dalek ast: 6e11e2d | coke++ | S (4 files):
niecza fudging
04:10
japhb Is it already known that Rakudo's q:to properly handles indented end marker, but qq:to appears not to? 04:17
04:23 fgomez left 04:28 raiph joined
raiph seen on news.ycombinator.com: "I'm surprised there isn't a Perl6 version of Mail::RFC822. This is exactly the kind of thing that Perl6 rules[1] are supposed to excel at. It would be good publicity, especially now that rakudo has usable releases." 04:30
aloha on news.ycombinator.com: "I'm surprised there isn't a Perl6 version of Mail::RFC822. This is exactly the kind of thing that Perl6 rules[1] are supposed to excel at. It would be good publicity, especially now that rakudo has usable releases." was last seen in 15661 days 4 hours ago .
raiph oops. anyhoo: news.ycombinator.com/item?id=4793763 04:31
04:31 fgomez joined
sorear japhb: I didn't know it 04:34
dalek ast: d1b9ba1 | coke++ | S02-lexical-conventions/comments.t:
rakudo unfudge
04:37
04:37 fgomez left 04:39 tff joined
japhb sorear, thank you. 04:44
sorear japhb: eh, I'm not one of the people who's supposed to know everything about rakudo... 04:45
04:45 fgomez joined
japhb sorear, yes, but you tend to pay attention. 04:46
sorear hehehehe
dalek rl6-bench: ab1e3c4 | (Geoffrey Broadwell)++ | bench:
Remove superstitious parens and fix incorrect fallback operator
04:49
rl6-bench: 592b569 | (Geoffrey Broadwell)++ | bench:
Convert a couple multi-line say blocks to (mostly) proper heredocs. Remaining issue is having to work around a Rakudo bug with qq:to with an indented end marker.
rl6-bench: fd15bb8 | (Geoffrey Broadwell)++ | bench:
Damn syntax highlighting fail
04:50
04:52 fgomez left 04:54 fgomez joined 05:26 xinming_ joined 05:29 xinming left 05:32 araujo left 05:33 zjmarlow left, am0c left 05:38 am0c joined 05:43 Kharec joined 05:50 ifim left 05:52 SamuraiJack joined 06:02 erkan joined 06:15 SamuraiJack left 06:19 skids joined
TimToady jnthn: HIGHEXPECT has nothing to do with LTM; it's only for trying to give an indication of which parse rules (sometimes in the guise of DBA) were being tried at the highwater mark 06:21
it's only for error messages
diakopter 'doh; I knew that; shoulda mentioned it 06:25
moritz has internets at home, at last 06:26
06:26 Kharec left
diakopter \o/ 06:27
sorear o/ moritz 06:28
moritz and let me say, t-online is a bunch of incompetent people
06:33 sisar joined
TimToady looks like fiber is finally available here, so I guess we'll have to look at it 06:36
06:38 skids left
moritz we have fiber, but not the last 50m 06:39
TimToady well, we have petabits of fiber capacity within a few blocks of us, but it's all going to Internet companies... 06:43
dalek ast: 0af5065 | moritz++ | S03-operators/andthen.t:
tests for infix andthen
ast: c61ef73 | moritz++ | / (44 files):
Merge branch 'master' of git://github.com/perl6/roast
TimToady Excite and Lycos started out about two blocks from here... 06:44
moritz two names I haven't heard in a while :-) 06:46
TimToady at the moment they're replacing some of the gas pipeline that they decided they didn't want to blow up, and a probably working around most of the bandwidth to the Google campus :)
a bit of the same pipeline that did blow up a while back up in San Bruno; it runs about 200 meters north of our house 06:47
moritz good they decided it shouldn't blow up again :-)
TimToady they said they were testing our pipeline, and they never said it failed the test, but I notice they're replacing the pipe :)
moritz I notice such things a lot 06:48
TimToady so anyway, if Google drops off the map suddenly, either we got nuked, or a backhoe tore up the fiber
moritz toothpaste has "clinically tested" on it, but they don't say if the tests passed 06:49
sorear or what they're testing for 06:50
TimToady most of the water supply to San Francisco flows a few hundred meters south of us as well
I guess that's what we get for living at a corner of the bay 06:51
sorear the bay has corners? 06:52
TimToady kinda
moritz if you squint hard enough :-) 06:54
06:54 azawawi joined
azawawi hi 06:54
what's a good namespace for Perl 6 modules for supporting native libs e.g. libreadline, ncurses, etc... 06:55
Woodi as we speec about CA - I think it is common knowledge moust western part of it will someday goes underwater (with help of earthquake)... many peoples live on that peninsula ? or maybe Google is located right there ? 06:59
morning :)
azawawi Woodi: good morning... 07:00
sorear Woodi: that's a common joke, but I think it's common knowledge that it has no basis in reality 07:01
Woodi azawawi: libreadline probably is "internal" for rakudo. ncurses need tests
sorear it's possible most CA residents are stupider than I give them credit for, though 07:02
Woodi sorear: but Discovery...
sorear isn't that the channel that has specials on bigfoot?
Woodi but I'm glad being stupid and outjoked on that subject
azawawi sorear: so how about Net::Curl? is a good name for a nativecall module?
sorear azawawi: sure 07:03
azawawi sorear: im just thinking about namespace and how to organize them better... e.g. Net:: vs WWW::
sorear WWW::Curl might be better, since it's a web/urls thing
copy whatever perl 5 does
there's certainly no reason to mark Native in the name 07:04
azawawi sorear: thanks... i chose net::curl for now... shorter :) 07:18
github.com/azawawi/perl6-net-curl
sorear wonders if he overreacted 07:20
07:41 raiph left
dalek osystem: 7db8b50 | (Ahmad M. Zawawi)++ | META.list:
Added Net::Curl - Use libcurl (client-side URL transfer library) API in Perl 6
07:47
08:09 araujo joined, araujo left, araujo joined 08:19 azawawi left
Woodi as we speak about CA... :) there is Boudin bakery in San Francisco - is their bread good ? 08:43
diakopter never tried it 08:58
09:03 cibs left 09:04 cibs joined 09:07 tokuhiro_ joined 09:10 domidumont joined 09:18 cosimo left 09:23 GlitchMr joined 09:25 cosimo joined 09:32 domidumont left 09:33 domidumont joined 09:41 MayDaniel joined 09:49 tokuhiro_ left
xenoterracide r: 10 +- 3 09:50
p6eval rakudo 8959c8: ( no output )
xenoterracide interesting
outputs 7 here
jnthn You need a "say" to output. 09:51
xenoterracide oh right, outputs 7 because REPL
xenoterracide headesk
R; say 10 +- 3
err
r: say 10 +- 3
p6eval rakudo 8959c8: OUTPUT«7␤»
jnthn japhb: The issue with qq heredocs only happens (or at least is related to the case) where the last thing in the heredoc is some kind of interpolation
xenoterracide so if +- is not a real operator... why does that not throw an exception? 09:52
jnthn It parses as 10 + -3 09:53
xenoterracide oh
fun that 09:54
odd but fun
jnthn std: say 10 +- 3
p6eval std 04216b1: OUTPUT«ok 00:00 42m␤»
jnthn Consistent with how STD treats it, fwiw
diakopter jnthn: TimToady replied to your question in the backlog 09:55
jnthn diakopter: Yes, I noticed. :) 09:56
TimToady: OK, then I think I'm misunderstanding CursorBase.pmc:639. What's it actually about? :) 09:58
sorear jnthn: fwiw, niecza does not currently do any kind of ltm highwater handling 10:00
jnthn OK. 10:05
10:06 perigrin left 10:07 perigrin joined
xenoterracide why are there so many DBI like modules 10:12
sorear Because nobody thought the existing ones were good enough?
xenoterracide honestly thinks that DBI, Digest, HTTP, etc need to be core libs in perl 6 10:13
10:13 perigrin left
xenoterracide but since the language is being worked on 10:13
sorear DBI and HTTP are core libs in p5 :p 10:14
xenoterracide no they aren't? or was that intended to be ironic or something?
well I guess HTTP::Tiny finally made core 10:15
10:16 PacoAir joined
sorear huh, I thought DBI and LWP *were* core modules 10:17
xenoterracide no
sorear but Module::Corelist disagrees
xenoterracide ?
sorear otoh, Digest is core (since 5.7.3) 10:18
xenoterracide orelist DBI slave-iv
Data for 2012-11-10
DBI was not in CORE (or so I think)
sorear that's what I mean, corelist disagrees with my memory
xenoterracide oh
10:18 perigrin joined
xenoterracide no they are just the most common modules ever 10:18
and about every thing that ships perl ships those
which is why they /should/ be core 10:19
10:20 PacoAir left
sorear well, I absolutely agree that Rakudo Star and whatever the Niecza distribution winds up being called should come with DBI, Digest, etc 10:22
BinGOs and a pony 10:23
xenoterracide ponies++
sorear a lot of #perl6 people use "core module" to mean preloaded in the initial namespace, like "Duration" is
and if that was what you meant I would have opposed it :p
xenoterracide but I think Perl6 is a pony
sorear anyways, sleep&
xenoterracide nah
not what I meant
sorear tomorrow: reinvent niecza bootstrap 10:24
10:24 am0c left
xenoterracide if only it were cross platform 10:24
xenoterracide wonders if in addition to panda like things if travis-ci could be convinced into offering rakudo... 10:27
then benefits similar to cpantesters
10:39 GlitchMr left
xenoterracide is there anything like EUMM/MB now? is ufo the suggested way? 10:41
10:46 PacoAir joined 10:50 PacoAir left 10:53 birdwindupbird joined 10:54 cibs left
jnthn xenoterracide: I think ufo is meant as a tool for module developers, and Panda itself takes care of the building when doing installation. 10:56
xenoterracide hmm 10:58
xenoterracide gets the feeling I'm going to be missing dzil 11:00
11:17 PacoAir joined
dalek p: ec4648d | jnthn++ | src/HLL/Grammar.pm:
Give EXPR a "don't do an infix" argument.

STD's EXPR hard-codes a check against the precedence level, which we shouldn't do here as EXPR is meant to be generic.
11:17
kudo/nom: 8735fe2 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for EXPR improvements.
kudo/nom: 014fbfd | jnthn++ | src/Perl6/Grammar.pm:
Skip infixes when parsing with methodcall preclim.

STD does the same. This fixes the issue with qq heredocs that ended with interpolation.
kudo/nom: 8c8ae45 | jnthn++ | src/Perl6/Actions.pm:
Remove a now-unrequired hack.
11:18 gaussblurinc_ joined
dalek kudo/nom: 018259a | jnthn++ | t/spectest.data:
Revert "This test file doesn't exist."

This reverts commit 2c6a5215c0c5240d26ee0f3197e8dbaa562432c7.
11:19
11:21 PacoAir left
dalek ast: 39457d1 | jnthn++ | S02-literals/quoting.t:
Test to cover interpolation/indentation bug.
11:24
ast: ac9351a | jnthn++ | S12-methods/private.t:
throws_like needs Test::Util loaded.
11:26
jnthn phenny: tell japhb Interpolation at end of heredoc and indentation interaction bug now fixed. 11:28
phenny jnthn: I'll pass that on when japhb is around.
11:31 kaare_ joined 11:32 GlitchMr joined
xenoterracide is there a prove command? 11:36
jnthn just uses the normal prove
GlitchMr xenoterracide: just use prove 11:38
xenoterracide how do you make it recognize perl6?
GlitchMr prove -e perl6
It's as simple as that
xenoterracide ah
11:38 spider-mario joined, spider-mario left
GlitchMr Also, a small warning. -l option won't work as it modifies PERLLIB variable (Perl 6 uses PERL6LIB), but it's simple fix 11:39
env PERL6LIB=lib prove -e perl6
(or perhaps prove modifies PERL5LIB, not sure, but does it really matter?) 11:40
xenoterracide suspects alias prove6="env PERL6LIB=lib prove -e perl6" might be a good route 11:42
tadzik I started work on perl6-prove some time ago 11:43
it worked last time I tried :)
github.com/tadzik/Test-Harness
GlitchMr xenoterracide: Most likely yes 11:45
I have prove6 script too
glitchmr@strawberry ~/util> cat prove6 11:46
#!/bin/sh
env PERL6LIB=lib prove -e perl6 -r t/
But well, alias will work too
xenoterracide tadzik: you might want to check it
.perl6/2012.10/bin/p6prove: line 1: use: command not found 11:47
tadzik uh
oh
it could use a shebang :)
I'll fix it after errands&, thanks :)
GlitchMr #!/usr/bin/env perl6
Generic Perl 6 shebang
tadzik yeah
GlitchMr github.com/github/linguist/pull/275 11:48
I wonder when they will add AWK to GitHub language list ;-)
xenoterracide use v6; is required if not using module/class right? 11:49
GlitchMr It's required if it doesn't have shebang or isn't module or class.
But I should check spec 11:50
11:50 spider-mario joined
xenoterracide although the #! would invoke the correct interpreter if you let the shell do its thing... it would still be broken if you told perl to run the file correctly... (I think not being all that familiar yet) 11:51
GlitchMr It looks like it has to start with 'class' or 'module' or 'grammar' or shebang contains perl6, rakudo or niecza. 11:52
xenoterracide ah
GlitchMr But current implementation aren't implementing it yet
Or it has to contain 'use v6'
Or simply 'v6' which means 'no strict'
xenoterracide tadzik: privatepaste.com/dc543f0dca possible other problems too :/ 11:55
tadzik: I should probably mention the test fails if I use the p5 prove
GlitchMr Looks like something is wrong with p6prove
For now, using prove included with Perl 5 is better option
xenoterracide yeah, just figured I'd mention it 11:56
now to figure out why my code is fail
GlitchMr github.com/tadzik/Test-Harness/issues/1 11:57
xenoterracide GlitchMr: +1, I was being lazy
GlitchMr On this channel, the standard way of saying +1 is GlitchMr++, but whatever 11:58
12:05 nebuchadnezzar left
tipdbmp What was the 'where { <something } syntax' called, "restriction" maybe? 12:06
Filter?
12:08 gaussblurinc_ left, wamba joined
jnthn constraint 12:11
tipdbmp Right. 12:15
xenoterracide privatepaste.com/d0bfa458d7 what should I be doing here? as this obviously isn't doing what I think it should
12:18 rindolf joined 12:19 nebuchadnezzar joined 12:21 Kharec joined 12:24 PacoAir joined 12:25 zjmarlow joined
jnthn xenoterracide: Not relying on require to return the loaded module. Workaround: return ( require $module; ::($module) ).new; 12:25
12:31 azawawi joined
azawawi hi 12:32
jnthn: ping
jnthn azawawi: pong 12:34
azawawi jnthn: i have been playing with NativeCall with libcurl... thanks for writing it... so far things are great
jnthn: but how do i pass a buffer pointer?... :) 12:35
jnthn arnsholt++ did plenty of the writing too... :)
azawawi jnthn++ arnsholt++
12:35 Psyche^ joined, sorenso joined
jnthn azawawi: Currently there's no way to pass Buf, so the only reasonable option is to pass a CArray 12:35
12:36 Patterner left, Psyche^ is now known as Patterner
azawawi jnthn: so if we have something like fread: fread(void *ptr, size_t size, size_t nmemb, FILE *stream) 12:42
jnthn: we write it as fread(CArray[Str], int, int, OpaquePointer) , right?
star: use NativeCall;
p6eval star 2012.10: ( no output )
Woodi azawawi: fread(OpaquePointer, int, int, OpaquePointer) me thinks 12:44
jnthn azawawi: ah, you're trying to get the data read into the buffer? 12:45
azawawi Woodi: we need to read into a buffer to use it
Woodi I use CArray[OpaquePointer] for struct smth **s things
azawawi jnthn: yup
jnthn: that's a common thing to have in C :)
jnthn CArray[Str] won't do it because it'll expect it to work like char **strings
azawawi: Yes, that doesn't mean NativeCall supports it well yet :) 12:46
azawawi so what's the alternative or did i just hit a wall ? :)
jnthn Kinda. The current best workaround is to pass a CArray[int] sized to how much data you expect.
12:46 rindolf left 12:47 rindolf joined
azawawi and then convert the str from the CArray[int] 12:47
jnthn And that will get populated by the call.
Yeah
Buf can be useful there.
CArray -> Buf -> decode the Buf into a Str using its decode method 12:48
azawawi jnthn: thx...
i'll test it now
jnthn The upgrade path for these scenarios will probably be that you pass a Buf there, so once NativeCall supports that you can just get rid of the hack, and leave the decode to Str bit.
12:48 nebuchadnezzar left 12:49 SamuraiJack joined
azawawi azawawi@ubuntu:~/perl6-net-curl$ examples/getinfo.p6 We received Content-Type: CArray+{IntTypedCArray}<1088505524> 12:50
We received Content-Type: CArray+{IntTypedCArray}<1088505524> :) 12:51
moritz yes, CArrays don't have the nice stringifications etc. of Array
it's a very low-level type
azawawi C is low-level :)
tadzik xenoterracide, GlitchMr: thanks looking at it now
12:51 rindolf left
jnthn moritz: You haz internets! :D 12:52
moritz jnthn: yes, \o/
jnthn: any rakudo LHFs waiting for me? :-)
jnthn moritz: Sink context? :)
moritz oh, and seems we have a few spectest failures
jnthn Yes, a load of tests have been added, and a couple of things are a little off... 12:53
I fixed some of it.
tadzik yeah, apparently Test::Harness can't Harness itself :)
moritz jnthn: I guess I could start again looking at sink context, aye; this time I'd start with a QAST dumper :-)
jnthn moritz: On sink context, it may actually be *much* more LHF-y
azawawi jnthn: one interesting thing that we dont check if the signature is CArray[Str] and you pass a CArray[int]... 12:54
jnthn Because QAST::Want supports 'v' properly, and actually traces it properly down into nested statement nodes.
azawawi: Yeah. I actually can fix that one relatively easily these days. At the time it was gonna be a real pain... 12:55
12:55 Kharec left
azawawi github.com/azawawi/perl6-net-curl/...c3ece07c12 12:55
12:57 rindolf joined
tadzik Test::Harness fixed 12:58
12:59 SamuraiJack left 13:01 rindolf left
GlitchMr tadzik: github.com/tadzik/Test-Harness/com...7d03582a33 13:06
Shouldn't it use == or something? 13:07
13:07 sorenso left
azawawi jnthn: still not there... i get in ct[0] (Content-type) an integer... maybe the address 13:09
13:09 wamba left
GlitchMr I will make pull request, ok? 13:09
jnthn azawawi: The integer should be part of what was placed there 13:11
GlitchMr tadzik: github.com/tadzik/Test-Harness/pull/2 13:12
jnthn azawawi: Maybe I wasn't clear enough: you're getting the C code to put the thing into what you're looking at as a int[], so there's a little work to split it up into pieces.
azawawi jnthn: true but only ct[0] is filled... the rest is the same :) 13:14
jnthn oh! 13:16
< jnthn> Kinda. The current best workaround is to pass a CArray[int]
sized to how much data you expect.
The "sized to how much data you expect" is important :)
azawawi github.com/azawawi/perl6-net-curl/...getinfo.p6
jnthn Otherwise you're passing an array wiht pretty much no allocate storage off to C, and thus it will just scribble over whatever. 13:17
yes, like that
And only the first thing has any data? 13:18
azawawi output is paste.debian.net/210112/
let me show you the getinfo.c example
jnthn r: say 186842936.base(16) 13:19
p6eval rakudo 018259: OUTPUT«B22FF38␤»
jnthn Hm, that does look more pointer-ish than data-ish...
azawawi github.com/azawawi/perl6-net-curl/.../getinfo.c
yeah i know
line 39+ 13:20
jnthn oh
char *ct;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
That's one more level of indirection that I'd understood!
OK, then we have an easier problem...
moritz CArray[Str].new 13:21
jnthn Pass a CArray[str] sized to 1 element, and then read it.
I thought it was a case of a char *ct = malloc(buffer_size); and then passing ct straight off...
Sorry.
13:21 MayDaniel left
jnthn (Because of the fread example) 13:21
moritz jnthn: in QAST::Block, are the elements in @!array always QAST::Node objects? 13:22
erm 13:23
QAST::Node, and subclasses thereof
nqp: say( nqp::x('a', 5))
p6eval nqp: OUTPUT«aaaaa␤»
13:24 domidumont left, sizz joined
moritz nqp: sub f($x := 1) { say($x) }; f(2); f() 13:24
p6eval nqp: OUTPUT«Routine declaration requires a signature at line 2, near "($x := 1) "␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
azawawi moritz++ jnthn # thx... it worked
13:24 sizz_ left
azawawi jnthn: might be useful to include these pointer cases in NativeCall's README.md :) 13:25
moritz nqp: say( nqp::x('a', 0)) 13:26
p6eval nqp: OUTPUT«␤»
jnthn azawawi: yay...
azawawi: Yes, it's a common enough pattern... If you fancy writing that up feel free to just add to the README; otherwise a ticket to remind somebody else to is also very fine :) 13:27
azawawi jnthn: i'll write it and send you a pull request :) 13:28
jnthn \o/
azawawi++
azawawi any ncurses NativeCall module here or there? 13:29
moritz what's a convenient way to concatenate two array in nqp?
something with nqp::splice maybe?
jnthn Probably splice is fastest 13:30
13:31 zjmarlow left
jnthn bbi10 13:31
azawawi moritz: Have you come across any NCurses NativeCall p6 module? 13:36
moritz azawawi: no. I did a prove of a concept once that cleared the screen, printed something and then exited
azawawi: but nothing more
azawawi moritz: github.com/azawawi/farabi6/blob/ma..._curses.p6 :) 13:37
moritz :-) 13:38
azawawi NativeCall modules are cool but the dependency on the location and name of some-library.so is flakky 13:39
azawawi begins writing p6-ncurses :) 13:40
13:41 wamba joined 13:42 zjmarlow joined
dalek ast: a6be9c5 | moritz++ | S32-exceptions/misc.t:
avoid a redeclaration error that shadows the error we actually want to trigger
13:42
kudo/nom: 112307b | moritz++ | src/Perl6/World.pm:
simplify setting line number of compile-time exceptions

Also try to compose X::Comp into exceptions thrown at compile time
azawawi moritz: We need to make a github v3 API module. That's why i created Net::Curl (i.e. https github urls) and we may need that also to rewrite ecosystem in Perl 6 13:43
moritz as long as I'm not the one who has to fix it when it breaks, I'm all for an ecosystem in Perl 6 13:46
dalek osystem: a9a3b61 | (Ahmad M. Zawawi)++ | META.list:
Added NCurses, the Perl 6 interface to NCurses - the text-based user interface library
13:58
moritz jnthn: do we have a function or op in nqp that escapes special characters, e.g. "\n" -> "\\n" ? 13:59
I guess we should have for the context in error messages 14:00
moritz goes searching
ok, pir::escape__SS 14:01
14:08 rindolf joined
jnthn moritz: Yes, that one 14:09
Maybe we should nqp:: it
14:11 azawawi left 14:19 MayDaniel joined
masak hi, #perl6 14:21
jnthn o/ masak 14:22
masak moritz: congratulations on having the internet again. 14:23
moritz masak: takk 14:25
masak dives into LPW presentation prep 14:26
14:33 zjmarlow left 14:34 fgomez left 14:43 SamuraiJack joined
dalek p/qast-dumper: 2cba446 | moritz++ | src/QAST/ (6 files):
beginnings of a QAST dumper
14:43
moritz gist.github.com/4096527 # example input and output of the QAST dumper 14:50
jnthn moritz++ :) 14:51
moritz I need to wire it up to --target=past 14:52
jnthn: and if you don't object, I'll merge it after that 14:53
jnthn I'd only object were it too much of a prototype :P
14:54 nebuchadnezzar joined
jnthn No, really, it looks good :) 14:54
masak moritz++ # looks almost as cute as the ASTs Yapsi outputs 14:55
strangelyconsistent.org/blog/yapsi-...2-released 14:56
14:56 xinming_ left 14:57 robinsmidsrod left, xinming joined
moritz also, I want to try it on rakudo-generated PAST 14:59
jnthn No, no, QAST! 15:00
PAST is in the PAST. :P
moritz erm, right 15:01
15:01 robinsmidsrod joined
moritz still the stage is called past, not QAST :-) 15:02
jnthn Hm, yeah
Maybe we should just call the stage "ast"...
rindolf Hi all. 15:03
Hi masak , moritz , jnthn
jnthn o/ rindolf
masak ehlo rindolf.
rindolf What's up?
masak :)
moritz' QAST dumper was just put up. 15:04
jnthn threw up a patch that killed a nasty hack earlier :)
masak I'm setting up my talk for LPW.
jnthn uh, that came out kinda wrong... :)
masak those nasty hacks, kill 'em...
jnthn Yes, but not by throwing up :P 15:05
masak shoot 'em up.
jnthn: VDD? -- vomit-driven development.
the thing one does after Vodka-Driven Development.
sirrobert is there a link that always points to a .tgz of the latest rakudo star? 15:06
a url for
moritz I'm not aware of any 15:07
sirrobert ok, thanks =) 15:08
15:09 tokuhiro_ joined
moritz maybe I should put one on rakudo.de 15:11
sirrobert This seems to work 15:16
github.com/rakudo/star/archive/master.tar.gz
moritz no
sirrobert no?
moritz well, it seems to work
sirrobert heh
moritz but you don't want to download the sources of star
but rather the product of running 'make' in the sources
sirrobert ok
is that the github.com/downloads/rakudo/star/r....10.tar.gz 15:17
those are the ones I want?
because that's what I've been using... =)
moritz github.com/downloads/rakudo/star/r....10.tar.gz is correct 15:18
sirrobert ok, great
15:19 tokuhiro_ left
sirrobert for now I'll cannonize 2012.10, and deal with getting the most recent version sometime later =) 15:19
15:19 tokuhiro_ joined 15:20 fgomez joined 15:26 fgomez left 15:29 am0c joined
Woodi how to import (inline perl6 file maybe?) common configuration into test files ? eg. ip address of test server, user name, ant things like that. or config modules need to be used ? 15:32
15:36 am0c left
moritz Woodi: well, you can read data from a JSON file, or write a module that exports a sub that provides the information, or eval a string read from a file that contains the info 15:39
or do any number of other things 15:40
sirrobert Woodi: Config::INI works pretty well for my purposes so far (in the ecosystem)
Woodi I thinked using any module for assigning few varibles is overkill :) will try with eval. 15:42
thanx moritz++ 15:43
sirrobert module just makes it extensible and portable... no real extra overhead. But as you like it =)
15:46 fgomez joined 15:47 zjmarlow joined 15:51 tokuhiro_ left 15:57 am0c joined 16:04 kaare_ left 16:05 Moukeddar joined
tipdbmp I need to substitue '\"' with '"', i.e a backslash followed by a double quotes to be substituted by only a double quotes mark ("). 16:12
Globaly. 16:13
dalek p/qast-dumper: bcb136c | moritz++ | src/HLL/Compiler.pm:
make new QAST dumper available from --target=past
p/qast-dumper: 9bbb138 | moritz++ | src/QAST/ (2 files):
make QAST dumper output a wee bit prettier
moritz tipdbmp: so, do it :-) 16:14
16:14 Moukeddar left 16:15 Moukeddar joined 16:16 Kharec joined
tipdbmp =) 16:16
$str ~~ s:g/'\"'/"/; 16:17
moritz r: $_ = Q[\"ab"c\"]; s:g/'\"'/"/; .say 16:18
p6eval rakudo 112307: OUTPUT«"ab"c"␤»
moritz r: $_ = Q[\"ab"c\"]; .=trans(Q[\"] => Q["]); .say
p6eval rakudo 112307: OUTPUT«""ab"c""␤»
moritz r: $_ = Q[\"ab"c\"]; .=trans([Q[\"]] => [Q["]]); .say 16:19
p6eval rakudo 112307: OUTPUT«"ab"c"␤»
16:20 zjmarlow_ joined
moritz $ ./perl6 --target=past lib/Test.pm |wc 2533 14125 208612 16:22
16:22 zjmarlow left 16:23 Patterner left
dalek p: 2cba446 | moritz++ | src/QAST/ (6 files):
beginnings of a QAST dumper
16:25
p: bcb136c | moritz++ | src/HLL/Compiler.pm:
make new QAST dumper available from --target=past
p: 9bbb138 | moritz++ | src/QAST/ (2 files):
make QAST dumper output a wee bit prettier
p: bfaa6ae | moritz++ | src/ (8 files):
Merge remote-tracking branch 'origin/qast-dumper'
16:27 Chillance joined 16:29 Psyche^ joined, Psyche^ is now known as Patterner
Woodi r: my int $opt = 0x0011; 16:30
p6eval rakudo 112307: ( no output )
16:30 Moukeddar left
Woodi I sometimes get 'Lexical '$opt' is of wrong register type in lexical lookup' for it... 16:31
moritz Woodi: on the REPL, yes 16:32
known bug
16:33 am0c left
Woodi in one script file it works and in another only without 'int' 16:33
masak I must've missed that bug. is it in RT? 16:37
16:40 mtk left
Woodi adding line ^eval('say "a"');$ triggers this bug 16:40
r: eval('say "a"'); my int $opt = 0x0011; 16:41
p6eval rakudo 112307: OUTPUT«===SORRY!===␤Lexical '$opt' is of wrong register type in lexical lookup␤»
Woodi err :)
16:41 sisar left
moritz r: my int $opt = 0x0011; eval('say "a"'); 16:48
p6eval rakudo 112307: OUTPUT«===SORRY!===␤Lexical '$opt' is of wrong register type in lexical lookup␤»
moritz submits rakudobug
r: my int $opt = 0x0011; eval(''); 16:49
p6eval rakudo 112307: OUTPUT«===SORRY!===␤Lexical '$opt' is of wrong register type in lexical lookup␤»
moritz r: my int $a; eval('');
p6eval rakudo 112307: OUTPUT«===SORRY!===␤Lexical '$a' is of wrong register type in lexical lookup␤»
Woodi damn bugs... I need to stop using eval... 16:52
moritz just write a module that exports a function that returns the values you want
maybe as a hash or so
GlitchMr If I would make programming language, it intentionally wouldn't have eval()... 16:53
(but it intentionally would have goto because why not?)
Woodi I returned hash from eval and it was so nice
16:56 birdwindupbird left
moritz jnthn: I read nqp/docs/qast.markdown in the hope of learning about QAST::Want, and at the end I found its documentation is empty :-/ 16:57
TimToady jnthn: all that line is doing is copying the dba over to the current list of expectations at the highwater mark; the dba comes either from the syntactic category or from a dba attached to the ast, if you trace back to where $lexer->{DBA} is set 16:58
it's just a sort of cockpit recorder, really 16:59
using position in the input as a proxy for "recent"
and backtracking resets the recorder, much like landing an airplane does 17:00
GlitchMr: eval, goto, BEGIN and such are "features of last resort" 17:01
we call them "safety valves" sometimes 17:02
they're for doing things that the language designer didn't foresee sufficiently well to provide a sane way to do it
maybe the saying should be: Sane things should be easy, and insane things should be possible. 17:03
ponbiki lol
Woodi yes, me being lazy and wanting eval ended reinventing key = value config format :)
GlitchMr Let me guess, so insane things like adding goto to Python should be possible... and those were already done - entrian.com/goto/ 17:04
I don't like eval() because it breaks many optimizations
TimToady sure, and BEGIN breaks the document model, and goto has its own issues
huf *that* is your main problem with it, not that it's horribly brittle and uncontrollable?
moritz GlitchMr: do you also dislike dynamic typing? 17:05
huf (string eval, i mean)
GlitchMr Yes, but I dislike typing like in C more.
I actually like typing like in Haskell more.
Woodi huf: perl6 syntax is controllable and self-verifing in that case :)
huf Woodi: inside a string eval? 17:06
GlitchMr Also, I don't like eval() because it breaks barrier between functions and keywords
eval can access local variables in many languages
buubot_backup GlitchMr: ERROR: syntax error at (eval 20) line 1, near "can access "
Woodi I do not like eval becouse it needs full interpreter at runtime... 17:07
GlitchMr That too
huf not having compile time at runtime is like missing a leg or 3
imho
Woodi would be realy nice to 'compile out' things to just what was used by programmer
moritz that's still possible
you just have to start with detecting use of &eval 17:08
17:08 zjmarlow_ left
huf if (rand > 0.5) { *a = (These are the hard-hitting philosophical questions I come to reddit foreval } 17:08
errr dammit.
jnthn 'sakaughpt for an hour
huf that was a very odd mispaste
jnthn er, wrong window 17:09
wtf...everyone is doing the wrong stuff in here :P
GlitchMr Also, if you won't make eval keyword, somebody could do that
huf but i summoned chtulhu jnthn!
moritz also note that use and require are just like eval, except a bit different :-)
huf yeah :D
GlitchMr something := eval; something(blah);
And now everything can be eval()
And you could forget about most optimizations.
huf moritz: they have a few more walls
moritz huf: right
huf GlitchMr: what if it only does that if rand > 0.5? 17:10
GlitchMr Well, it isn't pure function ;-)
huf otherwise foo becomes eval and something is just a noop.
GlitchMr (but I guess it doesn't matter)
moritz GlitchMr: sure, if you do stuff that defies optimizations, optimizations won't happen
GlitchMr: that's true in every language
Woodi I talking about Parrot threads having something called 'interpreter'. for me program should *compile* to native code and execute that :) 17:11
GlitchMr >>> blah = eval
function eval() { [native code] }
>>> blah('2+2')
4
JavaScript
huf Woodi: what if it cant
GlitchMr Except, JavaScript "solves" that problem by inventing "global eval" in ES5
moritz Woodi: don't judge parrot interpreters by their names 17:12
huf Woodi: what if the path you want to go down is only known at runtime?
Woodi huf: if can't then ok. but why keep all machinery all the time ?
GlitchMr But that makes stupid things, like [eval][0](something) not doing what eval(something) does
huf so you can jump back to compile time whenever you need
Woodi yes, I am speculating by 'name'...
huf: moust of the time program do-ings are known me think. outlaw runtime eval :) 17:13
jnthn The REPL bug and the eval bug with natively typed lexicals are the same underlying issue.
GlitchMr I also dislike super() function in Python 3 for being too magical.
jnthn So fixing one will fix the other...
Woodi jnthn: pls hire someone :) or few someones :) 17:14
jnthn TimToady: Yeah, I'm trying to work out exactly where I hang the DBA info from. I see it's described just after the DFA and NFA stuff, so I'm guessing it's a "property" of a particular regex. But that feels not quite right as STD seems to have different DBAs on alternation branches... 17:15
moritz I know I've tried it once
jnthn Woodi: Hire someone to do what I do so I can just do Perl 6? :) 17:16
TimToady jnthn: the HIGHEXPECT message is only useful some of the time, though it does educate the user to the fact that the parser is expecting different things at different points
Woodi can be! but I just was tinking about more perlers :) 17:17
huf jnthn: you're already famous for perl6 and we dont know what else you do, so clearly your perl6 job is the more important and worthy ;)
jnthn std: 1 + 17:18
p6eval std 04216b1: OUTPUT«===SORRY!===␤Bogus term at /tmp/6l8Vuct22A line 1 (EOF):␤------> 1 +⏏<EOL>␤Parse failed␤FAILED 00:00 42m␤»
jnthn Hm, that didn't trigger it :)
1 R 5
std: 1 R 5
p6eval std 04216b1: OUTPUT«===SORRY!===␤Confused at /tmp/dRQsB489Fz line 1:␤------> 1 R⏏ 5␤ expecting infix or meta-infix␤Parse failed␤FAILED 00:00 42m␤»
Woodi and one day jnthn++ will decide he want to do that PhD :) 17:19
jnthn
.oO( But my head is already permanently damaged... )
TimToady: So in the above case, we're in infixish, and there's a :dba there 17:20
TimToady: What exactly does that :dba attach to and when do we encounter it?
std: 1 R[] 5 17:21
p6eval std 04216b1: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/WE8R2hIsen line 1:␤------> 1 R⏏[] 5␤ expecting any of:␤ infix or meta-infix␤ infixed function␤Parse failed␤FAILED 00:00 43m␤»
jnthn And why does that one suggest "infixed function" rather than "backeted infix"?
17:24 _jaldhar left
TimToady well, that could be a bug 17:26
moritz std: say 1 R[&atan2] 2 17:27
p6eval std 04216b1: OUTPUT«ok 00:00 45m␤»
moritz that's an infixed function, no?
jnthn Right
TimToady std: say 1 R[& 2
p6eval std 04216b1: OUTPUT«===SORRY!===␤Unable to parse bracketed infix at /tmp/vml2Bnho0W line 1:␤------> say 1 R⏏[& 2␤Couldn't find final ']'; gave up at /tmp/vml2Bnho0W line 1:␤------> say 1 R[&⏏ 2␤Parse failed␤FAILED 00:00 42m␤»…
TimToady std: say 1 [] 2 17:28
p6eval std 04216b1: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/RmfnH0SFha line 1:␤------> say 1 ⏏[] 2␤ expecting any of:␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:00 44m␤»
TimToady std: say 1 [R] 2
p6eval std 04216b1: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/MAlL57WMu3 line 1:␤------> say 1 [⏏R] 2␤ expecting any of:␤ infix or meta-infix␤ infix_prefix_meta_operator␤ infixed function␤Parse failed␤FAILED 00:00 43m␤»
moritz std: [R]
p6eval std 04216b1: OUTPUT«===SORRY!===␤Undeclared name:␤ 'R' used at line 1␤Check failed␤FAILED 00:00 43m␤»
TimToady std: [R/] 17:29
p6eval std 04216b1: OUTPUT«ok 00:00 41m␤»
TimToady might be overbacktracking somewhere in there
though it has to do backtracking on a [] that might be a composer 17:30
that doesn't explain why the earlier one got the wrong dba
though I guess it's basically saying that [] isn't an infix operator 17:31
on the R[] one
jnthn *nod* 17:32
Will ponder it some.
Gonna be a bit tight for tuits in the next week or two, but I want to try and give Rakudo's error reporting a shove STDwards for the December release.
TimToady it's probably not committing to the [ because infixish has to be backtrackable to term:reduce 17:33
jnthn Hm, seems HIGHEXPECT gets diddled in the lookahead too 17:36
TimToady though we might be able to throw a suppose into term:reduce to catch any panic that infixish throws
jnthn Which makes sense, and makes me worry just a bit that this mechanism is very coupled to Cursor. 17:37
(Most user grammars won't have a HIGHEXPECT.)
TimToady yes, hard to know how to generalize the concept 17:41
I wonder how Haskell's parsec handles it... 17:42
well, likely it doesn't "diddle" things in the first place, since diddling is not allowed in Haskell :) 17:44
the fact that we're using dynamic vars to emulate what should probably be ast attributes is a design smell
but we're trying to avoid copying around gobs of data every time we clone an immutable cursor 17:45
doubtless it comes back to referential issues and cons lists... 17:46
japhb phenny, botsnack
phenny japhb: 11:28Z <jnthn> tell japhb Interpolation at end of heredoc and indentation interaction bug now fixed.
japhb jnthn++ # Thanks! 17:47
japhb starts big rebuild
17:47 nebuchadnezzar left
jnthn Well, one thing Pm and I had discussed is that Cursor currently points to orig (the original string) and target (what we're actually scanning, which is forced to be fixed width), and that we could save a word and a copy per Cursor by pulling them out into a datastructure we keep around for the whole parse. 17:47
TimToady and it's probably way overkill to be using a hash for HIGHEXPECT, if it could be cheap cons lists hanging off the ast
jnthn We also noted that other things could maybe hang off that, but the contextual nature of HIGHEXPECT makes it feel like a not so ideal candidate at first blush... 17:48
The thing that's making me worry about this is that a bunch of things seem to hinge on it 17:49
TimToady we could make cursors even cheaper to copy if we kept attrs in a cons list instead of a hash, I suspect
there are never that many of them
jnthn For example, the two terms in a row reporting is:
if $x ~~ /infix|nofun/ and not $x ~~ /regex/ and not $x ~~ /infix_circumfix/ {
attrs as in, position, target, etc?
For us Cursor is an object and at least pos is natively typed. 17:50
TimToady pos is probably usefully native
jnthn Matches have to/from as native too, I think.
TimToady but I'm thinking more of the various annotations that you don't want to back into the type of cursor
*bake
jnthn Ah, OK 17:51
TimToady we have two fighting type systems in cursor
(at least)
the "current language" vs "the current parse results"
so it gets to be MIish if we start defining classes to hold results as natives 17:52
I suppose a single level of indirection to a result struct could separate the two clashing type systems 17:53
then the result struct could have C-ish classes for native results
so basically most of the ad hoc stuff that goes into a Cursor's attr hash could be shoved down a pointer indirection to cheapen at least some of the Cursor copying 17:55
and I'm just pointing out that the pointer or pointers could point to one or more cons lists, when there are just a few attributes to carry (such as the list of expectations we hit at this point) 17:56
and adding another expectation is cheap if you just link to the front of the cons lits
*list
17:56 nebuchadnezzar joined
jnthn Hm, interesting... 17:56
TimToady hashes are not cheap to copy in FPland, I think 17:57
to use cons lists like that, one must isolate the spots that can benefit from referential integrity
immutable list tails work, but mutable ones, not so much 17:58
otoh, it kinda depends on whether the scoping of the AST matches the dynamic scoping that HIGHEXPECT is traversing 17:59
things go inside out sometimes when you are backtracking into a rule 18:00
but usually I think dynamic vars are the wrong solution, at least when you have lazy lists that can escape the dynamic scope, and call back into matchers after you've left the dynamic scope that was in effect to establing the lazy list of cursors 18:02
*blish 18:03
weird typo
'course, cons lists aren't necessarily going to be cheap on a given VM 18:04
TimToady tries again feebly to backlog... 18:05
jnthn tries feebly to take all of this in and figure out what's needed :)
18:09 cognominal joined 18:11 rindolf left
Woodi sirrobert: I ended panding Config::INI :) 18:15
18:17 rindolf joined
TimToady wonders if there's the possibility of an awesome warning for 10 +- 3 18:26
18:27 Moukeddar joined
TimToady not that anyone would write that particular nonexistent operator, but there are probably some more likely ones 18:27
is there any use case for writing <infix><prefix><ws><term> that would produce false positives? 18:28
perhaps a scan of existing p6 code is in order
18:28 pmurias joined
pmurias moritz: have you seen the qast dumper I'm using for rakudo-js? 18:29
TimToady not sure where the best place to install such a warning is either...
rindolf Hi all. 18:30
TimToady it would also tend to dampen the fun of people who construct fake operators and name them
rindolf TimToady: hi, what's new?
pmurias: what is rakudo-js? 18:31
TimToady rindolf: just trying to figure out if it's worth warning when someone thinks they're writing a complicated infix that turns out to be an infix plus a prefix 18:33
Woodi noticed that evaled configs from Perl6 code keeps types (eg. Str) when keys from Config::INI are jus Any...
18:34 kaare_ joined 18:36 whiteknight joined
pmurias rindolf: rakudo's js backend (I'm still working on compiling nqp to js) 18:42
18:44 SamuraiJack_ joined, SamuraiJack left
rindolf TimToady: ah, OK. 18:46
pmurias: ah nice, will Perlito help? 18:47
18:47 pmurias left 18:48 pmurias joined
pmurias TimToady: 123 * - $a 18:50
18:59 whiteknight left 19:00 cognominal left
TimToady pmurias: what I'm asking is: would anyone have a good reason for writing 123 *- $a ? 19:02
(generally speaking)
19:06 zby_home_ joined
dalek rl6-bench: b9d4995 | (Geoffrey Broadwell)++ | bench:
Remove workaround for qq:to bug fixed by jnthn++
19:09
jnthn TimToady: Giving a secret operators talk :D
Woodi TimToady: this example is clear programmer error for me. but other constructs, especially that invented in Perl6 can be less intuitive... $a >>-$b maybe 19:10
TimToady I've got a speculative warning in STD; we can play with it for a while 19:11
19:12 pmurias left
masak today's mini-challenge: find the most credible looking infix+prefix pair :) 19:12
credible-looking*
GlitchMr $something but not $something 19:13
Does it count?
jnthn No, it has to lack space :) 19:14
masak right.
rn: say 4 -? 5
19:14 pmurias joined
p6eval rakudo 112307, niecza v22-32-gee5dcf1: OUTPUT«3␤» 19:14
masak it's "conditional subtraction" :P
GlitchMr $something but! $something
jnthn cute :)
masak GlitchMr: yes, good one.
rn: 2 **? 3
p6eval rakudo 112307, niecza v22-32-gee5dcf1: ( no output )
masak rn: say 2 **? 3 19:15
p6eval rakudo 112307, niecza v22-32-gee5dcf1: OUTPUT«2␤»
masak rn: my $a = 42; say $a +++ 3
p6eval niecza v22-32-gee5dcf1: OUTPUT«===SORRY!===␤␤Postfix found where infix expected (change whitespace?) at /tmp/5JbuUMFY0B line 1:␤------> my $a = 42; say $a ⏏+++ 3␤␤Parse failed␤␤»
..rakudo 112307: OUTPUT«Cannot assign to a non-container␤ in sub prefix:<++> at src/gen/CORE.setting:3070␤ in block at /tmp/hSqlwRnKLH:1␤␤»
GlitchMr $something but! $something is actually $something, but when used in Bool context, it returns opposite of itself.
masak rn: my $a = 42; say $a\ +++ 3
p6eval rakudo 112307, niecza v22-32-gee5dcf1: OUTPUT«45␤»
GlitchMr (I guess it's good enough)
diakopter rn: say 3||+||3
p6eval niecza v22-32-gee5dcf1: OUTPUT«3␤»
..rakudo 112307: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (lines 1, 1)␤»
GlitchMr What is... 3||+||3
?
How does that even work 19:16
masak GlitchMr: heavy curtain plus.
rn: say "foo" ~+~ "bar"
p6eval niecza v22-32-gee5dcf1: OUTPUT«Unhandled exception: Cannot parse number: bar␤ at /home/p6eval/niecza/lib/CORE.setting line 1443 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3542 (ANON @ 11) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3544 (NumSyntax.str2num @ 5) ␤ at … 19:17
..rakudo 112307: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏bar' (indicated by ⏏)␤ in method Str at src/gen/CORE.setting:10148␤ in method Stringy at src/gen/CORE.setting:825␤ in sub infix:<~> at src/gen/CORE.setting:1125␤ in block …
masak rn: say "foo" ~&~ "bar"
GlitchMr || is operator. + is prefix and | is prefix too?
p6eval niecza v22-32-gee5dcf1: OUTPUT«Unhandled exception: Buffer bitops NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 1443 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3345 (infix:<~&> @ 4) ␤ at /tmp/iQ8mvjsvMT line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.settin…
..rakudo 112307: OUTPUT«bab␤»
masak GlitchMr: right.
r: say 4 //\\ 5
p6eval rakudo 112307: OUTPUT«===SORRY!===␤You can't backslash that at line 2, near " 5"␤»
masak dang.
GlitchMr ~& is operator?
Stringwise and
masak r: say "foo" ~~~ "foo" 19:18
p6eval rakudo 112307: OUTPUT«True␤»
GlitchMr That actually is confusing
~~~ is so confusing that it should be disallowed (not really)
masak GlitchMr: absolutes are so much better when stated with a "(not really)" after them. :P 19:19
GlitchMr :P
TimToady actually, ~~~ is what I was using as a test for my patch :) 19:20
GlitchMr I propose new operator: ` 19:21
It's purpose is to confuse everybody.
It does nothing
19:21 pmurias left
masak GlitchMr: infix, prefix, or postfix? 19:21
GlitchMr both 19:22
(I know, "both" doesn't apply to three options)
masak r: say so "foo" &~ "bar"
p6eval rakudo 112307: OUTPUT«True␤»
masak r: say "foo" !~~~ "bar" 19:23
p6eval rakudo 112307: OUTPUT«True␤»
GlitchMr > 2.5 !%%! 8 19:24
True
(is left argument floating point number operator)
masak nice.
GlitchMr (the right argument is "ignored")
19:25 sorenso joined
dalek d: 93d8861 | larry++ | STD.pm6:
add conjectural warning on <infix><prefix>\s
19:28
TimToady does 'rebuild' work again? 19:29
evalbot: rebuild std 19:30
and was that the syntax?
evalbot help
enobot I guess
p6eval: rebuild std 19:31
p6eval help 19:32
p6eval TimToady: Usage: <(star|pugs|nqp|b|std|niecza|rakudo|nom|npr|n|r|perl6|prn|rn|p|rnp|nrp|pnr|rpn|p6|nr)(?^::\s) $perl6_program>
TimToady hmm...
evalbot rebuild std 19:34
p6eval OK (started asynchronously)
Woodi rn: my %h; %h<a> = 1; my %g<a> = 2;
p6eval niecza v22-32-gee5dcf1: OUTPUT«===SORRY!===␤␤Postconstraints, and shapes on variable declarators NYI at /tmp/GclvUlgrp_ line 1:␤------> my %h; %h<a> = 1; my %g<a> ⏏= 2;␤␤Potential difficulties:␤ %g is declared but not used at /tmp/GclvUlgrp_ line…
..rakudo 112307: OUTPUT«===SORRY!===␤Shaped variable declarations is not yet implemented. Sorry. ␤at /tmp/3edZUf5Rt7:1␤»
19:35 pmurias joined
TimToady rn: my %h; %h.<a> = 1; my %g.<a> = 2; 19:35
p6eval niecza v22-32-gee5dcf1: OUTPUT«Potential difficulties:␤ %g is declared but not used at /tmp/Hh1nUOFmXp line 1:␤------> my %h; %h.<a> = 1; my ⏏%g.<a> = 2;␤␤»
..rakudo 112307: OUTPUT«===SORRY!===␤Confused␤at /tmp/USX74mdAWN:1␤»
GlitchMr codegolf.stackexchange.com/a/9010/3103
I won with... polyglot?
TimToady makes a polyglottal stop 19:36
pmurias rindolf: Perlito5 could be usefull for perl5 interop 19:37
TimToady std: 1 ~~~ 2
p6eval std 93d8861: OUTPUT«Potential difficulties:␤ ~~~ is not an infix operator (to suppress warning put space between infix ~~ and prefix ~) at /tmp/210ElUZs2O line 1:␤------> 1 ~~⏏~ 2␤ok 00:00 42m␤»
TimToady \o/
have at it, mates!
GlitchMr :-)
std: 1~~~2 19:38
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
GlitchMr std: 1~~~ 2
p6eval std 93d8861: OUTPUT«Potential difficulties:␤ ~~~ is not an infix operator (to suppress warning put space between infix ~~ and prefix ~) at /tmp/boIKF9DVoq line 1:␤------> 1~~⏏~ 2␤ok 00:00 42m␤»
GlitchMr std: 1 ~~~2
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
GlitchMr :-)
Thanks for not blocking 1~~~2 19:39
(well, ok, it's just a warning)
TimToady std: say "foo" !~~~ "bar"
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
TimToady ah, it suppresses on in_meta
GlitchMr But... how does THAT avoid warning
TimToady maybe it shouldn't
GlitchMr Isn't it "foo" !~~ (~"bar")?
TimToady it was intended to suppres [~~~] 19:40
std: 1 [~~~] 2
p6eval std 93d8861: OUTPUT«===SORRY!===␤Unable to parse bracketed infix at /tmp/jgyTMxxk3b line 1:␤------> 1 ⏏[~~~] 2␤Couldn't find final ']'; gave up at /tmp/jgyTMxxk3b line 1:␤------> 1 [~~⏏~] 2␤Parse failed␤FAILED 00:00 42m␤»…
TimToady but I guess we don't have any prefixes that start with ] or a hyper
so we can try relaxing that 19:41
GlitchMr std: sub infix:<]>($a, $b) { #`(it's just syntax checkk...) }; 2 ] 3
p6eval std 93d8861: OUTPUT«===SORRY!===␤Unexpected closing bracket at /tmp/fagrAujwXX line 1:␤------> ) { #`(it's just syntax checkk...) }; 2 ⏏] 3␤Other potential difficulties:␤ $b is declared but not used at /tmp/fagrAujwXX line 1:␤------> sub infix:…
GlitchMr I guess I'm not allowed to do this
TimToady the closing brackets are hardwired terminators
GlitchMr std: sub infix:<>($a, $b) {} 2 3 19:42
p6eval std 93d8861: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/lGEEnwr7et line 1:␤------> sub infix:<>⏏($a, $b) {} 2 3␤Other potential difficulties:␤ Pair with <> really means a Nil value, not null string; use :('') to represent the null stri…
GlitchMr std: sub infix:[]($a, $b) {} 2 3
TimToady nyaa nyaa
p6eval std 93d8861: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/_hgLwMTdyb line 1:␤------> sub infix:[]⏏($a, $b) {} 2 3␤Parse failed␤FAILED 00:00 42m␤»
GlitchMr std: sub infix:[""]($a, $b) {} 2 3
p6eval std 93d8861: OUTPUT«===SORRY!===␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/4ljCp5Vdgy line 1:␤------> sub infix:[""]($a, $b) {}⏏ 2 3␤ expecting any of:␤ horizontal whitespace␤ infix or meta-infix␤ infixed functio…
GlitchMr std: sub infix:[""]($a, $b) {}; 2 3
p6eval std 93d8861: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/qJDWxS4v2v line 1:␤------> sub infix:[""]($a, ⏏$b) {}; 2 3␤ $a is declared but not used at /tmp/qJDWxS4v2v line 1:␤------> sub infix:[""](⏏$a, $b) {}; 2 3␤ok 00:00 47…
GlitchMr How did THAT worked?
dalek d: e17ff6a | larry++ | STD.pm6:
relax in_meta check so !~~~ is caught
19:43
TimToady well, you confused it into defining a null infix operator, which will have vast repercussions 19:44
it will disable most of the errors that are based on TTIAR
GlitchMr TTIAR? 19:45
TimToady two terms in a row
GlitchMr Two terms in a row/
19:45 rindolf left
TimToady evalbot rebuild std 19:46
p6eval OK (started asynchronously)
Woodi how to cast hash key to Str ? 19:47
GlitchMr Isn't hash key Str already? 19:48
Woodi NativeCall do not think so...
GlitchMr > ('a' => 'b').kv[0]
a
> ('a' => 'b').kv[0].WHAT 19:49
Str()
sorear good * #perl6 19:53
Woodi hallo sorear
actually it work except for keys ambading '='...
TimToady testing a fix for infix:[""] 19:54
colomon \o 19:56
masak sorear! \o/ 19:57
20:16 wamba left
GlitchMr std: 2 ~~~~ 5 20:17
p6eval std 93d8861: OUTPUT«===SORRY!===␤Expecting a term, but found either infix ~~ or redundant prefix ~␤ (to suppress this message, please use space between ~ ~) at /tmp/Uo13mUA7rF line 1:␤------> 2 ~~~~⏏ 5␤Parse failed␤FAILED 00:00 42m␤»
GlitchMr std: 2 ?? 3 !!!! 5
dalek d: d38bbd0 | larry++ | CursorBase.pmc:
disallow all null and whitespacey ops
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
20:19 wamba joined
GlitchMr std: 2 ||+|| 3 20:20
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
GlitchMr std: 2 ||+| 3
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
GlitchMr std: 2 +| 3
p6eval std 93d8861: OUTPUT«ok 00:00 42m␤»
GlitchMr Shouldn't it warn? 20:21
TimToady +| is a valid infix 20:23
GlitchMr Oh, right
I forgot
TimToady and it only checks for 1 prefix before the space
GlitchMr std: 2 +|| 3
p6eval std 93d8861: OUTPUT«Potential difficulties:␤ +|| is not an infix operator (to suppress warning put space between infix +| and prefix |) at /tmp/sqwvXIYFT4 line 1:␤------> 2 +|⏏| 3␤ok 00:00 42m␤»
20:27 sorenso left
diakopter rn: say 7&&&7 20:32
p6eval rakudo 112307, niecza v22-32-gee5dcf1: OUTPUT«Any()␤»
20:32 domidumont joined
TimToady std: sub infix:[""]($a, $b) {}; 2 3 20:34
p6eval std d38bbd0: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/V7sgtcb7da line 1:␤------> sub infix:[""]⏏($a, $b) {}; 2 3␤Parse failed␤FAILED 00:00 42m␤»
TimToady std: sub infix:[" "]($a, $b) {}; 2 3
p6eval std d38bbd0: OUTPUT«===SORRY!===␤Whitespace is not allowed in an operator at /tmp/iDc8WfbEeb line 1:␤------> sub infix:[" "]⏏($a, $b) {}; 2 3␤Parse failed␤FAILED 00:00 42m␤»
20:36 fgomez left
TimToady std: sub circumfix:["$", ""]($a, $b) {}; 2 $ 3 20:36
p6eval std d38bbd0: OUTPUT«Use of uninitialized value $_ in pattern match (m//) at CursorBase.pm line 2722.␤===SORRY!===␤Null operator is not allowed at /tmp/Jx5hASmbR9 line 1:␤------> sub circumfix:["$", ""]⏏($a, $b) {}; 2 $ 3␤Parse failed␤FAILED 00:00 45m…
TimToady std: sub circumfix:['$', ""]($a, $b) {}; 2 $ 3 20:37
p6eval std d38bbd0: OUTPUT«===SORRY!===␤Null operator is not allowed at /tmp/jUtX741b5u line 1:␤------> sub circumfix:['$', ""]⏏($a, $b) {}; 2 $ 3␤Parse failed␤FAILED 00:00 44m␤»
20:43 zjmarlow_ joined 20:47 cognominal joined 20:51 domidumont left 20:52 Moukeddar left 20:57 fgomez joined 20:59 GlitchMr left 21:10 sorenso joined
dalek p: 98e8238 | moritz++ | src/QAST/WVal.nqp:
[QAST dumper] add type of WVal value
21:21
21:24 SamuraiJack_ left 21:34 bruges joined 21:35 bruges_ left 21:37 bowtie joined 21:46 kaare_ left 21:49 sorenso left 21:51 whiteknight joined, Moukeddar joined 21:52 Moukeddar left, Moukeddar joined
Moukeddar can you receive me ? 21:54
diakopter Moukeddar: hi
Moukeddar my irc client is behaving weird 21:55
diakopter, hola there
xenoterracide jnthn++ 22:07
22:07 Kharec left 22:08 Moukeddar left
xenoterracide return ( require $module; ::($module) ).new; # I think I hard tried. require $module; my $obj = ::($module).new; return $obj; what does the outer parens in the working code do for me? 22:08
22:09 Pleiades` left
jnthn xenoterracide: Hm, what you worte probably should work too... All they do is the require then the lookup, and a set of semicolon separated statements in parens just evaluates to the last statemnet 22:14
lue [Just thinking] have you tried my $obj = (::($module)).new; ? 22:15
22:16 zby_home_ left 22:17 MayDaniel left
geekosaur me wondered about that. also about whether $module somehow had a wrong thing in scope that isn't in scope with the othetr 22:18
22:20 zjmarlow_ left
xenoterracide lue: I probably did not, but that's what I'm wondering what those second parens do 22:23
hrm
so are the parens like eval { }? in p5? 22:24
lue I don't think so. (But don't ask me -- I've never used P5) 22:25
xenoterracide maybe I was doing something else last night.... it appears the thing I said doesn't work does... 22:29
oh well 22:30
lue But hey, it works! :)
doy they're like do { }, not eval { } 22:31
22:42 zjmarlow_ joined
[Coke] phenny: ask jnthn you recently worked on a bug /like/ rt.perl.org/rt3/Ticket/Display.html?id=77064 (114362) - this one has slightly different expected (by the OP) behavior. 22:46
phenny [Coke]: I'll pass that on when jnthn is around.
xenoterracide anyone know a vim syntax highlighting that distinguishes a p6 variable from a method name in color? 22:47
notes that it might be the core p6 syntax recognition not the theme that's preventing it, but I'm not sure 22:48
moritz perl6.vim hilights them differently 22:55
masak 'night, #perl6 23:08
23:10 lue left 23:21 swarley joined
swarley What is a token in NQP? An informal definition or a link would be nice if someone could help me out 23:22
23:25 moritz left 23:33 pmurias left
diakopter [Coke]++ again 23:38
swarley How do you specify a regexp like /(pattern)*/ in an NQP token? 23:49
23:53 raiph joined 23:54 PacoAir left
raiph hi swarley 23:54
swarley hello 23:55
raiph Looks like you got token, right? 23:57
swarley Yeah, i figured out the token 23:58
I'm just looking for a reference on the syntax of the regular expressions
It still seems rather cryptic since I haven't seen a complete document on it