Antlr Lecture at Conexao Java 2007 3

Posted by Fernando Meyer on November 12, 2007

As I promised at CJ2007 I’m uploading my slides and demo code from my ANTLR lecture. I got really surprised about people’s interest in ANTLR, compiler theory and DSL in general.

You can import the demo in both eclipse or Intellij (or use maven to generate your own ide config). to run the code without an ide just unpack and execute the runconsole.sh you can set variable’s values ex:

x=1

y=2

And execute some expression using these predefined variables ex:

3*(x-y)*(x/y)

when you finish to input your expression just press ctrl+D on unix or ctrl+Z on windows ( EOF char ) to execute it
ps: Thanks to Danilo Sato to help me figure out a Grammar ambiguity, my approach wasn’t the optimal solution to resolve the problem.

*Update, Sami Koivu just sent me the pictures from my lecture,

Explaining the compiler process

Explaining the compiler theory

 

 

Hands on

Hands On

 

 

 

The antlr grammar as itself

The Antlr Grammar file as itself

Drools DLS sample

Drools Sample DSL

JBoss Drools 4.0 Released

Posted by Fernando Meyer on July 25, 2007

JBoss Drools 4.0 has just been released. We are really proud of what we have done here. We believe that we now have the best and most powerful declarative rule language, bar none; commercial or open source. The Rule Flow is excellent and I really enjoyed updating the Conway’s Game of Life to Rule Flow; sub Rule Flows and milestone support will be coming in a point release soon. The BRMS has long been requested and we put a lot of effort into the ajax based design. The Eclipse improvements for the debug points and guided editor should help reduce learning curves, opening us to new audiences. Of course performance is now much better, especially for complex rules and the new Sequential Mode should be very popular with decision services.
Enjoy :)
The Drools Team
Mark Proctor, Michael Neale, Edson Tirelli, Kris Verlaenen, Fernando Meyer
http://blog.athico.com

My Books arrived 2

Posted by Fernando Meyer on July 18, 2007

CIMG2736.JPGMy books from amazon arrived (with nice gifts from New York redhaters) yesterday. I spend about 2 hours reading some random pages and I can drop some lines about:

The IA book, I studied with the same book at university. so I just ordered to get the new 2002 version, but the mother… nice seller sent me the outdated 95’s version.
Principles of the Business Rule Approach, this book is a nice introduction to business rules, it explains all concepts in the natural way, some step-by-step topics are very interesting to figure out the more complicated rules concepts.
Jess in Action - that’s another book which you must have in your library, but don’t seize at it (try drools instead)
Expert Systems: Principles and Programming - That’s certainly the most advanced book I’ve ordered, so I must dive/read/assimilate more to write a good review.

    I think that’s a good start.

Interesting links for today

Posted by Fernando Meyer on July 17, 2007

Open source JBoss Rules gains speed

http://www.infoworld.com/article/07/07/16/jboss-rules_1.html

JBoss also extends business rules engine to nonprogrammers, adds MVEL language support

Essencial Drools blog reading

http://markproctor.blogspot.com/2007/07/essential-drools-blog-reading.html

My IDE through the years

Posted by Fernando Meyer on July 17, 2007

Today, after read something about the Kawa IDE, I tried to remember these I’ve used through the years.

  • Turbo Pascal - late 1997
  • Turbo C++ - 98/99
  • DJGPP - late 99
  • Emacs - 2000 - C++
  • Kawa - 2001 - Java
  • Netbeans- 2002/2003
  • Eclipse - 2003/2006
  • Visual Studio - 2006 - Yes I got a project in C#
  • IDEA intellij + textmate - 2007

Maybe I missed something, but it’s just to get an overview.

BRMS demo available 1

Posted by Fernando Meyer on July 14, 2007

I just did a post into Mark Proctor’s Blog covering a short tutorial about BRMS (Business Rules Management System).

http://markproctor.blogspot.com/2007/07/discount-insurance-brokers-example-for.html

Check this out.

Hackers x Talkers

Posted by Fernando Meyer on July 10, 2007

Drop all your computer science books (including that damn algorithm book), forget about you time reading the linux kernel sources and all the time across the night you’ve lost mining the internet looking for useful information, (even that black screen with gray letters using vi + C), now you can be a hacker just binding components and/or creating a web page with a nice css style. It reminds me a nice antonym to the hacker meaning,

Talkers: A person who speaks more than effectively do something useful.

missing the old times

Alligator Eggs

Posted by Fernando Meyer on July 10, 2007

I grab this url from a stashed place in the web http://worrydream.com/AlligatorEggs/ it’s a nice puzzle
alligator game.

This game represents the untyped lambda calculus. A hungry alligator is a lambda abstraction, an old alligator is parentheses, and eggs are variables. The eating rule corresponds to beta-reduction. The color rule corresponds to (over-cautious) alpha-conversion. The old age rule says that if a pair of parentheses contains a single term, the parentheses can be removed.
I’m sure that after 4.0 drools release I’m going to implement this game as a drools DRL.

am I binary? 2

Posted by Fernando Meyer on June 30, 2007

Really ?

You are Binary.  You are not human and go to great lengths to prove it.  You always know where you are and how you got there, but no one else does, ever.
Which Programming Language are You?

Books library update

Posted by Fernando Meyer on June 30, 2007

I just ordered these four books in amazon store, and will do some reviews as soon as possible probably I’ll be busy for a while :)

Expert Systems: Principles and Programming, Fourth Edition: Principles and Programming (Hardcover)

Jess in Action: Java Rule-Based Systems (In Action series) [ILLUSTRATED] (Paperback)

Artificial Intelligence: A Modern Approach (2nd Edition) (Hardcover)

Principles of the Business Rule Approach (Paperback)