|
tef posted:.sort(reversed=True) so you specify that per key in the tuple?
|
# ? Jan 19, 2015 04:23 |
|
|
# ? May 23, 2024 03:52 |
|
tef posted:i am really curious what cmp stuff people are doing because i really don't ever write them since i stopped doing java the quasilexicographic order is pretty handy
|
# ? Jan 19, 2015 04:25 |
|
Subjunctive posted:so you specify that per key in the tuple? oh reverse sort on a subset of a property? i guess you'd have to wrangle with a key function
|
# ? Jan 19, 2015 04:32 |
|
tef posted:i use key more than i ever used cmp. most of the python types already have comparisons, and for user types, implementing <, >, >=, <= is usually enough. it is the ultimate ironing of ironings that python managed to find the most boilerplate possible way of doing default comparisons
|
# ? Jan 19, 2015 05:33 |
|
i have strong opinions about sorting,
|
# ? Jan 19, 2015 06:40 |
|
multigl posted:i have strong opinions about sorting, Any program is just a sort with a sufficiently complicated comparison operator. This is serious stuff.
|
# ? Jan 19, 2015 09:15 |
|
Athas posted:Any program is just a sort with a sufficiently complicated comparison operator. This is serious stuff. i wish u'd sort ur posting out op
|
# ? Jan 19, 2015 10:02 |
|
tef posted:i am really curious what cmp stuff people are doing because i really don't ever write them since i stopped doing java something like Java code:
|
# ? Jan 19, 2015 14:19 |
|
MononcQc posted:Python programmers are known to work in memory constrained environments and never complain about speed of their programs, so that change was totally unwarranted. Lol yeah lemme fire up a garbage collected interpreted scripting language for a loving memory constrained environment. Let's just add in some nodejs for when we need to get close to the metal.
|
# ? Jan 19, 2015 16:33 |
|
Max Facetime posted:something like this is using a key function ???
|
# ? Jan 19, 2015 17:12 |
|
the only time i have done something with a sort other than sorting numeric values or maybe strings in a default way was when i lazily used it to shuffle a list but i ultimately wound up adding a separate key to the item i was sorting that was pseudorandomly defined at instantiation (which was very important because for a given seed the random ordering had to be the same) and then sorting however c# wanted to on that key.
|
# ? Jan 19, 2015 17:15 |
|
Bloody posted:the only time i have done something with a sort other than sorting numeric values or maybe strings in a default way was when i lazily used it to shuffle a list but i ultimately wound up adding a separate key to the item i was sorting that was pseudorandomly defined at instantiation (which was very important because for a given seed the random ordering had to be the same) and then sorting however c# wanted to on that key. again this is a key, not a comparator.
|
# ? Jan 19, 2015 17:26 |
|
tef posted:this is using a key function ??? yes, isn't it amazing how flexible comparators are??
|
# ? Jan 19, 2015 17:37 |
|
tef posted:again this is a key, not a comparator. i also do not give even a single gently caress. i gave an object a property and asked linq to sort the objects on that property and it did.
|
# ? Jan 19, 2015 17:44 |
|
Bloody posted:Lol yeah lemme fire up a garbage collected interpreted scripting language for a loving memory constrained environment. Let's just add in some nodejs for when we need to get close to the metal.
|
# ? Jan 19, 2015 17:46 |
|
|
# ? Jan 19, 2015 17:47 |
|
this is a weird debate since there is literally no way to defend the decision of removing the cmp= bit, proven by loving *guido* showing regret, so what can we even argue about other than randomly explaining how some things are not java to shaggar?
|
# ? Jan 19, 2015 18:48 |
|
Cybernetic Vermin posted:this is a weird debate since there is literally no way to defend the decision of removing the cmp= bit, proven by loving *guido* showing regret, so what can we even argue about other than randomly explaining how some things are not java to shaggar? if you don't want to read page after page of nerds talking past each other over trivial bullshit, i don't know why you read this thread
|
# ? Jan 19, 2015 19:07 |
|
Brain Candy posted:if you don't want to read page after page of nerds talking past each other over trivial bullshit, i don't know why you read yospos
|
# ? Jan 19, 2015 19:09 |
|
too easy really
|
# ? Jan 19, 2015 19:10 |
|
Staples Easy Button TM
|
# ? Jan 19, 2015 19:58 |
|
there's many many good reasons to remove something that serves a similar purpose for the sake of language design see js, c++
|
# ? Jan 21, 2015 05:36 |
Honestly I think that having more ways of doing something usually makes a language richer and more expressive, and I would much rather have many ways of doing something than be forced into something clunky because the natural way isn't "pythonic" or something. Also C++ has its warts but it is a much, much, much, much, much better-designed language than javascript.
|
|
# ? Jan 21, 2015 06:44 |
|
i still don't get the joke???????
|
# ? Jan 21, 2015 06:56 |
|
Suspicious Dish posted:Staples Easy Button TM my girlfriend used to work at staples i wish she had an easy button!!!!
|
# ? Jan 21, 2015 06:57 |
|
MALE SHOEGAZE posted:my girlfriend used to work at staples she does
|
# ? Jan 21, 2015 07:06 |
|
its just a lil hard to find
|
# ? Jan 21, 2015 07:16 |
|
VikingofRock posted:Also C++ has its warts but it is a much, much, much, much, much better-designed language than javascript. One usually is greater than zero, yes.
|
# ? Jan 21, 2015 07:26 |
|
VikingofRock posted:Honestly I think that having more ways of doing something usually makes a language richer and more expressive, and I would much rather have many ways of doing something than be forced into something clunky because the natural way isn't "pythonic" or something. Hm, yes, the design of a language designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support, can be meaningfully compared to
|
# ? Jan 21, 2015 07:42 |
|
roflmao if you ever use python for anything
|
# ? Jan 21, 2015 07:45 |
MALE SHOEGAZE posted:Hm, yes, the design of a language designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support, can be meaningfully compared to meh I think you can compare the overall design of two languages even if they were designed to do different things. the post I was responding to said that C++ suffers from poor design and feature bloat, and I while you can make a case for both it's pretty ridiculous to imply that c++'s design is bad on the level of js.
|
|
# ? Jan 21, 2015 08:07 |
|
JewKiller 3000 posted:roflmao if you ever use python for anything i used to like python and then i figured out haskell is way better
|
# ? Jan 21, 2015 08:11 |
fart simpson posted:i used to like python and then i figured out haskell is way better the truth
|
|
# ? Jan 21, 2015 08:41 |
|
fart simpson posted:i used to like python and then i figured out haskell is way better
|
# ? Jan 21, 2015 09:14 |
|
C is Manly, Python is for "n00bs": How False Stereotypes Turn Into Technical "Truths"
|
# ? Jan 21, 2015 10:08 |
|
quote:We should not beckon people into our field only to then ostracize them for the sin of learning PHP. you are absolved of your sin, tbc
|
# ? Jan 21, 2015 10:20 |
|
I think we'd all be happier not thinking about any of this and just make money pretending to know how to program.
|
# ? Jan 21, 2015 11:47 |
|
VikingofRock posted:meh I think you can compare the overall design of two languages even if they were designed to do different things. the post I was responding to said that C++ suffers from poor design and feature bloat, and I while you can make a case for both it's pretty ridiculous to imply that c++'s design is bad on the level of js. I did not imply what you think I implied. Using multiple examples does not imply complete equivalence
|
# ? Jan 21, 2015 11:52 |
|
compuserved posted:C is Manly, Python is for "n00bs": How False Stereotypes Turn Into Technical "Truths" lol really?
|
# ? Jan 21, 2015 13:02 |
|
|
# ? May 23, 2024 03:52 |
|
python is for snake aficionados
|
# ? Jan 21, 2015 15:08 |