From v_mil at ukr.net Mon Aug 14 12:14:32 2017 From: v_mil at ukr.net (Viktor Mileikovskyi) Date: Mon, 14 Aug 2017 13:14:32 +0300 Subject: [Scilab-Dev] Bug 15184 Message-ID: <1502704951.881220246.hah8c6q1@frv42.fwdcdn.com> Dear Developers! The bug 15184 has been successfully fixed in 6.0 branch but the master branch has the problem of segmentation fault if an operand of comparing operator is complex. This cause danger of data loose and some SciLab programs to be highly unstable. The problem require additional tests before each "if" and inside each "while" statements degrading the code performance. Please merge the bugfix to the master branch. With best regards. Viktor. -- E-Mail: v_mil at ukr.net E-Mail: mileikovskyi at gmail.com Skype: mileikovskyi Mob: +38-044-2284247 Mob: +38-094-8284247 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Aug 14 13:38:08 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 14 Aug 2017 13:38:08 +0200 Subject: [Scilab-Dev] Bug 15184 In-Reply-To: <1502704951.881220246.hah8c6q1@frv42.fwdcdn.com> References: <1502704951.881220246.hah8c6q1@frv42.fwdcdn.com> Message-ID: <276a37bc-8b57-fa02-23c3-502802ef9085@free.fr> Le 14/08/2017 ? 12:14, Viktor Mileikovskyi a ?crit : > Dear Developers! > > The bug 15184 has > been successfully fixed in 6.0 branch At least, the crash no longer occurs. However, when we try to compare a complex to a real like with 2<%i, an error should be yielded instead of returning %F. Otherwise, the complementary comparison 2>=%i could be interpreted as %T, what is definitely not the case. So: when such a comparison is done, we may test the existence of %s_1_s_custom() , that may be defined in an external way (%s_1_s() being already defined in Scilab). * If it exists: we call it * otherwise, we yield an error with a message inviting the user to define %s_1_s_custom() I will propose a commit in this way, on the 6.0 branch. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From v_mil at ukr.net Mon Aug 14 14:50:15 2017 From: v_mil at ukr.net (Viktor Mileikovskyi) Date: Mon, 14 Aug 2017 15:50:15 +0300 Subject: [Scilab-Dev] Bug 15184 In-Reply-To: <276a37bc-8b57-fa02-23c3-502802ef9085@free.fr> References: <1502704951.881220246.hah8c6q1@frv42.fwdcdn.com> <276a37bc-8b57-fa02-23c3-502802ef9085@free.fr> Message-ID: <1502712049.879715928.14p8z70q@frv42.fwdcdn.com> Dear Samuel! Many thanks! For me there is no problem to run SciLab as admin, use edit %s_i_s (i=1:4) and add else ??? TF=%f or else ??? error("Comparison of complex numbers is undefined") etc. The error is a good idea. It is more correct that in MatLab (comparing of the real part only). But %NAN is also possible, meaning that the operation can not provide any "logical number", 1 (%t) or 0 (%f). If x<%i is false then x>=%i can also be false, such as x<%nan and x>=%nan. In this case, %f in "if" or "while" gives the same result but without changing of type of the comparing result from 4 to 1. Nevertheless, %NAN is more correct?(IMHO), especially in boolean expressions outside the "if" of "while" conditions. It is possible to use: if a=b then else ??? //a or/and b is/are %nan or complex. end With best regards. Viktor. 14 ?????? 2017, 14:38:33, ??? "Samuel Gougeon" : Le 14/08/2017 ? 12:14, Viktor Mileikovskyi a ?crit?: Dear Developers! The bug 15184 has been successfully fixed in 6.0 branch At least, the crash no longer occurs. However, when we try to compare a complex to a real like with 2<%i, an error should be yielded instead of returning %F. Otherwise, the complementary comparison 2>=%i could be interpreted as %T, what is definitely not the case. So: when such a comparison is done, we may test the existence of %s_1_s_custom() , that may be defined in an external way (%s_1_s() being already defined in Scilab). ?* If it exists: we call it ?* otherwise, we yield an error with a message inviting the user to define %s_1_s_custom() I will propose a commit in this way, on the 6.0 branch. Samuel _______________________________________________ dev mailing list dev at lists.scilab.org http://lists.scilab.org/mailman/listinfo/dev -- E-Mail: v_mil at ukr.net E-Mail: mileikovskyi at gmail.com Skype: mileikovskyi Mob: +38-044-2284247 Mob: +38-094-8284247 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Aug 14 15:14:37 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 14 Aug 2017 15:14:37 +0200 Subject: [Scilab-Dev] Bug 15184 In-Reply-To: <1502712049.879715928.14p8z70q@frv42.fwdcdn.com> References: <1502704951.881220246.hah8c6q1@frv42.fwdcdn.com> <276a37bc-8b57-fa02-23c3-502802ef9085@free.fr> <1502712049.879715928.14p8z70q@frv42.fwdcdn.com> Message-ID: Le 14/08/2017 ? 14:50, Viktor Mileikovskyi a ?crit : > Dear Samuel! > > Many thanks! > > For me there is no problem to run SciLab as admin, use edit %s_i_s > (i=1:4) and add But it is a too specific status. Any user -- even not admin -- should be able to extend the overload without modifying native Scilab's code, even without write access to Scilab installation directory. > > else > TF=%f > > or > > else > error("Comparison of complex numbers is undefined") > > etc. > > The error is a good idea. It is more correct that in MatLab (comparing > of the real part only). But %NAN is also possible, meaning that the > operation can not provide any "logical number", 1 (%t) or 0 (%f). A boolean is expected as result. So we can't return %nan, that is of decimal type. In Scilab, unlike in Matlab (AFAIK), the boolean type is specific. In addition, in boolean operations %nan does not propagate and is equivalent to %T: --> [%f %t] & %nan ans = F T --> [%f %t] | %nan ans = T T This is why i will stick to issuing an error message. By the way, this is also the best way to make the user aware of the issue and informed on how overloading the comparison. Thanks for your input. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas.vieira.de.souza at gmail.com Tue Aug 15 14:43:44 2017 From: jonas.vieira.de.souza at gmail.com (Jonas) Date: Tue, 15 Aug 2017 09:43:44 -0300 Subject: [Scilab-Dev] Fwd: Problem with GUI / SERIAL / REALTIME. In-Reply-To: References: Message-ID: Hi, I'm having a problem with GUI / SERIAL / REALTIME. . After the serial is open, I can not close the serial by pressing the graphic button I created for this. Someone there knows what might be happening. Thank you for your help. . Below is the code. //// author: jonas vieira de souza// email: jonas.vieira.de.souza at gmail.com// date: 15/08/2017//// proposal: ..// in GUI, have ..// two buttons ( connect and disconnect the serial ),// two labels ( status and data received from the serial ).//// problem: ..//// _disconnect_button.Callback = "close_serial"; <- NOT WORKING//// After connecting,// when pressed the disconnect button,// is not being disconnected.// clear;clc; global serial;global is_connected;is_connected = %F;global is_disconnected;is_disconnected = %T; // window background_window = createWindow();_window.Background = [ 0.8 0.8 0.8 ];_window.axes_size = [ 200 400 ]; // connect button_connect_button = uicontrol(_window,"style","pushbutton");_connect_button.Units = "normalized";_connect_button.Position = [ 0 0.75 1 0.25 ];_connect_button.String = "connect";_connect_button.BackgroundColor = [ 0.9 0.9 0.9 ];_connect_button.Callback = "open_serial";_connect_button.Relief="raised"; // disconnect button_disconnect_button = uicontrol(_window,"style","pushbutton");_disconnect_button.Units = "normalized";_disconnect_button.Position = [ 0 0.5 1 0.25 ];_disconnect_button.String = "disconnect";_disconnect_button.BackgroundColor = [ 0.9 0.9 0.9 ];_disconnect_button.Callback = "close_serial";_disconnect_button.Relief="sunken"; // label status_label_status = uicontrol(_window,"style","text");_label_status.Units = "normalized";_label_status.HorizontalAlignment = "center";_label_status.Position = [0 0.25 1 0.25];_label_status.String = "disconnected";_label_status.BackgroundColor = [ 0.9 0.9 0.8 ]; // label data_label_data = uicontrol(_window,"style","text");_label_data.Units = "normalized";_label_data.HorizontalAlignment = "center";_label_data.Position = [0 0 1 0.25];_label_data.String = "null";_label_data.BackgroundColor = [ 0.9 0.9 0.8 ]; // ...function read_serial() global serial; data_received = readserial(serial); if length(data_received) > 1 then set( _label_data, 'string', string(data_received) ); endendfunction // ...function open_serial() global serial; global is_connected; global is_disconnected; if is_connected == %F then is_connected = %T; is_disconnected = %F; serial = openserial( 2, "9600,n,8,1" ); set( _connect_button, 'relief','sunken' ); set( _disconnect_button, 'relief', 'raised'); set( _label_status, 'string', 'connected' ); while is_connected == %T & is_disconnected == %F then read_serial(); end endendfunction // ...function close_serial() global serial; global is_connected; global is_disconnected; if is_connected == %T then is_connected = %F; is_disconnected = %T; closeserial(serial); set( _disconnect_button,'relief','sunken'); set( _connect_button,'relief','raised' ); set( _label_status,'string','disconnected'); endendfunction Jonas Vieira de Souza ** **Graduating in electronic engineering* jonas.vieira.de.souza at gmail.com +55(48)9.9944-3117 Livre de v?rus. www.avast.com . <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Wed Aug 23 14:23:06 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Wed, 23 Aug 2017 12:23:06 +0000 Subject: [Scilab-Dev] Trying to update help_from_sci In-Reply-To: <5d86d3c459e4c6018d152825df80f9f4@pierre-vuillemin.fr> References: <1682080502.3871446.1494412418793.JavaMail.root@zimbra75-e12.priv.proxad.net> <1494487368.6500.22.camel@esi-group.com> <5d86d3c459e4c6018d152825df80f9f4@pierre-vuillemin.fr> Message-ID: <1503490981.20757.33.camel@esi-group.com> Hello Pierre, Thanks for the preview, it sounds really good to me. > The issue I am facing is that while the .html file obtained after using > xmltojar is displayed correctly in Firefox, it is not the case in the > help browser of Scilab where the description section does not appear. > Do you have some idea about that? The help browser is using the Java provided HTML4 renderer [1] which may not support some of the generated attributes (whereas Firefox supports more modern HTML). It is a bit specific as the Docbook to HTML (for javahelp) will pass through some attributes which might or might not be rendered. Do not hesitate to post your buggy files / examples, [1]: https://docs.oracle.com/javase/8/docs/api/javax/swing/text/html/HTMLDocument.html Thanks, -- Cl?ment Le mercredi 23 ao?t 2017 ? 09:54 +0200, Pierre Vuillemin a ?crit : > Hello all, > > Some times ago, I started working on an updated (a little bit more > flexible) version of the routine help_from_sci. > > At this point, it can generate .xml file(s) from formatted head comments > (either line comments or block-comments) and a minimal markdown support > is working for the section Description (and user-defined section). > For instance see the files attached that shows the source comments > (src.png) and the resulting output doc (doc.png) obtained after using > xmltojar on the file slr_comments_to_xml.xml. > > (Note that the sections that are empty in the source file are not > rendered in the .xml file) > > Some things are still not implemented but it should not be that > difficult: paragraph, parsing of the example section, latex equations. > > The issue I am facing is that while the .html file obtained after using > xmltojar is displayed correctly in Firefox, it is not the case in the > help browser of Scilab where the description section does not appear. > Do you have some idea about that? > > Best regards, > > Pierre > > > Le 11.05.2017 09:22, Cl?ment David a ?crit : > > Hello Pierre, > > > > Great news ! The help_from_sci() feature is currently really useful > > for new comers and improving it > > might be a good idea. > > > > The XML syntax used is a subset of Docbook 5 ; the man help page > > contains some information but I > > usually use the main Docbook documentation. > > > > About Markdown support, it might be a good idea to support it ; > > currently the syntax is similar but > > not standardized. > > > > Thanks, > > > > -- > > Cl?ment > > > > Le mercredi 10 mai 2017 ? 15:01 +0200, Pierre Vuillemin a ?crit : > > > Thanks for the answers and the hints, I have finally managed to do > > > what I wanted using xmltojar > > > and add_help_chapter. > > > > > > The xml file generated with help_from_sci seems to have some quirk, is > > > there a reference page > > > concerning the xml that should be produced? The main reference I have > > > found is this page but I > > > don't know if it is still up to date. > > > > > > Besides, I am thinking about extending the features of the routine so > > > that is supports some > > > flavour of markdown (or similar stuff like Matlab's publishing > > > features). > > > Has there already been some reflection in that direction? > > > > > > Regards, > > > > > > Pierre > > > > > > Le 10.05.2017 12:33, sgougeon at free.fr a ?crit : > > > > Hello, > > > > > > > > > De: "Cl?ment David" > > > > > > > > > > Hello Pierre, > > > > > > > > > > Currently the easiest way is to put the resulting xml file as an exemple of an empty > > > > > toolbox > > > > > and > > > > > build/load this toolbox to check for the rendering. > > > > > > > > > > HTML files can also be used as an easy content to check using a standard web browser (eg. > > > > > without > > > > > loading the toolbox). See xmltoweb() to generate it. > > > > > > > > > > AFAIK Samuel usually commit updated help files using the pdf format produced by > > > > > xmltopdf(). As > > > > > this > > > > > PDF backend is not the main one, I tend to prefer the HTML ones but PDF might be a good > > > > > alternative. > > > > > > > > > > > > AFAIRemember, xmltopdf() has some issue, so i use now PDF Creator > > > > applied the HTML. > > > > To illustrate the whole page setting and rendering, PDF does not need > > > > to be zipped, > > > > whereas HTML needs it to include css dependencies etc. > > > > > > > > Anyway, the rendering of the HTML (zipped in the .jar) through the > > > > Scilab helpbrowser > > > > is limited wrt the true HTML as it appears in web browsers: Many > > > > attributes or style > > > > values are well built but are not rendered... But this is another thread. > > > > > > > > Regards > > > > Samuel > > > > > > > > > > > > _______________________________________________ > > > > dev mailing list > > > > dev at lists.scilab.org > > > > http://lists.scilab.org/mailman/listinfo/dev > > > > > > _______________________________________________ > > > dev mailing list > > > dev at lists.scilab.org > > > http://lists.scilab.org/mailman/listinfo/dev > > > > _______________________________________________ > > dev mailing list > > dev at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/dev From contact at pierre-vuillemin.fr Wed Aug 23 16:55:41 2017 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Wed, 23 Aug 2017 16:55:41 +0200 Subject: [Scilab-Dev] Trying to update help_from_sci In-Reply-To: <1503490981.20757.33.camel@esi-group.com> References: <1682080502.3871446.1494412418793.JavaMail.root@zimbra75-e12.priv.proxad.net> <1494487368.6500.22.camel@esi-group.com> <5d86d3c459e4c6018d152825df80f9f4@pierre-vuillemin.fr> <1503490981.20757.33.camel@esi-group.com> Message-ID: <5ee197e72123fdd1332dab442bff3ab7@pierre-vuillemin.fr> It turns out restarting Scilab solved the problem, so it's fine now. I'll share the routine once the example section is handled. Thank you for the hints, I'll be careful with the xml tags I use. Best regards, Pierre Le 23.08.2017 14:23, Cl?ment David a ?crit?: > Hello Pierre, > > Thanks for the preview, it sounds really good to me. > >> The issue I am facing is that while the .html file obtained after >> using >> xmltojar is displayed correctly in Firefox, it is not the case in the >> help browser of Scilab where the description section does not appear. >> Do you have some idea about that? > > The help browser is using the Java provided HTML4 renderer [1] which > may not support some of the > generated attributes (whereas Firefox supports more modern HTML). It > is a bit specific as the > Docbook to HTML (for javahelp) will pass through some attributes which > might or might not be > rendered. > > Do not hesitate to post your buggy files / examples, > > [1]: > https://docs.oracle.com/javase/8/docs/api/javax/swing/text/html/HTMLDocument.html > > Thanks, > > -- > Cl?ment > > Le mercredi 23 ao?t 2017 ? 09:54 +0200, Pierre Vuillemin a ?crit : >> Hello all, >> >> Some times ago, I started working on an updated (a little bit more >> flexible) version of the routine help_from_sci. >> >> At this point, it can generate .xml file(s) from formatted head >> comments >> (either line comments or block-comments) and a minimal markdown >> support >> is working for the section Description (and user-defined section). >> For instance see the files attached that shows the source comments >> (src.png) and the resulting output doc (doc.png) obtained after using >> xmltojar on the file slr_comments_to_xml.xml. >> >> (Note that the sections that are empty in the source file are not >> rendered in the .xml file) >> >> Some things are still not implemented but it should not be that >> difficult: paragraph, parsing of the example section, latex equations. >> >> The issue I am facing is that while the .html file obtained after >> using >> xmltojar is displayed correctly in Firefox, it is not the case in the >> help browser of Scilab where the description section does not appear. >> Do you have some idea about that? >> >> Best regards, >> >> Pierre >> >> >> Le 11.05.2017 09:22, Cl?ment David a ?crit : >> > Hello Pierre, >> > >> > Great news ! The help_from_sci() feature is currently really useful >> > for new comers and improving it >> > might be a good idea. >> > >> > The XML syntax used is a subset of Docbook 5 ; the man help page >> > contains some information but I >> > usually use the main Docbook documentation. >> > >> > About Markdown support, it might be a good idea to support it ; >> > currently the syntax is similar but >> > not standardized. >> > >> > Thanks, >> > >> > -- >> > Cl?ment >> > >> > Le mercredi 10 mai 2017 ? 15:01 +0200, Pierre Vuillemin a ?crit : >> > > Thanks for the answers and the hints, I have finally managed to do >> > > what I wanted using xmltojar >> > > and add_help_chapter. >> > > >> > > The xml file generated with help_from_sci seems to have some quirk, is >> > > there a reference page >> > > concerning the xml that should be produced? The main reference I have >> > > found is this page but I >> > > don't know if it is still up to date. >> > > >> > > Besides, I am thinking about extending the features of the routine so >> > > that is supports some >> > > flavour of markdown (or similar stuff like Matlab's publishing >> > > features). >> > > Has there already been some reflection in that direction? >> > > >> > > Regards, >> > > >> > > Pierre >> > > >> > > Le 10.05.2017 12:33, sgougeon at free.fr a ?crit : >> > > > Hello, >> > > > >> > > > > De: "Cl?ment David" >> > > > > >> > > > > Hello Pierre, >> > > > > >> > > > > Currently the easiest way is to put the resulting xml file as an exemple of an empty >> > > > > toolbox >> > > > > and >> > > > > build/load this toolbox to check for the rendering. >> > > > > >> > > > > HTML files can also be used as an easy content to check using a standard web browser (eg. >> > > > > without >> > > > > loading the toolbox). See xmltoweb() to generate it. >> > > > > >> > > > > AFAIK Samuel usually commit updated help files using the pdf format produced by >> > > > > xmltopdf(). As >> > > > > this >> > > > > PDF backend is not the main one, I tend to prefer the HTML ones but PDF might be a good >> > > > > alternative. >> > > > >> > > > >> > > > AFAIRemember, xmltopdf() has some issue, so i use now PDF Creator >> > > > applied the HTML. >> > > > To illustrate the whole page setting and rendering, PDF does not need >> > > > to be zipped, >> > > > whereas HTML needs it to include css dependencies etc. >> > > > >> > > > Anyway, the rendering of the HTML (zipped in the .jar) through the >> > > > Scilab helpbrowser >> > > > is limited wrt the true HTML as it appears in web browsers: Many >> > > > attributes or style >> > > > values are well built but are not rendered... But this is another thread. >> > > > >> > > > Regards >> > > > Samuel >> > > > >> > > > >> > > > _______________________________________________ >> > > > dev mailing list >> > > > dev at lists.scilab.org >> > > > http://lists.scilab.org/mailman/listinfo/dev >> > > >> > > _______________________________________________ >> > > dev mailing list >> > > dev at lists.scilab.org >> > > http://lists.scilab.org/mailman/listinfo/dev >> > >> > _______________________________________________ >> > dev mailing list >> > dev at lists.scilab.org >> > http://lists.scilab.org/mailman/listinfo/dev From Clement.David at esi-group.com Wed Aug 30 11:09:07 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Wed, 30 Aug 2017 09:09:07 +0000 Subject: [Scilab-Dev] Server migration lists.scilab.org Message-ID: <1504084145.24307.13.camel@esi-group.com> Dear users, The mailing list server will be migrated to our new ESI-backed infrastructure. The lists will be down for 24 to 48 hours ; we will do our best to minimize the down time. Sorry for the inconvenience, -- Cl?ment