Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-02-11

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 dalek rakudo-star-daily: 3540cec | coke++ | log/ (5 files):
00:01 dalek rakudo-star-daily: today (automated commit)
00:01 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/3540cec753
00:01 dalek perl6-roast-data: 7a3f74f | coke++ | / (5 files):
00:01 dalek perl6-roast-data: today (automated commit)
00:01 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/7a3f74fe47
00:02 pippo .tell FROGGS:  replaced  'handle->body.encoding_type' with '1' on line 652 of MoraVM/src/io/fileops.c and now it works.
00:02 yoleaux pippo: What kind of a name is "FROGGS:"?!
00:02 pippo .tell FROGGS  replaced  'handle->body.encoding_type' with '1' on line 652 of MoraVM/src/io/fileops.c and now it works.
00:02 yoleaux pippo: I'll pass your message to FROGGS.
00:03 pippo .tell FROGGS  could be related to the fact that my terminal has LANG=en_US.UTF-8?
00:03 yoleaux pippo: I'll pass your message to FROGGS.
00:08 camelia joined #perl6
00:09 skids joined #perl6
00:18 xenoterracide joined #perl6
00:24 daniel-s joined #perl6
00:25 benabik joined #perl6
00:26 ens joined #perl6
00:29 dayangkun joined #perl6
00:29 araujo joined #perl6
00:29 araujo joined #perl6
00:32 colomon joined #perl6
00:32 Myk267 joined #perl6
00:48 raydiak timotimo: thanks, I'll give it a good polishing pass tonight including those issues
00:49 raiph joined #perl6
00:55 Myk267 joined #perl6
00:56 raydiak jnthn: I agree it ought to stand out more, though I'm not sure making the page even more painfully out of balance is the solution, unless we want it to remain looking 20 years old :)
00:56 Myk267 joined #perl6
00:56 raydiak imo, with some better styling, it'll stand out more being set apart than it would inline with the Pod content
00:57 raydiak (though I do need to fix the overlap problem too, if I leave the placement as is)
01:10 revdiablo joined #perl6
01:10 ingy joined #perl6
01:12 benabik joined #perl6
01:27 zakalwe joined #perl6
01:35 araujo joined #perl6
01:35 araujo joined #perl6
01:36 brother joined #perl6
01:36 DarthGandalf joined #perl6
01:36 mattp_ joined #perl6
01:37 raiph joined #perl6
01:43 raiph joined #perl6
02:00 kbaker joined #perl6
02:09 TimToady p6: https://gist.github.com/anonymous/8928045
02:09 camelia niecza v24-109-g48a8de3: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤ MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
02:09 camelia ..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unrecognized regex modifier :myâ�¤at /tmp/tmpfile:3â�¤------> [32m        [33mâ��[31m:my token MANTISSA {  \d+ '.'? \d* | '.'[0mâ�¤    expectin…»
02:09 TimToady niecza++ and a rakudobug
02:10 TimToady masak: ^^^
02:11 TimToady rakudo requires an extra semicolon after the closing brace, rather than relying on the end-of-statement semantics of normal Perl 6
02:15 clkao_ joined #perl6
02:28 Khisanth joined #perl6
02:30 dayangkun joined #perl6
03:05 ilbot3 joined #perl6
03:05 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
03:06 Biohazard joined #perl6
03:09 genehack joined #perl6
03:09 jercos joined #perl6
03:12 raiph joined #perl6
03:13 breinbaa1 joined #perl6
03:15 Biohazard joined #perl6
03:17 DarthGandalf joined #perl6
03:17 pdcawley joined #perl6
03:38 breinbaas joined #perl6
03:40 konnjuta joined #perl6
04:15 [particle] joined #perl6
04:23 cognominal joined #perl6
04:29 ggherdov joined #perl6
04:48 PZt joined #perl6
04:51 jnap joined #perl6
05:09 regreg joined #perl6
05:14 erkan joined #perl6
05:14 erkan joined #perl6
05:36 Rotwang joined #perl6
05:43 cognominal joined #perl6
05:47 rurban joined #perl6
05:51 jnap joined #perl6
05:59 SamuraiJack_ joined #perl6
06:18 rylinaux_ joined #perl6
06:31 FROGGS joined #perl6
06:32 [Sno] joined #perl6
06:33 arlinius joined #perl6
06:43 dmol joined #perl6
06:48 moritz raydiak: +1 to the search
06:50 timotimo raydiak: thanks. good work otherwise! :)
06:51 raydiak timotimo: I ran out the door w/out proper testing; thanks for being more rigorous than I :) fixed now
06:52 timotimo hah
06:52 timotimo i hope i didn't seem too harsh
06:52 jnap joined #perl6
06:52 raydiak not at all, I'm being sincere...appreciate having extra eyes
06:53 timotimo i'm glad :)
06:53 DrEeevil ah, so funny
06:54 DrEeevil moarvm tarballs are github'ed again, can't use that stuff at all ever
06:54 DrEeevil silly me!
06:55 * timotimo has no admin capabilities for that repo, otherwise would try to get rid of these things
06:56 DrEeevil it makes generating tarballs needlessly exciting
06:56 DrEeevil I think I first reported that bug a year ago ...
06:56 timotimo maybe not a whole year, but something like that
06:56 DrEeevil (but in between github even "lost" their release tarball service for a week and didn't notice)
06:56 raydiak moritz: thanks :) is it the plan to keep the styling so...spartan? in trying to figure out how to best work the search into the layout, I decided the problem seems to be basically that it's formatted as a doc instead of a website
06:56 DrEeevil timotimo: I hit it with opendylan the first time
06:57 DrEeevil I think
06:57 lue raydiak: I think we're waiting for someone to eventually fix that up.
06:58 timotimo oh, ok
06:58 DrEeevil actually even more fun: the tarball has 3dparty/libtommath but not 3dparty/dyncall
06:59 DrEeevil that makes compiling a bit more exciting ... *sigh*
06:59 raydiak I was thinking about putting together a stylesheet or perhaps a whole template, if it's not outside the scope of the vision for the project...unless it's *intended* to look and act like a technical manual
07:00 lue I'd personally prefer something shinier, after all perldoc seems to do fine with a decent theming :)
07:13 logie_ joined #perl6
07:14 DrEeevil eh. submodules, again. I always let myself get trapped by the obvious ...
07:22 nebuchadnezzar joined #perl6
07:22 rurban joined #perl6
07:23 darutoko joined #perl6
07:25 raydiak moritz: oh, and did you get a chance to look at the code? want to make sure there's nothing going on in there that you find objectionable...for one, I added a little more clutter to the root dir of the repo that maybe should live in a separate dir for html-related stuff
07:27 raydiak since html/ itself is where the *output* goes...and also I'm concerned about what happens with the current file structure if p6 iteslf gets features named 'index' or 'search' :)
07:28 raydiak I feel like I should be writing an e-mail instead at this point
07:28 timotimo write a strongly worded letter! :)
07:30 raydiak haha :) just sometimes I stop and look back at what I'm writing and realize I'm flooding
07:32 mattp__ joined #perl6
07:33 moritz raydiak: feel free to improve the styling in any way you see fit
07:33 moritz I'm not at all good at that sort of stuff, so I appreciate input from others
07:36 FROGGS joined #perl6
07:41 masak morning, #perl6
07:42 stevan_ joined #perl6
07:42 raydiak good morning masak
07:42 timotimo hello masak! :)
07:42 masak raydiak: as to flooding, you're too hard on yourself. look, you're on topic and everything! :)
07:43 timotimo agreed.
07:45 moritz raydiak: fwiw I'm all for putting files into html/ if they should be downloaded unmodified by the client
07:47 raydiak timotimo, masak: thank you! I'll not worry so much then...I just have a hard time sensing which side of the line I'm on sometimes; especially since everyone I meet has a different idea of where that is, and I can't see or hear (and have never met) any of you :)
07:48 timotimo that's right. #perl6 strikes me as rather liberal in this regard
07:49 raydiak moritz: most of the new files are being inserted into places, template-style, when the index and search files are generated, so I just threw them in the root next to the existing search_template.html (which no longer exists)
07:49 moritz raydiak: we'll make a deal. You just stop worrying about spamming the channel, and I'll (and maybe others) will tell you if you do cross the line :-)
07:49 raydiak #perl6 strikes me as rather liberal in most regards...it's quite...liberating
07:50 raydiak deal!
07:50 masak we're the community's rewrite of the community :)
07:50 moritz raydiak: then maybe a template/ folder would be apropriate
07:51 moritz (though for me it's not a blocker
07:51 moritz )
07:51 moritz raydiak: also if you /msg me your public ssh key, I can add it so that you can sync the files to feather2 yourself
07:52 moritz (feather2 being the host behind doc.perl6.org)
07:52 raydiak moritz: okay, will do, but not before the merge
07:52 masak TimToady: just backlogged over your rakudobug highlight. about to start teaching here; will submit later, unless someone beats me to it.
07:53 jnap joined #perl6
07:53 masak TimToady++ # finding bugs through (I assume) RC solutions
07:53 raydiak oh, missed part of that...meant "will do" do moving things into a template dir
07:54 * raydiak goes to look for his ssh key
07:55 moritz it's usually in one of .ssh/id_{r,d}sa.pub :-)
07:55 raydiak I haven't had to worry about these things much, think I have a diff one on each machine atm
07:56 moritz you can also paste me more than one ssh key :-)
07:57 timotimo but never more than one from the same keypair :)
07:59 raydiak I'll just use the one off my VPS for now (though with how reliable it's been lately, that almost makes me a compulsive gambler)
08:00 raydiak is the e-mail address part on the end important?
08:00 moritz raydiak: no; that's just any human-readable string to identify the key
08:01 moritz I usually just write  moritz@hostname  # not a real email address, but tells me where the key comes from
08:01 timotimo "moritz@hostname"? that has a certain ring to it! i shall use it for all my keys now, too!
08:05 jercos works even better when every machine you use has a working FQDN, and runs an SMTPd at least sufficient to forward mail to a usable address
08:09 dalek doc: 8d5a177 | raydiak++ | htmlify.pl:
08:09 dalek doc: Support custom head content when calling p2h
08:09 dalek doc: review: https://github.com/perl6/doc/commit/8d5a177042
08:09 dalek doc: 4ae3291 | raydiak++ | / (4 files):
08:09 dalek doc: Move search JS into a separate file
08:09 dalek doc: review: https://github.com/perl6/doc/commit/4ae329100b
08:09 dalek doc: ef8185a | raydiak++ | htmlify.pl:
08:09 moritz RIP, dalek
08:09 timotimo rip in piece
08:09 dalek joined #perl6
08:10 moritz timotimo: did you mean "ripped in pieces"? :-)
08:11 * raydiak tried to ./sync, and then figured out it doesn't work very well if you don't ./htmlify.pl first :P
08:14 raydiak oh, and...the URLs look pretty without the .html, but it means all those links won't work without special server config...won't even work at all off a local drive, if I'm not mistaken...???...
08:14 xinming joined #perl6
08:14 timotimo that's right :(
08:14 raydiak that's not the search, those are the main index links
08:15 moritz raydiak: yes, you need content negotiation
08:15 zakharyas joined #perl6
08:15 moritz one could write a small p5 (or p6) local web server
08:16 raydiak moritz: would it not be better to have the .html and have it work everywhere without additional complexity?
08:16 raydiak or what about generating differently for local html files vs files built for the web?
08:16 stevan_ joined #perl6
08:17 moritz raydiak: I value nicer URLs for the enduser higher than developer convenience
08:19 raydiak if we're going to make the site shiny, we may want to have some extra/different generation for web-oriented docs vs local ones anyway
08:20 moritz aye
08:21 raydiak so we could just add the .html to the links for local docs only, once we make that distinction in the build process...right?
08:23 moritz aye
08:24 raydiak local disk URLs are pretty much always ugly anyways :)
08:27 raydiak (I guess it's not a *U*RL when it points to a local file...)
08:27 timotimo we should deploy webkit.js
08:28 jlaire joined #perl6
08:29 * raydiak wonders how well that would work on his 5-year-old android phone
08:31 timotimo we should develop a non-sucky hyperlinked text browser for the commandline
08:31 timotimo like they used to have in the very beginning
08:34 raydiak timotimo: sounds like a job for catui...
08:36 timotimo :)
08:36 timotimo catui will be amazing. also it will never exist if i continue at the current pace :)
08:37 logie_ joined #perl6
08:44 raydiak well, it's been conceived of, so rate of change is arguably greater than zero, depending on what specifically we're measuring
08:44 timotimo hehe.
08:45 timotimo i need to do lots and lots and lots of thinking before it makes sense to actually start implementing things
08:49 raydiak it's not a small project, that's for sure
08:49 timotimo i'ven't done anything really big in perl6 so far
08:49 timotimo it'll surely be a challenge
08:50 timotimo at least keeping the code running on more and more recent versions of perl6 will be easier from now on than it was, say, starting one year ago
08:50 timotimo the big list respec will be very interesting
08:51 raydiak I don't follow news very closely...what big list respec?
08:52 timotimo it's old news ;)
08:52 timotimo patrick has been meaning to give the whole of S07 a thorough re-think
08:53 raydiak anything specific, or does nobody know yet?
08:53 timotimo i don't know the specifics
09:02 raydiak I'm thinking about reworking this template I started for a customer who never finished paying for their site: http://gc.cyberuniverses.com/
09:03 raydiak for the docs
09:03 raydiak change the colors and background, etc
09:03 timotimo oh my, 3d buttons :)
09:03 raydiak just beveling tricks with css
09:04 raydiak rounded corners are css3, but degrade gracefully to square corners
09:04 timotimo http://subtlepatterns.com/ ← this is an excellent source for tiling background images, btw
09:04 raydiak oh, cool
09:05 raydiak I won't plagiarize content from random google images results for perl 6 docs, of course :)
09:05 timotimo of course not
09:06 raydiak that layout is pretty darn fluid, too...resize your browser down to like 200-300 px wide like a phone, it should still look tolerable
09:07 raydiak iirc, it actually did work fine on my phone
09:08 timotimo not bad, aye
09:08 timotimo i've only recently started doing some web development with the help of bootstrap
09:08 timotimo it's a pleasure to have it work properly on any size and still look tolerable in big formats :)
09:10 raydiak yeah, that can be a tough balance to find without having separate stylesheets or a separate "mobile version"
09:10 raydiak web development is a...unique set of challenges
09:10 timotimo it is
09:10 raydiak hammering my left-heavy brain against it for years, I am finally starting to grow a sense of aesthetics, though
09:11 timotimo great! :D
09:12 raydiak just wish it didn't require so much pain you don't have in most other arenas, like cross-browser compatibility problems, supporting every major browser version back to 10 years ago and so forth
09:13 raydiak it's *way* easier than it used to be though...you can pretty safely ditch ie6 support these days :P
09:13 raydiak (broken box model and so forth)
09:14 timotimo aye
09:14 raydiak what is bootstrap?
09:14 timotimo twitter bootstrap
09:15 timotimo a set of css rules and instructions on how they can be combined in proper ways
09:15 timotimo very flexible, easy to get started with, looks pretty good (except now every other website looks like twitter bootstrap)
09:17 raydiak some people might call this eccentric in this day and age, but I still write it all by hand
09:18 raydiak it feels ever so vaguely like sculpting :)
09:18 timotimo that's totally fine
09:20 raydiak of course, that only works because I try to limit myself to fairly small-scale stuff
09:22 timotimo :)
09:30 stevan_ joined #perl6
09:31 denisboyun joined #perl6
09:31 dakkar joined #perl6
09:38 raydiak well, I've had quite enough excitement for one day...and technically that was yesterday b/c it's 1:30 in the morning
09:42 timotimo good night then! :)
09:43 raydiak yep, definitely bed time...thanks for chatting timotimo (and everyone else earlier, of course)
09:43 raydiak g'night #perl6
09:43 timotimo always a pleasure
09:50 rindolf joined #perl6
09:55 stevan_ joined #perl6
09:57 denis_boyun joined #perl6
09:58 pecastro joined #perl6
10:00 Grimnir__ joined #perl6
10:03 spuelrich joined #perl6
10:04 spuelrich left #perl6
10:04 jnthn morning o/
10:18 nwc10 In nqp, is there a way to force (native) integer arithmetic
10:19 nwc10 I'd like to think about integers larger than 2**52
10:19 FROGGS morning
10:19 yoleaux 00:02Z <pippo> FROGGS: replaced  'handle->body.encoding_type' with '1' on line 652 of MoraVM/src/io/fileops.c and now it works.
10:19 yoleaux 00:03Z <pippo> FROGGS: could be related to the fact that my terminal has LANG=en_US.UTF-8?
10:19 FROGGS ?
10:20 nwc10 OK. Why isn't it working for the bigger program.
10:20 telex joined #perl6
10:20 nwc10 I seem to have a problem somewhere around the keyboard/chair boundary, but I'm not certain
10:20 FROGGS *g*
10:21 nwc10 aha
10:21 nwc10 ++ doesn't do ints
10:21 nwc10 so, not my bug, technically
10:22 nwc10 nqp: 'my int $b := 9007199254740992; say($b); ++$b; say($b)
10:22 nwc10 nqp: my int $b := 9007199254740992; say($b); ++$b; say($b)
10:22 FROGGS .tell pippo: the probles it that handle is NULL and then trying to access handle->body explodes on line 652
10:22 yoleaux FROGGS: What kind of a name is "pippo:"?!
10:22 camelia nqp-parrot: OUTPUT«Confused at line 2, near "'my int $b"␤current instr.: 'panic' pc 15952 (gen/parrot/stage2/NQPHLL.pir:5947) (gen/parrot/stage2/NQPHLL.nqp:425)␤»
10:22 camelia ..nqp-moarvm: OUTPUT«Confused at line 2, near "'my int $b"␤   at gen/moar/stage2/NQPHLL.nqp:369  (/home/p6eval/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:panic:120)␤ from gen/moar/stage2/NQP.nqp:917  (/home/p6eval/rakudo-inst-2/languages/nqp/lib/nqp.moarvm:comp_unit:346)␤ fro…»
10:22 camelia ..nqp-jvm: OUTPUT«Confused at line 2, near "'my int $b"␤  in panic (gen/jvm/stage2/NQPHLL.nqp:378)␤  in comp_unit (gen/jvm/stage2/NQP.nqp:922)␤  in TOP (gen/jvm/stage2/NQP.nqp:820)␤  in parse (gen/jvm/stage2/QRegex.nqp:1289)␤  in parse (gen/jvm/stage2/NQPHLL.nqp:1377)␤  in…»
10:22 camelia nqp-parrot: OUTPUT«Error while compiling op bind (source text: "int $b := 9007199254740992"): Cannot infer type from '9007199254740992'␤current instr.: '' pc 57075 (gen/parrot/stage2/QAST.pir:21055) (gen/parrot/stage2/QAST.nqp:3632)␤»
10:22 camelia ..nqp-moarvm, nqp-jvm: OUTPUT«9007199254740992␤9007199254740992␤»
10:22 FROGGS .tell pippo the problem it that handle is NULL and then trying to access handle->body explodes on line 652
10:22 yoleaux FROGGS: I'll pass your message to pippo.
10:22 FROGGS .tell pippo so you just worked around that NULL pointer bug
10:22 yoleaux FROGGS: I'll pass your message to pippo.
10:22 nwc10 both are 9007199254740992
10:23 nwc10 is that an NQP bug, or an NQP wontfix?
10:23 FROGGS I think it is on jnthn's agenda
10:23 jnthn nwc10: It's a "stuff details to doubles"
10:23 jnthn uh
10:23 jnthn defaults
10:24 FROGGS details to defaults? :P
10:24 jnthn Though ++ if it knows it's got an int shouldn't...
10:24 FROGGS p: my int $x; ++$x # maybe this was on the agenda, not sure
10:24 camelia rakudo-parrot 260cd7: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/parrot/CORE.setting:4348␤  in sub prefix:<++> at gen/parrot/CORE.setting:1762␤  in block  at /tmp/_3iXc_QOVS:1␤␤»
10:25 jnthn FROGGS: Yes, that one is
10:25 FROGGS k, I almost thought so
10:25 jnthn Hmm. We compile ++ into an add_n... I wonder why.
10:26 FROGGS to cope with inf?
10:26 jnthn In NQP? :)
10:26 * FROGGS knows nothing about NQP :o)
10:28 clkao_ joined #perl6
10:28 * jnthn changes it and sees if anything breaks
10:28 jnthn In theory it'll generate better code for any my int $i that you ++...
10:30 jnthn Hm, seems fine enough in NQP tests
10:33 jnthn And builds a sanity-test-passing Rakudo.
10:42 mavcunha joined #perl6
10:50 dalek nqp: 4ede847 | jnthn++ | src/vm/ (3 files):
10:50 dalek nqp: Change ++ and -- to always to integer math.
10:50 dalek nqp:
10:50 dalek nqp: We most often do this on native int variables anyway, so this will
10:50 dalek nqp: generate better code.
10:50 dalek nqp: review: https://github.com/perl6/nqp/commit/4ede847995
10:50 dalek nqp: 4a81c2a | jnthn++ | src/ (6 files):
10:50 dalek nqp: Use native types in a few more places.
10:50 dalek nqp: review: https://github.com/perl6/nqp/commit/4a81c2af60
10:51 jnthn nwc10: 4ede847 should help
10:51 nwc10 jnthn: unary negation in nqp converts to a float. 0 - $int does integer negation
10:53 jnthn nwc10: You can always be explicit abotu exaclty what you want by using e.g. nqp::neg_i($int)
10:53 nwc10 aha
10:59 nwc10 so there's an NQP op for <= ?
10:59 jnthn nqp::islt_i
10:59 jnthn uh, le
10:59 nwc10 thanks
11:03 kivutar joined #perl6
11:04 gfldex joined #perl6
11:18 arlinius joined #perl6
11:19 nwc10 nqp: my int $a := 0x7FFFFFFFFFFFFFFF; say($a)
11:19 nwc10 that wold be a bug :-(
11:19 camelia nqp-parrot: OUTPUT«Error while compiling op bind (source text: "int $a := 0x7FFFFFFFFFFFFFFF"): Cannot infer type from '-9223372036854775808'␤current instr.: '' pc 57075 (gen/parrot/stage2/QAST.pir:21055) (gen/parrot/stage2/QAST.nqp:3632)␤»
11:19 camelia ..nqp-moarvm: OUTPUT«-9223372036854775808␤»
11:19 camelia ..nqp-jvm: OUTPUT«9223372036854775807␤»
11:20 nwc10 nqp: my int $a := 0x7FFFFFFFFFFFF000; say($a)
11:20 camelia nqp-moarvm, nqp-jvm: OUTPUT«9223372036854771712␤»
11:20 camelia ..nqp-parrot: OUTPUT«Error while compiling op bind (source text: "int $a := 0x7FFFFFFFFFFFF000"): Cannot infer type from '9223372036854771712'␤current instr.: '' pc 57075 (gen/parrot/stage2/QAST.pir:21055) (gen/parrot/stage2/QAST.nqp:3632)␤»
11:20 nwc10 oh sigh, but that one is positive.
11:20 nwc10 so it's ending up as floating point, it seems
11:23 jnthn MAST::Op const_i64
11:23 jnthn MAST::Local index<8>
11:23 jnthn MAST::IVal value<-9223372036854775808>, size<64>, signed<1>
11:23 jnthn It's already been spoiled by the time we get to code-gen...
11:24 jnthn Oh, it's wrong in the QAST::IVal too
11:24 sqirrel joined #perl6
11:26 jnthn Urgh
11:28 jnthn Really need to do $dayjob stuff right now, but yeah, the issue is that nqp::radix, which does number parsing, is putting everything in doubles along the way
11:30 FROGGS hmmm, that sounds like we could save something there
11:31 jnthn FROGGS: My suggestion is an extra flag to nqp::radix that tells it to do int
11:31 jnthn FROGGS: That is, it already takes flag bits anyway
11:31 jnthn FROGGS: So it's not a nasty change to do.
11:38 denisboyun joined #perl6
11:58 Adriaaan joined #perl6
12:05 rurban joined #perl6
12:08 woolfy left #perl6
12:23 grondilu joined #perl6
12:41 kurahaupo_mobile joined #perl6
12:50 mtk joined #perl6
13:05 stevan_ joined #perl6
13:34 dmol joined #perl6
13:54 nwc10 so it's ending up as floating point, it seems
13:54 nwc10 (oops) ;-)
13:54 rurban joined #perl6
13:57 nwc10 in nqp, how does one create a BigInt which is holding a value
13:59 FROGGS nwc10: see https://gist.github.com/FROGGS/64c224637a10fff02e33
13:59 FROGGS though in rakudo it creates an p6opaque that holds a bigint somehow
14:03 jnthn 60-bigint.t has examples of doing both
14:04 nwc10 and no comments.
14:04 jnap joined #perl6
14:06 FROGGS that is why it is in t/, not docs/
14:06 * FROGGS hides
14:06 jnthn Well, the tests all have descriptions, though :P
14:06 nwc10 yes, and the one I'm looking at is 'Bit ops (RT 109740)' :-)
14:07 FROGGS nqp-m -e 'nqp: my int $a := 0x7FFFFFFFFFFFF000; say($a)'
14:07 FROGGS 9223372036854771712
14:07 FROGGS nqp-m -e 'nqp: my int $a := -0x7FFFFFFFFFFFF000; say($a)'
14:07 FROGGS -9223372036854771712
14:07 FROGGS is this correct now?
14:07 jnthn r: say  0x7FFFFFFFFFFFF000
14:07 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«9223372036854771712␤»
14:08 FROGGS seems like
14:08 jnthn FROGGS: Can I see le patch?
14:08 FROGGS sure
14:08 nwc10 nqp: my int $a := 0x7FFFFFFFFFFF0000; my int $b := 0
14:08 camelia nqp-moarvm, nqp-jvm: ( no output )
14:08 camelia ..nqp-parrot: OUTPUT«Error while compiling op bind (source text: "int $a := 0x7FFFFFFFFFFF0000"): Cannot infer type from '9223372036854710272'␤current instr.: '' pc 57075 (gen/parrot/stage2/QAST.pir:21055) (gen/parrot/stage2/QAST.nqp:3632)␤»
14:08 nwc10 nqp: my int $a := 0x7FFFFFFFFFFF0000; my int $b := 0x7FFFFFFFFFFF0001; say($b - $a)
14:08 camelia nqp-parrot: OUTPUT«Error while compiling op bind (source text: "int $a := 0x7FFFFFFFFFFF0000"): Cannot infer type from '9223372036854710272'␤current instr.: '' pc 57075 (gen/parrot/stage2/QAST.pir:21055) (gen/parrot/stage2/QAST.nqp:3632)␤»
14:08 camelia ..nqp-moarvm, nqp-jvm: OUTPUT«0␤»
14:08 nwc10 there, without the line break
14:09 nwc10 anyway, what I'm trying to do (as you might have guessed) is use the bigint string parsing code to parse large decimals before converting them back to real native ints
14:09 FROGGS https://gist.github.com/FROGGS/e608db7d803ba75fcb89
14:09 FROGGS jnthn: ^^
14:09 nwc10 but I can't figure out how to make a bigint
14:12 timotimo nwc10: bigints are created by supplying a type object that knows how to box an integer, which translates to: "has a defined method for that in its REPR"
14:12 timotimo in rakudo, we use the Int type, which has a "box_target" for native ints
14:12 timotimo the Int object gets repr'd by a P6opaque, which inlines the body of a P6bigint where the int box target slot is
14:12 timotimo scratch the "native ints", it must be "ints"
14:12 timotimo (otherwise big ints wouldn't work)
14:13 jnthn nwc10: my $bi_type := nqp::knowhow().new_type(:name('TestBigInt'), :repr('P6bigint')); $bi_type.HOW.compose($bi_type); my $bi := nqp::fromstr_I('123345353') # $bi is a bigint
14:14 jnthn uh, sorry
14:14 jnthn Final thing should be nqp::fromstr_I('134545', $bi_type)
14:19 nwc10 thanks
14:20 logie_ joined #perl6
14:21 colomon joined #perl6
14:24 FROGGS jnthn: I guess in the MVM_radix() there should be no MVMnum* then, right?
14:26 Khisanth joined #perl6
14:30 jnthn FROGGS: uh...probably needs to be those when we parse floating point things
14:30 FROGGS okay, then I leave that unchanged
14:31 jnthn FROGGS: I'm a little surprised that patch is enough though...given value is a floating point?
14:32 jnap joined #perl6
14:32 timotimo aye, that still ought to blow up at some point
14:32 FROGGS :/
14:32 FROGGS I think I see what you mean
14:33 jnthn Cleanest code wise is probably to just compute it simultaneously with a num64 and int64 then just pick out the right one at the end.
14:34 jnthn With a bigger refactor/dupe we could do just the needed one.
14:41 aindilis joined #perl6
14:46 btyler joined #perl6
14:49 pmurias joined #perl6
14:52 pmurias why does radix return a num instead of an int?
14:53 timotimo "because what if it has a decimal point in it?" ;)
14:54 pmurias nqp::radix doesn't handle decimal points
14:54 pmurias but isn't the biggest num bigger then the biggest int?
14:55 timotimo could very well be.
14:56 guru joined #perl6
14:59 treehug88 joined #perl6
15:02 pmurias what's the the bit length of num and int in nqp? platform specific?
15:03 timotimo moarvm has MVMnum64 in 6model/reprs/P6num.h
15:03 jnthn Backend specific, and some backends may in turn be platform specific.
15:03 salv0 joined #perl6
15:04 pmurias jnthn: so the reason for radix returning a num is that an int might be too small to parse some num constants?
15:05 skids joined #perl6
15:07 raiph joined #perl6
15:08 jnthn pmurias: No, it's that it's also used for parsing floating point, iirc.
15:08 kbaker joined #perl6
15:10 Alula joined #perl6
15:15 ruoso joined #perl6
15:17 samebchase joined #perl6
15:17 pmurias jnthn: in nqp nqp::radix seems to be used only for parsing ints (according to a quick ack search)
15:17 pmurias jnthn: in rakudo nqp::radix_I is used instead
15:17 pmurias jnthn: and floating points are handled with numify
15:17 jnthn pmurias: Hmm. :)
15:18 jnthn pmurias: In which case I suspect it might want to use ints on backends we know it's 64-bit always...
15:18 jnthn Which is Moar and JVM.
15:19 pmurias on 32-bit backends the large constants will end up overflowing later on?
15:21 jnthn int can only hold 32 bits there, so yeah, it'll overflow
15:28 dayangkun joined #perl6
15:29 nwc10 should have said, I have testcases for integer serialisation, which work on (older) MoarVM and JVM, but Parrot dislikes
15:29 nwc10 Can only use nqp_set_sc_for_object with a SixModelObject
15:30 jnthn Sounds like a consequence of Parrot not really doing 6model
15:30 Sqirrel joined #perl6
15:30 nwc10 this was my assumption. It dislikes the array
15:30 jnthn Maybe best ot just skip that test on Parrot.
15:31 jnthn Rather than spend time re-working it
15:31 jnthn The "easy" solution is to just put the array as an attribute in an object and serialize the object, though.
15:31 nwc10 I assumes that this was why all the other tests do that
15:31 jnthn Yeah. :)
15:34 lizmat joined #perl6
15:49 colomon joined #perl6
15:54 treehug88 joined #perl6
15:56 pmurias should I commit my changes to make nqp::radix return an array of integers?
15:57 pmurias (on parrot)
15:58 jnthn pmurias: Does it cause any new test failures?
15:59 pmurias make test for nqp passes
16:00 pmurias rakudo doesn't seem to use nqp::radix at all according to ack
16:03 lizmat does ack actually look at .nqp files ?
16:03 pmurias the new version seems to look at everything by default
16:04 Psyche^ joined #perl6
16:05 lizmat nqp::radix_I appears in core settings, it seems
16:06 lizmat from src/core/Str
16:08 jnthn Yeah, nqp::radix_I is a different beat
16:08 jnthn *beast
16:10 colomon joined #perl6
16:19 Alula joined #perl6
16:20 isBEKaml joined #perl6
16:24 bluescreen10 joined #perl6
16:28 stevan_ joined #perl6
16:30 kivutar joined #perl6
16:35 sqirrel_ joined #perl6
16:41 isBEKaml joined #perl6
16:42 dalek nqp: db30969 | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops:
16:42 dalek nqp: [nqp-parrot] Make nqp::radix return an array of integers
16:42 dalek nqp: review: https://github.com/perl6/nqp/commit/db3096969d
16:46 thou joined #perl6
16:57 guru joined #perl6
17:10 ruoso joined #perl6
17:10 masak lol hi from a train! \o
17:10 nwc10 is it on time?
17:11 masak too soon to tell
17:11 TimToady I dunno, it was in the station from two to two to two two...
17:12 lizmat hi from a boat
17:12 lizmat also too soon to tell it's going to be on time
17:13 lizmat arrival ~16 hours from now
17:13 TimToady in a navy town, you always call it a ship if it's large enough to carry a boat :)
17:14 denis_boyun joined #perl6
17:14 PerlJam all we need now is someone to say hi from a plane and someone to say hi from an automobile of some sort.
17:14 lizmat ah, hmmm  a ship then
17:15 lizmat definitely large enough to carry a boat  :-)
17:15 TimToady hi from the comfy chair
17:15 TimToady oh wait, mustn't make python jokes here...
17:15 masak no, it's ok.
17:15 masak we just hug python people.
17:15 * TimToady pleads gilcup
17:15 masak :P
17:15 lizmat nobody expects the comfy chair
17:16 perigrin masak: except Chapman ... otherwise 'eww'
17:17 * masak reads "The best, because it uses object oriented join. I forgot about it." on p6u, and giggles at this stance
17:17 * lizmat is reminded of woolfy shouting "I can hear you!" at FOSDEM, when the Python people in the next booth were claiming Perl was dead   :-)
17:18 masak haha
17:18 btyler it does seem to be something of a meme
17:18 TimToady someone should write a Python to Perl 6 translator
17:19 jnthn oooh!
17:19 masak lizmat: now I imagine lizmat fighting Python people with swords, and they are all black knights and refuse to give up even after their arms and legs have been hacked off.
17:19 vendethiel Let's do a javascript to perl 6
17:19 jnthn That sounds fun :)
17:19 masak TimToady: Python 2 or Python 3? :P
17:19 vendethiel so you can convert ANY language to perl 6 by compiling them to JS beforehand :P
17:19 jnthn ...but I already have plenty of other fun things to do :P
17:19 TimToady masak: *and*
17:19 masak ...of course.
17:19 btyler masak: well, you'd have to have broken unicode handling if you wanted to do python 2...
17:20 masak TimToady: "Why is it always or, and never and?" :P
17:20 lizmat masak: imagine woolfy doing that, I'm not the swashbuckling kind, really
17:20 * TimToady stays out of the woods
17:20 masak oops, meant woolfy.
17:21 lizmat masak: *phew*  :-)
17:21 masak :P
17:22 masak seems the actual lyrics is  "Is it always 'or'? / Is it never 'and'?"
17:22 TimToady lizmat goes in more for the razor approach, as long as we're on Sondheim...
17:22 dalek rakudo-star-daily: 590f6bd | coke++ | log/ (5 files):
17:22 dalek rakudo-star-daily: today (automated commit)
17:22 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/590f6bd7fb
17:22 lizmat :-)
17:22 masak and of course, if the Wife were a programmer, she'd say "Is it always 'xor'?"
17:22 lizmat ship's captain just announce we're not leaving yet due to high winds
17:23 lizmat .oO( guess we'll hit the champaign some more )
17:23 TimToady then there's the one where both protagonists both say "Red, red, red, red, red" and neither means anything gory
17:23 masak TimToady: sounds more like Rubyists to me...
17:23 lizmat I read that somewhere
17:24 * masak is slightly ashamed he didn't immediately get TimToady's Sweeney Todd reference
17:26 TimToady it's a funny thing
17:26 cognominal joined #perl6
17:26 masak p6: https://gist.github.com/anonymous/8928045
17:26 camelia niecza v24-109-g48a8de3: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤ MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
17:26 camelia ..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unrecognized regex modifier :myâ�¤at /tmp/tmpfile:3â�¤------> [32m        [33mâ��[31m:my token MANTISSA {  \d+ '.'? \d* | '.'[0mâ�¤    expectin…»
17:26 * masak submits TimToady++'s rakudobug
17:27 TimToady this is actually not in response to an RC entry, but was a suggestion from TheDamian++
17:27 vendethiel masak: you can do that ? COOL !
17:27 masak vendethiel: yeah, I just learned.
17:28 PerlJam vendethiel: apparently only in niecza :)
17:28 TimToady he wants to be able to have internal token declarations so that P6 regexen can be ported to other languages
17:28 masak oh, TheDamian++
17:28 TimToady and I got to point out that it already worked exactly as he suggested, except for the working part (on rakudo)
17:31 PerlJam Though S05 says "...you may declare variables in such a routine using a colon followed by any scope declarator parsed by the Perl 6 grammar"   and I have to squint a little to make tokens look like "variables"
17:31 jnthn Wow, that's pretty... Or will be once we hunt the bug :)
17:31 jnthn TimToady: Does throwing in semicolons on the end fix it?
17:31 TimToady yes
17:31 vendethiel PerlJam: that seems like something I could tackle. What's the repo for camelia ?
17:31 jnthn k
17:32 TimToady it's just the eol thing
17:32 vendethiel or is that perl6-rel directly ?
17:32 jnthn Yeah, I bet we're just missing a check.
17:32 * lizmat signs off for now
17:33 benabik joined #perl6
17:37 timotimo "perl6-rel"?
17:42 PerlJam vendethiel: I'm not sure what "that" is in your sentence.
17:42 vendethiel PerlJam: url parsing
17:43 PerlJam oh!  We were apparently talking about different things before.
17:44 PerlJam Giving a URL to the p6 bot works for all implementations.  It's the ":my token foo { ... }" that's novel.
17:45 vendethiel OH
17:45 vendethiel we were talking about different things most certainly :P
17:46 jnthn vendethiel: Feel free to fix the Rakudo bug anyway ;-)
17:46 vendethiel jnthn: I'd if I could :)!
17:46 PerlJam And, to be fair(ish) to Rakudo, S05:655 does say "A single statement (up through a terminating semicolon) is parsed as normal Perl 6 code:"   So it's not surprising that Rakudo would want that semicolon.
17:46 synopsebot Link: http://perlcabal.org/syn/S05.html#line_655
17:46 vendethiel If you have directions, I'll take those too, always good
17:47 tadzik hi from a bar o/
17:47 PerlJam tadzik: is the bar currently in motion?  ;)
17:47 tadzik not a plane, and nobody's even remotely high :)
17:48 tadzik PerlJam: not quite. But it's pretending to be a boat :P
17:48 PerlJam .oO( and the people all said "Sit down!  Sit down you're rocking the boat!" )
17:48 * tadzik forgot that "let's meet 1830-1900" actually means "let's meet 19 or later" for some people
17:49 timotimo let's meet like it's 1984
17:49 dalek specs: 999d06d | larry++ | S05-regex.pod:
17:49 dalek specs: :my also allows line-final brace
17:49 dalek specs: review: https://github.com/perl6/specs/commit/999d06d21a
17:49 tadzik timotimo: in the only romm without  a TV? :)
17:49 tadzik * room
17:50 timotimo that'd be it, yeah
17:50 kivutar joined #perl6
17:50 TimToady PerlJam: and to be fair(ish) to niecza, it's following STD there :)
17:51 PerlJam The great thing about standards is that there are so many to choose from  :)
17:51 FROGGS joined #perl6
17:51 TimToady some STDs are deadlier than others...
17:52 FROGGS except when they are not?
17:52 * tadzik hopes niecza's STD is not lethal
17:57 raiph joined #perl6
18:08 zaydon joined #perl6
18:12 berekuk joined #perl6
18:17 [Sno] joined #perl6
18:39 guru joined #perl6
18:50 colomon joined #perl6
18:53 colomon tadzik: I dunno, niecza's not looking too healthy these days.  ;(
19:01 fhelmberger joined #perl6
19:04 timotimo there is now "Python with Braces"
19:10 moritz timtwotdi in python? :-)
19:11 pecastro joined #perl6
19:14 Alina-malina joined #perl6
19:24 raydiak hi from an enormous, spinning, spherical spaceship
19:25 FROGGS O.o
19:29 raydiak too cryptic? you're here too, FROGGS :)
19:29 FROGGS ahh
19:29 FROGGS *g*
19:29 moritz we just happen not to think of it as a ship, generally :-)
19:30 FROGGS nor that it is spherical!
19:30 raydiak well it'd be less amusing if it was painfully obvious
19:30 raydiak if you include the atmosphere as part of it, which it is, it's pretty close...
19:30 timotimo moritz: i learnt today: if a boat fits onto it, it's a ship
19:31 kurahaupo_mobile joined #perl6
19:32 benabik It's only off by 0.3%
19:34 moritz not visible to the human eye then
19:34 PerlJam raydiak: even with the solar wind, you think the earth-ship-atmosphere is spherical?
19:34 raydiak doesn't that make the definition of a boat circular? if a boat doesn't fit on it, it's a boat and not a ship
19:35 benabik Most of the solar wind is deflected by the magnetosphere.
19:35 benabik Wouldn't be a terribly pleasant place to stay without it.
19:35 PerlJam not to mention the same gravimetric effects that alter the shape of the rocky part also affect the atmosphere.
19:35 benabik See also: Mars
19:36 kurahaupo_mobile joined #perl6
19:38 raydiak well, I suppose tbh I am clueless about such things
19:39 raydiak http://images.tutorvista.com/cms/images/83/layers-of-the-atmosphere.PNG # there, see? round. :)
19:39 * raydiak hides
19:40 FROGGS looks like a disc to me :o)
19:40 PerlJam raydiak: do not confuse a model of a physical system with the actual physical system  ;)
19:41 raydiak oh but I'm so good at being confused...
19:41 ruoso joined #perl6
19:43 raydiak so I suppose it makes some sort of raindrop-looking shape pointing away from the sun or something?
19:43 FROGGS at least the magnetosphere looks like this
19:44 benabik http://upload.wikimedia.org/wikipedia/commons/f/f3/Magnetosphere_rendition.jpg
19:44 geekosaur spider vs sauron?
19:44 geekosaur :p
19:45 samebchase joined #perl6
19:46 raydiak I'd keep asking questions, but I suspect a search engine could answer all of them, so I'll simply say thank you for correcting my hilariously cartoonish mental model :)
19:48 samebchase joined #perl6
19:50 PerlJam raydiak: nah ... "sphere" is close enough.  We're just a bunch of know-it-alls  ;)
19:53 raydiak tis karma...2/3rd of a lifetime of doing this to other people is coming back on me now haha
19:53 xenoterracide joined #perl6
19:54 raydiak brb quick run to the gas station
19:54 FROGGS but please without helmet O.o
19:55 dalek nqp: 5ab5852 | nicholas++ | t/serialization/01-basic.t:
19:55 dalek nqp: Basic serialization tests for integers.
19:55 dalek nqp:
19:55 dalek nqp: Start by testing that -258 .. 258 round trip correctly.
19:55 dalek nqp: review: https://github.com/perl6/nqp/commit/5ab585297c
19:55 dalek nqp: 1a559ff | nicholas++ | t/serialization/01-basic.t:
19:55 dalek nqp: Serialization tests for integers up to 2**62.
19:55 dalek nqp: review: https://github.com/perl6/nqp/commit/1a559ff0fd
19:55 dalek nqp: 5e7f95e | nicholas++ | t/serialization/01-basic.t:
19:55 dalek nqp: Serialization tests for integers around 2**63, and other interesting values.
19:55 dalek nqp: review: https://github.com/perl6/nqp/commit/5e7f95eaf0
19:55 dalek nqp: 05c5d89 | jnthn++ | tools/build/MOAR_REVISION:
19:55 dalek nqp: Bump MOAR_REVISION for varint serialization fixes.
19:55 dalek nqp: review: https://github.com/perl6/nqp/commit/05c5d89b3d
20:05 daniel-s joined #perl6
20:05 raydiak back
20:08 fhelmberger joined #perl6
20:10 denisboyun joined #perl6
20:14 * raydiak is still reading about the atmosphere
20:15 benabik Spaaaaaaaaaace
20:17 raydiak I don't like that the magnetosphere is considered part of the atmosphere
20:19 benabik raydiak: I think it's more that the boundaries are a little fuzzy.
20:22 raydiak that's definitely part of the problem...maybe my hangup is that the magnetosphere is comprised of bosons, if I understand correctly
20:22 kurahaupo_mobile the most empty parts of space still have a few hundred thousand particles per cubic kilometer
20:23 raydiak sure, I guess in some ways you could say that all of space is the earth's atmosphere
20:24 kurahaupo_mobile compared with which, "space" around earth's orbit has many orders of magnitude more "atmospheric pressure"
20:28 raydiak around earth's orbit, or around earth? are we talking about the solar atmosphere, or the terrestrial atmosphere?
20:30 * raydiak is creating atmosphere in the space between on-topic conversations :)
20:33 kurahaupo_mobile raydiak: :)
20:38 daxim joined #perl6
20:46 kaare_ joined #perl6
20:49 raiph joined #perl6
20:53 berekuk joined #perl6
20:57 [Coke] .u 202F
20:57 yoleaux U+202F NARROW NO-BREAK SPACE [Zs] ( )
20:58 [Coke] .u 2009
20:58 yoleaux U+2009 THIN SPACE [Zs] ( )
20:59 TimToady yer thin space is not thin
21:01 [Coke] trying to trick webex, which INSISTS on converting :) into an emoticon
21:01 stevan_ joined #perl6
21:02 TimToady which is silly, since it already is one :)
21:02 FROGGS [Coke]: try ∶)
21:03 [Coke] FROGGS++ FROGGS++ FROGGS++ FROGGS++
21:03 FROGGS hehe
21:03 [Coke] TimToady: it's even sillier when "select count(*) from foo" gets an emoticon in it. :P
21:04 TimToady emoticon translation belongs to be attached to your compose key
21:06 TimToady unfortunately we've reached the stage where your phone thinks it's smart than you are, which, it might be right in some cases...
21:06 TimToady *smarter
21:06 TimToady wouldn't take much to be smarter than me right now...
21:07 FROGGS :/
21:13 xinming_ joined #perl6
21:13 * FROGGS does a bit v5 just to do something non $dayjobish
21:15 denis_boyun joined #perl6
21:16 FROGGS ahhh, I always enjoy seeing this list:
21:16 FROGGS Using /home/froggs/dev/nqp/install/bin/nqp-p (version 2014.01-37-g05c5d89 / Parrot 5.9.0).
21:16 FROGGS Using /home/froggs/dev/nqp/install/bin/nqp-j (version 2014.01-37-g05c5d89 / OpenJDK 1.7.0_51).
21:16 FROGGS Using /home/froggs/dev/nqp/install/bin/nqp-m (version 2014.01-37-g05c5d89 / MoarVM 2014.01-136-g4b1c237).
21:16 timotimo :)
21:16 FROGGS and I'd love to see a nqp-js on node.js or so :o(
21:18 FROGGS but I know that I probably won't be able to put energy into it nor would I use it heavily
21:18 FROGGS at least not in near future
21:38 treehug88 joined #perl6
21:46 FROGGS std: chr(160) ~~ m:P5/\N{NO-BREAK SPACE}/ # I might do this these days
21:46 camelia std 09dda5b: OUTPUT«ok 00:01 140m␤»
21:46 FROGGS r: chr(160) ~~ m:P5/\N{NO-BREAK SPACE}/ # I might do this these days
21:46 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: ( no output )
21:46 FROGGS huh
21:46 FROGGS r: say chr(160) ~~ m:P5/\N{NO-BREAK SPACE}/ # I might do this these days
21:46 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«False␤»
21:47 FROGGS r: say chr(160) ~~ m:P5/\N{NEL}/
21:47 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«False␤»
21:47 timotimo sounds good to me :)
21:47 FROGGS yeah
21:48 FROGGS thing is that it blows up in v5
21:50 FROGGS ohh
21:51 FROGGS it treats \N in m:P5 as the opposite of \n -.-
21:51 timotimo d'oh :)
21:54 jnthn OH \NOES
21:54 BenGoldberg joined #perl6
21:54 FROGGS *g*
21:56 vmspb joined #perl6
22:03 raiph joined #perl6
22:23 rurban joined #perl6
22:26 rurban1 joined #perl6
22:34 telex joined #perl6
22:35 rurban joined #perl6
22:35 dalek perl6-roast-data: f7b0536 | coke++ | / (4 files):
22:35 dalek perl6-roast-data: today (automated commit)
22:35 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f7b053675d
22:36 [Coke] rakudo.jvm has a new failure today
22:36 [Coke] (and should have none)
22:36 jnthn Hmm
22:37 timotimo it seems kind of hard to debug a plugin for the debugger %)
22:37 timotimo except of course putting print statements all over the place
22:46 stevan_ joined #perl6
22:55 virtualsue joined #perl6
22:56 stevan__ joined #perl6
22:56 pippo joined #perl6
22:56 pippo Hello #perl6
22:56 yoleaux 10:22Z <FROGGS> pippo: the problem it that handle is NULL and then trying to access handle->body explodes on line 652
22:56 yoleaux 10:22Z <FROGGS> pippo: so you just worked around that NULL pointer bug
23:00 pippo FROGGS: after some testing with gdb. It appears that replacing 'handle->body.encoding_type' with 'body->encoding_type' on line 652 solves the problem.
23:02 berekuk joined #perl6
23:02 telex joined #perl6
23:06 pippo It appears that on line 649,  uv_run(tc->loop, UV_RUN_DEFAULT), is resetting 'handle' to 0x0. But 'body' keeps the address of the data structure.
23:10 pippo .tell FROGGS after some testing with gdb. It appears that replacing 'handle->body.encoding_type' with 'body->encoding_type' on line 652 solves the problem.
23:10 yoleaux pippo: I'll pass your message to FROGGS.
23:10 pippo .tell FROGGS It appears that on line 649,  uv_run(tc->loop, UV_RUN_DEFAULT), is resetting 'handle' to 0x0. But 'body' maintains the address of the data structure.
23:10 yoleaux pippo: I'll pass your message to FROGGS.
23:11 kivutar joined #perl6
23:14 grondilu does http://rosettacode.org/wiki/Grayscale_image#Perl_6 work for you?  I get "Invalid character in ASCII string" with R*
23:25 lue Whoever expected .lines to work on a binary file?
23:30 skids joined #perl6
23:30 * TimToady suspects it's from a time before we even had Buf
23:31 lue grondilu: it works, you just need a .ppm file. It's not just stuck on working through it with a ppm.
23:32 lue s/not//
23:32 TimToady the picture is not a ppm file
23:33 lue The "write a ppm" file seems to be broken :/
23:34 lue $out.printf("%c%c%c", $r*2, $g*2, 255-$r*2);  <-- this seems to be the culprit, unless you can write raw bytes to a binary file like that.
23:34 skids left #perl6
23:34 skids joined #perl6
23:34 TimToady now *that* one was pre-Buf
23:35 grondilu I did try it with a ppm file, though (made it with imagemagick)
23:35 * skids wonders if that little-bigint moar stuff is in the camelia r-m build yet.
23:35 lue btw, $out.printf fails anyway, I replaced it with an equivalent printing command that broke.
23:35 TimToady you want .write nowadays for bufs
23:36 aindilis joined #perl6
23:37 grondilu and with r-m I get "Malformed UTF-8 at line 1 col 1"  :/
23:38 TimToady what version of ppm did you make?
23:38 grondilu P6
23:39 lue Huh, am I not allowed to reupload files on RC?
23:39 TimToady no image uploads currently
23:39 TimToady too much spam
23:39 lue :(
23:39 lue [the ppm I generated is brighter than the one uploaded in 2011]
23:40 lue By the way, I fixed the write a PPM script :) http://rosettacode.org/wiki/Bitmap/Write_a_PPM_file#Perl_6
23:40 grondilu the image I used was https://upload.wikimedia.org/wikipedia/en/thumb/2/24/Lenna.png/220px-Lenna.png, converted with 'convert Lenna.p{ng,pm}'
23:41 grondilu first three lines are P6,256 256, 255.  As expected
23:41 timotimo skids: i believ little big int (now known as smallint) is in there by now. the NPQ_REVISION and MOAR_REVISION have been bumped a few times since
23:42 lue Whoever wrote the grayscale image script wrote it in a time where you could use mix binary and text conventions carelessly :/
23:43 grondilu it'd be nice to rewrite it then, as a way to illustrate how to properly open this kind of file.  It's not ovious to me how to do it and S16 is not of much help it seems.
23:44 TimToady slurp it and s/// off the "lines" on the front?
23:44 TimToady oh wait
23:45 TimToady well, s/// *ought* to work on bufs, but doesn't
23:45 skids timotimo: thanks.  Seems to have fixed at least one of the two's complement problems from libtomath.  Still plenty of weirdness though.
23:45 timotimo can we .find or something?
23:45 lue grondilu: I'm in the process of rewriting
23:45 timotimo skids: it introduced "fast paths" for some operations, so maybe the two's complement problems are still there if you go beyond 32 bit integers
23:45 TimToady I suppose you could read it in as latin-1...
23:46 skids timotimo: yeah, will require quite some thorough tests.
23:46 timotimo i would have suggested finding the first three \n and transforming the string up until there into ASCII
23:46 lue I don't like ppm. Its header uses text for things that could easily be binary :/
23:47 grondilu ASCII headers for binary files are quite common, aren't they?
23:47 grondilu it allows human to get an idea of what they're dealing with.
23:47 TimToady like I say, it's perfectly valid latin-1 :)
23:47 skids r: :18446744073709551616[1,1].say # r-j found an even different way to break here.
23:47 camelia rakudo-parrot 260cd7, rakudo-moar 260cd7: OUTPUT«-9223372036854775807␤»
23:47 camelia ..rakudo-jvm 260cd7: OUTPUT«9223372036854775808␤»
23:49 lue grondilu: in my experience, the only text in binary files is stuff that has to be text, e.g. words.
23:49 lue And in any case, doesn't change the fact that I think it's stupid :)
23:50 mavcunha joined #perl6
23:50 grondilu well, I disagree.  I think it's nice if you can just type 'head -3 img.ppm' in order to get the properties of the image.
23:51 TimToady this is why we want bufs to act a bit like strings some of the time
23:52 * lue doesn't understand why you'd want to waste three bytes for a number that otherwise takes up one :)
23:53 TimToady a buf8 was supposed to act like an ASCII string, with the possibility of high bytes that have no character properties
23:53 TimToady we haven't really got there yet
23:53 * lue is getting troublesome flashbacks to an earlier buf discussion... *shudder*
23:54 jnthn TimToady: Supposed to act like it in one what? You can concatenate it, for instance?
23:54 jnthn TimToady: What should say $a_buf8 be doing?
23:54 jnthn s/one what/what ways/
23:55 lue This "text header" business would explain why I'm the only one who thinks Buf (or whatever else handles binary IO) shouldn't associate with stringy stuff.
23:55 jnthn .oO( too tired to English, apparently... )
23:56 grondilu lue: losing three bytes does not matter for an image file that is potentially megabytes big
23:56 lue grondilu: I was being silly there. Of course it doesn't make ~that much~ of a difference.
23:56 jnthn lue: I think the most important distinction is whether you have a bunch of bytes or a bunch of characters. Defining certain operations on both (such as concatentation) is just like we define + on integers and complex numbers; the semantics are predictable, even if the details of the operation and the result type differ.
23:57 * lue finds what his problem with Buf was last discussion...
23:58 lue http://rosettacode.org/wiki/Grayscale_image#Perl_6 <-- not perfect, but runs
23:58 TimToady concat should work, say should probably fail on a buf without expcicit encoding
23:58 TimToady *licit
23:58 dmol1 joined #perl6
23:58 jnthn TimToady: Ah. At the moment it gists to something showing what's in there...
23:58 grondilu Buf could have a gist that uses Base64 or something.
23:58 TimToady oh, for some reason was thinking 'print'
23:59 jnthn r: say 'Klockan öl!'.encode('utf-8')
23:59 TimToady say should probably show ascii, \x the rest
23:59 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«Buf:0x<4b 6c 6f 63 6b 61 6e 20 c3 b6 6c 21>␤»
23:59 lue Ah, this is it: http://irclog.perlgeek.de/perl6/2014-01-10#i_8103826
23:59 lue r: say Buf.new((1,2,3))
23:59 camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«Buf:0x<01 02 03>␤»
23:59 lue r: say (1,2,3).Buf

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

Perl 6 | Reference Documentation | Rakudo