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

Pages: 1-4041-

Ruby 2.0 is faster than Python

Name: Anonymous 2013-03-26 22:13

How did that happen?

Name: Anonymous 2013-03-26 22:18

C#>ruby

Name: Anonymous 2013-03-26 22:24

Ruby shouldn't exist.
Python either.

Name: Anonymous 2013-03-26 23:44

All accusations towards Ruby are just ridiculous and are factually inaccurate! It is important that as a community we debunk these myths and unjustified criticisms. An even better road to take would be to provide examples of how computationally complex problems can be dealt with efficiently in Ruby, highlighting the best practices and the existing workarounds.

A religious community is emotionally easy to attack and may produce inopportune responses in defense of whatever has been questioned. Over the past three years I’ve heard a few bad things about Ruby and I’ve seen all sorts of responses, which in some cases were simply overreactions.

Ruby is a wonderfully designed language. The Ruby and Ruby on Rails communities have a lot of passion. We love our language, created by a very cool guy (and maestro of humbleness) in Japan. We love our framework authored by a Danish GAP model, and we really enjoy the spirit in the community. We have the best non-paid marketing department in the world. We started the revolution which is powering most of the new social websites out there.

Ruby on Rails is the single most important and valuable technical solution, language and tool for software problems.

Name: Anonymous 2013-03-26 23:45

"Ruby" is some masonic symbol, right?

http://www.allaboutmormons.com/famous_mormons.php
Yukihiro Matsumoto (1965-present, Japan): A Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language.

Name: Anonymous 2013-03-27 0:10

>>5
How many wives do you think he has?

Name: Anonymous 2013-03-27 0:57

>>6
He's a programmer, so zero and he will die alone and unloved.

Name: Anonymous 2013-03-27 1:46

>>7
And also a jap which makes that -2.

Name: Anonymous 2013-03-27 2:30

>>5
Back to le ... hmm, I guess there is no place more fitting than here. Terrible!

>>7
Back to le miserable and desperate life of le normal, please.

>>8
Back to newpol, please.

>>9
Back to /b/, please.

Name: Anonymous 2013-03-27 3:03

I am quite happy about that. Python is completely broken. Python3000 sounds like a joke product. Ruby at least is real OOP and has anonymous functions, closures and various functional constructs. The core library is not broken. While the python community is still striving to produce a normal HTTP client, which doesn't "function" like urllib1-1000.0. And for some reason the python community keeps producing the same shit over and over again like autistic retards with a severe case of ocd. The python community is also extremely sexist and misogyny is no stranger to them.

I never use Ruby or Python. I like racket, which is like 38 times faster than either of them. I like haskell, which is 50 times faster. I also like C, which is like 258 times faster. I don't understand why people would chose a crippled language with badly implemented high level features, which is also slow and dare to advertise itself as a HLL. Constricted by mediocrity, that is how it feels to be constricted by python. In C I can create any object system I need. I would chose Ruby over python every day. Even if it is 2 times slower. It wouldn't matter from my perspective. It is just slow.

Name: Anonymous 2013-03-27 3:23

>>10
You know, that sounds exactly like /prog/

Name: Anonymous 2013-03-27 3:28

>>10
Here's why one should be wise regarding Ruby:
- Ruby, like most other badly designed languages, does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. If you want a variable private to a block, you need to pick an unique variable name, holding the entire symbol table in your head. Ruby introduces new variables by just parsing their assignments, meaning "a = 1 if false; a" wont raise an error. Ruby can't detect even a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo. Local and global scopes are unintuitive. Certain operations (like regular expression operator) create implicit local variables for even more confusion.
- Ruby indulges obfuscation: Ruby has no keyword/optional arguments, so you'll have to use hash parameters as a substitute. This is an idiom that comes from Perl. Ugly, Perl-looking code, like proc {|obj, *args| obj.send(self, *args)} or (0..127).each { |n| p n.chr }, considered beautiful. Another confusing Perl borrowing are postfix `if` and `while` (line = file.readline while line != "needle" if valid line) and quirky variable names (partially due to naive environment design): @instance_var, @@class_var, CONSTANT_VAR, $global_var, :sym, &proc, $~[1], $!, $>, $@, $&, $+, $0, $~, $’, $`, $:, $., $* and $?. If A is [1,2,3] and B is [10,20,30], then A+B is [1,2,3,10,20,30], when you probably wanted [11,22,33]. If `a` and `b` are undefined, then "a = b" produces error, but "a = a" gives `nil`.
- Faulty syntax. Ruby cant distinguishing a method call from an operator: "a +b" can be both "a(+b)" and "a + b" - remove the space to the left of "+" or add a space to the right of "+", and it will be parsed as an addition. Same with "puts s *10", which is parsed as puts(s(*10)). Ruby's expressions terminate by a newline and you have to implicitly state that the expression is not over, using trailing + or \. That makes it easy to make a dumb syntactic mistake by forgeting to continue line. It also encourages putting everything onto a single line, producing messy looking code. A good amount of your code will consist of "begin end begin begin end end..." noise.
- Slow: JIT-compiling implementations exist, but they're still slow and incomplete, due to Ruby's complexity and bad design, which make Ruby difficult to optimize compared to other dynamic languages, like Lisp. For example, Ruby has to accomodate for somebody in another thread changing the definition of a class spontaneously, forcing compiler to be very conservative. Compiler hints, like `int X` from C/C++ or `declare (int X)` from Lisp, arent possible either.
- Ruby's GC is a naive mark-and-sweep implementation, which stores the mark bit directly inside objects, a GC cycle will thus result in all objects being written to, making their memory pages `dirty` and Ruby's speed proportional to the number of allocated objects. Ruby simply was not designed to support hundred thousand objects allocation per second. Unfortunately, that’s exactly what frameworks like Ruby on Rails do. The more objects you allocate, the more time you "lose" at code execution. For instance something as simple as 100.times{ ‘foo’ } allocates 100 string objects, because strings are mutable and therefore each version requires its own copy. A simple Ruby on Rails 'hello world' already uses around 332000 objects.
- OOP: Matz had a bit too much of the "OOP is the light and the way" philosophy in him, in effect Ruby doesn't have stand-alone functions and Ruby's blocks can't be used in exactly the same way as usual closures. Even high-order functions are attached to objects and produce verbose code: "names.map { |name| name.upcase }", instead of simple "map upcase names".
- Non-othogonal: {|bar| bar.foo}, proc {|bar| bar.foo}, lambda {|bar| bar.foo}, def baz(bar) bar.foo end - all copy the same functionality, where Lisp gets along with only `lambda`. Some Ruby's features duplicate each other: print "Hello", puts "Hello",  $stdout<<"Hello", printf "Hello", p "Hello", write "Hello" and putc "Hello" -- all output text to stdout; there is also sprintf, which duplicates functionality of printf and string splicing. begin/do/then/end, {} and `:` also play role in bloating syntax, however, in some cases, precedence issues cause do/end and {} to act differently ({} binds more tightly than a do/end). More bloat comes from || and `or`, which serve the same purpose.
- Ruby as a language supports continuations via callcc keyword. Ruby's callcc is incredibly slow, implemented via stack copying. JRuby and IronRuby don't have continuations at all, and it's quite unlikely they will ever get them. There were also support breaches in mainline Ruby, where Ruby 1.9 has not supported continuations for a while. If you want your code to be portable, I'd suggest not using Ruby.
- Ruby was created "because there was no good scripting language that could handle Japanese text". Today it's mostly Rails hype and no outstanding feature, that makes the language, like the brevity of APL or simplicity and macros of Lisp. "There is some truth in the claim that Ruby doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk, but they weren’t bad languages." -- Matthew Huntbach

Name: Anonymous 2013-03-27 3:29

At least Ruby isn't guided by Guido the guide.

Name: Anonymous 2013-03-27 3:55

>>11

If you are referring to

community is also extremely sexist and misogyny is no stranger to them.
it's new, and you are part of the problem. Please leave and take your hacker newsreaders with you.

But if you are referring to

producing the same shit over and over again like autistic retards with a severe case of ocd.
there is a point. But know that while reimplementing a library over and over is retarded, it is also a path to satori if the subject matter is deep enough. But a python library is likely not deep at all.

Name: Anonymous 2013-03-27 5:09

>>14
I'm reimplementing Symta over and over, but still not reached satori: i.e. I still don't see how to implement complete OS using Symta and only Symta, because there would be numerous security and persistency issues, like for example modifying running kernel and unloading lambdas.

Programming language design is hard, much harder than OS design, because a good language defines OS design. But there are a few basic rules, like using lexical scoping for all variables and making sure that lexical scoping isn't broken, because broken lexical scoping makes language useless for OS design, while global variables break thread-safety and produce numerous security issues, like for example allowing every program access to file system, without chroot or sandboxing.

I'm sure, you can implement OS using Scheme, but Common Lisp is bad for OS design, due to it's clunky package system and global variables.

Name: Anonymous 2013-03-27 6:46

Ruby as a language supports continuations via callcc keyword. Ruby's callcc is incredibly slow, implemented via stack copying. JRuby and IronRuby don't have continuations at all, and it's quite unlikely they will ever get them. There were also support breaches in mainline Ruby, where Ruby 1.9 has not supported continuations for a while. If you want your code to be portable, I'd suggest not using Ruby.

Of course not, but you can say the same about python. It has all the same problems, maybe even more.

Continuations in the JVM aren't going to work. The JVM is not very supportive for functional languages, although scala seem to have continuations as monad at least by using for. This monad is essentially a CPS transformer for code, so it sometimes also yields some more efficient code.

It was a design error to implement call/cc instead of shift and reset, which are more powerful. Lisp fucked up major there, but at least it tried. Ruby on the other end, didn't try. It just implemented the same shit again. Badly.

Python is even worse. It is crippled by design. Guido thought people, where not able to grasp the concept of lambda calculus or high level constructs like higher order functions or continuations. While it is not complex at all. There is only one operation in the whole calculus: Apply.

Name: Anonymous 2013-03-27 6:47

It is a sad. Python makes me more sad than ruby.

Name: Anonymous 2013-03-27 7:03

If it ain't LISP, it's kike.

Name: Anonymous 2013-03-27 7:04

Guido van Opossum
nevar foirgit

Name: Anonymous 2013-03-27 7:21

Name: shit !fAGg1t./Gk 2013-03-27 10:29

up

Name: up !/84.nIkITA 2013-03-27 10:39

up sheischeschee

Name: Anonymous 2013-03-27 14:09

check 'em

Name: Anonymous 2013-03-27 14:38

>>4
>>14

Name one piece of software that doesn't have an annoying community of autistic fanboys.

Name: Anonymous 2013-03-27 14:40

>>24
Bash.

Name: Anonymous 2013-03-27 14:48

>>25

wrong, i've been to #bash on freenode and its awful

Name: Anonymous 2013-03-27 14:49

>>26
It's because fucking everyone hates bash.

Name: Anonymous 2013-03-27 16:03

>>27
Shalom, Schlomo!

Name: Anonymous 2013-03-27 21:16

When there is a significant difference between the parent's and child's sense of the amount of attention needed, the child is often described as seeking excessive or inappropriate attention, particularly if the child is whiny, clingy, silly, or provocative. Children generally seek so-called inappropriate attention when they feel unable to manage their emotions or behavior. Needing extra help is usually a sign that a child is not functioning at his or her best level. We call this regression.

Some children engage in so-called "negative attention-seeking behavior," which involves an effort to provoke a response that they know will be negative. Such behavior should always perplex parents, and cause them to examine the behavior more deeply, because negative attention never feels good to a child - after all, the attention comes with quite a price. Disapproving, irritated, reproachful attention does not fill a child with good feeling any more than such attention feels welcomed by an adult! There needs to be quite a "pay-off" to induce a child to actually seek out such negativity. One possibility is that child has been over-indulged and therefore has not developed age appropriate skills, autonomy, and independence.

Name: Anonymous 2013-03-28 1:57

When there is a significant difference between the Goyim's and Jew's sense of the amount of Conflict needed, the Jew is often described as seeking excessive or inappropriate Conflict, particularly if the Jew is greedy, corrupt, ignorant, or israeli. Jews generally seek so-called inappropriate conflict when they feel unable to exploit their beliefs or neighbors. Needing extra wealth is usually a sign that a Jew is not functioning at his or her best level. We call this regression.

Some Jews engage in so-called "negative conflict-seeking behavior," which involves an effort to provoke a response that they know will be negative. Such behavior should always perplex Goyims, and cause them to examine the behavior more deeply, because negative conflict never feels good to a Jew - after all, the attention comes with quite a price. Disapproving, irritated, reproachful conflict does not fill a Jew with good feeling any more than such conflict feels welcomed by a Goyim! There needs to be quite a "pay-off" to induce a Jew to actually seek out such negativity. One possibility is that Jew has been over-indulged and therefore has not developed age appropriate skills, autonomy, and independence.

Name: Anonymous 2013-03-28 21:32

>>28

That is highly offensive, please stop.

Name: Anonymous 2013-03-29 4:18

But Ruby is [u][b]SLOW AS FUCK![/u][/b]

Name: Anonymous 2013-03-29 4:49

>>31
Fuck you pansy-shit, die in a fire and take your retarded feelings with you.

Name: Anonymous 2013-03-29 5:22

>>33
You're so mean :(

Name: Anonymous 2013-03-29 15:43

>>34
Grow a skin.

Name: Anonymous 2013-03-29 17:13

>>35
That's such a lazy cop-out for being a shitty person.

Name: Anonymous 2013-03-29 17:47

>>36
Freedom of speech and the right not to be exposed to things that make you feel bad are mutually exclusive. Either learn to control your feelings or stay in your apartment forever, and never turn on the TV nor access Internet.

As I said, grow a fucking skin, you emotionally-unstable fucktard.

Name: Anonymous 2013-03-29 18:30

>>37
You are but an emotionally stunted, self-absorbed little shit with the understanding of ``free speech'' of a Libertarian. Enjoy your neckbeard.

Name: Anonymous 2013-03-29 18:57

>>37
Freedom of speech has to do with governments inhibiting citizens from speech. It is totally irrelevant to this discussion since nobody recommended that the government inhibit any kind of speech.

Name: Anonymous 2013-03-29 19:15

>>38
**TRIGGER WARNING**
And you are but an emotionally stunted, self-absorbed little shit with the understanding of ``free speech'' of a Tumblr Feminist. Enjoy your ``feelingocracy''.

>>39
What I am saying is that short of entirely shielding oneself from the outside world, or forcing the entire outside world to inhibit most speech (including almost all of humour), being exposed to content that causes a negative emotional response is an inevitability. Therefore, it is important to learn to control one's emotions, and to grow a thicker figurative skin.

Name: Anonymous 2013-03-29 19:23

>>40
Fuck you illogical cretin I HATE YOU DIE IN A FIRE AGFDGSFD GHSFDGSDFGDFBSDBSDVB DS I HATE YOU DIIEE DIE DIE

Name: Anonymous 2013-03-29 19:28

>>41                           `
>rage line noise
>no GJS

ISHYGDDT

Name: Anonymous 2013-03-29 19:32

>>40
Those statements are as obvious as they are irrelevant. Everyone knows that, you are the one saying that as an excuse to be an asshole, like a middle schooler would. There's much more to human and social interaction than what's within the bounds of the law.

/poe blocks a plate/

Name: Anonymous 2013-03-29 19:43

>>43
Everyone knows that, you are the one saying that as an excuse to be an asshole, like a middle schooler would.
I can imagine you typing that with that smug smirk on your clean shaven face, thinking you're so much better than everyone else. Fuck you.

Those statements are as obvious as they are irrelevant. (...) There's much more to human and social interaction than what's within the bounds of the law.
Fine, now that the obvious is out of the way, we can now talk about social protocol and the finer points of social environments and contexts. Could you please explain to me how the fuck someone could possibly arrive to the conclusion that /prog/ is anywhere close to an emotionally-safe environment? I mean sure, it's missing a big trigger warning page in 72pt big red letters, but it should otherwise be obvious to anyone with half a brain.

Name: Anonymous 2013-03-29 20:10

>>44
Fine, now that the obvious is out of the way, we can now talk about social protocol and the finer points of social environments and contexts. Could you please explain to me how the fuck someone could possibly arrive to the conclusion that /prog/ is anywhere close to an emotionally-safe environment?
There's quite a gap between what you think of /prog/, what I think of /prog/, and an emotionally safe environment.

No, this, isn't some tea club for elderly ladies, but that doesn't mean that everyone being a fuckwad with a raging rage-boner all day is a fine state for a forum to be.

I enjoy trolling and shitpostery as much as any guy here, but gratuitous bile being spit all-over, all the time, isn't that much entertaining after you see that you start predisposing yourself to see gratuitous bile being spit all-over, all the time. You can do that, you are within your right, but covering it saying that it's a free Internet is a cop-out. You could at least say that it's for le lulz, but then you'd have to face that it's unfunny as fuck after you see the 100000th guy pulling the same tired shit, again, for the millionth time.

Name: Anonymous 2013-03-29 20:24

>>45
that doesn't mean that everyone being a fuckwad with a raging rage-boner all day is a fine state for a forum to be.
I agree, it gets quite tiresome after a while.

I enjoy trolling and shitpostery as much as any guy here, but gratuitous bile being spit all-over, all the time, isn't that much entertaining after you see that you start predisposing yourself to see gratuitous bile being spit all-over, all the time.
Once again, I agree. It gets boring, and gratuitous bile no longer has any value (from a humour point of view) if abundant.

You can do that, you are within your right, but covering it saying that it's a free Internet is a cop-out. You could at least say that it's for le lulz, but then you'd have to face that it's unfunny as fuck after you see the 100000th guy pulling the same tired shit, again, for the millionth time.
I'm not exactly sure what you're talking about. Are you referring to my textual anger at your (et al.) previous posts (as in >>33,35,37,40,44), or are you implying that I am responsible for other gratuitously bileful shitposts?

Name: Anonymous 2013-03-29 20:36

>>46
I'm not exactly sure what you're talking about. Are you referring to my textual anger at your (et al.) previous posts (as in >>33,35,37,40,44), or are you implying that I am responsible for other gratuitously bileful shitposts?

Well, addressing people on sentiments here on /prog/ is a pretty abstract and bullshitty business, given our anonymity. You were arguing with, at least, two different people there.

Anyway, there's something to be said about le edgey racist posts; they are clearly a cheap, if not very effective, way to troll people, as they only get annoying if spammed continuously. The initial onslaught of Nikita was resisted for quite a few days, before we started to crack and respond to him, for instance. As being a form of trolling, they hold a certain value, though I'm not fond of them, as they only provoke because they're tiresome, and they make the forum annoying to read as well.

Name: Anonymous 2013-03-29 20:39

>>47
Oh, well then, we actually agree. Have a good day, sir.

Name: Anonymous 2013-03-29 22:42

>>15
If you want to implement an OS, you can look at how it is currently done in ASM, C, and in some cases SEEPLES. An OS isn't that different from any other sort of application. If you want security, just don't use eval. Restrict the capability of the interface to the permissions allowed to the user. The big difference though is if you mess up, you might ruin your hard drive. But that's what simulators are for. Check out QEMU.

You could implement an OS in Common LISP or even Symta, as long as you could write the needed assembly and embed it in your code. And the compiled code will need to run as a kernel process, rather than application process. IE, it doesn't ask for memory using a system call, it just goes at gets it, because it's the kernel.

Name: Anonymous 2013-03-29 23:16

I found some VIP quality code in /etc/init.d/onioncat
   RETVAL="$?"
   [ "$RETVAL" = 2 ] && return 2
   return "$RETVAL"

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