|
prefect posted:i've heard that linq can be punishing performance-wise because sometimes you'll wind up calling methods way more than you would have if you'd just used a plain old loop that's because j-languages only way to do polymorphism is at runtime with interfaces and poo poo which is completely ridiculous for things like linq a c++ implementation of linq would own, except that everyone is too lazy to do it
|
# ¿ Jul 25, 2013 16:43 |
|
|
# ¿ May 15, 2024 16:52 |
|
Nomnom Cookie posted:i used c++ in college and then got a java job. now i'm using c++ again after abt 5 years and it seems p nice using boost.asio, shared_ptr, etc. its almost as convenient as java. is this going to bite me in the rear end? tia damnit don't shed your c++ hater label your making me all confused and scared but yeah c++11 is p good and have managed to smooth out many things but still have some rough spots c++03 is a pita to use in comparison. I use it at work and god how im missing lambdas and auto
|
# ¿ Aug 5, 2013 15:21 |
|
Otto Skorzeny posted:i think gcc and clang and msvc mostly supported auto (and decltype? maybe?) before the standard was even finished yeah, vc2010 supports quite a few c++11 goodies unfortunately we use 2008 at work
|
# ¿ Aug 5, 2013 15:31 |
|
MrMoo posted:Using GCC 4.8.1 on RHEL 5, the C++ error messages have really improved quite nicely. yeah, thats thanks to the competition from clang its funny how even in open sores people aren't willing to get off their rear end and improve things until a competitor shows up that does things better
|
# ¿ Aug 5, 2013 19:24 |
|
yeah i looked into it sometimes and ugh reminder: it was originally written by rms and even though they prolly threw away most of his code over the year im sure his ~spirit~ still permeates the code base
|
# ¿ Aug 5, 2013 19:42 |
|
prefect posted:if you had been a c programmer in 1980, i bet you would have murdered bjarne stroustrup when I was writing assembly i was like "lol c is piss easy poo poo for dumbasses" then i switched to c and i was lke "lol c++ is a dumb loving mess of things that some dumb academic bolted onto c bc he prolly feels like its ~theoretical nicer~ this way, then i read stroustrup's faq about c++ and it was approaching all those things from a practical angle so i trhough well maybe ill try to use c++ right and see how it goes" now i use c++ and im like "lol wasteful bytecode interpreted java/c# shaggar PoS" but its been like 10 years and my mind isnt remotely about to change this time until a better natively compiled language than c++ comes along
|
# ¿ Aug 20, 2013 00:07 |
|
Nomnom Cookie posted:i wish c++ had sane and convenient features rather than a horrifyingly complicated and lovely compile-time environmemt for computation of types. yeah that's basically what i dislike with c++. you can do all kind of neat compile time stuff but you are forced to use functional kinda programming with a very awkward syntax just because the entire thing grew out of a system that was originally only made to do generic containers thing is there's no good alternative mature language with good metaprogramming facilities that compiles to native code rust is promising but looks still quite some way from being a production quality language
|
# ¿ Aug 20, 2013 10:40 |
|
unixbeard posted:jit compilation is better anyway cause it can make the most of whatever the current cpu supports everything has p much the same cpus nowadays desktop: core I whatever mobile: some arm w/ neon I thought the standard fantasy that jit is better than offline compilation was that it could detect hot code paths dynamically
|
# ¿ Aug 20, 2013 12:11 |
|
prefect posted:is there a language where a nice pile of regex isn't going to look like that, though? regex are gross and only useful to sift through the dejections of another program to find some data if you need to write regex you are doing a job so unimportant that no one bothered to output the data you need in an usable format
|
# ¿ Aug 20, 2013 16:31 |
|
|
# ¿ Aug 20, 2013 17:23 |
|
MononcQc posted:Schemes and Lisp often toyed with the idea of alternative function-based approaches to regular expressions. One of them (SRE) had the POSIX regex: well basically this is what happens when you want to make regex not poo poo: you turn it into an actual parser with multiple independently defined grammar rules that can be reused, and with the right language / library writing such rules can be made really nice and easy so why even bother with regex this is typically the type of things that ~the power of C++~ is very good at. using templates and operators overloading you can have something very similar to that scheme thing above that let you define and compose parsing grammar rules like this: code:
boost::spirit offers just such a parsing library
|
# ¿ Aug 20, 2013 20:23 |
|
Tiny Bug Child posted:if you never need to write regex your job is so boring that someone has already gotten to the data you need and carefully digested + regurgitated it so your babby self can handle it my job is not boring BC I'm not a web dev who have nothing else to do than data janitoring
|
# ¿ Aug 21, 2013 10:30 |
|
the main rationale behind "exceptions should be used only for truly exceptional cases" is pretty simple: exception handling is slow. I dunno how they are implemented in java but in c++ the way they work on a decent compiler (ie not vc++) is that when the exception is thrown a bunch of lookup tables are used to unwind the call stack and find out which objects need to be destructed until a suitable handler is found to catch the exception. (vc++ just pushes and pop exception handlers on the stack during the normal execution flow so it slows you down even when you don't throw. Good job by microsoft as always) so basically if you are at least slightly concerned about performance you shouldn't use exceptions for things that are expected to happen during a normal execution of your program for instance imagine you can load config files or plugins from multiple location, like you try the current dir first, then a user specific location, then a system location. you try loading your thing from all these places and a lot of failures are expected. if you use exceptions for that you'll have a bunch of them thrown every time although nothing bad is actually happening that justifies using such a costly mechanism
|
# ¿ Aug 30, 2013 09:06 |
|
tef posted:this sorta dogma ridden hand writing over a confused language feature is possibly why go didn't include them According to their FAQ it seems to me that the reason they don't like exceptions is the same reason as most people who don't like exceptions: quote:Why does Go not have exceptions?
|
# ¿ Aug 30, 2013 14:40 |
|
Posting Principle posted:can text editors be our new argument tia on what planet text editors arguments can possibly be new
|
# ¿ Aug 30, 2013 17:01 |
|
Max Facetime posted:quick, who of those discussing the slowness of exceptions has benchmarked exceptions recently? a mere 10% slowdown for the privilege of using some dodgy flow control as part of the normal execution path lol java programmers also quote:method 3, option type wrapper took 910 ms, result was 3
|
# ¿ Aug 30, 2013 22:17 |
|
b0lt posted:memory allocation/deallocation is free and instantaneous allocating memory on the stack (which is how value types too large to fit into registers are returned in c++) pretty much is: it is literally nothing more than an addition
|
# ¿ Aug 30, 2013 22:39 |
|
pointer to members are v useful to do things like serialization, scripting language bindings, using methods as callbacks for listeners and such
|
# ¿ Sep 12, 2013 12:33 |
|
Notorious b.s.d. posted:trigger warning: this is worse than c++ well duh
|
# ¿ Sep 12, 2013 23:06 |
|
Tiny Bug Child posted:it's php in 95% of cases. i've been using python lately for some stuff php isn't fast enough for and it's also adequate, so if you like dumb formatting rules you can use that too. lol at python being faster than php PL special olympics
|
# ¿ Sep 17, 2013 16:14 |
|
spongeh posted:http://peterevjan.com/posts/we-should-all-just-decide-on-javascript-and-solve-the-interesting-problems-instead/ "lets make it simple to the user by making him supply the url" lol
|
# ¿ Sep 17, 2013 17:47 |
|
spongeh posted:yea just like you supply the url to http://forums.somethingawful.com instead of going to http1.1://forums.somethingawful.com/v2/ because i'm using a web browser that supports http 1.1 and because i'm familiar with my client enough that i know i can use some arbitrarily named v2 of the website. everything is a web app that runs through a web browser
|
# ¿ Sep 17, 2013 17:59 |
|
Malcolm XML posted:Didn't you get the headers, they negotiated a new version of posting but kept the names the same
|
# ¿ Sep 17, 2013 20:46 |
|
Cocoa Crispies posted:i used php lol
|
# ¿ Sep 18, 2013 17:19 |
|
more like cripple optional types because our language sucks and have to store everything as a pointer to a thing allocated separately on the heap but now for some reason we actually do care about cache efficiency jdk8 more like jok8
|
# ¿ Sep 18, 2013 19:04 |
|
Tiny Bug Child posted:yes, exactly. my point was that autoloading is just how you do it in PHP. he was drawing a parallel between autoloading and eval like autoloading was as gross as using eval, but they aren't comparable at all the various shades of gross in PHP are hard to discern for normal people Zlodo fucked around with this message at 19:41 on Sep 18, 2013 |
# ¿ Sep 18, 2013 19:33 |
|
best 30$ i spent in a while
|
# ¿ Sep 19, 2013 13:54 |
|
im the unticked_statement no wait im the expr_without_variable
|
# ¿ Sep 19, 2013 23:33 |
|
Notorious b.s.d. posted:perl regex is turing complete and can be used to write a complete parser no problem because being turing complete doesnt mean its not an horrible pile of trash you could write a complete parser in brainfuck
|
# ¿ Sep 20, 2013 15:18 |
|
xml does something that everyone needs it and it doesnt really do it well but not badly enough that people bother using something better if you do small poo poo like some configuration files or serializing a few things its ok. if xml is used for instance as a file format to describe (during development) all the objects making up a large video game's open world and perforce takes one hour to get the latest version of the data and the game take 5 minutes to load you kind of wish a less wasteful format like json had been used re: schemas you can do schemas in json too in fact, plot twist: you can even do schema validation on plain text. it's called a "parser" and the schema is called a "grammar". thats another thing with xml, people seem to literally believe that you can't do cool data manipulation on structured data represented in any other way than tags in angle brackets
|
# ¿ Sep 22, 2013 19:22 |
|
Notorious b.s.d. posted:having a well-specified standard means that when i want to interoperate with a french mainframe, an american minicomputer from the 1970s, and a warehouse running Windows, i'm gonna use xml ah yeah clearly a typical day-to-day use case for most people
|
# ¿ Sep 22, 2013 19:43 |
|
Shaggar posted:yeah that's kind of the whole point of serialization. yeah you clearly never need serialization in a context that doesnt involve heterogenous systems
|
# ¿ Sep 22, 2013 20:00 |
|
Notorious b.s.d. posted:yes it is a completely typical day-to-day use case i don't remember having to personally deal with data serialization and validation last time I shopped at a store, drove my car or used a product??? I think you might be doing those things wrong
|
# ¿ Sep 22, 2013 20:13 |
|
Shaggar posted:in that case a custom binary format would be faster shaggertef was right
|
# ¿ Sep 22, 2013 20:16 |
|
re: config files, unironically just write a parser you can define a grammar + parse a file using it in a few lines of code in c++ with a good parsing library
|
# ¿ Sep 22, 2013 21:55 |
|
unixbeard posted:C++ is probably pretty cool if you've never used anything but C++ I used basic assembler c c++ c# lua and javascript and i think c++ owns hth
|
# ¿ Sep 23, 2013 12:21 |
|
oh I also used python but its so awful that I'm unconsciously blocking those memories apparently
|
# ¿ Sep 23, 2013 12:23 |
|
Shaggar posted:use wpf for apps no use qt
|
# ¿ Sep 23, 2013 16:33 |
|
Pollyanna posted:but im on osx use qt wpf is bad anyway
|
# ¿ Sep 23, 2013 16:39 |
|
|
# ¿ May 15, 2024 16:52 |
|
double riveting posted:the reason plang people hate xml:
|
# ¿ Sep 23, 2013 16:40 |