#perl
12 October 2007
Total 39 pages. You are browsing page 4/39.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
02:28 <****> then vary the algorithm
02:28 <****> so that it's a one-sided diff
02:28 <****> http://sial.org/pbot/28007 <--- this is what i've done so far
02:28 <****> just wondering if it was correct
02:28 <****> mauke: I guess I'll be using if/elsif then, I refuse to use that ugly for($var) { if (/blabla/) [...] } etc
02:29 <****> pkcahier: how about that hash of functions thing?
02:29 <****> hum
02:29 <****> that works:)
02:29 <****> though...
02:29 <****> is there a way to do anonymous functions with it?
02:29 <****> oh yeah
02:29 <****> a sub directly
02:29 <****> i get the intersection of both lists, then get the symm. diff of the common elements and the second list...
02:29 <****> see the code for "done"
02:30 <****> my %h; @h{ @a} = (); my @diff = grep ! exists $h{ $?}, @b;
02:30 <****> $?
02:30 <****> ?
02:30 <****> if/elsif still sound better to me though...
02:30 <****> $_
02:30 <****> guess I'll just that.
02:30 <****> It's weird because my host must have upgraded something... Since it suddenly happened.
02:30 <****> whoa...
02:30 <****> that's so damn pretty
02:31 <****> all of that code use to run real fine with "use Switch;"... until today.
02:31 <****> execution time jumped by 50 times:)
02:31 <****> the funny part is that even if I commented the switch it was still being buggy
02:31 <****> That's what switch does.
02:31 <****> perldoc Switch; <- it even tells you about all its own problems
02:31 <****> I've seen reports of the same exact code giving compilation errors on one machine and working on another.
02:31 <****> hehe
02:32 <****> switch is a proof-of-concept, not for production
02:32 <****> I love that part: If your source file is longer then 1 million characters and you have a switch statement that crosses the 1 million (or 2 million, etc.) character boundary you will get mysterious errors. The workaround is to use smaller source files.
02:32 <****> not that it concerns me since I'm under 200k
02:32 <****> or it might have suddenly started to do it with less than a million char;)
02:33 <****> right! I know why...
02:33 <****> I have 3 levels of nesting with "require"
02:33 <****> and each used switch.
02:33 <****> and of course switched reparsed them all at each level...
02:33 <****> i never thought of that anno-... very good solution
02:33 <****> what a mess;)
02:33 <****> there are a few modules that shouldn't have made it into the core
02:33 <****> Obviously...
02:33 <****> I'm going to make a www.dontbeepusewitch.com
02:34 <****> That's great.
02:34 <****> j/k;)
02:34 <****> Now the hard part: getting people to listen.
02:34 <****> Obviously Switch should never have made it to the public use...
02:34 <****> lol
02:34 <****> You can write all the advisories, all the documentation you want. Doesn't have any bearing whatsoever on people *listening* and *agreeing* with you.
02:34 <****> necos, it's really straight-forward
02:35 <****> encoding, Switch, CGI, English, ...
02:35 <****> yeah, it is now that i've seen it...
02:35 <****> but i was thinking originally of running a double foreach loop, which i know is the wrong way to do it
02:36 <****> hmm. Mail::ListDetector doesn't seem to detect mailman or Sympa lists correctly.
02:36 <****> foreach (@list1) { foreach (@list2) {...
02:36 <****> s/foreach/for/g
02:36 <****> core: Switch
02:36 <****> preaction: Added to perl core as of 5.007003
02:36 <****> oh you're joking me...
02:36 <****> wow
02:36 <****> :O wut
02:36 <****> lol
02:37 <****> Who put that in core?
02:37 <****> someone who didn't follow the warnings?
02:37 <****> but yeah, anno-, your solution is must faster / elegant
02:37 <****> oh, and Filter::Simple, of course
02:37 <****> because that's likely the source of many Switch problems
02:38 <****> crap... gotta get to class...
02:38 <****> thanks again
02:38 <****> bbl
02:46 <****> You guys need to read perldelta more, you'd know that Switch was core. :)
02:46 <****> bah, switch
02:46 <****> Never suggested *using* it, of course.
02:46 <****> Switch is also crap
02:47 <****> Yeah... but 5.10 will have given/when, which is far superior
02:47 <****> well, the code is clever and well-written, but source filters are bad juju
03:03 <****> is there any clever ways in which i could add a path to @INC?
03:04 <****> perlbot: set inc
03:04 <****> to change @INC (perldoc perlvar), recompile perl, or set the PERLLIB or PERL5LIB environment variable (perldoc perlrun), or use the -I option to perl (perldoc perlrun), or 'use lib' (perldoc lib) or fiddle with @INC (not recommended)
03:04 <****> rony_: ^-- so, yes!
03:04 <****> pravus, Thanks!
03:06 <****> how can i check which version of tkinter is included in my installed python?
03:06 <****> snayye: you're doing it wrong
03:07 <****> mauke: what's the right way to do it?
03:07 <****> asking in #python
03:07 <****> Not to mention using tkinter, and using Python.
03:08 <****> mauke: i tried to ask them, but it seems they're or have no idea
03:08 <****> apeiron: what is the perl equivalent of tkinter?
03:09 <****> what is tkinter?
03:09 <****> If I *had* to do GUI programming, I wouldn't use ugly Tk.
03:09 <****> they're sleeping
03:09 <****> The Tkinter module ("Tk interface") is the standard Python interface to the Tk GUI toolkit from Scriptics (formerly developed by Sun Labs).
03:10 <****> http://search.cpan.org/~ni-s/Tk-804.027/pod/overview.pod
03:10 <****> apeiron: they say starting with 8.0 it supports native look and feel, that's why i want to know which version i have
03:10 <****> What's native look and feel for Unix?
03:10 <****> Tk?
03:10 <****> Yeah, uh, no thanks. :)
03:11 <****> native look and feel is curses!
03:11 <****> curses++
03:11 * dwu giggles.
Total 39 pages. You are browsing page 4/39.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
