jscodee-devel Mailing List for JSCode
Status: Alpha
Brought to you by:
garyfred
You can subscribe to this list here.
2003 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Allen D. <far...@be...> - 2003-02-14 11:49:18
|
So you use one source file to generate the code for mindscript, the code to display for the user and the code to define what is being shown to make it all pretty? They all then get piped together to form one HTML file? If that is right, that is cool! Allen Gary Frederick wrote: > On Fri, 2003-02-14 at 04:42, Allen Demers wrote: > >>What is the svg XSLT for? What are you translating it to? I am a >>little unclear about what is happening I think... >> >>Allen > > > Glad you asked!!! Here is a long answer:-) > > JSCode is an XML application. The XML lets us represent programs. We use > XSLT to generate MindScript, NQC and SVG. The SVG displays the program > in blocks like this > http://jscodee.sourceforge.net/jscode/images/box.png > > That image came from an SVG file. The SVG file was generated from an XML > file that was processed by an XSLT stylesheet that converts JSCode XML > into SVG. phew :-) > > So, we use our html pages to create XML. To add 1.0 to var1, start here > http://jscodee.sourceforge.net/jscode/buildBlocks/basic/Add.html > > the JSCode XML is > <block kind="basic" name="Add"> > <param kind="variable">var1</param> > <param kind="value">1.0</param> > </block> > > We add that XML to a program. We can generate Mindscript > var1 = 100 > or perhaps NQC or Java > var1 = 100; > > or SVG. > > The SVG would be something like this: > <rect stroke="black" fill="forestgreen" rx="5px" y="51px" x="55px" > width="80px" height="60px"/> > <rect stroke="black" fill="yellow" y="106px" x="65px" width="60px" > height="8px"/> > <rect stroke="black" fill="forestgreen" y="60px" x="129px" > width="12px" height="42px"/> > <text fill="white" x="65" y="77">Set</text> > <text fill="white" x="59" y="91">var1 = 1.0</text> > > We get MindScript or SVG or Java because we have XSLT stylesheets that > translate JSCode XML. > > I'm updating the XSLT to understand V0.3 JSCode XML. When that is done, > we can update the SVG generated to use CSS. If we want to be able to > change the color of a basic block from forestgreen to some other color, > we will change the SVG something like this > <rect class="basicBlock" rx="5px" y="51px" x="55px" width="80px" > height="60px"/> > and have CSS that sets or resets the stroke and fill for anything of the > 'class' "basicBlock". > > and... > > I'm using the SVG to get graphics. Some day when most browsers support > SVG out of the box, we can display the graphics directly. Till then I > generate images so everyone can see them. Some day... > > Better? > > Gary > > The original message. > http://sourceforge.net/mailarchive/forum.php?thread_id=1650986&forum_id=23380 > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Jscodee-devel mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscodee-devel > |
From: Gary F. <gar...@js...> - 2003-02-14 11:23:20
|
On Fri, 2003-02-14 at 04:42, Allen Demers wrote: > What is the svg XSLT for? What are you translating it to? I am a > little unclear about what is happening I think... > > Allen Glad you asked!!! Here is a long answer:-) JSCode is an XML application. The XML lets us represent programs. We use XSLT to generate MindScript, NQC and SVG. The SVG displays the program in blocks like this http://jscodee.sourceforge.net/jscode/images/box.png That image came from an SVG file. The SVG file was generated from an XML file that was processed by an XSLT stylesheet that converts JSCode XML into SVG. phew :-) So, we use our html pages to create XML. To add 1.0 to var1, start here http://jscodee.sourceforge.net/jscode/buildBlocks/basic/Add.html the JSCode XML is <block kind="basic" name="Add"> <param kind="variable">var1</param> <param kind="value">1.0</param> </block> We add that XML to a program. We can generate Mindscript var1 = 100 or perhaps NQC or Java var1 = 100; or SVG. The SVG would be something like this: <rect stroke="black" fill="forestgreen" rx="5px" y="51px" x="55px" width="80px" height="60px"/> <rect stroke="black" fill="yellow" y="106px" x="65px" width="60px" height="8px"/> <rect stroke="black" fill="forestgreen" y="60px" x="129px" width="12px" height="42px"/> <text fill="white" x="65" y="77">Set</text> <text fill="white" x="59" y="91">var1 = 1.0</text> We get MindScript or SVG or Java because we have XSLT stylesheets that translate JSCode XML. I'm updating the XSLT to understand V0.3 JSCode XML. When that is done, we can update the SVG generated to use CSS. If we want to be able to change the color of a basic block from forestgreen to some other color, we will change the SVG something like this <rect class="basicBlock" rx="5px" y="51px" x="55px" width="80px" height="60px"/> and have CSS that sets or resets the stroke and fill for anything of the 'class' "basicBlock". and... I'm using the SVG to get graphics. Some day when most browsers support SVG out of the box, we can display the graphics directly. Till then I generate images so everyone can see them. Some day... Better? Gary The original message. http://sourceforge.net/mailarchive/forum.php?thread_id=1650986&forum_id=23380 |
From: Allen D. <far...@be...> - 2003-02-14 02:42:24
|
What is the svg XSLT for? What are you translating it to? I am a little unclear about what is happening I think... Allen Gary Frederick wrote: > When we moved the JSCode XML to V0.3, the XSLT stylesheets were not > updated. They sorta worked but did not do everything they needed to do > to generate code. The V0.2 XML had info for each language that made the > XSLT somewhat easier to write. V0.3 requires the XSLT 'do more'. > > I have the XSLT for going from JSCode to MindScript working pretty well. > I did a bit with the NQC XSLT to see how hard it will be to update the > various languages. It will be easy. I have the XSLT that generates SVG > updated. That was actually easier than MindScript. > > And I added much better support for tasks and MindScript watcher tasks > and variables and constant declarations and the select statement :-) > > I just added XML for sensors and declaring events > > // these MindScript statements > sensor t on 3 > t is switch as boolean > event touched when t.pressed > > are generated from this XML > > <block kind="basic" name="Sensor"> > <param kind="variable">t</param> > <param kind="value">3</param> > </block> > <block kind="basic" name="SensorAssign"> > <param kind="variable">t</param> > <param kind="type">switch</param> > <param kind="mode">boolean</param> > </block> > <block kind="basic" name="Event"> > <param kind="variable">touched</param> > <param kind="value">t.pressed</param> > </block> > > The above may change a bit before it is final. For example, I have the > 'kind' of block as "basic". That was to pick up the SVG image for a > basic block when generating SVG. I may make it another kind, like what I > did to get the Spybot specific blocks. > > I have not built the web pages for these blocks yet. If someone wants to > try their hand at building those pages, let me know. I would like to > have a different image for them, close to the images we have but > different enough to make it easy to see they are not basic blocks. > > I'm going to continue working with the MindScript and SVG XSLT. Then > I'll update the NQC XSLT then the other pages. I plan on having > everything ready to be V0.3 by the end of February. > > Back to XSLT land :-) > > Gary > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Jscodee-devel mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscodee-devel > |
From: Gary F. <gar...@js...> - 2003-02-13 11:59:48
|
When we moved the JSCode XML to V0.3, the XSLT stylesheets were not updated. They sorta worked but did not do everything they needed to do to generate code. The V0.2 XML had info for each language that made the XSLT somewhat easier to write. V0.3 requires the XSLT 'do more'. I have the XSLT for going from JSCode to MindScript working pretty well. I did a bit with the NQC XSLT to see how hard it will be to update the various languages. It will be easy. I have the XSLT that generates SVG updated. That was actually easier than MindScript. And I added much better support for tasks and MindScript watcher tasks and variables and constant declarations and the select statement :-) I just added XML for sensors and declaring events // these MindScript statements sensor t on 3 t is switch as boolean event touched when t.pressed are generated from this XML <block kind="basic" name="Sensor"> <param kind="variable">t</param> <param kind="value">3</param> </block> <block kind="basic" name="SensorAssign"> <param kind="variable">t</param> <param kind="type">switch</param> <param kind="mode">boolean</param> </block> <block kind="basic" name="Event"> <param kind="variable">touched</param> <param kind="value">t.pressed</param> </block> The above may change a bit before it is final. For example, I have the 'kind' of block as "basic". That was to pick up the SVG image for a basic block when generating SVG. I may make it another kind, like what I did to get the Spybot specific blocks. I have not built the web pages for these blocks yet. If someone wants to try their hand at building those pages, let me know. I would like to have a different image for them, close to the images we have but different enough to make it easy to see they are not basic blocks. I'm going to continue working with the MindScript and SVG XSLT. Then I'll update the NQC XSLT then the other pages. I plan on having everything ready to be V0.3 by the end of February. Back to XSLT land :-) Gary |
From: Gary F. <gar...@js...> - 2003-01-21 13:27:29
|
I found a project on sourceforge that is generating XML from gcc. http://sourceforge.net/projects/introspector/ We can use their project to generate JSCode from any compiler gcc supports. That could include Java, C, C++, Ada, Fortran and Pascal for starters. The idea would be to take a program, compile to get the XML and then translate the XML to JSCode. This will let us do things like convert programs from NQC to Java and back and to see what they look like graphically by viewing them as bricks. The introspector project leader generated some info for me. Thanks Mike! This simple Java program: public class test { public static void bb_Forward (int x ) { } public static void bb_TurnLeft (int x ){ } public static void main(String[] args) throws InterruptedException { for (int myIx = 0; myIx < 4; myIx++) { bb_Forward(100); bb_TurnLeft(75); } } } outputs something called ntriples http://introspector.sourceforge.net/2003/01/21/test.java/_global__.class_.ntriples The declaration of myIx in the ntriples has this info <#id-25> <node_fields#filename> <#filename-test.java> . <#id-25> <node_fields#linenumber> "18" . <#id-25> <node_fields#name> <node_types#identifier_node> . <#id-25> <node_fields#name> <#id-32> . <#id-32> <node_fields#strg> "myIx" . <#id-32> <node_fields#tree-code> <node_types#identifier_node> . <#id-25> <node_fields#algn> "32" . <#id-25> <node_fields#size> <node_types#integer_cst> . <#id-25> <node_fields#size> <#id-33> . <#id-25> <node_fields#type> <node_types#integer_type> . <#id-25> <node_fields#type> <#id-27> . <#id-25> <node_fields#tree-code> <node_types#var_decl> . Compile the Jave source and we get XML or rdf. We can then read the XML/rdf and translate that into JSCode. The above tells us that #id-25 is a node that holds an identifier named 'myIx' and that myIx is an int. We could translate that into this JSCode <block kind="basic" name="Variable"> <param kind="identifier">myIx</param> <param kind="integer">0</param> </block> woo hoo... Back to getting V0.3 to V0.4 :-) Gary |
From: Gary F. <gar...@js...> - 2003-01-21 10:14:47
|
forwarding to get into the archive -------- Original Message -------- Subject: [Jscodee-devel] Re: moving the xhtml back to html Date: Sun, 19 Jan 2003 10:00:34 -0600 From: Gary Frederick <gar...@js...> Reply-To: jsc...@li... Organization: Jefferson Software To: jsc...@li... References: <3E2...@js...> How to convert a page from xhtml to html Pick a page - On.xhtml 1: convert from xhtml to html tidy -ashtml -wrap 128 -indent OnTidy.xhtml >OnTidyHTML.html 2: remove CDATA 'stuff' from around the JavaScript <![CDATA[ and ]]> 3: change the following in OnTidyHTML.html <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head profile="http://jscodee.sourceforge.net/jscode/docs/#profile"> to <html lang="en-US"> <head> 4: tidy up after your changes tidy -wrap 128 -indent -m OnTidyHTML.html ===== What we are doing. The program tidy is a great utility for tidying up html. The first step converts XHTML to html (-ashtml). It also wraps lines and makes sure it's indented. It saves to OnTidyHTML.html. Then we remove the CDATA from around the JavaScript. The XHTML version has that around the JavaScript to 'protect' it. When we converted the xhtml to html, we did not need it so we removed it. we changed the file by removing the file's xml and doctype info and by editing the <html> and <head> tag. We got all the other changes we needed when we ran tidy. We ran tidy again to make sure we got valid html. Good ol tidy also adds the correct DOCTYPE for our html. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> and then we email me the new file and I'll put it on sourceforge. We will have things set up to do more effeciently soon. Let me know where the above was not clear and start sending the html version of the files. Gary Gary Frederick wrote: > I converted most of our pages to xhtml 1.1. Then I found out that > Internet Explorer does not recognize the mime type for xhtml. sigh. > > Back we go. > > What happens is when IE gets a page that is XHTML, it asks if you want > to download it or view it. When I view it, I get a copy that was > downloaded to a temporary file. That messes up any images, the > JavaScript and is just not right. > > Back to HTML. > > Gary > > some info: > > XHTML 1.1 documents should use application/xhtml+xml. > http://www.w3.org/TR/xhtml-media-types/ > > Someone's adventures with going to XHTML 1.1 - lots of good stuff > Item 2 about MIME type application/xhtml+xml > http://diveintomark.org/archives/2002/11/21.html > > Another that told how he coped with IE. > http://www.petesguide.com/ > > That pointed to this German site which had the links to translate into > English and good info. > http://schneegans.de/tips/apache-xhtml.html > > That site pointed to this site that had even more good info. Look at > the info about the content negotiation various browser have, the Accept: > stuff. AND be sure to look at the site using IE. You have been warned!!! > :-) :-) :-) > http://kimihia.org.nz/articles/ieaccept/modify > http://kimihia.org.nz/ > > > ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en _______________________________________________ Jscodee-devel mailing list Jsc...@li... https://lists.sourceforge.net/lists/listinfo/jscodee-devel |
From: Gary F. <gar...@js...> - 2003-01-19 17:56:25
|
I was moving to xhtml to support parsing the pages. That is something we will do but don't need right away. I'm ok with going back to html for the pages and it is nice to be able to show more people. The fancy stuff that JSCode will do will require Mozilla, but that will be part of the stuff people pay for and we will probably build something custom with Mozilla for that. Gary Allen Demers wrote: > I noticed that at work but did not want to say anything. I thought the > browser was mis-configured or something... > > I wouldnt go backwards as you can include the Mozilla engine anyway no? > > Allen > > > Gary Frederick wrote: > >> I converted most of our pages to xhtml 1.1. Then I found out that >> Internet Explorer does not recognize the mime type for xhtml. sigh. >> >> Back we go. > > > <snip> > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Jscodee-devel mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscodee-devel |
From: Gary F. <gar...@js...> - 2003-01-19 16:06:46
|
How to convert a page from xhtml to html Pick a page - On.xhtml 1: convert from xhtml to html tidy -ashtml -wrap 128 -indent OnTidy.xhtml >OnTidyHTML.html 2: remove CDATA 'stuff' from around the JavaScript <![CDATA[ and ]]> 3: change the following in OnTidyHTML.html <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head profile="http://jscodee.sourceforge.net/jscode/docs/#profile"> to <html lang="en-US"> <head> 4: tidy up after your changes tidy -wrap 128 -indent -m OnTidyHTML.html ===== What we are doing. The program tidy is a great utility for tidying up html. The first step converts XHTML to html (-ashtml). It also wraps lines and makes sure it's indented. It saves to OnTidyHTML.html. Then we remove the CDATA from around the JavaScript. The XHTML version has that around the JavaScript to 'protect' it. When we converted the xhtml to html, we did not need it so we removed it. we changed the file by removing the file's xml and doctype info and by editing the <html> and <head> tag. We got all the other changes we needed when we ran tidy. We ran tidy again to make sure we got valid html. Good ol tidy also adds the correct DOCTYPE for our html. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> and then we email me the new file and I'll put it on sourceforge. We will have things set up to do more effeciently soon. Let me know where the above was not clear and start sending the html version of the files. Gary Gary Frederick wrote: > I converted most of our pages to xhtml 1.1. Then I found out that > Internet Explorer does not recognize the mime type for xhtml. sigh. > > Back we go. > > What happens is when IE gets a page that is XHTML, it asks if you want > to download it or view it. When I view it, I get a copy that was > downloaded to a temporary file. That messes up any images, the > JavaScript and is just not right. > > Back to HTML. > > Gary > > some info: > > XHTML 1.1 documents should use application/xhtml+xml. > http://www.w3.org/TR/xhtml-media-types/ > > Someone's adventures with going to XHTML 1.1 - lots of good stuff > Item 2 about MIME type application/xhtml+xml > http://diveintomark.org/archives/2002/11/21.html > > Another that told how he coped with IE. > http://www.petesguide.com/ > > That pointed to this German site which had the links to translate into > English and good info. > http://schneegans.de/tips/apache-xhtml.html > > That site pointed to this site that had even more good info. Look at > the info about the content negotiation various browser have, the Accept: > stuff. AND be sure to look at the site using IE. You have been warned!!! > :-) :-) :-) > http://kimihia.org.nz/articles/ieaccept/modify > http://kimihia.org.nz/ > > > |
From: Allen D. <far...@be...> - 2003-01-19 14:38:17
|
I noticed that at work but did not want to say anything. I thought the browser was mis-configured or something... I wouldnt go backwards as you can include the Mozilla engine anyway no? Allen Gary Frederick wrote: > I converted most of our pages to xhtml 1.1. Then I found out that > Internet Explorer does not recognize the mime type for xhtml. sigh. > > Back we go. <snip> |
From: Gary F. <gar...@js...> - 2003-01-19 14:01:34
|
I converted most of our pages to xhtml 1.1. Then I found out that Internet Explorer does not recognize the mime type for xhtml. sigh. Back we go. What happens is when IE gets a page that is XHTML, it asks if you want to download it or view it. When I view it, I get a copy that was downloaded to a temporary file. That messes up any images, the JavaScript and is just not right. Back to HTML. Gary some info: XHTML 1.1 documents should use application/xhtml+xml. http://www.w3.org/TR/xhtml-media-types/ Someone's adventures with going to XHTML 1.1 - lots of good stuff Item 2 about MIME type application/xhtml+xml http://diveintomark.org/archives/2002/11/21.html Another that told how he coped with IE. http://www.petesguide.com/ That pointed to this German site which had the links to translate into English and good info. http://schneegans.de/tips/apache-xhtml.html That site pointed to this site that had even more good info. Look at the info about the content negotiation various browser have, the Accept: stuff. AND be sure to look at the site using IE. You have been warned!!! :-) :-) :-) http://kimihia.org.nz/articles/ieaccept/modify http://kimihia.org.nz/ |