[jugglemaster] 1st real thread (was Re: jugglemaster (fwd))

Chunky Kibbles chunky at icculus.org
Tue Jun 8 11:51:44 EDT 2004

On Mon, Jun 07, 2004 at 11:01:56PM -0400, Barton Chittenden wrote:
> I figure that as long as we're having a conversation, we might as well 
> make it public...
> Because this is a forward to the list, rather than a reply, the quoting is 
> thrown off... I'll try to make it somewhat clear.
> ===============================================================================
> Barton Chittenden = I'm not a lawyer, but I play one on /.
> ===============================================================================
> ---------- Forwarded message ----------
> Date: Mon, 7 Jun 2004 19:32:17 -0400
> From: Chunky Kibbles <chunky at icculus.org>
> To: Barton Chittenden <tiger at iglou.com>
> Subject: Re: jugglemaster
> On Sat, Jun 05, 2004 at 12:43:00AM -0400, Barton Chittenden wrote:
> >Gary,
> >
> >I started poking around in the code. I have two features that I'd like to
> >add to the feature list; I don't think that either of them should be
> >particularly difficult.
> >
> >1) Add some sort of control that would allow you to save a random pattern.
> >This might get a little involved in the user interface department; you'd
> >have to figure out where to put the save pattern button, when that button
> >should appear, what file the pattern should get saved to, and so forth and
> >so on. Writing out the pattern to the file should be bloody simple by
> >comparison {and I should know ;-}.
> Yeah. That should pretty cool. I actually mean to re-write the pattern
> loading code and move it into jmlib, so it won't have to be done for
> every individual app. I actually re-wrote it twice so far, once using
> normal C++ and once using lex & yacc. I'm definitely gonna run with
> another, more-informed and less-hakky C version of the C++ code I did.
> <Barton>
> Tell me more!
> </Barton>

Eh. I'll put it up later today, if I get the chance. It's mostly the
same as the parsing in patt.cpp [ie, healthy use of sscanf], but without
stupid C++isms, and generally cleaner and better written.

> Pattern-saving facilities would be extremely cool, and probably a
> really good way of geting your feet wet in the jmdlx code. An
> automatic submission thingy that e-mails patterns to me might be
> pretty neat, too, so that I can enter them into the pattern files?
> Maybe a form submission to the jmdlx webpage?
> <Barton>
> I like the idea of submitting patterns to the web page. 
> </Barton>

Yeah. That bit's easy - shouldn't take me more than a couple minutes
to do :-)

> Whaddya think? Having just read that, it sounds like I was asking you
> to write some code for me, it wasn't meant like that at all. Just some
> thoughts :-)
> <Barton>
> I'm definitely interested in getting my feet wet. Whether or not I end up 
> immersed, or simply with damp feet, I don't know yet, but I definitely 
> want to give it a shot... and if I mess something up, that's what CVS is 
> for :-).
> Speaking of messing things up (or not), I like the fact that all of your 
> modules have a main() function inside for testing purposes. You might want 
> to have that #IFDEF'd out, so that you can compile individual modules for 
> testing simply by giving gcc a command line option:

Bwahahaha. I didn't write most of jmlib. It started off as C by Ken
Matsuoka, re-written in C++ by Per Johan Groland [a choice that I'm not
at all sure I like, although the code is demonstrably extremely

> /* Testing code */
> int
> main(void)
> {
> 	/* testing code goes here */
> }
> then compile that module with
> gcc -DSTANDALONE_TEST -o foo foo.c

Yep. If you look at patt.cpp, it does exactly that - that's one of the
ones that I wrote :-)

> Even better to incorperate this into your make file.

in the jmdlx dir:
make patt

> Perl has some wonderful testbed stuff, some of which interacts well with 
> C.

Never tried it.

> </Barton>
> >2) I would like the styles dialog {ie. the dropdown box that's avialable
> >when you select "Change Stlye" in the file menu) to be populated by
> >traversing the pattern list. As far as I can tell, you've already written
> >all
> >of the code in PatternLoader::PrintStyles().
> Yeah, I'd pondered that. The thing is, that the styles in the pattern
> file mostly suck. They have daft names, and are generally only aimed
> at single individual pattern.
> <Barton>
> They could easily be renamed... and even if they're only aimed at a 
> certain pattern, I think that it's kind of neat to be able to apply them 
> to various site swaps. In fact, I think that this is one of the most 
> interesting concepts within jugglemaster: style and site swap are 
> orthogonal.
> If I ran the zoo, I would create a pattern file that had all of the 
> standard stlyes at the top of the file, followed by a comment or divider 
> or something, followed by the rest of the styles. That way the one-off 
> styles aren't cluttering up the prime interface real-estate, but they're 
> thare if you want to play with them.
> </Barton>

Yeah. I knew you'd say that. I'd thought about it, but in the end I
decided that it felt much cleaner to have a more basic
style,pattern,style,pattern style than to have

<hundred lines of guff>

> I think a much better solution would be to have a third pattern file
> that contains a multitude of styles, that you can use as you
> described. It would conveniently get all the hardcoded styles out of
> the jmlib code [which badly sucks at the moment - the latest version
> is only barely an improvement on the code as I got it originally].
> Definitely a good idea.
> <Barton>
> I think that this might be the place where I actually get my feet wet ;-).

Please - be my guest :-)

I definitely think, though, that the better approach would be a third
file, distilled down to jsut the styles that are worth showing off.
Keep the patterns.jm file as is, and create an entirely separate

> At this point, none of my Linux boxen are in a good position to do 
> development: my laptop doesn't have the free disk space for wx, my desktop 
> box is headless and I don't have any networking set up into that box right 
> now.
> So I'll probably be doing development under windows or cygwin.
> Has anyone ported to cygwin yet? How difficult is compiling under windows?

Ok. I'm told that it works with visual C++, but frankly, I can't
afford it. As a result, I used bloodshed's devc++
I can't remeber /exactly/ what I did, but I basically followed these

Download the source, go into src/jmdlx. Extract bloodshed.zip where it
is, double click jmdlx.dev, and click the compile&run button. Last
time I checked, it compiled without warnings or errors.

I imagine it works with cygwin, but frankly - why bother? I
deliberately didn't write stupid unixisms into it, so that you
wouldn't have to :-)

Gary (-;

More information about the Jugglemaster mailing list