Sugar induced socializing

A sketchblog by Dudymas

Coding coding August 4, 2009

Filed under: Computing, Personal — dudymas @ 1:07 am

Okay, I know I’ve said it before that I was getting tons done. Well, I’m about to have graphical proof!

I just got event passing working on my code project. It’s awesome. Now I’ll just be making resource concepts using templates and boost concept check, and things will be groovalicious!

*moments later*
Ah. So this is what bites for now. I’ve got a lot of resource concepts in the code (besides additional libraries I’ll allow the user to plop down inside the program dir). XMPP hosts, directly connected users, disk IO, graphical contexts, and also memory storage (primarily for events and mostly discrete data). The thing is, they all dole out various resource share types in order for me to get everything to connect smoothly. Really, I do that because it makes threading much easier by designing read-only and easily parallel code to just work at the highest speed, while allowing other types that need write permission (and thus mutex/blocking) to also still work. Some resources are also plain ol’ monitors, with their own worker threads (you pretty much have to do that for net IO), and so they need to create shares that are really just fancy looking thread-safe buffers.

What am I getting at? Well, the worst thing I could do is design OO to just wrap around everything. That would turn it into class/object pea-soup. Design patterns are always stumbling blocks when every problem you are solving is really separate and unifying any two resources under a pattern will typically lead to a golden hammer scenario (suddenly, you gotta make everything a nail or else it won’t work). Rather than tie myself down with all that junk, I decided to just design concepts using boost’s concept check. All’s well, but still… frustratingly enough, I have to create about 4 classes per handler to make everything work out, because my pointer storage will allow virtual function tables and all, but you still have to make first a base class (to build the VTable on) and then you have to make a template that inherits, which will also let you store share pointers in it. But don’t forget that the handler needs to design a template for the holder, which will concept check the incoming share. Now to make things even sillier, this all won’t work unless you then create a share class that caters to that concept. Still… if you put in all the infrastructure… suddenly… it just works. And the design is rather static… you literally only need to make an empty call to a function or member in the concept to add to it. And you only need to add virtual functions if it’s completely necessary… and usually they just call new concept functions. So, once in place, it’s not going to be hard to expand. Still, it gets a little tedious to update three classes to add a feature (the concept, template, and base).

Whatever, though. I’d hate to try just doing reinterpret casts and all the other madness that you have to go to just to get the same functionality without type-safety. And the concepts generate nice error checking… and the VTable sure is dandy. It lets me partially specify special cases of the template class to revert to the base class functionality or just completely add new and bizarre changes if I so desire (at the cost of adding… you guessed it… another object/class).

Still, I’m hopeful that the thing won’t be too huge a pain in the end. And the idea is to reduce feature changes… and mostly just make it easy to add as many resource share types as I want without the fear that something will break, leak, or take a hundred additional changes just to support it.

The bottom line: OO will always be evil. And I really just gear my UI to be as ignorant of it as possible (UI + OO + adding features = painful death). The downside of it is that my executable code is getting REALLY big… even with -O3 and lots of added stripping to the release binaries. And geez… I still gotta add the individual resource shares once I make them transport data trivially (hopefully tbb will make tuning the CPU usage of each worker thread painless).

We’ll see. For now… I’m optimistic. I SHOULD have a real alpha before classes start. Why? Because I’m confident that if events are working (the part I thought would take forever), data generation to follow the events is merely brainless function calls and byte pushing. I hope. I hope I hope.

OH! and using OpenGL plus nvidia’s lil’ IMGUI toolkit has made the UI side of data representation and threading almost TOO easy to pull off. I love that so much more than any other type of GUI. I can’t tell you how much I hate retained GUI’s, because of all the work to keep track of EVERYTHING on the screen.

 

Back in action… loosely enough October 4, 2008

Filed under: Computing, Life in General — dudymas @ 2:28 am

Hey all!

I thought I might as well prove I’m still alive here. I bet wordpress is getting an itchy trigger finger for deleting me from inactivity, right?

Well, here’s somewhat of a plan I have for getting things done.

I’m rewriting my brush code for my paint program… it’s pretty hilarious to think this way, but I thought I’ll turn my stroke buffer into a parallel datastructure using TBB (threading building blocks). It’s ridiculously easy to do with that library, and you can’t argue with the license. Free is free is free.

I’ll do what I can to give up details on that without giving out too much particular intellectual info. That is, I want to help others start using this library. I might even make an expansion on a structure and post it here.

Also, I’m still in the process of adding adobe’s GIL to the project. Who knows, maybe they’ll like my project enough to give me a few features I might ask of them (More details on that later)

All in all, someone at the arts department at USF seems interested in the project enough that I’ve got a tremendous amount of steam pumped back into the whole thing. I might publish an svn view here if anyone wants to get an idea of how much work I have ahead of me… and lordy, if anyone wants to help me with windows coding, that’d be great. I have OSX leopard and XP, but no vista. And I’m not about to try to install that monster on any of our home computers.

Also, I’m investigating the possibilities of making my first networking module based on SCTP… and later doing a UDP version. TCP is going to be a little… too wonky in some circumstances, so I need to reengineer the brush stroke adapter classes so that I can more easily send a ’stream’ of stroke data. The format right now is very much chunk oriented, and using TCP will put a lot of zaniness on the client (the server always has it easy with just memcpy and wot-not).

Hoody hoo! back to work! I’m learning more about SQL and I might also be learning flash very soon. Again. *sigh*

 

CGAL documentation March 15, 2008

Filed under: Computing, Review — dudymas @ 7:01 pm

Wellp… I dunno how or why, but I find myself wanting to rant. I’ll do my best not to, but I’d like to voice something about CGAL (and hopefully later when I have time, I’ll voice my concerns on their mailinglist…). I’m mostly doing this for people who might google this and wonder about it, or just to get some feedback. I’m trying to use the KDS in CGAL, and it’s making me want to cry.

Right now, when I look at the Delaunay Triangulation (the 2d one, that is) kinetic structure, I flat out cannot figure out how they are using edges from either the documentation or the immediate code. This makes the visitors and recent edge goodies a little difficult to harness. Now, right off the bat, I’ll confess I’m not using the library in a normal fashion, but wow. This is weird. I think they are using the edges as STD::Pair objects, storing a Face and an integer for the edge label of that face, thus forming an ‘edge’. I guess?

Well, what I want to do is manipulate the structure and nudge it like any good ol’ KDS, but then as updates occur to the edges, I’m trying to form an RNG (relative neighborhood graph) from the edges and update it as well. But, it doesn’t call for an all out KDS because I’m really only loosely using the RNG and it’s overkill to make it into a KDS. See the problem forming here? I’d really love to just get these “views” or “observations” at the structure of the triangulation from the visitor… but it’s becoming a serious pain. But… they have it… so it SHOULD be usable… right? I mean, I want a DCEL structure, to be honest, but the structure they are using is a little hard to comprehend. Sure, I can generate meshes and such from the KDS, but those will be constantly changing, so the KDS will cause a lot of problems for the simulation’s overhead.

Correct me if I’m wrong, but this seems like the armpit of the KDS right now (accessing the structure on specific events), and so I don’t want to criticize the team behind CGAL or the KDS stuff it has (it’s really cool junk!). You know, it’s probably something obvious that, due to my lack of experience, is going right over my head. But wow… I hope they’ll explain it one day… I’m writing this here and not in the mailinglist since I sort of want to submit a bug-report… but then, I’m pretty sure it’s not worth them changing anything. The ‘weird’ programmer must typically hack and burn his own trail. So I guess I’ll just post this here, and any interested parties can discuss. If I find anyone coming in here trying to use kinetic data structures in CGAL and they find issues with the edges and triangulations and visitors as well, then perhaps I’ll bug the CGAL people… till then, I’ll just post any updates I have on the issue here.

Well, I have to go now. My sister’s stinky chihuahua is groveling at my feet. I need to see what his problem is… or perhaps feed him to the neighbor’s cat. Yes… that’s what I feel like doing now… lemme just get some ketchup (cat’s like condiments… right?) and some tunafish… I’m sure I’ll work something out.

 

How the code goes November 20, 2007

Filed under: Computing — dudymas @ 6:33 pm

Well then, I neeeeed to update this space. I’m going to be getting some high quality updates here soon too. College has been eating my heart out.

Xcode 3.0 has been awesome. The refactoring is stellar for all that cruddy functional programming that my data structs class requires because now I can just extract things several times and whallop all the profs nitpicks on when I should modularize my functions more. I’ve also been using the 3.0 snapshots system in epic proportions… it kicks arse. The whole way that the new system shows differences and wot-not has been invaluable is seeing how I’ve screwed things up so that snapshots can be very potent ways of debugging (I’m sure that most people wouldn’t recommend that, but oh well).

As for previous projects, I’m currently working on the brush system of a small sketch program. Since it needs a save-file format, I’m also starting to dabble more with boost because I want to add in some sophisticated file formats for saving and loading work. The boost-spirit library seems right up my alley for this problem, and I’ll have a lot of fun with it from the looks of things.

I’m also creating a wiki with moinx, and that’s helping me out a ton. Graphviz is my tool of choice for the class layouts (sorry, but the xcode class modeling system has been irritating and overly detailed… I’m a “gist of it” kinda fellow, so I only need phrases and pointy arrow bits).
Visual Automata Simulator has been good for when I need to design a state machine or two in the code (always a must with input-output scenarios).

If anyone ever wants to know what patterns I’m using, then I’ll throw that out along with my graphviz work. The networking and sockets will be tricky. I want to use something clever… something that will be very good at penetrating firewalls since the info that I’ll use for my program will be undoubtedly simple. Bah! I’ve just got ideas… that’s it! I don’t know how I’m going to make this a good programming, sketch blog. And now… a sketch/inking I’m working on for someone’s character (a bubble dragon):

Spindrift

 

Eclipse disappointment November 29, 2006

Filed under: Computing, Review — dudymas @ 11:25 pm

Well, wow. I tried showing someone Java with the latest eclipse. We were rather surprised not in its abilities, but a serious fault. I followed the tutorials with her, and while they seemed complete, the projects failed to compile or run. I’m not very experienced with java, so I had no idea what could be going wrong with either the compiler or the code. We tried the tutorials several times and didn’t get any positive results. (more…)

 

Ahhhh! I’m crazy again! October 31, 2006

Filed under: Computing, Creativity, Life in General, Personal — dudymas @ 2:22 am

So. I’ve taken learning hebrew personally. I have a hebrew tech podcast I want to understand by the end of the semester, I have a programming project that will require me actually giving myself reading assignments. Good grief. Where have I been?

(more…)

 

My review of flock thus far October 25, 2005

Filed under: Computing, Review — dudymas @ 8:12 pm

Well then… seems like it’s about time I give my preliminary assessment. Although that sounds official, it pretty much is worth dirt. Still, I give it anyways, because you can always scrape a few gems out if you look carefully.


So, Flock hit me almost instantly as a great answer to people feel like web browsing is too far away from the masses… from communication. People could either chat on the net or browse the net. Now you get a sort of conglomerate… you can easily share bookmarks and blog and flickr as a default. “This is nothing new.” So you say. I’d agree, but the difference is in how it’s packaged and presented so easily… so readily accessible. It’s a powerful combo and for them to do all the hard work to get it together is very nice. There’s lots to add, but that’s nothing too difficult when you think about how much is already in Flock.

(more…)

 

Time to try this out… October 25, 2005

Filed under: Academia, Computing, Life in General, Review — dudymas @ 5:28 pm

Well, I’m a little unhappy that this system doesn’t seem to support a lot of a theme editing (I prefer my sites to be darker and easier on the eyes)… but oh well. Could be worse. If I don’t like it, I can always just ask them wordpress to delete this account. We’ll see.

So, as for other goings about, I need to double check that I can’t change the theme here, then I’ll do some web design (more on that later), then I get to take an exam for my vector calculus class.

Afterwards, I guess later tonight I’ll finish up even more work work work. I guess once I get used to this web blogging I’ll be able to make better posts, but for now, I’m a goin’!