|
Private Speech posted:broke: copy code from an open source repo yeah a lot of package managers support git repos now. the real cool one is that javascript variant that can update your github dependencies at runtime instead of at build. forget what its called
|
# ? Jul 9, 2020 07:47 |
|
|
# ? Dec 3, 2024 15:31 |
|
fart simpson posted:yeah a lot of package managers support git repos now. I mean yeah that came to mind, but fair point not that it's better
|
# ? Jul 9, 2020 10:11 |
|
elite_garbage_man posted:ctps: quit the job
|
# ? Jul 9, 2020 16:55 |
|
bob dobbs is dead posted:its not even the previous thread title but i think running to belize should feature in all thread titles it has good beaches and the exchange rate is advantageous they also speak english I went in the 90's as a teenager and the thing that I remember the most is buying glass 1 liter bottles of sprite for $0.50
|
# ? Jul 9, 2020 17:22 |
|
what's the c++ equivalent to java.time.Instant and NSDate? c++17 is ok. c++20 may be ok
|
# ? Jul 9, 2020 17:59 |
|
I always used a mix of std::chrono and boost::date_time, looks like C++20 is making the date handling less lovely, https://en.cppreference.com/w/cpp/chrono
|
# ? Jul 9, 2020 18:04 |
|
I guess I want system_clock::time_point? looks like unix epoch with no leap seconds (de facto until c++20) which matches nsdate (modulo epoch) and java.time.instant by my reading
|
# ? Jul 9, 2020 18:33 |
|
pokeyman posted:I guess I want system_clock::time_point? looks like unix epoch with no leap seconds (de facto until c++20) which matches nsdate (modulo epoch) and java.time.instant by my reading depending on how you're using the time_point, you may want to look into the other C++11 clocks like
|
# ? Jul 9, 2020 19:57 |
|
Any recs for python books for people who can already program? Most of the books on the market seem geared towards new programmers and I've seen enough explanations of for loops at this point
|
# ? Jul 9, 2020 22:12 |
|
but these for loops can have an else block!!
|
# ? Jul 9, 2020 22:43 |
|
python seems really pretty and clean as long as you never interact with its internals or packaging system
|
# ? Jul 9, 2020 23:22 |
|
Asleep Style posted:Any recs for python books for people who can already program? Most of the books on the market seem geared towards new programmers and I've seen enough explanations of for loops at this point Essential Python maybe? Or just read the docs, they're pretty good. https://www.programming-books.io/essential/python/
|
# ? Jul 9, 2020 23:33 |
|
everything’s a hash table, including modules and types. but they’re not all mutable, thank god. indentation instead of braces. it’s fine. scoping is hosed up and anonymous functions can only contain a single expression because guido sucks. that concludes this lecture on python for people who already know how to code.
|
# ? Jul 10, 2020 00:42 |
|
if you dip into numpy land, you have basically dipped into fortranland but if you gently caress up in a specific way you run python vm code and eat a 500x perf loss
|
# ? Jul 10, 2020 00:47 |
|
also functional operators are made intentionally a pain to use because their use is discouraged, like lambdas
|
# ? Jul 10, 2020 01:10 |
|
also the std library has no sorted data structure that is nice to use. you are supposed to call a functions on top of a sorted list, lomarf
|
# ? Jul 10, 2020 01:12 |
|
lotsa deec 3rd party dealios generally, python has the best lib quality for an astounding variety of domains, especially less technical poo poo, cuz domain experts who dont think of themselves as computer touchers end up doin poo poo in python
|
# ? Jul 10, 2020 01:15 |
|
some stuff is getting better. dataclasses are not bad if you want something like records and if you make them frozen you can even use them as dict keys
|
# ? Jul 10, 2020 01:15 |
|
bob dobbs is dead posted:lotsa deec 3rd party dealios I can edit word docs and print them in just a few lines in python yippee
|
# ? Jul 10, 2020 01:44 |
|
I regularly create xls files with python
|
# ? Jul 10, 2020 01:48 |
|
now i'm thinking about using the rust/python compat to take advantage of the much better ecosystem for tasks like this. at least i'm in the right thread.
|
# ? Jul 10, 2020 01:53 |
|
i dislike python. thanks for reading.
|
# ? Jul 10, 2020 03:26 |
|
if you are writing more than 100 lines you probably want mypy. it'll give you static type checking and good autocomplete. however, mypy type definitions probably don't exist for 3/4 of the libraries you're using. also, sometimes you have to use strings instead of identifiers to refer to types. type checking isn't built into the language; the interpreter and the type checker have subtly different scoping rules. Python code:
this also happens whenever you try to refer to a class from one of that class's methods. fun. also, the language is unable to leverage type information for performance (because it's just a bandaid on top of an untyped system). so your code will still run 100x slower than if you used a language with braces. in conclusion mypy is a land of contrasts animist fucked around with this message at 04:09 on Jul 10, 2020 |
# ? Jul 10, 2020 03:57 |
|
if you guve a poo poo about perf use numpy or write in different language
|
# ? Jul 10, 2020 05:32 |
|
one of the special things about python is the fact that its the only normal people lang with a really good property based testing library, called hypothesis. use the hell out of it, it good as hell
|
# ? Jul 10, 2020 05:34 |
|
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
|
# ? Jul 10, 2020 05:35 |
|
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 types are good
|
# ? Jul 10, 2020 05:41 |
|
if your writing more than probably 10 lines you want a real language imo
|
# ? Jul 10, 2020 05:43 |
|
writing in a typed lang will not save you from being a terrible programmer, only the oblivion of death can do that
|
# ? Jul 10, 2020 06:06 |
|
more langs need numpy scipy and most of all matplotlib
|
# ? Jul 10, 2020 06:08 |
|
though I'd actually rather have ggplot2
|
# ? Jul 10, 2020 06:09 |
|
you need to get real numerics peeps on board and they are real fuckin weird peeps if you only have numerics peeps in a lang you get R, lol
|
# ? Jul 10, 2020 06:17 |
|
fart simpson posted:if your writing more than probably 10 lines you want a real language imo
|
# ? Jul 10, 2020 06:19 |
|
my company's main software is all written in python. thousands of lines of code at least i don't work on that project usually
|
# ? Jul 10, 2020 06:51 |
|
bob dobbs is dead posted:writing in a typed lang will not save you from being a terrible programmer, only the oblivion of death can do that you're wrong op, i'm a real poo poo programmer and strong typing makes me slightly less poo poo
|
# ? Jul 10, 2020 09:02 |
|
bob dobbs is dead posted:writing in a typed lang will not save you from being a terrible programmer, only the oblivion of death can do that no, but it’ll make it more obvious where you and your terrible programming colleagues have hosed up sometimes type haters try to argue that testing works just as well. it probably does in theory. the problem is that tests are programs, and the people who write them are the same terrible programmers
|
# ? Jul 10, 2020 09:46 |
|
By the same argument, types will also be bad tho.
|
# ? Jul 10, 2020 10:52 |
|
Xarn posted:By the same argument, types will also be bad tho. Code bad, but there is a lot less code in one type checker than in a million test suites for a million individual projects.
|
# ? Jul 10, 2020 11:09 |
|
animist posted:if you are writing more than 100 lines you probably want mypy. it'll give you static type checking and good autocomplete. however, mypy type definitions probably don't exist for 3/4 of the libraries you're using. hahah gently caress, it's worse than i thought
|
# ? Jul 10, 2020 11:52 |
|
|
# ? Dec 3, 2024 15:31 |
|
yea the stringly typed forward annotations are so bad apparently cant be fixed without rewriting module import from the ground up
|
# ? Jul 10, 2020 12:10 |