Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411475 Posts in 69369 Topics- by 58424 Members - Latest Member: FlyingFreeStudios

April 23, 2024, 02:30:29 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 253 254 [255] 256 257 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 738590 times)
bateleur
Level 10
*****



View Profile
« Reply #5080 on: July 26, 2016, 06:19:53 AM »

The UI in

has been written six times in total, four of which involved 0% code reuse from the previous version. Go on, ask me how much fun I had with that.  Cry
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5081 on: July 26, 2016, 04:58:43 PM »

After having some pleasant experiences with build systems such as FAKE and CAKE I've started looking into MSBuild......  Concerned Concerned Concerned
Logged

Bricabrac
Level 2
**


Fail again. Fail better.


View Profile
« Reply #5082 on: August 03, 2016, 11:04:35 AM »

Rpgmaker MV's button input processing is INSANE. I have no other way to describe it - and it will probably drive me mad too.
Basically, whenever you tell the program to check if a button is being pressed and then do x, it will continue doing thing x until the button is no longer pressed. This means if I have a window I can open/close with the same key, keeping that key pressed will make the window opencloseopencloseopen forever.
Annoying.

After a day of work, it turns out rpgmaker has a function for checking whether a key was being triggered, not held down - it's just not available using normal commands, you have to manually call it and it's prone to screwing things up.
Rpgmaker 2003 had a better button input processing than the lastest version. Arrrg. No No NO
Logged

Selling Sunlight - Wandering Merchant RPG
bauer
Level 1
*


Codes games & makes music


View Profile WWW
« Reply #5083 on: August 03, 2016, 11:55:11 AM »

Had a blast creating a small system tray based application using C# and WinForms, everything went smoothly until I tried to implement a decent way to get a build number or date in a reliable way. Bleh. Tired
Logged

Shine Klevit
Level 1
*



View Profile WWW
« Reply #5084 on: August 07, 2016, 07:58:57 AM »

Well, this is probably a pretty common complaint(I assume it has to be), but I wonder who's genius idea it was to make a missing return statement a warning and not a compilation error in C++.
Logged
oahda
Level 10
*****



View Profile
« Reply #5085 on: August 07, 2016, 08:05:27 AM »

Well, this is probably a pretty common complaint(I assume it has to be), but I wonder who's genius idea it was to make a missing return statement a warning and not a compilation error in C++.
Depends on your compiler settings. I always compile with -Werror, which turns all warnings into errors. I also maximise the warning level.

Never knew that wasn't always an error, tho. Makes no sense. What happens if you try to store the result and do something with it? Null? Undefined? Garbage data? Huh? I don't see how that could not always be an error. Oh, well. Just use -Werror.
Logged

Shine Klevit
Level 1
*



View Profile WWW
« Reply #5086 on: August 07, 2016, 08:23:32 AM »

Well, this is probably a pretty common complaint(I assume it has to be), but I wonder who's genius idea it was to make a missing return statement a warning and not a compilation error in C++.
Depends on your compiler settings. I always compile with -Werror, which turns all warnings into errors. I also maximise the warning level.

Never knew that wasn't always an error, tho. Makes no sense. What happens if you try to store the result and do something with it? Null? Undefined? Garbage data? Huh? I don't see how that could not always be an error. Oh, well. Just use -Werror.

I could be wrong but I believe that C reserves space for whatever return value is assigned, and simply returns that. If it's an object then it returns garbage data because it doesn't construct anything in that space. Also, I'm not sure whether it's the same for all compilers or just something with GCC.

With that said, I did set it up with the Werror flag so it would report it as an error but it threw me off course for a much longer amount of time this morning than I care to admit.
Logged
powly
Level 4
****



View Profile WWW
« Reply #5087 on: August 13, 2016, 01:38:03 PM »

Nah, if you return a struct (pod or C) it copies it completely, in ++ it calls the copy (or move if implemented) constructor.
Logged
Dacke
Level 10
*****



View Profile
« Reply #5088 on: September 22, 2016, 05:48:36 AM »

javascript
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5089 on: September 22, 2016, 07:28:37 AM »

javascript

my condolences
Logged

JWki
Level 4
****


View Profile
« Reply #5090 on: September 22, 2016, 08:08:19 AM »


Oh god I'll have to deal with that as well... Probably going to spam Princessa with questions regarding Emscripten or something I don't want to believe I'll actually have to type javascript yet. Gotta do a web tool for controlling and rendering of 3D prints using WebGL for hardware acceleration...
Logged
oahda
Level 10
*****



View Profile
« Reply #5091 on: September 22, 2016, 11:03:59 AM »

I don't think you'll have to ask very much about Emscripten, because it was surprisingly painless to set up. Hand Thumbs Up Right

I recently tried out one of those modern web environments by installing Node.js and the npm package manager. EcmaScript is slightly nicer than JS, but not by as much as I'd hoped. Everything was also very difficult to set up, and information was hard to find, and the project generated by all the stuff installed into it is enormous and not very nice for version control, but React.js was definitely an interesting way to build a dynamic and responsive web app and was in itself kind of nice. It's just a pity that the setup around it is so messy.
Logged

Dacke
Level 10
*****



View Profile
« Reply #5092 on: September 22, 2016, 11:43:54 AM »

I'm working on a couple of different project. For another one I'm actually learning React Native (React for mobiles with support for native components) in combination with Redux for state management. While some things are poorly documented and a bit buggy in React Native, the basic concepts seem ~amazing~ (especially in combination with Redux).

I also enjoy many of the modern web APIs (not in the least their documentation) and jQuery and d3 are both a joy to work with.

It's just that JS itself is, well, friggin' weird.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Dacke
Level 10
*****



View Profile
« Reply #5093 on: September 23, 2016, 02:42:20 AM »

Like, how do you keep variables/functions local to a specific js-file?

well, you turn the entire file into an instantly called function, that's called as soon as you load the file. You call it with the "window" that "is" the global name space. The you prototype write stuff you want to export to the window objects which results in it existing the the global scope.

Code:
(function(export) {
  var localVariable = 1;
  function localFunction() { return 3; }

  export.globalVariable = 2;
  export.globalFunction = function () { return 4; }
})(window)

like... wat  WTF
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
oahda
Level 10
*****



View Profile
« Reply #5094 on: September 23, 2016, 10:54:34 AM »

I think the most annoying thing about JS is how the this pointer keeps changing its meaning in every nested scope for various reasons, which can be hard to keep track of and might lead to bind() everywhere... No getting away from that with ES either.
Logged

Dacke
Level 10
*****



View Profile
« Reply #5095 on: September 23, 2016, 11:04:02 AM »

yeah, I still have no idea how that works, but I ran into problems with it today

in my code example, if globalFunction had it's own variable called "localVariable" (that shadows the one in the snippet), then there is no way for globalFunction to access the shadowed version. So I got the stellar advice from SO to simply not use the same names.

While in other parts of the JS ecosystem, people happily do stuff like:

return {banana: banana};

where the first and second banana are two completely different things
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
oahda
Level 10
*****



View Profile
« Reply #5096 on: September 23, 2016, 11:14:21 AM »

Yeah, that one makes sense tho because the key can't take its value from a variable so it's unambiguous. EcmaScript actually added a shorthand syntax for this exactly because it's so common, so you can just write { banana } if they're both the same.
Logged

Dacke
Level 10
*****



View Profile
« Reply #5097 on: September 24, 2016, 09:01:40 AM »

sure, I actually find it pretty nice in practice!

my complaint was only about not being able to juggle shadowing and I wanted to contrast it with the other extreme that's supported in JS


EcmaScript [...] you can just write { banana } if they're both the same.

wow, really?
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
bateleur
Level 10
*****



View Profile
« Reply #5098 on: September 26, 2016, 03:43:33 AM »

wow, really?

I was surprised too.

There's all kinds of crazy stuff in ECMAScript, though. Have you seen this one?

Code:
var count = 0;
var something = {
  ["thing" + ++count]: count,
  ["thing" + ++count]: count,
  ["thing" + ++count]: count
};

I can only assume someone was envious of the obfuscated code potential of PERL and C++ and decided to up their game.  Hand Point LeftShocked
Logged

Dacke
Level 10
*****



View Profile
« Reply #5099 on: September 26, 2016, 04:10:43 AM »

I must be damaged from my CS days, but that was actually completely readable to me Grin
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Pages: 1 ... 253 254 [255] 256 257 ... 295
Print
Jump to:  

Theme orange-lt created by panic