[Proposal] Lua-y lambda syntax

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Proposal] Lua-y lambda syntax

Soni "They/Them" L.
So, out of all syntax proposals for lambas, I'm surpised nobody thought
of this beauty.

You see, we have `local x = function(a,b,c) return thing end` syntax. BUT:

1. It's a syntax error to use `function(a,b,c) =thing end`, even if the
REPL accepts `=` as an alias for `return`.
2. Do we need `end` if we restrict it to a single expression?

Combine these 2, and the simplest solution seems to be:

local x = function(a,b,c) = thing

AND we can still get multiple returns:

local x = function(a,b,c) = select(1,a,b,c)
print(x(1, 2, 3)) --> 1, 2, 3

The idea is, function(a,b,c) starts a plain old function. If the next
token is a =, this has to be a lambda. Otherwise it has to be a function.

There's no ambiguity here since the proposed syntax is currently a
syntax error. It also looks very much like Lua.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Egor Skriptunoff-2
On Thu, Apr 27, 2017 at 5:43 PM, Soni L. <[hidden email]> wrote:
So, out of all syntax proposals for lambas, I'm surpised nobody thought of this beauty.

You see, we have `local x = function(a,b,c) return thing end` syntax. BUT:

1. It's a syntax error to use `function(a,b,c) =thing end`, even if the REPL accepts `=` as an alias for `return`.
2. Do we need `end` if we restrict it to a single expression?

Combine these 2, and the simplest solution seems to be:

local x = function(a,b,c) = thing

AND we can still get multiple returns:

local x = function(a,b,c) = select(1,a,b,c)
print(x(1, 2, 3)) --> 1, 2, 3

The idea is, function(a,b,c) starts a plain old function. If the next token is a =, this has to be a lambda. Otherwise it has to be a function.

There's no ambiguity here since the proposed syntax is currently a syntax error. It also looks very much like Lua.


The following looks nice:
local swap = function(a,b) = b,a

But what does the following nested lambda
local x = function(a,b) = function() = a, b
mean:
local x = function(a,b) = (function() = a, b)
or
local x = function(a,b) = (function() = a), b
?

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Soni "They/Them" L.


On 2017-04-27 02:33 PM, Egor Skriptunoff wrote:

> On Thu, Apr 27, 2017 at 5:43 PM, Soni L. <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     So, out of all syntax proposals for lambas, I'm surpised nobody
>     thought of this beauty.
>
>     You see, we have `local x = function(a,b,c) return thing end`
>     syntax. BUT:
>
>     1. It's a syntax error to use `function(a,b,c) =thing end`, even
>     if the REPL accepts `=` as an alias for `return`.
>     2. Do we need `end` if we restrict it to a single expression?
>
>     Combine these 2, and the simplest solution seems to be:
>
>     local x = function(a,b,c) = thing
>
>     AND we can still get multiple returns:
>
>     local x = function(a,b,c) = select(1,a,b,c)
>     print(x(1, 2, 3)) --> 1, 2, 3
>
>     The idea is, function(a,b,c) starts a plain old function. If the
>     next token is a =, this has to be a lambda. Otherwise it has to be
>     a function.
>
>     There's no ambiguity here since the proposed syntax is currently a
>     syntax error. It also looks very much like Lua.
>
>
> The following looks nice:
> local swap = function(a,b) = b,a
local swap = (function(a,b) = b), a
>
> But what does the following nested lambda
> local x = function(a,b) = function() = a, b
> mean:
> local x = function(a,b) = (function() = a, b)
> or
> local x = function(a,b) = (function() = a), b
> ?
>
You need to use select() if you want multiple return values. It's a
single end-of-list-expr.

(OT: Sorry for accidentally replying wrong. Some thunderbird update
changed the behaviour of the "reply" button so instead of defaulting to
reply-to-list I need to actually click the reply-to-list button, which
I'm not used to doing.)

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Egor Skriptunoff-2
On Thu, Apr 27, 2017 at 8:59 PM, Soni L. <[hidden email]> wrote:

You need to use select() if you want multiple return values.

That's awkward.
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Soni "They/Them" L.


On 2017-04-27 03:12 PM, Egor Skriptunoff wrote:
> On Thu, Apr 27, 2017 at 8:59 PM, Soni L. <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     You need to use select() if you want multiple return values.
>
>
> That's awkward.
local function nop(...) = select(1, ...)

local function swap(a,b) = nop(b,a)

It's the best way to add lambdas without introducing wildly different
syntax.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Russell Haley
On Thu, Apr 27, 2017 at 11:39 AM, Soni L. <[hidden email]> wrote:

>
>
> On 2017-04-27 03:12 PM, Egor Skriptunoff wrote:
>>
>> On Thu, Apr 27, 2017 at 8:59 PM, Soni L. <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>
>>     You need to use select() if you want multiple return values.
>>
>>
>> That's awkward.
>
> local function nop(...) = select(1, ...)
>
> local function swap(a,b) = nop(b,a)
>
> It's the best way to add lambdas without introducing wildly different
> syntax.
>
>
> --
> Disclaimer: these emails may be made public at any given time, with or
> without reason. If you don't agree with this, DO NOT REPLY.
>
>
I was just contemplating how one would add a linq like feature to Lua
for searching and returning result sets as tables without having to
write iterators. This syntax would solve that problem quite nicely,
wouldn't it? However, would that mean the need to add other functions
like where(), join() and similar 'SQL like' concepts?

Russ

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Scott Morgan
In reply to this post by Soni "They/Them" L.
On 04/27/2017 06:59 PM, Soni L. wrote:
> You need to use select() if you want multiple return values. It's a
> single end-of-list-expr.

How about requiring parens as part of the syntax?

e.g.
function(a,b) =( b,a )
function() =( "foo" )

Or would that push the parser too far?

Scott


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Soni "They/Them" L.
In reply to this post by Russell Haley


On 2017-04-27 04:00 PM, Russell Haley wrote:

> On Thu, Apr 27, 2017 at 11:39 AM, Soni L. <[hidden email]> wrote:
>>
>> On 2017-04-27 03:12 PM, Egor Skriptunoff wrote:
>>> On Thu, Apr 27, 2017 at 8:59 PM, Soni L. <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>
>>>      You need to use select() if you want multiple return values.
>>>
>>>
>>> That's awkward.
>> local function nop(...) = select(1, ...)
>>
>> local function swap(a,b) = nop(b,a)
>>
>> It's the best way to add lambdas without introducing wildly different
>> syntax.
>>
>>
>> --
>> Disclaimer: these emails may be made public at any given time, with or
>> without reason. If you don't agree with this, DO NOT REPLY.
>>
>>
> I was just contemplating how one would add a linq like feature to Lua
> for searching and returning result sets as tables without having to
> write iterators. This syntax would solve that problem quite nicely,
> wouldn't it? However, would that mean the need to add other functions
> like where(), join() and similar 'SQL like' concepts?
>
> Russ
>

... Linq?

Anyway, a DSL for SQL queries in Lua sounds awesome. I guess this
"lambda syntax" I proposed would do for some impressive DSLs.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Soni "They/Them" L.
In reply to this post by Scott Morgan


On 2017-04-27 09:14 PM, Scott Morgan wrote:

> On 04/27/2017 06:59 PM, Soni L. wrote:
>> You need to use select() if you want multiple return values. It's a
>> single end-of-list-expr.
> How about requiring parens as part of the syntax?
>
> e.g.
> function(a,b) =( b,a )
> function() =( "foo" )
>
> Or would that push the parser too far?
>
> Scott
>
>

Ehh... not sure how I feel about this.

return (thing) already has a meaning. Requiring parens would be awful,
but optional parens would be confusing (is "=(val)" the same as "return
val" or "return (val)"? read the docs to find out!)...

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Jay Carlson
In reply to this post by Russell Haley
[Is there a comprehensive list somewhere of all the big ways to build DSLs in Lua?]

On Apr 27, 2017, at 3:00 PM, Russell Haley <[hidden email]> wrote:
>>
> I was just contemplating how one would add a linq like feature to Lua
> for searching and returning result sets as tables without having to
> write iterators. This syntax would solve that problem quite nicely,
> wouldn't it? However, would that mean the need to add other functions
> like where(), join() and similar 'SQL like' concepts?

For any programming language people who aren't familiar with it, here's the outer language's syntactic view of LINQ:

LINQ is a way of writing a kind of AST literal, parsed from a specific query sub-language.

The query sublanguage is itself interesting. At runtime, the AST can be executed directly, compiled to bytecode, or unparsed into SQL queries (for example). But what I am especially interested in for Lua are meta-mechanisms, the things that can support multiple little languages. LINQ is a good instance of something it would be nice to be able to implement, then.[1]

One solution is to create your language out of function calls, tables, operators, and values, in the way the native LPeg does. As I've complained ad tedium, there is still no good way to create new control mechanisms this way except through lambdas or Smalltalk/Ruby-style blocks; both postpone evaluation of code in the current scope. But maybe you don't need those control mechanisms very much. And even if you do need lambdas, lexical scoping always works the right way.

Deserving special mention for constructing DSLs are common syntax hacks, like chaining methods, abusing "f 'name' {}", etc.

Another is macros, sometimes just to augment the previous approach just enough. I have convinced myself that there will never be execution at compile-time in Lua (and also convinced myself that it is a good judgement for Lua). Sorta in the same category are various other meta-Luas. The cost is direct source compatibility.[2]

My favorite method (but alas the one I use least) is to parse a string at runtime and turn it into a Lua function. So taking the Wikipedia LINQ C# example, it would look something like:

results =  linq[[
  from c in SomeCollection
  where c.SomeProperty < 10
  select new {c.SomeProperty, c.OtherProperty} ]]

for result in ipairs(results) do
  print(result)
end

Conveniently for me, there are no unbound variables in that query. Because otherwise I'd have to write something like:

results = linq{[[
  from c in SomeCollection
  where c.SomeProperty < limit
  select new {c.SomeProperty, c.OtherProperty} ]],
  limit=limit}

Note that the stuff in linq[[ ]]'s function can't write to any variables in the outer scope.[3] It can write on objects it's passed, though.

--
Jay

[1]: I'd like it to be possible; that being said, I don't plan on implementing LINQ-for-Lua, unless perhaps a patient person pays me.

[2]: You could use LuaMacro 2 if you want macro-transformed source back. The laconic version of the Powell Doctrine is, "Have an exit plan." This applies to software too.

[3]: I like to use "%limit" as the syntax for variables exported from Lua. This is what Lua 4.0 did inside procedures, and who doesn't want to be reminded of the Lua before empty proxy-tables were necessary? ;-)
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Russell Haley
On Fri, Apr 28, 2017 at 4:36 PM, Jay Carlson <[hidden email]> wrote:

> [Is there a comprehensive list somewhere of all the big ways to build DSLs in Lua?]
>
> On Apr 27, 2017, at 3:00 PM, Russell Haley <[hidden email]> wrote:
>>>
>> I was just contemplating how one would add a linq like feature to Lua
>> for searching and returning result sets as tables without having to
>> write iterators. This syntax would solve that problem quite nicely,
>> wouldn't it? However, would that mean the need to add other functions
>> like where(), join() and similar 'SQL like' concepts?
>
> For any programming language people who aren't familiar with it, here's the outer language's syntactic view of LINQ:
>
> LINQ is a way of writing a kind of AST literal, parsed from a specific query sub-language.
>
> The query sublanguage is itself interesting. At runtime, the AST can be executed directly, compiled to bytecode, or unparsed into SQL queries (for example). But what I am especially interested in for Lua are meta-mechanisms, the things that can support multiple little languages. LINQ is a good instance of something it would be nice to be able to implement, then.[1]
>
> One solution is to create your language out of function calls, tables, operators, and values, in the way the native LPeg does. As I've complained ad tedium, there is still no good way to create new control mechanisms this way except through lambdas or Smalltalk/Ruby-style blocks; both postpone evaluation of code in the current scope. But maybe you don't need those control mechanisms very much. And even if you do need lambdas, lexical scoping always works the right way.
>
> Deserving special mention for constructing DSLs are common syntax hacks, like chaining methods, abusing "f 'name' {}", etc.
>
> Another is macros, sometimes just to augment the previous approach just enough. I have convinced myself that there will never be execution at compile-time in Lua (and also convinced myself that it is a good judgement for Lua). Sorta in the same category are various other meta-Luas. The cost is direct source compatibility.[2]
>
> My favorite method (but alas the one I use least) is to parse a string at runtime and turn it into a Lua function. So taking the Wikipedia LINQ C# example, it would look something like:
>
> results =  linq[[
>   from c in SomeCollection
>   where c.SomeProperty < 10
>   select new {c.SomeProperty, c.OtherProperty} ]]
>
> for result in ipairs(results) do
>   print(result)
> end
>
> Conveniently for me, there are no unbound variables in that query. Because otherwise I'd have to write something like:
>
> results = linq{[[
>   from c in SomeCollection
>   where c.SomeProperty < limit
>   select new {c.SomeProperty, c.OtherProperty} ]],
>   limit=limit}
>
> Note that the stuff in linq[[ ]]'s function can't write to any variables in the outer scope.[3] It can write on objects it's passed, though.

I believe Ronald has provided the functional implementation to those
imagined keyword mappings in his Moses library (another post)?
http://yonaba.github.io/Moses/doc/

His chaining seems to be a "syntax hack you mentioned" but in .net
there is a similar syntax to access LINQ without the DSL.

Russ

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

steve donovan
In reply to this post by Jay Carlson
On Sat, Apr 29, 2017 at 1:36 AM, Jay Carlson <[hidden email]> wrote:

> My favorite method (but alas the one I use least) is to parse a string at runtime and turn it into a Lua function. So taking the Wikipedia LINQ C# example, it would look something like:
>
> results =  linq[[
>   from c in SomeCollection
>   where c.SomeProperty < 10
>   select new {c.SomeProperty, c.OtherProperty} ]]
>
> for result in ipairs(results) do
>   print(result)
> end

I did something like this for constructing queries for columnar data:

http://stevedonovan.github.io/Penlight/api/manual/06-data.md.html#Reading_Columnar_Data

(see the examples for pl.data)

The trick was to convert the pseudo-SQL into equivalent Lua, which is
then loaded. Gotta love eval() in all its forms ;)

As for macros, I was a believer. But experience suggests that ad-hoc
syntax has to be very carefully designed - harder than writing good
libraries.  Design sense is relatively rare in the universe.

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Dirk Laurie-2
Like most threads, this one has wandered way off topic. I apologize
insincerely for the fact that this will look on a threaded reader like
a reply to Steve's most recent post.

I have never grasped why people want lambda syntax. The following
is the existing Lua syntax:

> fct = λ (a,b,c) → 10*(10*a+b)+c ▪
> print(fct(2,7,3))  --> 273

I actually have just made a simple hack of the Lua interpreter that
did the above.

I.e. there is nothing verbose about the syntax, people are just too
lazy to type 'function', 'return' and 'end'.

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Sean Conner
It was thus said that the Great Dirk Laurie once stated:

> Like most threads, this one has wandered way off topic. I apologize
> insincerely for the fact that this will look on a threaded reader like
> a reply to Steve's most recent post.
>
> I have never grasped why people want lambda syntax. The following
> is the existing Lua syntax:
>
> > fct = λ (a,b,c) → 10*(10*a+b)+c ▪
> > print(fct(2,7,3))  --> 273
>
> I actually have just made a simple hack of the Lua interpreter that
> did the above.
>
> I.e. there is nothing verbose about the syntax, people are just too
> lazy to type 'function', 'return' and 'end'.

  +1

  -spc (Who is becoming convinced that more and more programmers don't
        really want to type anything ... )

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Soni "They/Them" L.
In reply to this post by Dirk Laurie-2


On 2017-04-29 05:49 AM, Dirk Laurie wrote:

> Like most threads, this one has wandered way off topic. I apologize
> insincerely for the fact that this will look on a threaded reader like
> a reply to Steve's most recent post.
>
> I have never grasped why people want lambda syntax. The following
> is the existing Lua syntax:
>
>> fct = λ (a,b,c) → 10*(10*a+b)+c ▪
>> print(fct(2,7,3))  --> 273
> I actually have just made a simple hack of the Lua interpreter that
> did the above.
>
> I.e. there is nothing verbose about the syntax, people are just too
> lazy to type 'function', 'return' and 'end'.
>

function a_query(_) =_.SELECT("*").FROM("users").WHERE("age < 100")
for x in do_query(a_query) do
   ...
end

No ugly `end`, looks a lot more like SQL. It's a new option for DSLs.

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.


Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Jay Carlson
In reply to this post by steve donovan
On Apr 29, 2017 3:02 AM, "steve donovan" <[hidden email]> wrote:
On Sat, Apr 29, 2017 at 1:36 AM, Jay Carlson <[hidden email]> wrote:
> My favorite method (but alas the one I use least) is to parse a string at runtime and turn it into a Lua function. So taking the Wikipedia LINQ C# example, it would look something like:
>
> results =  linq[[
>   from c in SomeCollection
>   where c.SomeProperty < 10
>   select new {c.SomeProperty, c.OtherProperty} ]]
>
> for result in ipairs(results) do
>   print(result)
> end

I did something like this for constructing queries for columnar data:

http://stevedonovan.github.io/Penlight/api/manual/06-data.md.html#Reading_Columnar_Data

I should just get used to glancing that manual again before opening my mouth. As usual with pl, It's In There.

BTW, I think there are two kinds of SQL[1] bindings for Lua: single-target, and ones with SQL mini parsers--because you can't do portable parameterized queries, and if you don't need parameterized queries in a program, why are you using SQL?

What's pl's compatibility profile these days? 5.1+5.2? I've been avoiding doing it seriously, but the still-on-rushing JSON juggernaut[2] suggests a need for jsom. 


As for macros, I was a believer. But experience suggests that ad-hoc
syntax has to be very carefully designed - harder than writing good
libraries.  Design sense is relatively rare in the universe.


Yeah. If there's something that needs curation, it's macros. Netrek had a Frequently Offered Clever Suggestions (FOCS) list which explained in detail why your idea wouldn't fit the game. (The temptation to bat away anything new helped kill netrek.)

Jay

[1]: SQL is pronounced "squeal".

[2]: Grumpy: JSON is for people who never really understood when in XML something is an attribute vs when it is PCDATA. If you wanna see it done right, go read the Atom RFC.[3]

Also, JSON has introduced a generation of programmers to how marshaling is the nearly most trivial of problems when designing specific network protocols for an app. What was that about design sense being rare?

Finally, for non-private protocols there will be a mismatch between the surface expressions and the internal models for it. So we're back to tearing down JSON trees to build our own trees, and you had to do that for XML too.

DTD-less XML should have been standardized and promoted. There have been hundreds of lifetimes lost to the DOM's mechanical JavaScript binding, so I can sorta see the desire to run away, though...

W3C language-neutral DOM: when you need all the disadvantages of Java style, but none of the advantages either.

[3]: Atom has a significant misdesign: the base for relative URLs cannot be the Atom document itself. I know why it's there, but it means that Atom must be served from somewhere; you can't ship a tarball of your Atom goo without shipping a script to rewrite all the bases to absolute file:/// paths, which depends on where the tarball was extracted.
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

steve donovan
On Sat, Apr 29, 2017 at 5:15 PM, Jay Carlson <[hidden email]> wrote:
> I should just get used to glancing that manual again before opening my
> mouth. As usual with pl, It's In There.

Notice it's called pseudo-SQL ;)  Real SQL is a Specialized Problem,
which I felt outside the ambit of pl.  Didn't stop me from fooling
around with XML, of course ;)

> What's pl's compatibility profile these days? 5.1+5.2? I've been avoiding
> doing it seriously, but the still-on-rushing JSON juggernaut[2] suggests a
> need for jsom.

Works with 5.3 - if it doesn't, then that's a Bug.

> [1]: SQL is pronounced "squeal".

So See-quell is the yahoo version? ;)

> Finally, for non-private protocols there will be a mismatch between the
> surface expressions and the internal models for it. So we're back to tearing
> down JSON trees to build our own trees, and you had to do that for XML too.

Rust has an entertaining take on the problem with the Serde
framework.. By adding a few attributes to a struct (and doing some
clever macro magic) you can very easily create it from JSON of the
right shape and spit it out again with a few lines. All done at
compile time, very efficient.

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Luiz Henrique de Figueiredo
In reply to this post by Dirk Laurie-2
The token filter below can be used with my ltokenp to convert

        fct = λ (a,b,c) → 10*(10*a+b)+c ▪

to

        fct = function ( a , b , c ) return 10 * ( 10 * a + b ) + c end

-- token filter: handle utf symbols as keywords

local function emit(x)
        io.write(x," ")
end

local acc=""

local convert={
        ["\xce\xbb"] = "function",
        ["\xe2\x86\x92"] = "return",
        ["\xe2\x96\xaa"] = "end",
}

local function flush()
        if acc~="" then
                emit(convert[acc])
                acc=""
        end
end

function FILTER(line,token,text,value)
        local t=text
        if t=="<file>" or t=="<eof>" then flush() return end
        if t=="<string>" then value=string.format("%q",value) end
        if token>127 and text==value then
                acc=acc..t
        else
                flush()
                emit(value)
        end
end

Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Jay Carlson
On Apr 30, 2017, at 11:45 AM, Luiz Henrique de Figueiredo <[hidden email]> wrote:
>
> The token filter below can be used with my ltokenp to convert
>
> fct = λ (a,b,c) → 10*(10*a+b)+c ▪

I think your local mail system, your terminal program, and/or your editor are having a fight about whether they are in UTF-8 or not. That looks a lot like UTF-8 misinterpreted as ISO-8859-1. And from the mail headers:

| Content-Type: text/plain; charset=iso-8859-1

I suspect this is Mutt being foolish, as well as wrong.

Jay

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Proposal] Lua-y lambda syntax

Jonathan Goble
On Mon, May 1, 2017 at 3:24 PM Jay Carlson <[hidden email]> wrote:
On Apr 30, 2017, at 11:45 AM, Luiz Henrique de Figueiredo <[hidden email]> wrote:
>
> The token filter below can be used with my ltokenp to convert
>
>       fct = λ (a,b,c) → 10*(10*a+b)+c â–ª

I think your local mail system, your terminal program, and/or your editor are having a fight about whether they are in UTF-8 or not. That looks a lot like UTF-8 misinterpreted as ISO-8859-1. And from the mail headers:

| Content-Type: text/plain; charset=iso-8859-1

I suspect this is Mutt being foolish, as well as wrong.

Jay

Interesting. Luiz's message displays correctly for me in both the regular Gmail web interface and the Inbox by Gmail web interface. Something weird is going on here.
12