News for hackers. Stuff that matters.
Re:Python programming is drowning in red tape by koonsolo on Wednesday April 15, 2020 @03:22AM (#22875379)
> hardly resembles the easy-to-understand language I fell in love with back in 2006.

I used to love Python back in those days. Even did a big project with multiple developers in it.

Then I didn't use it for a while and came back for some easy scripting. I was absolutely horrified how complex things are right now. Ditched it and doing my scripting with node.js.

Re:Python programming is drowning in red tape by FridgeSeal on Wednesday April 15, 2020 @05:00AM (#22875804)
> ditching Python on account of it being too complex

> chooses NodeJS

Congratulations on picking a language with even more weird pitfalls and edge cases?

JS is not what I’d call a simple, straightforward language.

Re:Python programming is drowning in red tape by koonsolo on Wednesday April 15, 2020 @09:55AM (#22877714)
I care about writing clean and simple code in an easy way. I found that the node ecosystem with npm packages allows me to do this very well.

I had that same feeling in the 2.4-2.5 days of Python. But now it was really hard to find simple API's.

Let me give you an example about parsing JSON. This is the Python way:

json.load(fp, , cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, kw)

Seriously, how F(&#$%@ING complex can you make the thing?

This is Javascript:

JSON.parse(text[, reviver])

Ah, that's the way I like it :)

But hey, if you want all that argument power, no problem for me. I'm a simple programmer, liking simple things. And that was my point, Python has lost its simple ways. The JavaScript language might have some weird shit, but I don't care about that because I can stay far away from it. I care about simple programming.

Re:Python programming is drowning in red tape by Cpoll on Wednesday April 15, 2020 @10:27AM (#22878092)
> json.load(fp, , cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, kw)

It looks like you copied that from https://docs.python.org/3/library/json.html

Those are all optional parameters, if you don't need them it's just:

json.load(fp)

Which, to the best of my knowledge will behave just like the JS version.

Re:Python programming is drowning in red tape by tcbasche on Wednesday April 15, 2020 @06:44AM (#22876286)
scripting with node.js? Isn't that objectively picking the wrong tool for the job?

Perhaps I'm just ignorant as to why you would use what's typically a web server for the purposes of scripting

Re:Python programming is drowning in red tape by _ZeD_ on Wednesday April 15, 2020 @06:08AM (#22876113)
ahahahah now you are telling me that the node ecosystem and the tooling and pre/post compilation/translation phases are simpler than python? (and I'm not talking about the languages themself)
Re:Python programming is drowning in red tape by koonsolo on Wednesday April 15, 2020 @09:34AM (#22877485)
Compilation? I write a JS file and then do node myfile.js...
Re:Python programming is drowning in red tape by _ZeD_ on Saturday April 18, 2020 @04:27PM (#22910814)
what do you call the various phases of bundling, minification, obfuscation...? or using babel to use the latest version of the spec? or the various passages of type/coffescript and whatnot... or the jsx stuff... or wasm, webassembly... ... and on and on...
Re:Python programming is drowning in red tape by koonsolo on Sunday April 19, 2020 @02:53AM (#22914088)
Like I said: I write a .js file and run node. I need none of what you mention.