pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:07 r0bby joined 00:59 Limbic_Region joined 01:06 tobeya left
ting win 2 01:15
01:16 elmex left 02:09 felipe left 02:33 yewenbin joined 02:48 justatheory_ joined, justatheory left, peeps[work] left 02:51 justatheory_ is now known as justatheory 02:52 justatheory_ joined, justatheory left 03:04 Limbic_Region left 03:07 kcwu left, kcwu joined 03:17 Auzon joined 03:18 mncharity joined
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:29
03:37 wknight8111 left 03:57 syle joined
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:01
pugs_svnbot r20296 | putter++ | [elf_e] Added gather/take support using Perl6::Take (a new dependency). 04:08
r20296 | putter++ | [STD_red] Parse statement_prefix: do try gather contend async lazy.
diff: dev.pugscode.org/changeset/20296
lambdabot Title: Changeset 20296 - Pugs - Trac
mncharity moritz_: awwaiid: pmurias: gather/take added to elf, courtesy of Perl6::Take and Gaal. 04:11
g'night &
04:11 mncharity left
[particle] gaal++ 04:11
04:25 Psyche^ joined 04:33 Patterner left, Psyche^ is now known as Patterner 04:43 peepsalot left, peepsalot joined
pugs_svnbot r20297 | putter++ | [elf_e] gather/take bugfix. Perl6::Take dependency dropped - the code has been inlined and tweaked. 04:50
r20297 | putter++ | There is currently a parser problem with 'my @a = gather {}; say @a;'. Workaround: 'my @a = (gather {}); say @a'.
diff: dev.pugscode.org/changeset/20297
lambdabot Title: Changeset 20297 - Pugs - Trac
05:00 REPLeffect left 05:01 felipe joined 05:07 peepsalot left 05:08 peepsalot joined 05:42 alester_ left 05:50 aindilis joined 05:51 zostay_ joined 06:02 zostay left 06:11 justatheory_ left 06:13 syle2 joined 06:30 syle left 06:36 iblechbot joined 06:46 iblechbot left 06:51 b_jonas_ joined 07:11 b_jonas_ is now known as b_jonas 07:12 lambdabot left 07:13 lambdabot joined 07:46 alanhaggai joined 08:10 b_jonas left 08:19 ruoso joined 08:35 Alias_ joined 08:52 masak joined 09:04 smtms left 09:14 iblechbot joined 09:16 IllvilJa left 09:19 smtms joined 09:31 masak left 09:32 IllvilJa joined
moritz_ any idea how locales will be handled in Perl 6? 09:52
10:11 xinming left 10:32 wknight8111 joined 10:43 masak joined 11:06 mj41 left 11:09 riffraff joined 11:14 elmex joined 11:18 meppl joined 11:33 Muixirt joined 11:34 Daveman left
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:16
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:18
Coke_ depending on the verison of perl6, that may be handled automagically. (for example, perl6 on parrot will take advantage of parrot's GC)
so you want some control over the GC from the language level? 12:19
syle2 yes 12:20
moritz_ that shouldn't be necessary
12:20 alanhaggai left
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:21
cause that amount of data in each clients hash is very big 12:22
moritz_ in a perfect world you shouldn't have to worry about memory, and an incremental garbage collector can handle such cases well 12:24
and Perl 6 tries to present you a perfect programming world ;-)
you're still welcome to send your proposal to [email@hidden.address] because here it might get lost
(I'm not saying that you shouldn't discuss it here, just don't expect every language designer to backlog 100%) 12:25
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:27
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:28
esp in a world now with faster cpus and multicore processors, memory is quickly becomming the bottleneck, can never have enough 12:29
moritz_ syle2: my worries are mostly that people will worry overmuch about memory, demallocing things were not appropriate etc..
syle2: so the best might be an external module that digs deep into parrot's guts and provides that funcionality 12:30
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:31
12:31 kyrbe joined
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:32
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:33
that could become apart of language that way
hmmm that would be quite nice 12:34
12:35 apple-gunkies joined
moritz_ actually one of the google summer of code projects is to implement a tricolor garbage collector for parrot 12:35
we could wait and see how well that works out
that proposal is likely to be accepted btw
syle2 of course then there are complications with references etc still pointing at that memory space, which should return undef as well
moritz_ but no final decisions on gsoc yet 12:36
syle2 hmmm that would be nice
i'd like to keep track of who is programming on that, maybe embed something there
i like your idea about the module calling $obj.mem_delete for arbitrary objects, that would be very nice 12:38
12:38 kyrbe left
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:41
moritz_ did you try Devel::Leak? 12:42
syle2 yeah i see problems when using concatenation
$config($sock}{data}.=$newpeiceofdata; later on ... delete $config{$sock}; still keeps growing anyway 12:43
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:44
moritz_ people usually program with perl because they don't want to care about such things ;) 12:45
but if that problems existst in perl 5.10.0 as well you might want to file a bug report 12:46
syle2 there are enough problems in 5.10 atm, think i'll wait it out till perl6 12:47
moritz_ you're very patient, young Padavan ;-)
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:52
syle2 only reference would be a sock which gets undefined 12:53
spinclad are you wanting the remaining reference to be a weak one, which will not preserve it? that can be arranged. 12:54
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:56 wknight8111 left
syle2 well anyway to destroy memory would be a huge help 12:56
spinclad perhaps 12:58
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
mostly 500 megs 12:59
12:59 riffraff left
spinclad no matter how much memory you have it's never enough to just throw away 12:59
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 13:00
spinclad so yes, we need to collect the garbage
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
13:05 Alias_ left
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:06
moritz_ I hope that as well ;) 13:07
but chances are good because Perl 6 has many features that make concurrency less painfull 13:08
like much less global variables that have to be cloned for each thread
syle2 by threads you mean real threads or fork? 13:11
you mean per subroutine etc 13:12
moritz_ thread = thread ;-)
but you can have other options for concurrency in Perl 6
syle2 guess my not using c as backend to this no chance of real threading in perl6 with pthreads mutexs etc 13:13
moritz_ like STM, autothreaded hyper operators etc.
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:15
moritz_ are you sure you know enough about Perl 6 to like or dislike it?
syle2 cout printf print sprintf write writeln echo blah blah blah, amillion diff ways to print one thing in many languages anyways 13:16
perl6 is say i think lol, add another one to list
moritz_ timtowtdi
say $foo; is really much shorter than print $foo, "\n" 13:18
that's what I like about it
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
moritz_ the biggest lack of Perl 6 is implemenatioin ;)
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:19
or is plan to fully support perl5 cpan as well
moritz_ you can't really write Perl 6 modules before you've got a compiler
yes
the compiler/interpreter will have a libperl5 linked in 13:20
to handle the perl 5 parts
you can actually 'say $foo { use v5; # Perl 5 code here }; # Perl 6 code here'
syle2 just for backwards compatibility you mean, perl6 will compile to binary, perl5 will just call an interpreter through a library 13:21
moritz_ it's up to the implementor what perl 6 will do, if it compiles or interprets
but in principle yes 13:22
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:23
13:24 masak left
moritz_ actually perl 6 assumes each input file to be perl 5 until it learns otherwise 13:24
syle2 we want compile, binary, ability to close source and run at low level machine language
moritz_ with a 'use v6;' or a 'class $something' or a 'module $something' it learns that it's Perl 6 13:25
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:26
moritz_ everybody loves that ;) 13:27
but it's hard to unify with other goals
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
i been seeing alot of work done in that area though with sdk etc 13:28
lets face it.....
we all use windows as a client, and we use unix as servers 13:29
hell even now i;m using securecrt or some xterm program on my windows computer working on my unix server
class $something hmmmm 13:30
moritz_ uses Debian on all his clients 13:31
syle2 i read perl6 won;t have real classes, self blessing object again
moritz_ NO!
where did you read that?
syle2 like having public and friend classes in c++ aren;t there or something
search on google
moritz_ which result page?
syle2 hmmm was about 2-3 months ago, if i find link again i'll paste it here 13:32
moritz_ perlcabal.org/syn/S12.html is where you should look
ok, do that ;)
lambdabot Title: S12
syle2 i meant public and private classes not friend, haven;t done c++ for awhile lol
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:34
thats alot better docs 13:35
got any docs on connecting to a socket and talking to it? 13:36
wheres the cool stuff hehee
hey moritz you have debian 13:37
can you test something for me
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:38
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:39
moritz_ sudo aptitude install libio-socket-inet6-perl
syle2 wondering if cause my linux box is just so old :(
moritz_ no big deal ;-) 13:40
syle2 hmm never heard of that one 13:42
supports ipv4 to?
moritz_ that *is* IO::Socket::INET6 13:43
packaged up as a debian package
syle2 god i hate how they name everything different
in freebsd its just cd /usr/ports/net/p5-blah; make install
moritz_ it's just a different naming convention, neither better nor worse that debian's 13:44
13:44 Muixirt left
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:45
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:46
Auzon Which Fedora are you running?
syle2 i can see problem installing binary packages though, like say doing things with mythtv, be missing alot of runtime libraries etc 13:47
3.0 and 4.0 13:48
Auzon Those don't even compare to modern Fedora.
syle2 haven;t updated them for years
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:49
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
Auzon Then run CentOS 13:50
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:50 TJCRI joined 13:51 riffraff joined
syle2 i prob will go centos 13:51
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.
As for Gentoo, they have an insane amount of packages, but compiling everything from source just doesn't do it for me anymore. 13:52
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:53
you can feel safe your cross dependancies are satisfied this way
moritz_ when you use debian stable you can be pretty sure as well ;) 13:54
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
with updated sources on everything 13:55
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
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:56
syle2 sure why not, run it in a screen session and go to bed
reinstall with a cd, no thanks
Auzon Why use a CD anymore?
13:57 masak joined
Auzon Debian and Ubuntu definitely support upgrades between versions using apt. Fedora has support as well. 13:57
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
i mean new OS installs are a pain in the ass 13:58
moritz_ and with new sources you never have incompatibilites? I can't believe that, sorry
syle2 setup apache, bind, ssh, samba to share your mp3's and a ton of other crap 13:59
moritz_ that's why you use 'aptitude upgrade' on debian, as Auzon said ;)
syle2 never
its most stable OS there is
think last i saw with new scheduler its outperforming linux with mysql as well 14:00
and its always outperformed linux on heavy loads
moritz_ ... except with mysql and threads, which used to suck on freebsd (but is fixed now)
syle2 linux will perform the best on light to medium loads
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. 14:01
syle2 yes i kept using redhat and fedora back then to take advantage of mysql SMP support
another time i went linux as well to program with asterisk
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 14:02
moritz_ but how boring would it be if we couldn't backbite about systems that are similar to ours, but still a bit different?
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:03
i think debian is same way
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:04
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:05
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:06 chris2 joined
Auzon I'm still too young for that ;) 14:07
syle2 idk i started on slackware 3.0 back then, new CD's were kewl back then
those were the kewl days, you could do whatever you wanted whenever you wanted and there were no laws 14:08
moritz_ Auzon: you're probably just in the wrong country for that
Auzon: in Germany you get beer at the age of 16, and "hard" alcoholics at 18 14:09
I don't know if I welcome that, though
Auzon Yeah. I've had drunk people from Britain and Austria instant message me.
Who are my age
syle2 canada its 18 and 19 depending on province, 17 if you join the military 14:10
moritz_ that's quite a method to get people to join the army!
Auzon Indeed.
syle2 i did it for a year at 17 lol, just the reserves 14:11
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:12
i;d have to carry a bottle of vodka with me all day to endure that lol
if you want to join the military , must like 3 things, drinking, cartoons and fighting 14:15
Auzon Why cartoons?
syle2 they all watch loony toons
Auzon Seriously? That's unexpected.
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:16
good system really, no court time, no tax payer dollars, person who looses will probably not screw with other guy again, problem solved 14:17
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:18
took me awhile to learn that, slow learner i guess 14:19
14:19 Coke_ left
Auzon Time for me to run. 14:19
14:19 Auzon left
moritz_ bye 14:20
syle2 anyways back to socket6 14:26
if you could test that much appreciated, idk if i will update this linux box before i release this project
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:28
14:28 TJCRI left
moritz_ sure, just give me test script 14:28
syle2 k
14:29 TJCRI joined
pasteling "syle2" at 24.78.238.63 pasted "ipv4 and ipv6 test" (18 lines, 635B) at sial.org/pbot/30843 14:39
14:40 DarkWolf84 joined
moritz_ syle2: cannot bind to ipv6 at foo.pl line 14. 14:41
and $! says "Address already in use"
Linux trudi 2.6.24.4 #1 SMP Mon Mar 24 21:58:11 CET 2008 i686 GNU/Linux
14:42 rdice joined
syle2 damnit, wish this guy would make his module compatible across OS's, k one sec one more test 14:43
pasteling "syle2" at 24.78.238.63 pasted "ipv4 and ipv6 test using AF_UNSPEC instead" (16 lines, 477B) at sial.org/pbot/30844 14:44
moritz_ syle2: that works 14:45
syle2 the first one is only way it works on freebsd, the second way only works on linux it seems 14:46
ok thanks for testing that, at least i know to compensate for both OS's now that way, much appreciated 14:47
moritz_ you're welcome
14:58 gbarr left 15:10 xinming joined 15:12 charsbar left 15:23 charsbar joined 15:40 peeps[work] joined 15:48 qmole left 15:54 masak left 15:57 pmurias joined 16:05 riffraff left 16:07 yewenbin left 16:24 wtgee joined 17:08 rindolf joined 17:09 eternaleye joined 17:28 ruoso left
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:36
lambdabot Consider it noted.
17:45 eternaleye left 17:59 justatheory joined 18:00 eternaleye joined 18:15 qmole joined 18:17 eternaleye left 18:18 wtgee left 18:32 audreyt_ is now known as audreyt 18:44 b_jonas joined 19:04 Coke joined 19:08 [particle] left 19:12 syle2 left 19:19 ruoso joined, Coke left 19:20 barney joined 19:22 b_jonas left 19:25 mj41 joined 19:28 tobeya joined 19:39 zostay_ is now known as zostay 19:43 Donald_ joined 19:46 Donald_ left, lichtkind joined 19:47 barney left 19:48 rindolf left 19:49 justatheory left 19:51 syle joined 19:52 [particle] joined 20:00 pmurias left 20:20 jferrero joined 20:21 justatheory joined 20:34 eternaleye joined 20:44 justatheory_ joined, justatheory left 20:54 jan_ left 20:59 jan_ joined 21:05 alester is now known as AndAway 21:06 larsen_ joined 21:07 elmex left 21:09 tobeya left 21:11 rdice left 21:15 tobeya joined 21:18 TJCRI left 21:32 lichtkind left 21:35 larsen_ left 21:46 meppl left 21:49 justatheory_ left 21:50 meppl joined, justatheory joined, eternaleye left 21:53 eternaleye joined 22:06 Jedai joined 22:16 justatheory left 22:17 meppl left 22:20 meppl joined 22:23 meppl left 22:27 Schwern joined 22:28 peeps[work] left 22:29 wknight8111 joined 22:35 iblechbot left 22:39 justatheory joined 22:40 meppl joined 22:44 eternaleye left, chris2 left 23:34 meppl left, meppl joined 23:35 ruoso left 23:51 Limbic_Region joined 23:55 jferrero left