#perl
27 October 2007
Total 23 pages. You are browsing page 3/23.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
02:45 <****> So -MCPAN -e shell runs a shell feature built-in to the CPAN manager, -d -e0 runs the debugger shell with some settings to make it better for general use, and anno's example is obviously a one-liner REPL in code; correct?
02:46 <****> Metaxy_FW: Devel::REPL is a module that gives you a REPL. you'd have to install it.
02:46 <****> -d -e0 runs the debugger on the program "0"; I don't know what you mean by "settings to make it better for general use"
02:46 <****> Got it.
02:47 <****> I was just interpreting -e0 to be configuration as opposed to just identifying the program.
02:47 <****> pravus: I got that, don't worry, I was just trying to parse out the other command lines I was given for clarity.
02:48 <****> Metaxy_FW: -e allows you to specify commands to run. you could do something like: perl -e "print qq{hello\n}"
02:49 <****> perl -e "CORE::dump"
02:49 <****> so -e0 just runs '0'... which evaluates to ... 0
02:49 <****> perldoc perlrun for more
02:50 <****> perlfor perlmore
02:50 <****> pravus: Yeah, I know what e does normally, but I thought -e0 might be a different switch altogether--just brain freeze, sorry.
02:50 <****> Metaxy_FW: no worries
02:51 <****>44"
02:52 <****> anyone know how to resolve a symlink to absolute path in sh-scripts?
02:53 <****> readlink(1)
02:53 <****> k thx
02:53 <****> ...though that could be relative
02:56 <****> anno-, relative to what
02:56 <****>; chomp @in
02:56 <****> to the directory the link sits in. (you specified d #perl
02:56 <****> nollan: symlinks can be relative
02:57 <****> sorry. (you specified "absolute")
02:57 <****> ah. thats correct
02:57 <****> Metaxy_FW: use File::Slurp; chomp(my @in = read_file "infile");
02:58 <****> Wait, chomp can take an assignment expression and still figure out the var?
02:59 <****> no, chomp takes an lvalue
02:59 <****>)
02:59 <****> but = returns the thing it assigned to
02:59 <****> yes, except it's broken
02:59 <****> }; # ?
02:59 <****> the result of an assignment is the left side (intact as an lvalue)
02:59 <****> pravus: argh
03:00 <****> Ah, I'm so used to = returning the result of the rvalue that I just assumed it was the case.
03:02 <****> If chomp works on an lvalue, then what's broken about my last example?
03:02 <****> the open part
03:03 <****> that should be my $file = "infile"; open my $in, "<", $file or die "$0: $file: $!\n";
03:04 <****> the world spins madly on
03:04 <****> The examples I used to gain my minimal understanding of file I/O used examples like that for open (of course, beginner's examples are meant for hygienic, Platonically ideal circumstances, but still, that seems elaborate in comparison...)
03:04 <****> By my first "that" I mean like mine
03:04 <****> it's all just sanity
03:05 <****> jawnsy: How went your midterm?
03:06 <****> my $in; open $in '<', $_ or die "$0: $_: $! for 'infile'; # just to introduce some insanity
03:07 <****> jagerman: painful.
03:07 <****> can't you pull the "my" into the open?
03:07 <****> I don't think postfix for creates an implicit scope
03:07 <****> jagerman: this computer science guy is an idiot. he wrote a List class that begins with an index of 1
03:07 <****> no, it'd be inside for
03:07 <****> statement-modifiers and my() thing
03:08 <****> eval: my $x = 42 for 1; $x
03:08 <****> mauke: undef
03:08 <****> huh?
03:08 <****> my $x if 0 "works" precisely because if doesn't create an implicit scope
03:08 <****> jawnsy: Well, $[ = 1 :)
03:08 <****> jagerman: all in all, the CS profs here do a very good job of making us hate CS
03:09 <****> it's murky
03:09 <****> jawnsy: I bet your program uses C++ or Java.
03:09 <****> jawnsy: How much of it do you have to take?
03:09 <****> Isn't that the point of CS?
03:10 <****> I'm kind of glad that I got a coding job without a CS degree, judging from all the shit I hear about CS programs.
03:11 <****> CS degree is much more interesting
03:11 <****> I remember a story (might be part of the hacker Zeitgeist or may have just been a personal anecdote I heard, not sure) about a CS professor someone met who said he never accomplished anything in his life, because the students who didn't care never learned anything or and the students who were smart and self-motivating had no need for him.
03:11 <****> jagerman, Yeah, I thought about it, but they'll still make you do the silly stuff like "implement this from scratch when you know full well that you'd use a library for it on the job", no?
03:11 <****> This was at his retirement party, I think
03:12 <****> Metaxy_FW: That's true: I'm the TA for a 2nd year CS lab, and the people who I spend the most time with are the ones who don't care and "just don't get it"
03:13 <****> we had a CS prof (PhD!) that didn't understand why 'true' and 'false' weren't ouput when printing a boolean type in C++. he was astounded by the following: cout << ( var ? 'true' : 'false' ) << endl;
03:13 <****> likewise, we never get to see the smart learners of perl on irc
03:14 <****> apeiron: Well, yes, but I don't think that's a problem. I've never thought CS to be about teaching you to program, but about teaching you about the theory behind programming.
03:14 <****> One thing that makes me worry if I end up getting a job in coding is what seems to me to be the extreme range of difficulty. I can't immediately envision a database-based website that would be inscrutable to me (although of course there are many that are com), but the very idea of, say, pattern recognition, makes me want to cry. So I can't tell if I'm qualified, aptitude-wise, for coding "in...
03:14 <****> ...general."
03:14 <****> *that are completely too big
03:15 <****> Metaxy_FW: Honestly, I wouldn't worry about it
03:15 <****> Metaxy_FW, This is why the experienced coders do the design and you implement little pieces. :)
03:15 <****> jagerman: from what i have seen, it's all about getting you a job programming java somewhere now
03:15 <****> Metaxy_FW: You don't started from "Oh my god this is huge and complex" you start from "Let me adjust this little piece"
03:15 <****> If you're in danger if implementing pattern recognition in a job after college, you're likely brilliant. :)
03:16 <****> Metaxy_FW, I had the same concerns as you, but that's why you start at entry level and work your way up.
03:16 <****> or you're in graduate school
03:16 <****> Most of the time they won't let you near the stuff for fear you'll break production
03:16 <****> Metaxy_FW: yes, the course is based on C++
03:16 <****> adjust this little piece, and bring the building to a crash
03:16 <****> It almost seems like a racket to me that web coders get white-color wages.
03:16 <****> Metaxy_FW: just make sure you learn from the input of others (when it matters)
03:16 <****> svn revert! svn revert!
03:16 <****> It's /so easy/.
03:16 <****> Metaxy_FW, White *collar*!
03:16 <****> jagerman: only two courses, and they are both one-semester. an intro one (last year) and this one which is pretty much a completion to said intro
03:16 <****> Please be careful with that word!
03:16 <****> pravus: I suppose I'm a bit luckier here that it's a very small department and program (my 3rd year CS class this semester has 3 students, last year I had one with 7) without a co-op program to try to teach to.
03:16 <****> sometimes knowing when to accept comments and when to ignore them is the hard part
03:16 <****> apeiron: Sorry, I know the phrase, it wasj ust a phonetic typo
03:16 <****> I came close to typing "czech" for "check" once.
03:17 <****> Metaxy_FW: Well, part of it is because it's not /so easy/.
03:17 <****> pravus: Actually, I think a co-op program is about the worst invention possible for the academic environment.
03:17 <****> Metaxy_FW: Take an ambiguous pile of customer requirement spew and turn it into something useful.... that's not /so easy/
03:17 <****> Heh.
03:18 <****> white-color wages, heh
03:18 <****> I guess it seems easy because I understand the thing I'm trying to do :P
03:18 <****> Metaxy_FW: It's because the customer sits next to the coder, and shares the same brain. :)
03:18 <****> Metaxy_FW, Let me tell you something else. Working on a project on your spare time bears *very* little resemblance to working on stuff for clients.
Total 23 pages. You are browsing page 3/23.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
