[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Integer division
- From: Jay Carlson <nop@...>
- Date: Tue, 27 Nov 2012 21:57:40 -0500
On Nov 27, 2012, at 7:41 PM, Moritz Wilhelmy wrote:
> On 28.11.2012 01:31, GrayFace wrote:
>> How do people even write things like "÷"? There's no such key on my
>> Russian keyboard.
How do you write things like .|¯|yHa? I only have half those letters.
> That said, while Unicode is a nice thing, it shouldn't be used for
> operators, otherwise you'll end up with APL.
You say that like it's a bad thing. Besides, APL was crippled by the Selectric typeball and mechanism. We have superior technology today.
Oaklisp led the way back in ~1988 in how it deals with dynamically scoped variables; see section 6.1 of http://www.bcl.hamilton.ie/~barak/teach/F2002/CS451/hw/4/oaklisp-runtime-and-docs/lang.pdf
-----
To avoid the problems that arise when fluid variables are integrated with the lexical environment, Oaklisp fluid variables have been placed in a completely separate dynamic environment. Fluid variables don’t even look like lexical variables, since they can only be referenced using the "fluid" special form.
[...]
(fluid symbol) ---- Special Form
Returns the value of the fluid variable 'symbol'. Even though "fluid" is a special form, it is settable, so "(set! (fluid 'symbol') 'value')" changes the value of the fluid variable 'symbol' to 'value'. The reader will read "foo" preceded by a control-v character as "(fluid foo)"; this was motivated by the fact that control-v prints as "•" on both Macintosh and Symbolics computers.
-----
So for people still pining for a pre-Scheme world, you can set •debug-on-error during the evaluation of something. Although this is just reader macro sugar for an underlying special form, it bears a superficial resemblance to today's sigils, especially in Ruby.
A great deal of effort went into making Unicode combining characters work. It seems a shame to waste that.
Let's look at C. C has these awkward-looking unary * and & operators. I don't see why we can't have:
char cookie;
char p̑ = c̬ookie;
There's no problem handling ȃ̑rgv; you can just keep stacking. Unfortunately taking the address of an expression ends up with some kind of deep silliness like s͜->͜co͜ok͜ie̮. Unless you want to put a diacritic on a paren--that's just gross.
Sadly support for ruby text is just broken in most apps, but it would be really cool to do casts like
void*
p = malloc
Given I just freaked out a browser playing with INTERLINEAR ANNOTATION I'll spare your mail client that experience.
Jay
(and I'm sure there's some fun to be had with fullwidth too, since we're living in a non-canonical world)