Slava Pestov | 31 Aug 04:33

fry and curry

Hi all,


Now that the 'fry' abstraction has been around for a while, how do people feel about using it? Should we generally try to phase out direct usages of 'curry' as much as possible, except for in the core, and use 'fry' everywhere else in basis and extra?

Slava
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
Daniel Ehrenberg | 1 Sep 00:03

Re: fry and curry

Well, personally, I never got used to fry. I feel comfortable using
curry and compose for most things. I don't see why it is a problem to
use them except in exceptionally complicated cases. For me, it feels
like fry is doing more than is needed. Are you suggesting that we use

{ 1 2 3 } 4 '[ , + ] map

in place of

{ 1 2 3 } 4 [ + ] curry map

? I don't understand how that is much of an improvement. I'm not sure
how to do what "with" does in terms of fry. For building complicated
quotations, it's another story. It seems like both are useful.

Dan

On Sun, Aug 31, 2008 at 4:36 AM, Slava Pestov <slava@...> wrote:
> Hi all,
>
>
> Now that the 'fry' abstraction has been around for a while, how do people
> feel about using it? Should we generally try to phase out direct usages of
> 'curry' as much as possible, except for in the core, and use 'fry'
> everywhere else in basis and extra?
>
> Slava
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@...
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Slava Pestov | 1 Sep 00:13

Re: fry and curry

Hi Dan,

Yes, that is what I'm suggesting. fry cannot express 'with' so we wouldn't do anything about usages of that word.

Thanks for the input. I'll probably do a sweep of my own code at some point to convert curry/compose to fry, since I find fry more aesthetically pleasing, but I'll let other contributors decide on their own.

Slava

On Sun, Aug 31, 2008 at 5:03 PM, Daniel Ehrenberg <microdan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Well, personally, I never got used to fry. I feel comfortable using
curry and compose for most things. I don't see why it is a problem to
use them except in exceptionally complicated cases. For me, it feels
like fry is doing more than is needed. Are you suggesting that we use

{ 1 2 3 } 4 '[ , + ] map

in place of

{ 1 2 3 } 4 [ + ] curry map

? I don't understand how that is much of an improvement. I'm not sure
how to do what "with" does in terms of fry. For building complicated
quotations, it's another story. It seems like both are useful.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
Eduardo Cavazos | 1 Sep 00:33

Re: fry and curry

Slava wrote:

> fry cannot express 'with' so we wouldn't do anything about usages of that
> word. 

Dan wrote:

> > I'm not sure how to do what "with" does in terms of fry.

	10 { 0 1 2 3 4 } [ - ] with map

Using fry:

	10 { 0 1 2 3 4 } swap '[ , _ - ] map

I'm not saying it's prettier...

Ed

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
janko metelko | 1 Sep 00:52

Re: fry and curry

I have used curry but I haven't fry and I don't know what fry does ...
but looking at the two examples you posted ... fry versions look
strange to me. this is just "looks" based oppinion.. take it as so..

btw and OT ... I am upgrading my company and I renamed it to REFAKTOR
LTD ... your little pesky language was the positive inspiration at
finding some idea to name it after :)

On Mon, Sep 1, 2008 at 12:33 AM, Eduardo Cavazos
<wayo.cavazos@...> wrote:
> Slava wrote:
>
>> fry cannot express 'with' so we wouldn't do anything about usages of that
>> word.
>
> Dan wrote:
>
>> > I'm not sure how to do what "with" does in terms of fry.
>
>        10 { 0 1 2 3 4 } [ - ] with map
>
> Using fry:
>
>        10 { 0 1 2 3 4 } swap '[ , _ - ] map
>
> I'm not saying it's prettier...
>
> Ed
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@...
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Slava Pestov | 1 Sep 00:55

Re: fry and curry

Entering ``"fry" about'' in the listener will explain what it's all about.

And FWIW, there is already a ``Web 2.0'' startup named REFACTR: http://refactr.com/ :-)

Slava

On Sun, Aug 31, 2008 at 5:52 PM, janko metelko <janko.itm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I have used curry but I haven't fry and I don't know what fry does ...
but looking at the two examples you posted ... fry versions look
strange to me. this is just "looks" based oppinion.. take it as so..

btw and OT ... I am upgrading my company and I renamed it to REFAKTOR
LTD ... your little pesky language was the positive inspiration at
finding some idea to name it after :)

On Mon, Sep 1, 2008 at 12:33 AM, Eduardo Cavazos <wayo.cavazos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Slava wrote:
>
>> fry cannot express 'with' so we wouldn't do anything about usages of that
>> word.
>
> Dan wrote:
>
>> > I'm not sure how to do what "with" does in terms of fry.
>
>        10 { 0 1 2 3 4 } [ - ] with map
>
> Using fry:
>
>        10 { 0 1 2 3 4 } swap '[ , _ - ] map
>
> I'm not saying it's prettier...
>
> Ed
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
Factor-talk-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/factor-talk

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
Factor-talk@...
https://lists.sourceforge.net/lists/listinfo/factor-talk
janko metelko | 1 Sep 01:04

Re: fry and curry

I am not at my factor computer so can't try it right now , but will tomorrow.

refactr? these web 2.0 names are really science of it's own :) they
have a db error on their page.

I have to call it refaktor because we can't have company names with
english words ... it's just a company name... my "web 2.0 startup"-ish
projects are named various other names.

BR
Janko

On Mon, Sep 1, 2008 at 12:55 AM, Slava Pestov <slava@...> wrote:
> Entering ``"fry" about'' in the listener will explain what it's all about.
>
> And FWIW, there is already a ``Web 2.0'' startup named REFACTR:
> http://refactr.com/ :-)
>
> Slava
>
> On Sun, Aug 31, 2008 at 5:52 PM, janko metelko <janko.itm@...> wrote:
>>
>> I have used curry but I haven't fry and I don't know what fry does ...
>> but looking at the two examples you posted ... fry versions look
>> strange to me. this is just "looks" based oppinion.. take it as so..
>>
>> btw and OT ... I am upgrading my company and I renamed it to REFAKTOR
>> LTD ... your little pesky language was the positive inspiration at
>> finding some idea to name it after :)
>>
>> On Mon, Sep 1, 2008 at 12:33 AM, Eduardo Cavazos <wayo.cavazos@...>
>> wrote:
>> > Slava wrote:
>> >
>> >> fry cannot express 'with' so we wouldn't do anything about usages of
>> >> that
>> >> word.
>> >
>> > Dan wrote:
>> >
>> >> > I'm not sure how to do what "with" does in terms of fry.
>> >
>> >        10 { 0 1 2 3 4 } [ - ] with map
>> >
>> > Using fry:
>> >
>> >        10 { 0 1 2 3 4 } swap '[ , _ - ] map
>> >
>> > I'm not saying it's prettier...
>> >
>> > Ed
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Factor-talk mailing list
>> > Factor-talk@...
>> > https://lists.sourceforge.net/lists/listinfo/factor-talk
>> >
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@...
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@...
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Slava Pestov | 1 Sep 11:04

Re: fry and curry

Dan,

It might be nice if we could get rid of 2curry, 3curry, 3compose,
prepose eventually. For example, consider this snippet which uses
2curry twice:

[
    [ dup >link where dup ] 2dip
    [ >r >r first r> at r> push-at ] 2curry
    [ 2drop ]
    if
] 2curry each

The fry version is a lot clearer:

'[
    dup >link where dup
    [ first , at , push-at ] [ 2drop ] if
] each

On Sun, Aug 31, 2008 at 5:03 PM, Daniel Ehrenberg <microdan@...> wrote:
> Well, personally, I never got used to fry. I feel comfortable using
> curry and compose for most things. I don't see why it is a problem to
> use them except in exceptionally complicated cases. For me, it feels
> like fry is doing more than is needed. Are you suggesting that we use
>
> { 1 2 3 } 4 '[ , + ] map
>
> in place of
>
> { 1 2 3 } 4 [ + ] curry map
>
> ? I don't understand how that is much of an improvement. I'm not sure
> how to do what "with" does in terms of fry. For building complicated
> quotations, it's another story. It seems like both are useful.
>
> Dan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
janko metelko | 1 Sep 11:07

Re: fry and curry

hm In this case fry looks 10 times nicer to my untrained eyes also.

On Mon, Sep 1, 2008 at 2:04 AM, Slava Pestov <slava@...> wrote:
> Dan,
>
> It might be nice if we could get rid of 2curry, 3curry, 3compose,
> prepose eventually. For example, consider this snippet which uses
> 2curry twice:
>
> [
>    [ dup >link where dup ] 2dip
>    [ >r >r first r> at r> push-at ] 2curry
>    [ 2drop ]
>    if
> ] 2curry each
>
> The fry version is a lot clearer:
>
> '[
>    dup >link where dup
>    [ first , at , push-at ] [ 2drop ] if
> ] each
>
> On Sun, Aug 31, 2008 at 5:03 PM, Daniel Ehrenberg
<microdan@...> wrote:
>> Well, personally, I never got used to fry. I feel comfortable using
>> curry and compose for most things. I don't see why it is a problem to
>> use them except in exceptionally complicated cases. For me, it feels
>> like fry is doing more than is needed. Are you suggesting that we use
>>
>> { 1 2 3 } 4 '[ , + ] map
>>
>> in place of
>>
>> { 1 2 3 } 4 [ + ] curry map
>>
>> ? I don't understand how that is much of an improvement. I'm not sure
>> how to do what "with" does in terms of fry. For building complicated
>> quotations, it's another story. It seems like both are useful.
>>
>> Dan
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@...
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Chris Double | 1 Sep 11:53

Re: fry and curry

Fry is nice, i've been trying to use it more. I prefer using curry if
I'm directly using the item at the top of the stack in the quotation:

  5 [ 2 + ] curry

vs
  5 '[ , + ]

The reason is I find the fry syntax difficult to read due to the low
visual impact of the symbols. The ' and ,. I easily miss them.
Especially in email messages I can look at:

5 '[ "sdfsf" dup drop foo bar boz. , baz ]

and easily miss that there is a ' begining the quotation and , in
there somewhere.

The other two things I find puts me off fry is:

1) I can never remember whether to put fry or namespaces first in the
USING list and I always seem to pick the wrong way first and get
errors. This occurs because I use make too.
2) The fact that fry puts things in the quotation in reverse order of
what they are on the stack blows my mind. I have to unthink how the
stack works normally and rethink how it works in fry. It takes me
longer to work out fry quotations as a result.

On the other hand fry does simplify things. I can live with the lack
of visual emphasis of fry and could probably get used to (2) but it'd
be nice if (1) could be resolved.

Chris.
--

-- 
http://www.bluishcoder.co.nz

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane