|
tef posted:3. tests slow down refactoring I see your method call assertions and raise you checking non-atomic call counters from different thread.
|
# ¿ Sep 28, 2015 16:59 |
|
|
# ¿ May 4, 2024 00:05 |
|
Structural typing
|
# ¿ Oct 18, 2015 21:42 |
|
Wheany posted:i'm going to send you a cv that says that i'm really good at both c/c++ and java/javascript
|
# ¿ Oct 24, 2015 19:53 |
|
fart simpson posted:i think the haskell style guides recommend not using list comprehensions anymore huh, why?
|
# ¿ Nov 29, 2015 23:20 |
|
Dessert Rose posted:like wow i knew he was an idiot but syntax highlighting I refuse to believe anything else. Rob Pike posted:“Aside from that, everybody knows a tab is 8 spaces wide."
|
# ¿ Dec 10, 2015 20:14 |
|
Bloody posted:expressiveness is good. lack of it is why assembly and verilog are bad. Counterpoint: Perl.
|
# ¿ May 30, 2016 21:40 |
|
Not sure I want my kernel aborting when OOM or some internal counter overflows.
|
# ¿ Jul 23, 2016 13:00 |
|
Asymmetrikon posted:also the opinions, reified returns are maybe the worst possible option in the history of coding Agreed.
|
# ¿ Jul 23, 2016 18:24 |
|
rjmccall posted:... or they'll say that accessing the memory is an unsafe operation, so it has to be done in an unsafe block, and once you do that of course you can have races again. and rust forces basically everything that could possibly be unsafe to be done in an unsafe block, like calling a c function This is basically how I imagine a theoretical transpiler to rust would work. Start the program with a huge, fuckoff unsafe block, write everything there, done. And its also why its extremely dumb idea.
|
# ¿ Jul 24, 2016 09:11 |
|
Wheany posted:What about dlang users? Those still exists? Lichy posted:my other option this term for this slot was parasitology and I think I've had enough interactions with management students to make that redundant so Also C++ is p. nice, as long as you are willing to devote your life to not learning the whole language.
|
# ¿ Sep 29, 2016 15:58 |
|
Yes, the whole IoT thing is a good idea and not horrible poo poo show breaking everything everywhere. We definitely should replace lot of core poo poo in our OS and make it easy for web browser to send commands.
|
# ¿ Sep 29, 2016 16:14 |
|
AWWNAW posted:i haven't used C++ in like 10 years and was never that deep into it, and the complexity always turned me off. whenever I see job descriptions that call for C++ experience, I wonder how they evaluate that experience when supposedly everyone that uses the lang only uses a subset of it, and probably not the same subset the employer's looking for? do they just ask generic questions about virtual destructors or something? My interview for jr. dev using C++ and only C++* consisted of some basic C++ questions like virt. destructor, virt. inheritance and some broader questions, like how do you round up a float without using library functions. The fact that the questions were all about how to write Java in C++ should've probably warned me, but didn't at the time. * Except writing C# bcoz of Xamarin, C# for windows tools and getting to be the only person who knew how our build worked.
|
# ¿ Sep 29, 2016 16:22 |
|
VikingofRock posted:The C++ I use almost entirely avoids inheritance so any question on inheritance requiring a more complicated answer than "make destructors virtual if your class is going to be inherited from" would probably trip me up. C++ is a *huge* language. Oh yeah. Inheritance itself is not bad, but gently caress deep hierarchies with virtual functions forever and virtual inheritance is a good signifier that you have hosed up somewhere
|
# ¿ Sep 29, 2016 18:06 |
|
hackbunny posted:I'm pretty sure I know and/or have used all of c++. yes, I even wrote my own iostream (what a bizarre api). well, I used to, because the newer things I haven't had a chance to use yet. I know what they're for because rvalue references/move semantics/perfect forwarding/lambda syntax for functors/etc. are all things I wished c++ had because they were obvious blind spots in the language, but I don't fully understand them and their corner cases. rvalue vs universal references in general and perfect forwarding in particular still escape me a little, and I haven't learned variadic template syntax yet, I know an ellipsis is involved but I can never remember where it goes exactly So basically pre C++11? Catching up with C++17 is gonna be fun, just for template instantion guides for templated classes, because you can now construct std::pair<int, int> as std::pair{1, 2} and it will deduce the template types from the constructor. "So, what do we do we range-constructors (constructors that are templated on iterators and construct container from range delimited by 2 iterators)" you might ask. Well, you give them a hint called explicit deduction guide C++ code:
|
# ¿ Sep 30, 2016 09:08 |
|
Note that saying dereferencing makes absolutely no sense -- its just type of references. (Words are important OK? C++ is hard enough without confusing wording)
|
# ¿ Sep 30, 2016 09:10 |
|
This of course has the problem of potentially performing a costly conversion in addition to a copy (think assigning const char* to std::string) so you obviously have to template harder.C++ code:
So that eliminated the conversion if possible. Now how about copies? Well thats where perfect forwarding comes back.* C++ code:
Its important to remember that this doesn't work without the std::forward properly, because r-values really like to stop moving. Once you name them, even if you have r-value reference to a temporary, they are no longer moved automatically. This means that this C++ code:
C++ code:
C++ code:
C++ code:
C++ code:
The above might not be entirely true, I haven't even had my first coffee, but it should be roughly correct.
|
# ¿ Oct 1, 2016 11:20 |
|
Shaggar posted:uwp/wpf are also better than anything else as far as ui frameworks go Why do then the new MS UWP apps suck so drat badly?
|
# ¿ Oct 1, 2016 16:42 |
|
Cybernetic Vermin posted:i freely admit that i am an idiot and a sucker for being pointlessly different in having a w10m phone, but holy hell the few high effort uwp apps i have encountered have been fantastic. mail, calendar, the new skype, as well as minor stuff like the explorer app even. no idea if that is microsoft throwing excessive engineering resources on a bad framework, but they are certainly making the framework looking super-promising to me in a way the previous wpf variant never did vv The new skype for me A) Doesnt send/receive chat messages to people I tried. B) Doesnt show status of people (and people dont see my status either). I guess it at least allows for calling people. (At least once we use different app to communicate being online ) Now, I might just have a horrible case of "Doesn't work on my computer", but it doesn't inspire much confidence...
|
# ¿ Oct 1, 2016 20:43 |
|
pseudorandom name posted:you type the fully qualified type name into Google and then cuss loudly whenever clicking the first result takes you to cplusplus.com instead of cppreference.com This except you have custom search set up for cppreference.com because you are not a dumb dumb.
|
# ¿ Oct 5, 2016 12:18 |
|
Bloody posted:just use visual studio This. If you cannot run VS, YOSPOS!
|
# ¿ Oct 9, 2016 16:02 |
|
leftist heap posted:imo there's more to it than that. the degree to which java inherently needs tooling is generally overstated. its insane popularity and the amount of money being poured into it drove the tooling, but that popularity was certainly driven by its ability to make idiot programmers more productive (or more accurately less outright destructive). maybe i'm just splitting hairs now tho Sadly, that just means even more idiotic programmers will find work.
|
# ¿ Oct 10, 2016 21:27 |
|
If being frustrated after having to keep running SW that was made by lowest cost Indian outsourcer makes me rear end in a top hat, then The industry made me that way.
|
# ¿ Oct 11, 2016 12:16 |
|
more like dICK posted:I'm writing c++ for the first time in like 3 years and my opinion is that c++14 seems good. Its nice.
|
# ¿ Oct 13, 2016 20:07 |
|
Bloody posted:std::make_shared no, make_unique!
|
# ¿ Oct 23, 2016 12:38 |
|
Is that in general, or just for specific ABI? Because if its the former, wow.
|
# ¿ Oct 24, 2016 13:31 |
|
hackbunny posted:I took up python again and remind me why it sucks? I like it so far. it has list comprehensions and generators and what more could I ask Depends. Are you on Python 3.x using MyPy? If the answer is yes, then it is perfectly good language. If you are on 2.7 and using unit tests instead of types, there are some things that hurt a lot (some of which needlessly, like comprehensions leaking scope) Python code:
|
# ¿ Oct 27, 2016 12:56 |
|
gonadic io posted:when i was learning python i was told expressly by the IRC to stop trying to program haskell in it lol I had similar problem in reverse, when I was coding C in Scheme. (Actually I stopped soon enough, but I admit that I definitely started out that way)
|
# ¿ Oct 27, 2016 16:42 |
|
MSPain posted:when interviewing people I look out for wholesale baby-with-the-bathwater type negative statements about languages e.g. 'javascript sucks' (which is sort of a catch phrase around here) Problem with this post is that JS absolutely sucks. Same as PHP. Can you write poo poo in them? Yes, and because of reasons you might actually have to write poo poo in JS. That does absolutely not make them a good language. I would honestly prefer to figure out ways to do webpages in prolog than do PHP again.
|
# ¿ Oct 27, 2016 20:14 |
|
Bognar posted:js would be a good dynamic lang (aka still bad) if it didn't have the type conversion fuckery, prototypical inheritance fuckery (or any semblance of oop really), method arguments fuckery, and stdlib fuckery. sprinkle in a few real numeric types that aren't float and you've got something that at least stinks less than dog poo poo Are you saying that if we took out the bad poo poo out of a lang, it would become less bad?
|
# ¿ Oct 27, 2016 21:14 |
|
hackbunny posted:no, I'm not using python 3 MyPy is optional typing thing for Python. You can get it to work with Python 2.7, but it becomes larger PITA to use in doing so (your type annotations and assertions become comments instead of part of the language...).
|
# ¿ Oct 27, 2016 23:29 |
|
hackbunny posted:why does this class layout make no loving sense, why is the base class in the right place but the base's base at the rear end end of the class why doesn't it show in the debug symbols I currently teach semi introductory course to C++ and our materials on virtual inheritance is "Virtual inheritance exists. Don't use it, everyone else will thank you* * It might be required in some specific circumstances. Don't use it anyway" While our real stance is to use it when necessary, we would rather not have our students try to gently caress with it during our course.
|
# ¿ Oct 28, 2016 17:42 |
|
Dr Monkeysee posted:either way these days i don't run into any packages that don't support 3. I am paid to code for AWS lambda (that means Python 2.7 only)
|
# ¿ Oct 28, 2016 21:57 |
|
comedyblissoption posted:also a bunch of the windows development toolchain cannot deal with paths > ~255 characters Sup buddy, we ran into this problem when crosscompiling to Android, because to use PCH's the toolchain autogenerates crazy paths from existing ones... Basically our path were p. long, Butts/Farts/buttFarts/fartingButts/alsdksdjksjdsk sequence, and the autogenerated paths basically contained the whole thing twice.
|
# ¿ Oct 29, 2016 18:32 |
|
tef posted:strings behave enough like lists to cause everything to go to hell Ugh, somehow I always remember this when it is useful, but forget when it can gently caress me over (until it does and the outputs make absolutely no sense and why is this happening AAAAA )
|
# ¿ Oct 29, 2016 18:36 |
|
cinci zoo sniper posted:you can "hack" your way into python 3 there iirc I think Ive even read you can get anything that runs on aws linux in there, but that seems like a good way to get into the terrible programmers/coding horrors threads.
|
# ¿ Oct 31, 2016 09:30 |
|
Sapozhnik posted:java has spent decades as the Default Teaching Language so all the really bad inexperienced programmers mill around the Java world. Some of them become good programmers over time but the rest have to go somewhere, so Java is it. Sapozhnik posted:I mean, it's not like C++ wasn't also completely batshit back then. But C++ has also changed. It's somehow even more batshit now.
|
# ¿ Nov 3, 2016 11:27 |
|
Sapozhnik posted:
I never got to use C# async/await, so it didn't get chance to excite me much. I loved (or maybe was forced to love, because lmao at Python threading) stackful coroutines in Python tho. Sorry you are wrong about properties tho.
|
# ¿ Nov 3, 2016 15:52 |
|
hackbunny posted:lots of code Always use condition_variable::wait overload that takes a predicate, its neat. Also I am not entirely sure about your cv notifications, I think you can simplify them since you are assuming SPSC, but gently caress reasoning about threads after 6 beers. --- Also I think the case of calling cv::notify under mutex is common enough to have optimized implementation, but ymmv.
|
# ¿ Nov 29, 2016 21:35 |
|
hackbunny posted:simplify, or suppress spurious notifications? because "notify always no matter what" seems simple enough. it's hardly the most pressing issue though: what about the fact that I'm doing some allocations without the specified allocator?! Supress spurious notifications, allocators can suck it. Also look at the bright side of this, C++17 is not that far off. gonadic io posted:i looked variant up, and Do you know how many ways there are to bikeshed a variant? Because if not, look standardization process around std::variant and std::optional
|
# ¿ Nov 30, 2016 00:12 |
|
|
# ¿ May 4, 2024 00:05 |
|
Bloody posted:I am not convinced c++ is a programming language. every conversation about it seems as orthogonal to every other programming chat as a conversation about Verilog would seem MrMoo posted:For a spiffy SPSC queue read you a Lynx Queue, using page faults around a ring buffer to avoid socket contention on the head/tail pointers. Ok, that is really cool idea.
|
# ¿ Nov 30, 2016 09:38 |