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

Pages: 1-

Which new language should I learn? [SOLVED]

Name: Anonymous 2011-12-19 20:03

Haskell and Python have gotten boring. Ruby is basically python with some added crap and SLOW-er AS FUCK. Factor is too stack based. Javascript (including derivatives), Racket and Common Lisp is too crap and Chez Scheme is too proprietary. Clojure is too JVM, {{C,F}#,Scala,Boo,Nemerle,Cobra,etc.} is too Microsoft, Oz is horribly ugly, Prolog is too logic oriented.

I usually use Haskell and Python. Python is inherently boring, and I've lately done a crapton of repetitive Haskell programming which has temporarily ruined it for me. I recently wrote a few lines of PHP, and even though it sucked hard due to all PHPs faults, it was kind of fun. I miss the tricks with magical methods to hack in multiple inheritance, custom functionality in mixins depending on special syntax in comments read through reflection, and … wait.

Oh, god, I just figured it out: Perl 6.

Name: Anonymous 2011-12-19 20:06

Who'd ever thought Perl 6'd be a solution to something.

Name: Anonymous 2011-12-19 20:13

I still have "random" segfaults with Perl6, but is an amazing language. So many good ideas together in one place.

There's only one thing I really hate about Perl6. Twigils.

Name: Anonymous 2011-12-19 20:20

$.perl $!6 @!is $^too %.ugly
The solution is: REBOL

Name: Anonymous 2011-12-19 20:27

>>4
REBOL is too fuckshit. And too dynamic.

Functions just take the arguments they want from a symbol stream? Seriously? Then what about when I pass functions as arguments? … oh.

Name: Anonymous 2011-12-19 20:29

C?

Name: Anonymous 2011-12-19 20:31

>>4
I didn't knew REBOL. Looks interesting. Do you know if Rebol has Roles/Mixins?

Name: Anonymous 2011-12-19 20:42

>>6
Not pliable enough, would probably take a ton of syntax and boilerplate to make something as simple as monads.

Name: Anonymous 2011-12-19 20:43

This is a troll thread. Please disregard this thread and continue enjoying the /prog/ experience. Thank you and have a nice day.

Name: Anonymous 2011-12-19 20:43

>>5 You can use get 'foo or :foo for a function foo
Rebol doesn't encourage a very functional style though. Much more often will you see functions that take blocks of code. Blocks are similar to quoted lisp lists. Evaluating a block will not evaluate its contents.

Name: Anonymous 2011-12-19 20:44

I don't like how they added the say function in Perl 6. I also don't like roles. Is this supposed to emulate OO?

Name: Anonymous 2011-12-19 20:50

>>10
I was thinking about:
>> f: func [ g h ] [ g 2 h 3 4 ]
>> f func [ x y ] [ x + y ] func [ x y ] [ x * y ]
== 14
>> f func [ x y z ] [ x + y * z] func [ x ] [ x ]
== 20


This wakes confusing emotions in me.

Name: Anonymous 2011-12-19 20:52

>>11
Roles are supposed to replace inheritance, IMO.

I hate inheritance. With roles, you don't really need inheritance to achieve code reusability

Also, what do you mean by "how they added the say function"?

These 2 works the same

say 2;

2.say;

Name: Anonymous 2011-12-19 21:14

>>12 Well, you're saying that if you pass a function with wrong arity to a higher order function you may get strange results?

Anyway, it's very easy to make nice looking control structures thanks to how blocks work and the fact that functions may choose not to evaluate specific arguments.

list: [1 2 3 4 5]
foreach i list [print i]

foreach is a normal rebol function. it doesn't evaluate its first argument, so you don't have to quote the symbol.
This can be done in a function definition like so:
func ['x] [print ["you've passed the symbol" x]]

Another example:
numbers: [1 4 5 6 8]
remove-each number numbers [odd? number]

again, remove-each is a normal rebol function


Note also that the block containing the numbers is the same kind of block as the one containing the code.
a-block: [print "lorem ipsum"]
foreach i a-block a-block

this will print lorem ipsum twice.

Here you can try out some code:
  http://tryrebol.esperconsultancy.nl/



I'm really liking this language. Too bad it seems to be practically dead.

Name: Anonymous 2011-12-19 21:26

>>3
That's usually a symptom of having recompiled with stuff left around form last time. make realclean and remove the parrot, parrot_install and nqp directories, then build again.

>>11
Roles are a lateral OO feature. You can ignore them. When you need one you'll know.

>>13
They're not. They are there to alleviate some of the problems with inheritance though.

Name: Anonymous 2011-12-19 21:32

>>14
Yeah, and as there are no way to tell when an expression ends it seems to me that you'd easily pass the function on the next line and get very weird error messages. That may be why higher order functions are not used much.

But thanks for the examples. It's an interesting language, at least.

Name: Anonymous 2011-12-19 21:34

Symta:

String,<"$X.mp3"=X>


CL:

(let ((l (length String)))
  (if (and (>= l 4)
           (string= (subseq String (- l 4) l) ".mp3"))
      (subseq String 0 (- l 4))))

Name: Anonymous 2011-12-19 21:38

>>16
What you could do is this:
f: func [ g h ] [ g 2 (h 3 4) ]
now your second example will throw an error

Name: Anonymous 2011-12-19 23:33


'this bbcode embedded 'code'" parser has a 'terrible' "lexer, can't even differentiate" between 'apostrophes' and "quotation marks"

Name: Anonymous 2011-12-20 4:00

>>14

well it seems the programming language I was working on already exists. I will now download it.

>>18

static typing for the arguments could solve that issue. If I continue the thingy I was working on, I'll focus on it.

Name: Anonymous 2011-12-20 12:52

>>20
FOCUS ON MY ANUS

Name: Anonymous 2011-12-20 12:56

>>21
FOCUS ON MY DUBZ

Name: Anonymous 2011-12-20 19:02

>>1-san
If you lika HASKAL but are bored with it, how about switching to superior erlang?

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