From stephane.mottelet at utc.fr Thu Mar 1 20:09:31 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 1 Mar 2018 20:09:31 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... Message-ID: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> Hello, I have tried to implement a (na?ve) hijacking mechanism that works *like a charm* under scilab 5.5.2: newfun('scilab_set',funptr('set')); clearfun('set'); function set(varargin) ??? scilab_set(varargin(:)) ??? printf("...\n") endfunction // test the hijacked "set" f=gcf() set(f,"tag","1") f.tag="2" When I test this under? 6.0.0 or 6.0.1, the last line always crashes Scilab. Is there an evident reason why ? When trying this on the command line (scilab -nw) > --> set(f,"tag","1") > ... > > --> f.tag="2" > ... > /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line 972: > 27117 Illegal instruction: 4? "$SCILABBIN" "$@" I can see that the problem occurs *after* the insertion code f.tag="2" has delegated the operation to the hijacked "set", hence the crash occurs in the built-in function which does the insertion. In order to understand why this crash occurs (under Linux or OSX), I would like to know which module is in charge of the insertion for handles (a kind of %h_i but built-in) ? Thanks in advance S. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From sgougeon at free.fr Thu Mar 1 20:18:56 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 1 Mar 2018 20:18:56 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> Message-ID: <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : > Hello, > > I have tried to implement a (na?ve) hijacking mechanism that works > *like a charm* under scilab 5.5.2: > > newfun('scilab_set',funptr('set')); > clearfun('set'); > function set(varargin) > scilab_set(varargin(:)) > printf("...\n") > endfunction > // test the hijacked "set" > f=gcf() > set(f,"tag","1") > f.tag="2" > > When I test this under 6.0.0 or 6.0.1, the last line always crashes > Scilab. Is there an evident reason why ? When trying this on the > command line (scilab -nw) > >> --> set(f,"tag","1") >> ... >> >> --> f.tag="2" >> ... >> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line 972: >> 27117 Illegal instruction: 4 "$SCILABBIN" "$@" > > I can see that the problem occurs *after* the insertion code f.tag="2" > has delegated the operation to the hijacked "set", hence the crash > occurs in the built-in function which does the insertion. In order to > understand why this crash occurs (under Linux or OSX), I would like to > know which module is in charge of the insertion for handles (a kind of > %h_i but built-in) ? You may have a look at SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp and SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* Samuel From stephane.mottelet at utc.fr Thu Mar 1 21:57:25 2018 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Thu, 1 Mar 2018 21:57:25 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> Message-ID: <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> Hello, > Le 1 mars 2018 ? 20:18, Samuel Gougeon a ?crit : > >> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >> Hello, >> >> I have tried to implement a (na?ve) hijacking mechanism that works *like a charm* under scilab 5.5.2: >> >> newfun('scilab_set',funptr('set')); >> clearfun('set'); >> function set(varargin) >> scilab_set(varargin(:)) >> printf("...\n") >> endfunction >> // test the hijacked "set" >> f=gcf() >> set(f,"tag","1") >> f.tag="2" >> >> When I test this under 6.0.0 or 6.0.1, the last line always crashes Scilab. Is there an evident reason why ? When trying this on the command line (scilab -nw) >> >>> --> set(f,"tag","1") >>> ... >>> >>> --> f.tag="2" >>> ... >>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line 972: 27117 Illegal instruction: 4 "$SCILABBIN" "$@" >> >> I can see that the problem occurs *after* the insertion code f.tag="2" has delegated the operation to the hijacked "set", hence the crash occurs in the built-in function which does the insertion. In order to understand why this crash occurs (under Linux or OSX), I would like to know which module is in charge of the insertion for handles (a kind of %h_i but built-in) ? > > You may have a look at > SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp > and > SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* Hmm, the crash occurs *after* the property has been set. So my question was rather about the generic code that handles field insertion, which is delegated to ?set? for handles. S. > > Samuel > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From stephane.mottelet at utc.fr Thu Mar 1 23:26:35 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Thu, 1 Mar 2018 23:26:35 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> Message-ID: Le 01/03/2018 ? 21:57, St?phane Mottelet a ?crit?: > Hello, > >> Le 1 mars 2018 ? 20:18, Samuel Gougeon a ?crit : >> >>> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >>> Hello, >>> >>> I have tried to implement a (na?ve) hijacking mechanism that works *like a charm* under scilab 5.5.2: >>> >>> newfun('scilab_set',funptr('set')); >>> clearfun('set'); >>> function set(varargin) >>> scilab_set(varargin(:)) >>> printf("...\n") >>> endfunction >>> // test the hijacked "set" >>> f=gcf() >>> set(f,"tag","1") >>> f.tag="2" >>> >>> When I test this under 6.0.0 or 6.0.1, the last line always crashes Scilab. Is there an evident reason why ? When trying this on the command line (scilab -nw) >>> >>>> --> set(f,"tag","1") >>>> ... >>>> >>>> --> f.tag="2" >>>> ... >>>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line 972: 27117 Illegal instruction: 4 "$SCILABBIN" "$@" >>> I can see that the problem occurs *after* the insertion code f.tag="2" has delegated the operation to the hijacked "set", hence the crash occurs in the built-in function which does the insertion. In order to understand why this crash occurs (under Linux or OSX), I would like to know which module is in charge of the insertion for handles (a kind of %h_i but built-in) ? >> You may have a look at >> SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp >> and >> SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* > Hmm, the crash occurs *after* the property has been set. So my question was rather about the generic code that handles field insertion, which is delegated to ?set? for handles. > > S. > I have localized many methods for handle type in modules/ast/src/cpp/types/graphichandle.cpp. Although I don't know much of C++, I can see that GraphicHandle::invoke is delegated to the overloaded %h_e macro, hence is an extraction method, but I am not able to find any *insertion* method in this file. Maybe someone knows ? S. From sgougeon at free.fr Thu Mar 1 23:44:51 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 1 Mar 2018 23:44:51 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> Message-ID: Le 01/03/2018 ? 23:26, St?phane Mottelet a ?crit : > Le 01/03/2018 ? 21:57, St?phane Mottelet a ?crit : >> Hello, >> >>> Le 1 mars 2018 ? 20:18, Samuel Gougeon a ?crit : >>> >>>> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >>>> Hello, >>>> >>>> I have tried to implement a (na?ve) hijacking mechanism that works >>>> *like a charm* under scilab 5.5.2: >>>> >>>> newfun('scilab_set',funptr('set')); >>>> clearfun('set'); >>>> function set(varargin) >>>> scilab_set(varargin(:)) >>>> printf("...\n") >>>> endfunction >>>> // test the hijacked "set" >>>> f=gcf() >>>> set(f,"tag","1") >>>> f.tag="2" >>>> >>>> When I test this under 6.0.0 or 6.0.1, the last line always >>>> crashes Scilab. Is there an evident reason why ? When trying this >>>> on the command line (scilab -nw) >>>> >>>>> --> set(f,"tag","1") >>>>> ... >>>>> >>>>> --> f.tag="2" >>>>> ... >>>>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line >>>>> 972: 27117 Illegal instruction: 4 "$SCILABBIN" "$@" >>>> I can see that the problem occurs *after* the insertion code >>>> f.tag="2" has delegated the operation to the hijacked "set", hence >>>> the crash occurs in the built-in function which does the insertion. >>>> In order to understand why this crash occurs (under Linux or OSX), >>>> I would like to know which module is in charge of the insertion for >>>> handles (a kind of %h_i but built-in) ? >>> You may have a look at >>> SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp >>> and >>> SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* >>> >> Hmm, the crash occurs *after* the property has been set. So my >> question was rather about the generic code that handles field >> insertion, which is delegated to ?set? for handles. >> >> S. >> > > I have localized many methods for handle type in > modules/ast/src/cpp/types/graphichandle.cpp. Although I don't know > much of C++, I can see that GraphicHandle::invoke is delegated to the > overloaded %h_e macro, hence is an extraction method, but I am not > able to find any *insertion* method in this file. Maybe someone knows ? Maybe edit generic_i_h From stephane.mottelet at utc.fr Fri Mar 2 13:00:00 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 2 Mar 2018 13:00:00 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> Message-ID: <9346748e-5d1f-4b6f-8b4c-e1054ece8eb4@utc.fr> Le 01/03/2018 ? 23:44, Samuel Gougeon a ?crit?: > Le 01/03/2018 ? 23:26, St?phane Mottelet a ?crit : >> Le 01/03/2018 ? 21:57, St?phane Mottelet a ?crit : >>> Hello, >>> >>>> Le 1 mars 2018 ? 20:18, Samuel Gougeon a ?crit : >>>> >>>>> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >>>>> Hello, >>>>> >>>>> I have tried to implement a (na?ve) hijacking mechanism that works >>>>> *like a charm* under scilab 5.5.2: >>>>> >>>>> newfun('scilab_set',funptr('set')); >>>>> clearfun('set'); >>>>> function set(varargin) >>>>> ??? scilab_set(varargin(:)) >>>>> ??? printf("...\n") >>>>> endfunction >>>>> // test the hijacked "set" >>>>> f=gcf() >>>>> set(f,"tag","1") >>>>> f.tag="2" >>>>> >>>>> When I test this under? 6.0.0 or 6.0.1, the last line always >>>>> crashes Scilab. Is there an evident reason why ? When trying this >>>>> on the command line (scilab -nw) >>>>> >>>>>> --> set(f,"tag","1") >>>>>> ... >>>>>> >>>>>> --> f.tag="2" >>>>>> ... >>>>>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line >>>>>> 972: 27117 Illegal instruction: 4? "$SCILABBIN" "$@" >>>>> I can see that the problem occurs *after* the insertion code >>>>> f.tag="2" has delegated the operation to the hijacked "set", hence >>>>> the crash occurs in the built-in function which does the >>>>> insertion. In order to understand why this crash occurs (under >>>>> Linux or OSX), I would like to know which module is in charge of >>>>> the insertion for handles (a kind of %h_i but built-in) ? >>>> You may have a look at >>>> SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp >>>> and >>>> SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* >>>> >>> Hmm, the crash occurs *after* the property has been set. So my >>> question was rather about the generic code that handles field >>> insertion, which is delegated to ?set? for handles. >>> >>> S. >>> >> >> I have localized many methods for handle type in >> modules/ast/src/cpp/types/graphichandle.cpp. Although I don't know >> much of C++, I can see that GraphicHandle::invoke is delegated to the >> overloaded %h_e macro, hence is an extraction method, but I am not >> able to find any *insertion* method in this file. Maybe someone knows ? > > Maybe > edit generic_i_h I found it in modules/ast/src/cpp/ast/visitor_common.cpp When you don't have any idea of where to look, sometimes a "grep theStringToFind -r ." is useful : 2241 ????????else?if?(_pVar->isHandle()) 2242 ????????{ 2243 ????????????if?(_pArgs->size()?==?1?&&?(*_pArgs)[0]->isString()) 2244 ????????????{ 2245 ????????????????//s(["x"]) 2246 ????????????????types::GraphicHandle*?pH?=?_pVar->getAs(); 2247 ????????????????types::String?*pS?=?(*_pArgs)[0]->getAs(); 2248 ????????????????types::typed_list?in; 2249 ????????????????types::typed_list?out; 2250 ????????????????types::optional_list?opt; 2251 2252 ????????????????in.push_back(pH); 2253 ????????????????in.push_back(pS); 2254 ????????????????in.push_back(_pInsert); 2255 2256 ????????????????types::Function*?pCall?=?(types::Function*)symbol::Context::getInstance()->get(symbol::Symbol(L"set")); 2257 ????????????????if?(pCall) 2258 ????????????????{ 2259 ????????????????????types::Callable::ReturnValue?ret?=?pCall->call(in,?opt,?1,?out); 2260 ????????????????????if?(ret?==?types::Callable::OK) 2261 ????????????????????{ 2262 ????????????????????????pRet?=?_pVar; 2263 ????????????????????} 2264 ????????????????????else 2265 ????????????????????{ 2266 ????????????????????????throw?ast::InternalError(ConfigVariable::getLastErrorMessage(),?ConfigVariable::getLastErrorNumber(),?e.getLocation()); 2267 ????????????????????} 2268 ????????????????} 2269 ????????????} 2270 ????????????else 2271 ????????????{ 2272 ????????????????pRet?=?_pVar->getAs()->insert(_pArgs,?_pInsert); 2273 ????????????} 2274 ????????} here one can see the delegation to "set" at line 2256...2259. However, the internal overload mechanism is still very obscure to me. Now that I can build scilab_master on my Linux machine, I have played a little bit and replaced lines 2246..2268 by the sole lines pRet?=?callOverload(e,?L"i",?_pArgs,?_pInsert,?_pVar); sciprint("after callOverload\n") then recompiled the ast module. The result is a scilab with a fully working graphics, e.g. typing "plot" without arguments works as usual and triggers a lot of handle insertions (a bunch of "after callOverload" are printed). However, there is no %h_i macro, so I don't understand by which miracle it could work. Antoine it think that you are the author of this file (/ast/src/cpp/ast/visitor_common.cpp) can you explain how it works ? Thanks in advance, S. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Mar 2 15:44:05 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 2 Mar 2018 15:44:05 +0100 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: <9346748e-5d1f-4b6f-8b4c-e1054ece8eb4@utc.fr> References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> <9346748e-5d1f-4b6f-8b4c-e1054ece8eb4@utc.fr> Message-ID: Le 02/03/2018 ? 13:00, St?phane Mottelet a ?crit?: > Le 01/03/2018 ? 23:44, Samuel Gougeon a ?crit?: >> Le 01/03/2018 ? 23:26, St?phane Mottelet a ?crit : >>> Le 01/03/2018 ? 21:57, St?phane Mottelet a ?crit : >>>> Hello, >>>> >>>>> Le 1 mars 2018 ? 20:18, Samuel Gougeon a ?crit : >>>>> >>>>>> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >>>>>> Hello, >>>>>> >>>>>> I have tried to implement a (na?ve) hijacking mechanism that >>>>>> works *like a charm* under scilab 5.5.2: >>>>>> >>>>>> newfun('scilab_set',funptr('set')); >>>>>> clearfun('set'); >>>>>> function set(varargin) >>>>>> ??? scilab_set(varargin(:)) >>>>>> ??? printf("...\n") >>>>>> endfunction >>>>>> // test the hijacked "set" >>>>>> f=gcf() >>>>>> set(f,"tag","1") >>>>>> f.tag="2" >>>>>> >>>>>> When I test this under? 6.0.0 or 6.0.1, the last line always >>>>>> crashes Scilab. Is there an evident reason why ? When trying this >>>>>> on the command line (scilab -nw) >>>>>> >>>>>>> --> set(f,"tag","1") >>>>>>> ... >>>>>>> >>>>>>> --> f.tag="2" >>>>>>> ... >>>>>>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line >>>>>>> 972: 27117 Illegal instruction: 4? "$SCILABBIN" "$@" >>>>>> I can see that the problem occurs *after* the insertion code >>>>>> f.tag="2" has delegated the operation to the hijacked "set", >>>>>> hence the crash occurs in the built-in function which does the >>>>>> insertion. In order to understand why this crash occurs (under >>>>>> Linux or OSX), I would like to know which module is in charge of >>>>>> the insertion for handles (a kind of %h_i but built-in) ? >>>>> You may have a look at >>>>> SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp >>>>> and >>>>> SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* >>>>> >>>> Hmm, the crash occurs *after* the property has been set. So my >>>> question was rather about the generic code that handles field >>>> insertion, which is delegated to ?set? for handles. >>>> >>>> S. >>>> >>> >>> I have localized many methods for handle type in >>> modules/ast/src/cpp/types/graphichandle.cpp. Although I don't know >>> much of C++, I can see that GraphicHandle::invoke is delegated to >>> the overloaded %h_e macro, hence is an extraction method, but I am >>> not able to find any *insertion* method in this file. Maybe someone >>> knows ? >> >> Maybe >> edit generic_i_h > I found it in modules/ast/src/cpp/ast/visitor_common.cpp > > When you don't have any idea of where to look, sometimes a "grep > theStringToFind -r ." is useful : > > 2241 > > ????????else?if?(_pVar->isHandle()) > 2242 > > ????????{ > 2243 > > ????????????if?(_pArgs->size()?==?1?&&?(*_pArgs)[0]->isString()) > 2244 > > ????????????{ > 2245 > > ????????????????//s(["x"]) > 2246 > > ????????????????types::GraphicHandle*?pH?=?_pVar->getAs(); > 2247 > > ????????????????types::String?*pS?=?(*_pArgs)[0]->getAs(); > 2248 > > ????????????????types::typed_list?in; > 2249 > > ????????????????types::typed_list?out; > 2250 > > ????????????????types::optional_list?opt; > 2251 > > > 2252 > > ????????????????in.push_back(pH); > 2253 > > ????????????????in.push_back(pS); > 2254 > > ????????????????in.push_back(_pInsert); > 2255 > > > 2256 > > ????????????????types::Function*?pCall?=?(types::Function*)symbol::Context::getInstance()->get(symbol::Symbol(L"set")); > 2257 > > ????????????????if?(pCall) > 2258 > > ????????????????{ > 2259 > > ????????????????????types::Callable::ReturnValue?ret?=?pCall->call(in,?opt,?1,?out); > 2260 > > ????????????????????if?(ret?==?types::Callable::OK) > 2261 > > ????????????????????{ > 2262 > > ????????????????????????pRet?=?_pVar; > 2263 > > ????????????????????} > 2264 > > ????????????????????else > 2265 > > ????????????????????{ > 2266 > > ????????????????????????throw?ast::InternalError(ConfigVariable::getLastErrorMessage(),?ConfigVariable::getLastErrorNumber(),?e.getLocation()); > 2267 > > ????????????????????} > 2268 > > ????????????????} > 2269 > > ????????????} > 2270 > > ????????????else > 2271 > > ????????????{ > 2272 > > ????????????????pRet?=?_pVar->getAs()->insert(_pArgs,?_pInsert); > 2273 > > ????????????} > 2274 > > ????????} > > here one can see the delegation to "set" at line 2256...2259. However, > the internal overload mechanism is still very obscure to me. Now that > I can build scilab_master on my Linux machine, I have played a little > bit and replaced lines 2246..2268 by the sole lines > > pRet?=?callOverload(e,?L"i",?_pArgs,?_pInsert,?_pVar); sciprint("after > callOverload\n") > > then recompiled the ast module. The result is a scilab with a fully > working graphics, e.g. typing "plot" without arguments works as usual > and triggers a lot of handle insertions (a bunch of "after > callOverload" are printed). However, there is no %h_i macro, so I > don't understand by which miracle it could work. > > Antoine it think that you are the author of this file > (/ast/src/cpp/ast/visitor_common.cpp) can you explain how it works ? > > Thanks in advance, > > S. > Ok, no miracle... in fact, if the callOverload is forced as explained above, then generic_i_h is called (thanks Samuel for your hint), and generic_i_h itself calls "set". So this is almost equivalent, besides the fact that "set" is called from a Scilab macro and not from visitor_common.cpp above. With this solution the hijacking I had proposed does not crash anymore. But after all these complications, I guess that there may be a more straightforward way of implementing new handle properties at the user level... S. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Fri Mar 2 16:59:09 2018 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Fri, 02 Mar 2018 15:59:09 +0000 Subject: [Scilab-Dev] Hijacking built-in "set" almost works... In-Reply-To: References: <0d427efa-a35f-e43d-7ef5-39608aa58f37@utc.fr> <1703aefb-8a6f-db88-00f8-094d4cd159a7@free.fr> <4FC21DF9-40BF-42E6-974F-D3CC2D0A2171@utc.fr> <9346748e-5d1f-4b6f-8b4c-e1054ece8eb4@utc.fr> Message-ID: <20180302155909.Horde.r5FjZ7e8Fp0gK71kTdBYbCP@webmail.utc.fr> Quoting St?phane Mottelet : > Le 02/03/2018 ? 13:00, St?phane Mottelet a ?crit?: > >> Le 01/03/2018 ? 23:44, Samuel Gougeon a ?crit?: >> >>> Le 01/03/2018 ? 23:26, St?phane Mottelet a ?crit : >>> >>>> Le 01/03/2018 ? 21:57, St?phane Mottelet a ?crit : >>>> >>>>> Hello, >>>>> >>>>>> Le 1 mars 2018 ? 20:18, Samuel Gougeon [1] a ?crit : >>>>>> >>>>>>> Le 01/03/2018 ? 20:09, St?phane Mottelet a ?crit : >>>>>>> Hello, >>>>>>> >>>>>>> I have tried to implement a (na?ve) hijacking mechanism that >>>>>>> works *like a charm* under scilab 5.5.2: >>>>>>> >>>>>>> newfun('scilab_set',funptr('set')); >>>>>>> clearfun('set'); >>>>>>> function set(varargin) >>>>>>> ??? scilab_set(varargin(:)) >>>>>>> ??? printf("...\n") >>>>>>> endfunction >>>>>>> // test the hijacked "set" >>>>>>> f=gcf() >>>>>>> set(f,"tag","1") >>>>>>> f.tag="2" >>>>>>> >>>>>>> When I test this under? 6.0.0 or 6.0.1, the last line always >>>>>>> crashes Scilab. Is there an evident reason why ? When trying >>>>>>> this on the command line (scilab -nw) >>>>>>> >>>>>>>> --> set(f,"tag","1") >>>>>>>> ... >>>>>>>> >>>>>>>> --> f.tag="2" >>>>>>>> ... >>>>>>>> /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: >>>>>>>> line 972: 27117 Illegal instruction: 4? "$SCILABBIN" "$@" >>>>>>> >>>>>>> I can see that the problem occurs *after* the insertion code >>>>>>> f.tag="2" has delegated the operation to the hijacked "set", >>>>>>> hence the crash occurs in the built-in function which does the >>>>>>> insertion. In order to understand why this crash occurs (under >>>>>>> Linux or OSX), I would like to know which module is in charge >>>>>>> of the insertion for handles (a kind of %h_i but built-in) ? >>>>>> >>>>>> You may have a look at >>>>>> SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp >>>>>> and >>>>>> SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\* >>>>> >>>>> Hmm, the crash occurs *after* the property has been set. So my >>>>> question was rather about the generic code that handles field >>>>> insertion, which is delegated to ?set? for handles. >>>>> >>>>> S. >>>>> ? >>>> >>>> I have localized many methods for handle type in >>>> modules/ast/src/cpp/types/graphichandle.cpp. Although I don't >>>> know much of C++, I can see that GraphicHandle::invoke is >>>> delegated to the overloaded %h_e macro, hence is an extraction >>>> method, but I am not able to find any *insertion* method in this >>>> file. Maybe someone knows ? >>> >>> Maybe >>> edit generic_i_h >> >> I found it in modules/ast/src/cpp/ast/visitor_common.cpp >> >> When you don't have any idea of where to look, sometimes a "grep >> theStringToFind -r ." is useful : >> >> 2241[2] ????????else?if?(_pVar->isHandle()) >> 2242[3] ????????{ >> 2243[4] ????????????if?(_pArgs->size()?==?1?&&?(*_pArgs)[0]->isString()) >> 2244[5] ????????????{ >> 2245[6] ????????????????//s(["x"]) >> 2246[7] >> ????????????????types::GraphicHandle*?pH?=?_pVar->getAs(); >> 2247[8] >> ????????????????types::String?*pS?=?(*_pArgs)[0]->getAs(); >> 2248[9] ????????????????types::typed_list?in; >> 2249[10] ????????????????types::typed_list?out; >> 2250[11] ????????????????types::optional_list?opt; >> 2251[12] >> 2252[13] ????????????????in.push_back(pH); >> 2253[14] ????????????????in.push_back(pS); >> 2254[15] ????????????????in.push_back(_pInsert); >> 2255[16] >> 2256[17] >> ????????????????types::Function*?pCall?=?(types::Function*)symbol::Context::getInstance()->get(symbol::Symbol(L"set")); >> 2257[18] ????????????????if?(pCall) >> 2258[19] ????????????????{ >> 2259[20] >> ????????????????????types::Callable::ReturnValue?ret?=?pCall->call(in,?opt,?1,?out); >> 2260[21] ????????????????????if?(ret?==?types::Callable::OK) >> 2261[22] ????????????????????{ >> 2262[23] ????????????????????????pRet?=?_pVar; >> 2263[24] ????????????????????} >> 2264[25] ????????????????????else >> 2265[26] ????????????????????{ >> 2266[27] >> ????????????????????????throw?ast::InternalError(ConfigVariable::getLastErrorMessage(),?ConfigVariable::getLastErrorNumber(),?e.getLocation()); >> 2267[28] ????????????????????} >> 2268[29] ????????????????} >> 2269[30] ????????????} >> 2270[31] ????????????else >> 2271[32] ????????????{ >> 2272[33] >> ????????????????pRet?=?_pVar->getAs()->insert(_pArgs,?_pInsert); >> 2273[34] ????????????} >> 2274[35] ????????} >> >> here one can see the delegation to "set" at line 2256...2259. >> However, the internal overload mechanism is still very obscure to >> me. Now that I can build scilab_master on my Linux machine, I have >> played a little bit and replaced lines 2246..2268 by the sole lines >> >> pRet?=?callOverload(e,?L"i",?_pArgs,?_pInsert,?_pVar); >> sciprint("after callOverload\n") >> then recompiled the ast module. The result is a scilab with a >> fully working graphics, e.g. typing "plot" without arguments works >> as usual and triggers a lot of handle insertions (a bunch of "after >> callOverload" are printed). However, there is no %h_i macro, so I >> don't understand by which miracle it could work. >> >> Antoine it think that you are the author of this file >> (/ast/src/cpp/ast/visitor_common.cpp) can you explain how it works ? >> >> Thanks in advance, >> >> S. > > Ok, no miracle... in fact, if the callOverload is forced as > explained above, then generic_i_h is called (thanks Samuel for your > hint), and generic_i_h itself calls "set". So this is almost > equivalent, besides the fact that "set" is called from a Scilab > macro and not from visitor_common.cpp above. With this solution the > hijacking I had proposed does not crash anymore. > > But after all these complications, I guess that there may be a more > straightforward way of implementing new handle properties at the > user level... To finish on this subject and maybe feed the conversation on this subject, here is the final set/get hijacking code and and a simple example of what if allows to do: e.g. here we add a 'xlim' property to the Axes entity. At the user level it is enough to write the two functions? %Axes_set_xlim_property and %Axes_get_xlim_property(varargin). Of course, this works only if the "set" hijacking does not crash scilab, which needs the hack into modules/ast/src/cpp/ast/visitor_common.cpp describe above. S. newfun('scilab_set',funptr('set')); clearfun('set'); newfun('scilab_get',funptr('get')); clearfun('get'); function set(varargin) ??? try ??????? if length(varargin)==3????????? ? ??????????? execstr('%'+sprintf('%s_set_%s_property(varargin(:))',... ??????????? scilab_get(varargin(1),'type'),varargin(2))) ??????? end ??? catch ??????? scilab_set(varargin(:)) ??? end end function out=get(varargin) ??? try ??????? if length(varargin)==2?? ? ??????????? out=evstr('%'+sprintf('%s_get_%s_property(varargin(:))',... ??????????? scilab_get(varargin(1),'type'),varargin(2)); ??????? else ??????????? out=scilab_get(varargin(:)) ??????? end ??? catch ??????? out=scilab_get(varargin(:)) ??? end end FUNCTION %AXES_SET_XLIM_PROPERTY(VARARGIN) ??? VARARGIN(1).DATA_BOUNDS(1:2)=VARARGIN(3)(:); END FUNCTION OUT=%AXES_GET_XLIM_PROPERTY(VARARGIN) ??? OUT=VARARGIN(1).DATA_BOUNDS(1:2); END CLF PLOT A=GCF().CHILDREN A(2).XLIM=[2 4]; DISP(A(1).XLIM) Links: ------ [1] mailto:sgougeon at free.fr [2] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2241 [3] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2242 [4] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2243 [5] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2244 [6] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2245 [7] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2246 [8] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2247 [9] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2248 [10] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2249 [11] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2250 [12] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2251 [13] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2252 [14] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2253 [15] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2254 [16] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2255 [17] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2256 [18] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2257 [19] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2258 [20] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2259 [21] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2260 [22] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2261 [23] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2262 [24] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2263 [25] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2264 [26] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2265 [27] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2266 [28] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2267 [29] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2268 [30] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2269 [31] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2270 [32] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2271 [33] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2272 [34] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2273 [35] http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2274 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Mar 3 17:50:51 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 3 Mar 2018 17:50:51 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? Message-ID: Hello, Is there any way from the CodeReview Gerrit interface, for a given review, to download the set of files of a given patch set? I am aware about downloading each file when we edit it or see its diff. Also about downloading the patch file from the Download area. But from the same area, the Archive links look to download the whole Scilab... not only the files of the set. At least, the download is extremely long... So i interrupt it. Am i missing anything? Is that possible? Thanks for any hint. Samuel From antoine.elias at scilab-enterprises.com Sat Mar 3 23:31:00 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Sat, 3 Mar 2018 23:31:00 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: References: Message-ID: No I don't find this option too. What is the goal behind ? ( to find another way if it is possible ) Antoine Le 03/03/2018 ? 17:50, Samuel Gougeon a ?crit?: > Hello, > > Is there any way from the CodeReview Gerrit interface, for a given > review, > to download the set of files of a given patch set? > > I am aware about downloading each file when we edit it or see its diff. > Also about downloading the patch file from the Download area. > But from the same area, the Archive links look to download the whole > Scilab... > not only the files of the set. At least, the download is extremely > long... So i interrupt it. > > Am i missing anything? Is that possible? > > Thanks for any hint. > > Samuel > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From sgougeon at free.fr Sat Mar 3 23:39:46 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 3 Mar 2018 23:39:46 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: References: Message-ID: <47cffc2e-9cb8-bff4-f607-30f0940bb620@free.fr> Le 03/03/2018 ? 23:31, Antoine ELIAS a ?crit : > No I don't find this option too. > What is the goal behind ? ( to find another way if it is possible ) To easily save a copy of the files set as it is, without to have to pick up them one by one by hand in the Scilab's tree. Do you know what does contain the Archives behind their links? Samuel From antoine.elias at scilab-enterprises.com Sat Mar 3 23:41:37 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Sat, 3 Mar 2018 23:41:37 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: References: Message-ID: You can download the diff file and apply it to your local repo. git apply xxxxxxxx.diff After that you have modified files locally. (without commit, history, ...) Le 03/03/2018 ? 23:31, Antoine ELIAS a ?crit?: > No I don't find this option too. > What is the goal behind ? ( to find another way if it is possible ) > > Antoine > Le 03/03/2018 ? 17:50, Samuel Gougeon a ?crit?: >> Hello, >> >> Is there any way from the CodeReview Gerrit interface, for a given >> review, >> to download the set of files of a given patch set? >> >> I am aware about downloading each file when we edit it or see its diff. >> Also about downloading the patch file from the Download area. >> But from the same area, the Archive links look to download the whole >> Scilab... >> not only the files of the set. At least, the download is extremely >> long... So i interrupt it. >> >> Am i missing anything? Is that possible? >> >> Thanks for any hint. >> >> 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 From antoine.elias at scilab-enterprises.com Sat Mar 3 23:44:06 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Sat, 3 Mar 2018 23:44:06 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: <47cffc2e-9cb8-bff4-f607-30f0940bb620@free.fr> References: <47cffc2e-9cb8-bff4-f607-30f0940bb620@free.fr> Message-ID: Le 03/03/2018 ? 23:39, Samuel Gougeon a ?crit?: > Le 03/03/2018 ? 23:31, Antoine ELIAS a ?crit : >> No I don't find this option too. >> What is the goal behind ? ( to find another way if it is possible ) > > To easily save a copy of the files set as it is, without to have to > pick up them one by one by hand in the Scilab's tree. > > Do you know what does contain the Archives behind their links? No, but It seems to be a large archive, so I think it is the full source tree (HEAD + current commit). > > Samuel > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From sgougeon at free.fr Sat Mar 3 23:47:42 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 3 Mar 2018 23:47:42 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: References: Message-ID: <21a09b5c-f71e-d747-11f6-cc5a7b1354a4@free.fr> Le 03/03/2018 ? 23:41, Antoine ELIAS a ?crit : > You can download the diff file and apply it to your local repo. > > git apply xxxxxxxx.diff > > After that you have modified files locally. > (without commit, history, ...) But then, local files are still spread among the Scilab tree. Aren't they? From antoine.elias at scilab-enterprises.com Sat Mar 3 23:50:10 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Sat, 3 Mar 2018 23:50:10 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: <21a09b5c-f71e-d747-11f6-cc5a7b1354a4@free.fr> References: <21a09b5c-f71e-d747-11f6-cc5a7b1354a4@free.fr> Message-ID: <4109cc2f-4211-f8c6-86de-39a15617c627@scilab-enterprises.com> Le 03/03/2018 ? 23:47, Samuel Gougeon a ?crit?: > Le 03/03/2018 ? 23:41, Antoine ELIAS a ?crit : >> You can download the diff file and apply it to your local repo. >> >> git apply xxxxxxxx.diff >> >> After that you have modified files locally. >> (without commit, history, ...) > > But then, local files are still spread among the Scilab tree. > Aren't they? Yes. > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From sgougeon at free.fr Sat Mar 3 23:57:40 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 3 Mar 2018 23:57:40 +0100 Subject: [Scilab-Dev] CodeReview : How to download a files set? In-Reply-To: <4109cc2f-4211-f8c6-86de-39a15617c627@scilab-enterprises.com> References: <21a09b5c-f71e-d747-11f6-cc5a7b1354a4@free.fr> <4109cc2f-4211-f8c6-86de-39a15617c627@scilab-enterprises.com> Message-ID: <55fd561f-67f0-8981-6433-958c6880a799@free.fr> Le 03/03/2018 ? 23:50, Antoine ELIAS a ?crit : > Le 03/03/2018 ? 23:47, Samuel Gougeon a ?crit : >> Le 03/03/2018 ? 23:41, Antoine ELIAS a ?crit : >>> You can download the diff file and apply it to your local repo. >>> >>> git apply xxxxxxxx.diff >>> >>> After that you have modified files locally. >>> (without commit, history, ...) >> >> But then, local files are still spread among the Scilab tree. >> Aren't they? > Yes. Wondering about this situation, i think it is deliberate from GIT/Gerrit designers, in order to avoid this kind of "old behavior" : making copies.. And then managing them... So we just have to trust the full System and its robustness, reliability, reversibility, and eternity. So, let's just do that ;) Good night Samuel From stephane.mottelet at utc.fr Mon Mar 5 15:18:33 2018 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 5 Mar 2018 15:18:33 +0100 Subject: [Scilab-Dev] compilation of scilab-master on OSX Sierra Message-ID: <9e8c5689-7428-5ff9-5e2d-b2eb4e6f915f@utc.fr> Hello, I have the following compilation error in module io : src/cpp/loadlib.cpp: Dans la fonction ?types::Library* loadlib(const wstring&, int*, bool, bool)?: src/cpp/loadlib.cpp:41:77: erreur?: invalid conversion from ?int? to ?BOOL? [-fpermissive] ???? wchar_t* pwstXML = pathconvertW(_wstXML.data(), FALSE, FALSE, AUTO_STYLE); I use gcc5 as recommended. Is there a flag to add at configure time ? S. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From Paul.Bignier at esi-group.com Mon Mar 5 16:26:02 2018 From: Paul.Bignier at esi-group.com (Paul Bignier) Date: Mon, 5 Mar 2018 15:26:02 +0000 Subject: [Scilab-Dev] compilation of scilab-master on OSX Sierra In-Reply-To: <9e8c5689-7428-5ff9-5e2d-b2eb4e6f915f@utc.fr> References: <9e8c5689-7428-5ff9-5e2d-b2eb4e6f915f@utc.fr> Message-ID: Hello St?phane, Scilab is now compiled with native clang (in macOS, gcc points to /usr/bin/clang), can you please try with it? Regards, Paul Paul BIGNIER Development engineer ----------------------------------------------------------- ESI Group - Scilab 99 rue des Solets - 94513 Rungis, France Phone: +33.1.41.73.58.77 https://scilab.io https://esi-group.com ________________________________ From: dev on behalf of St?phane Mottelet Sent: Monday, March 5, 2018 3:18 PM To: List dedicated to development questions Subject: [Scilab-Dev] compilation of scilab-master on OSX Sierra Hello, I have the following compilation error in module io : src/cpp/loadlib.cpp: Dans la fonction ?types::Library* loadlib(const wstring&, int*, bool, bool)?: src/cpp/loadlib.cpp:41:77: erreur : invalid conversion from ?int? to ?BOOL? [-fpermissive] wchar_t* pwstXML = pathconvertW(_wstXML.data(), FALSE, FALSE, AUTO_STYLE); I use gcc5 as recommended. Is there a flag to add at configure time ? S. -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet _______________________________________________ dev mailing list dev at lists.scilab.org http://lists.scilab.org/mailman/listinfo/dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From nomiya at galaxy.dti.ne.jp Wed Mar 7 05:13:58 2018 From: nomiya at galaxy.dti.ne.jp (Masaru Nomiya) Date: Wed, 07 Mar 2018 13:13:58 +0900 Subject: [Scilab-Dev] scilab 6.0.1, make doc failed. Message-ID: <87k1uobjzt.wl-nomiya@galaxy.dti.ne.jp> Hello, I got the source file of scilab 6.0.1, then tried to build. make ended successfully, but make doc faild; [...] $ make doc usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/javadoc -noindex -nohelp -nonavbar -notree \ -d ./modules/javasci/javadoc \ -sourcepath ./modules/javasci/src/java:./modules/types/src/java::./modules/localization/src/java \ org.scilab.modules.javasci org.scilab.modules.types Picked up _JAVA_OPTIONS: -Djava.class.path=${SCI_ALL_JAR_CLASSPATHS} Error: Could not find or load main class com.sun.tools.javadoc.Main make: *** [Makefile:2173: javadoc] Error 1 Any help would be greately appreciated. Thanks. --- ????? Masaru Nomiya mail-to: nomiya @ galaxy.dti.ne.jp ???? ???? "Bill! You married with Computers. Not with Me!" "No..., with money." From siddhartha.gairola18 at gmail.com Fri Mar 9 08:08:20 2018 From: siddhartha.gairola18 at gmail.com (Siddhartha Gairola) Date: Fri, 9 Mar 2018 12:38:20 +0530 Subject: [Scilab-Dev] Reg: Continuing Work and Gsoc 2018 Message-ID: Hi all, Good day! I am Siddhartha (IRC: rocko). I have been contributing to Scilab for over 1 year now. I was a *Gsoc 2017* student with Scilab last year. I really had fun and enjoyed my time working with the team of mentors and developers at Scilab. Looking forward to continuing and extending my work. Below is my wiki/blog for my work https://wiki.scilab.org/siddhartha.gairola18%40gmail.com Below is the link to my commits on codereview - https://codereview.scilab.org/#/q/siddhartha Was taking a look at the projects this year. The following are the projects that I am interested in working on- 1. Code quality - https://wiki.scilab.org/Contributor%20-%20Code%20quality 2. Memory safety - https://wiki.scilab.org/Contributor%20-%20Memory%20safety 3. Matlab MEX-Files management - https://wiki.scilab.org/Contributor%20-%20Matlab%20MEX-Files I would be highly grateful for any inputs I could get regarding the projects . Thanking you. Regards, Siddhartha (IRC: rocko) -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Mar 13 10:32:36 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 13 Mar 2018 10:32:36 +0100 Subject: [Scilab-Dev] gitweb: which Scilab branch? Message-ID: Hello, Does http://gitweb.scilab.org/?p=scilab.git points to only the master branch, or only to the current branch (currently the 6.0 one), or to all branches gathered? I mean, if we get the history of a file from gitweb, is it its history on the master only? Thanks Regards Samuel From antoine.elias at scilab-enterprises.com Tue Mar 13 15:37:41 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Tue, 13 Mar 2018 15:37:41 +0100 Subject: [Scilab-Dev] gitweb: which Scilab branch? In-Reply-To: References: Message-ID: <32099126-7ad6-77e3-ff6f-9e9227d46eed@scilab-enterprises.com> Hello Samuel, http://gitweb.scilab.org/?p=scilab.git can show all scilab.git repository. At the bottom of the main page you can choose branch (heads section). history of chances of CHANGES.md on branch master: http://gitweb.scilab.org/?p=scilab.git;a=history;f=scilab/CHANGES.md;h=28beca7cdfbe60a38c7207a949427b160f106e14;hb=refs/heads/master history of chances of CHANGES.md on branch 6.0: http://gitweb.scilab.org/?p=scilab.git;a=history;f=scilab/CHANGES.md;h=7e58b83233c9e2268d7833bfd7af56f14db6a71f;hb=refs/heads/6.0 Regards, Antoine Le 13/03/2018 ? 10:32, Samuel Gougeon a ?crit?: > Hello, > > > Does http://gitweb.scilab.org/?p=scilab.git points to only the master > branch, or only to the current branch (currently the 6.0 one), or to > all branches gathered? > > I mean, if we get the history of a file from gitweb, is it its history > on the master only? > > Thanks > Regards > > Samuel > > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev From antoine.elias at scilab-enterprises.com Tue Mar 13 15:42:23 2018 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Tue, 13 Mar 2018 15:42:23 +0100 Subject: [Scilab-Dev] gitweb: which Scilab branch? In-Reply-To: <32099126-7ad6-77e3-ff6f-9e9227d46eed@scilab-enterprises.com> References: <32099126-7ad6-77e3-ff6f-9e9227d46eed@scilab-enterprises.com> Message-ID: <2da74cbd-57fe-cc47-0ed9-72c459483a0e@scilab-enterprises.com> Me again ;) You can use http://cgit.scilab.org/scilab/ too. ( choose branch at the top right ) Another tool to do the same thing, sometimes it is faster than gitweb. Antoine Le 13/03/2018 ? 15:37, Antoine ELIAS a ?crit?: > Hello Samuel, > > http://gitweb.scilab.org/?p=scilab.git can show all scilab.git > repository. > At the bottom of the main page you can choose branch (heads section). > > history of chances of CHANGES.md on branch master: > http://gitweb.scilab.org/?p=scilab.git;a=history;f=scilab/CHANGES.md;h=28beca7cdfbe60a38c7207a949427b160f106e14;hb=refs/heads/master > > history of chances of CHANGES.md on branch 6.0: > http://gitweb.scilab.org/?p=scilab.git;a=history;f=scilab/CHANGES.md;h=7e58b83233c9e2268d7833bfd7af56f14db6a71f;hb=refs/heads/6.0 > > > Regards, > Antoine > Le 13/03/2018 ? 10:32, Samuel Gougeon a ?crit?: >> Hello, >> >> >> Does http://gitweb.scilab.org/?p=scilab.git points to only the master >> branch, or only to the current branch (currently the 6.0 one), or to >> all branches gathered? >> >> I mean, if we get the history of a file from gitweb, is it its >> history on the master only? >> >> Thanks >> 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 From sgougeon at free.fr Tue Mar 13 16:02:36 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 13 Mar 2018 16:02:36 +0100 Subject: [Scilab-Dev] gitweb: which Scilab branch? In-Reply-To: <2da74cbd-57fe-cc47-0ed9-72c459483a0e@scilab-enterprises.com> References: <32099126-7ad6-77e3-ff6f-9e9227d46eed@scilab-enterprises.com> <2da74cbd-57fe-cc47-0ed9-72c459483a0e@scilab-enterprises.com> Message-ID: <14a3ed0c-b7b9-343d-6b91-a7347ed01e82@free.fr> Le 13/03/2018 ? 15:42, Antoine ELIAS a ?crit : > Me again ;) > > You can use http://cgit.scilab.org/scilab/ too. ( choose branch at the > top right ) > Another tool to do the same thing, sometimes it is faster than gitweb. OK, and the major informations about branches are at the top. I did not scroll the gitweb page down to the branches section. Thanks. So, if i understand right: * The shortlog section of gitweb lists recent changes for all branches. * To know whether a file has been changed between 6.0.0 and 6.0.1 i must search in the 6.0 branch, not in the master, and rather with cgit. I will do that. Yes, to get the history with gitweb, i have a bookmark, and i use to change the path\to\file for which i want to get the history. Doing it without the h code works. I guess it's the same with cgit. Thanks again Samuel From amanmehta1997 at gmail.com Wed Mar 14 14:13:27 2018 From: amanmehta1997 at gmail.com (Aman Mehta) Date: Wed, 14 Mar 2018 18:43:27 +0530 Subject: [Scilab-Dev] GSoC 2018: Interested Candidate Message-ID: Greetings contributors and admins, I am Aman Mehta, currently pursuing B.Tech and MS by research in Computer Science from International Institute of Information Technology, Hyderabad, India. I read about scilab GSoC ideas page and I wish to contribute to scilab by working on a project *- Machine Learning features in scilab. *Currently, I have built scilab (PFA a screenshot with updated banner containing my name). I am getting more familiar with Scilab by solving a few bugs. (Link to my commits: here ) *Credibility:* I have been writing programs in C/C++ since past 3 years now. I have completed course work on 'Statistical Methods in AI'. Additionally, I have also completed several Machine Learning projects using keras, scikit-learn and TensorFlow. I am familiar with concepts as well as implementation details associated with Machine Learning algorithms. I find it innately satisfying to design efficient and robust solutions - I am a regular problem solver and an *Expert rated* coder at algorithmic problems on Codeforces . *Interest:* I am a research student who extensively uses these Machine Learning (ML) libraries and hence I know the importance of ML in today's development. I would like to complete this project with the motivation to provide scilab users an option to work with ML models. I would truthfully appreciate an opportunity to contribute to scilab by taking up the project during summer 2018. Looking forward to guidance from mentors on how to proceed ahead. Sincerely, Aman Mehta, (irc: aman) ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Mar 16 16:47:10 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 16 Mar 2018 16:47:10 +0100 Subject: [Scilab-Dev] bloc2exp() removed from Scilab 6: replacement to be announced? Message-ID: <2070ea8f-3f24-a17c-84a1-0299a8ddb557@free.fr> Dear Scilab Devs, bloc2exp() is no longer available in Scilab 6. This removal has not been announced. All references to it -- noticeably in the bloc2ss() page -- have been removed from Scilab's code. So this removal is likely intentional. Is there any replacement to be announced in the CHANGES log and for the slint() deprecatedChecker? The See also section of the bloc2ss() page now lists poly() instead of bloc2exp(), but i guess that it is not a replacement (poly() being unable to yield a string). Regards Samuel From sgougeon at free.fr Fri Mar 16 17:53:15 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 16 Mar 2018 17:53:15 +0100 Subject: [Scilab-Dev] bloc2exp() removed from Scilab 6: replacement to be announced? In-Reply-To: <2070ea8f-3f24-a17c-84a1-0299a8ddb557@free.fr> References: <2070ea8f-3f24-a17c-84a1-0299a8ddb557@free.fr> Message-ID: <0fa7f3b1-92a0-65c4-559c-d8e642cc618a@free.fr> Le 16/03/2018 ? 16:47, Samuel Gougeon a ?crit : > Dear Scilab Devs, > > bloc2exp() is no longer available in Scilab 6. > > This removal has not been announced. > All references to it -- noticeably in the bloc2ss() page -- have been > removed from Scilab's code. > So this removal is likely intentional. > Is there any replacement to be announced in the CHANGES log and > for the slint() deprecatedChecker? bloc*k*2exp() was already marked in slint(), without noticed replacement. So, let's consider that no replacement exists. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.hossain18 at gmail.com Mon Mar 26 20:15:26 2018 From: s.hossain18 at gmail.com (s.hossain18) Date: Mon, 26 Mar 2018 11:15:26 -0700 (MST) Subject: [Scilab-Dev] Reg: Continuing Work and Gsoc 2018 In-Reply-To: References: Message-ID: <1522088126472-0.post@n3.nabble.com> Please add a feature so that any other language file like Python, MATLAB, Java etc can directly run with Scilab like Sagemath Software where Python, Julia, Octave, R etc codes can be used directly typing %r, %python etc. -- Sent from: http://mailinglists.scilab.org/Scilab-developers-Mailing-Lists-Archives-f2574944.html From s.hossain18 at gmail.com Mon Mar 26 20:32:23 2018 From: s.hossain18 at gmail.com (s.hossain18) Date: Mon, 26 Mar 2018 11:32:23 -0700 (MST) Subject: [Scilab-Dev] Looking For Superviser Message-ID: <1522089143669-0.post@n3.nabble.com> I want to build Scilab toolboxes for Astronomy and Astrophysics related researches. Can anyone help me? -- Sent from: http://mailinglists.scilab.org/Scilab-developers-Mailing-Lists-Archives-f2574944.html From mitkatwala95 at gmail.com Tue Mar 27 08:09:00 2018 From: mitkatwala95 at gmail.com (mitkatwala) Date: Mon, 26 Mar 2018 23:09:00 -0700 (MST) Subject: [Scilab-Dev] Error on Port type or Size for Xcos Block Message-ID: <1522130940915-0.post@n3.nabble.com> I am developing MATDET block of Scilab's Xcos simulator on the web(using JS) but getting this pop up 'Error in port size or type' when I simulate a diagram giving a matrix input to MATDET using const_m block. If I just give an integer input than the simulation works. I have given port sizes of input and output as per .sci file of MATDET: in: list(in,in2,intyp) input: [[-1,-1],1] OR [[-1,-1],2] (Input by user) out: list(out,out2,outyp) output: [[1,1],1] OR [[1,1],2] (input by user) Please see the following simulation diagrams: 1) Simulation Diagram: https://imageshack.com/a/img923/5282/nUC97z.png 2) Simulation Error with matrix input: https://imageshack.com/a/img924/4111/GLDCIX.png 3) Simulation Working with interger input: https://imageshack.com/a/img922/9734/0oMkl5.png Can anyone please help me understand why am I getting such an error and how can I fix it? -- Sent from: http://mailinglists.scilab.org/Scilab-developers-Mailing-Lists-Archives-f2574944.html From Clement.David at esi-group.com Tue Mar 27 10:16:58 2018 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Tue, 27 Mar 2018 08:16:58 +0000 Subject: [Scilab-Dev] Reg: Continuing Work and Gsoc 2018 In-Reply-To: <1522088126472-0.post@n3.nabble.com> References: <1522088126472-0.post@n3.nabble.com> Message-ID: <1522138617.2296.138.camel@esi-group.com> Hello, Thanks for the idea, some of them are listed in the Ideas of Development page [1]. Could you please edit and add the missing ones ? [1]: https://wiki.scilab.org/Ideas%20of%20development%20for%20Scilab Thanks, -- Cl?ment Le lundi 26 mars 2018 ? 11:15 -0700, s.hossain18 a ?crit : > Please add a feature so that any other language file like Python, MATLAB, > Java etc can directly run with Scilab like Sagemath Software where Python, > Julia, Octave, R etc codes can be used directly typing %r, %python etc. > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-developers-Mailing-Lists-Archives-f2574944.html > _______________________________________________ > dev mailing list > dev at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/dev