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

FIOC or Weeaboo?

Name: ashkenazi friend 2013-03-08 11:10

Which hipster scripting language, python or ruby?

In one hand Ruby was made by a japanese and not a jew so it's more kakoi and stuff.
In the other hand python is a kind of snake and we're in the year of the snake and Kanako is my favorite Touhou.

So, which one?

Name: Anonymous 2013-03-08 11:14

I am far from an expert at Python, but I have done a couple of semi-serious projects in the language and will try to recall specifically what I didn't like.

- Everything you write will be open source. No FASLs, DLLs or EXEs. Developer may want to have control over the level of access to prevent exposure of internal implementation, as it may contain proprietary code or because strict interface/implementation decomposition is required. Python third-party library licensing is overly complex. Licenses like MIT allow you to create derived works as long as you maintain attrubution; GNU GPL, or other 'viral' licenses don't allow derived works without inheriting the same license. To inherit the benefits of an open source culture you also inherit the complexities of the licensing hell.
- Installation mentality, Python has inherited the idea that libraries should be installed, so it infact is designed to work inside unix package management, which basically contains a fair amount of baggage (library version issues) and reduced portability. Of course it must be possible to package libraries with your application, but its not conventional and can be hard to deploy as a desktop app due to cross platform issues, language version, etc. Open Source projects generally don't care about Windows, most open source developers use Linux because "Windows sucks".
- Probably the biggest practical problem with Python is that there's no well-defined API that doesn't change. This make life easier for Guido and tough on everybody else. That's the real cause of Python's "version hell".
- Global Interpreter Lock (GIL) is a significant barrier to concurrency. Due to signaling with a CPU-bound thread, it can cause a slowdown even on single processor. Reason for employing GIL in Python is to easy the integration of C/C++ libraries. Additionally, CPython interpreter code is not thread-safe, so the only way other threads can do useful work is if they are in some C/C++ routine, which must be thread-safe.
- Python (like most other scripting languages) does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. This means that Python can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Having variables leak after a for-loop can definitely be confusing. Worse, binding of loop indices can be very confusing; e.g. "for a in list: result.append(lambda: fcn(a))" probably won't do what you think it would. Why nonlocal/global/auto-local scope nonsense?
- Python has a faulty package system. Type time.sleep=4 instead of time.sleep(4) and you just destroyed the system-wide sleep function with a trivial typo. Now consider accidentally assigning some method to time.sleep, and you won't even get a runtime error - just very hard to trace behavior. And sleep is only one example, it's just as easy to override ANYTHING.
- Crippled support for functional programming. Python's lambda is limited to a single expression and doesn't allow conditionals. Python makes a distinction between expressions and statements, and does not automatically return the last expressions, thus crippling lambdas even more. Assignments are not expressions. Most useful high-order functions were deprecated in Python 3.0 and have to be imported from functools. No continuations or even tail call optimization: "I don't like reading code that was written by someone trying to use tail recursion." --Guido
- Python's syntax, based on SETL language and mathematical Set Theory, is non-uniform, hard to understand and parse, compared to simpler languages, like Lisp, Smalltalk, Nial and Factor. Instead of usual "fold" and "map" functions, Python uses "set comprehension" syntax, which has overhelmingly large collection of underlying linguistic and notational conventions, each with it's own variable binding semantics. This, in effect, makes Python look like an overengineered toy for math geeks. Good luck discerning [f(z) for y in x for z in gen(y) if pred(z)] from [f(z) if pred(z) for z in gen(y) for y in x]. In addition, you will enjoy cryptic expressions like z(*z(*m.i())[::-1]).
- Forced Indentation of Code (aka "off-side" rule) impedes using CLI, automatically generating Python code and moving around large code blocks. Editing Python code requires special editors (forget about Word/Notepad), that expand tabs into spaces, while sharing code through a web post or email will most likely break indentation. Absence of block-terminator is so utterly confusing, that you'll find yourself ending blocks with #endif anyway. It's painful to deal with other things that need indenting, such as large SQL queries, or HTML when you're using things like mod_python.
- Python hides logical connectives in a pile of other symbols: try seeing "and" in  "if y > 0 or new_width > width and new_height > height or x < 0".
- Python indulges messy horizontal code (> 80 chars per line), where in Lisp one would use "let" to break computaion into manageable pieces. Get used to stuff like self.convertId([(name, uidutil.getId(obj)) for name, obj in container.items() if IContainer.isInstance(obj)])
- Quite quirky: triple-quoted strings seem like a syntax-decision from a David Lynch movie, and double-underscores, like __init__, seem appropriate in C, but not in a language that provides list comprehensions. There are better ways to mark certain features as internal or special than just calling it __feature__. self everywhere can make you feel like OO was bolted on, even though it wasn't. Arithmetics on strings may surprise you: "2" * 3 is "222", "2"+"3" is "23", while "2" * "3" and "2"+3 are type errors. Creating an object just to call a function, like ''.join(map(str, r)), is just annoying.
- Python has too many confusing non-orthogonal features: references can't be used as hash keys; expressions in default arguments are calculated when the function is defined, not when it’s called. Why have both dictionaries and objects? Why have both types and duck-typing? Why is there ":" in the syntax if it almost always has a newline after it? The Python language reference devotes a whole sub-chapter to "Emulating container types", "Emulating callable Objects", "Emulating numeric types", "Emulating sequences" etc. -- only because arrays, sequences etc. are "special" in Python. Subtle data types (list and tuple, bytes and bytearray) will make you wonder "Do I need the mutable type here?", while Clojure and Haskell manage to do with only immutable data.
- Python's GC uses naive reference counting, which is slow and doesn't handle circular references, meaning you have to expect subtle memory leaks and can't easily use arbitrary graphs as your data. In effect Python complicates even simple tasks, like keeping directory tree with symlinks.
- Patterns and anti-patterns are signs of deficiencies inherent in the language.  In Python, concatenating strings in a loop is considered an anti-pattern merely because the popular implementation is incapable of producing good code in such a case. The intractability or impossibility of static analysis in Python makes such optimizations difficult or impossible.
- Problems with arithmetic: no Numerical Tower (nor even rational/complex numbers), meaning 1/2 would produce 0, instead of 0.5, leading to subtle and dangerous errors.
- Poor UTF support and unicode string handling is somewhat awkward.
- No outstanding feature, that makes the language, like the brevity of APL or macros of Lisp. Python doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk. "This is a hobby project and I neede my time for other things…" --Guido van Rossum (http://1997.webhistory.org/www.lists/www-talk.1993q1/0060.html)

Name: ashkenazi friend 2013-03-08 11:16

>>2
Don't replay to my thread with copypasta.

Name: Anonymous 2013-03-08 11:35

>>3
Ruby is absolutely horse shit and so is Kanako.

FIOC is infinitely less worse than Ruby, but it still manages to be bad. At least it doesn't have end.

Name: Anonymous 2013-03-08 11:38

>>4
FIOC is worse because of FIOC

Name: Anonymous 2013-03-08 11:38

>>5
Same for Haskell: Haskell is worse than C/C++, because it has FIOC and complicated type system.

Name: Anonymous 2013-03-08 11:39

Ruby also doesn't have crap like  [f(z) for y in x for z in gen(y) if pred(z)] from [f(z) if pred(z) for z in gen(y) for y in x]

Name: Anonymous 2013-03-08 11:44

- 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 12.5.integer? or (0..127).each { |n| p n.chr }, considered beautiful. Quirky variable names (because of bad scoping design): @instance_var @@class_var CONSTANT_VAR $global_var &proc $~[1]. 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]. A good amount of your code will consist of begin end begin begin end end...
- Defective syntax. Ruby cant distinguishing a method call from operator: "a +b" can be both "a(+b)" and "a + b".
- 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 or Smalltalk. 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.
- 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
- Ruby (like most other scripting 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. This also means that Ruby can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Certain operations (like regular expression operator) create implicit local variables for even more confusion.
- 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.
- Syntax problems: Ruby works hard to distinguish method calls from operators, and variable names from method names. Unfortunately, there's no way it can get it right all the time. In this case, "a +b" is parsed as "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. This has nothing to do with indentation. And for what it's worth, Ruby now parses "a +b" the way you'd expect. Which way is that?
- Mostly Rails hype and no outstanding feature, that makes the language, like the brevity of APL or 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-08 11:47

>>5
The FIOC in FIOC is not that bad. Maybe I hate end too much, because FIOC isn't exactly a good idea.

Name: Anonymous 2013-03-08 11:48

>>8
Ruby doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk, but they weren’t bad languages
Exactly. Just use Smalltalk or this http://ioke.org it appears they reinvented `let` statement, so now you can have local variables!

Name: Anonymous 2013-03-08 11:48

>>7
You can replicate list comprehensions with map, filter and lambdas.

Name: Anonymous 2013-03-08 11:50

>>11
Yes. But Guido for some stupid reason invented crazy syntax for this.

Name: Anonymous 2013-03-08 11:51

>>12
He only copied them from Haskell. Being a goy, he couldn't come up with them on his own.

Name: Anonymous 2013-03-08 11:53

>>12
I don't think it's that crazy, given the fact FIOC tries very hard to use ``human-like'' syntax.

>>13
I thought he was a [b][o]HALF[o]-JEW[/b].

Name: Anonymous 2013-03-08 11:54

>>14
Holy fucking BBCode Failure.

Name: Anonymous 2013-03-08 12:06

>>14
``human-like'' syntax. is ``Xs, please select X such that f(X)'', which translates to (Xs keep X->f(X))

Name: Anonymous 2013-03-08 13:06

>>14
I love your [b][o]B[o]BCOED[/b] failure. I read it five times. KEEP POSTING [b][o]B[o]BCOED[/b] FAILURES!

Name: Anonymous 2013-03-08 13:15

>>17
Okay~

Name: Anonymous 2013-03-08 13:15

>>18
Wait fuck why did it work this time? I thought it was Shiitchan's parser being shit as usual.

Ah well it means it was an actual BBCode failure.

Name: Anonymous 2013-03-08 13:29

>>19
Because you didn't close the [o], you just made two [o]'s, in >>17.

Name: Anonymous 2013-03-08 13:32

>>20
Oh, you're right.

Name: Anonymous 2013-03-08 14:22

i recommend WAFER FIOC ENTERPRISE

Name: Anonymous 2013-03-08 14:24

Guidolin~

Name: Anonymous 2013-03-08 14:43

just use javascript, like a competent programmer would

Name: Anonymous 2013-03-08 15:17

>>24
Javascript is only useful for web.

Name: Abdul 2013-03-08 15:25

>>24
FUCK YOU KIKE

Name: Anonymous 2013-03-08 16:31

>>26
Salam!

Name: Anonymous 2013-03-08 16:41

>>1
R5RS Scheme

Name: Anonymous 2013-03-08 16:45

Ruby will net you more Agile Ninja Rockstar Web Developer jobs right now. So if you're looking for cash, it may be convenient for you to learn it. Of course, Agile Ninja Rockstar Web Developer software shops are absolute messes where you'll probably have to work unpaid overtime, but such is life.

FIOC seems to have more widespread non-webdev usage, but it all depends on why you're learning these shit languages.

Name: Anonymous 2013-03-08 17:09

>>1
>>>>>>>>>>>>>>>>>>>>>>28<<<<<<<<<<<<<<<<<<<<<<

Name: Anonymous 2013-03-08 18:08

btw that ruby book with foxes is amusing

   /-------b----------------------------------------------------------------------------------- -.
   |      .'                                                                                     |
   |      |               _   _  _ ____ _  _ ____   __ _ ____   _  _ _ ____ ____                 |
   |      |               |   |--| |--|  \/  |===   | \| [__]   |/\| | |--- |=== .               |
   |      |                                                                                      |
   |     |                         __ _ ____   ____ _  _ _ _    ___  ____ ____ __ _              |
   |     _'                        | \| [__]   |___ |--| | |___ |__> |--< |=== | \| .            |
   |      L                                                                                      |
   |                              _   _  _ ____ __ _ ' ___   _  _ ____ _  _ ____   ____          |
   |      '|                      |   |/\| [__] | \|    |    |--| |--|  \/  |===   |--|          |
   |                              _    ____ ____ ____ ____ _ _                                   |
   |        \                     |___ |=== |__, |--| |___  Y  .                                 |
   |         .                                                                                   |
   |     <.                 )       ___ _  _ ____   ____ __ _ _    _ _   ___ _  _ _ __ _ ____    |
   |     |    ^.          ,'|        |  |--| |===   [__] | \| |___  Y     |  |--| | | \| |__,    |
   |     |  '''' ....----           ___ _  _ ____   _  _ ____ ____ _    ___    _  _ _ _    _     |
   |     |                  |        |  |--| |===   |/\| [__] |--< |___ |__>   |/\| | |___ |___  |
   |    |                    |      _  _ __ _ ____ _  _   _  _ ____   ____ ____ ____             |
   |    |        __.   _,   -'.     |-:_ | \| [__] |/\|   |\/| |===   |--- [__] |--<             |
   |             :_|   __|     ],     _ ____   ____ _  _ _  _ __ _ ____ _  _ _ _                 |
   |    |         .    __,       ,.   | ====   |___ |--| |__| | \| |___ |-:_  Y                  |
   |    |        `''    .'         ) ___  ____ ____ ____ __ _                                    |
   |    |                         /  |==] |--| |___ [__] | \| . |`                              '|
   |    |                        /                              | ``._               ,-.     _.-'|
   |    |                      ,'                               |     `'''''''''''`-'  |  ,,'    |
   |    |                     |                                /                       -''       |
   |    |           ,-^       |                             _|'                        |         |
   |    |          <..,.'     |                             /        ^-      _ _.     `.         |
   |    |                     \                           _'          '       \        |         |
   |    |  /.                 .>                         .[                            |         |
   |    J   |       ) ._      ]'`.                        ''                           |         |
   |    |   |       -' '       |  ' .                    _,.^\                         |         |
   |     |  '                  \    /    ,. .....,...--''    ''                        |         |
   |    '|  Y.                 :'  ,' _,'        ___           |                       |         |
   |     |   \                  L  ^ '    _,-''''   `',.       |        '':=`          |         |
   |     |   |\                         ,'              `'     |                       |         |
   |     |\  `-^.               _'     ,___ _  _ ____ _  _`']  |                       |         |
   |     |`\                     |   ,'[__] |__| |___ |--| ,   |                       |         |
   |     | `>  |                     |\                  ,'    |                       |         |
   |     |   `''                 `|   /.                /      |                      |          |
   |      \                       |    ',._        __,-'       /                      J         _|
    ______ _______________________:________:::_,,::____________:______________________:__________|

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