Hi David,
On Fri, Jul 27, 2012 at 7:01 PM, David A. Wheeler wrote:
>
> You might want to look more seriously at Scheme shell, scsh, which is
> documented here:
> http://www.scsh.net/docu/docu.html
> (Click on "HTML version" to see the documentation in HTML. Below I'll
> quote a few snippets fro
Ben Booth:
> I agree that curly infix is definitely simpler to understand and implement.
> I guess I'm just thinking about the use case of sweet-expressions lisp for a
> shell scripting language. I would rather be able to type this:
> $ cat file1 file2 file3 > outputfile
> than this:
> $ {(cat
> I agree that curly infix is definitely simpler to understand and implement.
> I guess I'm just thinking about the use case of sweet-expressions lisp for a
> shell scripting language. I would rather be able to type this:
>
>> $ cat file1 file2 file3 > outputfile
Ah, this motivation makes a lot of
On Fri, Jul 27, 2012 at 4:53 PM, Kartik Agaram wrote:
> > {{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}}
> >x = 5 * 3 - 2 + 1
> >y = x * 3 + 2}
>
> Wouldn't this always be strictly more verbose than just inserting
> parentheses? If the goal is readable notation it doesn't seem much of
> a win
> {{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}}
>x = 5 * 3 - 2 + 1
>y = x * 3 + 2}
Wouldn't this always be strictly more verbose than just inserting
parentheses? If the goal is readable notation it doesn't seem much of
a win.
It seems to me that we need to engage in these contortions because
Ben Booth:
> Here's a quick example of how this could be implemented. I'm going to
call this "extended curly infix" notation:
{{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}} x = 5 * 3 - 2 + 1 y =
x * 3 + 2}
So the syntax is a bit like (let ...), each operator gets associativity
and precedence values
Or alternatively, you could omit the precedence and associativity, and have
the precedence be determined by the order that the operators are given, and
default to left associativity:
{{+ - * / =}
x = 5 * 3 - 2 + 1
y = x * 3 + 2}
Ben
On Fri, Jul 27, 2012 at 3:38 PM, Ben Booth wrote:
> Her
Here's a quick example of how this could be implemented. I'm going to call
this "extended curly infix" notation:
{{{+ 1 l} {- 1 l} {* 2 l} {/ 2 l} {= 0 r}}
x = 5 * 3 - 2 + 1
y = x * 3 + 2}
So the syntax is a bit like (let ...), each operator gets associativity and
precedence values that rem
Hi David:
On Fri, Jul 27, 2012 at 1:53 PM, David A. Wheeler wrote:
> I think that won't work at all, for same reasons that version 0.1 didn't
> work out so well.
>
> In version 0.1 of my "readable" approach, infix operators were
> automatically detected. In that case, it used function name patte
One of the things that attracts me to this project is the theoretical
simplicity of it. Curly braces are a simple, elegant solution to the infix
issue--it provides a way to unambiguously define infix expressions, without
worrying about issues like precedence, or registering functions, or other
suc
Ben Booth:
>
> I have a (possibly controversial, possibly insanely stupid) feature request:
Feel free to propose controversial and insane things! We're tackling something
that people have claimed "can't be done", so we need out-of-the-box ideas.
> So, curly infix is great because it's simple
On Fri, Jul 27, 2012 at 10:11 AM, Alan Manuel Gloria wrote:
> But in Lisp, how should we act if
> only some submodule (and not the entire program) is reloaded, and the
> newly loaded changes the precedence of some notation that another
> submodule (which wasn't reloaded) uses. Do we suddenly chan
Do note that while the Haskell spec requires that the compiler
essentially read in every module into a single memory text blob and
*then* compile it, in practice Haskell implementations use separate
compilation. What that sometimes means *in practice* is that if an
infix notation's precedence and
I have a (possibly controversial, possibly insanely stupid) feature
request:
So, curly infix is great because it's simple to understand, easy to
implement, and retains homoiconicity. However, it would be *really* nice to
be able to define infix operators that don't need to be surrounded by curly
14 matches
Mail list logo