Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-01-01

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 [Coke] phenny: tell jnthn to check the pull requests for nqp-prep. Also, how to hit gcd in existing nqp-on-parrot?
00:01 phenny [Coke]: I'll pass that on when jnthn is around.
00:04 [Coke] r: say "ü" ~~ /:ignoremark 'u'/
00:04 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex modifier :ignoremark�at /tmp/93aS3IV3lu:1�------> [32msay "ü" ~~ /:ignoremark[33m�[31m 'u'/[0m�»
00:05 * [Coke] opens a ticket for ignoremark
00:06 [Coke] r: say "ü" ~~ /:m 'u'/
00:06 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex modifier :m�at /tmp/2KXVJEYYKz:1�------> [32msay "ü" ~~ /:m[33m�[31m 'u'/[0m�»
00:17 tcpr1347 joined #perl6
00:20 whiteknight joined #perl6
00:20 REPLeffect joined #perl6
00:37 Abcxyz left #perl6
00:44 xenoterracide joined #perl6
00:46 JJ_Brain Hi. Possible P=NP solution http://mathbin.net/133965
00:47 JJ_Brain Thank you
00:57 grondilu JJ_Brain: why do u post this here?
00:58 JJ_Brain arXiv did not accept it.  I think it is right.  I don't know what is wrong
00:58 JJ_Brain thanks
01:01 grondilu you're on #perl6 here.  There are some people who know a bit of maths, but the N=NP problem is probably way above their competence.  Try #maths
01:01 JJ_Brain ok. thanks
01:02 grondilu correction:  #math, not #maths
01:05 grondilu Or if you think u found the solution, just post it directly to the Clay institute.  And get you million dollar price.
01:05 JJ_Brain they say it has to be in a journal
01:06 JJ_Brain or not to them directly.  Not sure if it has to be in a journal
01:07 sorear JJ_Brain: show it to people who are actually competent, expect it to get shot down
01:07 JJ_Brain they are busy.  I am trying to reach them
01:08 sorear JJ_Brain: there have been literally hundreds of wrong P v NP proofs published.  the only people who care to read more are the people who can do it fastest
01:08 JJ_Brain i have emailed a few
01:09 JJ_Brain they have not replied yet
01:09 JJ_Brain I have checked blogs too
01:09 grondilu Couldn't there be a way of testing this thing with a computer?  I mean, like an one million dollar Euler problem.
01:10 sorear grondilu: computer-checkable proofs need to be written to two orders of magnitude higher detail than human-targetted proofs
01:10 sorear if JJ_Brain is willing to put in the time to make a machine-checkable version of eir proof, I bet a lot more people will give em the time of day
01:10 grondilu ok.  too bad.  That would be so cool if a millenium problem could be as easy to check as on the project euler.
01:11 grondilu sorear: the solution could be expected to be so large that brute force would be pointless
01:11 JJ_Brain yes. I tried to use a code from CPAN in Perl5
01:12 JJ_Brain thanks grondilu for project Euler
01:12 grondilu lol, u didn't know about it?
01:13 JJ_Brain 1st time
01:14 grondilu I suggest you try it before you try solving a Clay millenium problem :)
01:14 sorear JJ_Brain: another good way to make people pay attention would be to present a string which MD5's to the first 128 fractional binary digits of pi
01:15 grondilu lol
01:15 flussence .oO( or signing the text with their own private gpg key... )
01:16 grondilu would solving N=NP allow for such powerful stuff??
01:16 JJ_Brain thanks. I'll remember you grondilu and sorear
01:17 sorear grondilu: first, it's P=NP
01:17 flussence it's commonly believed that SSL would fall apart if there was an O(n) way to factorise huge numbers
01:17 sorear grondilu: second, there are two ways to solve this.  P=NP or P!=NP
01:17 sorear 99.99% of the academic community beleives P != NP
01:17 sorear a proof of P = NP would be extremely suprising
01:17 grondilu ok
01:18 sorear if JJ_Brain's ideas pan out, he's $6M richer, because a P=NP proof can be used to quickly solve any math problem, including the other five millenium problems
01:19 grondilu I'm skeptical.
01:19 sorear I'm skeptical too.
01:20 JJ_Brain it's ok. thanks.
01:20 grondilu P=NP  means that there is a quick way to solve a NP problem, but it doesn't mean it's easy to find.
01:20 sorear grondilu: I'm a constructivist.
01:21 flussence .oO( I get the impression from that pastebin that the writer thought it meant converting a polynomial equation to a non-polynomial... )
01:24 grondilu sorear: some demonstration are very short, but also freakingly smart.  I don't see why it could not be possible to prove that a short demonstration exists, and yet being totally unable to tell what it is.
01:28 JJ_Brain joined #perl6
01:28 grondilu for instance by Reductio ad absurdum.  You first assume that all solutions are very difficult.  You somehow conclude to something false.  So you have your proof that there must be at least one simple solution.  And yet you have no idea about it.
01:30 sorear grondilu: I said I'm a constructivist.
01:31 sorear P = NP will not really be proved until there is a concrete algorithm.
01:38 grondilu I'm not sure I follow you.  What do you expect such an algorithm to do exactly?   Doesn't P=NP mean all easy-to-check problem are also easy to solve.   So there can not be a single algorithm that proves them all, can it?
01:42 sorear grondilu: there absolutely can be a single algorithm that proves them all
01:43 sorear actually that's necessary from the definition of P
01:43 sorear if P=NP, then 3SAT is in P
01:43 sorear which means that there is an algorithm which solves 3SAT in polynomial time
01:43 grondilu nevermind.  I obviously do not understand well this problem.  I'll read more about it one of these day.
01:46 MikeFair_ joined #perl6
01:56 grondilu anybody working on Buf.pm currently?
01:57 * grondilu is looking forward a full implementation of pack/unpack for some reason.
02:06 sorear r: m/:m/
02:06 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex modifier :m�at /tmp/lPbh_qZKTF:1�------> [32mm/:m[33m�[31m/[0m�»
02:06 sorear r: m/:a/
02:06 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex modifier :a�at /tmp/G2xm9pworV:1�------> [32mm/:a[33m�[31m/[0m�»
02:30 Ayiko happy 2013 for all!
02:31 Ayiko and [Coke]: > say(pir::interpinfo__Si(30)); # gives MSWin32 on Win7 (64bit)
02:32 sorear hi Ayiko
02:33 Ayiko hey :)
02:36 FROGGS_ joined #perl6
02:37 fgomez joined #perl6
02:45 JJ_Brain joined #perl6
02:47 bluescreen10 joined #perl6
02:59 tcpr1347 joined #perl6
03:01 orafu joined #perl6
03:14 grondilu rn: say "happy {[*] <3 11 61>} everyone :) !"
03:14 p6eval rakudo 13e805, niecza v24-12-g8e50362: OUTPUT«happy 2013 everyone :) !␤»
03:28 sftp joined #perl6
03:45 Targen joined #perl6
04:04 orafu joined #perl6
05:50 JJ_Brain joined #perl6
06:03 Targen joined #perl6
06:13 xenoterracide joined #perl6
06:23 a_b joined #perl6
06:23 a_b any1 know any unix irc chats?
06:34 rindolf joined #perl6
07:49 JJ_Brain joined #perl6
07:54 rindolf joined #perl6
08:33 kaare_ joined #perl6
08:42 GlitchMr joined #perl6
08:52 quester joined #perl6
08:53 SamuraiJack joined #perl6
09:07 JJ_Brain joined #perl6
09:08 JJ_Brain sorear I acknowledged you in a new paper.  You reminded me to put data
09:08 JJ_Brain thanks
09:21 denisboyun joined #perl6
09:32 moritz \o
09:33 sorear I'm actually kind of scared by the thought that my name will be attached to a PvNP paper
09:33 sorear at least I still have neil mitchell's work when people look for academoidal references to stefan o'rear
09:36 sjn o/
09:36 sjn happy new year, #perl6 :)
09:36 * moritz echoes that wish
09:36 sorear y tu, sjn
09:37 sjn strange how some arbitrary position in the orbit around the sun can create a sense of new beginnings :)
09:39 sorear never mind that there are about five different ways to define the *length* of our orbit
09:39 sjn hehe
09:39 sorear but we just got done filling the 2012 bucket with awesome things, and I am *so excited* to see the next time bucket
09:39 JJ_Brain joined #perl6
09:39 * sjn concurs
09:41 rindolf sjn: happy new year.
09:42 Psyche^ joined #perl6
09:46 denisboyun_ joined #perl6
09:53 SamuraiJack joined #perl6
09:57 FROGGS morning
10:00 SamuraiJack joined #perl6
10:03 quester left #perl6
10:05 JJ_Brain joined #perl6
10:06 Kharec joined #perl6
10:17 bowtie joined #perl6
10:39 PacoAir joined #perl6
11:11 JJ_Brain joined #perl6
11:24 JJ_Brain joined #perl6
11:24 moritz r: sub f() { fail 'foo' }; f; 1
11:24 p6eval rakudo 13e805:  ( no output )
11:24 moritz huh
11:24 moritz that should explode.
11:25 FROGGS r: fail 'foo'; 1
11:25 p6eval rakudo 13e805: OUTPUT«foo␤current instr.: 'throw' pc 329717 (src/gen/CORE.setting.pir:147558) (src/gen/CORE.setting:9197)␤called from Sub 'sink' pc 359116 (src/gen/CORE.setting.pir:159445) (src/gen/CORE.setting:10354)␤called from Sub 'MAIN' pc 464 (src/gen/perl6.pir:170) (src/main.nqp s…
11:25 FROGGS weird
11:27 moritz r: sub f() { fail 'foo' }; my $x := f; $x.sink;
11:27 p6eval rakudo 13e805: OUTPUT«foo␤  in method sink at src/gen/CORE.setting:10354␤  in block  at /tmp/fzQIeEhBNN:1␤␤»
11:27 moritz r: sub f() { .say for 1 }; f; 0
11:27 p6eval rakudo 13e805: OUTPUT«1␤»
11:28 moritz so it's sunk
11:28 moritz r: sub f() { fail 'foo' }; my $x := f; say $x.DEFINITE
11:28 p6eval rakudo 13e805: OUTPUT«True␤»
11:28 moritz r: sub f() { fail 'foo' }; my $x := f; say $x.defined
11:28 p6eval rakudo 13e805: OUTPUT«False␤»
11:33 moritz rakudo: say "abcd".index("xyz") == 0
11:33 p6eval rakudo 13e805: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:3053␤  in sub infix:<==> at src/gen/CORE.setting:2976␤  in block  at /tmp/kMjXN8mBY6:1␤␤»
11:45 moritz r: sub f() { fail 'foo' }; my $x := f; nqp::say nqp::can($x, 'f')
11:45 p6eval rakudo 13e805: OUTPUT«foo␤  in method <anon> at src/gen/CORE.setting:10351␤  in  at src/gen/Metamodel.pm:2404␤  in any find_method_fallback at src/gen/Metamodel.pm:2392␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/LnX0Ta5LP7:1␤␤»
11:46 moritz r: sub f() { fail 'foo' }; my $x := f;
11:46 p6eval rakudo 13e805: OUTPUT«foo␤current instr.: 'throw' pc 329717 (src/gen/CORE.setting.pir:147558) (src/gen/CORE.setting:9197)␤called from Sub 'sink' pc 359116 (src/gen/CORE.setting.pir:159445) (src/gen/CORE.setting:10354)␤called from Sub 'MAIN' pc 464 (src/gen/perl6.pir:170) (src/main.nqp s…
11:46 moritz r: sub f() { fail 'foo' }; my $x := f; 0
11:46 p6eval rakudo 13e805:  ( no output )
11:46 moritz r: sub f() { fail 'foo' }; my $x := f; nqp::say nqp::can($x, 'f'); 1
11:46 p6eval rakudo 13e805: OUTPUT«foo␤  in method <anon> at src/gen/CORE.setting:10351␤  in  at src/gen/Metamodel.pm:2404␤  in any find_method_fallback at src/gen/Metamodel.pm:2392␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/35FVI0ib4X:1␤␤»
11:46 * moritz doesn't understand this at all
11:50 JJ_Brain joined #perl6
11:50 JJ_Brain joined #perl6
12:17 MayDaniel joined #perl6
12:25 JJ_Brain joined #perl6
12:45 JJ_Brain joined #perl6
13:13 werwerwer joined #perl6
14:00 JJ_Brain joined #perl6
14:08 JJ_Brain joined #perl6
14:30 att__ joined #perl6
15:04 hbg joined #perl6
15:26 birdwindupbird joined #perl6
15:43 JJ_Brain joined #perl6
15:52 orafu joined #perl6
15:53 xinming joined #perl6
16:11 JJ_Brain joined #perl6
16:20 jnthn Happy new year, #perl6 :)
16:20 phenny jnthn: 00:01Z <[Coke]> tell jnthn to check the pull requests for nqp-prep. Also, how to hit gcd in existing nqp-on-parrot?
16:23 dalek nqp-jvm-prep: 921bdb8 | coke++ | t/ (2 files):
16:23 dalek nqp-jvm-prep: Let "make test" work on non-windows
16:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/921bdb85f3
16:23 dalek nqp-jvm-prep: ec0108c | jonathan++ | t/ (2 files):
16:23 dalek nqp-jvm-prep: Merge pull request #1 from coke/921bdb85f3227e385d0c6b1f26388e0afa52fee8
16:23 dalek nqp-jvm-prep:
16:23 dalek nqp-jvm-prep: Let "make test" run on non-windows
16:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/ec0108cb62
16:26 rindolf joined #perl6
16:28 dalek nqp-jvm-prep: 88de844 | jonathan++ | t/ (2 files):
16:28 dalek nqp-jvm-prep: A couple of fixes to Windows detection.
16:28 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/88de84423d
16:31 dalek nqp-jvm-prep: af474ba | coke++ | / (3 files):
16:31 dalek nqp-jvm-prep: Add missing trig ops (via Math & Ops)
16:31 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/af474ba6a9
16:31 dalek nqp-jvm-prep: 0ec328a | coke++ | t/qast.t:
16:31 dalek nqp-jvm-prep: Add tests for trig ops.
16:31 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/0ec328af20
16:31 dalek nqp-jvm-prep: 5ef650f | coke++ | lib/QAST/JASTCompiler.nqp:
16:31 dalek nqp-jvm-prep: Fix atan2 opcode (mapped to wrong function)
16:31 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/5ef650f530
16:31 dalek nqp-jvm-prep: be71db6 | coke++ | docs/LHF.md:
16:31 dalek nqp-jvm-prep: fixup LHF docs
16:31 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/be71db6dcf
16:31 dalek nqp-jvm-prep: 5dab39e | jonathan++ | / (4 files):
16:31 dalek nqp-jvm-prep: Merge pull request #2 from coke/master
16:31 dalek nqp-jvm-prep:
16:31 dalek nqp-jvm-prep: update trig function support.
16:31 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/5dab39ee75
16:35 jnthn phenny: tell [Coke] Thanks - merged those and tweaked the Windows detection. All new tests pass here. Also, you now have a commit bit to the repo proper.
16:35 phenny jnthn: I'll pass that on when [Coke] is around.
16:36 jnthn r: say nqp::p6box_i(nqp::gcd_i(42, 30))
16:36 p6eval rakudo 13e805: OUTPUT«6␤»
16:37 jnthn phenny: tell [Coke] It needs a pir::loadlib__vs('math_ops') or so in NQP, or just do it in Rakudo as nqp::p6box_i(nqp::gcd_i(42, 30)) if you just wanna see the output
16:37 phenny jnthn: I'll pass that on when [Coke] is around.
16:37 JJ_Brain joined #perl6
16:47 dalek nqp-jvm-prep: 7d5255f | jonathan++ | / (2 files):
16:47 dalek nqp-jvm-prep: Implement existskey and deletekey.
16:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/7d5255f3ec
16:47 dalek nqp-jvm-prep: de534b6 | jonathan++ | t/qast.t:
16:47 dalek nqp-jvm-prep: Tests for existskey and deletekey.
16:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/de534b6fd8
16:47 dalek nqp-jvm-prep: 163bf57 | jonathan++ | docs/ROADMAP:
16:47 dalek nqp-jvm-prep: ROADMAP update.
16:47 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/163bf579d8
16:50 [Coke] r: nqp::p6box_i(nqp::gcd_i(42, 30)).say;
16:50 phenny [Coke]: 16:35Z <jnthn> tell [Coke] Thanks - merged those and tweaked the Windows detection. All new tests pass here. Also, you now have a commit bit to the repo proper.
16:50 p6eval rakudo 13e805: OUTPUT«6␤»
16:50 phenny [Coke]: 16:37Z <jnthn> tell [Coke] It needs a pir::loadlib__vs('math_ops') or so in NQP, or just do it in Rakudo as nqp::p6box_i(nqp::gcd_i(42, 30)) if you just wanna see the output
16:50 [Coke] jnthn+=
16:51 [Coke] jnthn++ #even.
16:51 jnthn [Coke]++ # contributing to the Rakudo on JVM effort
16:53 [Coke] jnthn: looks like you have an extra "W" in there.
16:53 [Coke] $c.add_method($m);W ?
16:54 jnthn [Coke]: ooh, where?
16:54 [Coke] t/jast.t, near the top.
16:54 jnthn heh, and it doesn't even break it :)
16:54 jnthn Thanks
16:56 dalek nqp-jvm-prep: 55797ef | jonathan++ | t/jast.t:
16:56 dalek nqp-jvm-prep: Fix typo; [Coke]++.
16:56 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/55797efe7b
17:05 ismail joined #perl6
17:06 spider-mario joined #perl6
17:20 dalek nqp-jvm-prep: c660986 | coke++ | / (4 files):
17:20 dalek nqp-jvm-prep: Add gcd_i
17:20 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/c660986afe
17:20 [Coke] r: nqp::p6box_i(nqp::lcm_i(42, 30)).say;
17:20 p6eval rakudo 13e805: OUTPUT«210␤»
17:21 [Coke] r: say 42*30/6
17:21 p6eval rakudo 13e805: OUTPUT«210␤»
17:28 GlitchMr joined #perl6
17:28 dalek nqp-jvm-prep: 7f36090 | coke++ | / (4 files):
17:28 dalek nqp-jvm-prep: Add lcm_i
17:28 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/7f36090955
17:29 [Coke] karma coke
17:29 aloha coke has karma of 597.
17:29 [Coke] karma [coke]
17:29 aloha [coke] has karma of 0.
17:29 [Coke] karma [Coke]
17:29 aloha [Coke] has karma of 0.
17:30 flussence karma broke?
17:30 aloha broke has karma of 0.
17:30 [Coke] I don't think [Coke]++ does what we thought it did.
17:58 telex joined #perl6
18:03 jnthn coke++ :)
18:04 jnthn OK, gotta go...
18:04 jnthn back tomorrow &
18:05 alec karma FROGGS
18:05 phenny alec: 30 Dec 10:11Z <Ayiko> tell alec I edited my solution there, thanks for reporting it. Removed [  ]* and also changed literal fail to <!> even though f never appears in DNA string
18:05 aloha FROGGS has karma of 23.
18:06 alec karma Ayiko
18:06 aloha Ayiko has karma of 1.
18:06 FROGGS ;o)
18:06 alec if i want to increase Ayiko's karma, i just write his name ++ right?
18:06 alec FROGGS++
18:06 FROGGS without the space, but yes
18:06 FROGGS tight
18:06 alec karma FROGGS
18:06 FROGGS right
18:06 aloha FROGGS has karma of 24.
18:06 alec Ayiko++
18:06 alec excellent system
18:06 FROGGS it is
18:06 alec i wish i'd known about it when i first started using this chat
18:07 alec i guess i can go back through my logs...
18:07 alec sorear++
18:09 sftp joined #perl6
18:09 alec flussence++
18:10 alec masak++
18:10 dorlamm joined #perl6
18:11 alec japhb++
18:11 alec moritz++
18:17 alec can i get bots like phenny and aloha for my own use? and are they written in perl6? =)
18:18 erkan joined #perl6
18:18 erkan joined #perl6
18:18 FROGGS alec: can you please test something for me? do you see a diff there: https://github.com/FROGGS/rakudo/pull/new/nom
18:18 FROGGS alec: I've heard phenny is written in pythen, and yes, I think they are free
18:19 alec ok
18:20 alec yes, there is a diff
18:20 alec 3 new lines at 266 and 3 new lines at 316
18:32 FROGGS alec: really? it should be the opposite, removed lines (red) at these positions, and new lines between
18:33 FROGGS phenny: tell jnthn that I have a better approach: https://github.com/FROGGS/rakudo/pull/new/nom
18:33 phenny FROGGS: I'll pass that on when jnthn is around.
18:33 Abcxyz joined #perl6
18:34 FROGGS phenny: tell jnthn I would like to make a new branch in the rakudo/rakudo repo, and would like to have commit bit for this, do I get your ok for this? I will also ask pmichaud
18:34 phenny FROGGS: I'll pass that on when jnthn is around.
18:34 alec ah, sorry FROGGS
18:34 alec yes, that's what it was
18:34 alec i'm not very good at git, sorry
18:35 FROGGS alec: no problem, I got the information I needed (I didnt know if somebody who is not the owner of the repo can see his page)
18:37 FROGGS phenny: ask pmichaud if it would be possible to get commit bit for rakudo, my CLA is in walnut since november
18:37 phenny FROGGS: I'll pass that on when pmichaud is around.
18:42 moritz \o
18:45 FROGGS hi moritz
18:51 flussence trying to understand something... is this the same thing as andthen/orelse? http://www.reddit.com/r/programming/comm​ents/15r6tb/z_a_tiny_strict_impure_dynam​ically_typed_curried/c7p9gln?context=1
19:08 masak oh hai, #perl6
19:08 masak flussence: no, it's not the same.
19:09 masak the 'foo bar mu zot' would be spelled $foo.bar.mu.zot in Perl 6.
19:09 flussence er... I meant the comment I linked to
19:13 gfldex masak: could you comment on http://irclog.perlgeek.de/​perl6/2012-12-31#i_6287390 please?
19:14 masak flussence: that looks more like `given query('#my-form') { ... }` to me.
19:14 masak gfldex: operators are allowed/encouraged as macros, as a quick reading of S06 will tell you :)
19:14 masak gfldex: operators are just funnily-spelled subroutines.
19:15 * gfldex rakudobugs
19:16 masak r: macro infix:«test»($a, $b) { say 3 }; 1 test 2;
19:16 p6eval rakudo 13e805: OUTPUT«3␤===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
19:16 masak huh.
19:16 masak how can that fail and the spectests still work?
19:17 masak "I notice that I am confused."
19:17 masak I'd better backlog fully first...
19:21 masak just so you know, it's possible to buy "The Hobbit" the book in Gothenburg, step on a train an read until the part where Bilbo and Gollum do riddles with each other in the dark before reaching Malmö. :)
19:21 gfldex who won?
19:23 masak Bilbo. but he cheated, and his winning question wasn't a real riddle.
19:24 gfldex Bilbo--
19:28 masak moritz: re conceptual similarity between role bodies and quasi blocks: more of one between role bodies and macro-argument thunks. because both these sometimes have to be snapshot before their surrounding scope has finished parsing.
19:29 ismail joined #perl6
19:33 masak <JJ_Brain> May I ask if there is a P=NP expert here?  I may have solved the problem.  The problem is arXiv did not accept it.
19:33 * masak chuckles
19:34 masak foiled again! I'll get you next time, arXiv!
19:34 Chillance joined #perl6
19:35 masak nqp: nqp::gcd_i(1000)
19:35 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 38␤␤»
19:35 masak [Coke]: I'm inclined to agree with sorear here.
19:36 masak nqp isn't getting the kind of tuits where we fix these things right now. its purpose currently is only to be a stepping-stone to build Rakudo.
19:36 masak not to be user-friendly or polished.
19:37 masak that may sound a bit cynical, but it's also tuit-conservative. with luck, one day nqp will be more than that.
19:38 masak r: class Foo { }; my $class = Foo; class Bar is $class { }
19:38 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse class definitionâ�¤at /tmp/8MmEReUpjI:1â�¤------> [32m Foo { }; my $class = Foo; class Bar is [33mâ��[31m$class { }[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        state…
19:38 masak doy: this could never work as it stands.
19:38 masak consider the execution order :)
19:38 masak you're too used to Moose where class construction happens at runtime.
19:39 masak oh, the return of JJ_Brain.
19:39 masak imagine the surprise of everyone if the P=NP problem were actually solved by someone named "JJ_Brain"... :D
19:40 moritz you can stop after "solved" :-)
19:41 masak anyway, the comment at http://mathbin.net/133965 adequately sums it up.
19:42 masak and it says "sir, you're full of it" in the proper, duly respectful way.
19:42 gaussblurinc joined #perl6
19:44 masak maybe I'm jaded, but nowadays when I see "I have tried to reach people about my solution of [very very hard problem], but they haven't replied", the prior for psychosis/schizophrenia goes up.
19:44 moritz or simple mania
19:45 masak hm. yes.
19:45 masak but that's where I encounter mania most often.
19:45 masak I guess something as simple as excessive caffeine intake could trigger it as well... :)
19:45 sorear see the part where I didn't even read the pastebin until after ey left
19:46 sorear I actually assumed it was a 100+ page dissertation that fails because of an annoying technical reason
19:46 sorear like "failure to separate 3SAT from 2SAT"
19:46 Abcxyz r: my Num $n = 3.1415926
19:46 p6eval rakudo 13e805: OUTPUT«Type check failed in assignment to '$n'; expected 'Num' but got 'Rat'␤  in block  at /tmp/qtfhzUuXrv:1␤␤»
19:47 sorear Abcxyz: do you understand that error?
19:47 masak sorear: re "I'm a constructivist", I almost don't see how a well-versed programmer/mathematician would fail to be a constructivist.
19:47 masak Abcxyz: there's no automatic casting between number types.
19:48 masak r: my Num $n = 3.1415926e0
19:48 p6eval rakudo 13e805:  ( no output )
19:48 masak r: my Rat $n = 3.1415926
19:48 p6eval rakudo 13e805:  ( no output )
19:48 Abcxyz So this is intended behavior?
19:49 sorear Yes.
19:49 fgomez joined #perl6
19:49 Abcxyz I see.
19:49 Abcxyz Where can I read this?
19:49 sorear If you want a variable to hold real numbers both precise and imprecise, declare it as Real
19:50 moritz Abcxyz: where you can you read what?
19:50 masak Abcxyz: what is it you're still curious about?
19:51 masak generally, if you declare something to be of type A and then try to put something of type B into the first something (and B isn't a kind of A), the assignment will fail.
19:51 masak that's not Perl 6, that's *typing* :)
19:51 japhb masak, There are proofs that have value simply by showing that something has a finite bound, without constructing the smallest such bound.
19:51 moritz doc.perl6.org has some documentation on number types
19:51 moritz and the synopsis has too
19:51 japhb Of course, you are free to consider me not well-versed as a mathematician.  :-)
19:52 masak japhb: I meant no offense. but programming has definitely made me more of a constructivist.
19:52 japhb I took no offense.  I was teasing, and am not in fact a mathematician.  ;-)
19:52 masak japhb: and I definitely agree with sorear's sentiment "if you have an extraordinary proof, construct us some extraordinary evidence from it"
19:53 japhb oh, quite.
19:53 sorear I don't reject them outright, but I find proofs of finite statements by infinitary means to be less than satisfactory
19:53 gfldex Abcxyz: http://perlcabal.org/syn/S02.h​tml#Coercive_type_declarations
19:53 masak if I came in here claiming "I invented anti-gravity!", you would say "ok, show us something that hovers".
19:54 masak sorear: maybe it feels like swatting flies with a bazooka? :)
19:55 japhb When I found out about the million dollar prize to convince a famous skeptic that you really have some psychic power, I immediately began to wonder how he could be tricked.  :-)
19:55 sorear I'm not sure what to think about cases where there's a definite algorithm, but the proof that it works relies on uncountable mathematics
19:55 masak I have no qualms about uncountable mathematics as such. they're just models.
19:55 japhb (And then on the flip side, I thought "What if you actually did have a psychic power, successfully convinced him you had it in private, then refused the money and swore him to secrecy.  What would he do then?")
19:56 Abcxyz Thanks for the info!
19:56 Abcxyz I was desperate of how to type in a floating point 3.1415926 at all
19:56 sorear e.g. Rabin's deterministic primality test (this is not quite an example because it assumes RH as an axiom, but still, complex anal)
19:56 Abcxyz And never thought about I could add "e0 ' after it...
19:56 masak Abcxyz: that's how you write Num literals.
19:57 masak 3.14 is a Rat literal, 3.14e0 is a Num literal.
19:57 sorear there are several finitary statements which are equivalent to RH.  I wonder if we will ever have a finitary proof of any of them
19:57 Abcxyz I guess I an thinking in C / Mathematica's way...
19:58 sorear Abcxyz: 3.14e0 is valid syntax in C...
19:58 sorear but yes Rat is fairly unusual to p6
19:59 sorear not *unique* - our numbers model is actually not that far from R5RS
19:59 Abcxyz Rat is a ill behaved type for computation...
19:59 sorear Abcxyz: you keep sending me private messages and I do not think it is intentional
19:59 sorear they don't seem like things anyone would want to keep private
19:59 Abcxyz extremely expensive
20:00 gaussblurinc joined #perl6
20:00 Abcxyz Oh, that's just because I see a red tag of the msg, then I reply it privately...
20:00 sorear test
20:00 sorear Abcxyz: test
20:01 sorear test Abcxyz
20:01 Abcxyz I suppose those who speak privately to me would want me to speak to them privately in return also.
20:01 Abcxyz :)
20:01 Abcxyz Without realizing that this is not the case.
20:03 japhb Abcxyz, some people prefer to carry on two conversations with the same recipient: a public one and a private one.
20:03 sorear I think the red tag is just an indicator that your name has been mentioned
20:03 Abcxyz I see.
20:03 Abcxyz I thought the red color means a private msg to me...
20:05 masak seems not.
20:05 Abcxyz It is not. Now I see.
20:26 quester joined #perl6
20:32 stevan_ joined #perl6
20:44 Bruce__ joined #perl6
20:51 Bruce__ rakudo: (1,2).map{ .say }; say "OK"
20:51 p6eval rakudo 13e805: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method map at src/gen/CORE.setting:1235␤  in block  at /tmp/_M8247WuVa:1␤␤»
20:51 Bruce__ rakudo: (1,2).map: { .say }; say "OK"
20:51 p6eval rakudo 13e805: OUTPUT«OK␤»
20:51 Bruce__ rakudo: (1,2).map: { .say }
20:51 p6eval rakudo 13e805: OUTPUT«1␤2␤»
20:51 rindolf Hi all.
20:51 rindolf Happy new year.
20:52 Bruce__ Happy new year
20:52 masak Year.new.happy
20:52 masak "What's up?" "2012." :P
20:53 lorn joined #perl6
20:53 masak (either in the sense of "all used up", or in the Chinese spatial-temporal synesthesia sense of time proceeding downwards)
20:55 Bruce__ Does anyone know why map loops don't seem to run with a print statement after them?
20:55 masak Bruce__: you've fallen victim to insufficient sink-ness in the Rakudo implementation.
20:56 masak niecza: (1,2).map: { .say }; say "OK"
20:56 p6eval niecza v24-12-g8e50362: OUTPUT«1␤2␤OK␤»
20:56 masak rakudo: eager (1,2).map: { .say }; say "OK"
20:56 p6eval rakudo 13e805: OUTPUT«1␤2␤OK␤»
20:56 masak the above is the temporary (forward-compatible) workaround.
20:59 Bruce__ Very nice, that fixes some code that stopped working with the December release
20:59 Bruce__ masak: Thank you
21:00 masak \o/
21:00 doy masak: so is there no way at all to construct classes at runtime then?
21:01 masak r: class Foo {}; my $parent = "Foo"; say (eval "class Bar is $parent \{ \}").WHAT
21:01 p6eval rakudo 13e805: OUTPUT«Bar()␤»
21:03 masak r: class Foo {}; my $parent = "Foo"; say (eval "class Bar is $parent \{ \}") ~~ Foo
21:03 p6eval rakudo 13e805: OUTPUT«True␤»
21:03 dalek nqp-jvm-prep: 12cdc07 | coke++ | / (4 files):
21:03 dalek nqp-jvm-prep: DRY
21:03 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/12cdc07da2
21:03 dalek nqp-jvm-prep: 42eaa6a | coke++ | / (9 files):
21:03 dalek nqp-jvm-prep: Break out tests into multiple files
21:03 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/42eaa6aec9
21:05 [Coke] phenny: tell jnthn I split up the qast tests, but I am not really confident about my organization.
21:05 phenny [Coke]: I'll pass that on when jnthn is around.
21:05 doy masak: that doesn't particularly help if $parent is potentially anonymous
21:06 masak doy: hmmm.
21:09 doy so taking a step back
21:09 doy what i'm actually trying to write is a sort of thunk
21:09 bruges joined #perl6
21:09 masak r: class Foo {}; class Bar { BEGIN { Bar.HOW.add_parent(Bar, Foo) } }; say Bar ~~ Foo
21:09 p6eval rakudo 13e805: OUTPUT«True␤»
21:09 doy which turns into a real object when it actually has things like methods called on it
21:10 doy but getting it to pass type checks for the real object is certainly a trick
21:11 masak doy: have a look at find_method_fallback in src/Perl6/Metamodel/ClassHOW.pm
21:12 doy well, the inflating part isn't the hard part
21:12 doy the part i'm stuck on is that trying to store the thunk in a typed attribute fails
21:13 masak r: class Thunk {}; class A { has Thunk $.thunk }; say A.new( :thunk( Thunk.new ) )
21:13 p6eval rakudo 13e805: OUTPUT«A.new(thunk => Thunk.new())␤»
21:13 doy no, i mean
21:13 doy the object that the thunk becomes is of some class Foo
21:14 doy and it should be able to be used in arbitrary places as though it were that object
21:14 masak just make both the larva and the butterfly do some common role ;)
21:14 doy even if it hasn't been inflated yet
21:15 masak and type the attribute with that role.
21:15 doy well, the point is that i want to be able to use it in arbitrary places that i don't necessarily control
21:15 masak that's stressing the limits of typing regardless of language and problem.
21:16 doy well, yeah
21:16 doy (:
21:16 masak Perl 6 rises to the challenge, but it doesn't turn lead into gold. :)
21:16 doy i feel like there's nothing conceptually wrong with the idea
21:16 doy but expressing that in a real language is pretty tricky
21:17 doy well, a real typed language anyway (it's pretty easy to do this in perl 5)
21:18 masak remember that we have subset types, which can ease some of the pressure in these cases.
21:18 gaussblurinc__ joined #perl6
21:19 masak r: subset Fooer where { .^does('foo') }; say (class { method foo {} }) ~~ Fooer; say (class {}) ~~ Fooer
21:19 p6eval rakudo 13e805: OUTPUT«False␤False␤»
21:19 masak hrm.
21:19 masak r: subset Fooer where { .^can('foo') }; say (class { method foo {} }) ~~ Fooer; say (class {}) ~~ Fooer
21:19 p6eval rakudo 13e805: OUTPUT«True␤False␤»
21:19 masak ah, right.\
21:20 masak this essentially moves a compile-time check down into runtime.
21:20 doy my current line of attack is to make the thunk an instance of a subclass of the class i want it to be, where all of the methods defined by the class are overridden to inflate the instance and then redispatch the method call
21:21 doy (and things like BUILDALL are suppressed entirely)
21:21 doy but that requires understanding the metamodel enough to do that sort of thing at runtime
21:22 masak best of luck.
21:22 masak would love to see code at some point.
21:22 doy (:
21:25 [Coke] phenny: tell jnthn I have 'chars' added locally - it maps directly to String's length, but since that's an instance method, we can't map it directly like we did with the math methods, so I'm wrapping it in the ops class.
21:25 phenny [Coke]: I'll pass that on when jnthn is around.
21:26 [Coke] anyone know the diff between concat and concat_s off the top of their head?
21:28 masak [Coke]: no, but I have a feeling the answer becomes evident once one sees what the argument and return types are.
21:28 rindolf joined #perl6
21:35 sorear [Coke]: can you use them in context?
21:49 masak 'night, #perl6
21:54 PacoAir joined #perl6
21:55 rindolf joined #perl6
22:05 [Coke] masak: they both seem to be Sss
22:09 rindolf joined #perl6
22:14 tcpr1347 joined #perl6
22:15 MikeFair_ joined #perl6
22:34 rindolf joined #perl6
22:36 [Coke] phenny: ask jnthn how to represent an array in JASTCompiler.nqp's op setup.
22:36 phenny [Coke]: I'll pass that on when jnthn is around.
22:37 [Coke] nqp: say(nqp::concat("boo","berry"));
22:37 p6eval nqp: OUTPUT«booberry␤»
22:37 [Coke] nqp: say(nqp::concat_s("boo","berry"));
22:37 p6eval nqp: OUTPUT«booberry␤»
22:45 doy r: proto bar {*}; multi bar ($baz) { "BAZ" }; role Blorg { method do_stuff { bar "baz" } }; say Blorg.new.do_stuff
22:45 p6eval rakudo 13e805: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub bar at /tmp/5CaNa5PWz1:1␤  in method do_stuff at /tmp/5CaNa5PWz1:1␤  in block  at /tmp/5CaNa5PWz1:1␤␤»
22:45 doy r: proto bar {*}; multi bar ($baz) { "BAZ" }; class Blorg { method do_stuff { bar "baz" } }; say Blorg.new.do_stuff
22:45 p6eval rakudo 13e805: OUTPUT«BAZ␤»
22:45 doy multisub dispatch doesn't appear to work properly in roles for some reason?
22:48 marloshouse joined #perl6
22:50 rindolf joined #perl6
22:53 dalek nqp-jvm-prep: f0b5907 | coke++ | / (4 files):
22:53 dalek nqp-jvm-prep: add string ops: chars, lc, uc, x, concat, chr
22:53 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/f0b5907880
22:54 [Coke] masak: when I don't finish the p6cc this year, I blame jnthn for distracting me! ;)
22:55 denisboyun_ joined #perl6
22:56 timotimo i'm preparing my screencast on how to create a perl6 package and get it into the ecosystem
22:56 [Coke] timotimo++
22:56 timotimo who is responsible for pulling changes into the ecosystem? maybe i can get them to cooperate during the 'shoot'? ;)
22:58 flussence anyone with a commit bit in the perl6 org can
22:59 [Coke] nqp: say(nqp::bitor_i(123,21))
22:59 p6eval nqp: OUTPUT«127␤»
23:00 [Coke] nqp: say(nqp::bitxor_i(123,21))
23:00 p6eval nqp: OUTPUT«110␤»
23:00 [Coke] nqp: say(nqp::bitand_i(123,21))
23:00 p6eval nqp: OUTPUT«17␤»
23:00 [Coke] nqp: say(nqp::bitneg_i(123))
23:00 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 38␤␤»
23:12 [Coke] nqp: say(nqp::bitshiftl_i(3,2))
23:12 p6eval nqp: OUTPUT«12␤»
23:13 [Coke] nqp: say(nqp::bitshiftr_i(-4,28))
23:14 Abcxyz r: sub postfix:<²> ($n) { return $n**2 }; say 16²;
23:14 p6eval nqp: OUTPUT«-1␤»
23:14 p6eval rakudo 13e805: OUTPUT«256␤»
23:14 [Coke] nqp: say(nqp::bitshiftr_i(5,2))
23:14 p6eval nqp: OUTPUT«1␤»
23:15 Abcxyz r: sub postfix:<²> ($n) { return $n**2 }; say 16²;
23:15 p6eval rakudo 13e805: OUTPUT«256␤»
23:16 Abcxyz sub postfix:<²> is equiv(&infix:<**>) ($n) { return $n**2 };; say 16²;
23:16 [Coke] r: sub a:b() {}; a:b();
23:16 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a:b() used at line 1â�¤â�¤Â»
23:16 Abcxyz r: sub postfix:<²> is equiv(&infix:<**>) ($n) { return $n**2 }; say 16²;
23:16 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Missing blockâ�¤at /tmp/l7dQwIpyZN:1â�¤------> [32msub postfix:<²> is equiv(&infix:<**>) [33mâ��[31m($n) { return $n**2 }; say 16²;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        state…
23:18 Abcxyz r: sub a ( :$b ) { say $b }; say a :b
23:18 p6eval rakudo 13e805: OUTPUT«True␤True␤»
23:20 Abcxyz r: sub a ( :$b ) { say $b }; say a:b
23:20 p6eval rakudo 13e805: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a:b used at line 1â�¤â�¤Â»
23:23 [Coke] nqp: say(nqp::bitneg_i(3));
23:23 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 164318166␤␤»
23:24 [Coke] r: say nqp::p6box_i(nqp::bitneg_i(3));
23:24 p6eval rakudo 13e805: OUTPUT«-4␤»
23:27 timotimo so, the example module i want to produce during the screencast is going to turn ASCII into wide-spaced equivalent unicode characters
23:27 timotimo GlitchMr made the point that that is actually useful, so not a good fit for an ACME module.
23:27 timotimo could it be called Unicode::FatLetters?
23:28 flussence there's a whole bunch of A-Z0-9 sets in unicode, no need to limit it to just that one... :)
23:30 dalek nqp-jvm-prep: 3b196e2 | coke++ | / (4 files):
23:30 dalek nqp-jvm-prep: implement bit{xor,or,and,shiftl,shiftr,neg}_i
23:30 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/3b196e2bf4
23:31 dduncan joined #perl6
23:31 dduncan left #perl6
23:39 timotimo flussence: right. so Unicode::ASCIIMappings?
23:40 flussence that'd work, though I'd probably go with LatinMappings or something since I don't think all of them are full charsets
23:40 moritz Text::Unidecode in Perl 5
23:41 timotimo that's not quite it, or is it?
23:41 sorear seems like the opposite of T:Unidecode to me
23:42 timotimo anyway, for an example, it should suffice to make ascii characters fat.
23:43 moritz T::Uniencode? :-)
23:44 timotimo maybe i'll go for an ACME module after all, so that i don't get mixed up in this discussion :D
23:45 flussence Acme::FatFace :D
23:45 timotimo well, yeah
23:45 timotimo that's kind of a fitting name
23:50 fgomez joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo