• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Smalltalk to Java

 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really sure where to put this post, it's not really meaningless.
I recently attended a seminar where an example of a 'SelfEvaluatingRule' class was discussed. The idea of this class is to use it to evaluate logical or mathematical expressions. The advantage is that one would not have to hard-code expressions or even if statements in your code - they could be produced at run-time.
This seems extremely cool and very OO. I have the source code (amazingly short)in Smalltalk, and I want to attempt to reproduce it in Java. Wondering if anyone who knows Smalltalk would take a look at this and tell me what they think - maybe give some pointers on how to start in Java.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe Cindy could move your post to JIG Intermediate or somewhere more "meaningful" as you question is not really meaningless, as you said.
BTW, sorry, but I don't know Smalltalk.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have the authority to do that, Angela or one of the Sheriffs would need to make the move.
This is a great topic for the OO forum.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Cindy, I thought you moderated this forum. I just looked and saw that it's Angela. Oops.
 
Ranch Hand
Posts: 3143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK then off to the OO forum it goes!!
 
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you post the code and let's have a look.
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies for the delay in posting this code. I was attempting to contact the author for permission, with no luck.
This is an academic paper with no copyright, so I hope it's OK to post.
This code is from a paper title 'Self Evaluating Rules' by David M. West and Kevin Johnson, both from the University of St. Thomas.
I'm told this is Smalltalk.
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, I read it two times and I just don't get it
Of course I have not a clue about smalltalk, but I was hoping that I could catch the concept. Could you explain what they said about "self evalutaing" (preferably in very small simple words).
Maybe a simple example???
Thanks,
Cindy
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Smalltalker for over 6 years. However, new to Java.
Did u find an answer to ur question?
Was topic moved?
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear d hooten,
No answer yet. I was trying to put something together for Cindy, I have the paper, but I can't seem to find anything on-line. If you can translate this stuff, please let me know.
Cindy - sorry I can't get you an online reference for the paper. But this paper says a SelfEvaluatingRule is an independent object capable of self-resolution. Apparently it is built with Term objects. So apparently a BinaryTerm (which consists of receiver operator and argument) might be x + y. Not all that interesting until you think about that this should allow a SelfEvalutatingRule to itself be used as a Term. This could be fun - allowing for complex logical or mathematical expressions to be created and evaluated at run time.
 
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi d hooten,
Could you please check out the Java Ranch naming policy and re-register?
Thanks,
John
 
Bring out your dead! Or a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic