Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 27, 2024, 11:30:53 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 247 248 [249] 250 251 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 738879 times)
oahda
Level 10
*****



View Profile
« Reply #4960 on: October 15, 2015, 09:45:36 PM »

I learned of Java lambdas just the other day too when talking to someone I've known for a while without actually realising they do programming, and found this out. I always found it neat how new Java objects could have methods individually overridden without a new subclass having to be created like in C++. Happy that's finally fixed with the advent of lambdas in C++. Neat that Java has them now too.
Logged

Eendhoorn
Level 6
*

Quak


View Profile
« Reply #4961 on: October 17, 2015, 11:58:46 AM »

Love working with uncomplete api's, with little to no documentation and samples.
Logged

oahda
Level 10
*****



View Profile
« Reply #4962 on: October 18, 2015, 08:46:50 AM »

Today I learned that in Unity you have to wait one frame after starting the game to get the position of a UI element or it'll be incorrect.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4963 on: October 18, 2015, 01:09:19 PM »

Today I learned that in Unity you have to wait one frame after starting the game to get the position of a UI element or it'll be incorrect.
That is ridiculous. No otter words for it.
Logged

Thomas Hiatt
Level 0
***



View Profile
« Reply #4964 on: October 23, 2015, 10:20:02 AM »

Software is so bad these days. There are errors in the math.h that comes with MinGW. I figured that if they are stupid enough to ship their compiler with errors in the standard header files I probably don't want them compiling my code. The alternative is Microsoft Visual C++ which requires me to download 8GB of bloatware just to compile a program. The installer for the 8GB of bloatware bogged down my entire computer and ran at 8fps. This morning I realized that was caused by Nvidia, as most my problems are. G-SYNC is the worst technology ever created, it makes visual studio slow your computer down to 8fps, it makes Hearthstone lag, it was freezing my entire computer when I was running Arch Linux, and it doesn't really improve my gaming experience when it is working properly.

Oh yeah, and Microsoft Visual C++ gives me hundreds of error messages about commas that are very difficult to determine the real cause of, probably something to do with the windows.h I now have to include defining every word in the dictionary.
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #4965 on: October 23, 2015, 10:48:28 AM »

There are errors in the math.h that comes with MinGW.

What were they?

MinGW is messy and may require some hacks to get it to work properly, but it gets the job done and allows you to use the GNU toolchain on Windows, making cross-platform development a bit easier. MSVC means you'll have to deal with multiple toolchains and their incompatibilities.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4966 on: October 23, 2015, 10:50:52 AM »

Why would a freaking compiler be buggy/messy? Is it not like, the baseline of every software ever put on the market?? Why would anyone allow a compiler to be that way? I don't get it.
Logged

Thomas Hiatt
Level 0
***



View Profile
« Reply #4967 on: October 23, 2015, 11:21:40 AM »

Apparently the inline version of hypotf isn't defined anywhere or something, you can define some no inline thing or just remove those lines from math.h and it works fine.
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #4968 on: October 23, 2015, 01:44:44 PM »

There are errors in the math.h that comes with MinGW.

What were they?

MinGW is messy and may require some hacks to get it to work properly, but it gets the job done and allows you to use the GNU toolchain on Windows, making cross-platform development a bit easier. MSVC means you'll have to deal with multiple toolchains and their incompatibilities.

-IF- you can figure out which mingw download is the correct one you should use now. It's not the one on the official mingw site! And you can't trust sourceforge downloads anymore with their rampant highjacking and injecting viruses into major software.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4969 on: October 23, 2015, 02:08:51 PM »

Why would a freaking compiler be buggy/messy? Is it not like, the baseline of every software ever put on the market?? Why would anyone allow a compiler to be that way? I don't get it.

compilers are hard to write. Especially c++ compilers with it's insane and borderline ridiculous specifications. Although in this case it just seems like a missing function. Admittedly that's not exactly the hardest part to get right :X

Thomas for the MSVC stuff. You don't have to install Visual studio to use MSVC. Just download the compiler itself and invoke it from the command line or using your build system. http://www.microsoft.com/en-us/download/details.aspx?id=8279 . Not to mention the download shouldnt be 8GB unless you are installing ultimate with it's extensions like blend. It should clock in as low as 1GB.

as for windows.h..... That monstrosity will emit a crapload of warnings Sad I try to avoid using it directly when possible. Since you are using math.h you should probably be aware of the #define NOMINMAX if you want to use the min/max functions.
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4970 on: October 23, 2015, 03:42:34 PM »


Software is so bad these days.

Amen.

There are errors in the math.h that comes with MinGW. I figured that if they are stupid enough to ship their compiler with errors in the standard header files I probably don't want them compiling my code.

I used MinGW for a while. It was pain followed by pain followed by pain. It was awful to work with. I was thrilled to be able to move away from it. Having said that, the goal of the project (at least as I remember it) is basically to create a free Unix-like environment on a operating system whose makers want cross-platform development to be as painful as possible. They're approaching a problem as hard as nailing jelly to a wall during a hurricane and actually *succeeding*. That is quite an accomplishment, and I do admire the effort. During the early days of MinGW there weren't uncrippled free editions of Visual Studio available. I would like to think that MinGW gaining traction may have partially prompted the move to make a free uncrippled express edition of MSVC.

G-SYNC is the worst technology ever created,

Worst technology ever? Sounds like somebody hasn't worked with any of following: Wink

- The ATI/AMD Linux video drivers. How many options can you change in their GUI before it becomes inoperable? My record is three. That's okay, I'll just do it by hand... oh my God what is in this file? Hang on, did you just change two options without rebooting? Don't worry, the driver's got this- time for a hard crash. Now you *have* to reboot. Hope you didn't lose anything important.

- Memory management in OpenSSL- a thin layer in which deallocated memory can be efficiently used. Wink Go exploits. The API is a bit painful as well, but that's a bit of a side note.

- What would you select as the single C preprocessor define that has caused the most amount of suffering in library building and software development? I offer my candidate: ZLIB_WINAPI. Some of you are nodding right now. I feel your pain.

- Direct3D in DX3, possibly the single worst API of all time. The words "execute buffers" will bring tears to the eyes of anyone who had to use it. Pages and pages of code to... open a single Window and display a single triangle. No diagnostics apart from: "Wrong", "Right" but not actually working, and "Right". Oh, and the textures vanish if you do the wrong thing.

- DirectPlay in DX3. The documentation lied. No, I'm not talking about mistakes. It outright lied.

- PulseAudio, which singlehandedly ushered in the dark ages of Linux audio. Quite an accomplishment, unlikely to be matched by anything else except for systemd.

- SLI-capable development on nVidia cards. A working set of undocumented secret capability bits needed on a per-machine, per-card, per-driver-version, and per-configuration basis? With some combinations experiencing severe graphical corruption after an unspecified time and others running a fraction of the speed of a single video card? Sounds awesome. I'd hate to be the sucker who fires up a developed application over and over for days on end with slightly different options to locate fast and stable configurations on a per-PC basis. Hang on, I *was* that sucker.

- Windows debug/release memory management distinction, with hard crashes on mismatch. Coupled with there being no solid standard for library and DLL naming, and tools that support only a subset of the myriad variations out there, this becomes one of the most destructive design decisions ever made with respect to a health Windows library ecosystem. Building and working with multiple libraries becomes a nightmare. All it would take would be for Microsoft to settle on a single DLL-interface-compatible memory implementation with their next runtime, and all this pain would go away. That's all it would take! Such a simple thing, so much pain.

- The GNU autotools, when used for anything but distribution of a small library with minimal dependencies and simple build structure that runs on multiple Unix-like systems, but only if the developer runs it before making the distribution and the end-user never needs to touch it. automake is a special case. I make the claim that there exists no project, from hello world through to the most complex project, that automake can not make considerably *worse*.

- *singing* Oh, we ain't got a barrel of money; maybe we're ragged and funny; but we travel along, singin' our song; SxS. A technology so bad that it was worse than the problem it tried to solve. It was ultimately shelved. Slotting XML into an executable as an intermediate link step? Sounds awesome.

- UnigineScript, my candidate for the single worst language that has ever or will ever be created. I could have used "designed" rather than "created", but I think "designed" is assuming a lot. A language so bad that I used to joke with a colleague every time I ran into an insane aspect of the language design, but had to stop doing this as I was interrupting him so often that it was interfering with his work. When I realised I had accidentally left it on my CV, I actually deleted it. That's right- the language is so painful to use that I don't want potential employers knowing that I know how to use it.

That was fun. Wink

The alternative is Microsoft Visual C++ which requires me to download 8GB of bloatware just to compile a program. The installer for the 8GB of bloatware bogged down my entire computer and ran at 8fps.

...

Oh yeah, and Microsoft Visual C++ gives me hundreds of error messages about commas that are very difficult to determine the real cause of, probably something to do with the windows.h I now have to include defining every word in the dictionary.

Visual C++ seems the best of the poor options available at the moment. It would be so nice to be able to ignore Windows development entirely, but that really isn't realistic due to its userbase. Realistically, modern development needs a solid CPU and plenty of memory to run development tools and builds efficiently. Just a symptom of the times I guess.
Logged
Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4971 on: October 23, 2015, 03:55:51 PM »

Why would a freaking compiler be buggy/messy? Is it not like, the baseline of every software ever put on the market?? Why would anyone allow a compiler to be that way? I don't get it.
compilers are hard to write. Especially c++ compilers with it's insane and borderline ridiculous specifications.

Exactly this.

Also, Windows is a dominant platform. Their tools can be positively awful, and everyone will still use them.

as for windows.h

Here be dragons. Wink

you should probably be aware of the #define NOMINMAX if you want to use the min/max functions

Good 'ol min/max defines via windows.h. Caught me off-guard the first time I tried to declare a function with those names and I was hit with incomprehensible errors. I'm guessing NOMINMAX disables them? For my code I've just been #undef-ing min and max.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4972 on: October 23, 2015, 04:35:51 PM »

Yeah IIRC Nominmax disables those functions. Every couple years when I have to work on a project with windows.h involved I hit that wall. At least these days I remember right away what the deal is but I've probably lost a few hours all together trying to figure out what the hell is wrong.

 
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #4973 on: October 23, 2015, 04:53:57 PM »

How many underdog groups are actively focused on making a proper language spec that results in people making a fully functional compiler?
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4974 on: October 23, 2015, 05:17:31 PM »

Yeah IIRC Nominmax disables those functions. Every couple years when I have to work on a project with windows.h involved I hit that wall. At least these days I remember right away what the deal is but I've probably lost a few hours all together trying to figure out what the hell is wrong.

I thought it might. I did a bit of reading on NOMINMAX and apparently there is all sorts of pain that can follow if it turns out another header somewhere managed to #include windows.h at the wrong point. So, even as a fix there are still issues. :{

It could be worse though. We could be talking about Windows sockets. Wink
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4975 on: October 23, 2015, 05:39:17 PM »

Yeah IIRC Nominmax disables those functions. Every couple years when I have to work on a project with windows.h involved I hit that wall. At least these days I remember right away what the deal is but I've probably lost a few hours all together trying to figure out what the hell is wrong.

I thought it might. I did a bit of reading on NOMINMAX and apparently there is all sorts of pain that can follow if it turns out another header somewhere managed to #include windows.h at the wrong point. So, even as a fix there are still issues. :{

It could be worse though. We could be talking about Windows sockets. Wink


Yeah I was gonna start writing about that but refrained from doing so hahahah

I dont have too many issues with windows sockets but that's most likely because I've now been through hundreds of hours of pain with them. If I were to ask my past self about them I would probably scream in pain.

These days if I have to do communication I use ASIO.

The worst thing is dealing with libraries that call that global function that IIRC is required to be called once very early. WSASoemthingSomething.
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4976 on: October 23, 2015, 11:29:48 PM »

I dont have too many issues with windows sockets but that's most likely because I've now been through hundreds of hours of pain with them. If I were to ask my past self about them I would probably scream in pain.

These days if I have to do communication I use ASIO.

The best socket code is a wrapper over socket code to form a sensible interface. Wink

The worst thing is dealing with libraries that call that global function that IIRC is required to be called once very early. WSASoemthingSomething.

From memory, I think it's WSAOhGodDidSomeoneInitialiseMeAlreadyImNotSureYouDoItHeyIDontWantToOhCrapWaitNoNotThatVersion().
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4977 on: October 24, 2015, 10:15:17 AM »

Ah yes that's the name :D


I feel like I should mail the ASIO people money for all the time and sanity they've saved me.
Logged

Sik
Level 10
*****


View Profile WWW
« Reply #4978 on: October 24, 2015, 02:57:11 PM »

There are errors in the math.h that comes with MinGW.

MinGW or MinGW-w64? Because the former is notoriously outdated and broken and doesn't even support all of the Windows XP API (not to mention the DirectX libraries being a pain to install, while it's already preinstalled with the latter). Sadly the old MinGW is the one that comes bundled with Code::Blocks, I normally install MinGW-w64 separately then change all the paths in Code::Blocks's settings (luckily all tools and such keep the same filenames).

If MinGW-w64's math.h is broken, though, we have a problem...
Logged
Thomas Hiatt
Level 0
***



View Profile
« Reply #4979 on: October 25, 2015, 03:14:51 PM »

It was the regular MinGW. I suspected it was outdated but it used to always work for me. Now I am just going to use the Visual C++ 2015 compiler. The SDL2 libraries don't work with the 2015 version, why would anything I download actually work? Instead of just compiling them myself I will fire SDL and write my own platform code. Then I can actually have relative mouse movements and window coordinates at the same time. The only time writing the platform code is annoying is dealing with a million different window managers on linux.
Logged
Pages: 1 ... 247 248 [249] 250 251 ... 295
Print
Jump to:  

Theme orange-lt created by panic