Xymph's Overture

#!/usr/bin/perl
print "Hello, world!\n";
No, that wasn't my first Perl script. I've actually written somewhat longer scripts, and modified other people's scripts regularly, but I don't have a sufficient understanding of the language to write longer scripts from scratch yet. So by way of a belated New Year's resolution, I recently picked up Programming Perl (a.k.a. the Camel book) to learn it from the ground up. There are perhaps better books to learn the language from, but since I'm already somewhat familiar with Perl (and have plenty of experience in other languages like C, Ada and Shell), I figure I'll be fine, and having the definitive reference on the language around is more useful in the long run anyway. My goal for embarking on this endeavour is to eventually add some new database-driven features to this site (which means dusting off my old SQL knowledge as well), and while it may take a while before you'll see the first results, it is a fun learning experience already.

Link of the Day: Welcome to the White House - WWW.WHITEHOUSE.ORG. Not to be confused with... exactly. Thanks SurlyBitch.
Story of the Day: Pet lizards feast on owner's corpse. Not for overly sensitive stomachs. Thanks rand029 and the many others that sent this in.
Wild Science: Future Tech: Really Special Forces. Thanks JTMauney.
Weird Science: Goat Milk Carries Spider Silk in Canada Experiment. Thanks Nicole.

View : : :
38 Replies. 2 pages. Viewing page 1.
Newer [  1  2  ] Older
38.
 
Re: serious OT
Jan 21, 2002, 11:53
38.
Re: serious OT Jan 21, 2002, 11:53
Jan 21, 2002, 11:53
 
I'm sorry. I'm sure you're a fine programmer, but that was hilarious, if subtle.

Not intended to be a joke, though I'm sure it is funny to all those unfortunate souls who had unqualified computer science teachers in high school. I apologize for the generally low quality of my colleagues.

My comment was mostly because I've been helping out a bit with bug reports and minor fixes for the Ogg Vorbis audio codec. Recently there was some discussion about an integer-only implementation of the codec and one of the developers said, "Get me a good integer MDCT with > 100dB of S/N (that's the hard part; I wrote one but it only has about 80) and I'll deliver the rest." That made me think, "You know, if I'd actually done any homework in my linear algebra class in college, I'd have a go at that." Of course I didn't, and so now that lack of fundamentals prevents me from coding such things.

To try to return even remotely to the topic, I'm quite the fan of Perl. I don't see any reason why you shouldn't be able to learn from the "Programming Perl" book vs. the "Learning Perl" assuming you can already program well in some C-like language.

References:
+[See Jack's comment on the MDCT at http://www.xiph.org/archives/vorbis-dev/0059.html ]
+[Download Ogg Vorbis (it's better than mp3) at
http://www.vorbis.com/ ]


This comment was edited on Jan 21, 11:55.
Graham "Teach" Mitchell, computer science teacher, Leander High School
37.
 
Re: serious OT
Jan 21, 2002, 09:46
anon@24.151
37.
Re: serious OT Jan 21, 2002, 09:46
Jan 21, 2002, 09:46
anon@24.151
 
> I really wish I'd paid more attention in linear algebra in
> college. I'd be twice the programmer I am today.
>
>--
>Graham Mitchell
>computer science teacher

oh oh oh oh oh

(bite tongue bite tongue bite tongue)

I'm sorry. I'm sure you're a fine programmer, but that was hilarious, if subtle.
36.
 
Re: serious OT
Jan 20, 2002, 22:48
anon@24.243
36.
Re: serious OT Jan 20, 2002, 22:48
Jan 20, 2002, 22:48
anon@24.243
 
does anyone use LINEAR ALGEBRA in their jobs? What for

How about John Carmack? Heard of him?

Linear algebra (vectors, matrices & transforms) and geometry/trigonometry are heavily used in 3D programming.

FFTs and MDCTs are also used for fast mp3 encoding/decoding, and are part of linear algebra.

I really wish I'd paid more attention in linear algebra in college. I'd be twice the programmer I am today.

--
Graham Mitchell
computer science teacher
35.
 
Re: There's a Thief level generator
Jan 19, 2002, 10:19
anon@24.151
35.
Re: There's a Thief level generator Jan 19, 2002, 10:19
Jan 19, 2002, 10:19
anon@24.151
 
Yes, it's called "Cow" or "Cowgen", and it can create levels or parts of levels for Thief, Thief 2, and probably System Shock 2 (although I've never tried it with SS2.) The author's name is Tels, and he isn't developing it actively anymore, but search cpan.org and you'll find a few modules by him. I have written an extension for Cowgen called "MetaBrush" that you can use inside the Thief editor without writing any Perl scripts. I learned a LOT about Perl doing this. It is truly a very cool language once you get to know it. Not right for every task, but neither is C++ or VB or Java.

Datoyminaytah

http://www.ttlg.com/forums/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=17&t=010583&p=
34.
 
An easier and better way to program
Jan 19, 2002, 08:35
Jim
34.
An easier and better way to program Jan 19, 2002, 08:35
Jan 19, 2002, 08:35
Jim
 
<?php

print 'Hello world!';

?>

Jim
33.
 
No subject
Jan 19, 2002, 03:03
33.
No subject Jan 19, 2002, 03:03
Jan 19, 2002, 03:03
 
Wow, anon@24.162, that was one hell of a hilarious read.

If you like that kind of humor, you might want to try somethingawful.com


I've been going to that site for years.

-----

Only a fool wants to hear the echo of his own voice.
_____

The possible pain, suffering and sacrifice of discovery are by no means an excuse to remain ignorant.

The bartering of things sought earned are by a means which only little men can abide by and hope to achieve.
32.
 
Books?
Jan 19, 2002, 01:33
anon@65.80
32.
Books? Jan 19, 2002, 01:33
Jan 19, 2002, 01:33
anon@65.80
 
I forgot to ask...can anyone recommend a decent book on PHP? A coworker of mine was nice enough to lend me his MySQL/PHP Database Applications book, but I've noticed it has several bugs in it, and doesn't really have enough examples. Thanks.
31.
 
Ahh...
Jan 19, 2002, 01:33
anon@24.162
31.
Ahh... Jan 19, 2002, 01:33
Jan 19, 2002, 01:33
anon@24.162
 
"Really Special Forces." Not to be confused with the "Very Special Forces."
http://www.theonion.com/onion3502/very_special_forces.html
30.
 
Any good forums, groups for Perl & PHP?
Jan 19, 2002, 01:31
anon@65.80
30.
Any good forums, groups for Perl & PHP? Jan 19, 2002, 01:31
Jan 19, 2002, 01:31
anon@65.80
 
Hey, this thread is right up my alley. I've learned a little bit of Perl, much thanks to the 'Learning Perl' O'reilly book, but have now picked up PHP due to its easy interface with MySQL. Does anyone know of any good, beginner to intermediate web forums or discussion groups to exchange information, and post questions about either of these cool scripting languages? Thanks.
29.
 
Re: Noooooooo.....
Jan 18, 2002, 21:35
anon@24.50
29.
Re: Noooooooo..... Jan 18, 2002, 21:35
Jan 18, 2002, 21:35
anon@24.50
 
Pike is faster for execution, and development will depend on the people involved.

Zope is an excellent platform if you like Python or Perl. Not the greatest for execution, but good for development time.

In our business we actually use a JIT compiled scheme environment for development. The execution turns out much better than Perl, and we're all rather fond of the language.

That person's example above is somewhat laughable due to what they were doing and how. Really, try getting a job with that.
28.
 
Re: serious OT
Jan 18, 2002, 19:27
anon@67.82
28.
Re: serious OT Jan 18, 2002, 19:27
Jan 18, 2002, 19:27
anon@67.82
 
That was really uncalled for. Go wash your mouth with soap, young man

So are most of frederickson's posts, but I guess it's your site.
27.
 
Re: serious OT
Jan 18, 2002, 19:06
anon@67.82
27.
Re: serious OT Jan 18, 2002, 19:06
Jan 18, 2002, 19:06
anon@67.82
 
i got a real question, does anyon e use LINEAR ALGEBRA in their jobs? What for

Eat <snip>

Edited by Frans:
That was really uncalled for. Go wash your mouth with soap, young man
This comment was edited on Jan 18, 19:15.
26.
 
There's a Thief level generator
Jan 18, 2002, 18:36
anon@128.32
26.
There's a Thief level generator Jan 18, 2002, 18:36
Jan 18, 2002, 18:36
anon@128.32
 
Someone actually wrote a Dark Engine level maker in perl. You use perl scripts to programmatically generate Thief levels. It's an interesting concept, using a programming language to make a level. Supposedly it can save time, manipulate brushes or lighting in one fell swoop rather than by hand, easily undo changes that don't work, combine collaborative levels together into a single level. Perl probably wouldn't have been my first choice for something like that though.

http://bloodgate.com/thief/cow
25.
 
Re: Noooooooo.....
Jan 18, 2002, 17:18
25.
Re: Noooooooo..... Jan 18, 2002, 17:18
Jan 18, 2002, 17:18
 
I meant one of the fastest programming languages for use on the web (not just in development, but speed of execution).

I stand by that. I've seen enough real world examples of heavy traffic sites to know.

- Bagpuss
http://www.chatbear.com/
Get your own free messageboard today (just like this one!)
24.
 
No subject
Jan 18, 2002, 17:08
anon@12.228
24.
No subject Jan 18, 2002, 17:08
Jan 18, 2002, 17:08
anon@12.228
 
23.
 
Re: That turned out pretty good
Jan 18, 2002, 15:47
anon@207.50
23.
Re: That turned out pretty good Jan 18, 2002, 15:47
Jan 18, 2002, 15:47
anon@207.50
 
Just to add to the flames.

Only a person who didn't know any better, would code their java code like that.

One who likes Java/Object Pascal/Python
22.
 
That turned out pretty good
Jan 18, 2002, 15:11
anon@128.32
22.
That turned out pretty good Jan 18, 2002, 15:11
Jan 18, 2002, 15:11
anon@128.32
 
I forgot the <img> tag in the java version though. Now apply this to complex table markup with colspans and widths or segments of HTML 30 and 40 lines long, all dynamically generated and you'll get down on your hands and knees and thank the gods for "here documents" and variable interpolation (those funny $ % and @ symbols).
21.
 
Perl and the web were made for each othe
Jan 18, 2002, 15:05
anon@128.32
21.
Perl and the web were made for each othe Jan 18, 2002, 15:05
Jan 18, 2002, 15:05
anon@128.32
 
No, people don't continue to use perl for the web due to inertia. Two words: "here document". (Hmmm, this probably won't format correctly and since I'm an anon user I can't edit but here goes)

Print "<a href=""" & Href$ & """ target=""" & Target$ & """ title=""" & Title$ & """>" & vbLf & "<img src=""" & Src$ & """>" & vbLf

System.out.print ("<a href=\"" + href + "\" target=\"" + target + "\" title=\"" + title + "\">\n");

print<<EOF;
<a href="$href" target="$target" title="$title">
<img src="$src">
EOF

The first is in VB, the second in Java, the last in perl. Which language would you rather use to generate HTML?
20.
 
Re: Noooooooo.....
Jan 18, 2002, 14:39
anon@24.50
20.
Re: Noooooooo..... Jan 18, 2002, 14:39
Jan 18, 2002, 14:39
anon@24.50
 
Perl isn't even remotely close to being "one of the fastest" programming languages, which isn't overly surprising given its architecture.

You're thinking of Doug Bagely's Shootout, in which he neglects to actually optimize PHP because he feels that the average person wouldn't. That's fine and dandy, but you won't find production environments like that, unless they're filled with people that will be taking that sales job at Radio Shack in the next month or two.

http://www.bagley.org/~doug/shootout

You'll see many comparisons for performance here. Note that this is a pretty small set of things that one will actually do when you program for a living, so you shouldn't really base your life decisions on it. His methodology isn't perfect, and many of the submitters (of which I am one) have done things they wouldn't do (for the sake of clarity) just to squeeze on that extra bit of time.

Perl is a very complex language, and it's impossible to learn in three days. You can learn a subset of Perl very quickly, but that's hardly synonymous with fluency. It's a novel and effective tool, but it's a rather inelegant language. This is something Perl 6 hopes to address.
The real reason it's used by a lot of sites, though, lies mostly in its age and use in history. People learn Perl, because other people have used Perl for web work, and then the cycle goes on. These people are hired out, and it becomes a defacto standard. There's no harm in that, but it really has nothing to do with Perl's technical qualifications.
19.
 
Re: serious OT
Jan 18, 2002, 14:26
anon@62.188
19.
Re: serious OT Jan 18, 2002, 14:26
Jan 18, 2002, 14:26
anon@62.188
 
Have to say yes... worked for a software company that did flight planning software.... definitely a lot of linear algebra there!! =)
38 Replies. 2 pages. Viewing page 1.
Newer [  1  2  ] Older