Posts

Showing posts with the label HTML

Lisp Macros in Awesome Sauce Java

Well, last night I put the macro calls in the right place and made them work.  Initial tests are solid.  Code looks good.  I'm shocked.  Not because I lack confidence.  I may be kind of broken, but I've written device drivers, medical CAD, memory managers, a bunch of apps, and software that might be considered challenging. But macros are different.  Maybe they're a little tricky, but once I got where they went and what they did?  I got them.  I was slow to get to understanding, but I knew I'd sort them out.  It's maybe more the beliefs I've had about writing a Lisp implementation, much less a Lisp implementation that's Java-based, merging both Java and Lisp into one language. For 17 years, I thought about writing a Lisp.  The more I used and learned Lisp, the bigger and more complex the language seemed to be.  While I hoped to one day have the opportunity to write a Lisp, it felt like a huge undertaking, one that would push me t...

I have to write this, otherwise I'll forget I had this thought about ASJ Web

I've been working on macros for a while now. They work, but I'm not confident.  Not that I'm not confident in my abilities. I'm not confident I understand macros.  I get that they're backquote, comma, and comma-at.  The parsing is all in, the right things are getting the right calls, and things are getting constructed in the right places and ways.  I know that I'm not seeing something right. I just don't know what it is I'm not seeing.  So, I'm reading OnLisp about how and what and why macros are, so I can see what it is I'm blind to.  This is kind of my normal.  The language holds my hand until something happens and I can't see the hands anymore.  Then it kind of becomes a blind game of sounding out where I am and where it is, so I can slowly orient myself to go the right way and feel my way through what I need to build.  It's weird because I can see and hear and speak, but there's a lot broken on the inside of my mind (from a lot ...

Awesome Sauce Java Web: A Second HTML Example

Intro This week, I've been implementing server-side scripting in Awesome Sauce Java. It's been a nice surprise to discover that ASJ will offer dynamic scripting for the web. It's especially compelling because Awesome Sauce will provide the ability to combine the generation of HTML while embedding and including Java logic all in a single language. HTML with Java in a Scripting Language The following is a quick sample script I've put together to test some HTML tags with Awesome Sauce Java. (defun fungo-index ()   (html     (head        (title "Awesome Sauce Java with Hot Sauce")        (h1 "Awesome Sauce Java")        (h2 "Server Side Web")        (h3 "A First Example")        (h4 "The next one will have the database code")        (h5 "But this one has math calculations!"))  ...