Re: [Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/mal/Tests remote00.mal, , 1.3, 1.4 remote00.stable.out, , 1.4, 1.5
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4482/Tests
Modified Files: remote00.mal remote00.stable.out Log Message: Be a little bit smarter when dealing with functions. Allow dotted notation for <module>.<func> next to just <func> for the default/current module. (currently I guess this is "user", but should be retrieved somehow to be on the safe site...) Yes, the default is the user module. I have been 'struggling' with arguments for reflective functions. I settled down to using two arguments where needed e.g. f(mod:str,fcn:str,...)
It is not optimal, but avoid string construction/analysis
On 10-07-2007 14:51:38 +0200, Martin Kersten wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4482/Tests
Modified Files: remote00.mal remote00.stable.out Log Message: Be a little bit smarter when dealing with functions. Allow dotted notation for <module>.<func> next to just <func> for the default/current module. (currently I guess this is "user", but should be retrieved somehow to be on the safe site...) Yes, the default is the user module. I have been 'struggling' with arguments for reflective functions. I settled down to using two arguments where needed e.g. f(mod:str,fcn:str,...)
It is not optimal, but avoid string construction/analysis
Any good reason for that? (you only use it in mdb's list IMHO, where the "cost" is not important, and the functionality would be very nice, I use it in remote.get where it is highly undesirable to have two arguments instead of one)
Fabian Groffen wrote:
On 10-07-2007 14:51:38 +0200, Martin Kersten wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4482/Tests
Modified Files: remote00.mal remote00.stable.out Log Message: Be a little bit smarter when dealing with functions. Allow dotted notation for <module>.<func> next to just <func> for the default/current module. (currently I guess this is "user", but should be retrieved somehow to be on the safe site...) Yes, the default is the user module. I have been 'struggling' with arguments for reflective functions. I settled down to using two arguments where needed e.g. f(mod:str,fcn:str,...)
It is not optimal, but avoid string construction/analysis
Any good reason for that?
(you only use it in mdb's list IMHO, where the "cost" is not important, cost = also consistent use.
mod and fcn are stored in the global namespace, which makes it possible to compare quickly. Otherwise, you have to break "m.f" into two pieces and perform expensive string matching in the namespace on both. It is used in inspect.get*(), profiler.*(), manual.*(), most optimizers (). All cases, as far as I recall, are aligned on this policy.
and the functionality would be very nice, I use it in remote.get where it is highly undesirable to have two arguments instead of one) why? MAL is designed to work with multiple results and arguments.
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On 10-07-2007 21:48:03 +0200, Martin Kersten wrote:
It is not optimal, but avoid string construction/analysis Any good reason for that? (you only use it in mdb's list IMHO, where the "cost" is not important, cost = also consistent use.
mod and fcn are stored in the global namespace, which makes it possible to compare quickly. Otherwise, you have to break "m.f" into two pieces and perform expensive string matching in the namespace on both.
consistency is good, however, I fail to see the consistency here. I use io.print, but when I reference it I have to use "io", "print"???
It is used in inspect.get*(), profiler.*(), manual.*(), most optimizers (). All cases, as far as I recall, are aligned on this policy.
and the functionality would be very nice, I use it in remote.get where it is highly undesirable to have two arguments instead of one) why? MAL is designed to work with multiple results and arguments.
Fabian wrote:
On 10-07-2007 21:48:03 +0200, Martin Kersten wrote:
It is not optimal, but avoid string construction/analysis Any good reason for that? (you only use it in mdb's list IMHO, where the "cost" is not important, cost = also consistent use.
mod and fcn are stored in the global namespace, which makes it possible to compare quickly. Otherwise, you have to break "m.f" into two pieces and perform expensive string matching in the namespace on both.
consistency is good, however, I fail to see the consistency here. I use io.print, but when I reference it I have to use "io", "print"??? "io.print" is an (incomplete) language construct, which is different from arguments telling you to look in the module "io" for the information on element "print".
"io.print(v:any):void" is the real construct you are after
It is used in inspect.get*(), profiler.*(), manual.*(), most optimizers (). All cases, as far as I recall, are aligned on this policy.
and the functionality would be very nice, I use it in remote.get where it is highly undesirable to have two arguments instead of one) why? MAL is designed to work with multiple results and arguments.
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On 10-07-2007 22:18:47 +0200, Martin Kersten wrote:
consistency is good, however, I fail to see the consistency here. I use io.print, but when I reference it I have to use "io", "print"??? "io.print" is an (incomplete) language construct, which is different from arguments telling you to look in the module "io" for the information on element "print".
"io.print(v:any):void" is the real construct you are after
That is a different side of the problem. How do we address a function then? Should we always use its full signature (would make sense)? I guess I could use that as well in the remote.put() method to specify a function object.
participants (3)
-
Fabian
-
Fabian Groffen
-
Martin Kersten