|
Cybernetic Vermin posted:ok, to just spell this out instead: python has had a horrible track record of backwards compatibility. it is not a bad bet to avoid it for that reason, if you wish for any permanence in the things you put your time into. I’m struggling to think of any decades-old languages where you can take old code and give it the latest versions of its dependencies and plug it into the latest runtime/compiler and expect anything but pain. if you wish for permanence then you have to use fixed versions of everything, ideally with security backports if you can get them. this is universal. yes, python’s design means you can’t do this without virtualenvs or containers or similar, but that’s hardly unique to python.
|
# ? Oct 23, 2020 01:50 |
|
|
# ? Apr 20, 2024 05:19 |
|
rhel8 and ububu 20 look pretty loving identical
|
# ? Oct 23, 2020 01:52 |
|
Soricidus posted:I’m struggling to think of any decades-old languages where you can take old code and give it the latest versions of its dependencies and plug it into the latest runtime/compiler and expect anything but pain. you can probably do this with a lot of c
|
# ? Oct 23, 2020 02:02 |
|
Nomnom Cookie posted:serious q: i do a lot of infra dev at work and we're pretty happy with python 3.6 for that. you need a lovely little daemon to pipe metrics from elasticsearch to datadog or something, write 200 LOC of python and pop it in your kube cluster. easy peasy. what language is superior to python for this application? python is probably the best language for stuff like this, don't change it
|
# ? Oct 23, 2020 02:30 |
|
graph posted:rhel8 and ububu 20 look pretty loving identical Ah but you see, one is RHEL, the other is a gigantic pile of garbage based on a random fork of Debian which is also quite bad.
|
# ? Oct 23, 2020 02:31 |
|
Poopernickel posted:python is probably the best language for stuff like this, don't change it This is the correct answer. Unless you need compiled code, Python is the winner 99% of the time.
|
# ? Oct 23, 2020 02:31 |
|
the rough guideline i use for if i need to move from a python project is if i need to, no joke, make another file. if my script is becoming that unwieldy chances are it needs to move to some real language
|
# ? Oct 23, 2020 02:34 |
|
Soricidus posted:I’m struggling to think of any decades-old languages where you can take old code and give it the latest versions of its dependencies and plug it into the latest runtime/compiler and expect anything but pain. basically any of the core unix languages - C, shell-scripts, various DSLs like awk, groff, etc. C++ also, more or less. Also Perl if you're a graybeard or Tcl if you're a circuit hipster Poopernickel fucked around with this message at 02:45 on Oct 23, 2020 |
# ? Oct 23, 2020 02:40 |
|
Poopernickel posted:Tcl if you're a hipster i have to use tcl because it's the scripting language integrated into xilinx fpga tools and based on what i find when i google for poo poo, i cannot imagine a less hipste plang. it's graybeards all the way down
|
# ? Oct 23, 2020 02:46 |
|
BobHoward posted:i have to use tcl because it's the scripting language integrated into xilinx fpga tools trap sprung
|
# ? Oct 23, 2020 02:48 |
|
BobHoward posted:xilinx nope
|
# ? Oct 23, 2020 02:56 |
|
Beamed posted:the rough guideline i use for if i need to move from a python project is if i need to, no joke, make another file. if my script is becoming that unwieldy chances are it needs to move to some real language this is the real correct heuristic but i also give myself leeway at 1k lines of code if its more than that it should be a real thing
|
# ? Oct 23, 2020 04:14 |
|
Poopernickel posted:basically any of the core unix languages - C, shell-scripts, various DSLs like awk, groff, etc. C++ also, more or less. Also Perl if you're a graybeard or Tcl if you're a circuit hipster you dont have to care about this anymore unless youre doing embedded you should care about the perf of your apps but the p lang jvm runtime just doesnt matter a lot and odds are your bespoke csv or json parser skin for your db doesnt either
|
# ? Oct 23, 2020 04:17 |
|
DoomTrainPhD posted:Ah but you see, one is RHEL, the other is a gigantic pile of garbage based on a random fork of Debian which is also quite bad. rip nbsd
|
# ? Oct 23, 2020 04:27 |
|
Share Bear posted:this is the real correct heuristic but i also give myself leeway at 1k lines of code my guideline is if the script has more than just simple Shell commands. I don’t care how man lines long it is, if it’s all cats and greps then it should be a Shell script.
|
# ? Oct 23, 2020 06:18 |
|
Beamed posted:the rough guideline i use for if i need to move from a python project is if i need to, no joke, make another file. if my script is becoming that unwieldy chances are it needs to move to some real language wait, are you seriously suggesting that python projects shouldn't be larger than one file? I just finished up a CLI tool for $dayjob that's currently 3.5kloc across 20 files, and I've got another one in the works.
|
# ? Oct 23, 2020 07:59 |
|
depends how you’re using it. if you put in the effort (proper tests, plenty of type hints, actual thought going into the design) then python is fine. if you’re just making GBS threads out code and thinking you’ll tidy it up later then python is going to cause you a world of pain.
|
# ? Oct 23, 2020 08:44 |
|
Soricidus posted:depends how you’re using it. if you put in the effort (proper tests, plenty of type hints, actual thought going into the design) then python is fine. if you’re just making GBS threads out code and thinking you’ll tidy it up later then python is going to cause you a world of pain. this is true of literally any language? all code is garbage
|
# ? Oct 23, 2020 11:36 |
|
I have written beautiful code once. It's perfect, handles all exceptions properly, is easy to read, has very little indentation, does one thing and it does it well, is documented with help output and all. It covers a lot of edge cases without becoming complex and it uses no confusing language features. It serves as great contrast to everything else. I read it sometimes and weep in despair.
|
# ? Oct 23, 2020 12:44 |
|
Antigravitas posted:I have written beautiful code once. It's perfect, handles all exceptions properly, is easy to read, has very little indentation, does one thing and it does it well, is documented with help output and all. It covers a lot of edge cases without becoming complex and it uses no confusing language features. unsure whether this is hubris or arrogance. there is no good code, yospos bithc
|
# ? Oct 23, 2020 12:55 |
|
everybody hits a point where they’ve written one (1) piece of software that is Good, and know that they never will manage it again
|
# ? Oct 23, 2020 12:59 |
|
major flowers for algernon energy
|
# ? Oct 23, 2020 13:50 |
|
Granite Octopus posted:this is true of literally any language? some languages are easier to refactor than others, especially when written idiomatically. you can write a nasty 10 kloc pile of code manipulating nested maps of maps of lists of maps with no tests or comments whatsoever in java, but you’re going against the grain. python makes it a lot easier to think that you’re doing something reasonable when in fact you’re just creating a terrible mess
|
# ? Oct 23, 2020 14:25 |
|
Java has only recently gained a record type feature and even then you still have to initialize them using positional constructor arguments which really sucks. There are nasty code-generating workarounds like AutoValue, but again you're either using positional constructor args or you're using builders and can't check if you actually completely initialized the object until runtime.
|
# ? Oct 23, 2020 15:13 |
|
Sapozhnik posted:Java has only recently gained a record type feature and even then you still have to initialize them using positional constructor arguments which really sucks. oh are you one of those people who cries tears of blood if you see a getter in your codebase
|
# ? Oct 23, 2020 15:41 |
|
i write dumb hobby things in python and it is friendly and nice 🤗
|
# ? Oct 23, 2020 19:04 |
|
you can poo poo out bad code in any language and good code in any language does it pay my bills? did nothing terrible befall someone due to how this was made? ship it
|
# ? Oct 23, 2020 19:24 |
|
I once interviewed for a position at a company that makes gas pumps. The ancient engineer I was going to replace proudly told me every variable in (his) codebase was a global and that he didn't need any tests because his code was tried and true tested in the field. I cut the interview short and politely told the guy I was interviewing with that I wasn't interested in the position any longer and that the code base wasn't worth the hassle.
|
# ? Oct 23, 2020 19:29 |
|
some languages are just bad though, like php which is not even internally consistent with function names
|
# ? Oct 23, 2020 19:32 |
|
Perplx posted:some languages are just bad though, like php which is not even internally consistent with function names What's the issue? Just use Also use It's easy!
|
# ? Oct 23, 2020 19:43 |
|
hobbesmaster posted:what should I be using to target cortex m4s and cortex m3s then? C? asm? C
|
# ? Oct 23, 2020 19:47 |
|
cortices m3
|
# ? Oct 23, 2020 20:04 |
|
Poopernickel posted:here, watch a C++ developer completely lose their grip on reality over the course of one article: this is like the code equivalent of Zalgo text
|
# ? Oct 23, 2020 20:08 |
|
which programming languages support zalgo variable names? just curious
|
# ? Oct 23, 2020 20:18 |
|
DoomTrainPhD posted:I once interviewed for a position at a company that makes gas pumps. The ancient engineer I was going to replace proudly told me every variable in (his) codebase was a global and that he didn't need any tests because his code was tried and true tested in the field. i'm guessing this wasn't an 8 bit microcontroller
|
# ? Oct 23, 2020 20:43 |
|
Soricidus posted:which programming languages support zalgo variable names? just curious Swift
|
# ? Oct 23, 2020 20:44 |
|
hobbesmaster posted:i'm guessing this wasn't an 8 bit microcontroller Am335x sitara running Linux.
|
# ? Oct 23, 2020 20:53 |
|
Soricidus posted:which programming languages support zalgo variable names? just curious >>> i̢n͡ͅv͍̯o̤̭k̟͞e̗͞ = "yospos" >>> print(i̢n͡ͅv͍̯o̤̭k̟͞e̗͞) yospos Too much Zalgo breaks python: >>> Yͨ̅O̤ͤS͊̀P̓̇Oͬ̈S̈́̂ = "bithc" File "<stdin>", line 1 Yͨ̅O̤ͤS͊̀P̓̇Oͬ̈S̈́̂ = "bithc" ^ SyntaxError: invalid character in identifier
|
# ? Oct 23, 2020 20:57 |
|
DoomTrainPhD posted:Am335x sitara running Linux. then everything isn't a global! a shameful greybeard
|
# ? Oct 23, 2020 21:03 |
|
|
# ? Apr 20, 2024 05:19 |
|
Antigravitas posted:
here's a nickel kid, get yourself a real computer ╰─>$ swift Welcome to Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1). Type :help for assistance. 1> let i̢n͡ͅv͍̯o̤̭k̟͞e̗͞ = "yospos" i̢n͡ͅv͍̯o̤̭k̟͞e̗͞: String = "yospos" 2> print(i̢n͡ͅv͍̯o̤̭k̟͞e̗͞) yospos 3> let Yͨ̅O̤ͤS͊̀P̓̇Oͬ̈S̈́̂ = "bithc" Yͨ̅O̤ͤS͊̀P̓̇Oͬ̈S̈́̂: String = "bithc" 4> print(Yͨ̅O̤ͤS͊̀P̓̇Oͬ̈S̈́̂) bithc
|
# ? Oct 23, 2020 22:17 |