»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
dalek kudo-star-daily: 3540cec | coke++ | log/ (5 files):
today (automated commit)
00:01
rl6-roast-data: 7a3f74f | coke++ | / (5 files):
today (automated commit)
00:02 Adriaaan left
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:"?!
pippo .tell FROGGS replaced 'handle->body.encoding_type' with '1' on line 652 of MoraVM/src/io/fileops.c and now it works.
yoleaux pippo: I'll pass your message to FROGGS.
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:04 pippo left 00:06 Myk267 left 00:08 camelia joined 00:09 skids joined 00:10 ChanServ sets mode: +v camelia 00:18 benabik left, xenoterracide joined 00:21 nebuchadnezzar left 00:24 daniel-s joined 00:25 benabik joined 00:26 ens joined 00:29 dayangkun joined, araujo joined 00:32 colomon joined, Myk267 joined 00:47 stevan_ left 00:48 raiph left
raydiak timotimo: thanks, I'll give it a good polishing pass tonight including those issues 00:48
00:49 raiph joined 00:50 Myk267 left
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
00:56 Myk267 joined, Myk267 left, Myk267 joined
raydiak imo, with some better styling, it'll stand out more being set apart than it would inline with the Pod content 00:56
(though I do need to fix the overlap problem too, if I leave the placement as is) 00:57
00:58 raiph left 01:03 zakalwe left 01:08 benabik left 01:09 revdiablo left 01:10 revdiablo joined, ingy left, mattp_ left, ingy joined 01:11 clkao left 01:12 benabik joined 01:27 zakalwe joined 01:29 DarthGandalf left 01:34 araujo left, araujo joined 01:35 araujo left, araujo joined 01:36 brother joined, DarthGandalf joined, mattp_ joined 01:37 raiph joined 01:42 raiph left 01:43 raiph joined 01:45 raiph left 02:00 kbaker joined 02:04 vmspb left 02:06 Lorn left
TimToady p6: gist.github.com/anonymous/8928045 02:09
camelia niecza v24-109-g48a8de3: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤ MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unrecognized regex modifier :my␤at /tmp/tmpfile:3␤------> ⏏:my token MANTISSA { \d+ '.'? \d* | '.'␤ expectin…»
TimToady niecza++ and a rakudobug
masak: ^^^ 02:10
rakudo requires an extra semicolon after the closing brace, rather than relying on the end-of-statement semantics of normal Perl 6 02:11
02:14 Khisanth left 02:15 clkao_ joined 02:17 dayangkun left 02:22 Woodi left 02:26 mavcunha left 02:28 Khisanth joined 02:30 dayangkun joined 03:01 ilbot3 left 03:02 Biohazard left, gfldex left, gfldex joined 03:03 jercos left, genehack joined 03:04 kshannon joined, araujo left 03:05 ilbot3 joined 03:06 Biohazard joined 03:08 genehack left 03:09 genehack joined, jercos joined 03:12 raiph joined 03:13 breinbaas left, breinbaa1 joined 03:14 DarthGandalf left, Biohazard left 03:15 Biohazard joined 03:16 pdcawley left 03:17 DarthGandalf joined, pdcawley joined 03:35 breinbaa1 left 03:38 breinbaas joined 03:39 erkan left 03:40 konnjuta joined 03:51 raiph left 03:57 treehug88 left 04:15 [particle] joined 04:16 [particle]1 left 04:20 jnap1 left 04:22 cognominal left 04:23 cognominal joined 04:28 ggherdov left, cognominal left 04:29 ggherdov joined 04:46 rurban left 04:48 PZt left, PZt joined, thou left 04:51 jnap joined 04:55 jnap left 05:05 arlinius left 05:09 regreg joined 05:10 BenGoldberg left 05:14 erkan joined 05:23 [Sno] left 05:36 Rotwang joined 05:42 konnjuta left 05:43 cognominal joined 05:47 rurban joined 05:51 jnap joined 05:56 jnap left 05:59 SamuraiJack_ joined 06:18 rylinaux_ joined 06:19 Rotwang left 06:21 rurban left 06:31 FROGGS joined 06:32 [Sno] joined 06:33 arlinius joined 06:43 dmol joined
moritz raydiak: +1 to the search 06:48
timotimo raydiak: thanks. good work otherwise! :) 06:50
06:50 logie__ left
raydiak timotimo: I ran out the door w/out proper testing; thanks for being more rigorous than I :) fixed now 06:51
timotimo hah 06:52
i hope i didn't seem too harsh
06:52 jnap joined
raydiak not at all, I'm being sincere...appreciate having extra eyes 06:52
timotimo i'm glad :) 06:53
DrEeevil ah, so funny
moarvm tarballs are github'ed again, can't use that stuff at all ever 06:54
silly me!
timotimo has no admin capabilities for that repo, otherwise would try to get rid of these things 06:55
DrEeevil it makes generating tarballs needlessly exciting 06:56
I think I first reported that bug a year ago ...
timotimo maybe not a whole year, but something like that
DrEeevil (but in between github even "lost" their release tarball service for a week and didn't notice)
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
DrEeevil timotimo: I hit it with opendylan the first time
I think 06:57
06:57 jnap left
lue raydiak: I think we're waiting for someone to eventually fix that up. 06:57
timotimo oh, ok 06:58
DrEeevil actually even more fun: the tarball has 3dparty/libtommath but not 3dparty/dyncall
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
lue I'd personally prefer something shinier, after all perldoc seems to do fine with a decent theming :) 07:00
07:03 FROGGS left 07:13 logie_ joined
DrEeevil eh. submodules, again. I always let myself get trapped by the obvious ... 07:14
07:22 nebuchadnezzar joined, rurban joined 07:23 darutoko joined
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:25
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:27
I feel like I should be writing an e-mail instead at this point 07:28
timotimo write a strongly worded letter! :)
raydiak haha :) just sometimes I stop and look back at what I'm writing and realize I'm flooding 07:30
07:31 logie_ left 07:32 mattp__ joined
moritz raydiak: feel free to improve the styling in any way you see fit 07:33
I'm not at all good at that sort of stuff, so I appreciate input from others
07:36 FROGGS joined
masak morning, #perl6 07:41
07:42 stevan_ joined
raydiak good morning masak 07:42
timotimo hello masak! :)
masak raydiak: as to flooding, you're too hard on yourself. look, you're on topic and everything! :)
timotimo agreed. 07:43
moritz raydiak: fwiw I'm all for putting files into html/ if they should be downloaded unmodified by the client 07:45
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:47
timotimo that's right. #perl6 strikes me as rather liberal in this regard 07:48
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 :-)
raydiak #perl6 strikes me as rather liberal in most regards...it's quite...liberating
deal! 07:50
masak we're the community's rewrite of the community :)
moritz raydiak: then maybe a template/ folder would be apropriate
(though for me it's not a blocker 07:51
)
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:51 rurban left
moritz (feather2 being the host behind doc.perl6.org) 07:52
raydiak moritz: okay, will do, but not before the merge
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
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
raydiak goes to look for his ssh key 07:54
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
moritz you can also paste me more than one ssh key :-) 07:56
timotimo but never more than one from the same keypair :) 07:57
07:58 stevan_ left, jnap left
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) 07:59
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
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!
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:05
dalek c: 8d5a177 | raydiak++ | htmlify.pl:
Support custom head content when calling p2h
08:09
c: 4ae3291 | raydiak++ | / (4 files):
Move search JS into a separate file
doc: ef8185a | raydiak++ | htmlify.pl:
08:09 dalek left
moritz RIP, dalek 08:09
timotimo rip in piece
08:09 dalek joined, ChanServ sets mode: +v dalek
moritz timotimo: did you mean "ripped in pieces"? :-) 08:10
08:10 arlinius left
raydiak tried to ./sync, and then figured out it doesn't work very well if you don't ./htmlify.pl first :P 08:11
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
08:14 xinming joined
timotimo that's right :( 08:14
raydiak that's not the search, those are the main index links
moritz raydiak: yes, you need content negotiation 08:15
08:15 zakharyas joined
moritz one could write a small p5 (or p6) local web server 08:15
raydiak moritz: would it not be better to have the .html and have it work everywhere without additional complexity? 08:16
or what about generating differently for local html files vs files built for the web?
08:16 stevan_ joined
moritz raydiak: I value nicer URLs for the enduser higher than developer convenience 08:17
08:19 stevan_ left
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:19
moritz aye 08:20
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:21
moritz aye 08:23
raydiak local disk URLs are pretty much always ugly anyways :) 08:24
(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
raydiak wonders how well that would work on his 5-year-old android phone 08:29
timotimo we should develop a non-sucky hyperlinked text browser for the commandline 08:31
like they used to have in the very beginning
raydiak timotimo: sounds like a job for catui... 08:34
timotimo :) 08:36
catui will be amazing. also it will never exist if i continue at the current pace :)
08:37 logie_ joined 08:39 mattp__ left 08:42 logie_ left
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.
i need to do lots and lots and lots of thinking before it makes sense to actually start implementing things 08:45
08:48 pecastro left
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
it'll surely be a challenge
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
the big list respec will be very interesting
raydiak I don't follow news very closely...what big list respec? 08:51
timotimo it's old news ;) 08:52
patrick has been meaning to give the whole of S07 a thorough re-think
raydiak anything specific, or does nobody know yet? 08:53
timotimo i don't know the specifics
raydiak I'm thinking about reworking this template I started for a customer who never finished paying for their site: gc.cyberuniverses.com/ 09:02
for the docs 09:03
change the colors and background, etc
timotimo oh my, 3d buttons :)
raydiak just beveling tricks with css
rounded corners are css3, but degrade gracefully to square corners 09:04
timotimo subtlepatterns.com/ ← this is an excellent source for tiling background images, btw
raydiak oh, cool
I won't plagiarize content from random google images results for perl 6 docs, of course :) 09:05
timotimo of course not
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:06
iirc, it actually did work fine on my phone 09:07
timotimo not bad, aye 09:08
i've only recently started doing some web development with the help of bootstrap
it's a pleasure to have it work properly on any size and still look tolerable in big formats :)
raydiak yeah, that can be a tough balance to find without having separate stylesheets or a separate "mobile version" 09:10
web development is a...unique set of challenges
timotimo it is
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
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:12
it's *way* easier than it used to be though...you can pretty safely ditch ie6 support these days :P 09:13
09:13 xenoterracide left
raydiak (broken box model and so forth) 09:13
timotimo aye 09:14
raydiak what is bootstrap?
timotimo twitter bootstrap
a set of css rules and instructions on how they can be combined in proper ways 09:15
very flexible, easy to get started with, looks pretty good (except now every other website looks like twitter bootstrap)
raydiak some people might call this eccentric in this day and age, but I still write it all by hand 09:17
it feels ever so vaguely like sculpting :) 09:18
timotimo that's totally fine
raydiak of course, that only works because I try to limit myself to fairly small-scale stuff 09:20
timotimo :) 09:22
09:30 stevan_ joined 09:31 denisboyun joined, dakkar joined
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:38
timotimo good night then! :) 09:42
raydiak yep, definitely bed time...thanks for chatting timotimo (and everyone else earlier, of course) 09:43
g'night #perl6
timotimo always a pleasure
09:45 stevan_ left 09:50 rindolf joined 09:55 stevan_ joined 09:56 denisboyun left 09:57 denis_boyun joined 09:58 pecastro joined 10:00 Grimnir__ joined, Grimnir_ left 10:02 erkan left 10:03 spuelrich joined 10:04 spuelrich left
jnthn morning o/ 10:04
10:05 kbaker left
nwc10 In nqp, is there a way to force (native) integer arithmetic 10:19
10:19 telex left
nwc10 I'd like to think about integers larger than 2**52 10:19
FROGGS morning
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.
00:03Z <pippo> FROGGS: could be related to the fact that my terminal has LANG=en_US.UTF-8?
FROGGS ?
nwc10 OK. Why isn't it working for the bigger program. 10:20
10:20 telex joined
nwc10 I seem to have a problem somewhere around the keyboard/chair boundary, but I'm not certain 10:20
FROGGS *g*
nwc10 aha 10:21
++ doesn't do ints
so, not my bug, technically
nqp: 'my int $b := 9007199254740992; say($b); ++$b; say($b) 10:22
nqp: my int $b := 9007199254740992; say($b); ++$b; say($b)
FROGGS .tell pippo: the probles it that handle is NULL and then trying to access handle->body explodes on line 652
yoleaux FROGGS: What kind of a name is "pippo:"?!
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)␤»
..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…»
..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…»
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)␤»
..nqp-moarvm, nqp-jvm: OUTPUT«9007199254740992␤9007199254740992␤»
FROGGS .tell pippo the problem it that handle is NULL and then trying to access handle->body explodes on line 652
yoleaux FROGGS: I'll pass your message to pippo.
FROGGS .tell pippo so you just worked around that NULL pointer bug
yoleaux FROGGS: I'll pass your message to pippo.
nwc10 both are 9007199254740992
is that an NQP bug, or an NQP wontfix? 10:23
FROGGS I think it is on jnthn's agenda
jnthn nwc10: It's a "stuff details to doubles"
uh
defaults
FROGGS details to defaults? :P 10:24
jnthn Though ++ if it knows it's got an int shouldn't...
FROGGS p: my int $x; ++$x # maybe this was on the agenda, not sure
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␤␤»
jnthn FROGGS: Yes, that one is 10:25
FROGGS k, I almost thought so
jnthn Hmm. We compile ++ into an add_n... I wonder why.
FROGGS to cope with inf? 10:26
jnthn In NQP? :)
FROGGS knows nothing about NQP :o)
10:27 clkao_ left 10:28 clkao_ joined
jnthn changes it and sees if anything breaks 10:28
In theory it'll generate better code for any my int $i that you ++...
Hm, seems fine enough in NQP tests 10:30
10:31 denis_boyun left
jnthn And builds a sanity-test-passing Rakudo. 10:33
10:39 lizmat left 10:42 mavcunha joined 10:45 rindolf left 10:48 stevan_ left
dalek p: 4ede847 | jnthn++ | src/vm/ (3 files):
Change ++ and -- to always to integer math.

We most often do this on native int variables anyway, so this will generate better code.
10:50
p: 4a81c2a | jnthn++ | src/ (6 files):
Use native types in a few more places.
jnthn nwc10: 4ede847 should help 10:51
nwc10 jnthn: unary negation in nqp converts to a float. 0 - $int does integer negation
jnthn nwc10: You can always be explicit abotu exaclty what you want by using e.g. nqp::neg_i($int) 10:53
nwc10 aha
so there's an NQP op for <= ? 10:59
jnthn nqp::islt_i
uh, le
nwc10 thanks
11:03 gfldex left, kivutar joined 11:04 gfldex joined 11:18 arlinius joined
nwc10 nqp: my int $a := 0x7FFFFFFFFFFFFFFF; say($a) 11:19
that wold be a bug :-(
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)␤»
..nqp-moarvm: OUTPUT«-9223372036854775808␤»
..nqp-jvm: OUTPUT«9223372036854775807␤»
nwc10 nqp: my int $a := 0x7FFFFFFFFFFFF000; say($a) 11:20
camelia nqp-moarvm, nqp-jvm: OUTPUT«9223372036854771712␤»
..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)␤»
nwc10 oh sigh, but that one is positive.
so it's ending up as floating point, it seems
jnthn MAST::Op const_i64 11:23
MAST::Local index<8>
MAST::IVal value<-9223372036854775808>, size<64>, signed<1>
It's already been spoiled by the time we get to code-gen...
Oh, it's wrong in the QAST::IVal too 11:24
11:24 sqirrel joined
jnthn Urgh 11:26
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:28
FROGGS hmmm, that sounds like we could save something there 11:30
jnthn FROGGS: My suggestion is an extra flag to nqp::radix that tells it to do int 11:31
FROGGS: That is, it already takes flag bits anyway
FROGGS: So it's not a nasty change to do.
11:31 dmol left 11:38 denisboyun joined 11:52 kivutar left 11:58 Adriaaan joined 12:05 rurban joined 12:08 woolfy left 12:12 grondilu_ left 12:23 grondilu joined 12:41 kurahaupo_mobile joined 12:46 mtk left 12:50 mtk joined 13:05 stevan_ joined 13:08 kaare_ left 13:12 kurahaupo_mobile left 13:26 skids left 13:32 rurban left 13:34 dmol joined 13:36 benabik left
nwc10 so it's ending up as floating point, it seems 13:54
(oops) ;-)
13:54 rurban joined
nwc10 in nqp, how does one create a BigInt which is holding a value 13:57
FROGGS nwc10: see gist.github.com/FROGGS/64c224637a10fff02e33 13:59
though in rakudo it creates an p6opaque that holds a bigint somehow
jnthn 60-bigint.t has examples of doing both 14:03
nwc10 and no comments. 14:04
14:04 jnap joined
FROGGS that is why it is in t/, not docs/ 14:06
FROGGS hides
jnthn Well, the tests all have descriptions, though :P
nwc10 yes, and the one I'm looking at is 'Bit ops (RT 109740)' :-)
FROGGS nqp-m -e 'nqp: my int $a := 0x7FFFFFFFFFFFF000; say($a)' 14:07
9223372036854771712
nqp-m -e 'nqp: my int $a := -0x7FFFFFFFFFFFF000; say($a)'
-9223372036854771712
is this correct now?
jnthn r: say 0x7FFFFFFFFFFFF000
camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«9223372036854771712␤»
FROGGS seems like 14:08
jnthn FROGGS: Can I see le patch?
FROGGS sure
nwc10 nqp: my int $a := 0x7FFFFFFFFFFF0000; my int $b := 0
camelia ( no output )
..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)␤»
nwc10 nqp: my int $a := 0x7FFFFFFFFFFF0000; my int $b := 0x7FFFFFFFFFFF0001; say($b - $a)
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)␤»
..nqp-moarvm, nqp-jvm: OUTPUT«0␤»
nwc10 there, without the line break
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 gist.github.com/FROGGS/e608db7d803ba75fcb89
jnthn: ^^
14:09 jnap left
nwc10 but I can't figure out how to make a bigint 14:09
14:12 Khisanth left
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
in rakudo, we use the Int type, which has a "box_target" for native ints
the Int object gets repr'd by a P6opaque, which inlines the body of a P6bigint where the int box target slot is
scratch the "native ints", it must be "ints"
(otherwise big ints wouldn't work)
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:13
uh, sorry 14:14
Final thing should be nqp::fromstr_I('134545', $bi_type)
nwc10 thanks 14:19
14:20 logie_ joined, colomon left 14:21 colomon joined
FROGGS jnthn: I guess in the MVM_radix() there should be no MVMnum* then, right? 14:24
14:26 Khisanth joined
jnthn FROGGS: uh...probably needs to be those when we parse floating point things 14:30
FROGGS okay, then I leave that unchanged
jnthn FROGGS: I'm a little surprised that patch is enough though...given value is a floating point? 14:31
14:32 jnap joined
timotimo aye, that still ought to blow up at some point 14:32
FROGGS :/
I think I see what you mean
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:33
14:33 sqirrel left
jnthn With a bigger refactor/dupe we could do just the needed one. 14:34
14:40 aindilis left 14:41 aindilis joined 14:46 btyler joined 14:49 pmurias joined 14:52 dayangkun left
pmurias why does radix return a num instead of an int? 14:52
timotimo "because what if it has a decimal point in it?" ;) 14:53
pmurias nqp::radix doesn't handle decimal points 14:54
but isn't the biggest num bigger then the biggest int?
timotimo could very well be. 14:55
14:56 guru joined 14:57 guru is now known as Guest29559, Guest29559 is now known as ajr_ 14:59 treehug88 joined 15:01 salv0 left
pmurias what's the the bit length of num and int in nqp? platform specific? 15:02
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
pmurias jnthn: so the reason for radix returning a num is that an int might be too small to parse some num constants? 15:04
15:05 skids joined, samebchase left, ruoso left 15:06 Alula left 15:07 raiph joined
jnthn pmurias: No, it's that it's also used for parsing floating point, iirc. 15:08
15:08 kbaker joined 15:10 Alula joined 15:15 ruoso joined 15:17 samebchase joined
pmurias jnthn: in nqp nqp::radix seems to be used only for parsing ints (according to a quick ack search) 15:17
jnthn: in rakudo nqp::radix_I is used instead
jnthn: and floating points are handled with numify
jnthn pmurias: Hmm. :)
pmurias: In which case I suspect it might want to use ints on backends we know it's 64-bit always... 15:18
Which is Moar and JVM.
15:18 Alula left
pmurias on 32-bit backends the large constants will end up overflowing later on? 15:19
jnthn int can only hold 32 bits there, so yeah, it'll overflow 15:21
15:27 colomon left 15:28 dayangkun joined
nwc10 should have said, I have testcases for integer serialisation, which work on (older) MoarVM and JVM, but Parrot dislikes 15:29
Can only use nqp_set_sc_for_object with a SixModelObject
jnthn Sounds like a consequence of Parrot not really doing 6model 15:30
15:30 Sqirrel joined
nwc10 this was my assumption. It dislikes the array 15:30
jnthn Maybe best ot just skip that test on Parrot.
Rather than spend time re-working it 15:31
15:31 arlinius left
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
jnthn Yeah. :)
15:34 lizmat joined 15:49 colomon joined 15:52 treehug88 left 15:54 treehug88 joined
pmurias should I commit my changes to make nqp::radix return an array of integers? 15:56
(on parrot) 15:57
jnthn pmurias: Does it cause any new test failures? 15:58
15:59 stevan_ left
pmurias make test for nqp passes 15:59
rakudo doesn't seem to use nqp::radix at all according to ack 16:00
16:03 Psyche^ left
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
lizmat nqp::radix_I appears in core settings, it seems 16:05
from src/core/Str 16:06
16:06 colomon left
jnthn Yeah, nqp::radix_I is a different beat 16:08
*beast
16:10 colomon joined 16:16 denisboyun left 16:19 Alula joined 16:20 isBEKaml joined 16:24 bluescreen10 joined 16:26 [Sno] left 16:28 stevan_ joined 16:30 kivutar joined 16:34 zakharyas left 16:35 sqirrel_ joined 16:38 isBEKaml left 16:41 isBEKaml joined
dalek p: db30969 | (Pawel Murias)++ | src/vm/parrot/ops/nqp.ops:
[nqp-parrot] Make nqp::radix return an array of integers
16:42
16:46 thou joined 16:49 kivutar left 16:51 fhelmberger left, isBEKaml left 16:57 guru joined, ajr_ left 16:58 guru is now known as Guest52455, Guest52455 is now known as ajr_ 17:00 ruoso left 17:06 FROGGS left 17:08 stevan_ left 17:10 ruoso joined
masak lol hi from a train! \o 17:10
nwc10 is it on time?
17:11 sqirrel_ left
masak too soon to tell 17:11
TimToady I dunno, it was in the station from two to two to two two...
lizmat hi from a boat 17:12
also too soon to tell it's going to be on time
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
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
definitely large enough to carry a boat :-) 17:15
TimToady hi from the comfy chair
oh wait, mustn't make python jokes here...
masak no, it's ok.
we just hug python people.
TimToady pleads gilcup
masak :P
lizmat nobody expects the comfy chair
perigrin masak: except Chapman ... otherwise 'eww' 17:16
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 :-)
masak haha 17:18
btyler it does seem to be something of a meme
TimToady someone should write a Python to Perl 6 translator
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.
vendethiel Let's do a javascript to perl 6
jnthn That sounds fun :)
masak TimToady: Python 2 or Python 3? :P
vendethiel so you can convert ANY language to perl 6 by compiling them to JS beforehand :P
jnthn ...but I already have plenty of other fun things to do :P
TimToady masak: *and*
masak ...of course.
btyler masak: well, you'd have to have broken unicode handling if you wanted to do python 2...
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
TimToady stays out of the woods
masak oops, meant woolfy.
lizmat masak: *phew* :-) 17:21
masak :P
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...
dalek kudo-star-daily: 590f6bd | coke++ | log/ (5 files):
today (automated commit)
lizmat :-)
masak and of course, if the Wife were a programmer, she'd say "Is it always 'xor'?"
lizmat ship's captain just announce we're not leaving yet due to high winds
.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
masak TimToady: sounds more like Rubyists to me...
lizmat I read that somewhere
masak is slightly ashamed he didn't immediately get TimToady's Sweeney Todd reference 17:24
17:25 cognominal left
TimToady it's a funny thing 17:26
17:26 cognominal joined
masak p6: gist.github.com/anonymous/8928045 17:26
camelia niecza v24-109-g48a8de3: OUTPUT«「+123.456e10」␤ SIGN => 「+」␤ MANTISSA => 「123.456」␤ EXPONENT => 「e10」␤␤»
..rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unrecognized regex modifier :my␤at /tmp/tmpfile:3␤------> ⏏:my token MANTISSA { \d+ '.'? \d* | '.'␤ expectin…»
masak submits TimToady++'s rakudobug
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 !
masak vendethiel: yeah, I just learned.
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
masak oh, TheDamian++
TimToady and I got to point out that it already worked exactly as he suggested, except for the working part (on rakudo)
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 :)
TimToady: Does throwing in semicolons on the end fix it?
TimToady yes
vendethiel PerlJam: that seems like something I could tackle. What's the repo for camelia ?
jnthn k
TimToady it's just the eol thing 17:32
vendethiel or is that perl6-rel directly ?
jnthn Yeah, I bet we're just missing a check.
lizmat signs off for now
17:32 lizmat left 17:33 benabik joined 17:34 rylinaux_ left
timotimo "perl6-rel"? 17:37
PerlJam vendethiel: I'm not sure what "that" is in your sentence. 17:42
vendethiel PerlJam: url parsing
17:43 raiph left
PerlJam oh! We were apparently talking about different things before. 17:43
Giving a URL to the p6 bot works for all implementations. It's the ":my token foo { ... }" that's novel. 17:44
vendethiel OH 17:45
we were talking about different things most certainly :P
jnthn vendethiel: Feel free to fix the Rakudo bug anyway ;-) 17:46
vendethiel jnthn: I'd if I could :)!
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.
synopsebot Link: perlcabal.org/syn/S05.html#line_655
vendethiel If you have directions, I'll take those too, always good 17:47
tadzik hi from a bar o/
PerlJam tadzik: is the bar currently in motion? ;)
tadzik not a plane, and nobody's even remotely high :)
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!" )
tadzik forgot that "let's meet 1830-1900" actually means "let's meet 19 or later" for some people
timotimo let's meet like it's 1984 17:49
dalek ecs: 999d06d | larry++ | S05-regex.pod:
:my also allows line-final brace
tadzik timotimo: in the only romm without a TV? :)
* room
timotimo that'd be it, yeah 17:50
17:50 kivutar joined
TimToady PerlJam: and to be fair(ish) to niecza, it's following STD there :) 17:50
PerlJam The great thing about standards is that there are so many to choose from :) 17:51
17:51 FROGGS joined
TimToady some STDs are deadlier than others... 17:51
FROGGS except when they are not? 17:52
tadzik hopes niecza's STD is not lethal
17:54 pecastro left 17:57 raiph joined 18:02 dakkar left 18:08 zaydon joined 18:12 berekuk joined 18:13 ajr_ left 18:17 [Sno] joined 18:27 SamuraiJack_ left 18:36 colomon left 18:39 guru joined, guru is now known as Guest31014 18:40 Guest31014 is now known as ajr_ 18:50 colomon joined
colomon tadzik: I dunno, niecza's not looking too healthy these days. ;( 18:53
19:01 fhelmberger joined, darutoko left
timotimo there is now "Python with Braces" 19:04
moritz timtwotdi in python? :-) 19:10
19:11 pecastro joined 19:13 Alina-malina left 19:14 Alina-malina joined 19:17 fhelmberger left
raydiak hi from an enormous, spinning, spherical spaceship 19:24
19:25 ruoso left
FROGGS O.o 19:25
19:27 denis_boyun left
raydiak too cryptic? you're here too, FROGGS :) 19:29
FROGGS ahh
*g*
moritz we just happen not to think of it as a ship, generally :-)
FROGGS nor that it is spherical! 19:30
raydiak well it'd be less amusing if it was painfully obvious
if you include the atmosphere as part of it, which it is, it's pretty close...
timotimo moritz: i learnt today: if a boat fits onto it, it's a ship
19:31 kurahaupo_mobile joined
benabik It's only off by 0.3% 19:32
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?
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
benabik Most of the solar wind is deflected by the magnetosphere. 19:35
Wouldn't be a terribly pleasant place to stay without it.
PerlJam not to mention the same gravimetric effects that alter the shape of the rocky part also affect the atmosphere.
benabik See also: Mars
19:36 kurahaupo_mobile left, kurahaupo_mobile joined
raydiak well, I suppose tbh I am clueless about such things 19:38
images.tutorvista.com/cms/images/83...sphere.PNG # there, see? round. :) 19:39
raydiak hides
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 ;)
raydiak oh but I'm so good at being confused... 19:41
19:41 ruoso joined 19:42 samebchase left
raydiak so I suppose it makes some sort of raindrop-looking shape pointing away from the sun or something? 19:43
19:43 kivutar left
FROGGS at least the magnetosphere looks like this 19:43
benabik upload.wikimedia.org/wikipedia/comm...dition.jpg 19:44
geekosaur spider vs sauron?
:p
19:45 samebchase joined
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:46
19:47 samebchase left 19:48 samebchase joined
PerlJam raydiak: nah ... "sphere" is close enough. We're just a bunch of know-it-alls ;) 19:50
raydiak tis karma...2/3rd of a lifetime of doing this to other people is coming back on me now haha 19:53
19:53 xenoterracide joined
raydiak brb quick run to the gas station 19:54
FROGGS but please without helmet O.o
dalek p: 5ab5852 | nicholas++ | t/serialization/01-basic.t:
Basic serialization tests for integers.

Start by testing that -258 .. 258 round trip correctly.
19:55
p: 1a559ff | nicholas++ | t/serialization/01-basic.t:
Serialization tests for integers up to 2**62.
p: 5e7f95e | nicholas++ | t/serialization/01-basic.t:
Serialization tests for integers around 2**63, and other interesting values.
p: 05c5d89 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for varint serialization fixes.
20:00 raiph left 20:05 daniel-s left, daniel-s joined
raydiak back 20:05
20:08 fhelmberger joined 20:10 denisboyun joined
raydiak is still reading about the atmosphere 20:14
benabik Spaaaaaaaaaace 20:15
raydiak I don't like that the magnetosphere is considered part of the atmosphere 20:17
benabik raydiak: I think it's more that the boundaries are a little fuzzy. 20:19
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
raydiak sure, I guess in some ways you could say that all of space is the earth's atmosphere 20:23
kurahaupo_mobile compared with which, "space" around earth's orbit has many orders of magnitude more "atmospheric pressure" 20:24
20:25 daxim left
raydiak around earth's orbit, or around earth? are we talking about the solar atmosphere, or the terrestrial atmosphere? 20:28
raydiak is creating atmosphere in the space between on-topic conversations :) 20:30
20:32 fhelmberger left
kurahaupo_mobile raydiak: :) 20:33
20:38 daxim joined 20:44 denisboyun left 20:46 kaare_ joined 20:49 raiph joined 20:51 berekuk left 20:53 berekuk joined 20:55 kurahaupo_mobile left
[Coke] .u 202F 20:57
yoleaux U+202F NARROW NO-BREAK SPACE [Zs] ( )
[Coke] .u 2009 20:58
yoleaux U+2009 THIN SPACE [Zs] ( )
TimToady yer thin space is not thin 20:59
[Coke] trying to trick webex, which INSISTS on converting :) into an emoticon 21:01
21:01 stevan_ joined
TimToady which is silly, since it already is one :) 21:02
FROGGS [Coke]: try ∶)
[Coke] FROGGS++ FROGGS++ FROGGS++ FROGGS++ 21:03
FROGGS hehe
[Coke] TimToady: it's even sillier when "select count(*) from foo" gets an emoticon in it. :P
TimToady emoticon translation belongs to be attached to your compose key 21:04
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
*smarter
wouldn't take much to be smarter than me right now...
FROGGS :/ 21:07
21:13 xinming_ joined
FROGGS does a bit v5 just to do something non $dayjobish 21:13
21:15 xinming left, denis_boyun joined
FROGGS ahhh, I always enjoy seeing this list: 21:16
Using /home/froggs/dev/nqp/install/bin/nqp-p (version 2014.01-37-g05c5d89 / Parrot 5.9.0).
Using /home/froggs/dev/nqp/install/bin/nqp-j (version 2014.01-37-g05c5d89 / OpenJDK 1.7.0_51).
Using /home/froggs/dev/nqp/install/bin/nqp-m (version 2014.01-37-g05c5d89 / MoarVM 2014.01-136-g4b1c237).
timotimo :)
FROGGS and I'd love to see a nqp-js on node.js or so :o(
but I know that I probably won't be able to put energy into it nor would I use it heavily 21:18
at least not in near future
21:22 zaydon left 21:35 treehug88 left 21:38 treehug88 joined
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␤»
FROGGS r: chr(160) ~~ m:P5/\N{NO-BREAK SPACE}/ # I might do this these days
camelia ( no output )
FROGGS huh
r: say chr(160) ~~ m:P5/\N{NO-BREAK SPACE}/ # I might do this these days
camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«False␤»
FROGGS r: say chr(160) ~~ m:P5/\N{NEL}/ 21:47
camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«False␤»
timotimo sounds good to me :)
FROGGS yeah
thing is that it blows up in v5 21:48
21:49 raiph left
FROGGS ohh 21:50
it treats \N in m:P5 as the opposite of \n -.- 21:51
timotimo d'oh :)
jnthn OH \NOES 21:54
21:54 BenGoldberg joined
FROGGS *g* 21:54
21:56 vmspb joined 22:00 skids left 22:03 raiph joined 22:10 rurban left 22:16 mavcunha left 22:21 telex left 22:23 rurban joined 22:26 rurban1 joined 22:28 rurban left 22:31 FROGGS left 22:33 rurban1 left 22:34 telex joined 22:35 rurban joined
dalek rl6-roast-data: f7b0536 | coke++ | / (4 files):
today (automated commit)
22:35
[Coke] rakudo.jvm has a new failure today 22:36
(and should have none)
jnthn Hmm
timotimo it seems kind of hard to debug a plugin for the debugger %) 22:37
except of course putting print statements all over the place
22:38 stevan_ left 22:46 stevan_ joined 22:55 virtualsue joined 22:56 stevan__ joined, pippo joined
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
10:22Z <FROGGS> pippo: so you just worked around that NULL pointer bug
22:58 berekuk left 22:59 stevan_ left 23:00 telex left
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:00
23:02 berekuk joined, telex joined
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:06
23:06 rurban left
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.
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.
yoleaux pippo: I'll pass your message to FROGGS.
23:11 pippo left, kivutar joined
grondilu does rosettacode.org/wiki/Grayscale_image#Perl_6 work for you? I get "Invalid character in ASCII string" with R* 23:14
23:15 bluescreen10 left, kbaker left 23:24 Adriaaan left
lue Whoever expected .lines to work on a binary file? 23:25
23:25 berekuk left 23:27 virtualsue left 23:28 treehug88 left 23:30 skids joined
TimToady suspects it's from a time before we even had Buf 23:30
lue grondilu: it works, you just need a .ppm file. It's not just stuck on working through it with a ppm. 23:31
s/not// 23:32
TimToady the picture is not a ppm file
lue The "write a ppm" file seems to be broken :/ 23:33
$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
23:34 skids left, skids joined
TimToady now *that* one was pre-Buf 23:34
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.
lue btw, $out.printf fails anyway, I replaced it with an equivalent printing command that broke.
TimToady you want .write nowadays for bufs
23:35 aindilis left 23:36 aindilis joined
grondilu and with r-m I get "Malformed UTF-8 at line 1 col 1" :/ 23:37
TimToady what version of ppm did you make? 23:38
grondilu P6
lue Huh, am I not allowed to reupload files on RC? 23:39
TimToady no image uploads currently
too much spam
lue :(
[the ppm I generated is brighter than the one uploaded in 2011]
By the way, I fixed the write a PPM script :) rosettacode.org/wiki/Bitmap/Write_a...ile#Perl_6 23:40
grondilu the image I used was upload.wikimedia.org/wikipedia/en/...Lenna.png, converted with 'convert Lenna.p{ng,pm}'
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
lue Whoever wrote the grayscale image script wrote it in a time where you could use mix binary and text conventions carelessly :/ 23:42
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:43
TimToady slurp it and s/// off the "lines" on the front? 23:44
oh wait
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.
timotimo can we .find or something?
lue grondilu: I'm in the process of rewriting
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
TimToady I suppose you could read it in as latin-1...
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
lue I don't like ppm. Its header uses text for things that could easily be binary :/
grondilu ASCII headers for binary files are quite common, aren't they? 23:47
it allows human to get an idea of what they're dealing with.
TimToady like I say, it's perfectly valid latin-1 :)
skids r: :18446744073709551616[1,1].say # r-j found an even different way to break here.
camelia rakudo-parrot 260cd7, rakudo-moar 260cd7: OUTPUT«-9223372036854775807␤»
..rakudo-jvm 260cd7: OUTPUT«9223372036854775808␤»
lue grondilu: in my experience, the only text in binary files is stuff that has to be text, e.g. words. 23:49
And in any case, doesn't change the fact that I think it's stupid :)
23:50 mavcunha joined
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:50
TimToady this is why we want bufs to act a bit like strings some of the time 23:51
lue doesn't understand why you'd want to waste three bytes for a number that otherwise takes up one :) 23:52
TimToady a buf8 was supposed to act like an ASCII string, with the possibility of high bytes that have no character properties 23:53
we haven't really got there yet
lue is getting troublesome flashbacks to an earlier buf discussion... *shudder*
jnthn TimToady: Supposed to act like it in one what? You can concatenate it, for instance? 23:54
TimToady: What should say $a_buf8 be doing?
s/one what/what ways/
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... )
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.
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.
lue finds what his problem with Buf was last discussion... 23:57
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
*licit
23:58 dmol1 joined
jnthn TimToady: Ah. At the moment it gists to something showing what's in there... 23:58
23:58 dmol left
grondilu Buf could have a gist that uses Base64 or something. 23:58
TimToady oh, for some reason was thinking 'print'
jnthn r: say 'Klockan öl!'.encode('utf-8') 23:59
TimToady say should probably show ascii, \x the rest
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>␤»
lue Ah, this is it: irclog.perlgeek.de/perl6/2014-01-10#i_8103826
r: say Buf.new((1,2,3))
camelia rakudo-parrot 260cd7, rakudo-jvm 260cd7, rakudo-moar 260cd7: OUTPUT«Buf:0x<01 02 03>␤»
lue r: say (1,2,3).Buf