?

Log in

No account? Create an account
S2, Java, C#, FotoBilder... - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

S2, Java, C#, FotoBilder... [Jul. 24th, 2002|04:10 pm]
Brad Fitzpatrick
[Tags|, ]

I'm working on the S2 support in FotoBilder and I'm reminded how badly the state of Free Software Java sucks (which the S2 compiler is written in), so I had the fun idea of porting it to C# and using Mono. I'm incredibly impressed with the Mono Debian packages ... very well done: binfmts are registered to automatically invoke /usr/bin/cli ... /usr/bin/cli is an alternative to /usr/bin/mono ... very, very Debian.

And this'll give me a chance to learn the few extensions that C# adds to Java. I hear porting an app from Java to C# can be done with global search and replace... i.e., a Perl one liner.

Anway, off runing now. The S2 integration is getting fun. I imagine I won't sleep much tonight given last night's sysadmin crap, so that'll give me something neat to work on. (though I'll probably delay porting it to C# until I get it running as-is ... the only advantage of having the compiler in C# is that it's easier to redistribute...)
LinkReply

Comments:
[User Picture]From: youngoat
2002-07-24 04:42 pm (UTC)

C#

It might be fairly easy to port from java to C# (though switching from the JFC to the .Net Framework would probably involve a decent bit of work). But C# actually has some pretty cool features... The coolest thing about C# is all of the metadata. You can query the type of any object as well as the methods and properties it exposes... You can also add your own metadata to classes, methods, and fields via Attributes...

It seems O'Reilly has covered both these topics in their sample chapter from Programming C# if you're interested (looks kind of long, though)... It's pretty nifty stuff.
(Reply) (Thread)
[User Picture]From: mart
2002-07-24 04:59 pm (UTC)

As long as I can run it under the "real thing" .NET framework, I'm happy. ;)

Another good thing is that, if the above is true, anyone using Windows XP can just run the compiler without having to install the JRE first, which will make my current side-project a lot more useful to the general populace.

(Reply) (Thread)
[User Picture]From: mge
2002-07-24 05:16 pm (UTC)
Nevermind that the general populace can't read the protected entry about your current side-project.

What ya doing, Mart?
(Reply) (Parent) (Thread)
[User Picture]From: mart
2002-07-24 05:20 pm (UTC)

Hah, Sorry; friends-only journal! ;)

It's a Windows-based S2 style previewer which takes compiled S2 layers and runs them capturing output into a WebBrowser control, so people developing layouts and stuff don't need to keep hitting LJ or to run their own webserver to use my old CGI-based S2 runner. I have a screenshot which isn't protected because my site can't see LJ login cookies! ;)

(Reply) (Parent) (Thread)
[User Picture]From: mge
2002-07-24 05:25 pm (UTC)

I'm not sure what to be more impressed with

The scope of your undertaking, or the URL where you keep that picture at.
(Reply) (Parent) (Thread)
[User Picture]From: mart
2002-07-24 05:36 pm (UTC)

Heh.

(Reply) (Parent) (Thread)
[User Picture]From: tsutton
2002-07-25 02:58 am (UTC)
>>Hah, Sorry; friends-only journal! ;)

That explains why I couldn't see any posts since March in your journal. :)
(Reply) (Parent) (Thread)
[User Picture]From: way2tired
2002-07-24 09:08 pm (UTC)
The .Net framework is SOOO cool. (Even if I've been doing everything in VB.Net. heh.)

Why don't you get Brad to make everything in inheritable classes if he uses C#, so that it can be morphed down the road by anyone.

I guess on a side note, are you not concerned about the ~30mb redis for .Net, or have you found some way around that?

(Reply) (Parent) (Thread)
[User Picture]From: brad
2002-07-24 09:18 pm (UTC)

tool

Microsoft didn't invent inheritance, dude.

Go look at s2compile's source ... it's already heavily inherited.

What the hell does that have to do with C#?
(Reply) (Parent) (Thread)
[User Picture]From: mart
2002-07-25 04:44 am (UTC)

Re: tool

I think he's keen on in inheriting in VB. You see, until .NET VB didn't have inheritance, so all of the die-hard VB programmers are getting excited about this "new idea". ;)

(Reply) (Parent) (Thread)
[User Picture]From: way2tired
2002-07-25 05:28 am (UTC)

Re: tool

I realize that its not a new idea. Its a new thing to VB.. which I am very excited about.
(Reply) (Parent) (Thread)
[User Picture]From: way2tired
2002-07-25 05:25 am (UTC)

Re: tool

No, I realize that MS didn't create inheritance, I'm just stoked they're finally on the ball about supporting it in all their tools.

At least in my understanding of C#, it requires a redistributable set of components (for lack of a better word), its a pretty sizable download. If you push this client to the general public, I wonder if 30 mb is too much?
(Reply) (Parent) (Thread)
[User Picture]From: brad
2002-07-25 09:52 am (UTC)

Re: tool

The Windows client that evan has been working on requires no DLLs or anything, and is only about ~100k.

The C# stuff would only be for the compiler, only on the server, and not even on all servers... it'd only be necessary for developers. Normal admins running FotoBilder wouldn't need a CLI, just as they wouldn't need a JVM right now.

(Reply) (Parent) (Thread)
[User Picture]From: supersat
2002-07-25 12:35 am (UTC)
A C# S2 compiler (or any .NET language compiler, for that matter) would be cool. I could possibly see allowing users to put in their S2 styles into sharpjournal and allowing them to see a preview of their entry with the style applied. I haven't explored S2 that much, but it sounds like a reasonably easy thing to do.
(Reply) (Thread)
[User Picture]From: mart
2002-07-25 04:47 am (UTC)

You probably wouldn't want to just output the entry, since the code would in many cases have tables which are dependant on higher code, but you could run the RecentPage body code with only one entry in the array.

SharpJournal doesn't really need to know about the compiler, though, it just needs to be able to run perl.

(Reply) (Parent) (Thread)