|
Xarn posted:I think Python is better because Perl and Perl culture encourages terse and clever code. you have not seen what i have seen done in python list comprehensions
|
# ? Jul 10, 2019 21:31 |
|
|
# ? May 31, 2024 07:08 |
yeah i forgot to mention “pythonic code” in response to that
|
|
# ? Jul 10, 2019 21:32 |
|
python is pretty neat
|
# ? Jul 10, 2019 21:49 |
|
AggressivelyStupid posted:python is pretty neat wow username post combo!!!
|
# ? Jul 10, 2019 21:50 |
|
Symbolic Butt posted:python is also arguably becoming more perl-like with features like assignment expressions in 3.8 '{}'.format()? PFFT CRUFT. Let's use f'{}', much cleaner. it's so loving dumb quote:python list comprehensions those fuckin rule, i love them, but i usually leave a comment with a link to the official python docs about what's going on Share Bear fucked around with this message at 22:42 on Jul 10, 2019 |
# ? Jul 10, 2019 22:40 |
|
Xarn posted:I think Python is better because Perl and Perl culture encourages terse and clever code. may your code pour like rivers from your fingers, drowning every reader in its impossible length, breadth, and depth every expression, line, file, module, volume composed without the tiniest spark of cleverness staggering in both its vastness and the gaping incuriousness of its crude construction "given enough eyeballs, all bugs are shallow", you mumble to yourself as you repeatedly copy and paste a ten-thousand line function, "simple is better than complex" may your verbosity blot out the sun itself
|
# ? Jul 10, 2019 22:47 |
|
Share Bear posted:i usually leave a comment with a link to the official [...] docs about what's going on this is often a sign you have hosed up badly
|
# ? Jul 10, 2019 22:51 |
|
Internet Janitor posted:may your code pour like rivers from your fingers, drowning every reader in its impossible length, breadth, and depth pretty sure this was the design manifesto for golang
|
# ? Jul 10, 2019 22:51 |
|
Notorious b.s.d. posted:this is often a sign you have hosed up badly those are the times when you passive aggressively rewrite it like a sane person and say "oops must've got stomped in a merge" or just tell them to stop being clever
|
# ? Jul 10, 2019 22:53 |
|
I like Python, it's cool and good.
|
# ? Jul 10, 2019 22:57 |
|
ratbert90 posted:I like Python, it's cool and good. good post/av combo here
|
# ? Jul 10, 2019 23:01 |
|
why doesn't everyone just write APL life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
|
# ? Jul 10, 2019 23:21 |
|
Share Bear posted:'{}'.format()? PFFT CRUFT.
|
# ? Jul 10, 2019 23:23 |
|
Notorious b.s.d. posted:this is often a sign you have hosed up badly i write docs that assume someone hasn't seen all the parts of the language, especially when it's not explicit what is going on code:
is not the clearest logic if you're junior or, more commonly in my experience, never touch python Share Bear fucked around with this message at 23:32 on Jul 10, 2019 |
# ? Jul 10, 2019 23:29 |
|
Share Bear posted:'{}'.format()? PFFT CRUFT. list comprehensions aren’t bad but they should have forbidden putting multiple fors in them because neither order is obviously correct and the one they picked doesn’t match my intuition
|
# ? Jul 10, 2019 23:50 |
|
biggest python peeve for me is that they made map/reduce/filter such a pain to use
|
# ? Jul 10, 2019 23:55 |
|
I am on my hands and knees, begging the software developer community to learn the word "summary" and then utilize it in place of the phrase "too long; didn't read" TL;DR: Zoinkies automagically rewrites your code from scratch to continuously deploy 420% more unicorn fart emojis on your cli progress bar! ftw!
|
# ? Jul 10, 2019 23:58 |
|
idk what this has to do with programming languages, world is a gently caress
|
# ? Jul 10, 2019 23:59 |
|
current hipste status: mad about floats and that disingenious crank gustafson
|
# ? Jul 11, 2019 00:07 |
|
animist posted:why doesn't everyone just write APL nowadays in dyalog apl you could write life ← U ∊⍨ ⊢∘⊂⌺3 3 the core enhancement is the use of a relatively new operator ⌺ (read "stencil") which generalizes the idea of carving up a matrix into uniform-shaped possibly-overlapping tiles, reducing over each tile, and then gluing the results back together; this makes it much easier to express the idea of a neighbor count. several interesting variations can be found here
|
# ? Jul 11, 2019 00:23 |
|
Internet Janitor posted:nowadays in dyalog apl you could write really disappointed that wasn't a link to goatse, not gonna lie
|
# ? Jul 11, 2019 00:26 |
|
suffix posted:current hipste status: mad about floats and that disingenious crank gustafson why? (background in case it matters: I read the post about posits and mostly just shrugged, but I don’t know anything)
|
# ? Jul 11, 2019 00:45 |
|
Soricidus posted:list comprehensions aren’t bad but they should have forbidden putting multiple fors in them because neither order is obviously correct and the one they picked doesn’t match my intuition oh absolutely. i also think they shouldve figured something better for dicts, but you can use the same bs syntax for those too.
|
# ? Jul 11, 2019 00:57 |
|
Sapozhnik posted:I am on my hands and knees, begging the software developer community to learn the word "summary" and then utilize it in place of the phrase "too long; didn't read" tldr: sapozhnik used utilize as use
|
# ? Jul 11, 2019 01:03 |
|
pokeyman posted:why? can’t speak for op and i haven’t followed recent developments (posits is a new term for me) but gustafson’s original propaganda for “unums” etc was way over the top. he made extremely dubious proclamations about ending error forever, hand waved away implementation cost concerns, and generally seemed to pitch it all towards less informed audiences who could be wowed by a slick presentation from a plausible authority figure rather than doing the legwork to get it taken seriously by the sort of people whom he’d need to create actual hardware implementations, build software tools, etc he also took lots of juvenile potshots at William Kahan, aka the father of ieee 754 floating point arithmetic, which was pretty uncool imo
|
# ? Jul 11, 2019 01:33 |
|
Ploft-shell crab posted:biggest python peeve for me is that they made map/reduce/filter such a pain to use that's because list comprehensions are supposed to replace functions, see? Share Bear posted:
so easy! in conclusion, Share Bear posted:never touch python p.s. perl and ruby have much better map/reduce/filter support, but who cares? they are still bad languages.
|
# ? Jul 11, 2019 01:44 |
|
Share Bear posted:i write docs that assume someone hasn't seen all the parts of the language, especially when it's not explicit what is going on thats a p good reason to write the code differently, no? i kind of consider it my job to write easily maintainable and understandable code. syntactic sugar can be really gross if youve ever had to work with scala people
|
# ? Jul 11, 2019 01:52 |
|
suffix posted:current hipste status: mad about floats and that disingenious crank gustafson I wanna hear more too. My first read is that he’s trying to market it hard but if it’s so good then who’s adopting it for which applications? Internet Janitor posted:nowadays in dyalog apl you could write Having just written a higher order function in MATLAB today, I suspect that if I ever learn an APL I’ll start thinking of all my MATLAB manipulations in those terms. not sure if this would make my life or programming better or worse.
|
# ? Jul 11, 2019 01:59 |
|
I also like Ruby and think it’s cool and good. I also like modern C++.
|
# ? Jul 11, 2019 01:59 |
|
we can all agree that no matter how bad Python is, at least it’s not as bad as PHP, the worst Plang of them all.
|
# ? Jul 11, 2019 02:00 |
|
perl is hilarious, but not particularly practical
|
# ? Jul 11, 2019 02:05 |
|
Internet Janitor posted:nowadays in dyalog apl you could write i have no idea if this is BS or not which is why APL is such an excellent language
|
# ? Jul 11, 2019 03:12 |
|
yeah so the thing about fractional math is that every fixed-size representation is going to have trade-offs and weaknesses, and floating-point formats share a lot of them regardless of ieee-ness. like any fixed-size floating-point format is going to have problems with catastrophic cancellation, it just goes with the territory. if you care about maintaining precision or numeric stability you have to design your computations carefully to minimize these problems, and if you care about error bounds you have to do a pretty obnoxious analysis to figure them out. but gustafson has a long history going back to his unums work of talking like his formats don't have any of these problems and just magically eliminate them so that all you have to do is copy formulas out of a paper. and he loves to cherry-pick examples that perfectly cause precision problems with ieee but don't quite with his formats. and if you point any of this out then he immediately retreats to talking about some alternative idea which either applies equally well to ieee floats, like doing some intermediate computations with extra precision, or is poorly-specified to the extreme, like dynamically falling back on extra storage for extra precision when you realize you need it. also he has these recurring ideas that are basically interval arithmetic but which he doesn't like to call interval arithmetic because he similarly wants to pretend that they don't have any of the well-known drawbacks of intervals unums were ten different ideas at once and you could never nail down what the hell he was talking about concretely. posits are more carefully specified which of course means they have identifiable problems: they're basically ieee floating point with a variable-width exponent field, plus some totally unnecessary quirks. so they generally have a larger dynamic range than ieee — which is pretty silly, the exponent range of a 32-bit ieee float is already ridiculously excessive — but less precision at those dynamic extremes, which squeezing out a few extra bits of precision when the value is closer to 1. thus gustafson loves to pick algorithms that have poor numeric properties (for any format) and then use "arbitrary" inputs that trigger catastrophic cancellation for ieee but don't quite for posits of the same size because there's an extra two bits of precision in that range so the basic problems here are, first, that all the numeric problems with ieee floats are still there, they're just an extra four or five bits away at best, and so you really do still need to carefully design your computation to have good numeric properties; and second, that you also still need to do error analysis, and the posit error analysis is much more difficult and specific to the actual range of input values than ieee error analysis; and finally, that the variable-width exponent field is a huge problem for hardware and so posit math is basically doomed to be something like twice as slow as ieee fp math
|
# ? Jul 11, 2019 03:56 |
|
the real problem here is that most programmers are essentially enthusiastic amateurs about everything in technology up to and including the things they get paid to spend 70 hours a week 10x'ing about. so they are aware of a laundry list of known problems with floating-point but are too unsophisticated to reason about which are inherent and which could theoretically be fixed, which of course means they're easily susceptible to the tech equivalents of sidewalk preachers, laying down the good word with enough technical-sounding authority to sweep in the credulous like, you are probably aware that .1 + .2 != .3 in floating-point math. this class of problem is inherent to binary floating-point, and if any particular example doesn't show in a format it's a funny coincidence of the exact rounding being done. posits are still binary floating-point, so nothing about them solves any of this, and not even gustafson claims they do. and yet you can find people talking about .1 + .2 whenever this comes up
|
# ? Jul 11, 2019 04:07 |
|
that is all v insightful, thanks!
|
# ? Jul 11, 2019 05:02 |
|
Notorious b.s.d. posted:you have not seen what i have seen done in python list comprehensions Seen? I wrote them Share Bear posted:i write docs that assume someone hasn't seen all the parts of the language, especially when it's not explicit what is going on Also this is terrible and a half step over C++ code:
|
# ? Jul 11, 2019 09:32 |
|
yes all of this after his first two wildly impractical attempts he has through persistence and accident landed on a specification that arguably has some accuracy advantages within certain ranges but the grandiose claims are still copy-pasted from the first version he touts no overflow!! as some big advantage but of course he's just capped the result so MAX_NUM*MAX_NUM = MAX_NUM, oh and also i think MAX_NUM/2 = MAX_NUM because the precision at each end is completely poo poo the end of the scales are basically dynamic range penis extenders you never want to touch, while ieee floats have useful precision within their range the 16-bit posits have worse precision than half-precision floats for all numbers higher than 64, hope you picked your si units really really carefully but wait, it turns out 16-bit posits can "punch above their weight class" with the simple addition of a 256-bit accumulator! https://marc-b-reynolds.github.io/math/2019/02/06/Posit1.html has a decent explanation on how the extremely cherry-picked computation examples makes two extra bits of precision in certain ranges seem like the second coming of turing
|
# ? Jul 11, 2019 12:37 |
|
William Kahan has decisively dismantled everything Gustafson has wrote on unums and posits and it just feels like he's reminding everyone of his original work getting IEEE 754 done
|
# ? Jul 11, 2019 13:28 |
|
that’s good stuff suffix, thanks! only understood like a quarter of it but I’ll read it a few more times
|
# ? Jul 11, 2019 13:37 |
|
|
# ? May 31, 2024 07:08 |
|
Xarn posted:Seen? I wrote them OK so what is the preferred way to transform another class or dict or other list into a new list? I thought this was pretty snappy. I also think there are levels of syntactic sugar that are appreciable, like this as opposed to f-strings I generally also don’t see the fault in writing comments assuming that someone might look at your code and not understand it on its face. I am usually this person, dealing with other people’s code, and would love more comments about someones wild Java streams chain or Scala nonsense or python garbage Maybe I should stick to the terrible programmer thread Share Bear fucked around with this message at 19:02 on Jul 11, 2019 |
# ? Jul 11, 2019 18:45 |