Xah Programing Blog

Syntactic obsession, imperative despisal, unicode ♥, hacker hate

Subscribe Feedtwitter me @xah_lee

Xah Programing Blog Archive

Put $5 in my patreon. https://www.patreon.com/xahlee

when coding JavaScript, do you prefer 'single' or "double" quote for string by default? or reply or vote on twitter https://twitter.com/xah_lee/status/1054883448437977088

xahlee info traffic rank 2018-10-23

xahleeinfo traffic rank 2018-10-23 da095
xahleeinfo traffic rank 2018-10-23

climbing the ladder

word of the day is: arduous. #xahwords

to read. erlang tutorial https://learnyousomeerlang.com/starting-out-for-real

support my work. buy yourself a 512GB SSD Buy at amazon

or Put $5 in my patreon. https://www.patreon.com/xahlee

SQLite code of conduct 2018-10-22
SQLite code of conduct 2018-10-22 source https://www.sqlite.org/codeofconduct.html


[Best Ever Paper Airplanes By Norman Schmidt. At Best Ever Paper Airplanes ]

Programing Language Idiocy: Bit Operators (on its own page)

Necessity of Operator Overload in Computer Languages (on its own page)

hex screw kit

hex screw kit, so that u can open apple stuff that apple no want u do amazon

w3c dead link


dead links record trail:

when you learn a programing language, do you watch video lecture/presentation?

vote on twitter https://twitter.com/xah_lee/status/1053468710617272321

and, programers, eat walnuts, live forever. buy walnuts you buy, you eat, i live. Yes it's an ad. out of my own volition.

ML stands for?

when i see the abbreviation ML, i think of Meta Language, the grand daddy of SML, CaML, OCaML, FSharp, Clean, Miranda, Haskell. ML were invented for automated theorem proving. Machine learning?? you mean like smart guessing?

brave browser still have the bug, where sometimes the url field shows the url from a different tab

What's Function, What's Operator? (repost)

new book. The Little Typer

new book. The Little Typer The Little Typer, 2018, By Daniel Friedman et al.

Friedman is one of the top lang researcher. He's 74 now. So am not sure he's actually the main author.

Friedman wrote a series of books titled “Little Schemer”, “Little Java”, “Little Prover”, “Little MLer” etc. Daniel P Friedman Books I read Little Java back in 2000. Wasn't comprehensible to me. I never liked these story-telling style books.

why not perl6?

why not perl6 2018-10-16 f026d
why not perl6 2018-10-16 f026d

Proliferation of Computing Languages

What Lib Did You Use? None!

Garabato Kid no plugin bcde6
from Garabato Kid comics. https://twitter.com/garabatokid/

you can buy a slingshot, to shoot down drones slingshot

todo remove reference to python ruby etc at Perl by Example

do same for

on this page Perl Books Survey 2002 make those gz local copy files as html

to read kilo. text editor in 1k lines of c https://github.com/antirez/kilo

it golang https://github.com/bediger4000/kilo-in-go


essay about guido the character Transfer of Power (Guido stepping down as BDFL) https://www.reddit.com/r/Python/comments/8yapie/transfer_of_power_guido_stepping_down_as_bdfl/

esr, on porting reposurgeon from python to golang

great article by esr. on porting reposurgeon from python to golang http://esr.ibiblio.org/?p=8161 reposurgeon is software for converting cvs/svn to git. many points he touched about python and go, i agree. python's future is bleak

many point esr mentioned i concur.

Note that python became popular, when Google decided to use it ~2000. There wasn't much choice. It or perl. Python lost to php ruby for web dev, and to nodejs in late 2000s. Python is popular now because again Google used it in early 2010s for data analysis and machine learning.

python's warts and slowness and parallel computing problems can't be solved by the lang itself. go, crystal, nim, julia, trivially blast python to bits.

typed vs untyped lang

now am of the opinion that programing languages should be typed. (modern system, eg golang. not C, C++, Java). When younger, i thought it should not, cuz i considered typing as by-product of compiler.

in some sense, typing is a unwanted by-product of computer engineering aka compiler. and, it was so, up to 2000. However, with different perspective, a proper type system, is like a good property of logic system. For programing language, it improves correctness, bring clarity.

there are exceptions. e.g. Mathematica (aka wolfram lang), where the computation model mostly is a symbolic term rewriting system. So, typing system does not apply. (btw, lisp is almost the same, except lispers since 1990 are extreme idiots. they r C coders in paren clothing.)

Golang: string match any regexp

Computer Language Popularity, 1997 to 2006

Scripting: Higher Level Programming for the 21st Century

What is Expressiveness in a Computer Language

just removed all disqus comment system on my site. they've become greedy, forcing image ads, in order to survive. but their ads, are the lurid ones.

Google Code Prettify and Ampersand Encoding

Chinese abacus. they have 2 beads on top, 5 below. i never learned their exact function of the “extra” beads. In Taiwan, we grew up with Japanese style, 1 on top, 4 at bottom.


more pic https://twitter.com/Echinanews/status/1050284413504774144

but apparently, the 2 5 setup allows computation with hexadecimal, which is a traditional chinese weight system.

Syntax Design: Python's Indentation vs Nesting

interesting that D lang is still going. “Alexandrescu (i think he's 2nd in D language dev) worked as a research scientist at Facebook, before departing the company in August 2015 in order to focus on developing the D programming language.”

google shutting down google plus

google shutting down google plus, over the next 10 months.

since google began g+ in 2011, i'd say it marks the year google goes evil. then, its worse and worse, starting with greed, to now heavy censorship and explicit and blatant political gaming.

a great sadness to witness google over the decades. we helped google succeed back in 2000, since it was the company that does no evil, different from all others.

Python 3 Adoption

added a realistic survey by jetbrains

old writing, new page. work in progress

Perl: Sort Misc

Perl: Send Email

Programing Problem: Construct a Tree Given Its Edges

Google-code-prettify Example

to read https://getstream.io/blog/how-a-go-program-compiles-down-to-machine-code/

Programing Language and Its Machine (to be expanded)

Chinese spy chip found in Apple Amazon server motherboards, said.



Apple's response https://www.apple.com/newsroom/2018/10/what-businessweek-got-wrong-about-apple/

Amazon's response https://aws.amazon.com/blogs/security/setting-the-record-straight-on-bloomberg-businessweeks-erroneous-article/

stupid ipad. i have a old ipad. when viewing some page , requiring 100+ pushes to scroll down. Is there a way to drag the scroll bar?

on android, when u swipe fast, the page flies like on wheels. On iPad iOS, it's like stuck in some viscous shet. i think iOS UI is idiotic.

ImageMagick Tutorial (minor update)

programing language speed comparison

interesting. look at golang, the optimized version at bottom, beats all. and look at how slow are python ruby php.

Recursive fibonacci benchmark using top languages on GitHub


Firefox error dino 2018-09-28 d97ae
Firefox error dino 2018-09-28 d97ae

i can't tell wtf is that.

Interview with Bill Joy (creator of vi)

this is what online forum looks like, before Facebook


biological computer, dna, molecules

i took a microbiology class in 1996 or so, of things like the vid is talking about. understand cells, what's inside, what they do, how they work.

DNA animations by wehi.tv for science-art exhibition

The molecules, when a bunch of them are together, they bind in a specific way, some like that. gazillions megalions at the same time. This is what is meant by biological computer. mega parallel.

Biological computing

in 1990s, i recall Knuth said computing/algorithm is not interesting cuz it's already filled. and biology is far more interesting. That remark lodged in my mind. I now doubt it, but still, biology is fascinating. I think, to me, beats physics actually.

Project Code Rush - The Beginnings of Netscape / Mozilla Documentary

memories. this is where i live. Netscape headquarter was just 15 min walk away.

the verge pushing sj, building a PC

verge build pc wrong 2018-09-16 164db
verge build pc wrong 2018-09-16 164db

theverge dot com pushing sj. the video is here https://www.youtube.com/watch?v=jciJ39djxC4

Buy Xah Code

xahlee info git stat 2018-09-16 2f3ea
xahlee info git stat 2018-09-16 2f3ea

http://xahlee.info/ is now 16.4k files, 1.2 GiB. 5k html pages of math and code and history of the hacker cult. Take 4 years to read it, and you'll be a doctor of philosophy. You, buy it now!

Golang: System Call

Fundamental Problems of Lisp

Lenovo Yoga 720 laptop. good.

buy Lenovo Yoga 720

DuckDuckGo = lack luster

now half of the time i search something, @DuckDuckGo gives me this error:

If this error persists, please let us know: error-lite@duckduckgo.com

DuckDuckGo error 2018-09-13 2bef9
DuckDuckGo error 2018-09-13

(this happens when I'm using brave browser with JavaScript off by default, and ddg as default search)

am thinking abandoning it.

duckduckgo is such that, if you search for something easy, something typically you'd expect from 1st result, then u get what u want. But any slightly rare search, or research, its lack luster. you resort back to google.

DuckDuckGo error fixed 2018-09-14 7baff
DuckDuckGo error fixed 2018-09-14 https://twitter.com/DuckDuckGo/status/1040568066944495616

OCAML's Official Tutorial Blatantly Suck

finally fixed.

Atom/RSS Reader Bug, Relative Link

Apache Rewrites History: Why is it Named “Apache”?

History of Angular.js

is there a JavaScript util similar to golang's gofmt? note, i want it to be able to cut long lines of code. e.g. if entire code is in 1 line, make it multiple lines with indentation.

const declaration, for programer or for compiler?

in JavaScript and golang, there's “const” declaration. Am starting to think, it's more used as programer guide than for compiler, because compiler most of the time would automatically optimize var that doesn't change. Is this true?

don't use Google Chrome browser

these days i don't use Chrome except ONLY for google account. The google browser, can trivial do things even if u turn off all cookies and javascript and don't login to any site. Nobody would know except google.

context, google chrome posting about it's 10 year anniversary. https://twitter.com/googlechrome/status/1037038838550601734

unicode subscript 2018-09-04 7e36e
there's no subscript d in unicode. Unicode Math Symbols ∑ ∫ π² ∞ Unicode Math Symbols ∑ ∫ π² ∞

[There is no pass-by-reference in Go By Dave Cheney. At https://dave.cheney.net/2017/04/29/there-is-no-pass-by-reference-in-go ]

This is a great article. Apparently, that guy blog a lot about golang, seems to be a go expert.

golang, should i return big string or save it to a var pointer?

am wondering if i should do outBytes=genSiteMap(inDir) or genSiteMap(inDir, &outBytes) the 2nd ceases to be function programing, but i guess is more traditional C C++ D go stuff. Give me your opinion.

design of how to deal with errors in programing languages

[The Error Model By Joe Duffy. At http://joeduffyblog.com/2016/02/07/the-error-model/ ]

seems a great article.

Franz Lisp, number 1 commercial implementation of Common Lisp

Franz Lisp, still alive! It was, or still is, the number 1 commercial implementation of Common Lisp.


Unicode Box Lines ┌ Blocks ▓ major update

programing languages ranked by ease of learning

cutting thru golang like a chainsaw thru snow! smooth. of langs, similar experience is php. And worst is python. for ease of learning to practical depth, the order is: golang ≻ php ≻ python ≻ JavaScript ≻ perl ≻ clojure ≻ java

golang is definitely more verbose than python or ruby. For language verbosity, the order is roughly this: C ≻ java ≻ golang ≻ JavaScript ≻ php ≻ python ≻ clojure ≻ perl ≻ Mathematica

python is a lang against functional programing, worse than perl.

everytime i say it, some python fanboy will counter, python support functional programing. Right, it does, like every lang do. But in practice, even the lambda is crippled. And if you use functional programing libs, other coder looks at you funny.

random thoughts: jupyter notebook, python 3 problem, golang interface

the jupyter notebook, looks like a exact copy of Mathematica of 1990.

here's what Mathematica notebook looks like Wolfram Language, Mathematica

one of the problem of python 3 is that, print becomes a function, thus need parenthesis. Nobody likes to type that, and python doesn't have short syntax to omit paren. And print is now a function, yet python sneer functional programing everywhere.

golang's interface is fishy. A mesh of logical levels, a cause of confusion. When go compiler run into a val whose type is interface, its behavior changed. Instead of checking type, it checks if the val has the methods. go interface really shouldn't be a type.

am retiring my last perl script. this one written in 2004, validate local links of all html files in a dir

Perl: Validate Local Links

it's replaced by golang

Golang: Validate Links

Python: Count Word Frequency

someone should create a lisp wrapper over golang

lisp timeline 2018-08-29 94845
lisp timeline 2018-08-29

apparently, there is no lisp wrapper to golang but someone created a embedded lisp scripting lang inside go.


coding in golang, error checking every 10 lines

coding in golang is like, every 10 lines you have

if err != nil { panic(err) }

golang no exceptions 2015-07-14 13208
golang no exceptions 2015-07-14 13208

there are probably lots of things you don't know about exceptions. langs python ruby java lisp their concept of exceptions differ. see Why I Hate Exceptions

golang chocked by JavaScript spec

screenshot 2018-08-29 1829e
golang chocked by JavaScript spec.

the issue is, JavaScript spec contain links like this

<a href="ECMA-262_6th_Edition.html#sec-%typedarray%-intrinsic-object">22.2.1</a>

and golang url parser chockes on that, saying it's invalid percent encoding. Now, you want to know which fak fak'd up. and fak the programer faks in industry.

note, probably ecma is incorrect there. also, url percent encoding spec is extremely complex. browser don't agree on it. the spec is prob wrong too.

imagine, a doc from standard org creates invalid doc. Note, back then, all docs of w3c or RFC are invalid html. you can see stories at HTML Validation, History and Politics and Anti Hacker y2k Anti Hacker y2k

math, Z notation

there are these Z notation ⋿ ⦁ ⦂ ⨾ ⨟ ⨠ ⨡ ⩤ ⩥ ⦇ ⦈ ⦉ ⦊ apparently designed for “formal” spec of computer programs. See also APL Symbols Unicode APL Symbols

hard link, soft link, alias, virtual store. ban them.

ancient articles.

unix has hardlink softlink. Mac has alias. Microsoft Windows has Shortcut and VirtualStore. They should all be ban'd.

Windows Vista VirtualStore Problem

File Aliases Considered a Plague

the only link should be allowed is symbolic link. and the destination path should be visible as file content.

bing map. looks pretty good

bing map. looks pretty good. https://www.bing.com/maps/ i've tried some other open source ones. sometimes for street map, sometimes for geography or history. they pretty suck. Bing looks good.

this is why mastodon will never be popular

mastodon never be popular 2018-08-28 2462a
golang 2018-08-28 2462a

this is why mastodon will never become mainstream. not even that. it'll remain a little coner among nerds only.

recall in the 90s up to mid 2000s, that nerds cry out about html validation, and alt for images, and against shortened links? all's forgotten. Today, it's actually impossible for a commercial site to pass html validation.

the nerds, thought they are fighting for good. rather, they are just like any other superficial idiots. Today, it's net neutrality. And google Facebook Apple are probably smiling, all for it.

look at some history here. HTML Validation, History and Politics

shorted url, began as solution to unreadable long google search result link around 2007. Then, it became means to track who clicked it. Nerds fought for it, lost. today, totally forgotten, the idiotic nerds find something else to fight about.

The tracking is so bad, that all major sites track your scroll so they know which section your eyeballs sit. e.g. twitter. That even sites nerds use a lot, medium, do it.

machine learning programing language syntax?

if you take a machine learning system say TensorFlow, and feed it all available public source code of a language, say, C. what are the chances it can identify few lines you typed is valid C syntax or not?

it's interesting, cuz AlphaZero beats human go champion. but if it can't validate comp lang syntax, it means that's much harder than beating go human champion. and i think that give us a sense just how difficult beating human was. i.e. not hard with respect to all problems.

Julia lang

Julia is good. from my hacker acquaintances i've heard. Julia is super fast, similar to golang. Julia should replace all the industrial math langs. e.g. matlab, R, python numpy, javascript, etc. Julia is a proper lang if u want to do math. e.g. haskell is not.

context https://twitter.com/newsycbot/status/1034305201824509952

one easy way to tell if a lang is math lang, is this: If its array starts at 1, its math lang. They include: FORTRAN, SASL, MATLAB, Julia, Mathematica, Smalltalk, Lua , Erlang, APL. see Language Design: Should Array Index Start at 0 or 1?

one thing always bugged me about industrial coders is that, they are not math oriented people. but am really from a math background. What i see, they don't see, and call me a troll instead. While they've never done scientific computing nor used a math oriented lang in their life.

math langs, in general are 2 classes: numerical, and symbolic. Majority out there are numerical. e.g. R matlab python numpy fortran. Symbolic is rare: Mathematica, Maple. Another class of math language are proof systems. coq, isabelle, HOL Light.

julia vs golang 2018-08-27 db233
here's julia vs rustlang vs golang. quite amazing. (note, the plot is focused on math orented tasks.)

here's a short intro about proof systems, based on America Math Society article. 10 years anniversary! State of Theorem Proving Systems 2008 State of Theorem Proving Systems 2008

symbolic math lang is typically called computer algebra systems. They can also do numerical computation, since lots math prob don't have symbolic solution. Rather, we say matlab R etc are numerical, because usually that's what they focus on. and typical numerical systems can't do symbolic computation. (because, symbolic computation and numerical requires entirely different system.)

note, there is no reason why a lang can't do all 3: numerical, symbolic, and also as proof systems. PLUS presentation e.g. TeX. Because, tech maturity wasn't there. and we don't understand proof system that much before.

Computer Languages Characters Frequency

updated. now includes golang.

golang's date time handling problem

[Monotonic Elapsed Time Measurements in Go By Russ Cox. At https://golang.org/design/12914-monotonic ]

by the way, the problem is fixed.

just came off reading Russ Cox's extremely verbose article on time.

that guy wrote a famous article on regex a decade ago

[Regular Expression Matching Can Be Simple And Fast By Russ Cox. At https://swtch.com/~rsc/regexp/regexp1.html ]

did read that yesterday again. though, skipped most of the tech detail. i think russ cox is somewhat old fashioned and interesting guy. what he said is correct, but, rather, somewhat useless. many old fashioned geeks are like that.

all the examples he gave, are rather concocted cases. sure, still, it's good to fix since we know the solution. but, in that perspective, tons of things in industry need fix, with higher priority.

2018-08-27 to read. golang, using go routine on spawn lots of file reading but avoding problem of too many files open. https://bitbucket.org/tumdum/findserver/src/73ca1776e336d9f256c39dc50b4dbd69c2f76f18/server.go#lines-149

ah, so this is what Russ Cox looks like. https://www.youtube.com/watch?v=6wIP3rO6On8 he's discussing upcoming golang 2 design. looks good.

Rob Pike, on design of golang

Rob Pike, creator of golang, gave reasons on design of golang

[on golang, less is exponentially more By Rob Pike. At https://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html ]

i agree with basically all his points rather strongly. Golang is now my fav lang (not counting Mathematica)

the few am unsure are:

the few item i don't quite understand are:

here's his full list:

  1. regular syntax (don't need a symbol table to parse)
  2. garbage collection (only)
  3. no header files
  4. explicit dependencies
  5. no circular dependencies
  6. constants are just numbers
  7. int and int32 are distinct types
  8. letter case sets visibility
  9. methods for any type (no classes)
  10. no subtype inheritance (no subclasses)
  11. package-level initialization and well-defined order of initialization
  12. files compiled together in a package
  13. package-level globals presented in any order
  14. no arithmetic conversions (constants help)
  15. interfaces are implicit (no "implements" declaration)
  16. embedding (no promotion to superclass)
  17. methods are declared as functions (no special location)
  18. methods are just functions
  19. interfaces are just methods (no data)
  20. methods match by name only (not by type)
  21. no constructors or destructors
  22. postincrement and postdecrement are statements, not expressions
  23. no preincrement or predecrement
  24. assignment is not an expression
  25. evaluation order defined in assignment, function call (no "sequence point")
  26. no pointer arithmetic
  27. memory is always zeroed
  28. legal to take address of local variable
  29. no "this" in methods
  30. segmented stacks
  31. no const or other type annotations
  32. no templates
  33. no exceptions
  34. builtin string, slice, map
  35. array bounds checking

Paul Graham on What You Can't Say

[What You Can't Say By Paul Graham. At http://www.paulgraham.com/say.html ]

Paul Graham. i wonder, if he still have control at hackernews the forum. and, wonder if he is pressed at his company by the sj.

i wonder if i should follow paul graham. in general, i dnt follow celebrities. cuz typically, when u got to that size, whatever good u have is gone. but i wonder if i should follow just to see gossips, and comment on top now and then.

Golang: Random Number

Seagate 8TB External Hard Drive. You Buy amazon I make bread.

go routine 2018-08-27 0433c
go routine 2018-08-27 0433c

golang lol. slapped on a “go” in front of file opening function in filepath.Walk(inDir, pWalker). and this is what i get. maybe i need a buffered go routine. :D but actually, how does one deal with this problem?

programing languages i've learned

my 1st lang is HP-28s 1991 HP-28S Advanced Scientific Calculator wrote 8 queens. Then Mathematica, 1992~1999 buried myself in it. Wolfram Language, Mathematica perl 1998. some java 2001. python 2005. php 2007. elisp 2005. some js 2005. LSL 2007 Second Life LSL Tutorial Deep js 2013. some clojure 2014

Programing Language Tutorials Index

golang is now my fav lang. (not counting Mathematica) it's simple. go ≻ ruby ≻ python. unlike haskell of pseudo math. Not clojure a skin of Java monster and for enterprise coding ONLY. Not racket, who lives in ivory tower. If we remove go's concurrency and speed, it remains my fav.

golang has this way of methods and interfaces. that is, Interface is just a set of methods, and it can be attached to any data. No hierarchy. none of the OOP class tree model complexity. If you want methods like OOP, you can. if you want functional programing, sure.

i used to despise Rob Pike. even though i don't know him much, but simply because he's one of those associated with unix philosophy fcuk. but now i've seen a few of his writings, i like his ideas. he's a bit loud mouthed, but not crackpot as some other e.g. M Fowler. L Wall.

text processing task, reading disk is the bottle neck

python vs golang 2018-08-26 86e1f
spent the past 3 hours wondering why my golang isn't faster than my python script. It's find/replace on few thousand text files. maybe for this task it makes no difference.

yeah. the problem is reading disk.

golang struct 2018-08-26 d60b2
// holy cow, first time using struct, coding for 27 years. golang

Golang: Defer

russian keyboard programing 2018-08-25 e1fc9
Russian Keyboard Layout and Programing

Russian had it bad. they have to switch between russian layout and qwerty constantly

Git: Revert Change

baidu about page 2018-08-23 be404
baidu about page 2018-08-23

百度。真漂亮。呵呵。 材料:机械手一个。魔术方块一个。小鲜肉一个。

lol, so attractive. Ingredients: One robotic arm. One magic cube. One handsome boy.

Python 3 Adoption

Golang: Rune

Python: Find Replace by Regex

major update.

Unicode utf8 encoding is now used 92% on the web, world wide. Not sure if the source properly counte china traffic. See also: What Character Encoding Do Chinese Sites Use? What Character Encoding Do Chinese Sites Use?

Unicode Popularity: How Popular is UTF-8?

tedious to dig into a new lang

it's quite time consuming to dig into a new lang. Things you thought are trivial, but tedious to get it right. stumble here and there every 5 minutes.

like a million monkey banging on keyboard. eventually, you'll get the syntax right.

golang regex is beautiful

i've never seen a regex lib as beautiful as golang's https://golang.org/pkg/regexp/ more concise, readable, and powerful than perl python php emacs lisp.

golang regex 2018-08-23 60f01
golang regex 2018-08-23 60f01

draft tutorial Golang: regexp

JavaScript is the worst wart in humanity

JavaScript is the worst wart in humanity. not only the language sucks utmost (even consider only pure es2015+), but i find the community, its people, are typically elite snob millennials.

nim lang, and Uniform Function Call Syntax

looks like https://nim-lang.org/ is a great lang. typed, same niche as golang. but very neat! though, it sports python syntax. (but a better cleaner one)

and via nim lang, i learned Uniform Function Call Syntax. i.e. any function call can use dot notation. e.g. g(f(x,y)) can be written as x.f(y).g , for any functions f g.

see also Ontology of Postfix Notation, Method Chaining, and Unix Pipe Ontology of Postfix Notation, Method Chaining, and Unix Pipe

golang site super slow

one problem with golang is that the website https://golang.org/ is slow. When you lookup package docs, it takes 5 seconds to load.

which programing language is best for unicode text processing?

for unicode text processing, the superiority order of lang is golang ≻ ruby ≻ python 3 ≻ python2 ≻ perl ≻ JavaScript

golang's string is ingenious, and better than python2 python3 ruby perl JavaScript. go string is actually byte sequence, and “😂 that's gonna be problem for unicode”. but actually, the lang is such that it's much easier to process unicode characters than other langs.

here's tutorials:

and here's JavaScript string. JS: String Overview it's the worst. it's sequence of 16bits in utf16 clothing, and ALL its builtin string functions will fail if your string contains emoji. Note, ALL.

Golang: Walk Directory

The Visual Display of Quantitative Information

there's a famous book The Visual Display of Quantitative Information, 2001 by Edward Tufte Buy at amazon which made visualization “science” pop. there is lots tutorials or courses about it. becoming a fad. yet, linux idiot dunno the basics. not in writing, not in pics.

context https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fast.html

nobody interested in “box plot”. just do a simple bar chart. The label is hard to read. also, make the image bigger. you can see lots better plots, e.g. lang popularity by pypy, github, etc. You want simple, easy to read chart. you are not doing quantum math with ya “box plot”.

Golang: String

graphics card 2018-08-21 55ae2
latest and greatest. graphics card, something like that gtx 1080ti gtx 1080 ti

actually that's not the greatest. there are $4k ones.

exceptions is the worst invention in programing language.

watch this video, starting at 38:40, about exceptions is the worst invention in programing language. https://www.youtube.com/embed/TH9VCN6UkyQ?rel=0

added to Why I Hate Exceptions

lua seems idiotic. 3 times slower than the dog python. Well, Mathematica is slow too, but 1 line of Mathematica is 10 thousand lines of python. or 1 thousand lines of haskell. That's the point. That's the context of speed.

Google Advanced Searched removed search by year range

Google has gone completely evil.

golang doesn't have copy file function

1st golang sweetness. reading 2 thousand files, split into array, and print first line, in 0.5 second. 1st bitterness. seems i have to write my own copy function? or call unix cp? i was thinking with go, i no longer have to call shell.

apparently, copy file function is discussed and turned down. https://go-review.googlesource.com/c/go/+/1591

movie Upgrade, AI went wrong. How real is it?


apparently, in recent years, there's a new profession. That is, some guy summarize movie in ~7 minutes. This chinese girl's doing that. She's done perhaps hundreds, new and old. I haven't seen this in usa yet.

(twitter @kingcrimson08 told me, 鼻祖应该是谷阿莫 后来好多人纷纷效仿 都有各自一定规模的粉丝群)

but also note, the content of this movie. (basically, AI went wrong) driverless car went wrong, you have no control. how real is it? looking at today's events, corps, Google Facebook FBI big govs, it's very real. it can be accident, can be cloak n dagger, can be hacker deed.

in this age as AI march on, doesn't matter what a genius hacker u r, what mastery, u r powerless in society. u a coder? u knew already, there's nothing u can do about any Google FB AI pol. However, there's 1 type person that r impervious. Powerful persons, rich, politician.

wow, Steve Yegge left Google

steve yegge left google 2018-01 72642
Steve Yegge left Google

Steve Yegge left Google https://medium.com/@steve.yegge/why-i-left-google-to-join-grab-86dfffc0be84

Steve Yegge, always have great insight. there is lots goodies here, but one thing is, mobile dev is hell, worse than web dev, and React Native is way to go. https://medium.com/@steve.yegge/who-will-steal-android-from-google-af3622b6252e

the voodoo you wanna believe. unix linux

The Elements Of Style: UNIX As Literature

programing language speed comparison sites gone

it seems, programing lang speed/benchmark comparison sites are gone these days. Used to be, e.g. 10 years ago, there are lots, by many. but today, seems only one https://benchmarksgame-team.pages.debian.net/benchmarksgame/ which i think is very low quality

now and then there are competent coders who did benchmark of 2 or more languages in depth, on blogs. but now, google hackernews facebook etc censorship and clickbait induction, you cannot find them.

pointer = the abomination in programing languages

the concept of pointer, or reference, is the number 1 source of abomination in programing languages. for a decade, i wasn't able to express this to hacker faks, they, C C++ compiler fops, call me a troll. but now i can express it firmly in a way they can understand.

pointer, like closure, callcc (aka continuation. e.g. tail recursion), has 0 mathematical value. That is, they have nothing whatsoever to do with computer science. They are, as i say, the side effects of computer engineering.

what's “side effects of computer engineering”? that is, hack. something convient, but ugly, undesirable, that you rather not have.

the problem of pointer, gave us complexities like all sorts of equality (e.g. == === and in JavaScript impossible to compare objects. In other langs, equality is all ad hoc) , shallow copy, deep copy, lisp cons, nested array/list issues. And its problem also sipped into object wrapper primitive types, and the way OOP Object, dot notation expression, etc, concepts are implemented.

one way to see how it's a computer engineering side effect is, ask yourself, what's the pointer of a pointer? if none or can't, why not? you see, immediately, you are tied to a hardware. If it is math, then, you could have nth order reference.

See also:

Golang: Pointer

garbage collection, the jargon

in the programer geekdom, there is obsession with garbage collection. They, gets nerdy with Rust. Rust this n that, Rust day n night. I truly despise these faks. Listen, if u not a idt, go'd be faster than 80% apps out there written in C C++.

the vary problem with this obsession, began with the jargon “garbage collection”. collect ya as. if the term is changed to automatic memory management, there'd be much less fanfare. Jargons, does tremendous damage to computing industry. see

Jargons of Software Industry

this jargon problem is similar to tail recursion (scheme lisp), call cc, lisp1 vs lisp2 (common lisp), lisp macro, closure, list comprehension python, currying, monad (haskell). Whizzing to and fro in different eras.

Golang Tutorial

worked a lot on my Golang by example for beginners. Especially for those coming from high level Python Ruby PHP JavaScript languages. Spend 1 hour, and you pretty much can start coding.

someone asked about argument for my height of unix.

here they are

golang walk dir 2018-08-17 ad8ea
golang walk dir 2018-08-17 ad8ea

now i fully understand golang traverse directory. tutorial coming up

what language should retire, based on pure technicality

① as you may know, most lang popularity are due to inertia. but, if we ignore that, then, what langs are left? i want to get a picture. golang in my view crosses out python ruby php perl. java is also out, by one or all of scala clojure kotlin.

② i dunno rustlang, but pretty sure it or golang wipes C C++. • Racket wipes scheme common lisp elisp. • swift prob wipe ObjectiveC D. • bash is out, by powershell. • julia wipes R matlab

③ here's some am unsure: • shen ocaml fsharp haskell elixir • erlang clean mercury • Csharp nim • tcl lua • elm haxe • vala genie factor and more. can you help? but i should say some criteria in next post first.

④ a lang must be at least 5 years old AND used by several or sizable companies to be considered, for “wiping” other. e.g. swift. but maybe not Dart, Pyret. lang to be wiped also should be somewhat popular, used by some corps. Not niche that few knows. e.g. purescript.

See also: Proliferation of Computing Languages

Brendan Eich on JavaScript history.

modeled on perl, that did it.


some old unix rant year 2002.

  1. What's the Max Number of Directories a Directory Can Have?
  2. Unixer Plain-Text Email Fetish
  3. Laziness, Perl, and Larry Wall

to my patreons, thank you and notes https://www.patreon.com/posts/20816906

perl 6 book

after 15 years. i dunno if this happy or sad. One brian d foy, the last perl monger. https://twitter.com/LearningPerl6/status/1029864498285301760

etymology links 2018-08-16 20d74
etymology links 2018-08-16 20d74

reworking on my HTML/CSS links to english etymology. that's emacs screen. the script is python. will be golang by next week.

what's a struct?

if you code in scripting lang (js php python ruby perl), you probably never heard of struct or record. but its in go, racket lisp, clojure lisp, and of course, C C++. here's a quick introduction. xahcode

Why Does Struct Datatype Encroach Namespace?

golang doc is the best

Which Programing Language Has Best Documentation?

here's what not to do for tech writing:

doc by dummies, Technical writing at its worst

Python Web Crawler in 40 lines Python: Web Crawler

Google interview problem. Programing Problem: Construct a Tree Given Its Edges

lang creators, who do you like?

Of the lang creators, i think Rob Pike of golang knows what he's talking about, and Rich Hickey clojure. And Guy Steele, Gerald Sussman, Matthias Felleisen, Scheme Racket lisp. Anders Hejlsberg of C and TypeScript. Those dunno what they talking about: Larry Wall of perl, Guido of python.

clojure concurrency, by Rich Hickey

here's Rich Hickey, giving a talk about concurrency in clojure. I always liked him. He gives it as is. Not shy, not cocky, not crackpot. He just give his point of view and fairly confident about it.

clojure concurrency, by Rich Hickey

golang rune means unicode codepoint

somewhat annoyed that golang invented a new word for unicode codepoint: rune.

this is a good article https://blog.golang.org/strings

See also: Unicode Basics: What's Character Set, Character Encoding, UTF-8?

note that golang uses CamelCase, departure from C. No more pesky _

Computer Languages Characters Frequency

can someone go plot your go code. post screenshot. thanks.

concurrency, clojure vs golang

when it comes to concurrency, with clojure, there is lots philosophy and after a month you still dunno how to. with golang, you get it within 10 minutes. compare:

programing languages and their computational model

Programing Language and Their Computational Model

new version of my ∑ Xah Code site is out ∑ Xah Code if you like my work, buy it. Thanks.

Xah Code Sitemap currently 3419 articles on programing and math.

git tip of the day. to copy a BIG git directory without the .git , do git clone --depth 1 file:///Users/xah/web/dirname this is probably fastest way.

git clone no history 2018-08-10 aad8f
git clone no history 2018-08-10
id num of digits 2018-08-07 91ad1
id num of digits 2018-08-07

i have a obsession about this. everytime i have a random string as id, i fuzz about if i can save 1 digit. Math: ID System, Number Base vs Number of Digits

according to the math, using just digits 0 to 9 for base is good enough. Adding more char to base e.g. a to z does not increase the pool much. Rather, you want to add string length, this way, the pool increases exponentially.

but but but, am thinking, maybe add a to f to make it hexadecimal is good. why not? because it increases the pool, and also has the property of easy convert to number, and no disadvantage of generating actual words such as fsck

then i dither, why not go all the way to use a to z. adding 26 extra char would reduce collision. the chances of generating annoying actual word such as yousuck is minimal. then i thought removing aeoui and 0o1l so it has property of being readable for verbal communication!

then i thought, let's go full out, 0 to 9, a to z, A to Z. This will further reduce collision, and less chance of creating actual english words. but then, i worry, for some file system or situation, case sensitivity is a problem. also, now it's hard for verbal communication.

then, you survey what google etc do.

then, there is uuid. e.g. 838f9f38-f241-11de-a663-002421597a5c but it's unwieldily. too long. What's Windows CLSID? Second Life UUID?

What Are the Differences Between Clojure, Scheme/Racket and Common Lisp?

What Are the Differences Between Clojure, Scheme/Racket and Common Lisp? https://ift.tt/2AP7AsR (cmts https://ift.tt/2LXHXLV )

let me answer that. Clojure is not a traditional lisp. Rather, a newish functional programing language with focus on immutabe data structure, with lisp syntax.

However, the language ties heavily with java, to such a degree that you need to master java to be a master of clojure. Also, it runs on the Java Virtual Machine monster.

Scheme/Racket is old school lisp, known for its miniminalism, and said to be most elegant. Mostly used in academia, and particularly good for programing language research. That is, it provides mechanisms to let you experiment with different evaluation strategy (e.g. eager, lazy) and other language features.

Common Lisp = old monster. It is comittee result of merging the lisp language wars of 1980s. Said among some lispers as the most practical. Most used in industry, before clojure.

Note, both Racket/Scheme and Common Lisp are deadish, and clojure is struggling in industry among the many choices, e.g. kotlin, scala, haskell, ocaml.

related articles:

Unicode Characters ∑ ♥ 😄

updated to unicode 11. Still some lose ends to work on, but want to announce now.

ghost characters: 妛挧暃椦槞蟐袮閠駲墸壥彁

there are character created from Japan copy editing mistakes, but have since been in unicode.

[A Spectre is Haunting Unicode By Paul Mccann. At https://www.dampfkraft.com/ghost-characters.html ]

Unicode Geometric Shapes ■. added some 20 new ones.

amazon is now doing amazon coins amazon coins looks like it's for use in video games only.

Xah Programing Blog Archive

If you have a question, put $5 at patreon and message me.