Recently by Jason Harwig

I consider polyglot programming to be using the best tool for the problem. Some languages are inherently better at solving certain types of problems. We should embrace these advantages and switch freely between languages.

Today, we are introducing Hydra, the meta-language that runs on the JVM. Hydra supports (and encourages!) any JVM-based language at any time in the file.

Example: Person.hyrdra

:groovy
class Person {

  :ruby
  # define properties
  attr_accessor :first_name, :last_name

  :python
  """ 
    Get the full name by concatenating first, last
  """
  def full_name (self):
    print "%s %s" % (self.first_name, self.last_name)

  :java
  /**
   * Set the firstName attribute to name. (Useless javadoc)
   *
   * @param name the new first name value
   */
  public void setFirstName(String name) {
      String prefix = "Setting first name to ";

      :clojure
      (print prefix)
      (defn printChar [c] (print c))

      :javascript
      name.forEach(printChar);
:java this.firstName = name; } // Switch to python so ending '}' isn't needed ;) :python

Sent from my iPad

The most popular entry I've written at Near Infinity has been the JavaScript Particle Engine. It had limitations because I used transparent images and only made one color -- black. I recreated the fire demo for a talk -- Advanced Web Graphics with Canvas -- that I gave at the Rich Web Experience. I'll post the slides, sample code, and some more demos in upcoming entries.

I was reading a blog entry at Web Reflection that outlined some obscure solutions to common JavaScript patterns.

I thought that entry was interesting, but I'm not sure I'd use them because of code readability and maintenance. It did get me thinking of some other ways to obscure simple tasks.

Improving CSS

| | Comments (0) | TrackBacks (0)
Of the trinity of web technologies, CSS is by far the worst at this stage. It's a language that begs for more power.

Wouldn't it be cool if you could do this?

@variables { NEAR_INFINITY_ORANGE: #C96522; } div.header { background-color: var(NEAR_INFINITY_ORANGE); }

The web community has been buzzing about the new Ajax server, Jaxer, from Aptana. If you haven't heard see John's, or Dion's Ajaxian posts about it.

Now, overall, I am really excited about the future in this project. The problem I had is all their examples use synchronous XMLHttpRequests. We already know why this is unfriendly to users.