Posted by hank,
Fri Jul 25 13:44:00 UTC 2008
Oh man, what a day.
I attended quite a few talks, grabbed a lot of swag, and entered a few contests. I ended up buying the Arduino Starter Kit from MAKE so I can do some awesome embedded Ruby like I saw at FOSCON. It looks really fun - I can’t wait to try it out.
The talks I attended were half-way decent, but I learned a lot more on the first day.
A good overview of how one can use Amazon’s S3 and EC2 services to cheaply process and store data on a pretty large scale. The New York Times digitized hundreds of years of articles in a single day using these services and some awesome C++ code.
This ended up being a marketing talk. I don’t know what it had to do with cloud computing, and I didn’t stick around to find out.
An awesome overview of all the new stuff in Ruby 1.9 given by Sam Ruby. I had no idea they were changing so much, and this was a good dive with code examples into that. There was some discussion among everyone in the middle on whether for loops should work like .each blocks with regards to scope. I happen to disagree with what ended up being the popular thought on this subject. Most were advocating that a for loop constitutes a block, and that scope variables and iterators should be localized inside of it. This is contrary to almost every language, which I brought up using the example of C. Yet, when you iterate with .each, you immediately define a block and a scoped iterator, which, if it has a conflicting name with the outside world, it doesn’t matter since that’s out of scope. The only thing this changes is the value of a variable outside after the loop finishes. I think leaving the ability to modify a variable external to the loop is very convenient - in summary, leave it how you’ve done it in Ruby 1.9 already.
This was an interesting session on where Canonical is taking mobile technology, and what the community can do to help. They seem to have a pretty neat subnotebook coming out soon.
This could have been one of the best talks, but the speed at which it was given and the lack of enthusiasm in the presentation left most of us either bored or unfulfilled at the end of the talk. He spent the first half explaining what Python and C++ were, then he got to what SWIG is. The end was a quick dive into an extremely complicated bunch of files that didn’t help very much. In the future, it would be helpful to go to a SWIG talk that details how to make a simple Python extension with SWIG. I may have to throw that one together myself…
I also attended the tail end of Designing Political Web Apps for MoveOn.org, but I didn’t take any notes.
We ended up going to dinner at Widmer Brothers, which was pretty awesome. I had the Pork Schnitzel, a very tender piece of meat if I do say so myself, along with 2 Full Nelson IPAs. Afterwards, we caught the bus from the convention center to BeerForge and the SourceForge Community Choice Awards party. Beerforge was a blast. I ended up talking to Jean-Baptiste Kempf, one of the developers of VLC, for hours - a truly great guy. I learned a lot about France and the French people, but also about VLC. Apparently, you can use VLC from the command line much like mplayer, which I did not know. Yet, he explained that they removed Directshow support from VLC in Linux in favor of open source alternatives, which in part I can understand. Yet, the only codec available that is able to smoothly play 1080p h264 video is closed source (CoreAVC), and until the ffmpeg avc codec catches up, I’ll have to continue using mplayer. When I can play everything back smoothly with VLC, I may consider switching.
The beer at BeerForge was pretty good - I had the IPA. SourceForge had some sort of mixed drink which wasn’t too great. All in all, a good day, but now I’m dehydrated…
Tags: c++
Posted by hank,
Sun Sep 09 14:48:00 UTC 2007
OK - so I love DDR. I was trying to compile Stepmania this morning, and found that it has some issues. I found the answer to the first issue in this post, and found the answer to the second in this one. Apparently, there are some patches that have gone into 4.0 CVS that haven’t been put into the old source.
Procedure
Get the Stepmania Source and extract it somewhere. Now we need to get stuff to compile it:
sudo apt-get install gcc-3.4 g++-3.4 build-essential liblualib50-dev
CC=gcc-3.4 CXX=g++-3.4 ./configure
Now we should have a nice Makefile and such. If you get dependency problems, you can figure that out on your own. You’ll need SDL and a few other things too, but I already had those.
First, I got this:
rch/InputHandler/InputHandler_SDL.cpp:126: error: `int SDL_EventMask' redeclared as different kind of symbol
/usr/include/SDL/SDL_events.h:108: error: previous declaration of `typedef enum SDL_EventMasks SDL_EventMask'
arch/InputHandler/InputHandler_SDL.cpp:126: error: declaration of `int SDL_EventMask'/usr/include/SDL/SDL_events.h:108: error: conflicts with previous declaration `typedef enum SDL_EventMasks SDL_EventMask'
arch/InputHandler/InputHandler_SDL.cpp: In constructor `InputHandler_SDL::InputHandler_SDL()':
arch/InputHandler/InputHandler_SDL.cpp:176: error: expected unqualified-id before '|=' token
arch/InputHandler/InputHandler_SDL.cpp: In member function `virtual void InputHandler_SDL::Update(float)':
arch/InputHandler/InputHandler_SDL.cpp:195: error: expected primary-expression before ')' token
make[2]: *** [InputHandler_SDL.o] Error 1
make[2]: Leaving directory `/usr/local/src/StepMania-3.9-src/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/StepMania-3.9-src/src'
make: *** [all-recursive] Error 1
Then, after I fixed that, I got this:
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/lua50 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -finline-limit=300 -Wall -W -Wno-unused -Wno-switch -O3 -MT LinuxThreadHelpers.o -MD -MP -MF ".deps/LinuxThreadHelpers.Tpo" \
-c -o LinuxThreadHelpers.o `test -f 'archutils/Unix/LinuxThreadHelpers.cpp' || echo './'`archutils/Unix/LinuxThreadHelpers.cpp; \
then mv -f ".deps/LinuxThreadHelpers.Tpo" ".deps/LinuxThreadHelpers.Po"; \
else rm -f ".deps/LinuxThreadHelpers.Tpo"; exit 1; \
fi
archutils/Unix/LinuxThreadHelpers.cpp:32: error: ‘gettid’ has not been declared
archutils/Unix/LinuxThreadHelpers.cpp:39: error: expected initializer before ‘CStdStringA’
archutils/Unix/LinuxThreadHelpers.cpp: In function ‘uint64_t GetCurrentThreadIdInternal()’:
archutils/Unix/LinuxThreadHelpers.cpp:136: error: ‘gettid’ was not declared in this scope
make[2]: *** [LinuxThreadHelpers.o] Error 1
make[2]: Leaving directory `/home/jon/Desktop/StepMania-3.9-src/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jon/Desktop/StepMania-3.9-src/src'
make: *** [all-recursive] Error 1
Time to patch:
cd StepMania-3.9-src/
wget -O - http://ralree.info/assets/2007/9/9/stepmania-3.9-glibc.patch | patch -p1
wget -O - http://ralree.info/assets/2007/9/9/sdl.patch | patch -p0
This should fix most of it. I’m still having trouble with this though:
if g++-3.4 -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/lua50 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -finline-limit=300 -Wall -W -Wno-unused -Wno-switch -O3 -MT CryptHelpers.o -MD -MP -MF ".deps/CryptHelpers.Tpo" \
-c -o CryptHelpers.o `test -f 'CryptHelpers.cpp' || echo './'`CryptHelpers.cpp; \
then mv -f ".deps/CryptHelpers.Tpo" ".deps/CryptHelpers.Po"; \
else rm -f ".deps/CryptHelpers.Tpo"; exit 1; \
fi
crypto51/misc.h: In function `std::string CryptoPP::IntToString(T, unsigned int) [with T = unsigned int]':
crypto51/simple.h:25: instantiated from here
crypto51/misc.h:176: warning: comparison of unsigned expression < 0 is always false
g++-3.4 -finline-limit=300 -Wall -W -Wno-unused -Wno-switch -O3 -rdynamic -o stepmania Screen.o ScreenAttract.o ScreenBookkeeping.o ScreenBranch.o ScreenCaution.o
################### ...........
################### ...........
pubkey.o queue.o randpool.o rsa.o sha.o strciphr.o CryptHelpers.o -lvorbisfile -lvorbis -logg -lmad /usr/lib/liblualib50.a /usr/lib/liblua50.a -L/usr/lib -lSDL -lXtst -lGL -lGLU ./libresample/libresample.a -ldl -lpng -lz -lm -ljpeg -lz -lpthread
`.gnu.linkonce.t._Z23CourseEntryTypeToString15CourseEntryType' referenced in section `.rodata' of EditCoursesMenu.o: defined in discarded section `.gnu.linkonce.t._Z23CourseEntryTypeToString15CourseEntryType' of EditCoursesMenu.o
collect2: ld returned 1 exit status
make[2]: *** [stepmania] Error 1
make[2]: Leaving directory `/nexus/rofl/hank/tmp/StepMania-3.9-src/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/nexus/rofl/hank/tmp/StepMania-3.9-src/src'
make: *** [all-recursive] Error 1
Leave a comment if you know the answer.
Update
00:59:55 < hardwarehank> the stable is - massively unstable
01:00:02 < hardwarehank> needed 2 patches and it still didnt work
01:00:13 < hardwarehank> has a linker error in the final compile :(
01:00:19 < DevastatorIIC> worked immediately after untarring here
01:00:30 < hardwarehank> you got the binary :)
01:00:38 < DevastatorIIC> yeah, and it worked ;)
01:00:41 < hardwarehank> maybe i should do that
01:02:52 < hardwarehank> woohoo
01:02:55 < hardwarehank> DevastatorIIC++
Lesson: Don’t overcomplicate things.
Tags: c++