Ten Points Random » Jon https://blog.asdfa.net Too many monitors, dragons, interesting human interfaces and pointless distractions for one guy. Sun, 17 Mar 2013 04:43:30 +0000 en-US hourly 1 https://wordpress.org/?v=4.0.32 Building Chromium or Berkelium in Fedora 18 https://blog.asdfa.net/building-chromium-or-berkelium-in-fedora-18/ https://blog.asdfa.net/building-chromium-or-berkelium-in-fedora-18/#comments Sun, 17 Mar 2013 04:43:30 +0000 http://blog.asdfa.net/?p=312 To get the Chromium aspect of Berkelium built this is roughly the process I used. There’s a lot of manual patching I didn’t put together patches for, but hopefully someone will find this helpful.

This was a bit ridiculous, here’s my somewhat organized notes for anyone that might be trying the same:

General setup:
 - git clone https://github.com/sirikata/berkelium
 - cd berkelium
 - git submodule update --init --recursive
 - sudo yum install subversion pkgconfig python perl ruby gcc-c++ bison \
                        flex gperf nss-devel nspr-devel gtk2-devel glib2-devel \
                        freetype-devel atk-devel pango-devel cairo-devel \
                        fontconfig-devel GConf2-devel dbus-devel alsa-lib-devel \
                        gnome-keyring-devel
 - sudo yum install subversion pkgconfig python perl gcc-c++ bison \
        flex gperf nss-devel nspr-devel gtk2-devel glib2-devel freetype-devel \
        atk-devel pango-devel cairo-devel fontconfig-devel GConf2-devel \
        dbus-devel alsa-lib-devel libX11-devel expat-devel bzip2-devel \
        dbus-glib-devel elfutils-libelf-devel libjpeg-devel \
        mesa-libGLU-devel libXScrnSaver-devel \
        libgnome-keyring-devel cups-devel libXtst-devel libXt-devel pam-devel

Stuff I had to figure out:
 - sudo yum install perl-Switch perl-Digest-MD5
 - run Berkelium's util/build-chromium.sh
   - once it finishes downloading stop it. (The compile will fail, but the download should work fine.)
 - patch build/chromium/src/third_party/tcmalloc/chromium/src/base/linuxthreads.cc
    alter line 196 to "static void SignalHandler(int signum, siginfo *si, void *data) {"
      (change siginfo_t to siginfo)
 - patch build/chromium/src/ui/base/l10n/l10n_util.cc
    remove line 8 "#include <glib/gutils.h>"
 - add "#include <unistd.h>" to the following files in build/chromium/src:
    - src/base/test/test_file_util_linux.cc
    - build/chromium/net/tools/flip_server/flip_config.cc
    - net/tools/flip_server/mem_cache.cc
    - net/tools/flip_server/sm_connection.cc
  - cd build/chromium/src/third_party/WebKit && curl "https://bug-92264-attachments.webkit.org/attachment.cgi?id=154643" | patch -p1
    (make sure it all gets applied, I had to handle one chunk manually)
  - in chrome/browser/net/quoted_printable_unittest.cc
    comment out all that broken SCOPED_TRACE stuff (170, 185, 199)
  - run Berkelium's util/build-chromium.sh again
    - go get dinner while it compiles
]]>
https://blog.asdfa.net/building-chromium-or-berkelium-in-fedora-18/feed/ 0
Using shared_from_this inside boost::serialization https://blog.asdfa.net/using-shared_from_this-inside-boostserialization/ https://blog.asdfa.net/using-shared_from_this-inside-boostserialization/#comments Sun, 02 Dec 2012 01:13:32 +0000 http://blog.asdfa.net/?p=305 Didn’t find a solution foe this on the Internet, so I thought I’d just write this up real quick to benefit anyone that was having the same issue.

If you are using boost::serialization and shared_ptr, you may have already discovered that all you have to do is add

#include <boost/serialization/shared_ptr.hpp>

to make them work together happily.

However, if your initialization routine inside your load requires shared_from_this, you may find yourself getting

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_weak_ptr> >'
  what():  tr1::bad_weak_ptr

when trying to call methods that require shared_from_this in s11n code.

This happens because a sahred_ptr hasn’t been created for yoru unserializing class yet. To work around this, define this macro:

//Extra to make shared_from_this available inside the saving code
//This works by asking the archive to handle (and therefore create) a shared_ptr for the data
//before the main serialization code runs.
#define ALLOW_SHARED_THIS(type) \
    template<class Archive> inline void load_construct_data(Archive &ar, type *obj, const unsigned int file_version) { \
        boost::shared_ptr<type> sharedPtr; \
        ::new(obj)type();/* create instance */ \
        ar.reset(sharedPtr, obj); /* Tell the archive to start managing a shared_ptr */ \
    }

Then use it for each class that needs the shared_from_this functionality:

namespace boost { namespace serialization {
ALLOW_SHARED_THIS(MyClass)
}}

This defines a custom constructor for your class that will create the shared_ptr for your instance before your main s11n code runs and allow your code to run peacefully.

 

]]>
https://blog.asdfa.net/using-shared_from_this-inside-boostserialization/feed/ 1
thunderzipper https://blog.asdfa.net/thunderzipper/ https://blog.asdfa.net/thunderzipper/#comments Sat, 17 Dec 2011 18:37:45 +0000 http://blog.asdfa.net/?p=253 I’ve been working on a protocol for communicating with many generic devices easily.  Much there is that I can say about it, but it’s still fairly early prototype. I already incorporated some work from linmctool. With it, some glue, and carefully setup systems, I have been able to write a simple thunderzipper client that functions as a basic DMX light board – controlled exclusively with a PS3 controller.

It’s still quite an early prototype – and all the settings are hardcoded – but it’s still functional and a optimistic proof-of-concept of what I can do with  this protocol.

I need to get work on my main “glue” application that routes everything thunderzipper.

In other news, I just pushed a commit that makes basic WiiMote buttons available and functional. (And without the need for a scan utility or setup.)

]]>
https://blog.asdfa.net/thunderzipper/feed/ 0
lua-convert https://blog.asdfa.net/lua-convert/ https://blog.asdfa.net/lua-convert/#comments Wed, 07 Dec 2011 01:58:45 +0000 http://blog.asdfa.net/?p=251 Here’s a project I’ve been working on a little: http://repo.asdfa.net/lua-convert/overview

It can take, as input, JavaScript (actually, a subset of JavaScript syntax, not real JavaScript) and turn it into Lua code.

It also does language-agnostic preprocessing.

It’s still in the earlier stages, but is quite useable as it currently stands. The whole thing can be transported as a single, cohesive jar file. You can embed the functionality into you application (perhaps your Lua-foo program wants better syntax?) using pipes and the –slave mode.

 

]]>
https://blog.asdfa.net/lua-convert/feed/ 0
Tasty Food https://blog.asdfa.net/tasty-food/ https://blog.asdfa.net/tasty-food/#comments Sun, 22 Aug 2010 23:30:27 +0000 http://blog.asdfa.net/?p=239 Hmmm, I like to cook from time-to-time. Try new things. But I never really record what I cook if it turns out well.

Lunch was delicious. Here’s how I made it. YMMV.

2 bags of chili-flavored Maruchan ramen noodles
1 onion, diced or smaller
1 jalapeno, sliced or chopped
2 small cloves garlic, pressed
oil
soy sauce
ground peppercorn
garlic salt
buttered toast

(I tried running my onion through a garlic press, not sure if it was worth it, but it was messy and fun!)
Crush noodles, reserve flavor packets. Put 1/4″-1/2″ water, noodles, jalapenos, about a teaspoon of oil, and onions in a medium frying pan on high to medium-high heat. Keep stirred. When most the water is boiled away, add garlic, flavor packets, a few tablespoons of oil, a couple tablespoons of soy sauce, and peppercorn/garlic salt to taste. Cook until onions are finished. Serve with buttered toast.

Thoughts: Very tasty, it almost seems like its a solid sauce of tastiness on bread. Perhaps, if I had some Sriracha to go with it…

]]>
https://blog.asdfa.net/tasty-food/feed/ 0
Too Good – Simulated MJPEG Video Streaming https://blog.asdfa.net/too-good-simulated-mjpeg-video-streaming/ https://blog.asdfa.net/too-good-simulated-mjpeg-video-streaming/#comments Mon, 22 Mar 2010 05:46:34 +0000 http://blog.asdfa.net/?p=229 This was just too good.  I was playing with video codes for real-time streaming of data off my webcam-crane-contraption and decided to try MJPEG.  I wasn’t a fan of rewriting code to put it in the proper format, so for now I thought I’d just set a JPEG to refresh frequently.

So I did.

And it worked, moderately well:

The best part though: It also works on my iPod! Plain ‘ol Safari and JavaScript.  I thought that was pretty cool.  I guess Google, in building Google Chrome to handle the next generation of applications, wasn’t too far off the path.

]]>
https://blog.asdfa.net/too-good-simulated-mjpeg-video-streaming/feed/ 0
Camera Crane WIP https://blog.asdfa.net/camera-crane-wip/ https://blog.asdfa.net/camera-crane-wip/#comments Thu, 04 Mar 2010 03:43:32 +0000 http://blog.asdfa.net/?p=222 Let’s see, so I bought a house, switched to Linux and now am hacking away at this:

Camera Crane

K'nex, RC servos, a Phidget, and if you look closely, me!

Codename: TelePlaymutte.  ‘Cause I wanna play games remotely.  VOIP, CheckersOIP, DNDOIP, etc. ;-)

]]>
https://blog.asdfa.net/camera-crane-wip/feed/ 0
Halloween is so much fun https://blog.asdfa.net/halloween-is-so-much-fun/ https://blog.asdfa.net/halloween-is-so-much-fun/#comments Mon, 09 Nov 2009 01:45:31 +0000 http://blog.asdfa.net/?p=207 So, this last Halloween I had some fun with the kiddos that come around asking for candy.

Welcome to the haunt

My garage this past Halloween

Last year I did something similar, but simpler.  This year was a bit more complex.

It seemed simple enough a task for the trick-or-treater: walk in, enjoy the spooky ambiance (and random lasers stabbing thorough the upper level of fog), grab a reward from the yellow glowing pumpkin, and move on to the next house.

Right?

Looking up as you walk in

Looking up as you walk in

Not with me around.  (Haha – trick or treak? Trick!)  With the help of my sister, we ushered all the, um, victims into the cage (a repurposed dog “kennel”).  Once the kids were sure the smiling Goth-dressed-female wasn’t going to bite them, and that everyone was clear of the door, the lights would suddenly drop out.  An enormous thunder and lightning strike from directly in front of them would illuminate a monster, arms outstretched and ready to grab them!  Before anyone could but turn around, the door to the chain-link cage would swing shut, chains clanking loudly against the metal.  You were trapped!

Though you could get away without a trick?  Didja?

Though you could get away without a trick? Didja?

And then . . . we let them go.  We didn’t scare the really litl’ ones.

Here’s an AVI movie, I’ll have to get me a flash player setup sometime.  The microphone normalises stuff too much so you can’t really hear things.

By the end we had fog, black light, strobes, lasers, subs, amps, a laptop . . . so pretty much an instant rave party afterwards. ;-)

Behind the scenes

Behind the scenes

Thanks to the fam for helping get things setup!

]]>
https://blog.asdfa.net/halloween-is-so-much-fun/feed/ 0
Life has its happens https://blog.asdfa.net/life-has-its-happens/ https://blog.asdfa.net/life-has-its-happens/#comments Tue, 03 Nov 2009 02:22:13 +0000 http://blog.asdfa.net/?p=204 Life happens and come and goes around sometimes, I guess. Today half the team I work on, including a co-worker that I had known for quite some time, was laid off. Bam, just like that, I never even saw it coming.
Life is mean sometimes, but what would life be…

]]>
https://blog.asdfa.net/life-has-its-happens/feed/ 0
Several hundred dollars of keybard and some PVC pipe later… https://blog.asdfa.net/several-hundred-dollars-of-keybard-and-some-pvc-pipe-later/ https://blog.asdfa.net/several-hundred-dollars-of-keybard-and-some-pvc-pipe-later/#comments Sat, 03 Oct 2009 19:26:44 +0000 http://blog.asdfa.net/?p=200 Keyboards

My music toys

Mmmm.  Audiodelicious.

MY new keyboard, the one on the bottom, is full-size, complete with weighted (scaled hammer) keys.  Very nice to play.

]]>
https://blog.asdfa.net/several-hundred-dollars-of-keybard-and-some-pvc-pipe-later/feed/ 0