|
quiggy posted:yup, c++03 for me yeah, erasing one at a time means you gotta do it in that order, or else. you could store indices instead of iterators, but then you'd still have to go thru it backwards are you memory limited b/c i would have written it as: code:
|
# ? Nov 17, 2016 03:54 |
|
|
# ? May 24, 2024 18:53 |
|
Bloody posted:I literally cannot even guess what [&] might do something like 'variables used inside the body of the lambda are copied-by-reference from the enclosing scope' im against it b/c you're playing with fire if there's a chance of things going out-of-scope before the lambda gets called
|
# ? Nov 17, 2016 03:57 |
|
Bloody posted:I literally cannot even guess what [&] might do i know the [] before the lambda indicates those variables are captured from enclosing scope, so i assume that says to capture by reference or something fritz posted:yeah, erasing one at a time means you gotta do it in that order, or else. you could store indices instead of iterators, but then you'd still have to go thru it backwards vector::erase() requires an iterator as the argument, so i've gotta have an iterator somewhere. might as well just store them because im not super memory limited. i am time limited however; the whole of this particular project needs to run in less than 10ms/cycle. the fewer lookups i can do on a specific object, the better
|
# ? Nov 17, 2016 04:09 |
|
we had a separate qa team and dev team until a few weeks ago when the product exec reckoned the reason we were always late shipping new versions was because the qa team was bad at testing so they fired half the qa team and made the other half devs and said that devs do testing now this is going about as well as you might expect
|
# ? Nov 17, 2016 04:20 |
|
unless i'm misreading (and i very well may be) y'all are getting confused by the totally reasonable intuition that remove_if actually removes things from the container it does not
|
# ? Nov 17, 2016 04:23 |
|
oh my god these fonts feel amazing on my eyeballs https://blog.golang.org/go-fonts
|
# ? Nov 17, 2016 04:56 |
|
MALE SHOEGAZE posted:oh my god these fonts feel amazing on my eyeballs lmao
|
# ? Nov 17, 2016 05:19 |
|
lol
|
# ? Nov 17, 2016 05:35 |
|
Bloody posted:i strongly dislike the use of var in c# because i once came across a project that exclusively used var and in trying to read it i almost died because it was pointlessly hard to read and using intellisense to figure out what every loving method returned so i could have some idea of what the hell was going on in this program was pointlessly inconvenient wow look at this idiot
|
# ? Nov 17, 2016 05:39 |
|
Bloody posted:wow look at this idiot lol
|
# ? Nov 17, 2016 06:02 |
|
Bloody posted:wow look at this idiot var is good, and type lookups only take me three key presses. maybe fix your editor if looking up types is difficult.
|
# ? Nov 17, 2016 06:32 |
|
Bloody posted:wow look at this idiot lmao. yeah, i was never a var hater but i was always pretty shy about using it for anything but explicit-type-on-rhs (so basically var butt = new Butt() and nothing else). then i just said gently caress it, started using var for everything but primitive types. turns out the sky didn't fall and i can still understand my code??
|
# ? Nov 17, 2016 06:33 |
|
looks phenomenal in emacs on my retina display. I love the playful-yet-seriousness of it, like go itself.
|
# ? Nov 17, 2016 06:39 |
|
a hideous font for a hideous language.
|
# ? Nov 17, 2016 06:41 |
|
MALE SHOEGAZE posted:
lmao @ everything in this screenshot
|
# ? Nov 17, 2016 06:46 |
|
- not windows - not visual studio 2015 - not c# - not one of consolas, source code pro, or hack
|
# ? Nov 17, 2016 06:48 |
|
MALE SHOEGAZE posted:
it looks like the Roman lettering in the typical Chinese font
|
# ? Nov 17, 2016 06:55 |
|
it's source code pro when I'm not in go-mode
|
# ? Nov 17, 2016 06:56 |
|
trying it out now my first impression is that the monospace version is too serify for my liking, but the proportional one is pretty needs-suiting
|
# ? Nov 17, 2016 07:03 |
|
triple sulk posted:- not windows Correspondingly: - don't want to hang self
|
# ? Nov 17, 2016 07:05 |
|
I mean, consolas is p good tho
|
# ? Nov 17, 2016 07:05 |
|
VOTE YES ON 69 posted:Correspondingly: why would using the best development toolset (visual studio and c#) make you want to hang yourself
|
# ? Nov 17, 2016 07:18 |
|
that font looks like it's out of a lovely 90s cs book so it's goddamn pitch perfect for Go lmao
|
# ? Nov 17, 2016 07:55 |
|
"hey remember that old dumpster we fished Go out of? maybe we could go back and dig out the font we used for code examples in practice of programming!!" - rob pike
|
# ? Nov 17, 2016 08:02 |
|
best coding font for best language and development environment
|
# ? Nov 17, 2016 08:06 |
|
but what does it look like
|
# ? Nov 17, 2016 08:07 |
|
anthonypants posted:but what does it look like lots of examples courtesy Ralf Moeller the very bottom one is similar to how one could read the forums if Radium 2.0 enables the creation of an NNTP gateway
|
# ? Nov 17, 2016 09:45 |
MALE SHOEGAZE posted:
lol what kind of baby uses syntax highlighting when writing go
|
|
# ? Nov 17, 2016 09:58 |
|
MALE SHOEGAZE posted:
it looks like the default japanese font for latin characters
|
# ? Nov 17, 2016 10:29 |
|
raminasi posted:unless i'm misreading (and i very well may be) y'all are getting confused by the totally reasonable intuition that remove_if actually removes things from the container ok what
|
# ? Nov 17, 2016 10:54 |
|
redleader posted:ok what it removes "ifs" from the code
|
# ? Nov 17, 2016 11:16 |
|
redleader posted:ok what ahahahaha I just looked it up, expecting that it would just return the new pbegin iterator which would skip the filtered entries but nooooooooope here's the example code C++ code:
{2,4,6,8,5,6,7,8,9} qntm fucked around with this message at 11:48 on Nov 17, 2016 |
# ? Nov 17, 2016 11:45 |
|
so it prints 2 4 6 8 and absolutely fuckin destroys the original array? i'm terrified by what it could/would do to a more elaborate data structure i'm sure there's a really good and graybeardy reason for this, but holy poo poo give me a well-behaved, intuitive, modern lang any day
|
# ? Nov 17, 2016 11:57 |
|
on the topic of modern langs, here's a summary of the new features in c# 7 tuples will be nice to have. everything else strikes me as being pretty niche or situational from initial impressions
|
# ? Nov 17, 2016 12:01 |
|
redleader posted:so it prints 2 4 6 8 and absolutely fuckin destroys the original array? No no, it just isn't able to resize the container for you since it works on any forward iterator. The items that meet the requirements of the predicate are moved to the start of the range, the rest you can't depend on having any particular value. The docs explicitly mention you need to use your container's erase method or what have you to actually resize the container. I could be missing something, after all I am represented by the thread title, but this makes perfect sense to me Fergus Mac Roich fucked around with this message at 12:10 on Nov 17, 2016 |
# ? Nov 17, 2016 12:03 |
|
the one which caught me out is when you access a map element which doesn't exist, C++ just adds a new element to the map and returns it
|
# ? Nov 17, 2016 12:10 |
|
qntm posted:the one which caught me out is when you access a map element which doesn't exist, C++ just adds a new element to the map and returns it now that's fuckin crazy, but I guess there isn't a convenient tombstone like in a language where everything is a nullable reference.
|
# ? Nov 17, 2016 12:12 |
|
Fergus Mac Roich posted:now that's fuckin crazy, but I guess there isn't a convenient tombstone like in a language where everything is a nullable reference. it is, again, a classic example of something which makes perfect sense if you think about it for an hour but is the very last thing that anybody would actually expect to happen
|
# ? Nov 17, 2016 12:15 |
|
Fergus Mac Roich posted:now that's fuckin crazy, but I guess there isn't a convenient tombstone like in a language where everything is a nullable reference. Plus it lets you do map["butt"] = "fart"; Thus saving you from having to do a lookup then an insert!1
|
# ? Nov 17, 2016 12:21 |
|
|
# ? May 24, 2024 18:53 |
|
MALE SHOEGAZE posted:oh my god these fonts feel amazing on my eyeballs hey, I always wanted my code to look like chinese fonts
|
# ? Nov 17, 2016 14:01 |