Quantcast

New updates: Mathematical symbols in Smalltalk code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New updates: Mathematical symbols in Smalltalk code

Juan Vuletich-4
Hi Folks,

I've just pushed to GitHub quite several updates. Besides some fixes and
enhancement to Morphic display updates, etc, the biggest news is a set
of 32 mathematical symbols, as requested by Luciano. They can also be
used as binary selectors, (although such code might have portability
issues).

Clipboard copy & paste with Unicode apps work ok. For example this:
'←→↑↓
!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~∀∂∃∄∅∞ℂℍℕℙℚℝℤℵ⨀⨁⨂∑∫⨕≠≡≢≣≤≥≦≧≨≩∘∙
¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
is the result of evaluating
String streamContents: [ :strm | 28 to: 255 do: [ :i | strm nextPut:
(Character value: i) ]]
and doing a simple copy / paste.

I also added some convenience methods, like 'Character forAll',
'Character directSum' or 'Character rationalNumbers'.

When updating existing images you will be asked for recreating DejaVu
StrikeFonts. For this to work, you need to unzip
AdditionalFontData/DejaVuSans.zip in that folder. If you are using
DejaVuSansMono, you need to recreate the fonts after the update.

A nice detail, suggested by Leandro Caniglia is that you can do
'StrikeFont useRightArrow' and now the assignment is shown as → . Play
with it. It gives a new perspective on what the code is doing!

Thanks Luciano for suggesting the addition of the mathematical symbols.
Keep tuned, next will come superscripts and subscripts.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

mathSymbols.png (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

Luciano Notarfrancesco
Wow, excellent!!!! Can't wait to use math symbols it in my code!!!

I can already start using these symbols in my printOns for direct products and sums of algebraic structures, for example, and for the complex numbers, rational numbers, integers, etc, and when we have subscripts and superscripts polynomials will look great too.

Using some of the symbols as binary operators will be nice too,  I guess we'll figure out which ones are best suited for binary selector use, and if we're missing any. In particular, I think I didn't see the "belongs" symbol (kind of epsilon-looking), which I wanted to implement in Object as '^ aCollection includes: self'.
Haha, recently I've been looking at APL ;)

I've been thinking how to input them, tho. There isn't any easy way to type these special symbols, right? I was thinking on something like CTRL-\ followed by the name of the symbol and ENTER or SPACE, where the names are simple and preferably matching TeX, for example \oplus \otimes \bullet \circ \div..

I'm going to update right now, awesome, thanks again!
Luciano

On Thu, Dec 3, 2015 at 1:51 PM, Juan Vuletich <[hidden email]> wrote:
Hi Folks,

I've just pushed to GitHub quite several updates. Besides some fixes and enhancement to Morphic display updates, etc, the biggest news is a set of 32 mathematical symbols, as requested by Luciano. They can also be used as binary selectors, (although such code might have portability issues).

Clipboard copy & paste with Unicode apps work ok. For example this:
'←→↑↓ !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ∀∂∃∄∅∞ℂℍℕℙℚℝℤℵ⨀⨁⨂∑∫⨕≠≡≢≣≤≥≦≧≨≩∘∙ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
is the result of evaluating
String streamContents: [ :strm | 28 to: 255 do: [ :i | strm nextPut: (Character value: i) ]]
and doing a simple copy / paste.

I also added some convenience methods, like 'Character forAll', 'Character directSum' or 'Character rationalNumbers'.

When updating existing images you will be asked for recreating DejaVu StrikeFonts. For this to work, you need to unzip AdditionalFontData/DejaVuSans.zip in that folder. If you are using DejaVuSansMono, you need to recreate the fonts after the update.

A nice detail, suggested by Leandro Caniglia is that you can do 'StrikeFont useRightArrow' and now the assignment is shown as   → . Play with it. It gives a new perspective on what the code is doing!

Thanks Luciano for suggesting the addition of the mathematical symbols. Keep tuned, next will come superscripts and subscripts.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

nacho
In reply to this post by Juan Vuletich-4
Wow Juan, this is great!
Thanks so much for this addition to Cuis!
Best
Nacho
Nacho Smalltalker apprentice. Buenos Aires, Argentina.
dsg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

dsg
In reply to this post by Juan Vuletich-4
Ugh, I hate to take this position in light of your effort, but I'd like to propose Cuis head the other direction and adopt a strict a ISO 8859-15 character set for the core system.  I agree that the changes have greater semantic value, but none of these keys are available on standardized keyboards, and IMHO, they do more harm than good in regards to the user experience.

Consider this, at some point every new Cuis user is forced to stop exploring this wonderful new system and google "how do I type an up arrow" and then "how do I type an left arrow".  I know there is a switch to change this behavior, but it impacts non-coding applications as well... has anyone else been surprised to see a left arrow instead of an underscore while taking notes in TextEditor?

OTOH, if anyone does a Cuis keyboard kickstarter, I'll buy. :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

Hannes Hirzel
D.,

The character set convention is only seen within the image.

Saving and loading of text files is UTF8. Copy/paste through the
clipboard as well.

So as a user of Cuis you do not see the internal custom character set
convention.

As you note there is the issue of keyboarding, but I assume we will
find a good solution.

--Hannes

On 12/3/15, dsg <[hidden email]> wrote:

> Ugh, I hate to take this position in light of your effort, but I'd like to
> propose Cuis head the other direction and adopt a strict a ISO 8859-15
> character set for the core system.  I agree that the changes have greater
> semantic value, but none of these keys are available on standardized
> keyboards, and IMHO, they do more harm than good in regards to the user
> experience.
>
> Consider this, at some point every new Cuis user is forced to stop
> exploring
> this wonderful new system and google "how do I type an up arrow" and then
> "how do I type an left arrow".  I know there is a switch to change this
> behavior, but it impacts non-coding applications as well... has anyone else
> been surprised to see a left arrow instead of an underscore while taking
> notes in TextEditor?
>
> OTOH, if anyone does a Cuis keyboard kickstarter, I'll buy. :)
>
>
>
> --
> View this message in context:
> http://forum.world.st/New-updates-Mathematical-symbols-in-Smalltalk-code-tp4864936p4864973.html
> Sent from the Cuis Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

Luciano Notarfrancesco
Haha, I need a white marker to draw a vertical line under the ^ of my keyboards, and a < besides the underscore! (Or a >, I'm not decided on the left vs. right arrow, tradition vs. correctness)

On Thu, Dec 3, 2015 at 6:18 PM, H. Hirzel <[hidden email]> wrote:
D.,

The character set convention is only seen within the image.

Saving and loading of text files is UTF8. Copy/paste through the
clipboard as well.

So as a user of Cuis you do not see the internal custom character set
convention.

As you note there is the issue of keyboarding, but I assume we will
find a good solution.

--Hannes

On 12/3/15, dsg <[hidden email]> wrote:
> Ugh, I hate to take this position in light of your effort, but I'd like to
> propose Cuis head the other direction and adopt a strict a ISO 8859-15
> character set for the core system.  I agree that the changes have greater
> semantic value, but none of these keys are available on standardized
> keyboards, and IMHO, they do more harm than good in regards to the user
> experience.
>
> Consider this, at some point every new Cuis user is forced to stop
> exploring
> this wonderful new system and google "how do I type an up arrow" and then
> "how do I type an left arrow".  I know there is a switch to change this
> behavior, but it impacts non-coding applications as well... has anyone else
> been surprised to see a left arrow instead of an underscore while taking
> notes in TextEditor?
>
> OTOH, if anyone does a Cuis keyboard kickstarter, I'll buy. :)
>
>
>
> --
> View this message in context:
> http://forum.world.st/New-updates-Mathematical-symbols-in-Smalltalk-code-tp4864936p4864973.html
> Sent from the Cuis Smalltalk mailing list archive at Nabble.com.
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

Juan Vuletich-4
In reply to this post by Luciano Notarfrancesco
On 12/3/2015 12:06 PM, Luciano Notarfrancesco wrote:
Wow, excellent!!!! Can't wait to use math symbols it in my code!!!

I can already start using these symbols in my printOns for direct products and sums of algebraic structures, for example, and for the complex numbers, rational numbers, integers, etc, and when we have subscripts and superscripts polynomials will look great too.

Glad you like it!

Using some of the symbols as binary operators will be nice too,  I guess we'll figure out which ones are best suited for binary selector use, and if we're missing any. In particular, I think I didn't see the "belongs" symbol (kind of epsilon-looking), which I wanted to implement in Object as '^ aCollection includes: self'.
Haha, recently I've been looking at APL ;)

I need to things from you:
1) What is the code point to add
2) Take a look at #initializeUnicodeCodePoints and tell me which of the code points stored in [16r80 .. 16r9F] can be removed. (All 32 places are used)

I've been thinking how to input them, tho. There isn't any easy way to type these special symbols, right? I was thinking on something like CTRL-\ followed by the name of the symbol and ENTER or SPACE, where the names are simple and preferably matching TeX, for example \oplus \otimes \bullet \circ \div..

Yes. Or you can simply type 'Character directSum', select, print, and select and delete. It could also be made that just type/select/insertIt (instead of doIt) evaluates an expression and replaces the selection with the result of the evaluation :)

I'm going to update right now, awesome, thanks again!
Luciano

Cheers,
Juan Vuletich

On Thu, Dec 3, 2015 at 1:51 PM, Juan Vuletich <[hidden email]> wrote:
Hi Folks,

I've just pushed to GitHub quite several updates. Besides some fixes and enhancement to Morphic display updates, etc, the biggest news is a set of 32 mathematical symbols, as requested by Luciano. They can also be used as binary selectors, (although such code might have portability issues).

Clipboard copy & paste with Unicode apps work ok. For example this:
'←→↑↓ !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ∀∂∃∄∅∞ℂℍℕℙℚℝℤℵ⨀⨁⨂∑∫⨕≠≡≢≣≤≥≦≧≨≩∘∙ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'
is the result of evaluating
String streamContents: [ :strm | 28 to: 255 do: [ :i | strm nextPut: (Character value: i) ]]
and doing a simple copy / paste.

I also added some convenience methods, like 'Character forAll', 'Character directSum' or 'Character rationalNumbers'.

When updating existing images you will be asked for recreating DejaVu StrikeFonts. For this to work, you need to unzip AdditionalFontData/DejaVuSans.zip in that folder. If you are using DejaVuSansMono, you need to recreate the fonts after the update.

A nice detail, suggested by Leandro Caniglia is that you can do 'StrikeFont useRightArrow' and now the assignment is shown as   → . Play with it. It gives a new perspective on what the code is doing!

Thanks Luciano for suggesting the addition of the mathematical symbols. Keep tuned, next will come superscripts and subscripts.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New updates: Mathematical symbols in Smalltalk code

Juan Vuletich-4
In reply to this post by dsg
Hi David,

On 12/3/2015 2:50 PM, dsg wrote:

> Ugh, I hate to take this position in light of your effort, but I'd like to
> propose Cuis head the other direction and adopt a strict a ISO 8859-15
> character set for the core system.  I agree that the changes have greater
> semantic value, but none of these keys are available on standardized
> keyboards, and IMHO, they do more harm than good in regards to the user
> experience.
>
> Consider this, at some point every new Cuis user is forced to stop exploring
> this wonderful new system and google "how do I type an up arrow" and then
> "how do I type an left arrow".  I know there is a switch to change this
> behavior, but it impacts non-coding applications as well... has anyone else
> been surprised to see a left arrow instead of an underscore while taking
> notes in TextEditor?
>
> OTOH, if anyone does a Cuis keyboard kickstarter, I'll buy. :)

I think you are mixing several issues, and I'd prefer to discuss and
address them as different.

I don't think that the Character set needs to be limited by the
available keyboard. Keyboards vary a lot. And I think it is OK to
support $á even if you have a EN-US keyboard (as most systems do).

We have an issue with left arrow and up arrow. Using $_ and $^ for them,
only when doing assignment or method return, is a way to still support
the BlueBook. Removing this would still require an explanation to new
users reading the BlueBook. I don't know how to improve on this.

Another issue is the TextEditor. It sounds reasonable to use the regular
ASCII / ISO glyphs there, and the current behavior looks like a bug.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Loading...