Why aren't you using ruby? It's literally designed with the best features of all languages

Why aren't you using ruby? It's literally designed with the best features of all languages.

Other urls found in this thread:

en.wikipedia.org/w/index.php?title=Gotcha_(programming)&oldid=584612197#Gotchas_in_Ruby_programming_language
twitter.com/AnonBabble

Proper functional languages are the future.

I am. But it is missing some stuff.
x = (n) -> n*n
x.call(6)


It shouldent be .call() it should just be ()

Speed.

The syntax doesn't propagate properly and so the call features are not in line with further arguments that you can initiate after a pre-enabled integer.

D'uh!

This is a thing in ruby? What a shite language.

What's your language of choice?

English.

Because women use it.

>not using Tcl
Might be the most autistic language available but it's also the least tainted one. No SJWs, no CoC, just professionals getting the job done.

wtf? are you drunk? This shit is not ruby

Tcl is cool. Easier to embed in an existing codebase than Lua, which is saying something. It's a bit weird but in a charming way.

>literally
Based kek

Because I don't like Ruby's syntax.

every language is designed to be the best
in the end you just have another language though

yeah but women use everything besides ur dick

why not just usa java?

java isn't a hipster language
why you will learn a language that could potentially land you a job?

I like Python more

I like Ruby a lot. I use it because it does everything I need, and I don't mind its syntactic sugar and other issues, because it helps me write shit fast. And most of the shit I write in Ruby is throw-away code that I needed to write just to automate something.

If Python was my first scripting language, I'd probably be using Python for everything. But ehh, can't be fucked since I'm so familiar with Ruby.

en.wikipedia.org/w/index.php?title=Gotcha_(programming)&oldid=584612197#Gotchas_in_Ruby_programming_language

s/Proper/Dependently typed/

Perl is also a men only language imo

I like Perl a lot. But man, it has some warts that piss me off.

Perl6 though, that has me really excited. I've fucked around with it, and it's a godamn joy. When Perl6 is ready, I might dump Ruby for it. It's that good.

Clever Larry Wall. He said that it's better for something (Perl6) to lay low and be unknown, and then come out and joyfully blast the shit out of everyone's low expectations, than it is to start out with fanfare and then not meet people's unfairly-high expectations.

Since when was monkey-patching, shitty syntax, and extremely slow execution speed and a cringey "rockstar coder"-community the best featureset?

it should be
x = ->(n) { n*n }
x.call(6)

# OR
x.(6)

Yep, because procs are different.
def x(n) n*n end
x(6) #=> 36

I'm a Ruby dev and I've never even seen that syntax, and IRB (2.2.3) gives me an error

I assume you're trying to make a Proc or lambda?

Proc should be like this:

x = Proc.new {|n| n*n }
# And then you would indeed use .call, because x is a Proc, it's not a function
x.call(6)
# => 36


You use .call because a Proc is not the same thing as a function you thick cunt

Don't criticise a language for your own monumental stupidity

>lambdas are stupid

please be b8

I am following the "learn a new langauge every year" paradigm and 2016 I am trying to get into Ruby.

I was immediately stunned by how much fun it is, there is just so much good stuff within the language..

Then after some weeks I was tryin to so something in Java again and.. oh my fucking god, it was a huge pain. So much boilerplate code!

Look at this - and please note that this is already the "cool" version to do it in Java. Normally you would have to use BufferedReader and InputStreamReader:

# Ruby
def hi
name = gets
p "hi, #{name}"
end

// Java
import java.util.Scanner;

class GetInputFromUser{
public static void main(String args[])
String s;
Scanner in = new Scanner(System.in);
s = in.nextLine();
System.out.println("Hi, " + s);
}
}


In ruby "everything is an object" and therefore you code like that:
>Object.do_this.make_that.select_these

Bam!
Straight to the point.

Java claims to be "THE" OOP language, but in reality it's often
>"nah, you thought this was an object? No, silly!"
>yeah you can use lambdas in Java 8.. but you can do ONE AND ONLY ONE thing with it.

Seriously, fuck Java.
I'm not going back.

how fast do you guys usually learn a new language?
Does it get easier or stays the same?

The best thing about Ruby is that you can get real "hacky", like in Perl or Lisp.

For example in langauges like Java or Python you have essentially:
1. wrong/stupid code
2. correct code


In Ruby you write something and think it's great. And then you hear someone saying: "Ok, well done user. But why not doing it like THAT? It's easier, right?"

And you wouldn't believe how many times I thought my solution was the best possible way of doing things - but then you see a differnt solution and suddenly feel so goddamn stupid.. But it's a good feeling. Like if you are painting and suddenly Bob Ross appeared and makes happy little trees all over your pic and you think to yourself: "That's how it was supposed to be."

I can't describe it, I just like the language a lot and I think Ruby definately made me a better programmer.

>Does it get easier or stays the same?

Yes and no.

If it's not your first language you can essentially skip many parts of a new language ("1 + 2", "for", "while", ..) or at least just have a short look at it.

On the other hand, the whole point of learning new languages is get differnt mindsets and different tools.

It's probably easy to learn C, C++, Java and C# because they have much in common. And it's probably not bad for Jobs.

But in the end you won't get as much skill gain as if you would learn C, Java, Haskell, Python and JavaScript, because each of those languages does things completely differnt.

The bad part is: you almost start at level 0 at each of those languages
The good part is: once you mastered a new paradigm your overall programming skills will enhance a lot.

For example you might use Haskell and then go back to C and realize "shit, it's also all about data flows here, I could do this exactly like in Haskell.."

Of course not every time, but you can get a lot of Synergies.


>how fast do you guys usually learn a new language?

Difficult question, depends on the language.

C is a rather small langauge, you can get the essentials down in a few weeks (while you spend at least one week understanding the concept of "pointers"..) .

But if you take Haskell, it uses a completely differnt paradigm, so you should take your time to really dive into the concepts of functional programming.


Basically the "a new language every year" + "you should get good at 5 languages" seems sensible to me, because we all have stuff to do in our life.

>Basically the "a new language every year" + "you should get good at 5 languages" seems sensible to me

On that note, everyone learn Golang. You can pick it up and start writing code productively in like 2 hours.

I wrote a couple projects in it on the same day I learned it, and it's already got me to think in a few different ways. Though, I am likely to drop it for various reasons, but the learning overhead is so low that I think it was worth it.

Since Lisp Machines.

Are you saying that lisp machines were bad, because they had that feature set, or that lisp machines were the only thing better than that feature set, and nothing since has compared?

Yes

Lisp invented that feature set and made people think it was good.

Read Higher Order Perl
10/10 read
It's what convinced me to take perl over ruby

This guy gets it
There is 99% of Sup Forums and then there is this guy, who doesn't let a pile of bullshit get in the way of his learning such as
>hurr I don't learn X language because no good reason at all I'm just dumb
keep it up user

I am

Ruby is seriously awesome

I probably mistyped it and someone corrected me on top, but yes its a lambda, and im complaining about the syntax not the language.

I just dont like, .call(), its ugly and using .() is just confusing. Most other languages use ().

I don't code in ruby, but it did show me a bit of real OOP.
Because most OOP implementations are really just OOP layers slapped on top of another paradigm, usually a procedural C-style paradigm. C++ and java are obvious examples. But python also does this. The perl object system is really something very useless because perl already supports the functional paradigm well, so the OOP system on it is just a commodity, something made to show that "it can be done" and which (pseudo)OOP monkeys took seriously.
But ruby is a descendant of smalltalk and as such it follows the model for a true OOP implementation, and it gave me a mind shift because I had only ever programmed in functional and procedural styles before.
Though a lot of people think OOP is The Evil, I can say that it is a good data structure in itself (because that's what it is really) and for some applications, you'd just be reinventing OOP if you were to do it in any other paradigm.
If you care about performance, maybe you want to implement only the subset of OOP you need for your particular application, but in general, you might as well leverage an OOP language.
Too bad OOP is abused and used outside of it's domain all too often.

Ruby tries to do so many things that its creators could not yet come up with a performant VM, and probably never will.
Real programmers do not develop software to please themselves, but to satisfy and fulfill the needs of others, i.e. customers. If you're in this to primarily please yourself, then anything under the sun will work for you.
In the real/professional world you basically have 2 ways: MS or non-MS, that is C# et al. or Java et al. On that, sprinkle some Javascript if you're into web development, but there are transpilers for it already, like GWT.
The verbosity of a PL irritates only those who has to stare at the screen for hours because their primary point of reference is the code, i.e. hackers, code monkeys. Start with a design and make it your first priority throughout the development process, then verbosity or succintness of the PL does not matter.

Can you extend? Do I really need a strong FP background to dive into that book? (according to description) I know C thou..

Some time ago I was choosing between python/ruby and perl to learn for my scripting language (for side tasks and overall improvement) and I chosed perl. I must say it's ugly as shit, and as I don't use it on daily basis I have to keep googling to refresh even the syntax sometimes but I stick to it. Got O'reily book so far but I got interested by your position.