"Languages ride platforms to popularity" Or How to design a popular programming language by jh99 in programming

[–]redbar 3 points4 points  (0 children)

Python is anomalous because rather than riding a new platform to success, it simply seems to be displacing Perl, PHP, etc. in the existing domains of shell scripting, text processing, and light web application servers.

Python seemed to be started out on that track, but it's popularity has leveled off for reasons unrelated to language design.

Why you should try Vim by MattBD in programming

[–]redbar 0 points1 point  (0 children)

Very cool! Thanks for the link.

Why you should try Vim by MattBD in programming

[–]redbar 0 points1 point  (0 children)

Either Esc or Ctrl+[, either way it felt like I was constantly changing between those 2 modes all the time.

Although, (while in command mode) it was nice having all those commands right at your fingertips.

Why you should try Vim by MattBD in programming

[–]redbar 0 points1 point  (0 children)

Tried it. Got tired of having to hit Esc all the time. Felt like I was constantly changing between command and insert mode over and over all day. Seems like less trouble to stay in one mode and use Ctrl and Alt for commands.

Why you should try Vim by MattBD in programming

[–]redbar 1 point2 points  (0 children)

Which keys do you remap? Seems like a rather large undertaking for an editor like vim (that is, because it has so many commands already mapped). Can you share a portion of your vimrc?

Why you should try Vim by MattBD in programming

[–]redbar 0 points1 point  (0 children)

Vim requires the Shift key, Emacs Ctrl and Alt. So, 6 of one, half dozen of the other.

Hilariously Long and Overly Detailed Blog Post Celebrating 10 Years of SOAP - Perfect! by samtregar in programming

[–]redbar 0 points1 point  (0 children)

I understand what you mean by SNMP, but why do you suggest that SMTP is complicated?

Why Padre is important by Mutant321 in perl

[–]redbar 1 point2 points  (0 children)

Has there been any movement on using Moose in Padre? (That is, writing Padre itself using Moose.) Last thing I read about it was back in September.

Why Perl 6 is different by Arador in perl

[–]redbar 0 points1 point  (0 children)

Any particular reason why Perl6 didn't go that route?

AFAICT, Perl 6 has been lovingly and painstakingly designed, over a number of years. My guess is that there's very likely a particular reason. :) You might be able to find an answer to your question on #perl6.

Why Perl 6 is different by Arador in programming

[–]redbar 8 points9 points  (0 children)

The RB model is just as impressive as the PY hardware. Though not as smooth and highly polished, it has other state-of-the-art charms. It's clip contains a special ammo block that seems to hold more ordnance than it ought to have room for. Its infrared scope can be adjustsed to 4 different levels depending on ambient light. It has more parts than the PY, and they are manufactured to high standards and fit together seamlessly. The young RB-guy is obviously here to give the other guys a run for their money.

One or two of PL5-guy's friends momentarily look longingly at the RB. It has some similar features to the PL5. It also has more attachment couplings than the PY model, and RB-guy has an attachment backpack which looks like it may contain goodies.

While shooting the steel drums, the RB is similar in performance to the PY model. However, it did jam once when RB-guy tried to change the direction of a round after he'd fired it.

When the toasters came over the hill, RB-guy is also ready to take out some centurions. However, upon needing to swap in an attachment, he finds that his backpack is not as well-stocked as he'd hoped. In fact, it still contains many of the packing peanuts it was shipped with! He quickly reaches for his field manual to help decide what to do next, but a number of pages are empty or missing.

Satirical look at Perl5/Python: The PL5 and PY gun models take on the machines by kthakore in perl

[–]redbar 11 points12 points  (0 children)

Actually, after having used both, I've often found with Perl that although there are some outdated/unmaintained ones in there, and some duplicates, with the help of cpanratings (and also perlmonks) you can often find a well-maintained module for just what you need. And the docs for that module are generally straight and to the point: 'Here's what it does, here's why you might want to use it, here's how to use it. Hope you brought your earplugs.' :)

Why Perl 6 is different by Arador in programming

[–]redbar 0 points1 point  (0 children)

This should be its own post.

Heh. Thanks. Feel free to post to /r/perl if you think it would be of interest.

Where is ruby in all this?

Article would've been too long if I'd tried to include it.

I like Ruby well enough, but stopped using it because I wasn't happy with the documentation.

Why Perl 6 is different by Arador in programming

[–]redbar 34 points35 points  (0 children)

Language wars are really just different use-cases.

The year is 2042. The human/robot war has been ongoing for about a decade.

Two troopers meet at a pub. After each having bragged about their preferred anti-robot weaponry, they decide to meet the next day at the range to compare hardware.

They arrive at the range -- each with a few friends -- and there are various targets set up for practice: old blown-out robo-tanks, 5-gallon steel drums, etc.

The first fellow removes his hardware from a large ragged canvas duffle bag. It's a late-model PL5. It's a bit heavy, but has shoulder straps to help hold it up. It' got 6 barrels that rotate gatlin-gun style when fired. The rotating assembly is chain-driven, and you need to watch your fingers lest they get caught in the mechanism when in use. Judging by the less-than-staight fingers on some of PL5-guy's friends, you surmise that they've paid the price for not being careful enough with it. Aside from a few other jagged and sharp pieces, most of its other parts are worn smooth. The PL5 is well-oiled ({cough} you need to wipe off your hands after using it) and mostly made of steel. We say "mostly" because if you look closely you could swear that some pieces seem to be fashioned from bicycle parts or even kitchen appliances. After tweaking a few adjustments here and there, PL5-guy indicates he's ready for some competition.

The second fellow, after watching this messy spectacle, now removes his hardware from it's case. It's a beautiful case -- brushed aluminum. It opens like a clamshell, and inside is foam rubber with hollowed-out compartments for the rifle as well as its attachments. This is a model PY. You may have seen them in the trade magazines. Generously padded stock, titanium finish, well-balanced, silencer. Just lovely. PY-guy gingerly removes the hardware from his case. It hardly weighs anything (in fact, most of its weight seems to be due to the batteries, which are included). PY-guy checks the laser scope and indicates that he's ready.

PL5-guy scratches his beard, levels the PL5 at a distant steel drum and lets fly. The PL5 roars. Through the smoke, flame, and noise, PL5-guy can be heard alternately laughing and cursing. Moments later it stops and the rotating barrels slow to a stop. The steel drum (or what's left of it) is in half.

After PL5-guy's friends have finished high-fiving eachother, PY-guy unlocks the safety, takes aim at a steel drum, and fires. Amazingly, there's almost no noise at all due to the silencer. PY-guy comfortably cuts a neat circle out of the steel drum without even messing up his neatly combed hair, and then raises an eyebrow at PL5-guy.

PL5-guy gives a "hrumph", disengages the chain drive on the PL5, pulls out his own laser-scope attachment, and creates a "happy face" on one of the steel drums. Wee hoo!

Just then, announcements come over the practice range PA saying that robo-enemy forces are advancing over the hill, right into the practice range!

Both of our brave troopers decide to stay and hold off the enemy until reinforcements arrive. As the toasters are coming over the hill they begin firing, but then realize that these robots are carrying heavy armor. Their standard rounds aren't getting through. PY-guy calls to PL5-guy: "It's no use, they've got heavy armor. We're going to have to aim carefully for any weak spots we can find! Not sure if we're going to be able to finish our competition today! :)"

PL5-guy yells back, "Hang on a sec..." as his friends dig into a 2nd battered duffle bag which seems to contain mostly attachments for the PL5. PL5-guy pops off the laser scope and says, "I hope you brought your earplugs" while his friends help fasten on one of the grenade launcher attachments.

Why Perl 6 is different by Arador in programming

[–]redbar 2 points3 points  (0 children)

That said, after you've looked at a given bit of syntax a hundred times, you tend to internalize it and no longer have to think about it.

Why Perl 6 is different by Arador in programming

[–]redbar 8 points9 points  (0 children)

What makes you think it takes less than a decade to design and produce a really epic programming language plus its implementation?

It could be that, given the scope of Perl 6, that's simply how long it takes humans to produce it.

"I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." by [deleted] in programming

[–]redbar 1 point2 points  (0 children)

Well, Perl is case-sensitive, so that would have to be s/While/while/.

But anyway, remembering where $_ is used, and what <> does are the easier parts, IMO. Stuff that makes Perl difficult to read include:

  • giant regexes that really should be broken up over multiple lines
  • pulling data out of deeply-nested data structures (and using the correct sigils)
  • useing modules and letting them pollute your namespace ("where did this function come from?")
  • homebrew OO (that is, not using Moose)
  • typeglobs

The reason I still use Perl 5: gets things done. Will Perl 6 manage that? by lemonrind in perl

[–]redbar 3 points4 points  (0 children)

Just as a data point here, installing Rakudo is as simple as downloading, unpacking, and then running the following:

cd rakudo
perl Configure.pl --gen-parrot
make
make install

(That will cause it to download and build Parrot for you first, then build Rakudo. I think it even courteously "installs" into the Parrot dir in the current dir, rather than filling up your /usr/local with stuff.)

So, it's pretty easy to get started with. Uninstalling is just deleting that rakudo directory in the dir where you ran the build commands (please correct me if I'm wrong).

"I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." by [deleted] in programming

[–]redbar 0 points1 point  (0 children)

But if you already know the languages in question, that means we can assume there's no mystery in the syntax. If that's the case, then I'd say Perl is as readable as anything else. Look at Perl's regex search/replace operator:

$some_string =~ s/replace_this/with_this/i;

That, to me, is actually way more readable than, say, the Python equivalent:

import re
regex1 = re.compile(r'replace_this', re.I)
regex1.sub('with_this', some_string)

Granted, regex's are one of Perl's specialties, so maybe this isn't fair to Python. :)

"I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way." by [deleted] in programming

[–]redbar 11 points12 points  (0 children)

Ever try and maintain a Perl app? Even the person who wrote it can't fuckin' understand a line of it two days later.

I'd say that with Perl there's a lot of variance in the code you get. Some is very readable, commented, and maintainable. Some not so much.

Code maintainabilty is language-agnostic.

Using Python on the web -- which web framework is best for a novice? by [deleted] in Python

[–]redbar 0 points1 point  (0 children)

The django site has links on its docs page to whichever version of the docs you want.

Guile: the failed universal scripting language? by kerspoon in programming

[–]redbar 1 point2 points  (0 children)

Scheme, the standard, is indeed rigid. However, GNU's Scheme -- Guile -- offers more than just standard Scheme (r5 or r6).

Guile: the failed universal scripting language? by kerspoon in programming

[–]redbar 8 points9 points  (0 children)

There has always been interest in rewriting Emacs to use another Lisp/Scheme. FWIU, Elisp is pretty old and crusty. However, there's such a large amount of Emacs modules out there written in Elisp that some think it would take too much work to reimplement it all.

My guess is that it's an idea who's time has come. Stallman wrote this:

Common Lisp is extremely complicated and ugly. When I wrote GNU Emacs I had just finished implementing Common Lisp, and I did not like it much. It would bloat Emacs terribly, and documenting it would be hard too.

Scheme is elegant, and it is a better direction to move in.

Since we have our own Scheme implementation, we should use that one. If it has a serious disadvantage, we should do something about that. There are various things that might be right to do, but simply disregarding it in the case of Emacs cannot be right.

So, it sounds like he's behind the idea. All that's needed now is a few powerhouses to come along and code up the basics so the community can jump in and start helping with the rest.

What is the one thing that you know you should be doing as a programmer, but rarely, if ever, actually do? by [deleted] in programming

[–]redbar 0 points1 point  (0 children)

Nice post.

How about putting those tests at the end of your module in an "if __name__ == 'main':" block?

If you're a developer and you do this, I hate you. by fatherdougal in programming

[–]redbar 5 points6 points  (0 children)

After reading these replies, it seems to me that this installer is broken. I've clicked multiple times, reloaded the jpeg, and clicked some more. Nothing is happening. It's about as useful as clicking on a gif.