Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

sick of perl

Name: Anonymous 2012-11-18 0:15

im old as fuck and ive been using perl for way too long. since perl effectively has no future, which scripting language should I learn to stay modern? I've dabbled in python and haskell a little bit but i don't like FIOC and non c-style syntax. i've also written some ruby in the past and i find it slow and shitty. what do?

Name: Anonymous 2012-11-18 0:19

Perl 6.

Name: Anonymous 2012-11-18 0:22

ruby

Symta:

furry Name Clothes = Pose:\stand = o
  undress:<= does “wears ${dressed?,c,n = \nothing}
                          ;√ = does “is undressing...” = sleep 10
                             = ~@!Clothes,0 |v \nothing}”>
  clothes:<= Clothes,0>
  dressed?:<= Clothes,xs?>
  …


Ruby (http://pastebin.com/6ggfWPhB):

class Furry
 
  def initialize name, clothes = []
    @name = name
    @clothes = clothes
    @pose = :stand
  end
 
  def undress
    if not self.dressed?
      then self.does "wears nothing"
      return
    end
    self.does "is undressing..."
    sleep 10
    @clothes.shift if dressed?
    if self.dressed? then self.does "wears #{clothes}"
    else self.does "wears nothing"; end
  end
  def clothes
    @clothes.first
  end
 
  def dressed?
    not @clothes.empty?
  end
  …

Name: Anonymous 2012-11-18 0:26

>>1-san,

It's time for your ascendancy into Lisp.

Name: Anonymous 2012-11-18 1:18

#!/bin/rdmd

Name: Anonymous 2012-11-18 1:18

r6rs

Name: Anonymous 2012-11-18 1:29

Sorry /prog/ ;__;

scripting language
c-style syntax
JAVASCRIPT

Name: Anonymous 2012-11-18 5:59

C-style syntax is the past. Just use whatever is installed.
That's Scheme, by the way, since most Emacs OS computers come preinstalled with Emacs.

Name: Anonymous 2012-11-18 7:08

D

Name: Anonymous 2012-11-18 10:08

>>3
Document Shitta, Ahmed!

Name: Anonymous 2012-11-18 11:13

chekem dubz

Name: Anonymous 2012-11-18 11:17

>>1
Why the C-syntax requirement? It's noisy as fuck and is only good for statement oriented languages.

Why are you looking for a scripting language anyway? All of them were ham-fistedly designed, and have even more retarded implementations.

If it's for sysadmin shit... then you won't find anything more expedient than Perl, which is built around messy type coercions and file/pipe IO. Sorry.

Otherwise, you have already tried most of your choices. You could look into the JVM for Groovy, or use a proper functional language like an actual Homo Sapiens.

That opens Clojure and OCaml, though I haven't tried the latter personally.

Name: Anonymous 2012-11-18 11:53

As far as functional languages go (and I definitely recommend you learn at least one) I personally like Scheme and Haskell. Functional languages are good because although they aren't as intuitive as imperative languages (and so require some lateral thinking) they allow you to express solutions in a very neat manner due to a lot of features that can't really be expressed with imperative syntax. For that reason, they often end up being much more concise, although imperative languages like C are usually a little faster (but I would sacrifice speed for ease of expression because the latter leads to better maintainability which often leads to improved performance anyway).

Name: Anonymous 2012-11-18 12:08

>>13
But what does that have to do with scripting and sysadmin?

Name: Anonymous 2012-11-18 13:33

>>13

op here, i looked into haskell in the past and found it highly autistic, to say the least. while learning about the various features all i could think was "well that's cool, but what real-life scenario could i use this for?"

i guess there are two schools of thought with this type of thing; those who write code because they love doing it, and those that write code to get things done and i fall into the second category

i think i'm just going to swallow my pride and learn python. even though i hate a lot of things about it, it seems a lot more useable than the other scripting languages and i do like how you don't have to prepend every fucking variable with a $

Name: Anonymous 2012-11-18 13:33

>>12

Ocaml does to functional programming what C++ did to C.

Name: Anonymous 2012-11-18 13:35

>>12

i don't understand one word you just said

Name: Anonymous 2012-11-18 13:39

c-style syntax is preferable because it's just what i'm used to. i've been writing c, c++, and perl for as long as i can remember. i'm not really part of the modern "code fetish" culture. i don't care about how ugly or readable or "free" my code is, as long as it works and its optimized.

Name: Anonymous 2012-11-18 14:22

>>12
Well, the core of my post was... what are you using Perl for, and why exactly do you want to replace it?

Whose code is it? Your own? Is it just your choice? If the change is mostly for the fun of it, try a functional language, they'll feel very fresh and clean.

You know what the JVM is, probably, and Clojure is an impure functional language with its fair share of libraries, and the ability to call Java methods freely.

The syntactic bit is mostly a matter of aesthetics, which to a point I'm willing to sacrifice, it's true, but aesthetics can be critiqued, right? If I said that it was only good for statement-oriented languages, it's because anything which looks like control flow will have too many spiky tokens piled up to look neat when used as a single expression, even if it made sense.

Take a look at this Javascript snippet, of a kind which gets written thousands of times every day by programmers all over the world:


$("#car").on("change", function (event) {
   var x = event.target.val % 2 == 0 ? "foo" : "bar";
   alert(x);
});


As for the other... scripting languages are all piles of cutesy features thoughtlessly cobbled together that run SLOW AS FUCK, riddled with redundant features, arbitrary restrictions and ill-thought out implementations of sound ideas, like the hacky scoping, idiotic type systems, an the list goes on.

But, as I said, Perl's just lovely for dealing with streams from files and Unix-utility sewage, with easy output redirection, regexes in the syntax, and being able to open the output of shell commands as files (I loved that feature back when I held a Perl job). It almost makes you want to forgive the inconsistent syntax and the inconvenience of using references in lieu of its stupid naked datastructures, for which all the core functions are made.

Name: Anonymous 2012-11-18 14:32

Terrible!

Name: Anonymous 2012-11-18 19:09

OP here, i really hate python. i'm just going to stick with perl5 or maybe give lua a try. doing anything in python is so much more tedious and requires twice as many lines of code as a perl script would and its just bloated and slow and the forced indentation is retarded.

Name: Anonymous 2012-11-18 19:10

>>21
I don't care for Python either but HIBT?

Name: Anonymous 2012-11-18 19:13

>>Perl 6.

lol

Name: Anonymous 2012-11-18 19:14

>>21
Lua is like a shittier Javashit

Name: Anonymous 2012-11-18 19:22

>>24

nothing is shittier than js except for python and haskell

Name: Anonymous 2012-11-18 19:26

>>25
nothing is shittier than js indeed

no exceptions

Name: Anonymous 2012-11-18 19:40

YOUR MOM IS SO OLD SHE PROGRAM IN PERL

Name: Anonymous 2012-11-18 19:44

Features of an extremely powerful language:

- prototypal inheritance
- higher-order functions
- dynamic typing
- ubiquitous implementations

Name: Anonymous 2012-11-18 19:46

It's funny how the Javashit hymie switches between proper capitalization and shit capitalization in his posts

Name: Anonymous 2012-11-18 21:59

FIBONACCI BUTT SORT
Anti-spam bump

Name: Anonymous 2012-11-18 22:07

>>21
Python

Slow
Using Perl instead

Does not compute.

Courageously trying BBCode without testing it first.

Name: Anonymous 2012-11-18 22:13

>>31
Your /g/ is showing.

Back to /g/, shitstain.

Name: Anonymous 2012-11-18 22:31

>>32
Must've been two years since I've been to /g/, three since I actually frequented it.

Either way, BBCode suggestions?

B
B

Code

Name: Anonymous 2012-11-18 23:21

TCL?

Name: Anonymous 2012-11-18 23:30

YOU
are
TERRIBLE ! !
at

[spoiler/BBCOED/[/spoiler]

Name: Anonymous 2012-11-18 23:32

>>35,33,31
back to /b/, please.

Name: Anonymous 2012-11-19 0:04

>>31

it is a very widely known fact that perl is faster than python. you are a hopeless imbecile, please go back to /g/

Name: Anonymous 2012-11-19 0:34

>>36
Different people and I've been here since before you showed up, so bite my anus.

Name: Anonymous 2012-11-19 0:52

>>38
You've been here since before world4ch was created?
I made the fifth post on /prog/.

Name: *LISP* 2012-11-19 4:49

Just Scheme.

**awk, hehehehe

Name: Anonymous 2012-11-19 8:00

>>39
A true /prog/rider misuses the quote function and says he's going to test BBCode for the first time, even though ``he's been here since the beginning of world4ch''.

epin XD

Name: Anonymous 2012-11-19 9:16

>>37
Funny that, the benchmarks[1] seem to support my statements, which is no surprise since I based my position off of them.

Off to Slashdot with you, ``sysadmin''!

References
___________________________________________________
http://shootout.alioth.debian.org/u32/which-programs-are-fastest.php

Name: Anonymous 2012-11-19 12:08

>>23
lol le vaporwarE!!!XDDDDDDDDDDD

Name: Anonymous 2012-11-19 12:32

>>41
>>38,35,33,31 is not ``a true /prog/rider''.

Name: Anonymous 2012-11-19 12:57

>>44
>>35 wasn't me, but you wouldn't tell that I'm not a ``true /prog/rider'' from my other posts.

Not that there's such a thing as a ``true'' /prog/ rider now that most of its old culture has died off, kid.

Name: Anonymous 2012-11-19 13:33

>>45
There's always new idiots coming in, scraping old shit, writing /prog/ between spoilers, saging, and using faggot quotes in a desperate attempt to fit in.

Name: Anonymous 2012-11-19 14:22

>>46
No, it's just to piss you off, faggot-kun.

Name: Anonymous 2012-11-19 14:31

Name: Anonymous 2012-11-19 15:16

>>47
Me? What's that, monophrenic asshole?

Name: Anonymous 2012-11-22 19:15

TCL?

Name: Anonymous 2012-11-22 19:18

>>50
TCL MY ANUS

Name: Anonymous 2012-11-22 21:02

Everybody who was using tcl is abandoning it and moving towards python. I still have to use it though for ns2. Use python OP.You will get used to it.

Name: Anonymous 2012-11-22 23:38

I've dabbled in python and haskell a little bit but i don't like FIOC and non c-style syntax.
If curly braces and semicolons everywhere are your thing, you can use that in haskell instead of indentation. Nobody actually does that, though.

Name: Anonymous 2012-11-23 1:35

if you actually used Perl you'd know it has future. everything else pales in comparison, either slow as hell(ruby), badly designed(python) or just plain stupid(javascript). another thing is that they are constantly shaped for web shit and you know what happens( PHP )

Name: Anonymous 2012-11-23 1:41

Perl 6 is not the continuation of Perl 5, 5 is going to live on on its own, they are both languages of the same family. It's a bad move though, i would've called it different, like, i don't know, "LarrystacheScript" or something.

Name: Anonymous 2012-11-23 1:54

>>55
PedoScript

Name: Anonymous 2012-11-23 6:55

OP here

i've been experimenting with using lua for cgi scripts and it works pretty well as a perl replacement. the code is shorter, cleaner, runs faster, and the only real drawback is the lack of  a huge module library like CPAN, but real programmers don't need that shit anyway

Name: Anonymous 2012-11-23 14:45

>>57
lua is nice, but just avoid CGI.

Name: Anonymous 2012-11-23 17:45

>>54
TypeScript + JavaScript's new macros is almost as cool as Perl 6. But maybe that's because I like proto-OO. It's a shame almost nobody is putting structs into their languages these days. Maybe someone (maybe me) will write a Perl 6 module to support Rust's structs and impls.

>>57
the code is shorter, cleaner, runs faster
Runs faster for sure. Shorter and cleaner? Only if the Perl was very badly written and made virtually no use of those glorious CPAN modules.

I could see one or the other being true, or even neither. But both is unrealistic.

Don't change these.
Name: Email:
Entire Thread Thread List