Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-04-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 r0bby joined #perl6
00:56 Limbic_Region joined #perl6
01:12 ting win 2
02:30 yewenbin joined #perl6
02:45 justatheory_ joined #perl6
02:49 justatheory_ joined #perl6
03:03 kcwu joined #perl6
03:14 Auzon joined #perl6
03:14 mncharity joined #perl6
03:26 mncharity TimToady: In STD.pm's noun, I had to swap term and statement_prefix to get 'gather {3}' to parse differently than 'foo {3}' (ie, as statement_prefix rather than a listop taking a block).
03:54 syle joined #perl6
03:58 mncharity If you have 'gather {}', how do you override it with your own?   { my gather ($blk) {...};  gather {} },  or { my statement_prefix:gather ($blk) {...}; gather {} } ?   or something else?
04:05 pugs_svnbot r20296 | putter++ | [elf_e] Added gather/take support using Perl6::Take (a new dependency).
04:05 pugs_svnbot r20296 | putter++ | [STD_red] Parse statement_prefix: do try gather contend async lazy.
04:05 pugs_svnbot diff: http://dev.pugscode.org/changeset/20296
04:05 lambdabot Title: Changeset 20296 - Pugs - Trac
04:07 mncharity moritz_: awwaiid: pmurias: gather/take added to elf, courtesy of Perl6::Take and Gaal.
04:08 mncharity g'night &
04:08 [particle] gaal++
04:21 Psyche^ joined #perl6
04:40 peepsalot joined #perl6
04:47 pugs_svnbot r20297 | putter++ | [elf_e] gather/take bugfix.  Perl6::Take dependency dropped - the code has been inlined and tweaked.
04:47 pugs_svnbot r20297 | putter++ | There is currently a parser problem with 'my @a = gather {}; say @a;'.  Workaround: 'my @a = (gather {}); say @a'.
04:47 pugs_svnbot diff: http://dev.pugscode.org/changeset/20297
04:47 lambdabot Title: Changeset 20297 - Pugs - Trac
04:58 felipe joined #perl6
05:04 peepsalot joined #perl6
05:47 aindilis joined #perl6
05:47 zostay_ joined #perl6
06:09 syle2 joined #perl6
06:33 iblechbot joined #perl6
06:48 b_jonas_ joined #perl6
07:10 lambdabot joined #perl6
07:42 alanhaggai joined #perl6
08:16 ruoso joined #perl6
08:31 Alias_ joined #perl6
08:48 masak joined #perl6
09:11 iblechbot joined #perl6
09:16 smtms joined #perl6
09:29 IllvilJa joined #perl6
09:49 moritz_ any idea how locales will be handled in Perl 6?
10:29 wknight8111 joined #perl6
10:40 masak joined #perl6
11:05 riffraff joined #perl6
11:10 elmex joined #perl6
11:14 meppl joined #perl6
11:30 Muixirt joined #perl6
12:13 syle2 can i make a request, control over malloc unalloc'ing memory for a hash, array, var if we so choose, would allow to write big apps in perl
12:14 syle2 tired of always have to run tests to see if garbage collector works in this and that instance, for most part a server process constantly filling up a hash is counter productive with garbage collection when you want key/value memory back right away
12:15 Coke_ depending on the verison of perl6, that may be handled automagically. (for example, perl6 on parrot will take advantage of parrot's GC)
12:16 Coke_ so you want some control over the GC from the language level?
12:16 syle2 yes
12:16 moritz_ that shouldn't be necessary
12:18 syle2 let me give you an example why it is, client comes in on socket, you create a hash for that client, you call select on the socket at same time processing other clients, constantly setting key value to the socket descriptors value, then grow hash on a per user basis, when i am done with that socket i should be able to free that memory right away
12:18 syle2 cause that amount of data in each clients hash is very big
12:20 moritz_ in a perfect world you shouldn't have to worry about memory, and an incremental garbage collector can handle such cases well
12:21 moritz_ and Perl 6 tries to present you a perfect programming world ;-)
12:21 moritz_ you're still welcome to send your proposal to perl6-language@perl.org, because here it might get lost
12:22 moritz_ (I'm not saying that you shouldn't discuss it here, just don't expect every language designer to backlog 100%)
12:24 syle2 if we had control over the memory we could compete on levels with c, c++ on writing server applications, i think that would be huge for perl, i mean still have the collector but have low level functions available from language to to dealloc memory
12:25 syle2 in real world stuff comes in its of a dynamic size and being able to free it at certain points is crucial, cause you could have more processes running using less memory
12:25 syle2 esp in a world now with faster cpus and multicore processors, memory is quickly becomming the bottleneck, can never have enough
12:26 moritz_ syle2: my worries are mostly that people will worry overmuch about memory, demallocing things were not appropriate etc..
12:26 moritz_ syle2: so the best might be an external module that digs deep into parrot's guts and provides that funcionality
12:27 moritz_ syle2: the nice thing about Perl 6 is that it's so freaky extensible - even when such a function is not the in the core language a module can still provide a very nice syntax for that
12:27 kyrbe joined #perl6
12:28 moritz_ for example it can simply export a multi sub/method mem_destroy into the global namespace, so you can just call $obj.mem_delete for arbitrary objects
12:29 syle2 well to prevent core dumps, maybe a table that keeps track of how much memory was allocated to each structure and can only delete that amount, if he tries to reuse that structure throw an undefined error maybe
12:30 syle2 that could become apart of language that way
12:31 syle2 hmmm that would be quite nice
12:31 apple-gunkies joined #perl6
12:31 moritz_ actually one of the google summer of code projects is to implement a tricolor garbage collector for parrot
12:32 moritz_ we could wait and see how well that works out
12:32 moritz_ that proposal is likely to be accepted btw
12:32 syle2 of course then there are complications with references etc still pointing at that memory space, which should return undef as well
12:32 moritz_ but no final decisions on gsoc yet
12:33 syle2 hmmm that would be nice
12:33 syle2 i'd like to keep track of who is programming on that, maybe embed something there
12:35 syle2 i like your idea about the module calling $obj.mem_delete for arbitrary objects, that would be very nice
12:35 kyrbe left #perl6
12:35 moritz_ the students are required to publish weekly status reports
12:38 syle2 right now for a server app, i can quickly watch the process grow to gigabytes on a single process in a few days using select/process client method with a hash, only way i can counter the memory problem is forking a new processs, grabbing the data, then terminating the child
12:38 moritz_ did you try Devel::Leak?
12:39 syle2 yeah i see problems when using concatenation
12:40 syle2 $config($sock}{data}.=$newpeiceofdata;  later on ... delete $config{$sock}; still keeps growing anyway
12:41 syle2 never giving back to garbage collector, then i find it does release it when not concatenating, its just alot off bs in my opinion, rather just be able to release it as i see fit
12:42 moritz_ people usually program with perl because they don't want to care about such things ;)
12:42 moritz_ but if that problems existst in perl 5.10.0 as well you might want to file a bug report
12:43 syle2 there are enough problems in 5.10 atm, think i'll wait it out till perl6
12:44 moritz_ you're very patient, young Padavan ;-)
12:46 syle2 not overly patient, but think i'll go back to c if perl6 isn't released in next year lol, but that still abit of time
12:49 spinclad syle2: if a datum is not freed by the garbage collector, there's a reference to it still around, and it's not safe to free it.  frequent incremental sweeps of the latest arena should be fast and effective.
12:50 syle2 only reference would be a sock which gets undefined
12:51 spinclad are you wanting the remaining reference to be a weak one, which will not preserve it?  that can be arranged.
12:51 syle2 perl is great, i love it, enjoyed programming in it for many years, I've learned so much reading over so many other people's code on CPAN, and when i need more functionality than they could do, it taught me lower level c socket programming techniques, by learning a higher level interface its easier to learn a low level one
12:53 syle2 well anyway to destroy memory would be a huge help
12:55 spinclad perhaps
12:55 syle2 i have to look at what kind of hardware things can run on , you can get a good reference for this by googling "dedicated servers" and look in the 100 dollar range, thats what most programs run on, good processors, most multicore but stuck with 500 megs or 1 gig of ram
12:55 syle2 mostly 500 megs
12:56 spinclad no matter how much memory you have it's never enough to just throw away
12:57 syle2 program i just wrote, been working on it for last 3 months, about 4000 lines of perl code, i try to start up 200 children to test it, i swap right away and crash the machine
12:57 spinclad so yes, we need to collect the garbage
12:59 syle2 on my other server with 8 gigs of ram, hell i could run 400 or more processes with no problems, but that isn;t a typical machine where i;d be allowed to use that much memory, who knows maybe memory will get cheaper in next year
13:02 syle2 but my point is if i had coded same thing in c to begin with that 200 processes could have been 1 thousand easily, thats scalability i'm hoping perl6 will be able to compete with
13:04 moritz_ I hope that as well ;)
13:04 moritz_ but chances are good because Perl 6 has many features that make concurrency less painfull
13:05 moritz_ like much less global variables that have to be cloned for each thread
13:08 syle2 by threads you mean real threads or fork?
13:08 syle2 you mean per subroutine etc
13:09 moritz_ thread = thread ;-)
13:09 moritz_ but you can have other options for concurrency in Perl 6
13:09 syle2 guess my not using c as backend to this no chance of real threading in perl6 with pthreads mutexs etc
13:09 moritz_ like STM, autothreaded hyper operators etc.
13:11 syle2 new perl seems really nice, guess i'm not liking so much language is looking more like ruby etc than c but i guess for the ability to be able to compile to binary it should be worth it
13:12 moritz_ are you sure you know enough about Perl 6 to like or dislike it?
13:13 syle2 cout printf print sprintf write writeln echo blah blah blah, amillion diff ways to print one thing in many languages anyways
13:13 syle2 perl6 is say i think lol, add another one to list
13:13 moritz_ timtowtdi
13:14 moritz_ say $foo; is really much shorter than print $foo, "\n"
13:14 moritz_ that's what I like about it
13:14 syle2 i tried it abit under pugs abit last year i think, still lacked alot of documentation , was all stacked in some ftp dir as i remembered, available code was non-existant to show proof of concept to switch
13:15 moritz_ the biggest lack of Perl 6 is implemenatioin ;)
13:15 syle2 i think best way to get it out there is start another cpan for perl6 and start upping modules there, eventually as it grows language will take off
13:16 syle2 or is plan to fully support perl5 cpan as well
13:16 moritz_ you can't really write Perl 6 modules before you've got a compiler
13:16 moritz_ yes
13:16 moritz_ the compiler/interpreter will have a libperl5 linked in
13:16 moritz_ to handle the perl 5 parts
13:17 moritz_ you can actually 'say $foo { use v5; # Perl 5 code here }; # Perl 6 code here'
13:17 syle2 just for backwards compatibility you mean, perl6 will compile to binary, perl5 will just call an interpreter through a library
13:18 moritz_ it's up to the implementor what perl 6 will do, if it compiles or interprets
13:18 moritz_ but in principle yes
13:19 syle2 i like the idea, very good, then you can release next version of perl as perl 6.0 on every new distro supporting perl5, and getting people to play with perl6 at same time this way
13:21 moritz_ actually perl 6 assumes each input file to be perl 5 until it learns otherwise
13:21 syle2 we want compile, binary, ability to close source and run at low level machine language
13:21 moritz_ with a 'use v6;' or a 'class $something' or a 'module $something' it learns that it's Perl 6
13:22 syle2 I'd love ability to compile everything, tar the program up and throw it on another box to run without having to install alot of things
13:23 moritz_ everybody loves that ;)
13:23 moritz_ but it's hard to unify with other goals
13:24 syle2 only thing perl in general is lacking in to be a top contender is building gui's to interface with their program nicely on a windows box
13:25 syle2 i been seeing alot of work done in that area though with sdk etc
13:25 syle2 lets face it.....
13:25 syle2 we all use windows as a client, and we use unix as servers
13:26 syle2 hell even now i;m using securecrt or some xterm program on my windows computer working on my unix server
13:27 syle2 class $something hmmmm
13:27 * moritz_ uses Debian on all his clients
13:27 syle2 i read perl6 won;t have real classes, self blessing object again
13:28 moritz_ NO!
13:28 moritz_ where did you read that?
13:28 syle2 like having public and friend classes in c++ aren;t there or something
13:28 syle2 search on google
13:28 moritz_ which result page?
13:28 syle2 hmmm was about 2-3 months ago, if i find link again i'll paste it here
13:28 moritz_ http://perlcabal.org/syn/S12.html is where you should look
13:29 moritz_ ok, do that ;)
13:29 lambdabot Title: S12
13:29 syle2 i meant public and private classes not friend, haven;t done c++ for awhile lol
13:31 syle2 i;m more familiar with c, think i'm liking so much programming with OOP style in perl i'd rather use c++ OOP, and program using c libraries
13:32 syle2 thats alot better docs
13:32 syle2 got any docs on connecting to a socket and talking to it?
13:32 syle2 wheres the cool stuff hehee
13:33 syle2 hey moritz you have debian
13:33 syle2 can you test something for me
13:34 syle2 you got IO::Socket::INET6 module? i been trying to get cross compatiblity for freebsd and linux with this program i;ve coded, i got latest freebsd 7.0, but only older fedora 3.0 boxes that seem to not do what its suppose to for ipv6, thinking might be old
13:36 syle2 on linux binding to same port with ipv4 and ipv6 doesn't seem to work, if i set AF_INET and AF_INET6 separately, if i set AF_UNSPEC then linux binds to both protocals, but only the former on freebsd
13:36 moritz_ sudo aptitude install libio-socket-inet6-perl
13:36 syle2 wondering if cause my linux box is just so old :(
13:36 moritz_ no big deal ;-)
13:39 syle2 hmm never heard of that one
13:39 syle2 supports ipv4 to?
13:39 moritz_ that *is* IO::Socket::INET6
13:39 moritz_ packaged up as a debian package
13:40 syle2 god i hate how they name everything different
13:40 syle2 in freebsd its just cd /usr/ports/net/p5-blah; make install
13:40 moritz_ it's just a different naming convention, neither better nor worse that debian's
13:41 syle2 i'm a freebsd fan as you can prob telll from my outdated fedora boxes, but i hear gentoo linux is catching up to debian giving better control over packages
13:42 syle2 debian is binary installs, gentoo is debian but with source compile installs from what i read, was wondering what to update my fedora box to lately, debian does look nice
13:43 Auzon Which Fedora are you running?
13:43 syle2 i can see problem installing binary packages though, like say doing things with mythtv, be missing alot of runtime libraries etc
13:45 syle2 3.0 and 4.0
13:45 Auzon Those don't even compare to modern Fedora.
13:45 syle2 haven;t updated them for years
13:46 Auzon Back in the days of Fedora 3, my sound broke with some updates. Now I run Fedora 8 on my laptop, and most things work out of the box or are fairly simple to get working
13:46 syle2 i don;t like fedora anymore, every 6 months seems you have to update your box to some new version, when you just want to run regular updates on it and not reinstall the whole thing for a few years, kinda sucks
13:46 Auzon Then run CentOS
13:47 syle2 yeah that what my next choice, but i heard of all the available debian packages and gentoo and they outnumber all other distros
13:47 TJCRI joined #perl6
13:47 riffraff joined #perl6
13:47 syle2 i prob will go centos
13:48 Auzon True, Debian (well, my experience was with Kubuntu) has a lot of packages. But there are only a few times in Fedora that I didn't find something in a repo.
13:48 Auzon As for Gentoo, they have an insane amount of packages, but compiling everything from source just doesn't do it for me anymore.
13:49 syle2 I always like feeling that it compiles safely then runs, system more stable that way, freebsd does same thing, besides, nothing to install something in a screen session and come back to it after
13:50 syle2 you can feel safe your cross dependancies are satisfied this way
13:50 moritz_ when you use debian stable you can be pretty sure as well ;)
13:51 syle2 only thing where freebsd really dominates there is i can run 2 commands that take a few hours, will recompile every single binary on the system
13:51 syle2 with updated sources on everything
13:51 Auzon It's been many years since I've made _any_ packaging system fail on dependencies. Portage, apt and yum all handle dependencies very well
13:52 moritz_ syle2: I don't get it. You don't want fedora because you don't want to upgrade every 6 month, but on the other hand you want to recompile your complete system with new sources?
13:53 syle2 sure why not, run it in a screen session and go to bed
13:53 syle2 reinstall with a cd, no thanks
13:53 Auzon Why use a CD anymore?
13:53 masak joined #perl6
13:54 Auzon Debian and Ubuntu definitely support upgrades between versions using apt. Fedora has support as well.
13:54 syle2 point is it recompiles everything which is nice, updated binaries on everything, but its not like I nuked all the hours of work i put in to settting it up properly for a new OS install
13:55 syle2 i mean new OS installs are a pain in the ass
13:55 moritz_ and with new sources you never have incompatibilites? I can't believe that, sorry
13:55 syle2 setup apache, bind, ssh, samba to share your mp3's and a ton of other crap
13:56 moritz_ that's why you use 'aptitude upgrade' on debian, as Auzon said ;)
13:56 syle2 never
13:56 syle2 its most stable OS there is
13:56 syle2 think last i saw with new scheduler its outperforming linux with mysql as well
13:56 syle2 and its always outperformed linux on heavy loads
13:57 moritz_ ... except with mysql and threads, which used to suck on freebsd (but is fixed now)
13:57 syle2 linux will perform the best on light to medium loads
13:57 syle2 yes i kept using redhat and fedora back then to take advantage of mysql SMP support
13:57 Auzon Hey, I have no issue with *BSD. I'm just saying that rolling upgrades (Gentoo-style) are not the only way to fully upgrade your system.
13:58 syle2 another time i went linux as well to program with asterisk
13:58 syle2 if you devel alot of crap usually safer to stay with linux usually, but if you want rock solid and usually run same things all the time, fbsd better choice
13:59 moritz_ but how boring would it be if we couldn't backbite about systems that are similar to ours, but still a bit different?
14:00 syle2 well i look at release cycles mostly, i can usually count on a good 4 years with bsd before having to do a major release upgrade
14:00 syle2 i think debian is same way
14:01 Auzon syle2: Your OS and distro choice is up to you for what works. But Fedora and Debian have come a long way to allow upgrades between versions. And if you want long term stuff, there's CentOS, Ubuntu LTS, and I'm sure Debian offers something.
14:02 Auzon I can't ever say that I've seen stability with rolling upgrades, but maybe I was doing it wrong. It's a moot point now, since I won't compile/configure my whole system on a laptop anymore.
14:02 syle2 more longterm the better, the exciting old days of installing that new OS release like you just got out of high school are gone, rather go drink some beer
14:02 chris2 joined #perl6
14:03 Auzon I'm still too young for that ;)
14:03 syle2 idk i started on slackware 3.0 back then, new CD's were kewl back then
14:04 syle2 those were the kewl days, you could do whatever you wanted whenever you wanted and there were no laws
14:05 moritz_ Auzon: you're probably just in the wrong country for that
14:05 moritz_ Auzon: in Germany you get beer at the age of 16, and "hard" alcoholics at 18
14:06 moritz_ I don't know if I welcome that, though
14:06 Auzon Yeah. I've had drunk people from Britain and Austria instant message me.
14:06 Auzon Who are my age
14:06 syle2 canada its 18 and 19 depending on province, 17 if you join the military
14:07 moritz_ that's quite a method to get people to join the army!
14:07 Auzon Indeed.
14:07 syle2 i did it for a year at 17 lol, just the reserves
14:08 syle2 but digging trenches all day long and someone yelling at me to go faster or only get couple hours sleep over 3 days lost its karma
14:09 syle2 i;d have to carry a bottle of vodka with me all day to endure that lol
14:11 syle2 if you want to join the military , must like 3 things, drinking, cartoons and fighting
14:11 Auzon Why cartoons?
14:11 syle2 they all watch loony toons
14:12 Auzon Seriously? That's unexpected.
14:12 syle2 since assault charges don't exist your free to go at it with anyone, thats their resolution to everything, 2 people have a problem, settle it out on the lawn, problem solved
14:14 syle2 good system really, no court time, no tax payer dollars, person who looses will probably not screw with other guy again, problem solved
14:15 syle2 i got my ass kicked lots to, didn't enjoy that much, but if you standup for yourself at least people won't screw with you again, thats only important part
14:15 syle2 took me awhile to learn that, slow learner i guess
14:15 Coke_ left #perl6
14:15 Auzon Time for me to run.
14:16 moritz_ bye
14:23 syle2 anyways back to socket6
14:23 syle2 if you could test that much appreciated, idk if i will update this linux box before i release this project
14:24 syle2 need someone to test binding using AF_INET and AF_INET6 to same port and see if it works, cause my older boxes will only do it if i use AF_UNSPEC
14:25 moritz_ sure, just give me test script
14:25 syle2 k
14:26 TJCRI joined #perl6
14:36 pasteling "syle2" at 24.78.238.63 pasted "ipv4 and ipv6 test" (18 lines, 635B) at http://sial.org/pbot/30843
14:37 DarkWolf84 joined #perl6
14:37 moritz_ syle2: cannot bind to ipv6 at foo.pl line 14.
14:38 moritz_ and $! says "Address already in use"
14:38 moritz_ Linux trudi 2.6.24.4 #1 SMP Mon Mar 24 21:58:11 CET 2008 i686 GNU/Linux
14:39 rdice joined #perl6
14:39 syle2 damnit, wish this guy would make his module compatible across OS's, k one sec one more test
14:41 pasteling "syle2" at 24.78.238.63 pasted "ipv4 and ipv6 test using AF_UNSPEC instead" (16 lines, 477B) at http://sial.org/pbot/30844
14:42 moritz_ syle2: that works
14:42 syle2 the first one is only way it works on freebsd, the second way only works on linux it seems
14:43 syle2 ok thanks for testing that, at least i know to compensate for both OS's now that way, much appreciated
14:44 moritz_ you're welcome
15:07 xinming joined #perl6
15:20 charsbar joined #perl6
15:37 peeps[work] joined #perl6
15:54 pmurias joined #perl6
16:21 wtgee joined #perl6
17:04 rindolf joined #perl6
17:05 eternaleye joined #perl6
17:32 TimToady @tell mncharity re gather, when we have LTM that can do backtracking and keep track of order within tied tokens, then we can make sure a user's definition overrides a tied definition from a base grammar.  The current name rule needs to split in two; known subs trump keywords, but keywords trump postdeclared subs.
17:32 lambdabot Consider it noted.
17:56 justatheory joined #perl6
17:57 eternaleye joined #perl6
18:11 qmole joined #perl6
18:41 b_jonas joined #perl6
19:00 Coke joined #perl6
19:15 ruoso joined #perl6
19:16 barney joined #perl6
19:21 mj41 joined #perl6
19:25 tobeya joined #perl6
19:40 Donald_ joined #perl6
19:43 lichtkind joined #perl6
19:48 syle joined #perl6
19:48 [particle] joined #perl6
20:17 jferrero joined #perl6
20:18 justatheory joined #perl6
20:31 eternaleye joined #perl6
20:41 justatheory_ joined #perl6
20:55 jan_ joined #perl6
21:03 larsen_ joined #perl6
21:12 tobeya joined #perl6
21:46 meppl joined #perl6
21:47 justatheory joined #perl6
21:49 eternaleye joined #perl6
22:02 Jedai joined #perl6
22:16 meppl joined #perl6
22:23 Schwern joined #perl6
22:25 wknight8111 joined #perl6
22:35 justatheory joined #perl6
22:36 meppl joined #perl6
23:31 meppl joined #perl6
23:47 Limbic_Region joined #perl6
23:57 meppl good night

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

Perl 6 | Reference Documentation | Rakudo