|
Thanks for all the python posts. I had started just reading the official docs, sounds like I might as well just continue with that
|
# ? Jul 10, 2020 13:20 |
|
|
# ? Apr 29, 2024 05:51 |
|
Carthag Tuek posted:yea the stringly typed forward annotations are so bad I thought they’d fixed it by just making them implicitly always be strings
|
# ? Jul 10, 2020 13:22 |
|
golang update: not only are they keeping their own code in the vendor directory, bits of it are also randomly scattered around other censored libraries I thought go was supposed to be super strict about following conventions but it seems like directory structure is just do whatever the gently caress you like. why didn’t they just copy maven, “your source code goes here” is way easier to sell people on than “your preferred brace placement is a compile error” e: censored was supposed to say vendored but I liked the autocorrect
|
# ? Jul 10, 2020 13:26 |
|
Carthag Tuek posted:yea the stringly typed forward annotations are so bad To be fair though, if you do declare the type before using it, you don't have to switch to strings, right?
|
# ? Jul 10, 2020 14:14 |
|
Soricidus posted:I thought they’d fixed it by just making them implicitly always be strings idk maybe in 3.9? it doesnt work in 3.8.3 code:
|
# ? Jul 10, 2020 14:20 |
|
MononcQc posted:To be fair though, if you do declare the type before using it, you don't have to switch to strings, right? yeah that works
|
# ? Jul 10, 2020 14:21 |
|
oh, actually it works if you put from __future__ import annotations so i guess its in 3.9 or 4.0
|
# ? Jul 10, 2020 14:22 |
|
Type and constant declarations should be at the top of the file anyway so you can think of that as an accidental lint rule
|
# ? Jul 10, 2020 14:28 |
|
xtal posted:Type and constant declarations should be at the top of the file anyway so you can think of that as an accidental lint rule sometimes you cant avoid referring to later declarations code:
|
# ? Jul 10, 2020 14:42 |
|
Asleep Style posted:Thanks for all the python posts. I had started just reading the official docs, sounds like I might as well just continue with that I really like the official docs. I just wish they had a trove of "pythonic" patterns to show some of the stuff you can do with Python that aren't immediately obvious. Like pathlib overloading the / operator to make assembling paths look more natural, which is both a hacky hack but also pretty neat. Python can be abused in so many crazy ways, it's pretty fun.
|
# ? Jul 10, 2020 15:06 |
|
python is a clownshow https://lwn.net/Articles/823292/ quote:> Van Rossum said there was an element of "because we can" to the idea; quote:Eventually the kindest thing you can do for any old horse is to take it out back and shoot it. Python has the same fundamental defect as GNOME which is that its creators consider it to be a fun hobby to tinker with on the weekends, not something that third parties should be foolish enough to actually depend on and expect any sort of stability guarantees out of.
|
# ? Jul 10, 2020 15:11 |
|
yep, that's python alright. or actually there are two things at play at once: 1. just refusing to realize that their incredibly lovely implementation has very little value except as one minor link in the chain of enabling the entire ecosystem, especially the production software running on it. keeping your crap interpreter "clean" by breaking vast amounts of way more important software is insulting. 2. just hating the user. e.g. the classic where writing 'exit' in the repl having special code which exists only to tell the user that the repl fully understood what you meant to do, but that you are supposed to do it in another way (pressing ctrl+d). changing print back and forth falls mostly in this category.
|
# ? Jul 10, 2020 15:27 |
|
when I type exit in the repl (which I use like twice yearly) I always think of the "did you just tell me to go gently caress myself?" comic strip
|
# ? Jul 10, 2020 15:33 |
|
rust: the book had to take the first 50% to explain syntax before it could get to the first demo project.
|
# ? Jul 10, 2020 15:59 |
|
Phobeste posted:it's true and you can tell because like with web microservices doing anything useful with standard unix command line tools requires building an elaborate ramshackle structure of bullshit i want to meet the person who tried to emulate pipes in soa
|
# ? Jul 10, 2020 16:09 |
|
pokeyman posted:when I type exit in the repl (which I use like twice yearly) I always think of the "did you just tell me to go gently caress myself?" comic strip tho im starting to build muscle memory for ctrl-d (i usually get to "ex" before remembering), but it will take a while yet considering how rarely i use it
|
# ? Jul 10, 2020 16:12 |
|
I like it, because I don't get weird behaviour dependent on whether I declared an exit variable or not. If you want REPL that tries to implement DWIM at the cost of surprising behaviour, IPython is one install command away.
|
# ? Jul 10, 2020 17:20 |
|
Corla Plankun posted:i don't get why people want typed python. if you need help keeping track of the typed of objects, your script is too big and you should switch to a big boy language imo because they failed to switch to a big boy language 10 years ago and it's easier to add types to python than to rewrite in a different language
|
# ? Jul 10, 2020 18:00 |
|
where's tef to tell us to delete our code
|
# ? Jul 10, 2020 18:11 |
|
"if you need types your script is too big" has the same feel to it as arguing your calculator doesn't need a decimal point because any mathematician worth his salt can keep track of where the decimal point should be. anyways python is bad, don't use it.
|
# ? Jul 10, 2020 18:17 |
|
python remains the best plang and on balance its a deec lang, its just that the balance is composed of a buncha best in the industry deals and a buncha absolutely crap deals. highs are very high, lows are very low
|
# ? Jul 10, 2020 18:20 |
|
Carthag Tuek posted:where's tef to tell us to delete our code i actually unironically looked up that article and recommended it to a coworker who was stuck in design paralysis and it worked great. thanks tef
|
# ? Jul 10, 2020 18:22 |
|
Phobeste posted:i actually unironically looked up that article and recommended it to a coworker who was stuck in design paralysis and it worked great. thanks tef thef
|
# ? Jul 10, 2020 18:29 |
|
Jerry Bindle posted:"if you need types your script is too big" has the same feel to it as arguing your calculator doesn't need a decimal point because any mathematician worth his salt can keep track of where the decimal point should be. anyways python is bad, don't use it. eh, not really. not having a decimal point doesn't actually make things easier when you don't need it. dynamic types do simplify things sometimes.
|
# ? Jul 10, 2020 19:39 |
|
yeah dynamic types do simplify the process of loving up and doing things wrong
|
# ? Jul 10, 2020 19:55 |
|
sorry i'm losing my mind and i'm just being an rear end in a top hat. python is fine, dynamic types are fine, hell even dynamic scoping is fine. everything is fine. the important part of computers is solving human problems.
|
# ? Jul 10, 2020 19:59 |
|
Jerry Bindle posted:sorry i'm losing my mind and i'm just being an rear end in a top hat. python is fine, dynamic types are fine, hell even dynamic scoping is fine. everything is fine. the important part of computers is solving human problems. nah you're right this time imo even Python and Javascript (well typescript) both moved to static typing for non-clownshoes stuff just about everything you might want to do with dynamic typing you can do with polymorphism instead, except controlled
|
# ? Jul 10, 2020 20:05 |
|
the secret of computer touchin is that it always starts as clownshoes stuff
|
# ? Jul 10, 2020 20:06 |
|
there is no good reason to use dynamic typing. none. i will die on this hill
|
# ? Jul 10, 2020 20:35 |
|
bob dobbs is dead posted:the secret of computer touchin is that it always starts as clownshoes stuff true. never write a prototype, it will immediately become your production system
|
# ? Jul 10, 2020 21:50 |
|
"there is no such thing as a prototype"
|
# ? Jul 10, 2020 21:57 |
|
DELETE CASCADE posted:there is no good reason to use dynamic typing. none. i will die on this hill there doesn't need to be a good reason
|
# ? Jul 10, 2020 22:10 |
|
like, in racket dynamic typing is fine because you're already doing case analysis on all the parameters anyways. and if you're doing racket you're jerking off at a east coast university or in france somewhere, or something. it doesn't matter. you don't need to have a reason to do this. you just do it and smile.
|
# ? Jul 10, 2020 22:12 |
|
if you're using racket then you should be using typed racket
|
# ? Jul 10, 2020 22:17 |
|
The secret is to only have one type, bytes
|
# ? Jul 10, 2020 22:24 |
|
taqueso posted:The secret is to only have one type, bytes its bits
|
# ? Jul 10, 2020 22:37 |
|
nibbles
|
# ? Jul 10, 2020 23:42 |
|
I thought it was sets or lambdas??
|
# ? Jul 11, 2020 00:00 |
|
I should be able to link verilog or vhdl with my normal code
|
# ? Jul 11, 2020 00:03 |
|
|
# ? Apr 29, 2024 05:51 |
|
if you write a prototype for demo purposes, and then you demo the prototype to management, you will end up shipping that prototype, so i don’t think you should write things as if you will get the luxury of throwing them away.
|
# ? Jul 11, 2020 00:33 |