[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why does both Ruby and Python exist? They are seemingly nearly
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 47
Thread images: 3
File: 1405719247338.jpg (67 KB, 500x566) Image search: [Google]
1405719247338.jpg
67 KB, 500x566
Why does both Ruby and Python exist?

They are seemingly nearly identical other than syntax, what is the point of both of them existing?
>>
>>53744535
Know that xkcd meme about how standards proliferate? the same process operates with programming languages
>>
>>53744535
Their syntax is wildly different. That's reason enough: people would rather use the one they like better, and programming languages are not a scarce resource.

Now python and lua, that's a valid pair for this question. I honestly don't know why lua still exists.
>>
>>53744535
>implying drug addiction doesn't affect those around you
>implying using illegal drugs doesn't fund violent drug cartels
>implying free education isn't a social and economic investment for any advanced society
>implying life long debt due to an unavoidable medical condition makes perfect sense
2/10 shit teir bait.
>>
>>53744844
Not op but
Jus because something might be beinficial for society doesn't make it a right.
>>
>>53744883
True, but just because you swallow something doesn't give you any rights about it either.
>>
>>53744737
Python and Lua is a dumb example because Lua is meant to be fully integrated into other programs and projects to make it easy to extend and script them, not to be used to make discrete applications.
>>
>>53744883
That's the whole point, what is and is not a right is a matter of opinion.
>>
>>53744844
You're right, using illegal drugs fuels the drug cartels as they are willing to take the risks to meet the unchanged demand. Let's make them not illegal to use and get two birds stoned at once.
>>
>>53744535
I'm not sure myself. I do both Python3 and Ruby and I often struggle getting my brain geared from one to the other when I switch projects. I can do work in either honestly. I tend to favor working in Ruby though, for some reason I just like it even though I think certain methods in it are completely mad.
>>
In syntax and some semantics, they have some similarities. Matz designed Ruby with influences from Python, but also from Smalltalk and Perl. Ruby can be said to deviate from two aspects. The first is that it doesn't follow a paradigm of "there's only one way to do it", because Matz' idea was that he wanted to make a language that people would be happy to program in... not simply one that tells people how to program "the right way." The second is that Ruby is a hell of a lot less ugly for dealing with things like reflection and metaprogramming. Some of its semantics for blocks are much more rich than Python, in particular, that they can be evaluated within the context of the object receiving the block as a method argument, rather than the context of the caller, if the programmer so chooses.

Also, I should note that there is a little futility in questions like:

>why does X exist?
>why is Y allowed?
Because society doesn't get to decide on these sorts of things. We don't decide what things get to exist and not exist based on committee. Matz made his own language because he felt like it, and people used it because they liked it. You don't get to say "everyone has to use Python because it came first and Ruby is similar to it."
>>
>>53745840
>"everyone has to use Python because it came first and Ruby is similar to it."

imagine a world where this level of bureaucracy were possible

>we'd all still be programming in asm if computers even existed
>>
File: standards.png (24 KB, 500x283) Image search: [Google]
standards.png
24 KB, 500x283
>>53744535
>Why does both Ruby and Python exist?
Mandatory xkcd (https://xkcd.com/927/)
>>
>>53746072
Just think of how efficient our software would be!
>>
>>53748554
That's wrong, some gook made a meme-language for himself and shown it on the Internet and people were like, daym man that cool can I use it too.

And before that some dutch pothead made a meme-language for himself and people were like "damn neat man, pass be the bong, you python shit is dank as fuck".

Stop forcing your xkcd smug meme. They exist because some people made them and they got popular because they were useful and neat not because some authority wanted to create a new standard.
>>
>>53750294

>They exist because some people made them and they got popular because they were useful and neat not because some authority wanted to create a new standard.

> They exist because some China/Dutch-man wanted to create Ruby/Python and they got popular.

I don't actually get what you think you're disproving.
>>
File: twitter feed.jpg (52 KB, 640x640) Image search: [Google]
twitter feed.jpg
52 KB, 640x640
>>53744535
>I have a right to things that go into and out of my body
>swallow someone's cash
>it's my right to have it now


also

>affect other people
>breathing is not a right since you might be taking someone else's air

Following the logic of air a bit, it's commonly accepted as free because it's a necessity and there's just so many of it. Same applies to other goods and services such as school and food wchich should be free if they weren't artificially made scarce (there's so much food being thrown away - there are many universities with extra seats available, although I agree that getting a title is another subject)

Pic related
>>
>>53752133
Why should school and food be free?

>Artificially made scarce
But that's not true. When you're paying tuition you're paying for AN ACCREDITED INSTITUTION.

If you want "free" you're welcome to use Khanacademy or similar services. Or even make your own "school". Just its degrees will be useless pieces of paper, no scarcity there though.
>>
>>53744535
Almost every article of the universal declaration of human rights affects others in society. This argument is spurious. Also, free education and health care has a positive effect on society.
>>
>>53744535
>Why does both Ruby and Python exist?
It's a historical accident. Programmers can't pick one because each has just enough of its own ugliness and clumsiness.

Ruby has
- mutable strings
- libraries that abuse monkey patching and "magic"
- import dumping shit into the global namespace
- minor version releases that break compatibility
- questionable syntax like $global and &:method
etc.

Python's has
- text encoding problems in both 2.7 and 3.x (just different ones)
- several slightly different package formats
- weak-ass lambdas
- no private methods
- no regex literals
- 2 vs 3
- __special__ __method__ syntax

This shit comes up to often. Actually, how about he compile a list to reply with to the likes of OP in the future? Post more flaws of both.
>>
>>53752961
No it doesn't

Free healthcare results in no incentive to work harder or more efficiently, resulting in huge wait times and subpar work.

Free education is also a bad idea because it devalues degrees.
>>
>>53753107
What? WHAT?!? Those are some pretty stupid assertions anon. To put it simply, not educating your work force will essentially doom your country to forever wage war with other economies dependant on producing goods. You'll be stuck competing with China to produce cheap shit and you'll lose.
>>
>>53753367
Instead of the requirement being highschool diploma for most jobs(as it used to be) the new requirement becomes bachelor's degree, and a masters degree becomes the same weight as a bachelors previously.

Education DOES exist. It's entirely free, in the form of books(torrentable), khanacademy and YouTube videos.

University is a service, which rightfully costs money.
>>
Thank you for using that pic OP. God forbid we actually have an on-topic thread.
>>
>>53745711
i prefer my rights to be protected not granted. So they sort of have to require no external input to exercise.
>>
/g/ is so goddamned stupid, it only took three posts before some retard fell for it
>>
>>53753097
Let's not forget the "sufficient" implementations both came up with.
>>
>>53744535
Glad somebody said it. Its like those idiots that say "Durrr. I have a right to privacy. DURRRR". NO U DONT U FUCKING IDIOT. U HAVE LIKE TEN RIGHTS IN THE CONSTATUTION FUCK. I hate when people use that word "right" and have no idea what it means.
>>
>>53744535
They look similar on the surface, but the style used by most devs in those two communities could not be more different.

Ruby (and Rails) puts a lot of emphasis on dsls and mixins.
>>
>>53744535
>they are seemingly identical other than syntax
So their only difference is absolutely everything?
>>
>>53755846
I mean he could have a point if two languages were both interpreted, dynamically typed, etc... but Python and Ruby are not qualitatively the same aside from syntax.

Moreover, Ruby and Python have different communities now. Python has a whole community for scientists/data-related stuff. Ruby has a much stronger web presence.
>>
>>53744535
Ruby is for females, gays, and sjws because they like shiny jewels.

Python is for men because men like dangerous phallic things like snakes.
>>
>>53755442
Rights are whatever your sovereign thinks they are. If your actual sovereign is The New York Times...
>>
>>53744844
Don't get too excited there pal.

Hard drugs aren't a right, have never been a right, will never be a right.
Like most everything that has to be legalized or put through legislation, they're a privilege and can be taken away at will.

Notable exceptions are things explicitly listed out in legal documents and as a result of supreme court rulings.
>>
>>53744677
came here to post this
>>
>>53755442
>being this uneducated
Your right to privacy was guaranteed by the supreme court ruling of Griswold v Connecticut, a ruling made possible by the Ninth Amendment (Bill of Rights).

Griswold v Connecticut made contraceptives bans unconstitutional on the argument of a marital right to privacy.

It was then extended to individuals by the Due Process clause by the 14th Amendment which was designed to protect people against "arbitrary impositions and purposeless restraints".
>>
>>53744535

>this image

Dear fucking god. As a lawyer, one thing I absolutely fucking HATE about the internet, specially nowadays where every 15 year old thinks he's a politics connoiseur because he regurgitates things from his favorite circlejerk bubble, is that we have people with no study whatsoever about any of the foundations of the legal systems and their principles talking about rights because they read something on wikipedia.

Someone just fucking nuke /pol/ and its ignorance from orbit already, holy shit.
>>
>>53756633
literally says it nowhere in the constatution
>>
>>53756659
you're claiming to be a lawyer on 4chan.
you got baited by an obvious troll/derail image.
you're a retarded faggot.
>>
>>53745840
i like ruby because the syntax looks much nicer and elegant, but I HATE the "there's more than one way to do it". Because even though there indeed is, the "community" will shit all over you because of these 5 opportunities only one is the "real" right way.
>>
>>53756659
All that image is missing is a Minion and a bunch of JPEG artifacts. Only then can I share it on Facebook.
>>
>>53744535
>my labour and property don't affect other people
/pol/ meme detected.

Nice bait thread, btw, made me reply. Why are you shitting up the board? Even the question doesn't look real and could be answered in any programming-related thread.
>>
>>53757021

It's best to ignore the community. Many of them are web developers and don't use Ruby outside of Rails.

If you aren't doing some web scale Rails app, just hack it how you want to use it... Although be aware that there often are more elegant ways to handle certain shit, and they usually involve blocks.
>>
>>53744844
>government makes drugs illegal, forcing them underground and creating a black market industry

>you can't take drugs because it funds the cartels!!

statist logic
>>
>>53744535
For me ruby is just more fun. I don't care about a few things as long as it gets done, so I use c++, rust, and ruby.
>>
>>53756977
N I N T H
I
N
T
H
AMENDMENT
>>
>>53756659
That image is about political philosophy, not any existing law.
Thread replies: 47
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.