#perl
30 October 2007
Total 29 pages. You are browsing page 3/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
01:19 <****> well, do any of you know a "Python advocacy" type website that would brainwash me and persuade me to learn Python?
01:19 <****> and u learn python in less than a week
01:19 <****> jawnsy: dive into python? the tutorial written by GvR is apparently very good
01:20 <****> optikalmouse: and isn't Ruby all about RoR anyway?
01:20 <****> jawnsy: not entirely...it's unfortunate that RoR gets all the glory.
01:21 <****> jawnsy: but it has some Perl-like syntax
01:21 <****> heh
01:21 <****> perlbot, ruby
01:21 <****> ruby is a wannabe perl
01:21 <****> but it's also kind of like Smalltalk where almost everything's an object?
01:21 <****> I haven't tried it, so I don't know much about it.
01:21 <****> it's all the same to me: http://mauke.ath.cx/stuff/poly.poly
01:22 <****> optikalmouse: hmm I am looking at the Dive Into Python book and it looks nice, but what I'm looking for is more of "why Python"
01:22 <****> but it's always good to learn other languages, just to see what mistakes have been learned from (or not)
01:22 <****> optikalmouse: but isn't Ruby on Rails the whole reason Ruby is such a craze these days? correct me if I'm wrong, but Ruby was around sans-craze when it predated RoR
01:22 <****> jawnsy: that is true
01:23 <****> mauke: umm can you really run all of those as different languages? :|
01:24 <****> TIAS
01:24 <****>:)
01:24 * Zoffix tries
01:24 <****> oh my.. that is messed up
01:25 <****> I tried only Python and Perl but wow
01:25 <****> jawnsy: there's an Eric S. Raymond article about why python haha: http://www.linuxjournal.com/article/3882
01:25 <****> I like ruby.
01:25 <****> lol
01:26 <****> mauke++ # that's a nifty code :)
01:26 <****> that is some messed up code, mauke
01:26 <****> mauke: did you write that?
01:26 <****> jawnsy: yes
01:26 <****> very impressive!
01:26 <****> indeed :)
01:27 <****> jawnsy: http://www.python.org/about/
01:28 <****> jawnsy: that's not really great advocacy but it lists a few nice features...just grab the download and try things out in the repl
01:28 <****> and while you're at it, grab Ruby as well.
01:28 <****> :p
01:34 <****>-]'' part in the middle, brainfuck?
01:34 <****> yes
01:34 <****> Can I ask a question about OTRS (Open Ticket Request System) in here?
01:34 <****> do you need a brainfuck interpreter?
01:34 <****> Man, that shit's insane
01:34 <****> http://mauke.ath.cx/stuff/c/bfi.c
01:34 <****> no thank you, my brain is already fucked up :)
01:34 <****> Thanks :)
01:35 <****> doesn't generate garbage output in brainfuck
01:36 <****> heh, I remeber fuck all about C :)
01:36 <****> hey Woosta
01:37 <****> Been almost 7 years since I've briefly learned it and about 3 years since I wrote my last "Hello world" C program :)
01:37 <****> optikalmouse: hmm.. I don't really like Python so far, but I'll throw it on the to-do list
01:37 <****> uh, how do I do a multi-line comment?
01:38 <****> optikalmouse, I use pod
01:38 <****> optikalmouse: resist the urge and meditate
01:38 <****> perldoc -q comment
01:38 <****> jawnsy: if the indentation stuff bugs you, it won't after half an hour of using it
01:38 <****> optikalmouse: YES IT WILL
01:38 <****> it still bugs me, and I've used it considerably more than half an hour
01:38 <****> (speaking from experience)
01:38 <****> jawnsy: I bitched about the indentation stuff for a week and then got used to it...and that's after I was using C++
01:39 <****> I hate that indentation thing in Python, primary reason why I stopped using it.
01:39 <****> the indentation makes it also hard to talk about code on IRC :-)
01:39 <****> mauke: depends on if tabs/spaces are mixed because of friends/co-workers.
01:39 <****> optikalmouse: no
01:39 <****>:)
01:39 <****> it really doesn't
01:39 <****> mauke: you end up using a pastebin anyhow :P
01:39 <****> in any case!
01:39 <****> all the Python I've written is my own
01:39 <****> no multi-line comments?
01:39 <****> I just want to comment out a block of code.
01:39 <****> :S
01:39 <****> once again, perldoc -q comment
01:40 <****> optikalmouse: look at our eval bot. it wouldn't be as useful if you couldn't write functions or loops
01:40 <****>
01:40 <****> optikalmouse: the indentation thing seems worrysome, but the whole 'dictionaries' (ie hashes in Perl) seems a little iffy
01:40 <****> optikalmouse: it will definitely take some time to absorb
01:41 <****> mauke: I use emacs, I think I'm good :p
01:41 <****> then find out how emacs does block insert :-)
01:41 <****> I have some files, named foo####.jpg where #### goes from 0000 to 0250. I want to copy them, in that exact same order, to foo****.jpg where **** goes from 0251 to 0500. What's the quickest way I can do this?
01:41 <****> Then you either don't know how to use it, or it sucksl
01:41 <****> optikalmouse, actually, nevermind, I don't really use pod, unless I need to comment out 200+ lines.
01:41 <****> s/l/./
01:42 * CPAN upload: Data-Validate-URI-0.03 by SONNEN
01:42 * CPAN upload: File-Stat-Moose-0.0103 by DEXTER
01:42 <****> optikalmouse, I just select the thing I need to comment and CTRL+D comments CTRL+SHIFT+D uncomments. Simple enough
01:42 <****> ah ok
01:42 <****> I just had to switch modes
01:42 <****> Actually, I just need help figuring out how to manipulate filenames themselves...
01:42 <****> optikalmouse: you can just go to column one and C-space, then go to the end, and C-x r t # ;
01:42 <****> stupid emacs use the crappy perl mode when loading up a perl file (which doesn't seem to supply any keyboard shortcuts :())
01:42 <****> optikalmouse: and you want to use the cperl mode, not the perl one.
01:43 <****> optikalmouse, Most Emacs users I ... yeah.
01:43 <****> optikalmouse: Emacs only goes into Perl mode if the file ends with .pl or it has an Emacs-identifier near the beginning.
01:43 <****> optikalmouse: ('require cperl-mode); in your .emacs; will do it
01:43 <****> JordiGH, Did you look at File::Copy?
01:43 <****> dondelelcaro: ah ok, thanks
01:43 <****> apeiron: Nope. Where is it documented?
01:43 <****> perl -wle 'for (glob "foo*.jpg") { /^foo(\d{4})\.jpg$/ or next; $n = sprintf "foo%04d.jpg", $1 + 250; rename $_, $n or die "$_: $!" }'
01:43 <****> JordiGH, perldoc File::Copy
01:44 <****> Or use mauke's code. :)
01:44 <****> Although that's not actually copying, just renaming.
01:44 <****> Well, just change the appropriate snippet, right?
Total 29 pages. You are browsing page 3/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
