From simply.nitaai at gmail.com Wed Jun 1 06:59:02 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Wed, 1 Jun 2011 08:59:02 +0200 Subject: [Snow-devel] Slime or other framework for developing Snow In-Reply-To: References: Message-ID: On Wed, Jun 1, 2011 at 12:46 AM, Alessio Stalla wrote: > On Tue, May 31, 2011 at 1:34 PM, Matus Kmit wrote: >> i've tried to launch snow with a newer version of ABCL (v0.25), but >> got the following exception: >> >> Exception in thread "main" >> org.armedbear.lisp.Interpreter$UnhandledCondition: Unhandled lisp >> condition: The symbol "VARIABLE- >> INFORMATION" was not found in package SYS. >> ? ? ? ?at org.armedbear.lisp.Interpreter$1.execute(Interpreter.java:561) >> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >> ? ? ? ?at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2800) >> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:801) >> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >> ? ? ? ?at org.armedbear.lisp.debug_6.execute(debug.lisp:105) >> ? ? ? ?at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:124) >> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:813) >> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:670) >> ? ? ? ?at org.armedbear.lisp.debug_7.execute(debug.lisp:114) >> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:790) >> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:636) >> >> i read in your tutorial that snow is using a modified version of ABCL. >> The version i was trying, was the ordinary one built from sources >> downloaded from ABCL website. > > Right, it was using a modified abcl, but sometime after the 0.3 > release I made it work with standard ABCL. Unfortunately, I forgot to > make a new release afterwards. > Now I just released version 0.3.1 that also fixes the problem with > closing the repl, and includes all the post-0.3 stuff that was on > trunk (mainly bug fixes and small improvements, but one API change: > with-widget is now called simply widget). I tested it with the latest > abcl from trunk but it should also work with 0.25 (besides, 0.26 is > not far away I think). Great, thank You! i just tried that out on windows. No-gui-repl option works now, but if there is some error in REPL, it does not provide Lisp-like restart options, but throws a Java Exception instead and leaves snow repl altogether. i tried with: (make-var x) > > On a side note, today I read news about JavaFX 2.0 entering beta, > being Java only (no ad hoc language) and sponsored as Swing 2.0 (old > Swing is going to die, if it can be even more dead than it is now). I > don't know how things will evolve, but I sense an opportunity for > SnowFX ;) > > Cheers, > Alessio > That's interesting to hear :-) Especially if the applications would be portable on mobile devices... In regards to SnowFX: What the old snow code be portable without any big modifications? Greetings, Matus From simply.nitaai at gmail.com Wed Jun 1 20:55:10 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Wed, 1 Jun 2011 22:55:10 +0200 Subject: [Snow-devel] Slime or other framework for developing Snow In-Reply-To: References: Message-ID: On Thu, May 26, 2011 at 8:18 PM, Alessio Stalla wrote: > On Thu, May 26, 2011 at 12:52 PM, Matus Kmit wrote: >> Hi Alessio >> >> What do You use for developing and testing Snow code? i configured >> emacs+slime for using ABCL. Is it possible to do it for Snow as well, >> in the way, that when one would start REPL in smile, all the necessary >> jar files with snow would be loaded, and one could test the snow code? >> >> Or what would You recommend as the most convenient way to write and >> test snow code? > > Slime can be used. The way I do it: > > - have a file in the classpath named abcl-script-config.lisp > containing the following lines: > > (in-package :abcl-script-user) > (setq *launch-swank-at-startup* t) > (setq *swank-dir* #P"/home/alessio/slime/slime/") ;;Here substitute > with the path to your installation of Slime > > - launch Snow normally, ensuring the file above is in the classpath[1] > > - launch Emacs and do M-x slime-connect keep the standard > host and port (localhost:4005) and you should connect to the ABCL > instance running Snow. > > [1] the way I do it is: I have abcl-script-config.lisp in the Snow > root, along with the following run.sh script: > > #!/bin/bash > java -classpath ".:dist/snow.jar:lib/*" snow.Snow $@ > > notice the extra . (dot) in the classpath. It only works if the script > is in the same directory as the Lisp file. > it works, i can connect to the instance running snow, but there is no REPL and other slime facilities in emacs. could You maybe provide content of Your .emacs file or give me some advice. i think i am missing something... thanks, matus From simply.nitaai at gmail.com Wed Jun 8 08:52:35 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Wed, 8 Jun 2011 10:52:35 +0200 Subject: [Snow-devel] Slime or other framework for developing Snow In-Reply-To: References: Message-ID: On Wed, Jun 1, 2011 at 8:59 AM, Matus Kmit wrote: > On Wed, Jun 1, 2011 at 12:46 AM, Alessio Stalla wrote: >> On Tue, May 31, 2011 at 1:34 PM, Matus Kmit wrote: >>> i've tried to launch snow with a newer version of ABCL (v0.25), but >>> got the following exception: >>> >>> Exception in thread "main" >>> org.armedbear.lisp.Interpreter$UnhandledCondition: Unhandled lisp >>> condition: The symbol "VARIABLE- >>> INFORMATION" was not found in package SYS. >>> ? ? ? ?at org.armedbear.lisp.Interpreter$1.execute(Interpreter.java:561) >>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>> ? ? ? ?at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2800) >>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:801) >>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>> ? ? ? ?at org.armedbear.lisp.debug_6.execute(debug.lisp:105) >>> ? ? ? ?at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:124) >>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:813) >>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:670) >>> ? ? ? ?at org.armedbear.lisp.debug_7.execute(debug.lisp:114) >>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:790) >>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:636) >>> >>> i read in your tutorial that snow is using a modified version of ABCL. >>> The version i was trying, was the ordinary one built from sources >>> downloaded from ABCL website. >> >> Right, it was using a modified abcl, but sometime after the 0.3 >> release I made it work with standard ABCL. Unfortunately, I forgot to >> make a new release afterwards. >> Now I just released version 0.3.1 that also fixes the problem with >> closing the repl, and includes all the post-0.3 stuff that was on >> trunk (mainly bug fixes and small improvements, but one API change: >> with-widget is now called simply widget). I tested it with the latest >> abcl from trunk but it should also work with 0.25 (besides, 0.26 is >> not far away I think). > > Great, thank You! > > i just tried that out on windows. No-gui-repl option works now, but if > there is some error in REPL, it does not provide Lisp-like restart > options, but throws a Java Exception instead and leaves snow repl > altogether. > > i tried with: (make-var x) > tried the same on linux -> works OK. it seems to be only a windows issue... greetings, matus From alessiostalla at gmail.com Wed Jun 8 17:34:18 2011 From: alessiostalla at gmail.com (Alessio Stalla) Date: Wed, 8 Jun 2011 19:34:18 +0200 Subject: [Snow-devel] Slime or other framework for developing Snow In-Reply-To: References: Message-ID: On Wed, Jun 8, 2011 at 10:52 AM, Matus Kmit wrote: > On Wed, Jun 1, 2011 at 8:59 AM, Matus Kmit wrote: >> On Wed, Jun 1, 2011 at 12:46 AM, Alessio Stalla wrote: >>> On Tue, May 31, 2011 at 1:34 PM, Matus Kmit wrote: >>>> i've tried to launch snow with a newer version of ABCL (v0.25), but >>>> got the following exception: >>>> >>>> Exception in thread "main" >>>> org.armedbear.lisp.Interpreter$UnhandledCondition: Unhandled lisp >>>> condition: The symbol "VARIABLE- >>>> INFORMATION" was not found in package SYS. >>>> ? ? ? ?at org.armedbear.lisp.Interpreter$1.execute(Interpreter.java:561) >>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>>> ? ? ? ?at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2800) >>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:801) >>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>>> ? ? ? ?at org.armedbear.lisp.debug_6.execute(debug.lisp:105) >>>> ? ? ? ?at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:124) >>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:813) >>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:670) >>>> ? ? ? ?at org.armedbear.lisp.debug_7.execute(debug.lisp:114) >>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:790) >>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:636) >>>> >>>> i read in your tutorial that snow is using a modified version of ABCL. >>>> The version i was trying, was the ordinary one built from sources >>>> downloaded from ABCL website. >>> >>> Right, it was using a modified abcl, but sometime after the 0.3 >>> release I made it work with standard ABCL. Unfortunately, I forgot to >>> make a new release afterwards. >>> Now I just released version 0.3.1 that also fixes the problem with >>> closing the repl, and includes all the post-0.3 stuff that was on >>> trunk (mainly bug fixes and small improvements, but one API change: >>> with-widget is now called simply widget). I tested it with the latest >>> abcl from trunk but it should also work with 0.25 (besides, 0.26 is >>> not far away I think). >> >> Great, thank You! >> >> i just tried that out on windows. No-gui-repl option works now, but if >> there is some error in REPL, it does not provide Lisp-like restart >> options, but throws a Java Exception instead and leaves snow repl >> altogether. >> >> i tried with: (make-var x) >> > > tried the same on linux -> works OK. it seems to be only a windows issue... Hey, sorry for the late reply and thanks for your perseverance :) I've been a little too busy lately. I noticed that on Windows Snow didn't even build; I have fixed it on trunk and verified that I get a REPL with a working debugger (though I didn't test Slime because I haven't it installed on Windows). I can't do a new release right now, but if you don't mind using the development version from SVN, chances are that it will work fine on Windows, too. Also, the new web-based SVN browser is now working on common-lisp.net. As for SnowFX, whether it will run on mobile devices or not really depends on ABCL; currently, it requires a 1.6 JVM supporting reflection and dynamic class loading. I don't know if Dalvik meets those requirements, but I seriously doubt an unmodified ABCL would run there. And the iPhone doesn't even have any form of Java available. That rules out the biggest share of the mobile market. That said, maybe Oracle will push JavaFX (and thus JavaSE) on mobile devices enough to change things a bit. Cheers, Alessio From simply.nitaai at gmail.com Thu Jun 9 06:25:41 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Thu, 9 Jun 2011 08:25:41 +0200 Subject: [Snow-devel] Slime or other framework for developing Snow In-Reply-To: References: Message-ID: On Wed, Jun 8, 2011 at 7:34 PM, Alessio Stalla wrote: > On Wed, Jun 8, 2011 at 10:52 AM, Matus Kmit wrote: >> On Wed, Jun 1, 2011 at 8:59 AM, Matus Kmit wrote: >>> On Wed, Jun 1, 2011 at 12:46 AM, Alessio Stalla wrote: >>>> On Tue, May 31, 2011 at 1:34 PM, Matus Kmit wrote: >>>>> i've tried to launch snow with a newer version of ABCL (v0.25), but >>>>> got the following exception: >>>>> >>>>> Exception in thread "main" >>>>> org.armedbear.lisp.Interpreter$UnhandledCondition: Unhandled lisp >>>>> condition: The symbol "VARIABLE- >>>>> INFORMATION" was not found in package SYS. >>>>> ? ? ? ?at org.armedbear.lisp.Interpreter$1.execute(Interpreter.java:561) >>>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>>>> ? ? ? ?at org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2800) >>>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:801) >>>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:653) >>>>> ? ? ? ?at org.armedbear.lisp.debug_6.execute(debug.lisp:105) >>>>> ? ? ? ?at org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:124) >>>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:813) >>>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:670) >>>>> ? ? ? ?at org.armedbear.lisp.debug_7.execute(debug.lisp:114) >>>>> ? ? ? ?at org.armedbear.lisp.Symbol.execute(Symbol.java:790) >>>>> ? ? ? ?at org.armedbear.lisp.LispThread.execute(LispThread.java:636) >>>>> >>>>> i read in your tutorial that snow is using a modified version of ABCL. >>>>> The version i was trying, was the ordinary one built from sources >>>>> downloaded from ABCL website. >>>> >>>> Right, it was using a modified abcl, but sometime after the 0.3 >>>> release I made it work with standard ABCL. Unfortunately, I forgot to >>>> make a new release afterwards. >>>> Now I just released version 0.3.1 that also fixes the problem with >>>> closing the repl, and includes all the post-0.3 stuff that was on >>>> trunk (mainly bug fixes and small improvements, but one API change: >>>> with-widget is now called simply widget). I tested it with the latest >>>> abcl from trunk but it should also work with 0.25 (besides, 0.26 is >>>> not far away I think). >>> >>> Great, thank You! >>> >>> i just tried that out on windows. No-gui-repl option works now, but if >>> there is some error in REPL, it does not provide Lisp-like restart >>> options, but throws a Java Exception instead and leaves snow repl >>> altogether. >>> >>> i tried with: (make-var x) >>> >> >> tried the same on linux -> works OK. it seems to be only a windows issue... > > Hey, > sorry for the late reply and thanks for your perseverance :) I've been > a little too busy lately. No problem. Thanks for your perseverance :-) I noticed that on Windows Snow didn't even > build; I have fixed it on trunk and verified that I get a REPL with a > working debugger (though I didn't test Slime because I haven't it > installed on Windows). I can't do a new release right now, but if you > don't mind using the development version from SVN, chances are that it > will work fine on Windows, too. > Also, the new web-based SVN browser is now working on common-lisp.net. > No hurry. i am using linux at home, so no problem. i was trying some things out at work, where i am using windows so that's why i noticed that. > As for SnowFX, whether it will run on mobile devices or not really > depends on ABCL; currently, it requires a 1.6 JVM supporting > reflection and dynamic class loading. I don't know if Dalvik meets > those requirements, but I seriously doubt an unmodified ABCL would run > there. And the iPhone doesn't even have any form of Java available. > That rules out the biggest share of the mobile market. That said, > maybe Oracle will push JavaFX (and thus JavaSE) on mobile devices > enough to change things a bit. Ok, yes it's a bit more complicated... > > Cheers, > Alessio > Cheers :-) Matus P.S.: When you will be adding ComboBox, could you maybe also add radio buttons? i think that will better suit my requirements... Or you don't plan to add anything until JavaFX is released? :-o From simply.nitaai at gmail.com Fri Jun 10 21:06:28 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Fri, 10 Jun 2011 23:06:28 +0200 Subject: [Snow-devel] Snow indentation Message-ID: Hi Alessio How do i configure indentation in emacs / slime so that it behaves and looks like specified in the documentation. In the docs i see that the widget macro calls indent similar to DEFUN. like: (frame (...) (text ...) (button ...)) What i am getting is: (frame (...) (text ...) (button ...)) Any help is appreciated, Matus From simply.nitaai at gmail.com Thu Jun 16 20:07:50 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Thu, 16 Jun 2011 22:07:50 +0200 Subject: [Snow-devel] Having troubles with size property Message-ID: Hi Alessio i am having troubles using the size property. it just doesn't work as i want. so far it seems to be working only with frame widget. What i basically want is a scrollable non-editable text area of a specific size. Here is my test code: (frame (:size #C(300 300)) (panel (:layout "wrap") (label :text "1") (label :text "2") (label :text "3" :layout "wrap") (label :text "2" :layout "span 2 2") (label :text "2" :layout "wrap") (label :text "2")) (scroll (:size #C(100 100)) (label :text "looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong")) (show self)) i tried various options, but did not succeed. Size in frame works, but not in scroll. Your help is appreciated, Matus From alessiostalla at gmail.com Thu Jun 16 20:51:35 2011 From: alessiostalla at gmail.com (Alessio Stalla) Date: Thu, 16 Jun 2011 22:51:35 +0200 Subject: [Snow-devel] Having troubles with size property In-Reply-To: References: Message-ID: On Thu, Jun 16, 2011 at 10:07 PM, Matus Kmit wrote: > Hi Alessio > > i am having troubles using the size property. it just doesn't work as > i want. so far it seems to be working only with frame widget. > > What i basically want is a scrollable non-editable text area of a specific size. > > Here is my test code: > > (frame (:size #C(300 300)) > ?(panel (:layout "wrap") > ? (label :text "1") > ? (label :text "2") > ? (label :text "3" :layout "wrap") > ? (label :text "2" :layout "span 2 2") > ? (label :text "2" :layout "wrap") > ? (label :text "2")) > ?(scroll (:size #C(100 100)) > ? (label :text > "looooooooooooooooooooooooooooooooooooooooooooooooooooooooooong")) > ?(show self)) > > i tried various options, but did not succeed. Size in frame works, but > not in scroll. > > Your help is appreciated, > Matus Size is a naughty beast in Swing. There are multiple variants of it: actual, minimum, maximum, and preferred size, and how they work, if they work at all, is determined by the layout manager. For MigLayout, the default used by Snow, the easiest option is to forget about the size properties altogether and use layout constraints, in your case: (scroll (:layout "w 100, h 100") ...) or width/height instead of w/h if you prefer longer names. hth, Alessio From simply.nitaai at gmail.com Fri Jun 17 17:31:52 2011 From: simply.nitaai at gmail.com (Matus Kmit) Date: Fri, 17 Jun 2011 19:31:52 +0200 Subject: [Snow-devel] Line wrap for text In-Reply-To: References: Message-ID: Hi Is automatic line wrapping supported? For example for the label widget? What i want is a scrollable (vertical) automatically line wrapped non-editable text. How do one do it in snow? i have seen that some Swing classes have a boolean property like setLineWrap(true). Is this implemented in snow? Or can one achieve it via miglayout constraints? Thanks Matus