Camelia, the Perl 6 bug

IRC log for #perl6, 2011-02-01

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:04 flussence_ the thing I'm thinking of is: parse the heredoc as a literal string, remove the whitespace from the result, then interpret that as the equivalent inline q:*
00:09 sorear Should I be listening to the verbiage in #parrot?
00:10 am0c^ left #perl6
00:11 coldhead this parrot drama is scary for noobs
00:11 coldhead i feel like my parents are fighting
00:14 felliott joined #perl6
00:15 plobsing joined #perl6
00:17 colomon oh noez.
00:19 sorear Does anyone have any last minute requests before I tag niecza v2?
00:25 snearch left #perl6
00:27 PerlJam coldhead: don't worry too much.  This is only the 4th or 5th time it's happened  (and each time things have gotten better as a result)
00:32 muixirt left #perl6
00:35 kst` joined #perl6
00:35 dorlamm joined #perl6
00:35 kst left #perl6
00:41 kst joined #perl6
00:49 [Coke] it's not like parents, more like 2 uncles you only see a few times a year. no worries. ;)
00:49 * [Coke] has flashbacks to Coleda Family fights and goes off to hide in a corner with a beer.
00:49 PerlJam At least this time you'll still see the uncles around on holidays when the dust settles
00:51 kst left #perl6
00:52 kst joined #perl6
00:53 kst` left #perl6
00:54 [Coke] rakudo: Inf.int.say
00:54 p6eval rakudo d3e9a3: OUTPUT«Method 'int' not found for invocant of class 'Num'␤  in main program body at line 22:/tmp/sXkZh4NwPA␤»
00:54 [Coke] rakudo: Inf.Int.say
00:54 p6eval rakudo d3e9a3: OUTPUT«-9223372036854775808␤»
00:54 cdarroch left #perl6
00:59 [Coke] I'm goint to ask the rt admins to add a tag called "needstests". this work for folks?
01:00 PerlJam [Coke]: +1 from me
01:00 pmichaud I thought we had such a tag already?
01:00 [Coke] (I think I'd really like a new status, but this seems less invasive)
01:00 pmichaud or did we just decide that assigning to moritz++ was sufficient?
01:00 pmichaud I know we asked for a tag to be added of some sort, which the rt admins did for us
01:00 pmichaud I don't remember what it was.
01:01 [Coke] I don't see one with "test" in the name.
01:01 [Coke] I see "testcommitted"
01:01 [Coke] s/one/relevant one/
01:02 pmichaud okay.  proceed then -- maybe the rtadmins will say "didn't you already ask for ...?" and remind us :)
01:02 pmichaud or perhaps they will smite us down with gigantic bolts of lightning.
01:02 * pmichaud hopes for the former and not the latter.
01:04 jdhore pmichaud, Good work on that episode of FLOSS weekly a few months ago...I loved it.
01:05 pmichaud merlyn++ definitely gets the credit.  he just asked questions and let me ramble, and then edited it into something coherent, I think.  But thanks!  :)
01:05 PerlJam or had someone edit it into something coherent :)
01:06 [Coke] heh. I listend to that episode and have skipped every one since. ;)
01:06 coldhead it's nice how merlyn is now interested in perl 6
01:06 coldhead well done there
01:08 [Coke] pmichaud: feedback on 73148 ?
01:08 PerlJam coldhead: have you seen learningperl6.com?
01:09 [Coke] rakudo: say (1 ^^ 1).WHAT
01:09 p6eval rakudo d3e9a3: OUTPUT«Bool()␤»
01:09 [Coke] rakudo: say (1 ^^ 1)
01:09 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
01:10 [Coke] rakudo: ~fail().say
01:10 p6eval rakudo d3e9a3:  ( no output )
01:11 coldhead i hadn't, thank you PerlJam
01:13 dorlamm left #perl6
01:19 ggoebel left #perl6
01:23 stkowski left #perl6
01:24 ggoebel joined #perl6
01:26 cosimo left #perl6
01:28 felliott left #perl6
01:32 felliott joined #perl6
01:33 felliott left #perl6
01:45 dalek niecza: 79d5470 | sorear++ | docs/announce.v2:
01:45 dalek niecza: Add URLs to v2 announce
01:45 dalek niecza: review: https://github.com/sorear/niecza/commit/79d5470ee7
01:45 dalek niecza: f937065 | sorear++ | FETCH_URL:
01:45 dalek niecza: Update bootstrap to v2
01:45 dalek niecza: review: https://github.com/sorear/niecza/commit/f93706521c
01:49 sorear v2 announce sent.
01:49 colomon sorear++
01:51 drbean joined #perl6
02:05 shabble left #perl6
02:07 Grimnir_ left #perl6
02:08 shabble joined #perl6
02:08 Grimnir_ joined #perl6
02:11 snarkyboojum as far as I know learningperl6.com hasn't changed for years :) I wonder if merlyn and co still plan to write it?
02:16 whiteknight left #perl6
02:27 snarkyboojum http://twitter.com/#!/merly​n/status/32263043912040448
02:27 snarkyboojum well, at least it's a "possible reality" now ;)
02:29 felliott joined #perl6
02:34 slavik left #perl6
02:35 slavik joined #perl6
02:35 slavik left #perl6
02:36 slavik1 joined #perl6
02:43 bluescreen left #perl6
02:43 lopaway is now known as lopnor
02:49 kcwu left #perl6
02:57 lopnor is now known as lopaway
02:59 snarkyboojum pretty nice introductory perl6 preso! http://mfollett.com/finalized-perl-6-talk-slides
03:00 noganex joined #perl6
03:04 noganex_ left #perl6
03:19 Chillance joined #perl6
03:28 kcwu joined #perl6
03:38 karb joined #perl6
03:42 karb after building perl6 from the tarball when I run perl6 it runs fine. But after I reboot my machine and then run perl6 it throws a segmentation fault. Is anybody else having this problem?
03:43 coldhead that's awful :(
03:43 coldhead is it an environment variable maybe? set during the build?
03:43 karb I tried with gdb the fault seems to occur in src/packfile/api.c:941
03:43 karb i think so
03:43 colomon Have you executed "make install" ?
03:44 karb seems there is some env variable thats set during make, but is lost when i reboot
03:44 karb ya.. i tried make install after reboot
03:44 karb it does not work
03:45 karb has anybody else reported this?
03:45 pmichaud phenny:  tell coke okay to close 73148 (sorry for not responding sooner)
03:45 phenny pmichaud: I'll pass that on when coke is around.
03:45 pmichaud or do I have to say "[coke]" for the nick?
03:45 pmichaud phenny:  tell [Coke] okay to close 73148 (sorry for not responding sooner)
03:45 phenny pmichaud: I'll pass that on when [Coke] is around.
03:46 colomon karb: not that I know of.  What platform are you on?
03:46 pmichaud that'll get it :)
03:46 pmichaud karb: what OS?
03:46 karb colomon: I'm on ubuntu 10.10
03:46 pmichaud it works fine for me on kubuntu 10.10
03:46 colomon karb: and your problem is with the latest Rakudo Star?
03:46 pmichaud and under linux, makefiles can't really set environment variables that get lost at reboot
03:46 pmichaud (environment variables are always local to the make command itself, not the shell that runs it)
03:47 karb yes in rakudo star
03:47 pmichaud any chance you have an older version of rakudo or parrot installed on this machine somewhere?
03:47 pmichaud it may be grabbing the wrong library
03:47 karb this is a fresh star install
03:48 pmichaud have you ever installed star or parrot on this machine before?
03:48 karb no
03:48 pmichaud hmmmm
03:49 pmichaud I don't have any clues at the moment.
03:49 pmichaud That's not something any of us have encountered before, afaik
03:50 sorear any time a reboot mysteriously changes something, you should suspect the platform
03:50 karb ok. I'll try digging this. maybe there is some library path issue
03:51 sorear computers are supposed to be deterministic.  nondeterministic faults suggest hardware failures, in particular RAM issues; I'd try memtest86+ next
03:51 karb actually, if I build the same star tarball on another machine everything works fine.. so its something with my laptop
03:51 sorear (however, I've been burned, so I'm probably not the fairest)
03:52 karb no problem.. i'll dig through this. Just thought to ask if anyone else faced this on ubuntu
04:01 felliott left #perl6
04:03 diakopter pmichaud: I'm confused by "if I'm writing an APL compiler, I don't want the whole Perl 6 runtime"
04:03 diakopter (why would you want the whole Perl 6 runtime?)
04:04 diakopter (which parts wouldn't you want?)
04:04 sorear niecza:
04:04 p6eval niecza v2:  ( no output )
04:05 sorear yay, it updated the tags ok
04:05 pmichaud diakopter: that's the purpose of NQP.  it lets you use perl 6 syntax and grammars to write compilers without having to also have the entire Perl 6 runtime available for the compiler to run
04:06 karb left #perl6
04:06 arthur-_ left #perl6
04:06 sorear APL was designed to not require a fancy parser
04:06 sorear it is, iirc, a regular language
04:06 diakopter sorear: I'm sure you still see his point, though
04:07 pmichaud so, if I want to use Perl 6 syntax to write an APL compiler, I can do so without also having to have all of builtin classes and methods that a Perl 6 implementation would expect to rely upon.
04:07 diakopter I guess I don't understand how those are a problem
04:08 diakopter (yet)
04:08 sorear I just think APL is a bad example - APL would love to have parallel reduce operators on multidimensional compact arrays and other p6runtime goodies
04:08 satyavvd joined #perl6
04:08 pmichaud yes, pick any other language then
04:08 pmichaud I mean to run dynamically, not compile to binary and execute that
04:09 pmichaud APL might be a bad example -- I was just trying to pick a language that was none of Perl/Python/Ruby/etc.
04:09 pmichaud Tcl might be a better one.
04:09 lopaway is now known as lopnor
04:10 diakopter does that even need a parser?
04:10 allbery_b yes, it's just a very simple one
04:10 pmichaud yes
04:11 diakopter 'twas a joke.
04:11 pmichaud https://github.com/partcl/partcl-nq​p/blob/master/src/Partcl/Grammar.pm  might be an example
04:11 allbery_b isn't the point more that you might not want all the baggage necessary to call eval?
04:12 pmichaud diakopter: obtw, I'm thinking of moving nqp-nom to a new repository in the next couple of days.  Anything I need to know to not overly impact your work with nqp?
04:12 pmichaud I was planning to migrate all of the branches (except master) across
04:12 diakopter I still don't get the point of "without also having to have all of builtin classes and methods that a Perl 6 implementation would expect to rely on"
04:12 pmichaud Perl 6 has a very large runtime footprint
04:13 diakopter I haven't ever looked at nqp-nom
04:13 pmichaud much of which wouldn't be needed for a compiler
04:13 pmichaud diakopter: is any of the stuff you've been working on in the nqp-rx repo?
04:13 diakopter nope, I've never had a commit bit there, I don't think.
04:13 pmichaud okay
04:13 diakopter nor nom
04:14 pmichaud have you read the "NQP Roadmap 2011.01" post yet?
04:14 diakopter I didn't even know there was a parrot edition of 6model until two weeks ago :D
04:14 diakopter I knew only about the ones in jnthn/6model
04:15 diakopter oh, yes, I read your blog post in the past hour
04:15 diakopter along with backlogged the past 24 hours of #parrot out of curiosity
04:15 pmichaud it's been an interesting day there, yes :)
04:16 pmichaud okay, I'll take that as being that it's okay for us to move nqp-nom into its own repo, and we'll hope to eventually merge your nqp work into that repo at an appropriate time in the future
04:16 pmichaud now I just need to check with mberends on the stuff he's been working on :)
04:16 diakopter that's all in jnthn/6model
04:17 pmichaud okay
04:17 pmichaud good
04:17 pmichaud over the next few weeks we'll be migrating past/post to be implemented in nqp, I think -- borrowing heavily from the pieces that others have already put together
04:17 diakopter there are "java" and "net" dirs... it's waiting for a "bird" dir
04:18 diakopter all of past (including regexes)?
04:18 pmichaud yes, hopefully
04:18 pmichaud that's the expectation
04:19 diakopter hrm.
04:19 diakopter that one in particular will require the most work on both clr and java.
04:20 pmichaud yes, but I'm hoping it'll be easier to deal with as nqp source than anything else
04:20 pmichaud I think jnthn++ has already migrated much of Cursor and other components to nqp source
04:21 pmichaud anyway, if you see us taking a step that looks problematic, feel free to say something.
04:21 pmichaud I'm hoping there won't be (m)any
04:21 diakopter but
04:22 diakopter he migrated much of the parrot-backend edition of Cursor... I guess he didn't use the Cursor I ported?
04:23 pmichaud he may have
04:23 pmichaud I didn't look yet to see exactly what was done -- I'm hoping to do that as part of migrating nqp-nom into a new repo.
04:23 pmichaud I may have mis-understood or mis-stated something, then.
04:23 Su-Shee_ joined #perl6
04:24 diakopter I don't see a Cursor.pm there (yet)
04:24 pmichaud okay, he may be working on it but not completed it yet then
04:27 Su-Shee left #perl6
04:27 kcwu left #perl6
04:29 diakopter pmichaud: is nqpbook on hiatus?
04:30 diakopter or is it just wayyyy far to the side on the plinko board of round tuits
04:30 pmichaud briefly; I'm thinking I'll write some tutorials and examples to my journal as we work on the new nqp, and hopefully those can form the core of an nqpbook
04:30 * diakopter giggles as his own joke
04:30 pmichaud I posted the roadmap to my journal today and the main comment I got back was "needs documentation"
04:31 pmichaud so, it's not too far to the side
04:31 pmichaud and the timing would be good now
04:32 diakopter pmichaud: were you imagining that the clr edition of Cursor.pm would be identical/one-in-the-same to the other editions?
04:33 diakopter (or would you allow for some specialization)
04:33 pmichaud I'm pretty sure that's what jnthn and I are aiming for, yes.
04:33 pmichaud we might allow for specialization for optimization reasons, yes.
04:34 diakopter here's sortof a larger question (hoping you have time)
04:36 diakopter so... the regex compiler for nqpbird would still target post/pir, I assume....?
04:36 pmichaud post, yes.  I'm not sure sure it'll be pir specific at that point.
04:37 diakopter what will compile post? and to what?
04:37 pmichaud I've been thinking will have post-to-vm compilers
04:37 diakopter oh god.
04:37 diakopter that is what my questions have been dancing around.
04:37 pmichaud if that won't work, we can have separate past-to-vm compilers
04:38 diakopter I didn't dare suggest it
04:38 diakopter well we've already got the 1800 lines of past-to-vm compilers
04:38 pmichaud but if past is flexible enough to handle lots of hlls, I'm thinking post can be flexible enough to handle a variety of backends
04:38 diakopter so that may be a miscommunication b/t you & jnthn, or different plans.
04:38 pmichaud and post won't look _anything_ like it does now -- not even for parrot/pir
04:39 pmichaud the current version of post is very string oriented.  the new version of post (which bacek++ has been working on) models the parts of the vm more directly, with separate types for registers and the like.
04:39 pmichaud bacek's version of post goes straight to .pbc without needing PIR
04:40 pmichaud anyway, if we end up having separate posts for the vms and separate past compilers for the different posts, I'm okay with that.
04:40 pmichaud we should still be able to share a lot of code between them, I think.
04:41 diakopter for the clr, 6model already has a decently sufficient model of CIL as its assembler and "DNST" as its PAST, ish.
04:42 pmichaud yes, I'd need to look at that a bit.  So far neither jnthn++ nor I have detected a miscommunication between us... but part of that is because I'm still fairly flexible on the overall design
04:42 * diakopter waves hands in wild ovoids
04:42 pmichaud yes, there's some of that as well, following in grand Perl 6 tradition :)
04:45 diakopter based on this, I believe I'll halt my work on nqpclr-rx (or continue the halt from November or whenever) and wait until someone tells me the regex compiler should be targetting a clr stack machine or post.
04:46 pmichaud diakopter: okay, that seems reasonable.  I suspect we'll have an answer for you on that sooner rather than later (perhaps even as soon as jnthn++ reads this and says "oh, pmichaud++ is wrong" :)
04:46 diakopter and I won't emit milk puddles from my tear ducts if all my work was "wasted". :}
04:46 pmichaud no way is it "wasted"
04:47 pmichaud we needed to have some idea of what's possible, your work at minimum tells us that
04:47 diakopter oh, I know, especially not to myself; I learned a lot
04:48 pmichaud all of the clr and jvm work has really helped us formulate a stronger approach overall -- jnthn identifies that as a key component of the overall work all the time
04:48 pmichaud and it's very important to him (and me) that you and mberends find a way to continue what you've been working on
04:48 pmichaud and that all of us find a way to bring it all together under an "nqp" umbrella :)
04:49 diakopter meh. I've "thrown away" so much work I'm numb to it, except when I take it personally..... oh wait...
04:50 pmichaud I know the feeling all too well -- I've done the same.
04:51 pmichaud three separate implementations of PGE, an implementation of nqp-rx, various false starts with TGE and PAST and POST, etc. etc.
04:51 pmichaud a couple of implementations of what eventually became Rakudo
04:51 pmichaud :)
04:52 diakopter and several more to come!
04:52 diakopter :P
04:53 pmichaud yes, indeed.  but economies and capitalism are built on the the principal of "creative destruction"  :-)
04:53 * diakopter thought that was a Marxist notion
04:54 diakopter oh, a Marxist framing of capitalism
04:54 pmichaud "
04:55 pmichaud From the 1950s onwards, the term "creative destruction" has become more readily identified with the Austrian-American economist Joseph Schumpeter,[4] who adapted and popularized it as a theory of economic innovation and progress. The term, as used by Schumpeter, bears little resemblance with how it used by Marx."
04:55 justatheory Marx++
04:55 pmichaud looks like wikipedia needs an edit to "how it *was* used by Marx."
04:56 diakopter wikipedia needs lots of things
04:56 diakopter Marx--
04:56 justatheory lol
04:56 pmichaud oh, I always somewhat liked Groucho.
04:57 justatheory Harpo's letterhead: http://kottke.org/11/01/harpo-marx-letterhead
04:59 diakopter pmichaud: where might I find a walkthrough/tutorial (or just theory) on identifying & analyzing basic blocks in program trees?
04:59 diakopter (or anyone)
05:00 pmichaud I don't have a reference off the top of my head; probably a compiler theory / implementation book or something like that
05:00 diakopter I mean, "compiler textbooks" isn't really a helpful answer... (which one explains that well)
05:00 diakopter oh
05:00 pmichaud I've never found compiler texts to be of much use in actually implementing a compiler :)
05:01 diakopter I suppose the algorithm on wikipedia is .. ok
05:03 diakopter hm, I wonder how general I can get it... (to allow also for future phase inlining)
05:04 kcwu joined #perl6
05:06 pmichaud afk for me, time for sleep
05:09 sorear has any of my CLR work been at all noticed?
05:10 diakopter :P
05:11 diakopter "by whom"
05:11 diakopter "those who matter"
05:11 diakopter "those who matter to whom"
05:19 pmichaud sorear: I've noticed it.  I've noticed that it's apparently working.  :)
05:20 pmichaud after thinking about it a bit more, I think it more likely that initially at least, we'll have separate PAST::Compiler sections for each backend.  But that's still a preliminary guess -- we'll know more as we get into the details.
05:20 pmichaud afk again, for sleep
05:28 envi joined #perl6
05:33 kaare_ joined #perl6
05:51 arthur-_ joined #perl6
05:55 gimix joined #perl6
06:13 HarryS left #perl6
06:15 cjk101010 joined #perl6
06:25 lopnor is now known as lopaway
06:45 aesop left #perl6
06:45 aesop joined #perl6
06:49 mtk left #perl6
06:52 dalek niecza: c6596ea | sorear++ | docs/nam.pod:
06:52 dalek niecza: Start documenting opcodes for pmurias
06:52 dalek niecza: review: https://github.com/sorear/niecza/commit/c6596eaaca
06:52 * sorear out..
06:55 mtk joined #perl6
07:08 justatheory left #perl6
07:12 satyavvd left #perl6
07:17 Bruce_Wayne joined #perl6
07:20 HarryS joined #perl6
07:58 Bruce_Wayne left #perl6
07:58 lopaway is now known as lopnor
08:00 kjeldahlw joined #perl6
08:16 Su-Shee_ is now known as Su-Shee
08:23 lopnor is now known as lopaway
08:29 agentzh joined #perl6
08:37 daxim joined #perl6
08:44 satyavvd joined #perl6
08:46 onehotmomma joined #perl6
08:47 onehotmomma left #perl6
08:53 hudnix left #perl6
08:53 masak joined #perl6
08:54 masak hola, zebras.
08:54 masak huh, niecza and yapsi releases almost coincide this month. :)
08:56 snearch joined #perl6
09:00 kfo_ left #perl6
09:01 kfo joined #perl6
09:03 moritz_ Q: How does a geek know it's a new month? A: he has lots of mailing list subscription reminders in his inbox
09:04 masak :)
09:10 lamstyle left #perl6
09:16 lopaway is now known as lopnor
09:19 mathw saluton masak
09:22 dakkar joined #perl6
09:23 masak bonan matenon, mathw.
09:23 moritz_ is a saluton a quantized greeting? :-)
09:23 masak :P
09:23 * masak considers replying "yes" just to make moritz_ happy
09:25 masak greeting particles tend to interact with the thankfulness particle, the "dankon".
09:27 moritz_ regarding discretized stuff, I have industrial disease :-)
09:28 masak :)
09:29 masak overdose of academions...
09:30 Canyon joined #perl6
09:30 moritz_ :-)
09:30 Canyon hi
09:30 masak hi Canyon.
09:30 Canyon I have a beginner question
09:30 mathw Excellent
09:30 masak shoot.
09:31 Canyon I want to store some subroutines and global variables in a different file, without using modules(because I'm not experienced enough to write them)
09:31 masak it's not that difficult.
09:32 masak but go on.
09:32 masak or was that it? :)
09:32 Canyon is there a way to do this, without sacrificing showing of errors?
09:32 Canyon *the
09:32 moritz_ learning to write and use modules is easier than reinventing the module system
09:33 moritz_ (this applies both to Perl 5 and Perl 6)
09:33 masak Canyon: create a file A.pm -- put your stuff in there. in another file, write 'use A;'
09:33 Canyon I've already written the subroutines
09:33 masak Canyon: that's it.
09:33 Canyon I don't actually need modules
09:33 moritz_ you do
09:33 masak sounds like you do.
09:33 mathw Modules are how you include things from other files, in general
09:33 mathw And they really are very very simple
09:34 moritz_ Canyon: a module is nothing magical to be afraid of. It's just a piece of code in a file.
09:34 masak you *could* slurp-and-eval the other file. but please don't do that. it would make all of us sad.
09:34 Canyon masak, if I'd use A.pm, would I still be informed about erros, when implementing new subroutines?
09:34 masak Canyon: definitely.
09:34 masak Canyon: you can even try compiling A.pm alone, with the -c flag.
09:35 masak (to see if there are syntax errors, etc)
09:35 masak but even if you don't, you'll get error reports from both files whenever you run the other file.
09:35 Canyon I've used require function_index.pl and the       "1;"   line , and I recall that the script did not work without mentioning the line that caused the problems
09:36 Canyon moritz_, I'm writing simple scripts
09:36 masak Canyon: maybe you didn't do 'use strict;' and 'use warnings;'...?
09:36 Canyon only use strict;
09:37 masak use warnings and you'll get more informative warnings :)
09:37 Canyon I was reading here and I got scared: http://www.slac.stanford.edu/grp/scs/n​et/talk/perl-modules_files/frame.html
09:37 Canyon :)
09:37 moritz_ Canyon: don't close yourself to the best solution, just because you think it's difficult
09:37 Canyon I really want to avoid modules at the moment.
09:37 Canyon I already have the subroutines
09:37 Canyon it takes time to modify them
09:38 Canyon the 1; line is still needed, right masak?
09:38 moritz_ not in Perl 6
09:38 masak in Perl 5, it is.
09:38 masak Canyon: you're aware that you're in #perl6 and we're helping you out of pure kindness, right? :P
09:39 moritz_ Canyon: that link describe not only how to write modules, but a whole distribution. You don't need the distribution part
09:39 masak Canyon: what moritz_ said. a module is simply a .pm file that you 'use'
09:39 masak nothing complicated about it.
09:39 moritz_ Canyon: http://en.wikipedia.org/wiki/Perl_module has a not-so-scary explanation
09:39 Canyon oh, I'm sorry. I didn't realize that they are so much different. In this case, thank you.
09:40 masak the '1;' at the end is needed because that's Perl 5's mechanism for saying "module works fine".
09:40 masak Canyon: no need to apologise. this helps us remember *why* Perl 6 is different ;)
09:40 cafesofie joined #perl6
09:41 masak Canyon: had you ended up in the wrong Perl 5 channel, people might have called you a moron. (which you're decidedly not.)
09:41 Canyon :))
09:41 Canyon actually I'm a noob when it comes to perl
09:41 Canyon I'm used to c++
09:42 moritz_ that's quite a shift of perspectives
09:42 masak still, the worst parts of C++ ought to prepare one adequately for the worst parts of Perl. :P
09:43 Canyon I'm no C++ expert either
09:43 mathw Not necessarily
09:43 mathw The worst parts of C++ are quite different :)
09:43 * mathw does C++ for a living
09:43 masak oh, I'm not saying they're not different.
09:43 masak I'm saying they're, objectively, worse.
09:43 mathw I suppose you get used to the horror after a while, but at least neither of them are Java
09:44 masak wait... you dislike Java more than C++?
09:44 mathw yup
09:44 * masak digests that
09:44 moritz_ java has the philosophy "it looks less complicated if we force you to write more lines to say the same thing"
09:45 masak absolutely.
09:45 masak Java is a DSL to turn XML into stack traces.
09:46 moritz_ right :-)
09:47 masak still, as much as I object to the culture sometimes, I'm generally impressed by the JLS and the APIs.
09:47 masak the one big omission is closures, of course.
09:47 moritz_ it's quite interesting to observe how the lack of closures influences APIs
09:47 masak that's a blog post right there.
09:47 mathw I object to Java on the basis that it doesn't trust its programmers
09:48 masak as MJD once said, in thirty or so years, people will ridicule languages without closures as we today ridicule languages without recursion.
09:48 moritz_ or languages without lexical variables
09:48 mathw Was that thirty or so years ago? Because, you know, *point and laugh*
09:49 moritz_ mathw: so much for unevenly distributed future :-)
09:49 mathw It's actually hard to use current C++ sometimes, because I know we've got closures in the next standard...
09:49 masak mathw: I'm inclined to agree with you about the trust thing. the discussion about OO led me to realize that private attribute and the like are not there for security, but purely for convention.
09:50 tzhs joined #perl6
09:50 mathw well in C++ you can certainly get hold of private attributes if you want them
09:50 masak the discussion we had on perl6-language a couple months back, that is.
09:50 mathw just some simple pointer arithmetic and poking in the header files
09:50 masak mathw: right.
09:50 mathw and that's one of the stronger private-hiding languages
09:51 masak and that's *always* possible, unless you close the user off from the metal.
09:51 mathw yeah
09:51 mathw but that's not really the point of my objection to Java
09:51 mathw it doesn't trust its users to use operator overloading responsibly
09:51 masak right.
09:51 moritz_ in C++ you can also just use a preprocessor macro that changes 'private' and 'protected' to 'public'
09:51 mathw So I can't write a String-like class in Java
09:52 masak moritz_: o.O
09:52 mathw moritz_: true :)
09:52 mathw I hadn't thought of that
09:52 mathw the preprocessor can be useful, but one of its uses is opening cans of highly poisonous worms
09:54 mathw far better to have macros baked into the language :)
09:54 Canyon may I interrupt you again for a second?
09:54 moritz_ that's why language modifications are explicitly scoped in Perl 6
09:55 moritz_ Canyon: sure
09:55 Canyon I've modified the files
09:55 Canyon using .pm and 1;
09:56 Canyon Ubut I get this error ndefined subroutine &main::push_startsearch called at C:\Documents and Settings
09:56 Canyon \Administrator\Desktop\workspace\script.pl line 52.
09:56 Canyon the subroutine takes args
09:56 moritz_ Canyon: did you export that subroutine?
09:56 Canyon yes
09:56 moritz_ perldoc Exporter
09:56 Canyon oh
09:57 Canyon ok, thank you. :)
09:58 Tene Interesting, 1.0 release of EFL: http://www.enlightenment.org/p.php?​p=news/show&l=en&news_id=28
09:59 masak <hyperbole>surely, the end times are near!</hyperbole>
09:59 masak what's next, Duke Nukem Forever? *snort*
10:00 moritz_ masak: nope, The Hurd 1.0 is still missing, can't be end times
10:00 masak ah. right.
10:00 moritz_ and PHP 6
10:00 masak pffft, the PHP guys just want a version 6 like big brother Perl... :P
10:01 frettled masak: Duke Nukem Forever has a launch date now, 2011-05-06 in our part of the world.
10:01 Tene I hear Perl 6 folks are claiming to have a release these days.
10:01 frettled s/launch/release/, sorry
10:01 masak frettled: I know...
10:01 frettled Tene: That sounds weird :D
10:01 masak Tene: yeah but I meant official releases.
10:01 moritz_ Tene: yeah, but it's not a *real* release *cough*
10:02 masak you know, the kind that doesn't suck.
10:02 * masak hides
10:02 frettled The release, my friend, is blowing in the wind.
10:02 masak I think I know an official release when I see one!
10:03 moritz_ masak: like a yapsi release? :-)
10:03 masak this feels weird. how did I end up trolling #perl6? :P
10:03 Canyon left #perl6
10:04 moritz_ masak: you ran out of dankons :-)
10:04 masak *lol*
10:04 masak moritz_: speaking of which... one Yapsi release coming up later today.
10:04 masak I'm optimistic, and hope to be able to release the FUTURE with this release.
10:04 masak might even hold the release off a day or so to get it in.
10:05 moritz_ masak: I hope it's shortly followed by a p4 review (or another blog post preparing it)
10:05 masak it will be, don't worry.
10:05 frettled So we're back to the future again, eh?
10:06 masak ooh, I hadn't considered the Marty McFly potential! :)
10:07 mathw groan
10:07 flussence joined #perl6
10:08 * moritz_ preemtively calls the pun police
10:08 mathw You know what I hate? Languages without multiple return values!
10:09 flussence_ left #perl6
10:09 mathw and APIs which require arguments to be specified in the most awkward way possible
10:09 moritz_ mathw: then you'll love the API of the MUMPS library
10:10 moritz_ it expects an array of about 70 entries
10:10 mathw fun
10:10 mathw I'm afraid Win32 is quite bad enough for me
10:10 moritz_ and writing some weird values in some of these entries changes the meaning and format of other entries
10:10 moritz_ and their combination control what the function does in the end
10:10 bhwu joined #perl6
10:10 moritz_ and all in FORTRAN
10:11 moritz_ with no bounds checking on any arrays
10:11 mathw that sounds enormously entertaining
10:11 moritz_ no type checking
10:11 moritz_ mathw: yes. Until you actually try to use it :-)
10:11 mathw I learned FORTRAN once
10:11 mathw it seemed like a better alternative to BBC BASIC, and tuition was available
10:12 mathw Fortunately I learned C not long afterwards
10:13 moritz_ and I forgot, some of these array items would be changed by the function, and be part of the output. Of course.
10:13 mathw naturally
10:13 mathw it's a classic of API obfuscation
10:13 mathw muddle around your input and output parameters
10:13 mathw mix them together in unhealthy ways
10:14 * flussence gets flashbacks to php array functions
10:14 Canyon joined #perl6
10:14 mathw bool add(int *arr) { arr[2] = arr[0] + arr[1]; return true; }
10:14 flussence haystack then needle, except when it's the other way around, and not the explode() function which takes them in either order
10:15 mathw PHP has some lovely bits of API...
10:15 mathw *cough*
10:16 Tene mathw: http://www.tnx.nl/php.html#args
10:16 Canyon C:\Documents and Settings\Administrator\Desktop\workspace>script.pl
10:16 Canyon Can't locate Workspace/FunctionIndex.pm in @INC (@INC contains: C:/Documents and
10:16 Canyon Settings/Administrator/Desktop/Workspace C:/My PF/Perl/site/lib C:/My PF/Perl/l
10:16 Canyon ib .) at C:\Documents and Settings\Administrator\Desktop\workspace\script.pl lin
10:16 Canyon e 10.
10:16 Canyon BEGIN failed--compilation aborted at C:\Documents and Settings\Administrator\Des
10:16 Canyon ktop\workspace\script.pl line 10.
10:17 moritz_ Canyon: please don't paste multiple lines of error messages into IRC channels - use a nopaste facility like http://nopaste.snit.ch/ for that
10:17 Canyon ok
10:19 masak Canyon: @INC is an array of all the directories to look in for your module.
10:19 moritz_ use lib '.'; # might help
10:19 masak moritz_++
10:20 moritz_ if the module exists in the FunctionIndex.pm file in the Workspace subdirectory
10:21 Canyon my mistake, I've pasted the wrong path for lib
10:22 Canyon but I still get that error that I got in the first place
10:22 Canyon Undefined subroutine &main::push_startsearch called at
10:23 moritz_ then  (1) you didn't set up push_startsearch to be exported by default and (2) you didn't import it
10:23 moritz_ doing either helps
10:24 tzhs left #perl6
10:24 Canyon our @EXPORT = qw(push_startsearch);
10:24 Canyon use Workspace::FunctionIndex qw(:ALL);
10:25 moritz_ and did you set up the :ALL tag?>
10:25 Canyon doesn't work without it either
10:26 moritz_ our %EXPORT_TAGS = (all => qw/push_startsearch/);
10:26 moritz_ erm, ':ALL' => qw/.../
10:26 moritz_ no, without the colon, sorry
10:27 * moritz_ just read perldoc Exporter
10:28 Canyon shouldn't  our @EXPORT = qw(push_startsearch);    sufice?
10:29 moritz_ it should
10:29 baest Canyon: yes, but then you should use 'use Workspace::FunctionIndex;'
10:29 Canyon yes, that's what i did
10:29 Canyon and I still get the same error
10:29 moritz_ Canyon: please show the whole start of the module
10:30 moritz_ (via nopaste)
10:30 Canyon ok, let me post it
10:32 REPLeffect left #perl6
10:33 lopnor is now known as lopaway
10:33 Canyon http://nopaste.info/0fe6894210.html
10:34 moritz_ Canyon: well, you're not in package Workspace::FunctionIndex
10:34 moritz_ Canyon: but in Function::Index
10:34 moritz_ no wonder it can't find that sub
10:35 Canyon changed it to   package Workspace::FunctionIndex;
10:36 Canyon still same error
10:37 baest Canyon: you will probably need to nopaste the code that uses Workspace::FunctionIndex too
10:38 moritz_ Canyon: did you safe the file after changing?
10:38 moritz_ *save
10:38 Sarten-X joined #perl6
10:39 Canyon yes
10:39 Canyon I'm http://nopaste.info/b5991393ec.html
10:43 masak excuse me, where is this push_startsearch sub defined?
10:43 moritz_ and you define sub push_startsearch in the module right below the end of the previous nopaste?
10:44 masak (I haven't been following along too closely, sorry)
10:45 Canyon in functionindex
10:45 Canyon let me post the whole relevant part for functionindex
10:45 Canyon but, maybe global_variables.pm it's causing some problems
10:45 Canyon could it be possible?
10:46 Canyon it holds a few variables
10:46 Tene Canyon: unlikely.
10:46 Canyon that's it
10:46 Canyon ok, let me post functionindex + push_startsearch
10:46 REPLeffect joined #perl6
10:48 Canyon http://nopaste.info/3a745c91fe.html
10:48 Canyon this is it
10:50 moritz_ Canyon: you still ahve 'package Function::Index"
10:50 Canyon no way
10:50 moritz_ 11:35 < Canyon> changed it to   package Workspace::FunctionIndex;
10:50 Canyon yes, i did and it still is changed
10:51 moritz_ either you our your nopaste lies.
10:51 moritz_ line 08 in http://nopaste.info/3a745c91fe.html
10:51 Canyon I  edited the functionindex.pm file, but I kept the header in a temp txt file
10:52 Canyon and I've just added the sub_startsearch subroutine without realizing that I've changed the header
10:52 Canyon my mistake
10:52 Canyon let me repost
10:52 moritz_ Canyon: it doesn't work like that. Paste verbatim. Single characters decide whether programs work or not
10:52 Canyon but I assure you that FunctionIndex.pm has the correct package
10:53 moritz_ ... which makes me wonder what else you might have mispasted
10:54 Canyon http://nopaste.info/27615c186b.html
10:54 Canyon this is the original
10:54 Canyon with all the wiki comments and stuff
10:54 Canyon nothing else mispasted
10:55 moritz_ Canyon: http://nopaste.info/27615c186b.html
10:55 moritz_ sorry
10:55 moritz_ mispaste :-)
10:55 masak Canyon: pasting is a fine art. don't fret if you don't get it right the first few times :)
10:55 moritz_ our @EXPORT = qw(push_startsearch);
10:55 moritz_ now @EXPORT doesn't contain set_searchname anymore
10:56 moritz_ is that intentional?
10:56 moritz_ if you want to export multiple routines, use a single line of   our @EXPORT = qw/first_routine second_routine/;
10:57 moritz_ anyway, I need to leave, real life is calling
10:57 masak however, that can't be the problem here.
10:57 masak since push_startsearch is the missing sub.
10:57 Canyon masak, I used a temp txt file in order to get rid of the comments
10:57 Canyon that's why I mispasted
10:58 masak nod
10:58 masak it's ok. it's just easier to debug the code that was run, is all :)
10:58 moritz_ which also has the disadvantage of making the line numbers not match those in the error messages
10:58 moritz_ really gone&
10:58 Canyon bye, thanks for helping me :)
10:59 masak I'm going to try to put together a minimal example that works for me.
10:59 masak maybe you can then mutate that, piece by piece, into what you want.
11:01 Canyon no
11:02 Canyon I've wasted too much time of yours anyway
11:02 Canyon I'll debug it myself.
11:02 masak no problem, I'm doing household stuff anyway.
11:02 masak absolutely. I was hoping you would :)
11:05 masak Canyon: here, I got it working on the first attempt: https://gist.github.com/805717
11:06 masak Canyon: see if you can get that small example working, too.
11:06 masak just create the files 'A.pm' and 'test' in the same directory, and do 'perl test'.
11:06 Canyon ok
11:06 Canyon thank you
11:06 masak oh, and you're free to call it 'test.pl' if that's easier on Windows, I dunno.
11:13 masak Canyon: are you getting any results?
11:14 masak hm, alester++ recently expressed dismay over "How To Ask Questions The Smart Way" being the de-facto manual for community interaction. maybe people here on #perl6 would be interested in producing a small set of wiki pages with some sort of Best Practices for things like making a nopaste, reporting a bug, etc.
11:15 Mowah joined #perl6
11:15 masak I'm imagining something very concrete and example-oriented, a bit the same way the SYNOPSIS sections help clarify Perl modules.
11:15 Canyon yes
11:15 Canyon it works
11:15 Canyon indeed
11:16 masak \o/
11:16 masak Canyon: that's great news. now you only need to find the significant difference between my script and yours :)
11:16 masak I'd suggest changing my script, piece by piece, into yours, and run it after each little change.
11:16 masak see where it breaks.
11:17 Canyon the only difference is that my subroutine has args and that i'm using another pm file that stores a few variables
11:17 masak could be something with Windows paths. could be a file is actually in the wrong place somehow. could be either of any number of things we can't think of now.
11:17 masak point is, you'll discover it on the way.
11:17 Canyon indeed
11:18 Canyon ok, thank you for support.
11:18 Canyon *your
11:18 masak no problem. and good luck.
11:20 Canyon yes, it's path related, it doesn't see even a dummy sub
11:21 Canyon i will solve it
11:21 masak nice!
11:24 bacek joined #perl6
11:24 jfried left #perl6
11:28 flussence Argh unicode drives me crazy sometimes... I'm working on some Catalyst thing at $dayjob, there's a "↓" in the header that usually displays fine. On one page with nothing special about it, that arrow gets double-utf8-encoded. WTF. </rant>
11:28 snearch left #perl6
11:29 moritz_ that's p5's crappy string model, not Unicode per se
11:30 flussence yeah, it works fine on every other page. I think I'll resign to just using HTML entities...
11:30 masak ♩ ♫ fixed in Perl 6 ♪ ♪ ♫
11:32 daxim the number of questions tagged perl+(encoding|unicode|utf-8) are surprisingly low compared with other languages
11:33 apejens it's because Other Languages (tm) fucked it up even worse :)
11:33 daxim on stackoverflow
11:33 flussence hey, PHP handles unicode just fine, provided you treat it as a dumb pipe between the browser and database!
11:34 sjn joined #perl6
11:34 arnsholt I think that can be amended to "PHP is just fine, provided you treat it as a dumb pipe between the browser and database" =)
11:39 gimix left #perl6
11:39 agentzh left #perl6
11:40 wallberg joined #perl6
11:55 lopaway is now known as lopnor
12:04 Juerd arnsholt: "Anything is fine, provided you treat it as a dumb pipe"
12:04 Juerd "Dumb pipes are fine"
12:06 moritz_ man cat
12:09 orafu joined #perl6
12:10 arnsholt True, true =)
12:14 flussence php takes the dumb part a bit too seriously
12:20 jfried joined #perl6
12:28 Canyon is now known as Canyon_
12:30 PZt left #perl6
12:31 satyavvd left #perl6
12:33 lopnor is now known as lopaway
12:35 jfried left #perl6
12:35 fhelmberger joined #perl6
12:36 [Coke] we now have a "testneeded" tag on RT - we can use that now instead of assigning to moritz.
12:36 fhelmberger left #perl6
12:36 phenny [Coke]: 03:45Z <pmichaud> tell [Coke] okay to close 73148 (sorry for not responding sooner)
12:36 fhelmberger joined #perl6
12:37 flatwhatson_ left #perl6
12:38 MayDaniel joined #perl6
12:38 [Coke] closed.
12:39 [Coke] so to mark a test as testneeded, it's Custom Fields -> Tags -> testneeded.
12:40 [Coke] be nice if someone whipped up a short URL for a report that showed all the non-closed perl6 tickets that had that tag.
12:42 tzhs joined #perl6
12:54 flussence [Coke]: I gave it a try, even tried to RTFM for the search box. Got nowhere. :(
12:57 lopaway is now known as lopnor
12:57 flussence I think I've tried all the combinations of /[Tt]ags? \s* = \s* (') (?:fulltext:)? testneeded \1 /x I can think of in the URL, anyway.
12:59 * flussence leaves it to the people who know how it works.
12:59 masak flussence: tried using "Advanced Search"?
12:59 masak sorry, "Edit Search"/
13:00 takadonet morning all
13:00 flussence I would if I'd seen that. Guess it only shows up when logged in...
13:01 masak oh, you have to be logged in.
13:01 masak takadonet: \o
13:01 masak http://rt.perl.org/rt3/Search/Results.html?Query​=%20Queue%20%3D%20'perl6'%20AND%20%20(%20%20Stat​us%20%3D%20'open'%20OR%20Status%20%3D%20'new'%20​OR%20Status%20%3D%20'stalled'%20)%20AND%20'CF.{Tag}'%20LIKE%20'testneeded'
13:01 flussence well no wonder I couldn't guess it :)
13:03 gottreu left #perl6
13:05 flussence also, slightly nicer-looking URL: http://rt.perl.org/rt3/Search/Results.html​?Query=Queue='perl6'+AND+(Status='open'+OR​+Status='new'+OR+Status='stalled')+AND+'CF.{Tag}'+LIKE+'testneeded'
13:05 masak flussence++
13:06 flussence hmm, I wonder if there's some URL::Pretty module on CPAN for doing that
13:09 [Coke] or just use xrl.us
13:10 flussence but that's cheating! :P
13:10 masak ah, URL shorteners. double-edged sword of the web.
13:10 colomon rakudo: say 2.2250738585072012e-308
13:10 p6eval rakudo d3e9a3: OUTPUT«2.2250738585072e-308␤»
13:10 kjeldahlw left #perl6
13:12 flussence (well, CPAN's got plenty of things for url shortener sites, but not one for this... guess that's another thing for me to do)
13:18 Layla_91 joined #perl6
13:18 colomon rakudo: say 2.2250738585072012e-308
13:18 p6eval rakudo d3e9a3: OUTPUT«2.2250738585072e-308␤»
13:18 colomon ah.
13:18 colomon http://www.exploringbinary.com/java-hangs​-when-converting-2-2250738585072012e-308/
13:19 colomon (in case people thought I had gone insaner.)
13:20 flatwhatson_ joined #perl6
13:21 flussence Java too ?!
13:21 envi_ joined #perl6
13:21 envi left #perl6
13:26 colomon yup.
13:26 colomon apparently you can shut down the compiler or the runtime that way.  crazy, eh?
13:26 masak o.O
13:26 colomon also Clojure and Scala, apparently.
13:27 flussence now I just have to wonder...
13:27 flussence niecza: say 2.2250738585072012e-308
13:27 masak killed by MATHS. hah!
13:27 p6eval niecza v2-1-gc6596ea: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Action method escale not yet implemented at /tmp/waW5WvhgSn line 1 (EOF):␤------> [32msay 2.2250738585072012e-308[33m⏏[31m<EOL>[0m␤␤Action method dec_number not yet implemented at /tmp/waW5WvhgSn line 1 (EOF):␤------> [32msay
13:27 p6eval ..2.2250738585072012e…
13:27 colomon .NET is supposed to be fine.
13:27 colomon :)
13:27 colomon though I suppose mono might have issues.
13:28 colomon apparently GCC's libraries have a related issue.
13:29 flussence yeah, I read that stuff. It's because they use the 80-bit x87 registers in intel chips and don't truncate the values to 64-bit as they should, for the sake of "optimisation"...
13:30 jfried joined #perl6
13:31 flussence (and it also means I'm vindicated for compiling everything on my netbook with -mfpmath=sse :)
13:31 felliott joined #perl6
13:31 felliott_ joined #perl6
13:31 felliott left #perl6
13:31 felliott_ is now known as felliott
13:39 kaare_ left #perl6
13:40 MayDaniel left #perl6
13:40 cafesofie left #perl6
13:41 hudnix joined #perl6
13:43 kaare_ joined #perl6
13:46 kaare_ left #perl6
13:57 PZt joined #perl6
14:00 cjk101010 left #perl6
14:11 V15170R joined #perl6
14:11 plobsing left #perl6
14:14 cafesofie joined #perl6
14:16 drbean left #perl6
14:16 ilogger2 left #perl6
14:17 Helios left #perl6
14:17 kaare_ joined #perl6
14:18 Layla_91 Hey all! I got a mac =) I need to install perl6 on it. should I build it from source or there is ready package?
14:19 jnthn Building from source is likely best way to stay up to date...not aware of any packages for OSX either, so maybe source is the only option.
14:19 sjn build from source \o/
14:19 jnthn sjn! :)
14:19 cafesofie left #perl6
14:20 * sjn is doing drive-by IRCing
14:20 jnthn :)
14:20 * jnthn too - am teaching in Stockholm this week :)
14:20 * sjn is doing conference stuff again
14:21 sjn found out that a third of the speakers on the technical track have a Perl background o_O
14:21 sjn obvious bias ftl
14:23 cafesofie joined #perl6
14:23 Layla_91 jnthn: Okeys ^_^
14:23 masak +1 on 'build from source'
14:24 Layla_91 masak: yay I got a mac and a +1 what a day! =)
14:24 masak :)
14:25 masak life on #perl6 is like a little piece of heaven.
14:27 ilogger2 joined #perl6
14:30 V15170R left #perl6
14:32 hudnix left #perl6
14:32 V15170R joined #perl6
14:32 bluescreen joined #perl6
14:34 Layla_91 jnthn: I'm became a obj-c developer ^_^ no more sys admining! \o/
14:35 mtk left #perl6
14:36 jnthn Layla_91: Yay! Congrats! :D
14:36 jnthn Can't object to that change. :)
14:36 hudnix joined #perl6
14:36 lopnor is now known as lopaway
14:37 V15170R if i want to implement a language in parrot, i should use nqp? what about pir/pasm?
14:37 mtk joined #perl6
14:38 jnthn V15170R: Yes, using nqp is the best choice. NQP itself is about to undergo soem changes, but it'll mostly be transparent to language developers.
14:38 plobsing joined #perl6
14:38 jnthn e.g. any grammar and actions you write now will keep on working
14:39 ggoebel left #perl6
14:41 jnthn teaching &
14:42 llabthgi1 joined #perl6
14:42 llabthgi1 left #perl6
14:44 llabthgi1 joined #perl6
14:45 Layla_91 left #perl6
14:46 * colomon is listening to "Don't Stop Me Now".  He blames masak.
14:49 [Coke] jnthn: there is a macport for parrot, at least.
14:49 * [Coke] could probably build one for rakudo if there isn't one already.
14:49 * [Coke] never uses the macports, though. ;)
14:50 * shortcircuit is thinking about Perl 6 and Gentoo.
14:51 shortcircuit Right now, Perl exists under a dev-perl/* partition. Should Perl 6 be under something like dev-perl6?
14:51 masak colomon: *grin*
14:52 colomon masak: been a good long time since I listened to anything but FBG and Bicycle off of Jazz.
14:52 masonkramer joined #perl6
14:52 shortcircuit I started thinking about this as a result of the niecza announcement. If niecza runs on mono, and would presumably run on gentoo, then, ideally, it'd need an ebuild as well.
14:58 ggoebel joined #perl6
14:58 ggoebel now I know why all the power company trucks have been sitting outside all morning...
14:59 [Coke] ggoebel: where you at?
14:59 ggoebel [Coke]: ATL
15:00 felliott left #perl6
15:01 cibs joined #perl6
15:07 masonkramer left #perl6
15:07 PerlJam left #perl6
15:07 PerlJam joined #perl6
15:09 PerlJam greetings #perl6
15:09 colomon \o
15:09 masak PerlJam! \o/
15:09 daxim masak, there are 21 matchsticks on the table.  we both take alternating turns.  each player must remove at least 1, but maximal 4 sticks.  who takes the last one, loses.  who goes first?
15:09 masak daxim: that game is .3333
15:10 flussence shortcircuit: sounds sensible - there's separate dev-php[45] categories for that reason (stuff which only works on one major version)
15:10 daxim bonus question: what is the generalised formula for other values of 21, 1, 4?
15:10 masak daxim: but it's also misere, because of the reversed winning condition...
15:10 masak daxim: if it's a normal game, it's easier to analyze straight off.
15:11 masak daxim: but I can imagine this is one of the solved misere games.
15:11 flussence (in an ideal world the package manager would be smart enough to know how to use external tools and it'd just pull from cpan directly...)
15:11 daxim surely.  also, it's not vastly more difficult than you think, "just add one"
15:12 alester left #perl6
15:12 shortcircuit Admittedly, I'm a little worried about niecza, based on the v2 announcement.
15:12 masak daxim: right. it's already quite simplified because there is only one heap.
15:13 shortcircuit I recall trying to run an app compiled for mono on Debian, and it failed on be; I didn't have the exact version of mono that it was compiled to. I'm not sure how that would play out in a source-distro scenario.
15:14 bluescreen left #perl6
15:15 daxim I'll provide the answers in an hour or so, if you want to experiment a bit with the numbers meanwhile
15:17 masak that's a teasingly short deadline... I'm at $work! :)
15:18 daxim okay, then tomorrow
15:18 masak deal.
15:18 masak I think I see what you mean by "just add one", though.
15:18 masak so it shouldn't be dreadfully difficult. just need to get the numbers right.
15:19 Helios joined #perl6
15:20 PerlJam huh.  merlyn answered snarkyboojum on twitter about LP6 but didn't reply to my email
15:20 mathw Quick sneaky Perl 5 thing: the character class [.-_] is a range from . to _, not ., - and _, correct?
15:21 flussence - is only literal when it's adjacent to the [ or ], iirc
15:22 mathw indeed that's what I thought
15:22 mathw evidently the person who wrote this code thought it was a literal there
15:22 mathw and now it's surprising people by failing to match hyphens
15:23 masak TEST YOUR REGEXES
15:23 flussence .u .
15:23 phenny U+002E FULL STOP (.)
15:23 flussence .u -
15:23 phenny U+002D HYPHEN-MINUS (-)
15:23 flussence I guess you could write [--_] :)
15:24 flussence .u . -
15:24 phenny U+0F02 TIBETAN MARK GTER YIG MGO -UM RNAM BCAD MA (༂)
15:24 phenny U+0F03 TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA (༃)
15:24 phenny U+0F13 TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN (༓) [...]
15:24 vmspb joined #perl6
15:24 flussence well, that was unexpected.
15:24 bluescreen joined #perl6
15:24 plobsing left #perl6
15:24 flussence .u .,-
15:24 phenny U+002E FULL STOP (.)
15:24 phenny U+002C COMMA (,)
15:24 phenny U+002D HYPHEN-MINUS (-)
15:24 flussence oh.
15:25 mathw masak: evidently nobody tested this one with hyphens. I will amend the tests, of course.
15:26 flussence shortcircuit: I shouldn't imagine too many problems with niecza, just checked and mono 2.8.2 is already marked stable, and it seems to install everything needed by default anyway
15:29 masak mathw++
15:31 pmichaud good morning, #perl6
15:33 moritz_ good morning pmichaud
15:38 plobsing joined #perl6
15:41 noganex_ joined #perl6
15:44 envi_ left #perl6
15:45 noganex left #perl6
15:46 noganex joined #perl6
15:46 colomon \o, pmichaud
15:47 noganex_ left #perl6
15:47 * colomon just used scp to copy five novels to his phone while his wife was talking on it.  (living in the future)++
15:48 moritz_ (unvenly distribution of future)+-
15:48 mathw the future is expensive :(
15:49 masak rakudo: sub postfix:<+->($x is rw) { $x++; $x-- }; my $future = 42; $future+-; say $future
15:49 p6eval rakudo d3e9a3: OUTPUT«42␤»
15:49 masak \o/
15:51 PerlJam Does that mean the +-- operator is an expression of "one step forward, two steps back"?  :)
15:53 colomon one step forward, one step back
15:54 moritz_ uhm, that code should die
15:54 moritz_ no wait, masak did you an extra variable
15:57 * PerlJam wonders what it would take for "perlbrew installl perl6" to actually install rakudo
15:57 PerlJam er, with the appropriate number of ells
16:00 masak extra variable? I used just the right amount of variables :P
16:00 moritz_ yes, I thought you'd have called 42+-
16:00 masak that should indeed die.
16:00 masak rakudo: sub postfix:<+->($x is rw) { $x++; $x-- }; 42+-; say 'alive, OH NOES'
16:00 p6eval rakudo d3e9a3: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'postfix:<+->' at line 7454:CORE.setting␤  in main program body at line 22:/tmp/zZ3TJfvuYX␤»
16:01 masak and it does.
16:01 masak rakudo++
16:01 flussence rakudo: rakudo++
16:01 p6eval rakudo d3e9a3: OUTPUT«Could not find sub &rakudo␤  in main program body at line 22:/tmp/T_AY3Ehmp0␤»
16:01 vmspb left #perl6
16:03 justatheory joined #perl6
16:04 awwaiid left #perl6
16:08 bluescreen left #perl6
16:08 alester joined #perl6
16:12 felliott joined #perl6
16:12 Patterner left #perl6
16:16 Psyche^ joined #perl6
16:16 Psyche^ is now known as Patterner
16:17 awwaiid joined #perl6
16:18 MayDaniel joined #perl6
16:18 risou joined #perl6
16:28 tzhs left #perl6
16:29 cafesofie left #perl6
16:37 Canyon_ left #perl6
16:39 V15170R_ joined #perl6
16:39 V15170R left #perl6
16:47 kfo_ joined #perl6
16:49 kfo left #perl6
16:56 cafesofie joined #perl6
17:07 MayDaniel left #perl6
17:18 daxim left #perl6
17:24 bluescreen joined #perl6
17:31 takadonet my god bioperl is slow in reading genbank files!
17:44 vmspb joined #perl6
17:45 arnsholt left #perl6
17:51 cdarroch joined #perl6
17:51 cdarroch left #perl6
17:51 cdarroch joined #perl6
17:53 starcoder left #perl6
17:55 arnsholt joined #perl6
17:56 starcoder joined #perl6
17:56 dakkar left #perl6
17:58 kaydsoft joined #perl6
17:59 rgrau joined #perl6
17:59 MayDaniel joined #perl6
18:04 abraxxa joined #perl6
18:05 abraxxa i'm looking for a way to get the number of matching elements from two arrays
18:05 ash_ joined #perl6
18:06 [Coke] abraxxa: in perl 6?
18:06 abraxxa of course, else i wouldn't ask here
18:06 moritz_ define "matching"
18:07 pmichaud are there any duplicates within an array?
18:07 PerlJam abraxxa: we sometimes get people asking for Perl 5 help in here, so it's not unreasonable to make sure  :)
18:07 abraxxa no dups
18:07 V15170R_ left #perl6
18:07 pmichaud rakudo:  my @a = <a b c d e f g h i>;   my @b = <a e i o u>;   say +@a.grep(any(@b));   # maybe?
18:07 p6eval rakudo d3e9a3: OUTPUT«3␤»
18:07 abraxxa i was visiting a friend last weekend who gave tuition to a fellow student in c#
18:08 ash_ are you talking about an array union?
18:08 abraxxa and the guy hadn't any knowledge in basic coding
18:08 abraxxa so i started to fix his c# code (infinite loop because of a bool error val he passed around) and then started to write it in perl 5
18:09 abraxxa after an hour i remembered the pick method of perl 6 and started doing the same in perl 6
18:09 pmichaud abraxxa: so, I suggest   +@array1.grep(any(@array2))
18:09 pmichaud rakudo:  my @a = <a b c d e f g h i>;   my @b = <a e i o u>;   say ~@a.grep(any(@b));   # maybe?
18:09 p6eval rakudo d3e9a3: OUTPUT«a e i␤»
18:09 abraxxa so what i have already is the input of 5 + 2 numbers, in the range of 1..50 and 1..9 and the random picking of winning numbers
18:10 abraxxa now i want to compare the user-chosen numbers with the winning ones
18:10 sjohnson trying to beat the odds and strike it rich?
18:10 sjohnson use .pick
18:10 abraxxa it's an EuroMillionen simulator
18:10 abraxxa i'll paste my code
18:10 sjohnson .oO(was .pick conveived of for lottery numbers?)
18:10 PerlJam sort them and iterate comparing for equality  :)
18:11 abraxxa is there a favoured paste-page for #perl6?
18:11 MayDaniel left #perl6
18:11 moritz_ abraxxa: gist.github.com
18:11 pmichaud any will do.  gist.github.com  works if you need one
18:12 pmichaud my @choices = (1..50).pick(5);   my @winners = (1..50).pick(5);   say ~@choices;  say ~@winners;   say +@winners.grep(any(@choices));
18:12 pmichaud rakudo: my @choices = (1..50).pick(5);   my @winners = (1..50).pick(5);   say ~@choices;  say ~@winners;   say +@winners.grep(any(@choices));
18:12 p6eval rakudo d3e9a3: OUTPUT«4 15 18 2 32␤25 37 15 3 36␤1␤»
18:12 pmichaud rakudo: my @choices = (1..50).pick(5);   my @winners = (1..50).pick(5);   say ~@choices;  say ~@winners;   say +@winners.grep(any(@choices));
18:12 p6eval rakudo d3e9a3: OUTPUT«48 30 42 43 29␤22 21 30 39 18␤1␤»
18:12 abraxxa https://gist.github.com/806301
18:13 abraxxa sorry for the German user interaction
18:13 abraxxa at least my var names don't contain Umlauts
18:13 pmichaud my @matching_numbers = @numbers.grep(any(@drawn_numbers));
18:13 abraxxa i can paste the wonderful c# code of the guy too if someone is interessted in how many lines such a thing can grow to
18:14 pmichaud that gives you the actual matching numbers.  if you just want to know how many of them, use +@matching_numbers
18:14 abraxxa i hoped the ~~ operator will DWIM
18:15 moritz_ it does. grep() does a smart-matching for you
18:15 abraxxa having them might be needed later, but for now i just want to output how many matched
18:15 ash_ i am surprised there is no Intersection method/op/etc..
18:15 pmichaud there is.  It's called .grep  :-)
18:16 ash_ ya, true, its not hard to build with .grep(any(...))
18:17 pmichaud @array ~~ @array2   checks for ordering as well as matches
18:18 abraxxa wonderful!
18:19 abraxxa perl 6 makes this kind of code possible in much less lines
18:20 abraxxa i've updated my gist, any other suggestions how to improve it? this is my first contact with perl 6
18:21 abraxxa finding docs isn't that easy
18:22 abraxxa btw, the C# code has 516 lines including a lot of c-style bracketing
18:22 cjk101010 joined #perl6
18:22 PerlJam That sounds like a good name for a book  "Perl 6 -- First Contact"
18:24 abraxxa hehe
18:24 PerlJam And there would be plenty of opportunity to use quotes from space films.  "My God ... it's full of stars"  comes to mind immediately :)
18:25 abraxxa PerlJam++
18:25 colomon hyperspace!
18:25 pmichaud phasers?
18:26 abraxxa Perl 6, from the makers of the Klingon language!
18:26 abraxxa the only part of the code i don't like is the until loop around the prompt
18:28 Su-Shee first rule of aquisition: buy this perl 6 book. ;)
18:28 abraxxa kudos to http://szabgab.com/blog/2010/​06/starting-with-perl-6.html for the inspiration
18:28 PerlJam Isn't IO::Prompt or something like that existant?
18:28 abraxxa but i switched the while to an until to better suit my needs and brain
18:28 abraxxa i tried to install a p6 module using proto but failed because of our proxy
18:29 risou left #perl6
18:30 Mowah left #perl6
18:30 * flussence is disappointed to find that none of the chars in U+300..U+36F are valid in identifiers
18:31 abraxxa thanks for the help guys, i'm going home!
18:32 ash_ left #perl6
18:34 abraxxa bye *wink*
18:34 abraxxa left #perl6
18:36 arnsholt_ joined #perl6
18:36 arnsholt_ left #perl6
18:36 tadzik hello zebras
18:37 masak hi panda
18:38 Tene There isn't an Intersection op in core, but I've seen it in a Set module.
18:38 Tene https://github.com/perl6/mu/tree/master/ext/Set probably
18:38 masak I wrote one for the Set class in Rakudo.
18:39 kjeldahl joined #perl6
18:39 colomon left #perl6
18:39 colomon joined #perl6
18:41 bluescreen left #perl6
18:51 cafesofie left #perl6
18:52 moritz_ #phasers in 8 minutes
18:53 * jdhore sets his phaser to Deep Fry and joins :P
18:59 kpg left #perl6
19:03 shi joined #perl6
19:08 rindolf joined #perl6
19:14 uvtc joined #perl6
19:15 dalek sprixel: 3ea4bc2 | diakopter++ | / (3 files):
19:15 dalek sprixel: [perlesque] allow the decimal exponent in the float grammar
19:15 dalek sprixel: review: https://github.com/diakopte​r/sprixel/commit/3ea4bc2a83
19:17 diakopter er, oops. :) forgot the optional hyphen :)
19:17 llabthgi1 left #perl6
19:18 dalek sprixel: f028d0d | diakopter++ | / (3 files):
19:18 dalek sprixel: allow negative decimal exponents on float literals
19:18 dalek sprixel: review: https://github.com/diakopte​r/sprixel/commit/f028d0d1ee
19:18 jdhore does dalek post commits to Parrot or Rakudo? Or does it just EXTERMINATE?
19:19 diakopter it doesn't post parrot commits here
19:19 Tene jdhore: Just rakudo commits here.
19:19 diakopter rakudo commits, yes
19:19 tadzik well, and niecza, and yapsi, and nqprx, and...
19:20 jdhore ah
19:20 masak and november, as I discovered the other day...
19:21 jnthn November. In January. :P
19:22 moritz_ it reports parrot commits to #parrot.
19:26 diakopter perlesque: say(2.2250738585072012e-308)
19:26 p6eval perlesque: OUTPUT«0␤»
19:27 diakopter heh
19:27 moritz_ well, pretty close :-)
19:27 diakopter perlesque: say(2.2250738585072012e-308 / 2.2250738585072012e-308)
19:27 p6eval perlesque: OUTPUT«NaN␤»
19:27 diakopter hrm
19:30 lopaway is now known as lopnor
19:31 jdhore ah
19:32 hans__ joined #perl6
19:36 ash_ joined #perl6
19:36 diakopter both .net & mono give 0 for Double.Parse("2.2250738585072012e-308")
19:37 sftp_ left #perl6
19:39 moritz_ better than infinite loop
19:39 colomon agreed.
19:39 sftp joined #perl6
19:40 diakopter latest stable of each, anyway, who knows about prior ones
19:41 diakopter perlesque: say(Double.Parse("2.2250738585072012e-308"))
19:41 p6eval perlesque: OUTPUT«2.2250738585072E-308␤»
19:41 diakopter O_O
19:41 masak looks about right to me.
19:41 diakopter hrm, oh. I take back "both .net & mono ... "  it was perlesque that was breaking it....
19:44 dalek sprixel: 9b108d8 | diakopter++ | sprixel/src/compiler/EmitterPass.cs:
19:44 dalek sprixel: [perlesque] don't bother trying to parse to a Single
19:44 dalek sprixel: review: https://github.com/diakopte​r/sprixel/commit/9b108d8e5b
19:45 diakopter perlesque: say(2.2250738585072012e-308 * 1.0e308)
19:45 p6eval perlesque: OUTPUT«2.2250738585072␤»
19:45 diakopter better
19:50 diakopter hm, I saw an arbitrary precision float CLR lib somewhere...
19:55 orafu left #perl6
19:56 orafu joined #perl6
20:00 hans__ left #perl6
20:03 orafu left #perl6
20:09 molaf joined #perl6
20:10 pmichaud jnthn: do you want the new rakudo branch to be called rakudo-nom?
20:10 pmichaud or, what do you want the branch to be called?
20:10 sji joined #perl6
20:10 moritz_ nom
20:10 moritz_ nom
20:10 moritz_ nom
20:10 moritz_ :-)
20:10 pmichaud I'll go ahead and create it too, working on switching its build system to the new nqp
20:12 jnthn nom :)
20:12 shi left #perl6
20:13 jnthn pmichaud: Just call it "nom"
20:13 jnthn pmichaud: Typing 3 letters when pushing is nice ;)
20:14 masak 'git push' is 7 letters... :)
20:14 moritz_ [branch "nom"]
20:14 jnthn :P
20:14 moritz_ remote = origin
20:14 moritz_ merge = refs/heads/nom
20:14 PerlJam he's got an alias for "nom" to be "git push nom"
20:14 PerlJam :)
20:14 jnthn ;)
20:14 tadzik git nom
20:16 nadim_ left #perl6
20:17 nadim_ joined #perl6
20:18 lopnor is now known as lopaway
20:19 tylercurtis joined #perl6
20:20 ash_ is the new nqp still in perl6/nqp-rx?
20:20 jnthn yes, nom branch
20:25 plobsing left #perl6
20:30 Tene dissatisfied with IO again, ran into some issues writing a little recursive directory walker.  I really need to work on that someday.
20:32 masak what issues? what did you write it in?
20:32 hanekomu joined #perl6
20:32 Tene masak: Perl 6.
20:32 Tene Sorry, "the IO class"
20:33 masak ok.
20:33 Tene masak: consider: dir('/tmp')>>.IO
20:33 Tene All of those IO objects will be useless.
20:33 masak oh?
20:34 Tene The values returned from dir() are relative paths.
20:34 Tene so you really need: dir('/tmp').map('/tmp' ~ *)>>.IO
20:34 Tene erm
20:34 Tene so you really need: dir('/tmp').map('/tmp/' ~ *)>>.IO
20:34 masak aye.
20:34 masak right, we talked about this a few weeks ago.
20:35 Tene Also, looks like IO doesn't have a .dir method to make that any easier
20:35 Tene and the .Str of IO is unhelpful
20:36 Tene So instead of walking over IO objects, I walk over strings, and repeatedly concatenate paths.
20:36 colomon Tene: you need to figure out what IO needs and add it...  :)
20:36 Tene colomon: Yes, I do.  I'm reluctant to do that, though, because it seems I have some philosophical disagreements with TimToady about this.
20:37 colomon ah
20:37 PerlJam Tene: ask forgiveness rather than permission.
20:37 Tene Seems like I could at least get a bit closer to optimal, though.
20:42 masak +1
20:42 masak don't let philosophical disagreements with TimToady stand in the way of a better IO class.
20:43 _jaldhar left #perl6
20:45 dalek yapsi: dad2ec6 | masak++ | t/ (2 files):
20:45 dalek yapsi: [t/] s/done_testing/done/
20:45 dalek yapsi: review: https://github.com/masak/yapsi/commit/dad2ec6436
20:45 dalek yapsi: 57acb43 | masak++ | lib/Yapsi.pm:
20:45 dalek yapsi: [Yapsi] bumped SIC version
20:45 dalek yapsi:
20:45 dalek yapsi: Between releases, the SIC version is always the version number of the
20:45 dalek yapsi: upcoming release.
20:45 dalek yapsi: review: https://github.com/masak/yapsi/commit/57acb438cf
20:48 shi_ joined #perl6
20:49 ash_ use TeneIO;
20:50 sji left #perl6
20:56 masak when I define an .at_pos method in a class that wraps around an array, should I delegate to the array's .[] method, or .at_pos method?
21:00 colomon .at_pos, I think...
21:00 cjk101010 left #perl6
21:00 masak why?
21:00 colomon probably no one knows for sure but pmichaud
21:00 PerlJam The spec doesn't say which is canonical.
21:01 masak at_pos is the more fundamental one.
21:01 PerlJam So ... decide which is and document it in the spec
21:01 colomon is at_pos in the spec?
21:01 * masak doubts that
21:01 PerlJam A quick ack on the spec and it doesn't even mention at_pos
21:02 masak Perl 6 is so pretty: https://gist.github.com/806666
21:03 masak I've written pre-order traversals dozens of times; never so nicely... :)
21:05 arnsholt Doesn't the initial call to helper lack an argument?
21:05 masak oh, oops.
21:05 masak was supposed to default to 0
21:05 arnsholt Or that =)
21:06 masak there, fixed: https://gist.github.com/806666
21:06 pmichaud at_pos always looks up a single element
21:06 pmichaud .[]  has to know how to handle slices
21:06 fhelmberger left #perl6
21:06 masak right, this is more a question about convention.
21:07 masak when writing my own .at_pos, what should I delegate to in the wrapped Array?
21:07 pmichaud I'd go for .at_pos
21:07 masak that's what I settled for.
21:07 pmichaud faster, plus also expects a single element.  Unless you think that your argument needs to be treated like a slice somewhere
21:08 masak nope.
21:08 masak I'm just passing the argument along unchanged.
21:08 pmichaud definitely .at_pos I think
21:08 masak pmichaud: I must say I'm torn when it comes to at_pos. I see its usefulness, and why it was created, but...
21:09 masak it felt cool to define postcircumfix:<[ ]>
21:09 masak .at_pos feels like Ruby :(
21:09 pmichaud TimToady has already said that the operators tend to be sugar over method calls, though.
21:09 pmichaud and postcircumfix:<[ ]> definitely qualifies as that
21:09 masak aye.
21:09 masak it does make sense.
21:10 masak does .{} have a similar method?
21:10 pmichaud and believe me, trying to handle slices and ranges and whatever closures in everything that wants to act like an array is not -Ofun
21:10 pmichaud .at_key
21:10 masak ah.
21:10 Mowah joined #perl6
21:10 masak I believe you. it's a "semantics-rich" area.
21:10 moritz_ Tene: in the end, dir() should return IO::Path objects, or some such
21:11 Tene moritz_: That's my inclination too.
21:12 masak is PAST::Stmts strictly necessary? seems to me it isn't.
21:12 pmichaud at the moment, no.
21:12 Tene masak: traversal like you posted is even nicer with multiple dispatch :)
21:13 pmichaud but I could imagine ways in which PAST::Stmts could be used to denote sequence points, or to provide various introspection/code analysis
21:13 masak Tene: how so?
21:13 pmichaud so, it's a useful abstraction to say "this demarks a complete statement in the HLL source"
21:13 Tene masak: fwiw, https://gist.github.com/806549 was what I ended up with, on the little project that lead me to complain about IO today
21:13 plobsing joined #perl6
21:14 pmichaud I'm thinking it might also be useful for object code annotations and references to the original source
21:14 V15170R joined #perl6
21:14 masak Tene: sir, that is a pretty use of multis.
21:15 pmichaud anyway, early versions of allison++'s PAST (and I think even PIL) had a ::Stmts node, so I went ahead and kept it
21:15 Tene masak: That also indirectly answers your question.
21:15 masak which question?
21:15 Tene 14:13 < masak> Tene: how so?
21:15 * masak has so many... :)
21:15 masak right.
21:16 masak I didn't need it for my method, since I'm treating all nodes the same.
21:16 masak if I did, I would probably have reached for multis too.
21:16 moritz_ Tene: fwiw, dir() excludes . and .. by default
21:16 arnsholt That was very nice, indeed
21:16 moritz_ rakudo: say dir.join(' ')
21:16 p6eval rakudo d3e9a3: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/0qntvAtA37␤  in main program body at line 22:/tmp/0qntvAtA37␤»
21:17 masak p6eval++
21:17 Tene moritz_: Ah, right.
21:17 moritz_ so need need for that grep(none <. ..>), pretty as it might be :-)
21:18 masak why are if statements and sub calls bunched in under PAST::Op?
21:18 masak seems like the thinking was "ok, PAST::Op is for when we want to do stuff..." :P
21:18 moritz_ right
21:18 masak no wonder there aren't many node types!
21:19 moritz_ there are subtypes
21:19 Tene masak: it's dispatch on the pasttype attribute
21:19 * masak considers whether he wants that, too
21:19 Tene it certainly wouldn't be unreasonable for that to be broken out into classes for different pasttypes.
21:19 masak ah, what the heck.
21:20 masak won't ever know if I don't try :P
21:20 Tene :pasttype was just simpler, I expect.
21:20 masak looks like it's just cheating the type hierarchy on all the fun.
21:20 masak "who needs runtime polymorphism when there are switch statements?"
21:21 moritz_ masak: remember that PAST was written in PIR, wihch doesn't have nice, declarative syntax for classes :-)
21:22 masak sure, sure, defend the mistakes of the PAST... :P
21:22 pmichaud I did think seriously about having separate types
21:22 pmichaud but the problem is that it's much harder to specify node types than attribute values in say, a grammar.
21:22 masak I see what you mean.
21:23 masak when does the need for that arise?
21:23 pmichaud token infix:<||> { <O( :pasttype('unless') )> }
21:23 masak hm.
21:23 pmichaud (or maybe that one is 'if')
21:24 masak I know too little about <O()>, but that's just a literal in there.
21:24 masak couldn't that as well have been PAST::Unless?
21:24 pmichaud right... basically the default is to create an object of type PAST::Op  and pass the :pasttype along
21:24 masak ok.
21:25 masak I don't think I will run up against that limitation.
21:25 pmichaud PAST::Unless works *if* you have a reliable mechanism to look up class types
21:25 pmichaud which Parrot often did not
21:25 masak a proliferation of PAST::Op subtypes it is!
21:25 masak erm, FUTURE::Op.
21:25 pmichaud I also noticed that Pugs didn't have a proliferation of subtypes
21:26 masak and look what happened to Pugs... :P
21:26 pmichaud lol
21:26 pmichaud anyway, my gut tells me that the current PAST has it largely correct, but I could be completely wrong there.
21:27 masak in a Liskov sense, I'm not really changing the type of anything.
21:27 alester left #perl6
21:28 masak I'm just pushing out an attribute as refined subtypes.
21:28 Tene subtype PAST::Unless of PAST::Op where ...
21:29 * masak considers
21:29 PerlJam pmichaud: your observation of pugs may be telling since Haskell does have a good type system.
21:29 masak then I can't give the subtypes their specific attributes.
21:30 masak Tene: btw, it's 'subset', last I looked.
21:30 masak (but I tend to get it wrong, too)
21:30 Tene masak: ah, right.
21:30 pmichaud afk, errand
21:30 Tene masak: another synonym I get wrong all the time is "partition" instead of "classify"
21:31 masak that never happens to me.
21:31 masak then again, I never use .classify
21:32 masak occasionally, I get 'given' and 'gather' wrong.
21:33 Tene Fascinating.
21:33 PerlJam masak: is that an english-as-a-second-language thing?  Those two words occupy completely different conceptual space to me.
21:33 Tene in both directions?
21:34 masak Tene: don't think so. doesn't happen often at all, mind. but it's probably always 'given' instead of 'gather'.
21:34 * ash_ agree's with PerlJam
21:34 kaare_ left #perl6
21:34 masak PerlJam: yes, I think so. it's not rational at all.
21:34 arnsholt Probably just "starts with a 'g'"
21:34 masak PerlJam: but they *are* both six-letter keywords start... what arnsholt said.
21:35 tylercurtis rakudo: say 'given'.chars
21:35 p6eval rakudo d3e9a3: OUTPUT«5␤»
21:35 PerlJam masak: you must have some sort of alternate spelling for the word "given"  :)
21:35 masak I like to spell it the old-fashiened way.
21:35 arnsholt The very start of words is how we remember them, usually
21:35 masak 'ghiven' :P
21:35 kaare_ joined #perl6
21:36 arnsholt Suffixes help as well, but the clue "starts with a ..." is usually very helpful =)
21:36 masak rakudo: say ? all( <given gather> ).chars == 5 | 6
21:36 p6eval rakudo d3e9a3: OUTPUT«any(Bool::False)␤»
21:36 PerlJam Like old basic interpreters, as long as the first few characters are the same, it's the same identifier (in this case only 1 char)
21:36 masak huh.
21:36 masak rakudo: say so all( <given gather> ).chars == 5 | 6
21:36 p6eval rakudo d3e9a3: OUTPUT«Bool::True␤»
21:36 arnsholt (Yay, psycholinguistics)
21:36 masak \o/
21:37 masak PerlJam: yes, that's my brain. an old, crappy BASIC interpreter.
21:37 huf got more uptime than any basic interpreter i ever heard of
21:38 moritz_ PerlJam: I know that from Fortran 77, not basic :-)
21:38 PerlJam basic is more perlian than fortran  ;)
21:38 V15170R i'm totally lost at this :   say so all( <given gather> ).chars == 5 | 6
21:38 PerlJam V15170R: what part confuses you?
21:39 masak V15170R: sorry :/
21:39 arnsholt Speaking of Fortran, two of the older profs in my research group were spotted the other day deciphering the punch-card decorations in our new buildings =D
21:39 V15170R the word "so" and using <given gather>
21:39 plobsing left #perl6
21:39 masak V15170R: in English it asks "do all of the strings  <given gather> have either 5 or 6 characters"?
21:39 tylercurtis so is a function equivalent of prefix<?>
21:40 masak V15170R: <given gather> means ["given", "gather"]
21:40 kaare_ left #perl6
21:40 masak er, ("given", "gather")
21:40 Tene cd ~/src/rakudo; find . -type f -exec sed -i 's/given|gather/grumble/g' {} +
21:40 huf so why did the prefix<?> return something different? rakudobug?
21:40 PerlJam Tene: heh
21:40 masak huf: no.
21:40 moritz_ huf: precedence
21:40 huf ah!
21:40 masak huf: different... what moritz_ said.
21:40 huf hufbug then
21:41 masak yeah, pls fix kthx.
21:41 V15170R rakudo: say so all ( <string1  otherstring> ).chars == 5|6
21:41 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
21:42 ash_ does anyone know if there is an equivalent of haskells . in perl6?
21:42 huf hum, how is so() mnemonic for boolean? :)
21:43 kaare_ joined #perl6
21:43 V15170R rakudo: say so all ( <string1  otherstring> ).chars == 6|9
21:43 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
21:43 V15170R rakudo: say so all ( <string1  otherstring> ).chars == 7|9
21:43 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
21:43 V15170R rakudo: say so all ( <string1  otherstring> ).chars == 7|11
21:43 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
21:44 moritz_ rakdo: .say for <string1 otherstring>».chars
21:44 masak ash_: foo(bar())?
21:44 moritz_ rakudo: .say for <string1 otherstring>».chars
21:44 p6eval rakudo d3e9a3: OUTPUT«7␤11␤»
21:44 V15170R rakudo: say so all ( <string1 otherstring> ).chars == 7|11
21:44 p6eval rakudo d3e9a3: OUTPUT«Bool::False␤»
21:44 ashleydev joined #perl6
21:44 Util Do we have anything like File::Temp in Rakudo?
21:44 masak ash_: ==> and <== are a bit similar, too.
21:44 huf oh! so as in the opposite of not, i get it ;)
21:44 moritz_ Util: nope :( and sorely missed iin the test suite
21:44 ash_ masak: do you use haskell much?
21:44 Util Thx
21:45 masak ash_: not in a while, no.
21:45 masak ash_: but I know what function composition is.
21:45 PerlJam isn't . just composition in haskell?
21:45 * PerlJam is slow
21:45 masak huf: took a while to reach that name, too :)
21:45 Util Haskell twisted my brain inside-out and did not even give me a lousy T-shirt.
21:46 ash_ doh
21:46 masak huf: for a long time it was 'true', which is a horrible name.
21:46 ash_ i was thinking of $
21:46 ash_ not .
21:46 huf masak: i like it now that i understand it
21:46 ash_ my bad
21:46 huf masak: yeah, so is so better
21:46 masak ash_: $ is the default for listops.
21:46 masak ash_: that's why we can do 'say so' above...
21:47 PerlJam Perl is getting closer to making "say it isn't so" into runnable code without much help
21:47 ashleydev left #perl6
21:48 colomon any quick tips how to run niezca under windows?
21:48 ashleydev joined #perl6
21:48 snearch joined #perl6
21:48 moritz_ just need to define the subroutines it() and isn't()
21:48 tylercurtis rakudo: use Test; say $_ isn't so;
21:48 p6eval rakudo d3e9a3: OUTPUT«===SORRY!===␤Confused at line 22, near "say $_ isn"␤»
21:48 arnsholt And make so work with no arguments (maybe?)
21:48 tylercurtis rakudo: use Test; say $_ isnt so;
21:48 p6eval rakudo d3e9a3: OUTPUT«===SORRY!===␤Confused at line 22, near "say $_ isn"␤»
21:48 allbery_b PerlJam: back tot he future?
21:48 tylercurtis rakudo: use Test; say $_, isn't, so;
21:48 p6eval rakudo d3e9a3: OUTPUT«===SORRY!===␤Confused at line 22, near "say $_, is"␤»
21:49 colomon To answer my own question: Niecza\run\Niecza.exe and then patience.
21:50 pmichaud I always confuse given/when and gather/take
21:50 pmichaud I'll type one when I mean the other
21:50 ash_ masak: well, what if you wanted to do: sub foo($, $) { ... }; sub bar(@) { ... }; bar foo 2, 3, 4, 6; I am more refereeing to a of saying this is the end of foo's args, the rest are bar's args
21:51 pmichaud bar (foo 2, 3), 4, 6
21:51 masak ash_: and you don't want to use parentheses...? :)
21:51 pmichaud or   bar foo(2,3), 4, 6
21:51 pmichaud anything else gets weird as soon as foo() becomes multi :-)
21:51 jnthn And I hpoe bar's signature is *@ :)
21:51 * masak boggles
21:52 tylercurtis Just like in Haskell, except with commas.
21:52 pmichaud multi foo($,$,$) { ... };   multi foo($,$) { ... };  sub bar(*@) { ... };  bar foo 2, 3, 4, 6;  # uh oh!
21:53 pmichaud I think some very early versions of pugs played with trying to make this work, which is how we ended up with what we have now :)
21:53 PerlJam maybe someone could steal the colon for haskell's equivalent to $.  It's kind-of like the cut operator if you're crazy like me  :)
21:53 ash_ multi foo($,$,$) { ... };  multi foo($,$) { ... };  sub bar(*@) { ... };  bar foo 2, 3 $ 4, 6;  # in haskell terms would call foo($,$)
21:53 PerlJam er, perl's equivalent to haskell's $
21:54 PerlJam bar foo 2, 3 :: 4, 6  # or something
21:55 tylercurtis ash_: in Haskell, "bar foo 2 3 $ 4 6" is "(bar foo 2 3) 4 6"
21:55 masak rakudo: sub bar {}; sub foo {}; bar foo 2, 3 :: 4, 6
21:55 p6eval rakudo d3e9a3: OUTPUT«===SORRY!===␤Confused at line 22, near "bar foo 2,"␤»
21:58 * PerlJam ponders how to define a juxtaposition operator in Perl 6
21:58 PerlJam I guess it would be a context sensitive application of whitespace.
22:01 ashleydev left #perl6
22:01 ashleydev joined #perl6
22:08 kaare_ left #perl6
22:10 cafesofie joined #perl6
22:12 V15170R left #perl6
22:16 mtk left #perl6
22:23 wallberg left #perl6
22:24 mtk joined #perl6
22:26 uvtc left #perl6
22:32 lopaway is now known as lopnor
22:33 lopnor is now known as lopaway
22:36 kjeldahl left #perl6
22:40 ashleydev left #perl6
22:41 masak hey guys and gals, you know what would be really nice? imagine if, when a multi dispatch fails to bind, you get not only the possible signatures, but also the capture that failed to bind? :)
22:41 masak it's just a crazy idea...
22:41 masak but would make things easier to debug.
22:42 ashleydev joined #perl6
22:43 ash_ improving debuggability is always a plus
22:46 Chillance left #perl6
22:48 masak I've decided to postpone the Yapsi release a day or two. the reason for this is that I'm making good progress with the FUTURE refactor.
22:48 Tene masak: FUTURE refactor?
22:48 masak the punnability potential of this has not escaped me.
22:48 Tene masak: Is this related to TARDIS?
22:48 masak Tene: not really, actually.
22:49 masak Tene: so, I'm making a variant of PAST for Yapsi.
22:49 drbean joined #perl6
22:49 masak Tene: FUTURE is like PAST, only it was made later.
22:49 masak :)
22:50 masak the way things are poiting now, I'll end up with fewer lines but a slower compiler.
22:50 masak the runtime will be unaffected, but it's already slow enough.
22:51 wamba joined #perl6
22:55 vmspb left #perl6
22:56 dorlamm joined #perl6
23:02 Tene :)
23:02 masak rakudo: class A { method fleh { $*l++ }; method foo { my $*l = 0; self.fleh; say $*l; sub bar { self.fleh }; bar; say $*l } }; A.new.foo
23:02 p6eval rakudo d3e9a3: OUTPUT«1␤2␤»
23:03 masak sometimes I'm impressed that stuff I throw at Rakudo just comes back, working :)
23:03 masak (in this case, dynamical-in-method-in-sub-in-method)
23:07 snearch left #perl6
23:07 colomon I somehow read that as method-in-law....
23:08 masak :P
23:08 masak there totally should be such a concept in computer science.
23:09 shi_ left #perl6
23:10 coldhead isn't that just design by contract?
23:11 kaydsoft left #perl6
23:12 shi joined #perl6
23:12 masak "Program to an interface, not to your method-in-law?" :)
23:14 sjohnson sometimes, re-inventing the wheel needs to be done for some things
23:14 masak sjohnson: were you thinking of any wheels in particular?
23:14 sjohnson yeah
23:15 sjohnson a javascript tabber i found on the internet, as well as a vim script for commenting
23:15 Mowah left #perl6
23:15 sjohnson after trying to get the tabber thing to do what i wanted for 6 hours, i decided to write my own and had it done from scratch doing everything i needed in 8 hours :3
23:15 masak kudos.
23:16 bpalmer joined #perl6
23:16 sjohnson i only said that cause of the quote you said reminded me of it
23:17 masak really? I don't see the connection.
23:18 masak sjohnson: I associate the quote with the Dependency Inversion Principle.
23:20 sjohnson i get reminded of things very tangent-ly :)
23:20 masak I think that goes for many of us in here :)
23:21 sjohnson it was really the "program to an interface" thing, then i thoguht "rewrite your own interface [sometimes]"
23:22 masak aha.
23:23 masak sjohnson: in Java, there's List, which is an interface. and then there's ArrayList, LinkedList, and a bunch of other concrete classes that implement the List interface. the quote basically urges the programmer to write just "List" whenever possible.
23:24 felliott left #perl6
23:27 masak I've got the refactored code running -e 'say 42' now :)
23:27 masak 'night, #perl6
23:27 masak left #perl6
23:29 rindolf left #perl6
23:31 plobsing joined #perl6
23:31 ash_ left #perl6
23:34 ashleydev left #perl6
23:38 f00li5h left #perl6
23:38 starcoder left #perl6
23:39 coldhead Dependency Inversion Principle would be a good name for a band
23:40 tylercurtis left #perl6
23:44 starcoder joined #perl6
23:45 orafu joined #perl6
23:47 rgrau left #perl6
23:50 felliott joined #perl6
23:51 whiteknight joined #perl6
23:56 cosimo joined #perl6
23:59 wamba left #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs