Thread: [Hecl-devel] Any objections to a new release?
Brought to you by:
davidw
From: David W. <dav...@gm...> - 2009-08-10 07:03:49
|
I also think it is probably time to switch to a numbered release system... -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: Zakaria <z4...@gm...> - 2009-08-11 21:49:02
Attachments:
Hecl-IDE.hcl
|
On Mon, Aug 10, 2009 at 2:03 PM, David Welton<dav...@gm...> wrote: > I also think it is probably time to switch to a numbered release system... Just some small things: 1. You haven't build the packageJarHack 2. How about my key-remap.patch? I'll send newer one with mapping for Nokia XpressMusic and Samsung SGH i550 3. How about replacing midp20\script.hcl with my Hecl-IDE.hcl? 4. On my dinky hand phone I keep getting "Nothing to display" after "Loading Hecl..." alert and then after several seconds, Hecl finally running the script. I try to increase a.setTimeout in midp20\Hecl.java but no luck. Maybe you should do an RC release first. > -- > David N. Welton -- Zakaria z4...@gm... Yahoo!: z4k4ri4 http://tukangprogram.com http://pemula.linux.or.id |
From: David W. <da...@de...> - 2009-08-11 22:22:45
|
> 1. You haven't build the packageJarHack In what sense? It gets built as part of everything else. > 2. How about my key-remap.patch? > I'll send newer one with mapping for Nokia XpressMusic and > Samsung SGH i550 Let's talk about this idea some more. Would your idea be to remap all keys for all phones into something standard? Maybe you could write a little Hecl script for everyone to try, to see what sorts of names various keys have on our phones... Ideally, we'd be able to do this without a hash table lookup for each value, based on the keycode, but I realize that there is a lot that's not ideal about x-platform j2me... > 3. How about replacing midp20\script.hcl with my Hecl-IDE.hcl? It's been 'script.hcl' for a while - any particular reason to change the name? > 4. On my dinky hand phone I keep getting "Nothing to display" after > "Loading Hecl..." alert and then after several seconds, Hecl finally > running the script. I try to increase a.setTimeout in > midp20\Hecl.java but no luck. How many seconds does it take? The limit is currently set at 10 seconds. I tried an experiment: updating the alert text as things proceed in the init phase, to give people an idea that something's happening, but it looks really ugly on my phone. Are you sure you recompiled the right thing? Try setting it to Alert.FOREVER instead of a value, and see if that improves things. > Maybe you should do an RC release first. If you're willing to help test it out, I would love to get some QA before releasing the code:-) Normally I just go ahead and dump stuff, but if you want to help pick out problems, that is something that would be extremely useful. Thanks! -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: Zakaria <z4...@gm...> - 2009-08-12 00:52:45
Attachments:
test.hcl
|
On Wed, Aug 12, 2009 at 5:22 AM, David Welton<da...@de...> wrote: >> 1. You haven't build the packageJarHack > In what sense? It gets built as part of everything else. The one in jars/JarHack.jar is the old version without the icon fix patch >> 2. How about my key-remap.patch? >> I'll send newer one with mapping for Nokia XpressMusic and >> Samsung SGH i550 > Let's talk about this idea some more. Would your idea be to remap all > keys for all phones into something standard? > Maybe you could write a little Hecl script for everyone to try, to see > what sorts of names various keys have on our phones... > Ideally, we'd be able to do this without a hash table lookup for each > value, based on the keycode, but I realize that there is a lot that's > not ideal about x-platform j2me... Are the keycode standardized? I mean is the left key's keycode on one phone to another is the same? I'm new to this J2ME phone thing, but I got some experience coding in J2ME for Siemens Industrial GSM modem. >From the point of hecl programmer comparing by standarized keyname is easier to understand rather than comparing with some number that represent keycode. Compare the following script fragment: set key [$event cget -keyname] if {eq $key UP} { set Y [+ $Y 10] } elseif {eq $key DOWN} { set Y [- $Y 10] } elseif {eq $key LEFT} { set X [- $X 10] } elseif {eq $key RIGHT} { set X [+ $X 10] } with: set key [$event cget -keycode] if {= $key -1} { # UP set Y [+ $Y 10] } elseif {= $key -2} { # DOWN set Y [- $Y 10] } elseif {= $key -3} { # LEFT set X [- $X 10] } elseif {= $key -4} { # RIGHT set X [+ $X 10] } Which one you think could be easier to read and understand by Hecl newbie? Unless you plan to add constant into Hecl: set key [$event cget -keycode] if {= $key @KEY_UP@} { set Y [+ $Y 10] } elseif {= $key @KEY_DOWN@} { set Y [- $Y 10] } elseif {= $key @KEY_LEFT@} { set X [- $X 10] } elseif {= $key @KEY_RIGHT@} { set X [+ $X 10] } Okay everyone please test your phone with the attached script. That script also exists as an example on my Hecl-IDE.hcl attached on previous mail. >> 3. How about replacing midp20\script.hcl with my Hecl-IDE.hcl? > It's been 'script.hcl' for a while - any particular reason to change the name? I mean the content, not the name. I attach it in the previous mail. >> 4. On my dinky hand phone I keep getting "Nothing to display" after >> "Loading Hecl..." alert and then after several seconds, Hecl finally >> running the script. I try to increase a.setTimeout in >> midp20\Hecl.java but no luck. > How many seconds does it take? The limit is currently set at 10 > seconds. I tried an experiment: updating the alert text as things > proceed in the init phase, to give people an idea that something's > happening, but it looks really ugly on my phone. Are you sure you > recompiled the right thing? Try setting it to Alert.FOREVER instead > of a value, and see if that improves things. OK, Alert.FOREVER works, last time I try to change to 120000 but still not works. Maybe a bug in Alert timeout on my phone? >> Maybe you should do an RC release first. > If you're willing to help test it out, I would love to get some QA > before releasing the code:-) Normally I just go ahead and dump stuff, > but if you want to help pick out problems, that is something that > would be extremely useful. Sure, send it out to me. But I think it's better to do some test release so more people could test it on various phone. > Thanks! > -- > David N. Welton -- Zakaria z4...@gm... Yahoo!: z4k4ri4 http://tukangprogram.com http://pemula.linux.or.id |
From: David W. <dav...@gm...> - 2009-08-12 10:32:00
|
[ Lots of interesting stuff here - I'd encourage everyone to read this mail fully ] On Wed, Aug 12, 2009 at 2:52 AM, Zakaria<z4...@gm...> wrote: > On Wed, Aug 12, 2009 at 5:22 AM, David Welton<da...@de...> wrote: >>> 1. You haven't build the packageJarHack > >> In what sense? It gets built as part of everything else. > > The one in jars/JarHack.jar is the old version without the icon fix patch Maybe I just haven't committed it in a while? Let me update it and see if it's still old. >>> 2. How about my key-remap.patch? >>> I'll send newer one with mapping for Nokia XpressMusic and >>> Samsung SGH i550 >> Let's talk about this idea some more. Would your idea be to remap all >> keys for all phones into something standard? >> Maybe you could write a little Hecl script for everyone to try, to see >> what sorts of names various keys have on our phones... >> Ideally, we'd be able to do this without a hash table lookup for each >> value, based on the keycode, but I realize that there is a lot that's >> not ideal about x-platform j2me... > Are the keycode standardized? No: http://www.j2meforums.com/wiki/index.php/Canvas_Keycodes > I mean is the left key's keycode on one phone to another is the same? > > I'm new to this J2ME phone thing, but I got some experience coding in > J2ME for Siemens Industrial GSM modem. > > >From the point of hecl programmer comparing by standarized keyname > is easier to understand rather than comparing with some number that > represent keycode. Agreed. What I meant is that instead of looking up the name and mapping that, it would make sense to get a numeric keycode and return a name based on that? It's a complex/ugly side of Java ME though: http://www.javaeye.com/topic/179073 I think Hecl should definitely include code to make this stuff easy for people - I don't want to just push the phone mapping stuff down into people's individual Hecl scripts. I think it will take some effort, and more research, though. Wolfgang is more of an expert than I am in terms of running Hecl on a wide variety of phones, hopefully he will have a moment to comment. > Okay everyone please test your phone with the attached script. > That script also exists as an example on my Hecl-IDE.hcl attached on > previous mail. > >>> 3. How about replacing midp20\script.hcl with my Hecl-IDE.hcl? > >> It's been 'script.hcl' for a while - any particular reason to change the name? > > I mean the content, not the name. I attach it in the previous mail. Oh, oops, sorry, I didn't see that! Nice work! I like your code, and think we can use that as the code that Hecl ships with. Like the one I did for Android, I like the fact that you can view the source code and edit it. I also like the creativity. I have gone ahead and committed it, but do think it needs some modification or at least consideration of various elements. Hecl, not being widely used, doesn't have a defined style that people need to use, so that means we're also free to define things as we see fit. That said, your code is a bit different than most Hecl code I've seen (or written) so far. That's not necessarily a bad thing, but since this is going to be *the* example script, it's important that we talk about it a little bit. In particular: * The : in front of global variables. Distinguishing them like that is not a bad idea, but I'm undecided whether I'd use it myself. * proc's with :LeadingColons - I don't really see the benefit. You know from the structure of Hecl what's a proc: it's always the first word in a group. With the :globalvars, it also leads to a few too many :'s around for my tastes:-) * Hecl indentation is definitely 4 :-) There are also some things that, while I think they are good Hecl, or sensible, need some thinking about just because script.hcl has to be held to a high standard, and is something many people will likely look at. * 'Short' names. that's very handy if you're editing the script on the phone, but less so if someone is looking to grab a bit of example code and use it in their own script. * Redefining proc makes things confusing. I think it might make more sense to create your own command along the lines of AliasProc, and add a comment that it adds a bunch of aliases. Lastly, your code suggests a few things that might be interesting to add to Hecl itself: * Command aliases. Having short commands to type is nice, but the mechanism you end up using is a bit circuitous, and would be a lot easier if you could jsut write: alias /alert lcdui.alert * Anonymous commands, which you use ':' for (are you a Forth fan?:-). That requires some more experimentation, but it's an interesting idea... > OK, Alert.FOREVER works, last time I try to change to 120000 but still > not works. Maybe a bug in Alert timeout on my phone? Ok, I will test that out a bit more and then commit it. > Sure, send it out to me. But I think it's better to do some test release > so more people could test it on various phone. We can try a few; hopefully not too many people here in Europe are on vacation and can give things a test. Also, thanks! The more people get involved like this, the more it pushes me to do more to improve Hecl. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: David W. <dav...@gm...> - 2009-08-15 22:01:35
|
> * Command aliases. Having short commands to type is nice, but the > mechanism you end up using is a bit circuitous, and would be a lot > easier if you could jsut write: I went ahead and added an 'alias' command, and the cmdAlias method in Interp.java. It's not much code at all, and I can see how it would be happy to provide some short links to commands. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ |
From: David W. <dav...@gm...> - 2009-08-18 08:07:12
|
forwarded with permission ---------- Forwarded message ---------- From: Zakaria <z4...@gm...> Date: Tue, Aug 18, 2009 at 6:15 AM Subject: Re: [Hecl-devel] Any objections to a new release? To: David Welton <dav...@gm...> Sorry for late reply, but I just got back from business trip and following that we got long weekend. On Wed, Aug 12, 2009 at 5:31 PM, David Welton<dav...@gm...> wrote: > I think Hecl should definitely include code to make this stuff easy > for people - I don't want to just push the phone mapping stuff down > into people's individual Hecl scripts. I think it will take some > effort, and more research, though. Wolfgang is more of an expert than > I am in terms of running Hecl on a wide variety of phones, hopefully > he will have a moment to comment. Wolfgang, have you coming back from your vacation? I would like to ask and discuss about your MIDP 2.0 commands. > I like your code, and think we can use that as the code that Hecl > ships with. Like the one I did for Android, I like the fact that you > can view the source code and edit it. I also like the creativity. > I have gone ahead and committed it, but do think it needs some > modification or at least consideration of various elements. Please go ahead, tear them apart and make it better. > Hecl, not being widely used, doesn't have a defined style that people > need to use, so that means we're also free to define things as we see > fit. That said, your code is a bit different than most Hecl code I've > seen (or written) so far. That's not necessarily a bad thing, but > since this is going to be *the* example script, it's important that we > talk about it a little bit. In particular: > * The : in front of global variables. Distinguishing them like that > is not a bad idea, but I'm undecided whether I'd use it myself. > * proc's with :LeadingColons - I don't really see the benefit. You > know from the structure of Hecl what's a proc: it's always the first > word in a group. With the :globalvars, it also leads to a few too > many :'s around for my tastes:-) I choose the : prefix to make it doesn't collide with the examples. First I use __ prefix but they seem so verbose, so I pick another one. > * Hecl indentation is definitely 4 :-) I know, but on the phone 4 space is too much. Maybe we could make the Canvas based editor and make this a non issue? Any volunteer? > There are also some things that, while I think they are good Hecl, or > sensible, need some thinking about just because script.hcl has to be > held to a high standard, and is something many people will likely look > at. > * 'Short' names. that's very handy if you're editing the script on > the phone, but less so if someone is looking to grab a bit of example > code and use it in their own script. > * Redefining proc makes things confusing. I think it might make more > sense to create your own command along the lines of AliasProc, and add > a comment that it adds a bunch of aliases. Yeah, I'm just trying to test the Hecl limit. > Lastly, your code suggests a few things that might be interesting to > add to Hecl itself: > * Command aliases. Having short commands to type is nice, but the > mechanism you end up using is a bit circuitous, and would be a lot > easier if you could jsut write: > alias /alert lcdui.alert In the long run I would like to make the default command short and to the point, so we don't even need the alias. > * Anonymous commands, which you use ':' for (are you a Forth fan?:-). > That requires some more experimentation, but it's an interesting > idea... Nah, just trying to pick a short command. Here's what I have in mind for Hecl 2.0: set form [form title: "Form Title"] set name [text label: "Name:" text: "Your name here"] $form append $name set cmd [cmd label: Greet llabel: "Greeting"] $form add $cmd { showmsg "Hello [$name get text:]" } $form add [cmd label: Exit llabel: "Exit App"] { midlet.exit } $form show > -- > David N. Welton -- Zakaria z4...@gm... Yahoo!: z4k4ri4 http://tukangprogram.com http://pemula.linux.or.id -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: David W. <dav...@gm...> - 2009-08-18 08:07:19
|
forwarded with permission ---------- Forwarded message ---------- From: Zakaria <z4...@gm...> Date: Tue, Aug 18, 2009 at 6:26 AM Subject: Re: [Hecl-devel] Any objections to a new release? To: David Welton <dav...@gm...> Oops: > Here's what I have in mind for Hecl 2.0: > > set form [form title: "Form Title"] > set name [text label: "Name:" text: "Your name here"] > $form append $name > set cmd [cmd label: Greet llabel: "Greeting"] > $form add $cmd { global name > showmsg "Hello [$name get text:]" > } > $form add [cmd label: Exit llabel: "Exit App"] { > midlet.exit > } > $form show Anybody has a fix for global proliferation? -- Zakaria z4...@gm... Yahoo!: z4k4ri4 http://tukangprogram.com http://pemula.linux.or.id -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: David W. <dav...@gm...> - 2009-08-19 09:51:02
|
> Wolfgang, have you coming back from your vacation? > I would like to ask and discuss about your MIDP 2.0 commands. He's mentioned that he's back, but quite busy - post away to the list. >> I have gone ahead and committed it, but do think it needs some >> modification or at least consideration of various elements. > Please go ahead, tear them apart and make it better. I'm in the process of doing that:-) >> * proc's with :LeadingColons - I don't really see the benefit. You >> know from the structure of Hecl what's a proc: it's always the first >> word in a group. With the :globalvars, it also leads to a few too >> many :'s around for my tastes:-) > > I choose the : prefix to make it doesn't collide with the examples. > First I use __ prefix but they seem so verbose, so I pick another one. I see... To tell the truth, since this is example code that people will potentially use to get started with their own projects, I would rather be a bit verbose, rather than 'convenient to edit on a phone'. >> * Hecl indentation is definitely 4 :-) > > I know, but on the phone 4 space is too much. > Maybe we could make the Canvas based editor and make this a non issue? > Any volunteer? Here's an idea: let's use tabs... hrm... those seem to be more than 4 spaces on my phone. So... that doesn't work. 4 isn't bad on my phone, but I suppose on devices with a bit less space it is not so good. However, I'd still like to go with readability. > Yeah, I'm just trying to test the Hecl limit. I was impressed with what you did in that direction, actually! >> alias /alert lcdui.alert > > In the long run I would like to make the default command short > and to the point, so we don't even need the alias. I think the idea was to avoid conflicts with things like list - lcdui.list. >> * Anonymous commands, which you use ':' for (are you a Forth fan?:-). >> That requires some more experimentation, but it's an interesting >> idea... > > Nah, just trying to pick a short command. > > Here's what I have in mind for Hecl 2.0: > > set form [form title: "Form Title"] > set name [text label: "Name:" text: "Your name here"] > $form append $name > set cmd [cmd label: Greet llabel: "Greeting"] > $form add $cmd { > showmsg "Hello [$name get text:]" > } > $form add [cmd label: Exit llabel: "Exit App"] { > midlet.exit > } > $form show I like it - it actually looks a little bit more like the midp1.0 code I did:-) Did you have a look at that? -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ Sent from Padua, Veneto, Italy |
From: Zakaria <z4...@gm...> - 2009-08-21 06:27:31
|
On Wed, Aug 19, 2009 at 4:50 PM, David Welton <dav...@gm...> wrote: > > Wolfgang, have you coming back from your vacation? > > I would like to ask and discuss about your MIDP 2.0 commands. > He's mentioned that he's back, but quite busy - post away to the list. Currently I'm in the middle of project with tight deadline. I'll try to find time to post it next week. > > I choose the : prefix to make it doesn't collide with the examples. > > First I use __ prefix but they seem so verbose, so I pick another one. > I see... To tell the truth, since this is example code that people > will potentially use to get started with their own projects, I would > rather be a bit verbose, rather than 'convenient to edit on a phone'. Please change it to suit the style. > >> * Hecl indentation is definitely 4 :-) > > I know, but on the phone 4 space is too much. > > Maybe we could make the Canvas based editor and make this a non issue? > > Any volunteer? > Here's an idea: let's use tabs... hrm... those seem to be more than 4 > spaces on my phone. So... that doesn't work. 4 isn't bad on my > phone, but I suppose on devices with a bit less space it is not so > good. However, I'd still like to go with readability. Not including you can't type tab on most phone. Please go ahead with 4 space. What I have in mind is we create a canvas based editor where we edit line by line. Maybe I'll post some proof of concept later next week. > >> alias /alert lcdui.alert > > In the long run I would like to make the default command short > > and to the point, so we don't even need the alias. > I think the idea was to avoid conflicts with things like list - lcdui.list. A simple rename perhaps: listbox listscreen listpage > > Here's what I have in mind for Hecl 2.0: > > set form [form title: "Form Title"] > > set name [text label: "Name:" text: "Your name here"] > > $form append $name > > set cmd [cmd label: Greet llabel: "Greeting"] > > $form add $cmd { > > showmsg "Hello [$name get text:]" > > } > > $form add [cmd label: Exit llabel: "Exit App"] { > > midlet.exit > > } > > $form show > I like it - it actually looks a little bit more like the midp1.0 code > I did:-) Did you have a look at that? Unfortunately, I didn't. That's remind me to print Hecl Midp source with trueprint. Do you have any plan for Hecl 2.0? Post away in another thread. > -- > David N. Welton -- Zakaria z4...@gm... Yahoo!: z4k4ri4 http://tukangprogram.com http://pemula.linux.or.id |