f-script-talk Mailing List for F-Script (Page 10)
Brought to you by:
pmougin
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(4) |
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(8) |
May
(12) |
Jun
(3) |
Jul
(5) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(4) |
2003 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(14) |
Jun
(5) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
|
2004 |
Jan
(3) |
Feb
(9) |
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
(3) |
Aug
(3) |
Sep
(11) |
Oct
(29) |
Nov
|
Dec
(3) |
2005 |
Jan
(8) |
Feb
(12) |
Mar
|
Apr
(1) |
May
(31) |
Jun
|
Jul
(7) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
(13) |
Feb
(1) |
Mar
(5) |
Apr
(3) |
May
(1) |
Jun
(13) |
Jul
(2) |
Aug
(22) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
|
2007 |
Jan
(7) |
Feb
(3) |
Mar
(2) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
(12) |
Dec
(5) |
2008 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(31) |
Jul
(9) |
Aug
(10) |
Sep
(3) |
Oct
(4) |
Nov
|
Dec
|
2009 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <Gri...@ar...> - 2005-05-10 09:56:34
|
Hello Philippe, On Tue May 10 2005 at 13:15, Philippe Mougin <pm...@ac...> wrote: > Le 10 mai 05 =E0 09:37, Marcel Weiher a =E9crit : > >> Hi Philippe, >> >> I can't get this (or the previous) release to compile on my machine. > > Do others on this list experience this problem ? Yes, I do have this problem too, on *Tiger* (and Xcode 2) (and it's not cured by removing FScript.build directory): g5% xcodebuild -buildstyle Deployment -target FScriptFramework | grep -v '^= ' .... CompileC /Users/eg/tmp/xcode-build/FScript.build/FScriptFramework.build/Objects-norm= al/ppc/Array.o FScriptFramework/Array.m normal ppc objective-c com.apple.compilers.gcc.4_0cc1obj: cc1obj: /Users/eg/tmp/xcode-build/FScript.build/FScriptFramework.build/FScript.hmap: Not a directory >>> Moreover, I experience another problem (on case-sensitive HFS+): >> g5% xcodebuild -buildstyle Deployment -target F-Script | grep -v '^ ' .... ScriptFramework/BigBrowserArgumentPanel.m:4:/Volumes/Pluto/local/src/FScrip= tSources-20050509/FScript/FScriptFramework/BigBrowserArgumentPanel.h:4:26: error: Appkit/Appkit.h: No such file or directory >> Regards, Grigory |
From: Philippe M. <pm...@ac...> - 2005-05-10 09:12:16
|
Le 10 mai 05 =E0 09:37, Marcel Weiher a =E9crit : > Hi Philippe, > > I can't get this (or the previous) release to compile on my machine. Do others on this list experience this problem ? Marcel thank for reporting this. Building the latest version requires =20= Mac OS 10.4 (and maybe XCode 2). Is it what you are using? In =20 addition to do a "Build Clean" operation, could you also manually =20 delete the "build" directory before trying to build FScriptFramework? =20= Could you also try to unset the "Fix and Continue" option in the =20 Project info panel (under the styles tab)? Does it change something? Cheers, Philippe |
From: Marcel W. <ma...@me...> - 2005-05-10 07:37:42
|
Hi Philippe, I can't get this (or the previous) release to compile on my machine. Cheers, Marcel ---------------------------- snip ------------------- Building target =93FScriptFramework=94 =97 (2 errors) cd /tmp/FScriptSources-20050509/FScript /usr/bin/gcc-3.3 -x objective-c -arch ppc -pipe -std=3Dgnu99 -Wno-=20= trigraphs -fasm-blocks -g -O0 -Wno-four-char-constants -fmessage-=20 length=3D0 -mtune=3DG4 -mfix-and-continue -I/Users/marcel/programming/=20= _BuildTemp/FScript.build/FScriptFramework.build/FScript.hmap -Wmost -=20 F/Users/marcel/programming/Build -I/Users/marcel/programming/Build/=20 include -I/Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/DerivedSources -c /tmp/FScriptSources-20050509/=20= FScript/FScriptFramework/Airplane.m -o /Users/marcel/programming/=20 _BuildTemp/FScript.build/FScriptFramework.build/Objects-normal/ppc/=20 Airplane.o cc1obj: /Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/FScript.hmap: Not a directory cc1obj: error: invalid option `fix-and-continue' cc1obj: /Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/FScript.hmap: Not a directory cc1obj: error: invalid option `fix-and-continue' cd /tmp/FScriptSources-20050509/FScript /usr/bin/gcc-3.3 -x objective-c -arch ppc -pipe -std=3Dgnu99 -Wno-=20= trigraphs -fasm-blocks -g -O0 -Wno-four-char-constants -fmessage-=20 length=3D0 -mtune=3DG4 -mfix-and-continue -I/Users/marcel/programming/=20= _BuildTemp/FScript.build/FScriptFramework.build/FScript.hmap -Wmost -=20 F/Users/marcel/programming/Build -I/Users/marcel/programming/Build/=20 include -I/Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/DerivedSources -c /tmp/FScriptSources-20050509/=20= FScript/FScriptFramework/Array.m -o /Users/marcel/programming/=20 _BuildTemp/FScript.build/FScriptFramework.build/Objects-normal/ppc/=20 Array.o cc1obj: /Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/FScript.hmap: Not a directory cc1obj: error: invalid option `fix-and-continue' cc1obj: /Users/marcel/programming/_BuildTemp/FScript.build/=20 FScriptFramework.build/FScript.hmap: Not a directory cc1obj: error: invalid option `fix-and-continue' Build failed for target "FScriptFramework" using build style =20 "Development" (2 errors) -------------------------- snip -------------------- On 9 May 2005, at 22:05, Philippe Mougin wrote: > F-Script 1.3 release candidate is now available for download and test. > > Binaries + documentation: > http://www.fscript.org/download/FScriptBin-20050509.tar.gz > > Sources: > http://www.fscript.org/download/FScriptSources-20050509.tar.gz > > This version comes with various improvements, described in the =20 > included release notes. > > I plan to publicly announce the release this week if no major =20 > problems are found in this candidate version. Please, test and =20 > report problems ASAP. > > Enjoy! > > Philippe Mougin > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great =20 > events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=3D20 > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > |
From: Philippe M. <pm...@ac...> - 2005-05-09 22:04:36
|
F-Script 1.3 release candidate is now available for download and test. Binaries + documentation: http://www.fscript.org/download/FScriptBin-20050509.tar.gz Sources: http://www.fscript.org/download/FScriptSources-20050509.tar.gz This version comes with various improvements, described in the included release notes. I plan to publicly announce the release this week if no major problems are found in this candidate version. Please, test and report problems ASAP. Enjoy! Philippe Mougin |
From: <mov...@ao...> - 2005-05-06 00:41:36
|
Dear Philippe, Thank you for your help and for your link to Stephane Ducasse. Best regards, John Conning -----Original Message----- From: Philippe Mougin <pm...@ac...> To: f-s...@li... Sent: Thu, 5 May 2005 20:17:15 +0200 Subject: [F-Script-talk] Re: books Le 5 mai 05 à 18:08, mov...@ao... a écrit : > Are there any books with practical examples of f-script? Philippe > Mougin's guide contains a few examples in chapter 5. Searching > amazon and o'reilly produced no books specifically about f-script. > Can you guide me to any other sites? Thanks. > > John There aren't other book about F-Script. But looking at Smalltalk books can be useful since F-Script syntax is based on Smalltalk. Stephane Ducasse host a bunch of freely downloadable Smalltalk book at http://www.iam.unibe.ch/~ducasse/FreeBooks.html Best, Philippe Mougin ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r _______________________________________________ F-Script-talk mailing list F-S...@li... https://lists.sourceforge.net/lists/listinfo/f-script-talk |
From: Philippe M. <pm...@ac...> - 2005-05-05 19:20:55
|
Andy Stark has released a bookmarked version of the F-Script guide, which is much easier to read than the version included with the current distribution. You can download it at http://www.fscript.org/ download/FScriptGuide.pdf Cheers, Philippe Mougin |
From: Philippe M. <pm...@ac...> - 2005-05-05 18:35:44
|
Le 5 mai 05 =E0 18:08, mov...@ao... a =E9crit : > Are there any books with practical examples of f-script? Philippe =20 > Mougin's guide contains a few examples in chapter 5. Searching =20 > amazon and o'reilly produced no books specifically about f-script. =20= > Can you guide me to any other sites? Thanks. > > John There aren't other book about F-Script. But looking at Smalltalk =20 books can be useful since F-Script syntax is based on Smalltalk. =20 Stephane Ducasse host a bunch of freely downloadable Smalltalk book =20 at http://www.iam.unibe.ch/~ducasse/FreeBooks.html Best, Philippe Mougin |
From: <mov...@ao...> - 2005-05-05 16:08:22
|
Are there any books with practical examples of f-script? Philippe Mougin's guide contains a few examples in chapter 5. Searching amazon and o'reilly produced no books specifically about f-script. Can you guide me to any other sites? Thanks. John |
From: ackerman <rd...@pa...> - 2005-05-05 15:59:35
|
On May 4, 2005, at 2:14 PM, Nathan Strange wrote: > I'm no expert on ObjC or F-script so I'm not sure if this would work... > > But how about using a category to override NSObject's retain method > (or maybe > alloc or init) that would send a message to some sort of tracker object > while also doing the work of retain (which is hopefully well understood > by someone outside of Apple) > > sorry that I don't have anything more than a vague notion... > > -Nathan vague notions are better than none. couldn't the override just call NSObject's 'retain' method (or 'alloc' or 'init') - we wouldn't have to know its details. does anyone know of any code/plugin that does browse objects? that might give us a clue. is crawling the heap looking for objects out of the question? (not that i know how) |
From: Nathan S. <nat...@jp...> - 2005-05-04 21:14:12
|
I'm no expert on ObjC or F-script so I'm not sure if this would work... But how about using a category to override NSObject's retain method (or=20= maybe alloc or init) that would send a message to some sort of tracker object while also doing the work of retain (which is hopefully well understood by someone outside of Apple) sorry that I don't have anything more than a vague notion... -Nathan On May 4, 2005, at 1:37 PM, Philippe Mougin wrote: > > Le 2 mai 05 =E0 21:01, ackerman a =E9crit : > > [...] > >> i was hoping to avoid this level of manually adding code to inspect=20= >> an object. >> i want to type 'sys browse' in the FSInterpreterView and see a list=20= >> of instances of all allocated objects, preferably listed by class. >> the docs seem to show this happening, but i don't see any object=20 >> instances in my object browser. >> so i am wondering what i have to do to see my apps objects in the=20 >> browser that is embedded in my app. > > Hi, > > This feature is not available in F-Script. I would like to add it but=20= > I have no idea about how to implement it (i.e. how to get all the=20 > instances in the current application). > > Does someone know how to do it ? > > Cheers, > > Philippe Mougin |
From: Philippe M. <pm...@ac...> - 2005-05-04 20:34:05
|
Le 2 mai 05 =E0 21:01, ackerman a =E9crit : [...] > i was hoping to avoid this level of manually adding code to inspect =20= > an object. > i want to type 'sys browse' in the FSInterpreterView and see a list =20= > of instances of all allocated objects, preferably listed by class. > the docs seem to show this happening, but i don't see any object =20 > instances in my object browser. > so i am wondering what i have to do to see my apps objects in the =20 > browser that is embedded in my app. Hi, This feature is not available in F-Script. I would like to add it but =20= I have no idea about how to implement it (i.e. how to get all the =20 instances in the current application). Does someone know how to do it ? Cheers, Philippe Mougin |
From: ackerman <rd...@pa...> - 2005-05-02 19:41:30
|
On May 2, 2005, at 1:46 AM, Felix Franz wrote: >> On May 1, 2005, at 7:09 PM, ackerman wrote: >>> i am using the fscript palette to put a fscript view on my apps main >>> window. >>> when i do a 'sys browse' in it, in the left column i see 'sys = <an >>> instance of System>'. >>> Where are the objects of my program? shouldn't i see them there? >> >> i forgot to mention that i can use 'select view' to click on an object >> in my gui and see its attributes. >> but what i was interested in is a list of all the objects in my >> program >> -- not just gui objects that i can see in the interface. > > You can create an FSInterpreter-object and set objects via > the setObject:forIdentifier: method. Something like: > > interpreter = [[FSInterpreter alloc] init] > [interpreter setObject: myImportantObject forIdentifier: @"obj1"]; > ... > [interpreter browse]; > > now you should see "obj1" in the left column. i was hoping to avoid this level of manually adding code to inspect an object. i want to type 'sys browse' in the FSInterpreterView and see a list of instances of all allocated objects, preferably listed by class. the docs seem to show this happening, but i don't see any object instances in my object browser. so i am wondering what i have to do to see my apps objects in the browser that is embedded in my app. Thanks for replying --- |
From: Felix F. <fe...@gm...> - 2005-05-02 08:47:09
|
> > On May 1, 2005, at 7:09 PM, ackerman wrote: > > i am using the fscript palette to put a fscript view on my apps main > > window. > > when i do a 'sys browse' in it, in the left column i see 'sys = <an > > instance of System>'. > > Where are the objects of my program? shouldn't i see them there? > > i forgot to mention that i can use 'select view' to click on an object > in my gui and see its attributes. > but what i was interested in is a list of all the objects in my program > -- not just gui objects that i can see in the interface. You can create an FSInterpreter-object and set objects via the setObject:forIdentifier: method. Something like: interpreter = [[FSInterpreter alloc] init] [interpreter setObject: myImportantObject forIdentifier: @"obj1"]; ... [interpreter browse]; now you should see "obj1" in the left column. HTH, felix -- . +++ GMX - die erste Adresse für Mail, Message, More +++ 10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail |
From: ackerman <rd...@pa...> - 2005-05-02 02:35:58
|
On May 1, 2005, at 7:09 PM, ackerman wrote: > i am using the fscript palette to put a fscript view on my apps main > window. > when i do a 'sys browse' in it, in the left column i see 'sys = <an > instance of System>'. > Where are the objects of my program? shouldn't i see them there? i forgot to mention that i can use 'select view' to click on an object in my gui and see its attributes. but what i was interested in is a list of all the objects in my program -- not just gui objects that i can see in the interface. |
From: ackerman <rd...@pa...> - 2005-05-02 02:09:53
|
i am using the fscript palette to put a fscript view on my apps main window. when i do a 'sys browse' in it, in the left column i see 'sys = <an instance of System>'. Where are the objects of my program? shouldn't i see them there? |
From: Philippe M. <pm...@ac...> - 2005-04-23 20:06:37
|
CALL FOR PAPERS FOR THE ACM Dynamic Languages Symposium 2005 October 18, 2005 San Diego, California (co-located with OOPSLA'05) URL: http://decomp.ulb.ac.be:8082/events/dls05/ ----------- Abstract ----------- In industry, static languages (such as Java, C++ and C#) are much more widely used than their dynamic counterparts (like CLOS, Python, Self, Perl, php or Smalltalk). So it appears as though dynamic language concepts were forgotten and lost the race. But this is not the case. Java and C#, the latest mainstream static languages, popularized to a certain extent dynamic language features such as garbage collection, portability and (limited forms of) reflection. In the near future, we expect this dynamicity to increase even further. E.g., it is getting clearer year after year that pervasive computing is becoming the rule and that concepts such as meta programming, reflection, mobility, dynamic reconfigurability and distribution are becoming increasingly popular. All of these features are the domain of dynamic languages, and hence it is only logical that more dynamic language concepts have to be taken up by static languages, or that dynamic languages can make a breakthrough. Currently, the dynamic language community is fragmented, split over a multitude of paradigms (from functional over logic to object-oriented), languages and syntaxes. This fragmentation severely hinders research as well as acceptance, and results in either language wars or, even worse, language ignorance. The goal of this symposium is to provide a highly visible, international forum for researchers working on dynamic features and languages. We explicitly invite submissions from all kinds of paradigms (object-oriented, functional, logic, ...), as can be seen from the structure of the program committee. Areas of interests include, but are not limited to: - closures - delegation - actors, active objects - constraint systems - mixins and traits - reflection and meta-programming - language symbiosis and multi-paradigm languages - experience reports on successful application of dynamic languages Accepted Papers will be published in the ACM Digital Library. ------------------------------- Submission Guidelines ------------------------------- Papers will need to be submitted using an online tracking system, of which the URL will be given later. All papers must be submitted electronically in PDF format (or PostScript, if you do not have access to PDF-producing programs, but this is not recommended). Submissions, as well as final versions, must be formatted to conform to ACM Proceedings requirements: Nine point font on ten point baseline, two columns per page, each column 3.33 inches wide by 9 inches tall, with a column gutter of 0.33 inches, etc. See the ACM Proceedings Guidelines. You can save preparation time by using one of the templates from that page. Note that MS Word documents must be converted to PDF before being submitted. ---------------------- Important Dates ---------------------- - Deadline for receipt of submissions: June 24th 2005 - Notification of acceptance or rejection: August 5th 2005 - Final version for the proceedings: To be announced later --------------------------- Program Committee --------------------------- - Gilad Bracha - Wolfgang De Meuter - Stephane Ducasse - Gopal Gupta - Robert Hirschfeld - Dan Ingalls - Yukihiro Matsumoto - Mark Miller - Eliot Miranda - Philippe Mougin - Oscar Nierstrasz - Dave Thomas - David Ungar - Guido Van Rossum - Peter Van Roy - Jon L White (G) - Roel Wuyts (Chair) |
From: Philippe M. <pm...@ac...> - 2005-02-20 17:49:24
|
Le 15 f=E9vr. 05, =E0 09:05, Ken Ferry a =E9crit : > I do think that JGType steals some (most?) of the thunder here, but I > haven't had much luck getting JGType to work. My app crashes whenever > I try to use the dynamic subclassing. Can we get a little bit of > sample code on that? Hi Ken, Here is a basic example where we create a new subclass of NSObject,=20 named MyClass, with three instance variables named a, b and c, and=20 define a simple method named method1: > NSObject subclass:'MyClass' instanceVariableNames:'a b c' MyClass > MyClass MyClass > MyClass setFSBlock:[:self :_cmd| 'Method ' ++ _cmd ++ ' called on '=20= ++ self printString] asInstanceMethod:#method1 > myInstance :=3D MyClass alloc init > myInstance method1 'Method method1 called on <MyClass: 0x4bb69c0>' Best, Philippe Mougin= |
From: Philippe M. <pm...@ac...> - 2005-02-20 17:19:03
|
Le 15 f=E9vr. 05, =E0 06:45, Luke Nihlen a =E9crit : > [...] > As the the Tenth Art Tools are ultimately going to be GPLed or some=20 > similar open source model I would be happy to share this code or the=20= > design with anyone interested and would welcome feedback on this idea.=20= > Did I re-invent the wheel? Is there some handy dandy F-Script way to=20= > do this and I just missed it on my read-through of the documentation? =20= > Is this code already implemented, say in the JGAdditions? Is there any=20= > interest in incorporating this functionality in some way to F-Script=20= > itself? If so, it would be an honor. Did I completely not get the=20 > point of this language and I'm misusing horribly? I hope not. Feel=20= > free to let me know what you think. I Luke, Your message, as well as Ken's ones, come at a good time since I'm in=20 the process of trying to understand how to add this kind of features to=20= F-Script. In the latest release I have incorporated JGType, from J=F6rg=20= Garbers, which provides related functionalities and is a good way to=20 experiment this kind of extension of F-Script. So feel free to further=20= share your experience with us. If you have code to share with others, I=20= would be happy to host it on the F-Script web site, or to link to it.=20 Also, feel free to tell us more about the project you are working on. I=20= think we are all interested to know how F-Script is used. =46rom my experience with JGType I already see some of the things that=20= I'll have to implement in the core F-Script engine to offer good=20 support for class creation in F-Script. For example, I plan to add the=20= support for sending messages to super. I'm also looking at ways to=20 offer access instance variables directly from F-Script code (without=20 relying on KVC) etc. Best, Philippe Mougin= |
From: Ken F. <ken...@gm...> - 2005-02-16 10:53:54
|
On Wed, 16 Feb 2005 01:54:42 -0700, Luke Nihlen <l_n...@ya...> wrote: > Ken, > > Thanks for the detailed response! I'd like to peruse your code, > unfortunately I don't have permissions to access the zip file at the > link you provided. Huh. As far as I can tell the link (and permissions) are fine, so maybe try it again? http://homepage.mac.com/kenferry/Software/KFDecorator/KFDecorator.zip > Since my methods are actually ObjC methods on a class I am hoping > F-Script wraps arguments for me. I have interest in writing type > conversion for the return, but haven't needed to yet since id is a > pretty useful return type for most purposes. The way I did it I needed to explicitly convert plain c arguments to objects, but you may have tapped into FScript's conversion stuff more directly than I did. > > When adding a block for a method not implemented by the base, all > > arguments and returns are assumed to be objects. There is a > > -[KFDecorator setBlock:forSelector:withSignature:] method for when > > that assumption isn't going to hold. > > > ah, is that an NSMethodSignature? Yep. They're a pain to create with documented methods, but there's an undocumented +[NSMethodSignature signatureWithObjCTypes:] that makes it pretty straightforward. The argument is a string of the sort you were talking about (e.g. "i@:@" means returns int, takes id, SEL, id as arguments). Your tack of taking a types string directly is a good idea. I'll change that. > > (1) You cannot set a block for a method implemented by KFDecorator > > itself, and KFDecorator is a subclass of NSObject as opposed to > > NSProxy. This is because I haven't worked around NSProxy's lack of a > > useful -[NSProxy methodSignatureForSelector:]. > > > > I wrote a working version of -methodSignatureForSelector by looking at > the F-Script code, maybe you can model one for NSProxy off of what I > wrote. I'll check it out. :-) > > (2) Since it's just a wrapper for a base object, you can only catch > > messages when you interject the decorator between a calling object and > > the base. That can be a good thing or a bad thing in different > > situations. > > > are you using forwardInvocation? Why do you have this limitation? Because I'm using forwardInvocation in the decorator (wrapper) object. If the base object sends a message to itself then the wrapper never sees it. > I am grooming my code to share, plus should have a usable server up in > a few days (just moved) so I'll let you know when there's a zip > available for DL. Looking forward to it. Cheers, Ken |
From: Luke N. <l_n...@ya...> - 2005-02-16 08:54:48
|
Ken, Thanks for the detailed response! I'd like to peruse your code, unfortunately I don't have permissions to access the zip file at the link you provided. I also hadn't looked at any of the JGAddon stuff in the sources. A quick glance shows that their work is far more aggressive than what I had attempted or even envisioned for my current project. However, it would be an impressive addition to F-Script to be able to dynamically add objects to the ObjC runtime system. I'm new to ObjC and even newer to F-Script, and I haven't read your code so please forgive any wrong assumptions, but it sounds like our designs seem somewhat similar, at least from the outside. With regard to type, I am actually hoping to do some intelligent return conversion between F-Script and ObjC. Recall that the prototype for the method to attach blocks as methods is: TATestingDummy attachFSBlock: [5] toSelector:#gimmefive withArgs:'' The withArgs argument is a string encoding the types of the return, two @@s for self and cmd, and whatever characters are needed to describe the desired argument types. This encoding is taken from the F-Script source, and is basically what the @encode() compiler directive would return for a function call of your method. I figured out how to do make my own encoding strings on this apple web page: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/ RuntimeOverview/chapter_4_section_6.html As the code is still in prototype form I haven't had time to fully explore what is needed to perform return type conversion. Fortunately, I seem to be relatively protected on the calling side, as these attached Block methods appear like regular ObjC method to F-Script so it is nice enough to automatically type convert the arguments to ObjC friendly types. Blocks always return id type, however, so methods interested in non-id return types will have to undergo conversion, which is informed by the withArgs: string provided at attachment time. I am also restructuring this encoding stuff to allow self to be handed in so that I can use Key Value Coding to set member variables in self, as all objects in my framework support KVC as I think cocoa bindings are almost as mind blowing as F-Script. Almost. :) I have responded to a couple of things in your email below: On Feb 15, 2005, at 1:05 AM, Ken Ferry wrote: > I've been meaning to post a similar message, so I'll throw in my 2 > cents. :-) > > I have a class that does something similar with a slightly different > emphasis. KFDecorator > <http://homepage.mac.com/kenferry/Software/KFDecorator/KFDecorator.zip> > uses message forwarding + blocks to act like an abstract decorator, > with some limitations. I think it's best explained through a couple > of examples. I don't use it in release code, but I've found it to be > pretty useful when using FScript (Anywhere) as part of the development > environment for a cocoa application. It's good for debugging, > exploration of ideas, and sometimes automated testing. > > The idea of a decorator is that it wraps a base object and modifies > its behavior. The decorator catches specified messages and processes > them, and any messages it doesn't catch are forwarded to the base > object. It's a design pattern from the Gang of Four book. > >> dataDecorator := tableView dataSource decorator > >> dataDecorator numberOfRowsInTableView:tableView > 312 > >> dataDecorator setBlock:[:self :table | 10] >> forSelector:#numberOfRowsInTableView: > >> dataDecorator setBlock:[:self :table :column :row | 'test'] >> forSelector:#tableView:objectValueForTableColumn:row: > >> dataDecorator > <KFDecorator[0x4cf5b60] base:<TableViewManager: 0x4c67a0> maps:{ > :#numberOfRowsInTableView: => [:self :table | 10] > #tableView:objectValueForTableColumn:row: => [:self :table > :column :row | 'test'] > }> Here's maybe a difference - it looks like you are adding methods to instances? I am adding methods to classes. My attachFSBlock:blahblah method is a class method. >> dataDecorator numberOfRowsInTableView:tableView > 10 > >> dataDecorator tableView:tableView objectValueForTableColumn:nil row:0 > 'test' > >> tableView setDataSource:dataDecorator > > The main interesting thing about the above example is that it shows > the decorator translating argument and return types. The > 'numberOfRowsInTableView:' method returns a genuine int, which makes > the decorator more suitable for interacting with objective-c code that > doesn't use objects. (Sounds like you did this too, Luke.) The class > was written before the latest version of FScript came out, so it uses > the deprecated Pointer class to do the dirty work. The argument and > return types are determined from the method signature of the > overridden base method, when there is such a base method. > Since my methods are actually ObjC methods on a class I am hoping F-Script wraps arguments for me. I have interest in writing type conversion for the return, but haven't needed to yet since id is a pretty useful return type for most purposes. > You can use a decorator without a base, in which case it acts more > like a dynamically built object. > >> decorator := KFDecorator decorator > >> decorator setBlock:[:self :num | num + 4] >> forSelector:#addFourToNumber: > >> decorator > <KFDecorator[0x4ca8c0] base:(null) maps:{ > #addFourToNumber: => [:self :num | num + 4] > }> > >> decorator addFourToNumber:5 > 9 > When adding a block for a method not implemented by the base, all > arguments and returns are assumed to be objects. There is a > -[KFDecorator setBlock:forSelector:withSignature:] method for when > that assumption isn't going to hold. > ah, is that an NSMethodSignature? > You can also use KFDecorator to switch between existing objective-c > methods that you'd like to evaluate. > >> decorator setBlock:#doStuff_alternateAlgorithm forSelector:#doStuff > Where in a normal subclassing situation you would call 'super', with a > decorator you can call 'self base'. The following would help you > understand under what circumstances the numberOfRowsInTableView: > method is called. > >> dataDecorator setBlock:[:self :table | sys beep. self base >> numberOfRowsInTableView:table] forSelector:#numberOfRowsInTableView: > The two biggest limitations are: > > (1) You cannot set a block for a method implemented by KFDecorator > itself, and KFDecorator is a subclass of NSObject as opposed to > NSProxy. This is because I haven't worked around NSProxy's lack of a > useful -[NSProxy methodSignatureForSelector:]. > I wrote a working version of -methodSignatureForSelector by looking at the F-Script code, maybe you can model one for NSProxy off of what I wrote. > (2) Since it's just a wrapper for a base object, you can only catch > messages when you interject the decorator between a calling object and > the base. That can be a good thing or a bad thing in different > situations. > are you using forwardInvocation? Why do you have this limitation? > Okay, so now that that's out, here are some thoughts. :-) > > I do think that JGType steals some (most?) of the thunder here, but I > haven't had much luck getting JGType to work. My app crashes whenever > I try to use the dynamic subclassing. Can we get a little bit of > sample code on that? > You've probably noticed that the first argument of every block set for > a selector is :self, which is a reference to the decorator object. In > the first version of KFDecorator I had it set up so that all of the > following worked: > >> decorator setBlock:[4] forSelector:#count > >> decorator setBlock:[ :self | 4] forSelector:#count > >> decorator setBlock:[ :self :cmd | 4 ] forSelector:#count > right I have decided on the second one as well. > I couldn't decide if it was confusing and error prone or useful, but > eventually changed it to always require the second form. Just another > thing to think about. > > Luke, I'd definitely be interested to see your version of things. We > should exchange ideas. :-) You can download my code from the link > above. > I am grooming my code to share, plus should have a usable server up in a few days (just moved) so I'll let you know when there's a zip available for DL. > -Ken > thanks again for replying! Luke > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > |
From: Ken F. <ken...@gm...> - 2005-02-15 08:05:45
|
I've been meaning to post a similar message, so I'll throw in my 2 cents. :-) I have a class that does something similar with a slightly different emphasis. KFDecorator <http://homepage.mac.com/kenferry/Software/KFDecorator/KFDecorator.zip> uses message forwarding + blocks to act like an abstract decorator, with some limitations. I think it's best explained through a couple of examples. I don't use it in release code, but I've found it to be pretty useful when using FScript (Anywhere) as part of the development environment for a cocoa application. It's good for debugging, exploration of ideas, and sometimes automated testing. The idea of a decorator is that it wraps a base object and modifies its behavior. The decorator catches specified messages and processes them, and any messages it doesn't catch are forwarded to the base object. It's a design pattern from the Gang of Four book. > dataDecorator := tableView dataSource decorator > dataDecorator numberOfRowsInTableView:tableView 312 > dataDecorator setBlock:[:self :table | 10] forSelector:#numberOfRowsInTableView: > dataDecorator setBlock:[:self :table :column :row | 'test'] forSelector:#tableView:objectValueForTableColumn:row: > dataDecorator <KFDecorator[0x4cf5b60] base:<TableViewManager: 0x4c67a0> maps:{ :#numberOfRowsInTableView: => [:self :table | 10] #tableView:objectValueForTableColumn:row: => [:self :table :column :row | 'test'] }> > dataDecorator numberOfRowsInTableView:tableView 10 > dataDecorator tableView:tableView objectValueForTableColumn:nil row:0 'test' > tableView setDataSource:dataDecorator The main interesting thing about the above example is that it shows the decorator translating argument and return types. The 'numberOfRowsInTableView:' method returns a genuine int, which makes the decorator more suitable for interacting with objective-c code that doesn't use objects. (Sounds like you did this too, Luke.) The class was written before the latest version of FScript came out, so it uses the deprecated Pointer class to do the dirty work. The argument and return types are determined from the method signature of the overridden base method, when there is such a base method. You can use a decorator without a base, in which case it acts more like a dynamically built object. > decorator := KFDecorator decorator > decorator setBlock:[:self :num | num + 4] forSelector:#addFourToNumber: > decorator <KFDecorator[0x4ca8c0] base:(null) maps:{ #addFourToNumber: => [:self :num | num + 4] }> > decorator addFourToNumber:5 9 When adding a block for a method not implemented by the base, all arguments and returns are assumed to be objects. There is a -[KFDecorator setBlock:forSelector:withSignature:] method for when that assumption isn't going to hold. You can also use KFDecorator to switch between existing objective-c methods that you'd like to evaluate. > decorator setBlock:#doStuff_alternateAlgorithm forSelector:#doStuff Where in a normal subclassing situation you would call 'super', with a decorator you can call 'self base'. The following would help you understand under what circumstances the numberOfRowsInTableView: method is called. > dataDecorator setBlock:[:self :table | sys beep. self base numberOfRowsInTableView:table] forSelector:#numberOfRowsInTableView: The two biggest limitations are: (1) You cannot set a block for a method implemented by KFDecorator itself, and KFDecorator is a subclass of NSObject as opposed to NSProxy. This is because I haven't worked around NSProxy's lack of a useful -[NSProxy methodSignatureForSelector:]. (2) Since it's just a wrapper for a base object, you can only catch messages when you interject the decorator between a calling object and the base. That can be a good thing or a bad thing in different situations. Okay, so now that that's out, here are some thoughts. :-) I do think that JGType steals some (most?) of the thunder here, but I haven't had much luck getting JGType to work. My app crashes whenever I try to use the dynamic subclassing. Can we get a little bit of sample code on that? You've probably noticed that the first argument of every block set for a selector is :self, which is a reference to the decorator object. In the first version of KFDecorator I had it set up so that all of the following worked: > decorator setBlock:[4] forSelector:#count > decorator setBlock:[ :self | 4] forSelector:#count > decorator setBlock:[ :self :cmd | 4 ] forSelector:#count I couldn't decide if it was confusing and error prone or useful, but eventually changed it to always require the second form. Just another thing to think about. Luke, I'd definitely be interested to see your version of things. We should exchange ideas. :-) You can download my code from the link above. -Ken |
From: Luke N. <l_n...@ya...> - 2005-02-15 05:45:05
|
Hi, I started work on a new software project and decided that I would include F-Script in it from the ground up. The kind of software I'm building has both a end user development/scripting function as well as a deployment function where efficiency is key. Given F-Script's impressive level of integration with ObjC and Cocoa I decided that I would implement all of the scripting and development capability in F-Script. I thought it would be great to give end developers using this software the flexibility to implement methods in F-Script first for prototyping and rapid deployment, and then later recode those methods that were relatively stable and debugged, and needed the additional speed, into ObjC. I therefore added a few methods to the base class in my class hierarchy to support runtime attachment of F-Script Blocks as methods that can be called transparently, using the standard messaging syntax, from either the ObjC or the F-Script side. For example, the following example script adds the method gimmeFive to an object loaded from the framework I'm developing, which is called the Tenth Art Tools. The TATestingDummy object is an ObjC object with no declared methods or member variables. It inherits all of its functionality from TAObject, the base object in the Tenth Art Tools, of which it is a direct descendant. > TATestingDummy attachFSBlock: [5] toSelector:#gimmefive withArgs:''. tadummy := TATestingDummy alloc init. tadummy gimmefive. 5 Although this example is very simplistic the framework supports up to 11 arguments and inheritance and overriding of methods just like ObjC The created Blocks are callable from the ObjC side as well. If an ObjC method of the same name exists it will always override the F-Script Block method, so you can't override compiled-in methods with this code, you can just add new ones. Please note that so far the technology only allows for the addition of instance methods, not class methods. Adding this functionality has really come in handy in situations where I want to script a method for an object. For example, I am using fscripter to create the testbed for the framework I'm developing. Part of the testbed creates an NSOutlineView to view the test results in an organized fashion. Being able to add methods to this dummy object allowed me to create the delegate object that NSOutlineView uses to display its data and script all of its methods as blocks in F-Script. Although it is not in place yet, the scripted methods will have access to member variables via Cocoa Bindings, mainly Key Value Coding. This means that any object that supports KVC could potentially have attachable methods that are modifiable on the fly and have access to all of the functionality that a regular ObjC method has, yet are changeable during runtime without recompile or even program suspension. As the the Tenth Art Tools are ultimately going to be GPLed or some similar open source model I would be happy to share this code or the design with anyone interested and would welcome feedback on this idea. Did I re-invent the wheel? Is there some handy dandy F-Script way to do this and I just missed it on my read-through of the documentation? Is this code already implemented, say in the JGAdditions? Is there any interest in incorporating this functionality in some way to F-Script itself? If so, it would be an honor. Did I completely not get the point of this language and I'm misusing horribly? I hope not. Feel free to let me know what you think. Thanks, Luke Nihlen |
From: John H. <joh...@ve...> - 2005-02-04 01:30:25
|
Yes it loads okay without the developer tools installed. Time to play. thanks JH On Thursday, February 3, 2005, at 08:00 PM, Philippe Mougin wrote: > Oops, it's a big bug. > > I think I've fixed it. Could you try to download F-Script again and =20= > let us know if it run now? > > Thanks > > Philippe > > Le 4 f=E9vr. 05, =E0 00:43, John Hillhouse a =E9crit : > >> It looks like I need to install the developer tools >> >> MacOS/F-Script can't open library: =20 >> /System/Library/Frameworks/InterfaceBuilder.framework/Versions/A/=20 >> InterfaceBuilder (No such file or directory, errno =3D 2) >> >> Still new to OS X >> >> thanks >> JH >> >> On Thursday, February 3, 2005, at 08:21 AM, Philippe Mougin wrote: >> >>> Chances are that an error message is logged when it crash. You can =20= >>> look at this by opening the Mac OS X Console =20 >>> (/Applications/Utilities/Console.app) >>> >>> Do you see an error message ? >>> >>> Philippe >>> >>> Le 3 f=E9vr. 05, =E0 05:29, John Hillhouse a =E9crit : >>> >>>> Greetings, >>>> >>>> I've tried to run fscript without success. >>>> I've downloaded the file and untared it. >>>> >>>> When I try to launch it just bounces a couple of times and quits. >>>> >>>> I'm running 10.2.8 with a fairly new installation. >>>> >>>> Any Suggestions? >>>> >>>> thanks >>>> >>>> John >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive =20 >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save =20= >>>> time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, =20= >>>> etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> F-Script-talk mailing list >>>> F-S...@li... >>>> https://lists.sourceforge.net/lists/listinfo/f-script-talk >>>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive =20 >>> Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save = time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, =20= >>> etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> F-Script-talk mailing list >>> F-S...@li... >>> https://lists.sourceforge.net/lists/listinfo/f-script-talk >>> |
From: Philippe M. <pm...@ac...> - 2005-02-04 00:58:40
|
Oops, it's a big bug. I think I've fixed it. Could you try to download F-Script again and let =20= us know if it run now? Thanks Philippe Le 4 f=E9vr. 05, =E0 00:43, John Hillhouse a =E9crit : > It looks like I need to install the developer tools > > MacOS/F-Script can't open library: =20 > /System/Library/Frameworks/InterfaceBuilder.framework/Versions/A/=20 > InterfaceBuilder (No such file or directory, errno =3D 2) > > Still new to OS X > > thanks > JH > > On Thursday, February 3, 2005, at 08:21 AM, Philippe Mougin wrote: > >> Chances are that an error message is logged when it crash. You can =20= >> look at this by opening the Mac OS X Console =20 >> (/Applications/Utilities/Console.app) >> >> Do you see an error message ? >> >> Philippe >> >> Le 3 f=E9vr. 05, =E0 05:29, John Hillhouse a =E9crit : >> >>> Greetings, >>> >>> I've tried to run fscript without success. >>> I've downloaded the file and untared it. >>> >>> When I try to launch it just bounces a couple of times and quits. >>> >>> I'm running 10.2.8 with a fairly new installation. >>> >>> Any Suggestions? >>> >>> thanks >>> >>> John >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive =20 >>> Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save = time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, =20= >>> etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> F-Script-talk mailing list >>> F-S...@li... >>> https://lists.sourceforge.net/lists/listinfo/f-script-talk >>> >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive =20 >> Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, = etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> F-Script-talk mailing list >> F-S...@li... >> https://lists.sourceforge.net/lists/listinfo/f-script-talk >> |
From: John H. <joh...@ve...> - 2005-02-03 23:43:23
|
It looks like I need to install the developer tools MacOS/F-Script can't open library: =20 /System/Library/Frameworks/InterfaceBuilder.framework/Versions/A/=20 InterfaceBuilder (No such file or directory, errno =3D 2) Still new to OS X thanks JH On Thursday, February 3, 2005, at 08:21 AM, Philippe Mougin wrote: > Chances are that an error message is logged when it crash. You can =20 > look at this by opening the Mac OS X Console =20 > (/Applications/Utilities/Console.app) > > Do you see an error message ? > > Philippe > > Le 3 f=E9vr. 05, =E0 05:29, John Hillhouse a =E9crit : > >> Greetings, >> >> I've tried to run fscript without success. >> I've downloaded the file and untared it. >> >> When I try to launch it just bounces a couple of times and quits. >> >> I'm running 10.2.8 with a fairly new installation. >> >> Any Suggestions? >> >> thanks >> >> John >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive =20 >> Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, = etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> F-Script-talk mailing list >> F-S...@li... >> https://lists.sourceforge.net/lists/listinfo/f-script-talk >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive = Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > F-Script-talk mailing list > F-S...@li... > https://lists.sourceforge.net/lists/listinfo/f-script-talk > |