Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411414 Posts in 69360 Topics- by 58415 Members - Latest Member: sophi_26

April 16, 2024, 08:29:43 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 187 188 [189] 190 191 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 737951 times)
_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« Reply #3760 on: December 04, 2012, 10:49:31 AM »

I find providing both 32 and 64 bit linux builds really annoying. Can't get cross-compiling to work (Seems that I also have to cross-compile all the dependencies that I could otherwise get from the package repository)
I've finally decided to install another linux inside virtualbox. Is it really that hard or am I missing something?
I guess the easiest option would be to just provide the sources, but the code is too ugly and would be embarrasing.

The current state of cross-arch support on Ubuntu is just sad right now, they are actually doing big steps in the right direction, so that "most" of runtimes come in different binary paths (eg. linux-i386 and linux-amd64) but SDKs are still in a terrible state, and many useful packages aren't still there.

For the last projects I've just built two Ubuntu 10.04 chroots, inside my 64 bit Ubuntu, both to ensure binary compatibility with old stuff (ie. libstdc++ 16 is "too new") and to compile 32 bit.
It's really easy actually, you just need to follow this guide here.
Still, it is a solution to problems that shouldn't have been there in the first place.
Logged

QuadrupleA
Level 2
**



View Profile WWW
« Reply #3761 on: December 04, 2012, 11:00:13 AM »

What's the reason for targeting 64bit at all? The advantage is usually access to >2-4GB RAM, but that's more than needed for most applications. Larger instruction operands can make a slight improvement to performance but there are usually a lot of higher-leverage options you can exhaust before worrying about that.
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
rivon
Level 10
*****



View Profile
« Reply #3762 on: December 04, 2012, 11:25:30 AM »

Can't get a 32-bit Ubuntu installation to actually boot in VirtualBox. Sad
Wut? I've been using VirtualBox for a long time and it always just works out of the box.

What's the reason for targeting 64bit at all? The advantage is usually access to >2-4GB RAM, but that's more than needed for most applications. Larger instruction operands can make a slight improvement to performance but there are usually a lot of higher-leverage options you can exhaust before worrying about that.
Most people today use 64bit Linux and 32bit libs aren't installed by default. And also a lot of people don't want them. Not providing a 64bit version is like a slap in the face.
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #3763 on: December 04, 2012, 11:36:27 AM »

Hey C/C++ naming convention authorities,

You can blame most of the major ALLCAPS stuff on Microsoft, and the bizarro abbreviated functions on C.  The C++ standard API, other than its backwards-compatibility bits, uses decent nomenclature.  Where it goes horribly awry is its templates.  D:
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #3764 on: December 04, 2012, 11:44:26 AM »

Can't get a 32-bit Ubuntu installation to actually boot in VirtualBox. Sad
Wut? I've been using VirtualBox for a long time and it always just works out of the box.

I've tried a few times now, and each time the installer has given me an uninformative error or two and then appeared to complete, but what it installs doesn't boot. It just sits at a blank screen after login and I can't do anything. Using Ubuntu 12.10 on a 64-bit Windows 7 host. I also have a bootable 64-bit Ubuntu host, which I haven't tried yet...maybe that would work better? I'll give it a shot later today.
Logged

QuadrupleA
Level 2
**



View Profile WWW
« Reply #3765 on: December 04, 2012, 12:35:51 PM »

Most people today use 64bit Linux and 32bit libs aren't installed by default. And also a lot of people don't want them. Not providing a 64bit version is like a slap in the face.

Good to know - been out of the Linux world for a while now. Used RedHat exclusively for a few months in the early 2000's but one too many conf files and source code build procedures broke my spirit Smiley
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
epcc
Level 1
*


View Profile
« Reply #3766 on: December 04, 2012, 02:46:21 PM »

I've been struggling with the same thing recently. Can't get a 32-bit Ubuntu installation to actually boot in VirtualBox. Sad

Please let us know if you get it all figured it out!
Can't say anything about Ubuntu, but linux mint installed as good as on a real computer. Performance is awful, however. On a Pentium 4 it took so long to even launch the installer that I decided to hijack my brothers computer. On a recent high-end CPU (i7?) it ran as good as on Linux Mint runs on my Pentium 4.
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #3767 on: December 04, 2012, 03:10:06 PM »

Current VMs should be at ~70% of the host performance, thanks to virtualization support from the current CPUS. I personally had no problems installing some Linux flavour in a VM. But to me it was just "mount ISO and let boot", so I can't assist here.
Logged

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



View Profile WWW
« Reply #3768 on: December 08, 2012, 08:48:40 PM »

Just switched to a new OS version and browser (Snow Leopard -> Mountain Lion, Safari -> Chrome). Everything is uncomfortable while I get used to the changes. Of course, none of my code compiles anymore either... I also switched to 64-bit Windows and Linux recently which also broke things, so I actually don't have a platform where I can build and run anything right at the moment. Sad
Logged

RalenHlaalo
Level 0
***



View Profile WWW
« Reply #3769 on: December 10, 2012, 11:25:08 PM »

I just spent about an hour trying to figure out why my quad wasn't drawing only to realise I'd set its colour to the same as the background Facepalm
Logged

QuadrupleA
Level 2
**



View Profile WWW
« Reply #3770 on: December 11, 2012, 12:35:45 AM »

I just spent about an hour trying to figure out why my quad wasn't drawing only to realise I'd set its colour to the same as the background Facepalm
Sounds like the many stupid graphics bugs I've created over the years Smiley
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
Geti
Level 10
*****



View Profile WWW
« Reply #3771 on: December 11, 2012, 02:23:29 AM »

Not sure if happy or grumpy. Swap from vector<bool> to bitset, huge performance increase in debug build. Surely operator[] for vector<bool> isn't that different than the bitset one?!
Logged

QuadrupleA
Level 2
**



View Profile WWW
« Reply #3772 on: December 11, 2012, 09:54:16 AM »

Not sure if happy or grumpy. Swap from vector<bool> to bitset, huge performance increase in debug build. Surely operator[] for vector<bool> isn't that different than the bitset one?!

Weird - not sure if you need it or not, but if you're in Visual Studio, the debug C/C++ runtime libraries slow things waaaay down - I switched them in my Debug build (Properties, C++ Code Generation, /M* switches and "Basic Runtime Checks") and got a 16-22x performance improvement in BOOST_FOREACH and STL iterator-based for loops (my game loop went from 12ms to 0.4ms).

Have since scrapped BOOST_FOREACH and STL iterators in most places for good-ol' integer index for loops - they're lightning fast in both debug and optimized builds (0.05ms for above-mentioned loop), wheras STL/Boost seem klunky as hell unless you turn all the optimizations on.
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
RalenHlaalo
Level 0
***



View Profile WWW
« Reply #3773 on: December 11, 2012, 01:37:33 PM »

I just fixed a bug that had me completely baffled for hours. The moment I finally discovered the problem was one of the biggest coding mind-fucks I've experienced  Crazy

My morale was already pretty low from the previous bug (see above).
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3774 on: December 11, 2012, 03:47:29 PM »

Have since scrapped BOOST_FOREACH and STL iterators in most places for good-ol' integer index for loops
Welcome to our world Wink Currently best practice / 3rd party coder friendly code comes waaaay further down the list than fast to write and fast to execute code that helps ship this game.
Cheers for the tip on turning off some of the debugging crap though. I feel like blaming a shocking implementation of std::vector<bool> cause it was seriously the use of operator[] that was causing the slowdown.
Obviously both were fast enough in release builds, but we spend most of our time _not_ in release builds Droop

The moment I finally discovered the problem was one of the biggest coding mind-fucks I've experienced  Crazy
Do we get to know what this crazy problem is?
Logged

RalenHlaalo
Level 0
***



View Profile WWW
« Reply #3775 on: December 11, 2012, 04:26:15 PM »

Do we get to know what this crazy problem is?

It's a little complicated to explain exactly, but essentially I was performing a static down-cast on a pointer to the wrong type, but the type that I was wrongly casting to still contained the data I needed, which coincidentally was located in the same place as it would have been in the other class (the one I should have been casting to), and therefore the code worked fine, and had been working fine for months.

Then, last night I added a new data member to the class (EDIT: actually it was to a class that the class contains an instance of), thereby changing its layout, and that's when I noticed some strange behaviour. Every time the player entered a 'gravity region' (see old prototype), he was relocated to position (0,0). I've never been so confused in my life  Cheesy I couldn't believe such a serious error had been silently lurking in the code all that time.
« Last Edit: December 11, 2012, 04:56:35 PM by RobJinman » Logged

Graham-
Level 10
*****


ftw


View Profile
« Reply #3776 on: December 11, 2012, 04:30:32 PM »

You better believe. Shit happens :|.

Logged
QuadrupleA
Level 2
**



View Profile WWW
« Reply #3777 on: December 13, 2012, 11:18:38 AM »

Much as I'm loving STL and the Boost libraries, its authors may be among most pedantic bastards to ever walk the earth - reading through their documentation and references is like decoding mathematical proofs.

Tooltips get a little template-happy as well:   Smiley

std::Tree<std::_Tmap_traits<std::string, boost::property_tree::ptree, std::less<std::string>, std::allocator<std::pair<const std::string, boost::property_tree::ptree>>, false>>::const_iterator begin() const
Logged

Weapon Hacker - roguelite metroidvania;
Battleship Solitaire - mindless podcast companion
doihaveto
Level 2
**



View Profile
« Reply #3778 on: December 19, 2012, 09:38:18 PM »

Much as I'm loving STL and the Boost libraries, its authors may be among most pedantic bastards to ever walk the earth - reading through their documentation and references is like decoding mathematical proofs.

Funny you should say that. I've been reading "Elements of Programming" by Stepanov (STL author) and McJones. It's really, really good - but it's incredibly mathematical, to a point where it doubles as an introduction to abstract algebra. Which I thought was really unique for a CS book. Smiley
Logged

pixhead
Guest
« Reply #3779 on: December 21, 2012, 02:46:24 AM »

Windows API. That is all.
Logged
Pages: 1 ... 187 188 [189] 190 191 ... 295
Print
Jump to:  

Theme orange-lt created by panic