Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 09:18:37 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 201 202 [203] 204 205 ... 279
Print
Author Topic: The happy programmer room  (Read 677729 times)
oahda
Level 10
*****



View Profile
« Reply #4040 on: March 27, 2015, 01:20:01 AM »

but does it handle emoji Well, hello there!
/sad joke, kill me
Wouldn't count on it!

Today I discovered the -jN flag for Make, which enables a multi-core build (set N to the number of cores + 1).

Since I have an 8-core (FX-8320) my build is lightning fast now  Wizard
What happens if you try to run that executable on fewer cores?
Logged

Richard Kain
Level 10
*****



View Profile WWW
« Reply #4041 on: March 27, 2015, 08:54:34 AM »

I was experimenting with running an external program from Unity last night. I wanted to be able to have the user choose the path to the program, and then somehow confirm that they had chosen the correct program. I was having a little trouble because I couldn't think of any element of the program that the user wouldn't be able to change that I could test on. When I run the program without any arguments it doesn't return anything.

Then I tried to see what error information might be returned. Bingo! When you run the program without arguments, it returns a unique error message. I was able to parse that error message and perform a test based on that information.
Logged
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4042 on: March 27, 2015, 10:14:06 AM »

What happens if you try to run that executable on fewer cores?

It doesn't affect the executable itself, only the Make process.  So for me, it will kick off up to 8 concurrent compilations instead of having to do them all serially.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
oahda
Level 10
*****



View Profile
« Reply #4043 on: April 03, 2015, 10:23:14 PM »

Was just about to go download good, ol' TinyXML to put into my project, only to find that it now has a 2nd edition that's much faster and easy on the RAM!

http://www.grinninglizard.com/tinyxml2docs/index.html

Best library ever just got even bester. Hand Metal Right

What happens if you try to run that executable on fewer cores?

It doesn't affect the executable itself, only the Make process.  So for me, it will kick off up to 8 concurrent compilations instead of having to do them all serially.
Oooh. Shiny.
Logged

oahda
Level 10
*****



View Profile
« Reply #4044 on: April 04, 2015, 04:08:42 AM »

My TinyXML wrapper is becoming the sexiest.

Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #4045 on: April 10, 2015, 05:32:19 AM »

Got mono working embedded in a little test project!


Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4046 on: April 11, 2015, 06:38:11 PM »

This fix in SDL2. Fixes all the problems there were getting it to work on Arch (it worked fine on Ubuntu though). Not a problem for 2.0.3, but was a problem for the later development versions which added IME support to Linux.
Logged
itsyourpalmike
Guest
« Reply #4047 on: April 11, 2015, 10:15:10 PM »

HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY HAPPY HAPPY JOY JOY


Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4048 on: May 17, 2015, 03:54:42 PM »

I got in the Perforce cloud beta (sort of a github for perforce) and it's heavenly. Development and project management is such a pleasure now.
Logged

Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #4049 on: May 21, 2015, 04:05:53 PM »

First bug prevented by C++11's "override" keyword. I'd put the code in the wrong class and the compiler caught it. Yay! Smiley
Logged
TheLastBanana
Level 9
****



View Profile WWW
« Reply #4050 on: May 22, 2015, 12:47:39 AM »

C++11 is just so fantastic. I love how much it's helped me to make code simultaneously more readable and less buggy.
Logged
oahda
Level 10
*****



View Profile
« Reply #4051 on: May 22, 2015, 12:51:20 AM »

I think it it actually makes my code less readable now that I can do stuff like someFunction({0.0f, 0.0f}) instead of someFunction(Vectorf(0.0f, 0.0f)). But eh, I guess that just comes down to assigning good names to functions.
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #4052 on: May 22, 2015, 03:22:07 AM »

C++11 is beautiful. Helps alot with the daily tasks. Now my only remaining wish is a proper module system that gets rid of all that #include stuff and the huge compiling times coming with it.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #4053 on: May 22, 2015, 03:36:11 AM »

I kinda like how header files of classes work like tables of contents tho. But maybe smart IDE's that work with Doxygen or something can keep track of that.
Logged

Sik
Level 10
*****


View Profile WWW
« Reply #4054 on: May 22, 2015, 07:25:53 AM »

I think it it actually makes my code less readable now that I can do stuff like someFunction({0.0f, 0.0f}) instead of someFunction(Vectorf(0.0f, 0.0f)). But eh, I guess that just comes down to assigning good names to functions.

If I see something like that I automatically assume it must be some kind of vector. Context gives it away (especially the function name, as you said).
Logged
TheLastBanana
Level 9
****



View Profile WWW
« Reply #4055 on: May 23, 2015, 12:18:25 PM »

Yeah, as with anything, it's certainly easy to write unreadable code. As long as you're careful about it though, I've found it cleans things up a lot. For example,

Code:
for (std::vector<int>::iterator it = vec.begin(); it != vec.end(); ++it) ...

has always sucked to write and clutters up the screen with really long lines (especially if your vector is named something better than "vec").

Being able to reduce it to:

Code:
for (auto it = vec.begin(); it != vec.end(); ++it) ...

or even better,

Code:
for (auto &element : vec) ...

Admittedly that does make it less clear what exactly is happening. But as long as you're aware of how C++11 range-based loops work, it makes the code so much more terse and clean to look at.
Logged
oahda
Level 10
*****



View Profile
« Reply #4056 on: May 26, 2015, 12:06:51 AM »

Yeah, the last option should be obvious to anybody who knows C++ and probably even some people who don't, but know, say, Java or C#, so I think it's a great option. You can just write a comment on the line above saying something like // Loop through the joints. and you probably don't have to anyway as the vector is going to be called joints or so.
Logged

Dacke
Level 10
*****



View Profile
« Reply #4057 on: May 26, 2015, 02:22:19 AM »

Yeah, for-each is pretty standard in lots of languages. Some use the in-keyword (JS, Python) some use a colon (Java, C++) or ":= range" (Go). It's common enough that I doubt you'd need to comment specifically on it.
Logged

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



View Profile
« Reply #4058 on: May 26, 2015, 06:44:18 PM »

The foreach colon. The one time where java is actually terse :D
Logged

MorleyDev
Level 0
***

"It is not enough for it to just work"


View Profile WWW
« Reply #4059 on: May 31, 2015, 01:24:00 PM »

I tend to use a functional-esque version when available (.forEach in Javascript, a custom .Each extension in C#, std::for_each in C++ etc) but it's nice to have the loop when I need it Smiley

(Reasoning is that a loop is possible to abort via break, so whether or not it gets applied to every item can be ambiguous without further reading, whilst the functional version is always applied to every item in the collection. I like that guarantee since it's one less potential code path to think about).

In other news: Yay, managed to convince team that we should use Typescript for the latest project. modules, classes, interfaces, static typing, still support those legacy browsers that the banks want, yay.
Logged

Pages: 1 ... 201 202 [203] 204 205 ... 279
Print
Jump to:  

Theme orange-lt created by panic