|
brainwrinkle posted:first class functions are great. i love some of the language concepts in javascript (prototype inheritance is cool once you get it), but holy hell that implementation is so terrible. try lua, it has a lot of the same concepts as javascript including first class functions but its much cleaner, and it also have coroutines which own too bad its a bit weak as a stand alone language, people mostly embed it into other things (mostly vidya games) so in terms of available libraries and such its a bit weak
|
# ¿ May 9, 2013 19:28 |
|
|
# ¿ May 8, 2024 14:19 |
|
opt posted:c++ this, this a million times embrace the darkness of templates, stop caring about "omg this is crazy obfuscated poo poo" and go all out implementing crazy compile time algorithms and you'll enjoy c++ a lot also generally stop caring about whether ur a bad programmer if u want to enjoy programming
|
# ¿ May 9, 2013 23:14 |
|
Mr SuperAwesome posted:yeah this is the whole point of intellisense. that also f12 if you're really stuck or retarded or more likely the original author was retarded
|
# ¿ May 12, 2013 15:31 |
|
Mr SuperAwesome posted:i didn't find that but i found this instead which is good too don't post shaggar's fanfics
|
# ¿ May 12, 2013 16:58 |
|
im the vidya game written in java
|
# ¿ May 23, 2013 23:35 |
|
Jerry SanDisky posted:did u know you can do more than just java with eclipse? why would anyone use eclipse for anything else than java "let me install an ide that is bloated to hell because it has a million features for java but use it for a diff language where those features don't work" - no one ever well i guess it can quick fix ur spelling in comments lol
|
# ¿ May 23, 2013 23:43 |
|
MeruFM posted:C++ hits the market that needs to be fast with the trade-off of being either super expensive or buggy. OSes for the former, games for the latter. and when you get lucky to work at a game studio with none of those problems it owns but given that most bugs found in games happen at a high level (things like broken transitions between states, or errors caused by level layout changes and such) and not specific to the way things are some in c++ you'd have games just as buggy if they were written in a diff language like java or c# or whatever else really
|
# ¿ Jun 17, 2013 10:33 |
|
PleasingFungus posted:
this is exactly the kind of thing where people tend to go "lol c++" because #include whereas the real problem is the awful architecture with everything and the kitchen sink stuffed into some base class and also from your article the guy reinventing a bad linked list instead of using the stl (which is something you could do in any other language too with equally bad outcome)
|
# ¿ Jun 18, 2013 00:56 |
|
prefect posted:just relax; every language is blamed for the sins of its worst users true
|
# ¿ Jun 18, 2013 01:02 |
|
SavageMessiah posted:lol I remember seeing some ruby tdd zealot unironically talking about unit tests for unit tests tell him that he should go all the way and make unit tests for every unit test watch him go into an infinite recursion
|
# ¿ Jul 25, 2013 16:48 |
|
you surely meant for( auto& thing : myList )
|
# ¿ Sep 3, 2013 18:45 |
|
uG posted:surely c++ is the same as c surely you wouldn't use c when there is literally no reason not to use c++ instead
|
# ¿ Sep 3, 2013 18:51 |
|
uG posted:yes the answer is always to use another language but the answer is never to use c++ oh thanks for the tip well im sure i can convince my company to make our next game in a java or p-lang, im sure it'll run just fine on consoles
|
# ¿ Sep 3, 2013 18:56 |
|
a mere mortal only really needs to know about lvalues and rvalues (and you can in fact pretty much ignore the later and still write functionnal c++ code, if slightly inefficient at times bc of superfluous copies) the other -values are basically just there to define all the subtleties of the behavior of rvalues and move semantics in the c++ standard and a mere mortal doesn't have to know all those intricacies to write c++ code lol if u use a single-vendor language where they dont need to go into that much standardization detail
|
# ¿ Sep 3, 2013 19:13 |
|
Cocoa Crispies posted:maybe you should find a company that uses p-languages or j-languages so you don't have to work in a game sweatshop
|
# ¿ Sep 3, 2013 19:19 |
|
threading poo poo in a way that work can be easy threading poo poo in a way that works and that actually performs better than not using threads is harder, there's lots of performance pitfalls
|
# ¿ Sep 3, 2013 22:32 |
|
Bloody posted:this is absolutely fine. the task im handling is trivially parallelized - nothing any thread is doing has any impact whatsoever on the other threads. The individual tasks are relatively long - as much as half an hour of serial execution. this triviality scales well to hundreds of cores and terabytes of ram, which has the downside that i cant just spawn a thread for each task and wait for all of them to finish at once. have a look at intel's tbb library: https://www.threadingbuildingblocks.org/ it provides a lot of tools to simplify writing parallel algorithms while avoiding a lot of performance hazards. for instance the amount of work that each parallel task does is tricky to get right: if you dispatch too many small tasks you're going to have too much overhead with the tasks dispatching, and its better to process a bunch of consecutive data in a given task to better use the cache etc. thread building blocks have generic algorithms like parallel_for that takes care of this kind of gory details for you (theres some reasonable default heuristics for that which you can tune if you want). it also provides an efficient parallel memory allocator (traditional memory allocators tend to serialize allocations between threads so memory allocation can easily become a big point of contention), lock-free containers etc.
|
# ¿ Sep 3, 2013 23:33 |
|
Nomnom Cookie posted:actually eve is running away from python as fast as they can because they want the servers to not run like poo poo the eve client is also written mostly in python (with all the low level rendering engine etc. written in c++ master race) it's possible to run the entire client through a decompiler and modify it people making all those mining bots just build upon the autopilot code and make their own ingame configuration UIs etc. basically lol eve online ----------------
|
# ¿ Sep 16, 2013 22:58 |
|
idk i have 2^24 memorized back from the days where gfx cards started using 24 bits per pixel and people were like 16777216 colors holy poo poo
|
# ¿ Sep 19, 2013 07:22 |
|
Shaggar posted:vs suck dick
|
# ¿ Sep 19, 2013 16:47 |
|
Shaggar posted:blargh. so gross. all of this .net
|
# ¿ Sep 21, 2013 13:52 |
|
.net is like python, people use it only because it comes with a huge set of mediocre libraries
|
# ¿ Sep 21, 2013 14:43 |
|
Mr SuperAwesome posted:in terms of language features, syntax, and general ease of use of writing ur code c# is clearly the best at like everythin the only thing I remember from my previous gig at a terrible company which used .net was the amount of lovely c# boilerplate i remember thinking "if it was c++ i could factor away all that poo poo in templates" about 10 times a day. in fact the c++ portions of the project were actually much more concise despite of the admittedly ugly profusion of const shared_ptr< butt >& everywhere heck you can often end up with ridiculously long and verbose types like in c++ but without typedef to help with it i once wanted to do a lower_bound search in a sorteddictionary and the only solution I found on google was "roll your own tree based container" which is p lol thankfully theres also those amazing toolkits: winforms aka "MFC, but with .net" and xaml aka "let's once again make developers write XML by hand because it never gets old but let's make it even more gross by adding an ad hoc sub-language inside of some of the xml strings" but yeah other than all that i guess .net is great
|
# ¿ Sep 21, 2013 15:29 |
|
shut up, angry policeman shaggar
|
# ¿ Sep 21, 2013 15:36 |
|
Dessert Rose posted:using ButtFart = System.Collections.Generic.List<KeyValuePair<Butt, Fart>>; does it works in a class like in c++ when we do things like code:
|
# ¿ Sep 22, 2013 17:37 |
|
FamDav posted:Lisp has lambdas and is from 1958. C++ got them last year. a lot of things are easy to do when you don't give a gently caress about performance which is why things take a long time to make it into production languages
|
# ¿ Sep 23, 2013 13:11 |
|
Mr SuperAwesome posted:no overloading operators is p lol
|
# ¿ Sep 23, 2013 17:24 |
|
Notorious b.s.d. posted:type erasure was an engineering problem not a language design problem. an implementation detail. I'm sure its a great relief when you get bitten in the rear end by it "no worry mate just an implementation detail"
|
# ¿ Sep 23, 2013 18:14 |
|
USSMICHELLEBACHMAN posted:lol doing math with objects is dumb wtf steveE?? theres nothing wrong with having a wide enough definition of "object" that encompasses types unless your using a j-lang where they insist that every object must be heavy and costly and have no notion of passing things by value sometimes you manipulate mathematical objects other than scalars and theres no reason you should have to use a diff syntax when doing calculations on them
|
# ¿ Sep 23, 2013 19:44 |
|
Notorious b.s.d. posted:java is mandatory pass-by-value jackass idc my point is that it is actually always passed by reference from a low level point of view (as opposed as being directly pushed onto the stack or even across multiple registers like when objects are passed by value in c++) which in turns makes every class no matter how small such as a mathematical vector inefficient as hell even though there should be no reason objects cant be lightweight and still have methods or overloaded operators so it precludes a lot of cool things because theres this language limitation where every object is heavyweight as it has to be allocated on its own on the heap quote:except that programming is not math
|
# ¿ Sep 23, 2013 20:16 |
|
Notorious b.s.d. posted:c# is the only high-level language I can think of that makes stack-allocated objects a choice, and even then they are tightly limited vectors, matrices, tuples, smart pointers, option type wrappers, tagged unions... there's lots of useful small things that are nice to be able to be passed around efficiently or embedded into other objects without being separated somewhere in memory for cache and memory allocation efficiency
|
# ¿ Sep 23, 2013 21:14 |
|
Notorious b.s.d. posted:saying "gee i'd like to have this in cache" is not the same as "gee i'd like to worry about stack allocation details in my high level language" its not "worrying about stack allocation details", its being able to say "pass this thing by value because i know its small" and even if at high level you dont necessarily have to care being able to pass value types around efficiently is the difference between "wee lets use option types everywhere bc its neat and almost free" and "better be careful not to overuse those because theyre pointlessly slow" also yeah i can tell java and c# developers dont give a gently caress about performances whenever things lock up on me to crap the bed while doing garbage collection you can tell more and more of visual studio is replaced with slow c# code with each version bc that thing is becoming comically slow and in fact i'm not saying "you sholuld worry about cache locality" but perhaps the people who design the language / vm / libraries that you use should
|
# ¿ Sep 23, 2013 21:38 |
|
PleasingFungus posted:'why isn't Java C?' im the false dichotomy
|
# ¿ Sep 23, 2013 22:02 |
|
Nomnom Cookie posted:Java passes references by value. Pass by reference is a different thing that Java doesn't do. Ref params in C#, iirc pascal does it too. i was talking of the implementation of parameter passing by the compiler, not about the semantics quote:Also Hotspot is p fuckin sharp about heap management, much moreso than C++. Maybe you lose some cache locality but the big killer is the inherent per-object overhead in Java which is something like 16 bytes. quote:Overloading operators for math is real dumb. some people happen to have to work a lot with other datatypes than just int bool and string
|
# ¿ Sep 23, 2013 22:14 |
|
Brain Candy posted:do you even profile? profiling is useful when considering an optimization that comes at a cost of your program's readability/maintainability/flexibility/stability which is not what is being discussed here "ok i'll do a new on that struct and pass a smart pointer to it and then i'll profile and if necessary replace it with passing it directly by value which is both much more readable and faster" - nobody ever Brain Candy posted:stack allocation, operator overloading and vectorization are a thing, but IDK, the winner for math isn't c++/c. and yes when it comes to raw number crunching doing things on the gpu is much faste but there are situations where you dont need that much number crunching throughput but prefer to keep the data on the cpu side because you're doing a bunch of different things with them that cant be parallelized very well and also you may not be able to afford the latency of downloading the results back from the graphic card. its almost as if there was no single best tool for every task (there are lots that are bad at everything though) Zlodo fucked around with this message at 23:11 on Sep 23, 2013 |
# ¿ Sep 23, 2013 23:09 |
|
Nomnom Cookie posted:I dunno why you're using the term pass by reference then. It has a clear meaning and deals with language semantics, not calling conventions. I should just have precised I was talking about low level representation see the problem is that i prefer to avoid the word "pointer" as well because its a loaded term too and people would have said "there's no pointer in java you dumbass" quote:Taking your meaning, which is "everything is a pointer", it's not an actual issue. Dereferencing pointers from L1 is basically free. of course like everything it only becomes an issue for things that are executed on many objects or in the inner loops of some algorithms etc but its nice not to have to worry about this particular performance hazard and be able to focus your efforts elsewhere quote:Bro you need to learn more about JVM internals if you want to poo poo on them. For starters, Hotspot allocates out of a thread-local buffer (imaginatively acronym'ed as TLAB). In the vast majority of cases Java allocations are pointer bumps. OK, fine. that's a good, efficient way to allocate things. a nice thing when allocating things on the stack though is that freeing it is equally cheap. its just wasteful to reach for the heap for temporary objects Zlodo fucked around with this message at 08:41 on Sep 24, 2013 |
# ¿ Sep 24, 2013 07:58 |
|
auto completion is very helpful to write code but the advantage of making things more concise is that it also helps readability
|
# ¿ Sep 24, 2013 10:44 |
|
did you do any profiling demonstrating that this closes the gap with c++ performance?
|
# ¿ Sep 24, 2013 11:08 |
|
Mido posted:please dont gtk
|
# ¿ Sep 25, 2013 22:54 |
|
|
# ¿ May 8, 2024 14:19 |
|
just use qt also don't use python
|
# ¿ Sep 25, 2013 23:02 |