[Factor-talk] GSoC: Vector graphics based UI
Hi all, I'm Nikhil Marathe, a second year undergrad from India. I have had an on-off relationship with factor over the last few years. Somehow factor is a bit like Haskell, in that it seems that you need to know some Programming Language Theory or something to do useful things. I may be wrong of course. Now I am really interested in the factor way of doing things though. I think implementing the Factor UI as vector graphics would be a good way for me to finally get over my "fear" of Factor. I have quite a lot of experience with the Qt toolkit and am a KDE developer. I have also experimented with XCB. So I think I have adequate rendering knowledge for something like this. I would like to try and implement the toolkit as a GSoC project. I will apply if Factor gets selected. But please do give me some feedback about whether I'm suited for this task. I believe that in the two months that are still available I should be able to get upto speed on the required libraries. Awaiting your comments. Regards, Nikhil -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] A protocol for sets
I've been working on this sets project for a little bit. Now, in the bags branch of my repository, the sets have replaced the core sets vocabulary. The main thing left at this point is updating all of the libraries to use the new sets. In their current form, I have three words (prune, conjoin, conjoin-at and unique) which I want to eliminate in favor of new set-based words (members, adjoin, adjoin-at and , respectively). But this will be a bit of work to update all the code in the repository, since this is a little more complicated than just changing names--assoc operations must be replaced with their equivalent set operations, and doing this requires some understanding of the flow of data of the program. If anyone wants to help update their own code, I would be grateful for the help: you will probably find the update easier than me to do, and it will give you a chance to learn about the new sets. I apologize for the trouble that the backwards incompatiblity creates, but the new set protocol should make it easier to write and change code in the future. By not tying your code into a specific representation of a set, it should be much easier to change representations as the code evolves. On the end of set implementors, the protocol gives efficient utilities based on some simple primitive operations. Scripting languages often don't have the power that a well-designed class library provides, but Factor gives you the concise syntax and easy-to-manipulate datastructures of a scripting language together with something approaching the extensibility of more mature languages using the sequence, assoc and set protocols, among others. The high-profile efforts to give OCaml a new standard library and Java a new library of data structures demonstrate the importance of getting this right the first time. Note that if you have Factor code that is not included in the Factor repository, you will have to update this on your own if you want to update to the next version of Factor once this is merged in. You have a couple options: you can just copy the old sets defintions in, or you can think about how to make the minor changes it will take to actually use the new set protocol. Neither should take much effort. Dan On Tue, Feb 16, 2010 at 10:45 AM, Daniel Ehrenberg wrote: > Hi everyone, > > Right now, there are a bunch of different ways to represent sets in > Factor. You could use a hashtable for a set, where key? tests > membership, or you could use a sequence for a set, where member? tests > membership, or you could use a bit array for a set, where ?nth tests > membership. Each of these are used different places in the Factor code > base. Changing representations for a set then takes a bunch of work: > all the code to construct and process the set has to be updated. > > Sequences and assocs have protocols, and it seems like it'd be useful > for sets to have one too. This way, the only thing that you need to > change in your code, if you want to change representations, is how you > construct the set. I drafted out the basics of a set protocol in my > git repository at > http://github.com/littledan/Factor/blob/bags/extra/bags/bags.factor . > The most important generic words in the protocol are: > > MIXIN: set > GENERIC: adjoin ( elt set -- ) > GENERIC: in? ( elt set -- ? ) > GENERIC: delete ( elt set -- ) > GENERIC: set-like ( set exemplar -- set' ) > GENERIC: fast-set ( set -- set' ) > GENERIC: members ( set -- sequence ) > > To add something to a set, use the adjoin word. This word currently > works just on sequences. To test if something is in a set, use the in? > word. For sequences, this is implemented as member?. For > hashtable-based sets, this is key?. If sets get moved to core, then > maybe in? will be renamed to member?, subsuming the current member? > word.To remove an item from the set, use delete. This does nothing if > the set does not contain the element deleted. set-like is analogous to > like on sequences; it casts a set to a different set type based on an > exemplar. fast-set gets a representation of a set that's fast to > query--for most sets, this does nothing, but for sequences, it > converts them into a hash-set. members gives a sequence of the > contents of the set. > > The set protocol was designed with two goals: that it be easy to > change set representations, and that the interface is a superset of > what's currently there in the sets vocab for sequences. Binary set > operations that are in sets now are also in the new sets system. > Actually, they are all generic words, so that other set > implementations (like bit sets) can override them for more efficient > implementations. But their default implementations work based just on > those simpler words listed above. I didn't make any binary destructive > set operations (like assoc-union!) because these didn't seem to be in > use anywhere in Factor's code base for sets. > > There are a couple ways that this can cause a backwards > incompatibility, i
Re: [Factor-talk] Factor and the Google Summer of Code
On Feb 26, 2010, at 12:48 PM, Daniel Ehrenberg wrote: > The compiler already allows this, through 'foldable' and 'flushable' > declarations. They are used in the high-level optimizer's constant > folding and dead code elimination transformations, respectively. Loop > fusion would require a substantial reorganization of the compiler, > with an intermediate representation that represents map directly, > rather than its inlined form. I'm not sure if this would really be > possible as long as map uses call and not call(. Instead of making the compiler deal with map and friends, maybe an object oriented approach would work, taking advantage of combinator inlining and object unboxing so that composing special map, filter, etc. objects built optimized loops. -Joe -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor and the Google Summer of Code
> - allow marking a word as pure, that is, no side effects, so > optimizations like merging subsequent maps into one are possible in this > context. The compiler already allows this, through 'foldable' and 'flushable' declarations. They are used in the high-level optimizer's constant folding and dead code elimination transformations, respectively. Loop fusion would require a substantial reorganization of the compiler, with an intermediate representation that represents map directly, rather than its inlined form. I'm not sure if this would really be possible as long as map uses call and not call(. Dan -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor and the Google Summer of Code
On Feb 26, 2010, at 12:24 PM, Kobi Lurie wrote: > - improve debugging in the ide, so that the walker walks the written > code and not the inlined representation. > - better error reporting - when possible, try to pinpoint the exact > problem. for example, if there is a circular dependency let the user > know which vocabs responsible and which words create the situation. I agree that error reporting and debugger improvements would be great projects, Kobi. In fact, I'm in the middle of writing those up as project ideas. If you have anything to add to my proposals once they're up on the wiki, feel free to add to them. > - a contracts framework as a vocabulary. I think it's good but have no > real use cases to prove. Checks inputs and outputs with (excessive) > predicates when debug is on, > and raises an error to show in-between which words this contract failed. Sounds good. This is possible right now using the "typed" library and predicate classes, but a more formalized contract library with the option of stripping out assertions at deploy time could be useful. > - allow marking a word safe or unsafe. all the words that use an unsafe > word would become unsafe themselves, unless explicitly marked safe. > - allow marking a word as pure, that is, no side effects, so > optimizations like merging subsequent maps into one are possible in this > context. These both seem like valid project ideas. But be warned that while "pure" makes loop fusion theoretically possible, it doesn't necessarily make it easy to implement. -Joe -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor and the Google Summer of Code
Hi Joe and all, I have a few ideas, but you guys should approve if they're acceptable: - improve debugging in the ide, so that the walker walks the written code and not the inlined representation. - better error reporting - when possible, try to pinpoint the exact problem. for example, if there is a circular dependency let the user know which vocabs responsible and which words create the situation. - a contracts framework as a vocabulary. I think it's good but have no real use cases to prove. Checks inputs and outputs with (excessive) predicates when debug is on, and raises an error to show in-between which words this contract failed. - allow marking a word safe or unsafe. all the words that use an unsafe word would become unsafe themselves, unless explicitly marked safe. - allow marking a word as pure, that is, no side effects, so optimizations like merging subsequent maps into one are possible in this context. we all know how a person can lose time and focus in debugging, instead of laying out his ideas in clear code. just ideas / day-dreams what do you guys think? Kobi On 25/2/2010 23:54, Joe Groff wrote: > Hi everyone. The submission window for this year's Google Summer of Code is > fast approaching—March 8 through 12. While the shadowy Factor High Council > has discussed entering GSoC behind closed doors before, I think this is the > year to do it for real. To that end, I've started filling out an ideas page > and some submission forms on the concatenative.org wiki: > > https://concatenative.org/wiki/view/Factor/GSoC/2010 > https://concatenative.org/wiki/view/Factor/GSoC/2010/Submission > https://concatenative.org/wiki/view/Factor/GSoC/2010/Proposal%20Template > > I invite everyone interested in Factor to put up their own ideas for GSoC > projects on the wiki. This is a great opportunity not only to get Google to > pay for improvements to Factor, but also to raise the profile of the language > in the academic community and the open-source community at large. > > -Joe > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > -- China: stop persecuting Falun Gong! http://faluninfo.net URGENT: Innocent people are being persecuted for their belief inside Communist China. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
On 26 February 2010 20:04, Daniel Ehrenberg wrote: > A good starting point is the article, "Combinator stack effects" Ah, I follow now. I had read that article before, but the implications hadn't sunk in. Thanks, Paul -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
A good starting point is the article, "Combinator stack effects" On Fri, Feb 26, 2010 at 1:39 PM, Paul Moore wrote: > On 26 February 2010 19:31, Daniel Ehrenberg wrote: >> One solution to the whole set of incompatiblities between call and >> call( would be to eliminate call in favor of call(, eliminating the >> combinator inlining system in the process. In my opinion, this would >> make the whole language much cleaner and nicer. No combinator inlining >> semantics to remember when writing your program; you can just think >> about how the compiler works when optimizing your code. > > That intrigued me - for the (pretty simple) code I've written, I've > never thought about combinator inlining semantics - makes me wonder > what I'm missing :-) > > Can you give a pointer to the docs where I can find out a bit more > about this (or explain it here)? Factor's performance features > fascinate me... > > Thanks, > Paul > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
On 26 February 2010 19:31, Daniel Ehrenberg wrote: > One solution to the whole set of incompatiblities between call and > call( would be to eliminate call in favor of call(, eliminating the > combinator inlining system in the process. In my opinion, this would > make the whole language much cleaner and nicer. No combinator inlining > semantics to remember when writing your program; you can just think > about how the compiler works when optimizing your code. That intrigued me - for the (pretty simple) code I've written, I've never thought about combinator inlining semantics - makes me wonder what I'm missing :-) Can you give a pointer to the docs where I can find out a bit more about this (or explain it here)? Factor's performance features fascinate me... Thanks, Paul -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
Well, almost everything uses call rather than call(, because it is more flexible in a subtle way. The difference is that call allows what the shadowy Factor council likes to refer to as "row polymorphism", that is, quotations passed to call can refer to items lower on the stack. For example, you can use this to define reduce in terms of each: you can pass any quotation you want to each, as long as its stack effect is that it reduces the height of the stack by one. Another example is that the quotation for with-scope can have any stack effect. One solution to the whole set of incompatiblities between call and call( would be to eliminate call in favor of call(, eliminating the combinator inlining system in the process. In my opinion, this would make the whole language much cleaner and nicer. No combinator inlining semantics to remember when writing your program; you can just think about how the compiler works when optimizing your code. Everything would work with dynamic quotations just like static ones. Unlike call, call( has a runtime fallback and doesn't require that quotations are inlined. Call( gives better error messages because it is actually explicitly specified what the intended stack effect of quotations is. However, no concatenative language has yet been designed which is both dynamically typed and supports call( with row polymorphism. Andreas Rossberg specified a static type system for a concatenative language with row polymorphism (http://lambda-the-ultimate.org/node/1899#comment-23169), but that alone wouldn't be enough for Factor. It has to be worked out how this feature would interact with the rest of Factor, not to mention the need for convenient and intuitive syntax. It would also be nice to have type inference here, though that's not necessary. This would be an interesting project for a theoretically-inclined contributor who is OK with a high chance of failure (or even in the event of some kind of success, a chance that the result will not be included in the core Factor language). I would be very pleased to see someone work on a project like this. Coming back to your original point, it would cause a lot of duplication to have 'paren' versions of several combinators: bi@(, cleave(, map(, with-variable(--there's no end! So this wouldn't be a very good idea. It's not *too* verbose, I think, to just write '[ _ call( x -- y ) ] bi@ rather than bi@( x -- y ), in my opinion, and it expresses the programmer's intent very clearly. Dan On Fri, Feb 26, 2010 at 11:57 AM, Jon Harper wrote: > Here's where the code is : http://rosettacode.org/wiki/Active_object#Factor > I really need dynamic quotations because quotations are inputted by the user. > > I was surprised that no combinator defines a similar word to call(. > For example, I thought there would be a bi@( word. Maybe even for all > combinators : cleave(, keep(, etc. However that makes many many new > words.. So add-stack-effect seemed like a good compromise. It's true > though that dynamic quotations are rarely needed and I guess that's > why those words aren't defined. > > Also, I was wondering why the slot changer uses "call" instead of > "call( x -- x )". I find it easier to understand when extra arguments > are currified in the quotation rather than left on the stack behind > the object with "with" anyway. And that makes it work with dynamic > quotations. > > Jon Harper > > > > On Fri, Feb 26, 2010 at 6:31 PM, Samuel Tardieu wrote: >> >> >> 2010/2/26 Daniel Ehrenberg >> >>> Well, I think you could also do this: >>> >>> build-dynamic-quotation '[ _ call( x -- y ) ] bi@ >> >> Sure, this is equivalent.But we wanted to be able to "tag" several >> quotations with different stack effects, hence the separate word. >> >>> >>> However, you should reconsider whether you really need to build a >>> dynamic quotation. Remember, building a quotation with curry and >>> compose and fry doesn't necessarily make it dynamic. >> >> Agreed. I'll let Jon explain in which context he did it. I only assisted in >> answering a specific question :) >> >> Sam >> >> -- >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> ___ >> Factor-talk mailing list >> Factor-talk@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/factor-talk >> >> > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _
Re: [Factor-talk] Modern posting netiquette?
On 26 February 2010 16:28, Terrence Brannon wrote: > I'm wondering about the most polite way to list code when you need > help. Before hyperlinks, you had to inline all the code. But I think > that hampers readability of the document as a whole. I am starting to > prefer a markdown way of writing my emails, putting links to relevant > source files instead of inlining them, like so: Personally, I'd be unlikely to follow a link - if the code isn't inline I would probably not read it (and hence would be less likely to answer). If the code is long enough that it's going to be annoying inline, you probably need to edit your question to use a shorter example (especially in factor, which is particularly concise!) Paul. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
Here's where the code is : http://rosettacode.org/wiki/Active_object#Factor I really need dynamic quotations because quotations are inputted by the user. I was surprised that no combinator defines a similar word to call(. For example, I thought there would be a bi@( word. Maybe even for all combinators : cleave(, keep(, etc. However that makes many many new words.. So add-stack-effect seemed like a good compromise. It's true though that dynamic quotations are rarely needed and I guess that's why those words aren't defined. Also, I was wondering why the slot changer uses "call" instead of "call( x -- x )". I find it easier to understand when extra arguments are currified in the quotation rather than left on the stack behind the object with "with" anyway. And that makes it work with dynamic quotations. Jon Harper On Fri, Feb 26, 2010 at 6:31 PM, Samuel Tardieu wrote: > > > 2010/2/26 Daniel Ehrenberg > >> Well, I think you could also do this: >> >> build-dynamic-quotation '[ _ call( x -- y ) ] bi@ > > Sure, this is equivalent.But we wanted to be able to "tag" several > quotations with different stack effects, hence the separate word. > >> >> However, you should reconsider whether you really need to build a >> dynamic quotation. Remember, building a quotation with curry and >> compose and fry doesn't necessarily make it dynamic. > > Agreed. I'll let Jon explain in which context he did it. I only assisted in > answering a specific question :) > > Sam > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > > -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Modern posting netiquette?
On Fri, Feb 26, 2010 at 11:28:43AM -0500, Terrence Brannon wrote: > I'm wondering about the most polite way to list code when you need > help. Before hyperlinks, you had to inline all the code. But I think > that hampers readability of the document as a whole. I am starting to > prefer a markdown way of writing my emails, putting links to relevant > source files instead of inlining them, like so: I'm not sure that Markdown syntax really adds anything. I'd just put the links inline, like so: http://paste.factorcode.org/paste?id=1042 Note the use of the factorcode.org pastebin, which produces nice short URLs. [BTW: the spambots have found their way around the reverse-psychology captcha. See http://paste.factorcode.org/paste?id=1494 .] But for short enough code samples (less than ten lines or so), I think it's fine to include code inline; code that follows the Factor style guidelines should fit nicely in a terminal window. Then again, I read email in a fixed-width font; perhaps people who read mail via the Web will feel differently. Miles -- Love makes you do the wacky. -- Willow -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
2010/2/26 Daniel Ehrenberg Well, I think you could also do this: > > build-dynamic-quotation '[ _ call( x -- y ) ] bi@ > Sure, this is equivalent.But we wanted to be able to "tag" several quotations with different stack effects, hence the separate word. > However, you should reconsider whether you really need to build a > dynamic quotation. Remember, building a quotation with curry and > compose and fry doesn't necessarily make it dynamic. > Agreed. I'll let Jon explain in which context he did it. I only assisted in answering a specific question :) Sam -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Adding a stack effect to a quotation
Well, I think you could also do this: build-dynamic-quotation '[ _ call( x -- y ) ] bi@ However, you should reconsider whether you really need to build a dynamic quotation. Remember, building a quotation with curry and compose and fry doesn't necessarily make it dynamic. In the current Factor code base, the main use cases of dynamic quotations is when using quotations stored in places like dynamically scoped variables (for example in the parser), word properties (in the compiler) or tuple slots (in Furnace), or in genuinely dynamic situations (like the listener). Most other situations can be handled with high-level code without building quotations dynamically. Dan On Fri, Feb 26, 2010 at 11:13 AM, Samuel Tardieu wrote: > Jon and I were discussing earlier today of a way to use a dynamically built > quotation with "bi@" and other combinators. > > I suggested the word > > : add-stack-effect ( quot effect -- quot' ) [ call-effect ] 2curry ; inline > > so that we can call > > build-dynamic-quotation (( x -- y )) add-stack-effect bi@ > > Is there a better way to do it? > > Sam > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > > -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Adding a stack effect to a quotation
Jon and I were discussing earlier today of a way to use a dynamically built quotation with "bi@" and other combinators. I suggested the word : add-stack-effect ( quot effect -- quot' ) [ call-effect ] 2curry ; inline so that we can call build-dynamic-quotation (( x -- y )) add-stack-effect bi@ Is there a better way to do it? Sam -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] scaffold-help USING: should include everything in the vocab's using + the vocab + tools.test
On Fri, Feb 26, 2010 at 10:43 AM, Jon Harper wrote: > Could the problem be the word next ? Yes, this was the problem. I did not include the vocab which had the GENERIC: statement in it. I've learned the proper USING: for the test file now from Philipp in the IRC channel. -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Modern posting netiquette?
I'm wondering about the most polite way to list code when you need help. Before hyperlinks, you had to inline all the code. But I think that hampers readability of the document as a whole. I am starting to prefer a markdown way of writing my emails, putting links to relevant source files instead of inlining them, like so: Which is perplexing because [the test file](http://gitorious.org/project_factor/data-maker/blobs/master/field/from-format/from-format-tests.factor) has USING: data-maker.field.from-format ... ; and data-maker.field.from-format [defines next](http://gitorious.org/project_factor/data-maker/blobs/master/field/from-format/from-format. I think that makes for a much more digestible email than pasting in lines of code, especially when the source file gets above 10 lines. What do you think? -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] test runs fine when manually typed into listener but fails when invoked
2010/2/26 Philipp Brüschweiler : > Am Fri, 26 Feb 2010 09:56:38 -0500 > schrieb Terrence Brannon : > >> I dont understand why I can type the input quotation into the listener >> and get back a result, yet I get "Data stack underflow" when I type >> >> (listener) "data-maker.field.from-format" unit-test > > I think you want to do this instead > > "data-maker.field.from-format" test > When I do that I get 5: [ t ] [ "George (\\d\\d\\d)" next ] unit-test ^ No word named ``next'' found in current vocabulary search path Which is perplexing because [the test file](http://gitorious.org/project_factor/data-maker/blobs/master/field/from-format/from-format-tests.factor) has USING: data-maker.field.from-format ... ; and data-maker.field.from-format [defines next](http://gitorious.org/project_factor/data-maker/blobs/master/field/from-format/from-format.factor) -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] test runs fine when manually typed into listener but fails when invoked
2010/2/26 Philipp Brüschweiler : > Am Fri, 26 Feb 2010 09:56:38 -0500 > schrieb Terrence Brannon : > >> I dont understand why I can type the input quotation into the listener >> and get back a result, yet I get "Data stack underflow" when I type >> >> (listener) "data-maker.field.from-format" unit-test > > I think you want to do this instead > > "data-maker.field.from-format" test When I do that, I get -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] test runs fine when manually typed into listener but fails when invoked
Am Fri, 26 Feb 2010 09:56:38 -0500 schrieb Terrence Brannon : > I dont understand why I can type the input quotation into the listener > and get back a result, yet I get "Data stack underflow" when I type > > (listener) "data-maker.field.from-format" unit-test I think you want to do this instead "data-maker.field.from-format" test > > My actual source code is > [here](http://gitorious.org/project_factor/data-maker/trees/master/field/from-format) > but the problematic test case is below. > > > USING: data-maker.field.from-format tools.test ; > IN: data-maker.field.from-format.tests > > [ t ] [ "George (\\d\\d\\d)" next ] unit-test > > ! [ t ] > ! [ DELIMITED: > ! Terrence (\d\d\d) \d\d\d-\d\d\d\d > !next > ! ] unit-test > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] test runs fine when manually typed into listener but fails when invoked
Could the problem be the word next ? You're not specifying which vocab it comes from, and it's defined in many vocabs. The listener has many vocabs loaded and it's probably calling a different word than the one you think. Jon Harper On Fri, Feb 26, 2010 at 3:56 PM, Terrence Brannon wrote: > I dont understand why I can type the input quotation into the listener > and get back a result, yet I get "Data stack underflow" when I type > > (listener) "data-maker.field.from-format" unit-test > > My actual source code is > [here](http://gitorious.org/project_factor/data-maker/trees/master/field/from-format) > but the problematic test case is below. > > > USING: data-maker.field.from-format tools.test ; > IN: data-maker.field.from-format.tests > > [ t ] [ "George (\\d\\d\\d)" next ] unit-test > > ! [ t ] > ! [ DELIMITED: > ! Terrence (\d\d\d) \d\d\d-\d\d\d\d > ! next > ! ] unit-test > > -- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] test runs fine when manually typed into listener but fails when invoked
I dont understand why I can type the input quotation into the listener and get back a result, yet I get "Data stack underflow" when I type (listener) "data-maker.field.from-format" unit-test My actual source code is [here](http://gitorious.org/project_factor/data-maker/trees/master/field/from-format) but the problematic test case is below. USING: data-maker.field.from-format tools.test ; IN: data-maker.field.from-format.tests [ t ] [ "George (\\d\\d\\d)" next ] unit-test ! [ t ] ! [ DELIMITED: ! Terrence (\d\d\d) \d\d\d-\d\d\d\d !next ! ] unit-test -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk