Martin Atkins (mart) wrote in lj_dev,
Martin Atkins
mart
lj_dev

The first real core.s2

I've been working on core.s2, the bottommost layer of S2 which defines all of the initial stuff which style authors, theme creators, translators and users will later extend and override. It's just taken me two hours to get my new core.s2 to compile, mostly due to me writing perl-style code when this language isn't that flexible! ( ;) ) but also due to odd behaviour in the compiler such as Null Pointer exceptions from the java string buffer doobrey and also the 'not' operator being broken.

Anyway, you can see my early core.s2 (and also the scary perl code it generates) if you want. It's got a lot commented out and a lot of FIXMEs after my long debugging/headsmacking session, but you should be able to see what I'm doing hopefully.

Just in case anyone was planning on it: don't start making layouts and other layers based on this yet, since I might have to change lots of stuff around as I port the system styles over (that's my next job) and you'll probably have to redo large parts of your layout if you do. I also have yet to do the userinfo and talkread/talkpost renderers nor design the classes for them, but they will come.

Oh, and Brad (or perhaps Evan?), can you perhaps answer some of my questions in the source and tell me how to deal with a bunch of the things I've marked FIXME:? ;) It does seem reasonably important that I actually have some code in entry_output()!

As an aside, the HTML backend didn't mind my return; lines, but both the S2 backend and the perl backend threw Null Pointer exceptions. I tried return ""; but it then bitched that I was returning a string when it wanted a void! Also, the S2 backend isn't spitting out valid S2 code from my core.s2, and the HTML backend is neglecting to HTML escape some of my strings (triple-quote strings I think) and thus causing weird rendering in browsers. It also made a 1.9MB file from my core.s2! :)

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 11 comments