»ö« 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.
lue I assume there isn't a numerical not like there is for +^, +&, and +|, which would let me NOT every bit of the number provided? 00:30
flussence rakudo: say +~1 00:36
p6eval rakudo 922500: OUTPUT«1␤»
flussence grr.
dunno.
rakudo: say 1 +^ 0xFFFF 00:37
p6eval rakudo 922500: OUTPUT«65534␤»
flussence that's probably your best bet, since there's no "default" bit width to Ints
lue I need to do that to 32-bit words. I think $number +^ 0xFFFFFFFF would do the trick. 00:39
colomon oh, right! no default width means no numerical not
flussence (unless you define a +! for native type ints...)
lue Actually prefix:<+^> is supposed to do that. (Which I think is counterintuitive to the meaning of ^ otherwise, and therefore propose prefix:<+!>) 00:41
Too bad +!$a is already taken to mean "negate $a and then turn that into a number". Perhaps that would only work on explicitly sized numbers? 00:44
sorear niecza: say +^1 00:45
p6eval niecza v8-51-g785e335: OUTPUT«-2␤»
sorear colomon: if you define Ints as being twos-complement, then +^$x means -$x-1, no reference to width needed 00:46
colomon sorear: was just reading that in S03.
lue Would it work right then if I were to do my uint32 $a = 42; say +^$a; 00:47
colomon niecza: my uint32 $a = 42; say +^$a; 00:48
p6eval niecza v8-51-g785e335: OUTPUT«===SORRY!===␤␤Malformed my at /tmp/arrTQwkWFj line 1:␤------> my ⏏uint32 $a = 42; say +^$a;␤␤Parse failed␤␤»
sorear niecza doesn't have uint32 yet
does rakudo? 00:49
lue nom: my uint32 $a = 42; say $a;
sorear pugs: my uint32 $a = 42; say $a ; # I bet pugs does though.
p6eval nom: OUTPUT«===SORRY!===␤Malformed my at line 1, near "uint32 $a "␤»
pugs: OUTPUT«42␤»
sorear pugs: my uint32 $a = 0; $a--; say $x
p6eval pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "::"␤ Variable "$x" requires predeclaration or explicit package name␤ at /tmp/xNACDGV_2Y line 1, column 31␤»
sorear pugs: my uint32 $a = 0; $a--; say $a
p6eval pugs: OUTPUT«-1␤»
colomon ah, pugs
sorear not very "u"
pugs: my uint16 $a = 65535; $a++; say $a
p6eval pugs: OUTPUT«65536␤» 00:50
sorear looks like it's not respecting type sizes at all
colomon ah, pugs
;)
lue Oh well, hopefully it'll still work right with plain ol' unsized Ints and +^ 0xFFFFFFFF;
.oO(Oh no, I'm ending my (English) sentences in semicolons now;)
00:51
colomon wth? 00:53
colomon Never saw that hang-up message before, dunno why it would happen, either. 00:54
lue
.oO( $freenode.net.split; )
sorear colomon: what did you see 00:59
colomon sorear: it was a popup outside of the chat window talking about a SIGTERM, if I recall correctly. Guess it was the first time I've been on the receiving end of that sort of net split? 01:00
sorear maybe
lue Is there a way to prefix a bunch of strings in an array with something like '0b' ? [:2($var) doesn't work yet] 02:06
lue nvm, found out for myself ("0b" 􏿽xAB~􏿽xBB @a if you were wondering) 02:07
sorear .u « 02:08
phenny U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK («)
sorear .u �
phenny U+FFFD REPLACEMENT CHARACTER (�)
colomon sorear: suggestions on where to add math sub versions to Niecza? 02:14
dalek p/nfa: ef8359b | pmichaud++ | src/Q (2 files):
Add :rxtype<ws> to differentiate meta whitespace from direct calls to <.ws>.
02:18
p/nfa: 6d9e44e | pmichaud++ | src/NQPQ/Actions.pm:
QRegex::Actions::buildsub no longer sets :blocktype('method') by default.
p/nfa: 88b34ff | pmichaud++ | / (3 files):
Initial version of nfa generation. Build nqpq by default for now to make testing easier.
p/nfa: d3798ba | pmichaud++ | src/QRegex/NFA.nqp:
Relabel NFA_* constants to EDGE_*. Add a simple __dump() method to make it easier to visualize the NFA.
p/nfa: 8c346b0 | pmichaud++ | src/PAST/NQP.pir:
Add nqp::sprintf opcode.
p/nfa: 94795ee | pmichaud++ | src/QRegex/ (2 files):
Initial protoregex nfa generation and merging.
p/nfa: 742b33a | pmichaud++ | src/QRegex/ (2 files):
Add NFA.run -- code to run the NFA on a given input string.
sorear colomon: math sub versions? 02:26
colomon sorear: sub sin, sub abs, etc.
just occurred to me my ack didn't find them because they're in a .setting file. 02:27
CORE.setting
niecza: say e 02:28
p6eval niecza v8-51-g785e335: OUTPUT«Rebuild in progress␤»
colomon sorear: next question: do you have spectest fudging up and running? 02:37
sorear yes 02:38
colomon how? 02:39
[Coke] phenny: tell pmichaud the parrot release will not be coming out at midnight tonight due to parrot not being releasable as is from a mac. Will resolve tomorrow morning, eastern.
phenny [Coke]: I'll pass that on when pmichaud is around.
pmichaud [Coke]: no problem.
phenny pmichaud: 02:39Z <[Coke]> tell pmichaud the parrot release will not be coming out at midnight tonight due to parrot not being releasable as is from a mac. Will resolve tomorrow morning, eastern.
sorear colomon: t/fudgeandrun t/spec/...
pmichaud [Coke]: I'm now looking at wednesday for a Rakudo release. 02:40
sorear colomon: you'll need to symlink t/spec to a roast checkout first.
pmichaud i.e., it's very unlikely to happen today.
colomon sorear: Can't exec "../roast/fudge" ? 02:41
sorear: ah, it assumes I have roast and t/spec directories, both the same? 02:42
colomon sorear: okay, have fudging working 02:44
sorear: need to head to bed, but have made some progress tonight and hope to have something more running tomorrow. 02:45
sorear colomon: ...oops 02:46
dalek ecza: 3afe236 | sorear++ | t/fudgeandrun:
Fix dependence on ../roast === t/spec (colomon)
02:48
sorear colomon++
lue Something tells me that the module name Digest::SHA::1 is strictly forbidden... 02:54
pmichaud I don't know about 'strictly' :-)
lue Well, neither master nor nom let me go on after seeing C􏿽xABmodule Digest::SHA::1:auth<lue>:ver<0>;􏿽xBB 02:55
(It would go on if I s/1/One/)
Also, I'd feel a lot more confident about the SHA-1 algorithm I wrote if I could've used C<uint32>'s... [haven't been able to test it yet, will upload code later] 02:59
afk
spetrea is Ms. for married women and Mrs. for not-yet-married women ? 03:44
I want to address a letter and need to know how 03:45
sorear traditionally, yes. in practice, nobody cares, use Ms for everyone 03:48
pmichaud spetrea: "Miss" is for unmarried women. "Mrs." is for married women. "Ms." is when the distinction isn't wanted or important. 03:49
spetrea hmm ok
what if it's a cover letter to some recruiter who happens to be a woman ? 03:50
pmichaud "Ms."
("Ms." is also used when the marital status isn't known.)
sorear a lot of people today get offended if you use Miss or Mrs 03:51
pmichaud en.wikipedia.org/wiki/Ms. says "According to The Emily Post Institute, Ms. is the default form of address for women, regardless of marital status, in the US.[3]"
spetrea do Men have the same thing with Mr. ? is there an alternative to Mr. ?
Mr. or Bachelor ? 03:52
Mr. or Ba.
this is so silly
pmichaud Generally for men it's "Mr.", yes. For very young male children one can use "Master", but that's also fallen out of favor. 03:53
spetrea "Master", how silly that sounds 03:55
dalek p/nfa: 505a3d7 | pmichaud++ | src/QRegex/NFA.nqp:
Add anchor and enumcharlist to QRegex::NFA.
04:02
p/nfa: ef5cfd3 | pmichaud++ | src/QRegex/NFA.nqp:
Some small fixes to anchors and eos handling.
p/nfa: 4903492 | pmichaud++ | src/QRegex/Cursor.nqp:
Code to invoke protoregexes in (decreasing) order of longest match.
lue If I begin a file with module Foo::Bar; and then just declare some subs, what do I need to do to the subs so I can use them in code? 04:44
pmichaud "is export" 04:44
my sub xyz() is export { ... } 04:45
or, the code can use them via Foo::Bar::xyz(...)
lue The Foo::Bar::xyz didn't work. Do I need to use 'my' as well as 'is export' ? ('cos 'is export' is already there, but not 'my'.] 04:48
pmichaud oh. 04:49
for Foo::Bar::xyz you have to use "our"
our sub xyz() is export { ... } 04:50
otherwise it's just lexically scoped
lue grr. I can't get to testing my code, let me paste to gist. 04:53
lue gist.github.com/1148462 04:56
tadzik bells in Riga ring so many times that I thought I'm late for the YAPC
lue [I wrote this making sure none of it wouldn't work on current nom (only to find out afterwards I can't even 'use' it in nom :/)] 04:57
tadzik I mean, it's 8 AM, how many times can you ring?
pmichaud 'use' should be working in nom, now.
tadzik ...or I hope it is
pmichaud it's 8am, yes.
tadzik whew
pmichaud and yes, there are a lot of bells.
tadzik not ok 20 - a multi stringifies sensibly, t/spec/S06-multi/syntax.rakudo
pmichaud: I have a feeling they're counting the number of days since 01.01.1970 :) 04:58
Or, as you americans write it, 01.01.1970
pmichaud lue: I don't see anything quite wrong with what you have written, but have to rush off now so I can't debug it. Maybe someone else can look into it. 04:59
I rarely use the 01.01.1970 form anymore. It's usually 1-Jan-1970 or 1970.01.01
lue tadzik: Maybe some Americans. I purpose write dates 1 Jan 1970 to avoid any confusion (at least among English circles)
s/purpose/purposely/ 05:00
pmichaud afk for a short while
lue (maybe I should recompile nom, then modify the script a bit and run it as a script.) 05:01
TimToady 2011-08-16 for me 05:16
tadzik that's consistent 05:29
sorear I prefer the 19700101 system. lexicographic order preserving 05:33
TimToady that's one reason I like 2011-08-16 05:55
moritz good morning
phenny moritz: 15 Aug 21:24Z <tadzik> tell moritz re the segfault, does it also happen with -g ms2?
pmichaud moritz: good morning! o/ 05:56
pmichaud I'm thinking of doing nom->master today or tomorrow. Any objections? 05:59
(will look for answers in backscroll throughout the day)
moritz pmichaud: the nommap punchlist slists grammars, qrexes, other regex stuff as the only "must have" item for the switchover 06:00
jnthn Morning, #perl6 06:01
pmichaud the only missing thing for grammars (afaik) is variable interpolation and protoregexes
and at least a minimal version of protoregexes may be coming today
TimToady wonders how many RC entries will break
they tend to be more cananry-y than .t files, since they stress multiple features simultaneously 06:02
pmichaud well, we still have the 2011.07 star release. I suspect we can regression test against RC before we make a distribution release
would it be feasible to put rc entries into roast, or into a repo somewhere? 06:03
TimToady I think some of them are already under integration
snapshots of 'em anyway
pmichaud I wonder if it's worth making a special subdir for them.
moritz only a few
TimToady but someone could champion that 06:04
pmichaud: that would increase their visibility
shower &
pmichaud roast or separate repo?
moritz fwiw I had a script that scraped rosettacode for all Perl 6 examples 06:05
pmichaud well, they'd probably need to be made Test-aware 06:05
moritz moritz.faui2k3.org/tmp/rc-scrape.txt
right
pmichaud I bet this would be a good airplane-across-the-atlantic task :) 06:06
for Friday
okay, I'm heading off to the venue -- bbiaw
lue Good news, my sha1 calculator ends up with a 160 bit digest. Bad news, it's wrong. 06:07
I really think being able to force 32-bit uints would help immensely. I wonder how hard native types would be to implement in nom...
dalek href="https://modules.perl6.org/gh-pages:">modules.perl6.org/gh-pages: 5883c58 | moritz++ | build-project-list.pl:
add a head() sub, and uncomment the code that relies on it
06:09
dalek href="https://modules.perl6.org/gh-pages:">modules.perl6.org/gh-pages: e6cf29d | moritz++ | build-project-list.pl:
add getstore
06:14
TimToady --> mosey-mode 06:26
sorear moosey mode? 06:31
dalek href="https://modules.perl6.org/gh-pages:">modules.perl6.org/gh-pages: 6bf2189 | moritz++ | build-project-list.pl:
comment on the recent hack, and use the json decoding from Mojo
06:34
TimToady done moseying now 07:01
pmichaud I wonder if I should do a lightning talk to rebut jnthn's talks :) 07:03
TimToady that'd be super :) 07:04
masak morning, #perl6 07:06
pmichaud masak: o/
masak "Perl 6 is neo-postmodern" -- Damian Conway 07:07
lue die "I am at a loss for words."; 07:09
masak he's giving a keynote where he shows a bunch of Perl 5 modules that he translated to Perl 6. 07:10
TimToady do not talk about Perl Club!
masak :P
lue: he just said "without CPAN [Perl 6] is not much use".
"Getting Perl 6 out of beta is not nearly as big of an issue as getting Perl 6 onto CPAN." 07:12
lue considers what it would take to lure a TARDIS to use to go to Riga... 07:13
I should post my failing SHA-1 code, hopefully someone'll be able to find the issue.
dalek p/nfa: 8ea85a9 | pmichaud++ | src/QRegex/NFA.nqp:
Refactor mergesubrule a bit.
07:15
masak lue: you might want to compare it with github.com/soh-cah-toa/digest-sha256/ 07:19
which is SHA-256, but maybe still useful.
lue I think I looked at that. (lemme check again)
lue Ah. The critical difference is that I decided to be an idiot and implement the algorithm in P6 (You know, that whole "portable code" business, as well as the fun of implementing an algorithm) 07:21
pmichaud I think we stole other tiny bits of Python :-) 07:22
masak :)
lue: nothing wrong with writing something in p6 that you don't expect to be performant.
TimToady pmichaud: but we un-stole the p5 OO system :) 07:24
pmichaud TimToady: that sounds like a good trade.
yath honestly, I liked the perl5 OO system. was a bit to type, but flexible. 07:31
masak if it's flexibility you desire, you'll LOVE the Perl 6 OO system. 07:31
it's just more opinionated at the newbie end. 07:32
Knuth actually approves of the goto instruction. more or less. 07:34
he wrote a paper called "Structure programming using the GOTO" or something very similar. 07:35
pmichaud I think it was Dijkstra who was fanatical about it.
masak Structured*
pmichaud: yes. and even he was very moderate and level-headed about it.
it was Wirth who gave the article the inflammatory title.
it's a shame. GOTO is useful; the rule should be something like "do look around for sugar that wraps GOTO. if you don't find any, then don't feel bad about using GOTO." 07:37
pmichaud agreed, totally 07:39
masak what TheDamian showed can be emulated with booleans and if statments, but it's certainly nicer with the goto.
pmichaud error handling is often han.... right
masak right, there's that too. it's idiomatic. 07:41
masak ♥ .methcall
the one with implied $_, that is. 07:42
it's one of the best interactions between "let's be like Perl 5" and "let's improve things". 07:43
masak likes &slather
let's spec it! \o/
pmichaud I could offer TheDamian a commitbit. Then we'll know how passionate he really is about it. :-P
masak blackmail! :) 07:44
TimToady doesn't like "slather"
cognominal_ I don't consider breaking many levels of loop as a goto.
that's structured to me.
masak agreed.
lue github.com/lue/Digest--SHA1 and I recommend you read the README first. 07:45
masak cognominal_: there's much nice sugar for that (next/last/redo). I also consider them structured "mild" versions of goto.
I see a problem with TheDamian's DESTROY 07:46
GC isn't timely.
just as he said.
so the unlink may not happen until very very late in the program.
masak hadn't realized how tied MAIN's --help will be to tadzik++'s Pod stuff 07:48
TimToady just use up all your memory to force it :)
masak :P
TimToady masak: me either
masak TheDamian++ 07:49
lue I feel the need to implement native types after this afternoon of programming the SHA-1 algorithm. I also feel I need to clean up the SHA-1 code. 07:50
masak colomon: smile, you're (well, your github account is) on screen! :)
pmichaud colomon++ 07:51
masak from an inheritance perspective, roles are kinda "oh yeah, that's nice".
then you start using them and they're "oh wow I should've done this all the time" 07:52
pmichaud TheDamian just kicked himself out of Perl Club. 07:54
(used a source filter) 07:55
masak well, it was fun while it lasted.
lue what is a source filter? 07:56
masak lue: :) 07:57
lue: it's the young generation that will carry on the torch of civilisation.
lue I assume not knowing is a good thing?
masak unencumbered by source filters.
lue: think of it as a regex operating on the source code before parsing.
or a set of regexes, rather. 07:58
lue fails to see the benefit of that 07:59
masak lue: creating new syntax. 08:00
pmichaud TimToady: will that example actually work? How does <.ws> know to not treat the '###' as whitespace?
masak I was wondering about semicolons interacting with this. 08:00
pmichaud (note to non-yapc::eu attendees -- I'm referring to an example on the overhead)
masak we're mostly epi-commenting on the TheDamian talk right now. 08:01
TimToady well, probably wouldn't work in the STD-based parsers
pmichaud yeah, that's what I'm referring to 08:02
TimToady statement_prefix is probably the wrong category
masak lue: the problems start happening when several applied source filters, not built to interact with each other, interact with each other.
lue: Perl 6 resolves this with grammars and inheritance. the problems don't go away, but we can apply class/role solutions to them. 08:03
pmichaud well, even if it's not statement_prefix... feels like any token starting with '#' is likely to be problematic.
masak right.
because <.ws> gobbles it.
TimToady but it does that by looking for pod-ish things, which should be a category 08:04
masak sorear: please please implement macros :)
TimToady oh, it's just the comment category! 08:05
lue I just found a stack overflow question about source filters, reason 3 for when they're OK: Your name is Damian and you must be allowed to program in latin. 08:05
masak so TheDamian should put a rule in the comment category? 08:06
pmichaud yeah, but I'm not quite sure how to inject the code via the comment: category
anyway, that's an example we could start to work from.
masak \o/
I think there are simpler examples.
if there's a need for them, I might put together a few.
pmichaud in many ways I think macro implementation is suffering from a dearth of examples 08:07
masak I think examples emitting an AST are more central than examples emitting a string.
ok, let me put something together.
then maybe blog about it.
TimToady that's what we mean when we say hygienic macros are better than textual macros
pmichaud if you can define short-circuit operators, I'll be very happy :)
masak TimToady: right.
masak TheDamian invites everyone to join him in porting CPAN modules to Perl 6. 08:09
...aaaand talk is over.
masak nice one. 08:09
TimToady コーヒー & 08:11
lue (where would the ported modules go? I don't think CPAN is currently well-designed to handle Perl *and* Perl 6 modules) 08:15
tadzik lue: we could set up our own pause and metacpan for Perl 6 08:27
that's what mo++ stated few days ago, when I talked to him about it 08:28
lue That's what I said. Have you seen my blog posts mentioning P6SSMPR?
tadzik SSMPR?
lue stands for Snippets, Scripts, Modules, and Programs Repository. 08:30
see rdstar.wordpress.com/2011/08/06/id...ve-perl-6/
tadzik oh, lue. Damian actually compared CPAN to a Death Star :)
oh, I read that one. I thought SSMPR would just be a cpan or whatever. I mean, what's the difference? 08:31
lue I equated Rakudo Star to Rakudo Death Star a looong time ago.
I think the only real difference would be 1) It's sections for snippets and scripts and 2) It's Perl6-ness 08:32
lue Besides, I don't necessarily want to have the name P6SSMPR forever. Just the first thing that came to my mind :) 08:33
tadzik I think CPAN is a good place for scripts, as for snippets, hmm
maybe a common-effort book or so?
Perl6 Best Ideas?
lue Yeah. My original thought was a place for all sorts of Perl 6 code. Then I thought of the specific kinds of code one may write, which led to the SSMP part. 08:34
tadzik hmm
moritz "I'd tell you a UDP joke, but you might not get it!" 09:16
TimToady :D
tadzik what?
moritz tadzik: UDP doesn't make sure that transmissions actually arive
tadzik what? 09:17
TimToady "Unreliable Data Protocol"
tadzik :) 09:17
tadzik moritz: sorry, I didn't receive your joke ;) 09:18
lue is reminded of the evil bit, and wonders how many people set this when they're supposed to. 09:27
mux that's one of my favourite April 1st RFC, along with the avian-carrier for IP one :-) 09:31
lue The emoticons one was great too. 09:35
Hm. I should really do that sleeping thing. 'night all o/ 09:40
cotto masak, ohai. 09:52
masak o/
cotto time for noms downstairs
no line atm
masak lue: SSMPR. you have to do something about that name. 09:53
pmichaud all of the vowels were stolen.
masak cotto: aww, but we just sat down to hack!
masak considers catching the other thin end of the bell curve
pmichaud if yesterday is any indicate, the other end carries a risk of little-to-no noms 09:54
*indication
masak uh-oh.
so the rational thing to do might actually be to pack up and head down...
oh well, I can write macro examples later.
masak .oO( evil bits carried by avian carriers ) 09:55
TiMBuS IPoAC? 09:58
masak just reacting on something from the backlog. ignore /me :) 09:59
TiMBuS carrion then 10:00
masak :P 10:04
cotto masak, where are you hanging out? 10:10
masak cotto: in the hard-to-find speakers practice room starting with a 2.
cotto sneaky
masak cotto: there were speakers practicing here, but they ran away. 10:11
we're not *that* scary. :/
colomon sorear: any reason not to use a "standard" .net Complex number class? like www.codeproject.com/KB/dotnet/complex_math.aspx Seems like it would be a nice help for complex math in Niecza. (Mind you, I found that class via a google search, and have no experience using it.) 10:29
jnthn Mebbe we should eat before it all runs out? 10:34
masak ooh
jnthn aah
masak perl6: sub foo($x is rw) { return \$x }; my $a = 42; my $c = foo($a); $c[0] = 5; say $a 11:29
p6eval niecza v8-52-g3afe236: OUTPUT«(timeout)»
..rakudo 922500: OUTPUT«5␤»
..pugs: OUTPUT«*** Can't modify constant item: VInt 42␤ at /tmp/aOnqPZLsN4 line 1, column 64-73␤»
masak nom: sub foo($x is rw) { return \$x }; my $a = 42; my $c = foo($a); $c[0] = 5; say $a 11:30
p6eval nom: OUTPUT«Cannot assign to a readonly variable or a value␤ in mu <anon> at /tmp/XR8sOsYOcD:1␤ in mu <anon> at /tmp/XR8sOsYOcD:1␤␤»
masak interesting. 11:30
four impls, four responses.
well, pugs and nom agree, more or less.
jnthn master may be right 11:31
Don't think the Capture should really decont there.
though master's probably right for the wrong reason, of course :) 11:32
masak of course :)
jnthn I suspect we're missing "is rw" on at_pos nad at_key in Capture
masak oh, ok.
jnthn *and....though at_pos *is* above at_key in the source :P
masak :P 11:33
masak phenny: tell pmichaud (and other interested parties): I've written up a few thoughts on macros, macro examples, macro semantics, and macro corner cases. gist.github.com/1148915 11:51
phenny masak: I'll pass that on when pmichaud is around.
masak perl6: multi foo($x) { say "OH HAI" }; BEGIN { foo 42 }; multi foo(Int $x) { say "OH $x" } 11:58
p6eval niecza v8-52-g3afe236: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/Eh2QjDaAjI line 1:␤------> multi foo(⏏$x) { say "OH HAI" }; BEGIN { foo 42 }; ␤␤OH 42␤»
..rakudo 922500: OUTPUT«===SORRY!===␤Could not find sub &foo␤»
..pugs: OUTPUT«OH HAI␤»
masak pugs++
sorear: BEGIN time isn't really BEGIN time in Niecza? 11:59
jnthn nom: multi foo($x) { say "OH HAI" }; BEGIN { foo 42 }; multi foo(Int $x) { say "OH $x" } 12:00
p6eval nom: OUTPUT«OH HAI␤»
JimmyZ couldn't understand why is 'OH HAI' 12:03
masak JimmyZ: when do BEGIN blocks execute? 12:04
TimToady masak: no, that's why niecza doesn't get a green in features
masak ah.
JimmyZ masak: after compile? 12:05
masak JimmyZ: no, earlier than that.
nom: role A {}; role B {}; class C does A does B {}; multi foo(A) { say "A" }; multi foo(B) { say "B" }; BEGIN { foo(C.new) }; multi foo(C) { say "resolved!" }
p6eval nom: OUTPUT«===SORRY!===␤Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(A)␤:(B)␤␤» 12:05
TimToady after compile is CHECK time
JimmyZ before compile?
TimToady that's too early :)
masak it can't run it before it's parsed it :)
jnthn :) 12:06
BEGIN is run when we hit it. 12:07
JimmyZ after compile before program is exucte?
masak "ouch, ouch! OK, OK, I'll run!"
JimmyZ: what jnthn said. when the parser hits it.
jnthn But you have to beware of what will and won't be in place :)
TimToady at the moment BEGIN is reduced in the parse
masak JimmyZ: look at the last example I wrote.
jnthn nom: class C { BEGIN { say C } }
p6eval nom: OUTPUT«===SORRY!===␤Method 'gist' not found for invocant of class 'C'␤»
jnthn At that point we didn't add a parent.
(Default one gets added at composition time). 12:08
:)
masak JimmyZ: notice that the foo(C) candidate would resolve the dispatch, but it hasn't been parsed yet.
in the BEGIN block.
nom: class C { BEGIN { say C ~~ C } }
p6eval nom: OUTPUT«===SORRY!===␤Method 'ACCEPTS' not found for invocant of class 'C'␤»
masak aww
jnthn Well, if you must it's easy enough to work around. 12:09
masak right.
jnthn nom: class C is Any { BEGIN { say C } }
p6eval nom: OUTPUT«C()␤»
masak \o/
TimToady why not just add that automatically, then recalculate at compose time
jnthn nom: class C { method m { say "works" }; BEGIN { C.m } }
p6eval nom: OUTPUT«works␤»
masak jnthn: why is the default parent added at composition time?
jnthn TimToady: Too much hassle
TimToady hassle is what we're paying you for 12:10
jnthn masak: Because we don't know if we have any parents until then.
TimToady :)
masak .oO( hassle nuts )
JimmyZ ok, looks like BEGIN is a good place to do compiling magic
jnthn If we must, I probably can solve it.
masak jnthn: oh, 'cus of 'also is'?
jnthn Yeah
We'd have to track if we added parents explicitly yet and stuff. 12:11
masak JimmyZ: yes. like 'use' :)
jnthn I can do it if we really want it.
masak nah, leave it for now.
jnthn Just not sure I see a use caes :)
*case
masak let's be conservative about that one.
JimmyZ masak: yes, I know 'use' of perl5
jnthn Saves me some labour :P
masak JimmyZ: well, it's done at BEGIN time.
moritz masak: and conserve the current state of.. what? the compiler?
masak moritz: well, conserve the simplicity of the code, for one thing. 12:12
JimmyZ masak: yes, I just remember that, because I write perl5 occasionally
masak moritz: feels odd to go ahead and add a big wad of code for something that no-one has a need for.
jnthn Yes, the current factoring is simpler.
unless @!parents { ...add the default... } in compose or some such.
masak rakudo: use Test; say Test.WHAT 12:13
p6eval rakudo 922500: OUTPUT«Method 'WHAT' not found for non-object␤ in main program body at line 22:/tmp/qKNxH8Y9Aa␤»
masak oh, it's a module... :P
rakudo: say Test.WHAT
p6eval rakudo 922500: OUTPUT«Could not find sub &Test␤ in main program body at line 22:/tmp/nY_hH4SlOh␤»
masak rakudo: use Test; BEGIN { say Test.WHAT }
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Method 'WHAT' not found for non-object␤»
tadzik rakudo: use Test; say Test.HOW.WHAT
p6eval rakudo 922500: OUTPUT«Method 'HOW' not found for non-object␤ in main program body at line 22:/tmp/mHj5Y08dfV␤» 12:14
masak that proves that 'use' runs no later than BEGIN time.
JimmyZ nom: multi foo(Int $x) { say "OH HAI" }; BEGIN { foo 42 }; multi foo(Int $x) { say "OH $x" }
p6eval nom: OUTPUT«OH HAI␤»
JimmyZ nom: multi foo(Int $x) { say "OH HAI" }; multi foo(Int $x) { say "OH $x" }
p6eval nom: ( no output )
jnthn masak: try nom, it may work ;)
JimmyZ bug?
masak nom: use Test; BEGIN { say Test.WHAT }
JimmyZ: don't see one.
p6eval nom: OUTPUT«Test()␤»
jnthn JimmyZ: You didn't call it
masak jnthn: \o/
jnthn JimmyZ: Don't think the spec obliges us to catch thoes any earlier.
Though I agree it'd be sweet of it. 12:15
masak aye.
in this case it's even possible :)
jnthn Oh, yes, plenty of cases aren't. :)
masak most of them.
JimmyZ ah, I can define two same multi function
jnthn JimmyZ: Yeah, but just try calling it :)
masak a clever compiler may error out. 12:16
jnthn masak: Only most in terms of what's possible, not so much what's likely :)
I mean, sure, there's an infinite number of where clauses. But there's plenty of sigs without any. :)
masak jnthn: a "random signature" is "almost 100%" likely not to be provably equivalent to itself.
but yes, your point is well taken. 12:17
JimmyZ jnthn: I am curious why it's allowed to define
masak JimmyZ: because we don't catch that error at compile time yet :) 12:18
JimmyZ: if you write a patch, I'll personally apply it.
jnthn Note that it's non-trivial.
An "is default" quickly spoils the fun
jnthn As does handling multis that override those in nested outer scopes (which we don't handle yet) 12:18
JimmyZ masak: std is also allowed, so I thought it's a feature
masak jnthn: yeah, would have to do it at CHECK time.
jnthn JimmyZ: std doesn't do anything close to that much semantic analysis 12:19
masak jerome: greetings. 12:19
JimmyZ thought std is right
takadonet morning all
JimmyZ always think std is right
masak takadonet! \o/
JimmyZ: yes, it does give that impression, doesn't it? :P
jnthn Anyway, I figure that we'd probably introduce such detection when working on compile-time multi dispatch. 12:20
JimmyZ masak: yeah, that's why I thought it's a feature
masak jnthn: yeah.
JimmyZ: when in doubt, ask.
jnthn Because they're interested in the same kinda thing.
masak *nod*
JimmyZ :)
colomon masak: so what was that about my github being on the big screen at YAPC::EU in the middle of the night all about? 12:21
masak colomon: TheDamian gave a talk. 12:23
colomon: have host his IO::Prompt module.
colomon ah
masak s/have/you/
colomon: hope I didn't wake you up.
colomon oh, no, no worries.
I keep well separated from the computer when I'm sleeping. :) 12:24
masak good plan.
colomon And there's no audio alert set for my IRC anyway, it's all visual.
cotto that's one way to do it
masak same. 12:25
colomon masak: so you didn't wake me, you just intrigued me when I did wake up. 12:27
does TheDamian have any cool new modules for us?
masak yeah. 12:29
he says to email him to get them.
if you do, and host them on github, you're my hero.
colomon I'm certainly happy to do so.
masak \o/ 12:30
colomon might be a while before I can get around to porting them to nom (unless he has already), though
masak after writing gist.github.com/1148915 , I now find macros much less scary and more understandable than before.
colomon: that's fine. 12:31
masak zamolxes: greetings. 12:31
er. mistab.
ZaphrodZenovka: greetings :)
colomon masak: e-mail sent 12:35
masak colomon: you're half-way to being my hero. 12:37
masak Holy_Cow! 12:40
masak will nom get :exists and :defined RSN? 12:42
is it LHF? :)
jnthn dunno, but I guess Pm has to re-do the OPP soon so maybe it can be tackled then 12:43
masak ooh, redo the OPP! \o/
masak lurves the OPP
oh! I promised to solve the problem of thunks and short-circuiting operators for pmichaud. hm. 12:47
masak thunks a bit 12:47
ah. yes. I see what the problem is.
...I think. 12:48
jnthn Solution - it's coffee break time! ;)
masak O RLY? 12:49
jnthn YA RLY
masak well, then.
jnthn could use a break from slide hacking too :) 12:50
masak it's the natural breaking point :P
jnthn :P
jnthn break that! 12:50
I mean, er, stop :P
pmichaud good afternoon, #perl6 13:10
phenny pmichaud: 11:51Z <masak> tell pmichaud (and other interested parties): I've written up a few thoughts on macros, macro examples, macro semantics, and macro corner cases. gist.github.com/1148915
masak pmichaud: I now believe hygienic macros can underpin short-circuiting ops. 13:17
pmichaud: not entirely clear how it interacts with reduction ops, though. 13:18
nine From rakudo.org/how-to-get-rakudo-nom/: "which means that subroutines are preserved after they are defined, but variables are not" 13:26
nine is this actually true still? 13:26
masak what do you mean by 'preserved'? 13:27
tadzik check :)
PerlJam nine: no. 13:28
[Coke] parrot release probably late afternoon given $DAYJOB. 13:29
PerlJam nine: at least, variables are "preserved" from line to line in the REPL
nine PerlJam: that's what I see in nom 13:30
TimToady nom: sub foo {...}␤[<a b c>].say 13:45
p6eval nom: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 2␤»
TimToady bug ^^
pmichaud masak: reduction ops don't have to preserve short-circuiting 13:50
masak pmichaud: macros and short-circuiting: gist.github.com/1149126 13:51
pmichaud: oh, they don't? then they just have their own defined semantics, I cguess.
*guess 13:52
perl6: my $a = True; my $b = False; ($a && $b) = 42; say $a; say $b 13:54
p6eval pugs: OUTPUT«*** Can't modify constant item: VBool False␤ at /tmp/FbTkWMPu6b line 1, column 30-45␤»
..rakudo 922500, niecza v8-52-g3afe236: OUTPUT«Bool::True␤42␤»
masak nom: my $a = True; my $b = False; ($a && $b) = 42; say $a; say $b
p6eval nom: OUTPUT«Bool::True␤42␤»
masak hm. not sure my macro can do that.
maybe it's better to take a capture, then.
jnthn capture? 13:56
tadzik great, now Damian put a burden on me :) 13:57
masak jnthn: yes, the prefix:<\> thing.
colomon tadzik++
tadzik colomon: he said "oh, that's tricky, that doesn't have to appear in the first version [of the Pod parser]. But if it does, I'd be very impressed!" 13:58
goddamnit :)
masak tadzik: *or* you could spec it to be sane instead :P
tadzik I don't think that'd impress Damian :P
pmichaud masak: I don't think the macro should have a problem with that.
masak pmichaud: I can parse the words of that, but I don't understand what you wanted to say. 13:59
'should' is too ambiguous.
pmichaud 13:54 <masak> nom: my $a = True; my $b = False; ($a && $b) = 42; say $a; say $b
masak well, I used ::= 14:00
pmichaud I think the macro you wrote would adequately preserve that behavior.
looking again
jnthn If it's a compile time transform, I'd expect so
masak I already changed it to making a capture.
pmichaud I think a capture would be wrongish.
masak I'm not sure ::= would work. 14:01
pmichaud why not := , ooc?
masak that's probably better.
masak changes it to that
colomon sorear: I'd consider using System.Numerics.Complex, except I can't seem to find it in my mono... 14:02
masak ok, changed to := 14:04
perl6: my $a = 42; my $b := $a; $b = 5; say $a
p6eval pugs, rakudo 922500, niecza v8-52-g3afe236: OUTPUT«5␤»
masak yeah, that should work :) 14:05
nom: my $a = 42; my $b := $a; $b = 5; say $a
p6eval nom: OUTPUT«5␤»
TimToady nom: my @x; @x = @x.map({"$_ $_"}); # BUG 14:06
p6eval nom: OUTPUT«splice() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:3289␤ in method gimme at src/gen/CORE.setting:3628␤ in method eager at src/gen/CORE.setting:3604␤ in method STORE at src/gen/CORE.setting:4008␤ in mu <anon> at /tmp/A6YnQBq6Ru:1␤ in mu <ano…
masak looks on and suppresses his rakudobug submitting reflex 14:07
pmichaud nom: my @x = @x.map($_);
moritz stop chatting so much while I'M backlogging :-)
masak pmichaud: you were talking about making nom master, like, soon? :>
p6eval nom: OUTPUT«Method 'count' not found for invocant of class 'Any'␤ in method reify at src/gen/CORE.setting:3384␤ in method reify at src/gen/CORE.setting:3289␤ in method reify at src/gen/CORE.setting:3289␤ in method gimme at src/gen/CORE.setting:3628␤ in method eager at src/gen/CORE.…
pmichaud nom: my @x; @x = @x.map($_); 14:08
p6eval nom: OUTPUT«Method 'count' not found for invocant of class 'Any'␤ in method reify at src/gen/CORE.setting:3384␤ in method reify at src/gen/CORE.setting:3289␤ in method reify at src/gen/CORE.setting:3289␤ in method gimme at src/gen/CORE.setting:3628␤ in method eager at src/gen/CORE.…
jnthn nom: my @x; @x = @x.map({.say;"$_ $_"}); # BUG
p6eval nom: OUTPUT«splice() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:3289␤ in method gimme at src/gen/CORE.setting:3628␤ in method eager at src/gen/CORE.setting:3604␤ in method STORE at src/gen/CORE.setting:4008␤ in mu <anon> at /tmp/fDBTOZ6n_m:1␤ in mu <ano…
pmichaud ....count?
jnthn pmichaud: You missed curlies
moritz nom: my @x; @x.map({;}) 14:09
p6eval nom: ( no output )
moritz nom: my @x; @x.map({;}).sink
p6eval nom: OUTPUT«Method 'sink' not found for invocant of class 'List'␤ in mu <anon> at /tmp/JDUwptb9LO:1␤ in mu <anon> at /tmp/JDUwptb9LO:1␤␤»
pmichaud nom: my @x; @x = @x.map({;$_});
p6eval nom: OUTPUT«splice() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:3289␤ in method gimme at src/gen/CORE.setting:3628␤ in method eager at src/gen/CORE.setting:3604␤ in method STORE at src/gen/CORE.setting:4008␤ in mu <anon> at /tmp/ocq_4WANDN:1␤ in mu <ano…
moritz nom: my @x; @x.map({;}).eager
p6eval nom: ( no output )
TimToady nom: my @x; @x[0][0] = 2;
p6eval nom: OUTPUT«Cannot assign to a non-container␤ in mu <anon> at /tmp/LWQO1nla9o:1␤ in mu <anon> at /tmp/LWQO1nla9o:1␤␤»
pmichaud autoviv nyi, I think.
TimToady so far I'm 0 for 3 on running RC examples on nom :/ 14:10
jnthn pmichaud: Maybe somehing in list assignment uses splice, but doesn't ensure the storage is allocated
nine Let's say, I modified nqp/src/stage2/gen/NQPHLL.pm. How can I actually recompile rakudo? make doesn't see any reason to do anything... 14:11
pmichaud jnthn: no, it says it's happening in reify
TimToady is autoviv supposed to work in nom?
pmichaud nine: don't modify the generated files
jnthn nine: gen = generated
nine ah...good to know 14:12
where does it come from then?
pmichaud TimToady: autoviv of arrays/hashes from Any is nyi, I think.
nqp/src/HLL
TimToady but @x above isn't Any, surely
pmichaud @x[0] is 14:13
nom: my @x; say @x[0].WHAT
p6eval nom: OUTPUT«Any()␤»
masak rakudo: class C { has $.x }; say min [C.new(:x(42)), C.new(:x(5)), C.new(:x(17))], :by{ .x } 14:14
p6eval rakudo 922500: OUTPUT«C()<0x3d2a710> C()<0x3d24b68> C()<0x3d23d08>␤»
nine So let's say I modified nqp/src/HLL/Compiler.pm. How can I recompile rakudo now? :)
masak rakudo: class C { has $.x }; say min (C.new(:x(42)), C.new(:x(5)), C.new(:x(17))), :by{ .x }
p6eval rakudo 922500: OUTPUT«C()<0x509bce8>␤»
masak heh :)
pmichaud nine: you actually would have to recompile and reinstall nqp
masak rakudo: class C { has $.x; method gist { self.x } }; say min (C.new(:x(42)), C.new(:x(5)), C.new(:x(17))), :by{ .x } 14:15
pmichaud so, cd nqp; make; make install
p6eval rakudo 922500: OUTPUT«C()<0x3d42210>␤»
TimToady so basically autoviv doesn't work
pmichaud then go back and recopmile rakudo
masak rakudo: class C { has $.x; method Str { self.x } }; say min (C.new(:x(42)), C.new(:x(5)), C.new(:x(17))), :by{ .x }
p6eval rakudo 922500: OUTPUT«5␤»
nine pmichaud: aah....many thanks
masak \o/
pmichaud TimToady: it should be easy for me to restore
masak just did a 'min :by gather loop take' for the first time 14:17
very nice for circular linked lists.
masak ooh, I can use infix:<...> instead of 'gather loop'! 14:18
TimToady 0 for 4 now: Method 'chars' not found for invocant of class 'Match'
pmichaud .chars needs to be defined in Cool 14:18
TimToady I don't get the impression we're quite ready to cut over 14:19
pmichaud well, it only affects developers
(the nom->master switch)
masak should we make a punch-list for found bugs, too?
moritz nom: say 5.chars
p6eval nom: OUTPUT«1␤»
pmichaud it doesn't affect end-users until it appears in a release
still, e we may be a premature.
masak pmichaud: if it only affects developers, why is it important at all to merge? 14:20
pmichaud so we can more accurately track bugs 14:21
TimToady and most people who come onto #perl6, we tell to track HEAD
pmichaud we do?
hmmm
pmichaud it's been a while since I've recommended that newbies track HEAD 14:22
tadzik nesting pod blocks in formatting codes is evil
flussence nom is pretty usable now that "use" works, but it still doesn't pass any tests in Text-Tabs-Wrap :( 14:22
pmichaud oh. Capture isn't (yet) Cool. :-( 14:23
Not sure it should be.
rakudo: say Capture ~~ Cool
p6eval rakudo 922500: OUTPUT«Bool::True␤»
moritz to me a Capture is something like a list and and a hash combined, both of which are Cool 14:24
I'd be surprised if it weren't Cool
tadzik no, seriously. It's evil 14:25
moritz nom: say 1.*sqrt
p6eval nom: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤ in method sqrt at src/gen/CORE.setting:2012␤ in method dispatch:<.*> at src/gen/CORE.setting:641␤ in mu <anon> at /tmp/SLyRXhYHWw:1␤ in mu <anon> at /tmp/SLyRXhYHWw:1␤␤»
tadzik I'm now I'm biased
flussence gist.github.com/1149209 - I've no idea what that regex error means... 14:27
moritz flussence: it means "you're using a regex feature that is NYI" 14:28
flussence oh
flussence nom: m:p/123/ 14:29
p6eval nom: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in mu <anon> at /tmp/Euj9Z2NgnD:1␤ in mu <anon> at /tmp/Euj9Z2NgnD:1␤␤»
flussence erk
nom: 'abc' ~~ m:p/123/
p6eval nom: ( no output )
flussence not that then... niecza complains about :p there
moritz pmichaud, others: gist.github.com/1149217 is a summary of how nom handles my Perl 6 modules 14:30
pmichaud I'm fine with switching Capture to Cool for now 14:32
masak just saw this: software.intel.com/en-us/blogs/2011...-has-come/ 14:34
looks like it's attacking the same problems we want to attack with Perl 6 and parallelism.
moritz pmichaud: for :16($string) to work, we need to access radcalc from runtime, or partially re-implement it in the setting 14:35
pmichaud: which one would you prefer? and is there a simple way to make routines in Actions.pm available at run time? 14:36
pmichaud moritz: I thought we had decided that some formats would be evaluated via eval. 14:42
colomon moritz: all the string to number routines are needed for both actions and the setting, no?
pmichaud or the equivalent of eval.
I don't think we'll be making Actions.pm routines available to the setting.
my current thinking has been that we'll have the string-to-number converter be a method on the compiler object, and then use that. 14:43
(yes, Perl6::Compiler) 14:44
jnthn Can get at it with compreg also.
masak Perl 6 makes code look nicer: gist.github.com/1149245 14:45
colomon masak++ 14:46
masak that's from the dlx-simple project. 14:47
tadzik I like the fact that it's more readable :) 14:47
masak objectively, it reduces cruft and duplication. 14:48
colomon doesn't p5 have min too? 14:48
masak it does, in List::Util 14:48
masak checks it out
the problem is that I'm not operating on a list here, but on a circularly linked list. 14:49
TimToady I hope you're not thinking of the min as outside the ...
because it's not
masak oh noes
TimToady oh wait
nevermind
masak isn't it a listop?
phew. 14:50
HAHAHA DISREGARD THAT
TimToady but I'm not sure the :by will attach right 14:50
masak it's just a named arg, no? 14:50
TimToady it looks like the first arg to the ... 14:51
mux the "return min :by(*.S), $r.R, *.R ...^ $r;" line looks J code
masak :>
TimToady: I thought that named args to an op had to come after the op. 14:52
mux I think I meant R
whatever :-)
TimToady but ... is looser than ,
masak yeah.
it looks wrong too.
adding parens.
PerlJam masak: indeed. 14:53
sorry, that was a buffer from a while ago. I have no idea what I was "indeeding" then
tadzik too many named arguments: 1 passed, 0 used 14:56
tadzik in mu !cursor_init at src/stage2/QRegex.nqp:491 14:56
masak PerlJam: intriguing :)
tadzik is that some common thing?
masak PerlJam: anyway, I'm glad you agree :P 14:57
PerlJam heh
tadzik what patches does ufo need to work on nom now? 14:59
moritz none
tadzik ===SORRY!=== 15:00
maximum recursion depth exceeded
before the first MAIN line
moritz huh, worked the last time I tried it
tadzik same here
moritz might be a MAIN thing
tadzik it works if you rename MAIN to NOTMAIN and adda NOTMAIN(); at the end
Could not find sub &warn in File::Tools 15:01
moritz nom: say ':16<A>'.Numeric 15:02
p6eval nom: OUTPUT«0␤»
moritz nom: say 0b11 15:05
p6eval nom: OUTPUT«3␤»
moritz nom: say 0B11
p6eval nom: OUTPUT«===SORRY!===␤Confused at line 1, near "say 0B11"␤»
moritz std: say 0B11
p6eval std 516268a: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/SLWUKIoc7r line 1:␤------> say 0⏏B11␤Two terms in a row at /tmp/SLWUKIoc7r line 1:␤------> say 0⏏B11␤ expecting any of:␤ POST␤ bracketed…
moritz nom: my int $x = 1; pir::inc($x); say($x) 15:08
p6eval nom: OUTPUT«increment() not implemented in class 'Int'␤ in mu <anon> at /tmp/Msrl_YoIUZ:1␤ in mu <anon> at /tmp/Msrl_YoIUZ:1␤␤»
tadzik my modules summary: gist.github.com/1149323 15:09
mishin Hi YAPC 15:14
masak mishin: hi! 15:15
JimmyZ hello
TimToady mishin: welcome
mishin Hi Masak, my presentation not very successful;)) 15:17
tadzik you didn't lose your mind, unlike me yesterday :) 15:18
masak mishin: yes it was. 15:23
moritz what was it about? 15:23
JimmyZ tell jnthn www.jnthn.net/papers/2008-fpw-teach...slides.pdf is Not Found 15:38
JimmyZ phenny: :tell jnthn www.jnthn.net/papers/2008-fpw-teach...slides.pdf is Not Found 15:38
phenny: tell jnthn www.jnthn.net/papers/2008-fpw-teach...slides.pdf is Not Found
phenny JimmyZ: I'll pass that on when jnthn is around.
dalek kudo/nom: 15ef06f | moritz++ | src/ (2 files):
implement numification of strings like :16<BEEF>, and :16("BEEF") style conversions

This is only a first rough cut, and does not support a lot of features
16:45
ast: 8db8866 | moritz++ | S32-str/numeric.t:
unfudge numeric.t for rakudo
16:55
harleypig Is there a metacpan channel on freenode? what I'm finding via google seems to indicate there is, but joining #metapcan here shows me as the only member. 17:16
flussence github.com/CPAN-API/cpan-api/wiki - “irc: #metacpan on irc.perl.org” 17:23
diakopter TimToady: did you see the std crash I msgd a day or two ago 17:26
mishin , 17:27
hi how beer
? 17:28
sorear colomon: I think System.Numerics.Complex is 4.0 oly 17:39
colomon: using someone else's Complex class seems like it would involve more glue code than work it saves. (Note that I did use someone else's BigInteger class) 17:41
colomon sorear: shall I expand Niecza's Complex class so it can do some math, then? 17:48
colomon afk # late lunch out 17:51
colomon sorear: PS I mean the C# Complex class, not the p6 one. 17:57
[Coke] ~~ 18:32
sorear colomon: it seems to me as though the math should be done in bif_mul et al 19:23
colomon sorear: the problem with that is some of the functions can get very hairy. 19:31
for instance, asin($x) is -1i * log($x * i + sqrt(1 - $x * $x))
if you write that out in terms of Real math, it gets pretty ugly 19:32
sorear is that formula correct in all cases?
colomon sorear: as far as I know. 19:33
sorear well then I guess there is a need for Complex add/mul/div/sqrt routines 19:38
I wish I could remember the good reason I had for making Complex a class rather than a struct (the other reason not to use .net Complex - it was a struct)
Util sorear, colomon: that formula is correct for all real and complex values (where asin is defined). 19:54
colomon Util++ 19:55
sorear Util++ # that formula gave me quite a few "ONLY VALID FOR REAL NUMBERS WITHIN A (-1, 1) RADIUS OF CONVERGENCE" vibes. good to know those were wrong. 20:02
Util sorear: When imaginary_part_of(z)==0 and abs(z) > 1, then undefined. 20:07
Good pic here, after "In the GNU C library": mathworld.wolfram.com/InverseSine.html
We must all be wary of those vibes. Not every Complex trig formula on the web is correct. 20:08
bbkr nom: say 9223372036854775807 % 0x100 20:13
p6eval nom: OUTPUT«0␤»
bbkr looks like bug 20:15
colomon nom: say
p6eval nom: OUTPUT«␤»
colomon nom: say 9223372036854775807
p6eval nom: OUTPUT«-9223372036854775808␤»
PerlJam heh
moritz bbkr: big numbers are known to be buggy in rakudo
bbkr rakudo: say 9223372036854775807 20:16
p6eval rakudo 922500: OUTPUT«9223372036854775807␤»
bbkr rakudo: say 9223372036854775807 % 0x100 20:17
p6eval rakudo 922500: OUTPUT«0␤»
moritz rakudo: say 9223372036854775806 % 0x100 20:18
p6eval rakudo 922500: OUTPUT«0␤»
moritz rakudo: say 922337203685477580 % 0x100
bbkr say works correctly in master branch, but modulo is broken. that stops my work on Mongo driver, as 64b integers packing/unpacking is needed :(
p6eval rakudo 922500: OUTPUT«0␤»
moritz rakudo: say 92233720368547758 % 0x100 20:19
p6eval rakudo 922500: OUTPUT«176␤»
bbkr i don't even understand the nature of the bug here to hack workaround 20:22
bbkr rakudo: say 9223372036854775807 - 9223372036854775806 # this one shattered my math faith 20:25
p6eval rakudo 922500: OUTPUT«0␤»
sorear bbkr: rakudo doesn't support big integers 20:28
moritz rakudo: say 9223372036854775807.WHAT 20:29
p6eval rakudo 922500: OUTPUT«Int()␤»
bbkr rakudo: say (9223372036854775807 - 0).WHAT # it gets mangled into Num, loosing last 5 places of precision 20:30
p6eval rakudo 922500: OUTPUT«Num()␤» 20:31
masak greetings, #perl6. 20:32
wow. conferences are great.
sorear hi masak. sad I'm not there. 20:34
masak there'll be more YAPCs.
masak sorear: up-front declaration: I'll mention your Little Animal Farm implementation tomorrow during a lightning talk, provided we get to do the lightning talk :) 20:35
(there's competition over the last available slot)
lue: shouldn't that be '0b' »~» @a ? 20:36
sorear *muahaha*
sorear needs to figure out 'travel', since there probably won't be a YAPC in walking distance of eir house anytime soon. 20:37
colomon sorear: you could make a bid to host it at your house in 2013... ;) 20:38
sorear Hah
T'is a bit small. 20:39
I don't think the fire department would be too happy with 1000s of guests in a <<1000 m^2 residence 20:40
benabik sorear: Don't tell them. ;-)
masak forgiveness > permission ;)
masak updates his macro musings 20:44
sorear masak: macro musings? 20:49
masak sorear: gist.github.com/1148915 20:52
sorear: gist.github.com/1149126 20:53
masak sorear: implementing macros in nom suddenly seems quite doable. 20:53
felher std: multi sub foo(1) { say "got minus one"; }; multi sub foo($x) { say "got $x"; } 20:54
p6eval std 516268a: OUTPUT«ok 00:01 123m␤» 20:54
felher std: multi sub foo(-11) { say "got minus one"; }; multi sub foo($x) { say "got $x"; }
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed parameter at /tmp/nu4lq5CAv4 line 1:␤------> multi sub foo(⏏-11) { say "got minus one"; }; multi sub␤ expecting any of:␤ name␤ new name to be defined␤ parameter␤ routine_def␤ signature␤Parse
..failed␤FAILED…
felher okay, apart from the obvius error that neither 1 nor -11 is minus one, why can't i pattern-match on -1, but on 1? 20:55
masak felher: looks like a bug.
flussence rakudo: multi sub foo(-11) { say "got minus one"; }; multi sub foo($x) { say "got $x"; }
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Malformed parameter at line 22, near "-11) { say"␤»
flussence dunno, should work IMO 20:55
masak I see *why* it's happening.
masak not sure it should. 20:55
masak submits bug report 20:56
flussence is "-" a special character inside ()s?
masak yes.
felher masak: thnx. :)
flussence ah
masak flussence: basically, normal expression evaluation doesn't happen inside :()
flussence: it's like a mini-language with its own rules and operators.
flussence rakudo: multi sub foo( -11 ) { } # spaces?
p6eval rakudo 922500: OUTPUT«===SORRY!===␤Malformed parameter at line 22, near "-11 ) { } "␤»
flussence hm, ok
masak nope :) 20:57
it's just that a good case can be made for negative numbers, I think.
masak felher++ 20:57
sorear masak: of course implementing macros in nom is doable - nom has BEGIN 20:59
lue hello world! o/ 21:01
sorear masak: temp FOO means (TEMP { FOO.TEMP }; FOO), unless FOO is a simple $*variable, in which case it means my FOO = CALLER::<FOO>>
soh_cah_toa i'm having some problems w/ regexes in the p6 port of IRC::Utils i've started 21:02
i need a regex to match a valid channel name which must begin w/ a '#' or '&' and cannot contain a newline, whitespace, null, commas, or colons. here's what i have:
^ <['#' '&']>**1 <-[<.ws> \07 \0 \012 \015 , \:]>+ $
but that doesn't seem to work. i'm almost positive that it's the <.ws> that's messing it up. am i doing something wrong here?
lue nom: say "0b" 􏿽xBB~􏿽xBB <1 10 11>; say "0b" 􏿽xAB~􏿽xBB <1 10 11>; 21:04
p6eval nom: OUTPUT«===SORRY!===␤Confused at line 1, near "say \"0b\" \ufffd"␤»
soh_cah_toa also, i'm trying this on 2011.07 master 21:05
sorear masak: your implementation of && is almost right, but for the fact that the $lhs-bound binding needs to be much more raw
lue
.oO(why U+FFFD?)
flussence nom: say ('#perl 6' ~~ /^ <['#' '&']>**1 <-[<.ws> \07 \0 \012 \015 , \:]>+ $/) 21:06
sorear lue: your client isn't correctly configured to send UTF-8 to the channel
p6eval nom: OUTPUT«#perl 6␤»
flussence hm
nom: say ('not-a-#perl 6' ~~ /^ <['#' '&']>**1 <-[<.ws> \07 \0 \012 \015 , \:]>+ $/)
p6eval nom: OUTPUT«␤»
sorear masak: my $x := EXPR discards the flatteny bit on EXPR, and also forces EXPR to autovivify
soh_cah_toa for me, it evaluates to Bool::False regardless of whether it's valid or not 21:07
masak sorear: ah, yes. 21:08
sorear: feel free to fork and implement it right. 21:09
flussence not sure about the whitespace, but I can shorten it a bit:
nom: say ('#perl 6' ~~ /^ <[#&]> <-[<.ws> \07 \0 \012 \015 , \:]>+ $/)
p6eval nom: OUTPUT«#perl 6␤»
soh_cah_toa weird, i thought the # and & needed to be quoted b/c they had special meaning 21:10
or one of them did, at least
sorear masak: I don't think it can be implemented right
soh_cah_toa: not in character classes 21:11
soh_cah_toa ok
masak sorear: :(
sorear also I think rakudo still does escapes in character classes wrong
masak yes.
soh_cah_toa yes 21:11
soh_cah_toa the \07 and such don't recognize right unless the matched string actually contains that exact escape sequence 21:12
soh_cah_toa but i know it's the <.ws> rule 21:12
also tried with \s
sorear niecza: say ('not-a-#perl 6' ~~ /^ <['#' '&']>**1 <-[<.ws> \07 \0 \012 \015 , \:]>+ $/) 21:13
p6eval niecza v8-52-g3afe236: OUTPUT«===SORRY!===␤␤Please backslash # for literal char or put whitespace in front for comment at /tmp/jpVHcKmnkc line 1:␤------> say ('not-a-#perl 6' ~~ /^ <['#⏏' '&']>**1 <-[<.ws> \07 \0 \012 \015 , \␤␤Parse failed␤␤»…
sorear niecza: say ('not-a-#perl 6' ~~ /^ <[\# &]>**1 <-[<.ws> \07 \0 \012 \015 , \:]>+ $/)
oh right
p6eval niecza v8-52-g3afe236: OUTPUT«Match()␤»
sorear # does need backslash
soh_cah_toa ok
lue nom: say "0b" »~» <1 10 11>; say "0b" «~» <1 10 11>; 21:13
p6eval nom: OUTPUT«0b1␤0b1 0b10 0b11␤»
lue masak: this is why I used «~» . »~» wouldn't work right. 21:14
sorear masak: we need a new primitive for context-free binding of expressions.
masak right.
sorear: yes.
lue: yes, I see now.
flussence /^ <[\# &]> .*? [ <.ws> | <[\07 \0 \012 \015 , \:]> ] $/ # ugly, but might work 21:15
sorear masak: it would be doable using my $lhs-bound = \{{{ $lhs }}};, but the thought of creating useless extra Capture objects makes me twitchy
masak hm.
flussence bah, doesn't seem to work locally 21:16
sorear at one point I misunderstood the spec and thought my ¢foo := EXPR would make a contextless binding
we could defictionalize that syntax
benabik ¢?
sorear benabik: yes, cent symbol, the one non-ASCII character that you must have for Perl 6 because it has no ASCII synonym 21:17
benabik sorear: Fortunately, that's Opt-4 on my keyboard… But what does it mean?
sorear can be short for 'capture' or 'cursor' 21:18
it's masak` and he's tipping his hat!
flussence ¢ can also mean 1% of a $ :) 21:19
sorear I've also seen it used to mean 1% of a € or Ł
wait, that last one wasn't right
masak` rakudo: sub infix:<Y> (@a, @b) { my ($i, $j) = 0, 0; gather repeat while $i || $j { take [$i, $j]; $i = ($i + 1) % @a; $j = ($j + 1) % @b } }; my @a = 1..5; my @b = 1..12; .say for @a Y @b 21:20
p6eval rakudo 922500: OUTPUT«0 0␤1 1␤2 2␤3 3␤4 4␤0 5␤1 6␤2 7␤3 8␤4 9␤0 10␤1 11␤2 0␤3 1␤4 2␤0 3␤1 4␤2 5␤3 6␤4 7␤0 8␤1 9␤2 10␤3 11␤4 0␤0 1␤1 2␤2 3␤3 4␤4 5␤0 6␤1 7␤2 8␤3 9␤4 10␤0 11␤1 0␤2 1␤3 2␤4 3␤0 4␤1 5␤2 6␤3 7␤4 8␤0 9␤1 10␤2 11␤3 0␤4 1␤0 2␤1 3␤2 4␤3 5␤4 6␤0 7␤1 8␤2 9␤3 10␤4 11␤»…
masak` I finally figured out what a Y metaoperator should do ;)
masak` 'night, #perl6. 21:22
sorear is there some way to tell Xkb to dump Compose mappings? 21:24
flussence `xmodmap -pk`? 21:25
wait, I don't think that does dead keys...
oh it does, the output's a little hard to read though 21:26
benabik sorear: Check /usr/X11R6/share/X11/locale/<locale>/Compose ?
lue flussence: after running that command, now I want a keyboard to press all those keys... O.o 21:27
sorear I have no files in /usr/X11R6 except two fonts
benabik Ah, well, old advice I guess.
flussence lue: AltGr & Shift+AltGr get you most of them :)
sorear lue: go look for pictures of the "Space Cadet" keyboard. X11 has Alt, Control, Meta, Shift, Super, Hyper because there was a keyboard with that many shifts once 21:28
flussence (well, X calls it "ISO_Level3_Shift" according to `xmodmap -pm`...)
lue I don't have an AltGr (and I don't think I can turn the alt on the right hand side into one) Old powerbook :/
sorear: I've seen the Space Cadet keyboard. And I want one.
flussence xev will tell you if that right alt is different from the left 21:29
lue both alts come out as Alt_L (although Fn+Alt sends Alt_R . Now I have to see if I can make that do my bidding...) 21:30
flussence argh, Fn keys 21:31
lue [Actually, if it weren't for the need to emulate mouse buttons 2+3, I'd have an Apple key at my disposal as well]
sorear whee, found a list 21:34
sorear £. There. 21:37
sorear .u ǖ 21:40
phenny U+01D6 LATIN SMALL LETTER U WITH DIAERESIS AND MACRON (ǖ)
sorear .u ṻ
phenny U+1E7B LATIN SMALL LETTER U WITH MACRON AND DIAERESIS (ṻ)
benabik .u û 21:41
phenny U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX (û)
sorear .u ǘ
phenny U+01D8 LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE (ǘ)
mberends moritz++: back in Vught, all trains and bike ran on time. Thanks for a nice holiday :) 22:17
sorear o/ MBERENDS 22:18
mberends o/ SOREAR
[Coke] anyone able to git to github from feather? 22:24
sorear [Coke]: I can git to gist.github from feather but not to the main site 22:27
also, as of right now I can pull from the main site 22:28
jnthn oh hai 23:29
phenny jnthn: 15:38Z <JimmyZ> tell jnthn www.jnthn.net/papers/2008-fpw-teach...slides.pdf is Not Found 23:29
sorear hi jnthn 23:31
jnthn o/ sorear 23:32
jnthn probably should not be awake, but is anyway :) 23:33
jnthn gets some sleep ahead of $talk tomorrow 23:52
abercrombie what's the possible date for nom becoming the master branch? Thurs I guess?
sorear afaik, the Wed release will be nom based 23:53
abercrombie oh, that sounds good 23:54
TimToady they may delay the nom cutover a bit 23:58
we found several bugs today, and there's a performance issue to at least diagnose