Xah Programing Blog Archive 2022-10
biggest xmas gift.
xtodo review
xtodo draft
Principle of regularity, in programing language design
i really want to love JavaScript, because its functional programing features. but, JavaScript is truly worst lang, too many big warts. it's inferior to python and ruby.
the worst part that makes js unworkable, is lacking comparison of object/array, and array isn't really array. and no builtin lib, even with js 2022. its lib system is complex shit, even with deno.
ruby is a far superior lang than python and JavaScript. also far better than emacs lisp, Common Lisp, and perl. and in particular with respect to functional programing, but also for object oriented programing
ruby is one of those lang, that is systematic. like WolframLang. you learn a handful of principles, and you understand the entire language. golang is similar.
this, i would call, the PRINCIPLE OF REGULARITY, in programing language design. it has 2 parts. regularity of syntax, and regularity of semantics.
What constitutes a functional programing language?
first and most fundamental, is that the lang must support:
- function expression. i.e. all functions are expressions. (python fails this. it has lambda, but limited to simple functions.)
- function must be able to take f as arg
- function must be able to return f as value.
- function application can be done syntactically inline. e.g. f(x), where f is a function expression not necessarily named. (emacs lisp, Common Lisp, python, fails this.)
- it's branching construct e.g. if, loop construct, must have a functional form. (e.g. python's lisp comprehension fails.)
- Ruby: Learn Ruby in 1 Hour
- Ruby: File Name Extension
- Ruby: Run Script
- Ruby: Print
- Ruby: Newline and Indentation
- Ruby: Type Conversion
- Ruby: List Object Methods
- Ruby: List All Classes
- Ruby: Function Name Ending in Exclaimation or Question Mark
- Ruby: Value Types
- Ruby: Variable
- Ruby: Case Conditional
- Ruby: Array
- Ruby: Call Shell Command
- Ruby: Define Function
- Ruby: Sigils (Function and Variable Name Conventions)
What Object-Oriented Programming Was Supposed to Be: Two Grumpy Old Guys' Take on Object-Oriented Programming
cites my website
updates
- AutoHotkey Tutorial
- π AutoHotkey: File Name Extension
- π AutoHotkey: Launch App
- π AutoHotkey: Insert Text
- AutoHotkey: Toggle Maximize Window (Fullscreen)
- π AutoHotkey: Insert Bracket Pairs
- AutoHotkey: Disable Capslock
- π AutoHotkey: Disable Windows Key
- AutoHotkey: Useful Scripts
- π AutoHotkey: Remap Keys
- 2022-10-20 write git commit multi line. use single quote, or multi -m
when you do
git commit -m"multi message"
the git may merge your lines into a singe line.
this happens if you are using the bash shell.
works in PowerShell (xtodo test)
updates and new
lots git tutorial update.
more unicode updates.
new panel and updates
go thru ur browser settings, turn off auto anything. no autofill no autopswd no sync nothing. and no themes whatsoever. turn off spellchecking too. off any auto suggestion. off with their heads.
let me explain extempore what's currying, the why, the gist.
xtodo- yeah.
- let me explain extempore what's currying, the why, the gist.
- in theoretical comp sci, u no need function with more than 1 arg.
- cuz, function with 2 arg, can be rewritten as nested apply of functions each with 1 single arg.
- so, in theoretical work, we just consider all functions is just 1 single arg.
- much simpler framework.
- this is why, this idea, went into ml and then haskell.
- what they do is that, when u have a function of more than 1 arg, they auto decompose into functions with just 1 arg.
- important and critical: this is done automatically.
- technically speaking, these langs do not allow even, functions with multi args.
- simply impossible.
- but, they do provide a syntax, aka sugar syntax, so that it is convenient to define f with arity of 2 or more.
- this is simply a sugar syntax, added, so that the lang becomes usable for coding.
- now, a better name for currying, is auto decomposition of functions of multi args.
- this makes it vastly easy to understand, and demystify the curry fuck.
- the fp people uses the term currying, is similar to other's use of jargons, eg the unix folks and oop or other, to signal in-group ness. e.g. much like gangsters with their jargons, or zoomer with theirs.
- e.g. zoomer: say coomer, not masterbater. cuz the former signify u r in-group. the latter signify u r outsider -- a normy.
- similar for unix heads with unix jargons, linux, perl, python, emacs with its meta buffer scratch, etc.
- now back to curry.
- ok, so now, let's call it, auto decompose function arity.
- now, there's important distinction or nuance of what this is.
- what most think of currying, as some sorta string together function sequentially. this is WRONG and major misleading.
- because, if currying is simply separate multi arg into 2 functions, then, every lang can do it. u simply define a new f as old f with 1 arg filled.
- but currying, is, if u take the decompose name: automatic decomposition of function with multi arity, all becomes clear.
- ie it is a programing language feature. not a programing style.
- as a programing style, u gain nothing.
- as a programing lang feature, there's significance, as mentioned before, theoretical significance. cuz now, ALL, ur functions, are just 1 arg. ALL.
- there no exist, monsters that's function with more than 1 arg.
- that's the key. and is so, in ml and haskell.
- with this, it's also much easier to handle types. which these langs's foundation is based on.
- cuz, if u have a f with multi parms, u have a combinatorial problem of type explosion.
- but, now, with currying (the auto decompose), they are simply transformation of values, from type to type.
- end of xah edu corner extempore. episode 202210260827
- --------
- and ps: there's a large idiot, goes by the name of john something, a big troll, fanatic of ocaml, used to spread large fakenews and stirup things and diss haskell
- !info currying
- bot down. βΉ
- π Unicode: Bank OCR β
- π Unicode Look-Alike Math Symbols
- π Unicode Lambda Ξ»
- Unicode: Punctuations β’ β β’
- Unicode: Commonly Used Symbols β Β© Β§ β¦
- Unicode: Brackets, Quotes «»γγγγγγ
- Unicode: IPA Γ¦
- Unicode: Latin Γ© ΓΆ Γ± Γ¦ Γ Γ°
- Unicode: Math Symbols β β« ΟΒ² β
- Unicode: Slash, Solidus / β«½ β«»
- Unicode: Reference Marks β β‘ ΒΆ Β§ β β
- Unicode: Symbols for ASCII Control Characters β
- Xah Unicode Blog
misc updates:
- π Perl Logo
Brave browse now has vertical tabs now
- goto
brave://flags/#brave-vertical-tabs
to turn it on. Thanks to https://www.robinwils.com/
- Safari also have vertical tabs now.
- Firefox, bookmark all tabs: Ctrl+Shift+d
now on own pages. easier to search.
xtodo read
- [After self-hosting my email for twenty-three years I have thrown in the towel. The oligopoly has won. By Carlos Fenollosa. At https://cfenollosa.com/blog/after-self-hosting-my-email-for-twenty-three-years-i-have-thrown-in-the-towel-the-oligopoly-has-won.html ]
lots updates.
in WolframLang the square bracket is always used as a function argument. it has a systematic grammar. almost no exceptions. x[y] while x is not a function nor x[y] a transformation rule, eval to something, breaks it.
lots updates.
added extracting lzip
- π Unicode: Byte Order (Endianness)
- π Endian_war_1980_Danny_Cohen.txt
- Unicode: BOM, Byte Order Mark
- Unix Shell Shebang Hack #!
more related updates:
ruby install on windows, almost 1 gigabytes.
massive updates and new
- WolframLang: Print Version
- WolframScript Tutorial
- WolframLang: Find/Replace Script
- Wolfram Language File Encoding
- WolframLang: List of Char Encodings ($CharacterEncodings)
$CharacterEncodings
- a builtin variable. value is a list of character encoding that WolframLang supports. $CharacterEncodings
$CharacterEncoding
-
a builtin variable. value specifies the default encoding to use by input and output functions.
Default value is
$SystemCharacterEncoding
$CharacterEncoding $SystemCharacterEncoding
-
a builtin variable that specifies the default encoding.
on Microsoft Windows 10 as of 2022-10-19, value is
"WindowsANSI"
$SystemCharacterEncoding CharacterEncoding
- an option for some input output functions. CharacterEncoding
new and updates
misc updates
- JS: Test Array Equality
- JS: Array.prototype.flat
- JS: Array Basics
- JS: Array-Like Object
- JS: the Set Object Tutorial
updated.
updates.
updates
- What is Binary Number
- What is Byte
- ASCII Characters
- What is Codepoint (Character ID)
- Unicode: Whitespace Representation β₯ β· β£ ΒΆ
- Golang: Rune
- Golang: String, Byte Slice, Rune Slice
- Golang: Print String as Sequence of Byte/Char/Codepoint
- Golang: Printf Verbs
- Golang: String Backslash Escape