Monday, January 10, 2005

[Orkit] - Updated documentation

I added some more docs, based on some scripts that parse the source code and spit out XML, which I transform into HTML.

In any case visit the toolkit webpage for the new documentation.

Friday, January 07, 2005

Java vs Lisp Blog

I am going to create a Java vs Lisp log and just list lisp code and then some messed up java code and not to mention the lisp programmers are normally smarter anyway; Here is a stack trace from the jboss people, what in the world is a developer or user supposed to do with this:

Buildfile: build.xml

prepare:

compile:
[javac] Compiling 7 source files to E:\ejb\HelloWorldCMP\build\classes
[javac] Compiling 7 source files to E:\ejb\HelloWorldCMP\build\ejb
[javac] Compiling 1 source file to E:\ejb\HelloWorldCMP\build\ejb\WEB-INF\classes

package:
[jar] Building jar: E:\ejb\HelloWorldCMP\build\HelloWorldCMP.jar

run:
[java] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
[java] java.rmi.ServerException: RuntimeException; nested exception is:
[java] java.lang.IllegalStateException: createBeanClassInstanceCommand == null
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
[java] at java.lang.Thread.run(Thread.java:534)
[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
[java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
[java] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
[java] at $Proxy0.create(Unknown Source)
[java] at org.retro.gis.system.HelloWorldCMPClient.main(Unknown Source)
[java] Caused by: java.rmi.ServerException: RuntimeException; nested exception is:
[java] java.lang.IllegalStateException: createBeanClassInstanceCommand == null
[java] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:385)
[java] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124)
[java] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
[java] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
[java] at org.jboss.ejb.Container.invoke(Container.java:878)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
[java] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
[java] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
[java] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
[java] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
[java] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:148)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
[java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
[java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
[java] at java.lang.Thread.run(Thread.java:534)
[java] Caused by: java.lang.IllegalStateException: createBeanClassInstanceCommand == null
[java] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createBeanClassInstance(JDBCStoreManager.java:560)
[java] at org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(CMPPersistenceManager.java:124)
[java] at org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer.java:224)
[java] at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:146)
[java] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:96)
[java] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
[java] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
[java] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
[java] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
[java] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
[java] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:126)
[java] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:100)
[java] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
[java] ... 25 more
[java] Exception in thread "main"

BUILD SUCCESSFUL
Total time: 8 seconds

Refactor Java/JSP app

I need to factor a large application from Java Servlets to JSP, which will be fun. I think this is the fun of working with java over ASP(and I think PHP), the app was poorly designed(by me), but at least I can go back and move upward, I dont think the other web languages present that ability to go back and convert to a higher level framework(like a Struts or other). There is a nice Ruby framework that looks nice.

Anyway(this has nothing to do with lisp, but that is ok)

Thursday, January 06, 2005

Simplest GUI program ever

(defun test-set005 ()
(print "test - 005")
(let* ((winobj
(make-wtk-windowobject
:backgroundcol "#B45043"
:width 800 :height 600))
(sysobj
(wtk-createwindow winobj)))
(wtk-eventloop sysobj)
(wtk-freewindow sysobj)
))


If that is not the simplest gui program ever, of course it doenst do too much, but you
can add the events, no problem.

More updates

http://www.retroevolution.com/beta/widget_toolkit/Widget-0.1.b46-010605-0313.zip

This updates has a lot of enhancements, incuding a dialog toolkit and some more functions
for creating windows.

Wednesday, January 05, 2005

Programmers love to make it hard

We programmers love to make it hard on ourselves. We love to make it hard for the user. Sometimes it is macho thing, I can code they can't, so I do whatever I want to make sure that I am tougher than others around me. Not everyone is like this of course, I used to be like this(maybe still am?). And I would say the majority of programmers are pretty normal, trying to do their job. I would say a lot of gurus with popular blogs are the ones I am talking about, who would much rather write a web application in C as well as to mock java programmers than to consider something like XML and XSTL. You know the story. Another one, those who mock VB, I have nothing against VB, you can write interfaces that meet a particular need, nothing wrong with that. I am little against MS-Access but not the ability to create forms in VBA.

Anyway, my point, sometimes it helps to seek creative, clean solutions to problems. You may learn something. Sometimes we will gain something if we give up our favorite tools and try someone else's favorite tools. That is all, just a little suggestion, and I will try to follow my advice every 0nce in a while also.


Tuesday, January 04, 2005

This is a GEM, ode to the small ISV

This is a nice little site:

http://www.microisv.com/

Found the grep command recurisive

Hmm, I found a simple command to recrusively search a set of directories, very useful:

grep --directories=recurse jtds *

using the Win32 Unit Utilities tool

Where jtds was the text I was searching for.

Monday, January 03, 2005

Win32 Errors and Google

I dont bash Microsoft too often, I will let them slide on certain things, but my day has been devoted to Microsoft errors and configurations that dont make sense. And I love you CVS,MYSQL,Emacs for being so clean and straightforward. And, basically, the errors amount to 'An error has occurred, please try again'. or 'An error has occurred, error code: no 1',
you go to MSDN, and error code no 1 = 'this is a generic error, please try again', basically google saved the day, because you have to figure enough people in the world using MS software have had the error, you might be a little better off.

If on that rare occassion you search google and come up with an error code that has zero hits. That is when you drive to Redmond and have a little face to face with Bill, and call me, Ill rearrange my schedule to give you a ride.

Sunday, January 02, 2005

Working on dialogbox events and edit boxes

I am working with different procedures for handling the different win32 events, with the lisp of course you can do crazy stuff like return functions to functions, in Win32 C, you are limited to a static procedures. Here is a some procedure lisp code:


(defun wtk-createdialogproc (&key wm-init-proc wm-close-proc)
#'(lambda (hwnd message wparam lparam)
(declare (type ffi:c-pointer hwnd))
(declare (type ffi:uint message))
(declare (type ffi:uint wparam))
(declare (type ffi:long lparam))
(block inner-func-proc
;;; Check the message value and respond
(cond ((= message *WM_INITDIALOG*)
(if wm-init-proc
(funcall wm-init-proc hwnd message wparam lparam))
(return-from inner-func-proc 0))
((= message *WM_COMMAND*)
(print "WM_COMMAND"))
((= message *WM_CLOSE*)
(if wm-close-proc
(funcall wm-close-proc hwnd message wparam lparam))
(widget-postquitmessage 0))
((= message *WM_DESTROY*)
(widget-postquitmessage 0))
(t
(return-from inner-func-proc 0))
)
;;; return ;;;
(let ((lresult 0))
(declare (type long lresult))
lresult))))

;;;

Working on documentation while jamming to Santana

That is right, I am working on some documentation and doing some Santanta, which is more of a distraction then anything else. I currently using some XML/XSLT scripts to do the work for me.

ODE to apple

I have been an avid Mac,Apple fan, most machines I have used throughout my life have been Mac, from the Performa serious on. This project is an ode to Apple and their strive for beauty.