Xah Programing Blog
On programing, languages, functional programing, Unicode, hacker culture, ….
Functional Programing's Time Has Come
I've been doing FP since 1995, at Wolfram Research. Now, after 20 yrs, it is finally accepted in industry. OCaml, Haskell, are used at Facebook and Google … 😢
Pattern Matching, OCaml, Haskell, vs Wolfram Language
now i'm getting it. OCaml and Haskell's “pattern matching” are just “case” statements, while Wolfram Language pattern matching are actually BNF parser on symbols.
i always knew, that Haskell and OCaml's pattern matching is not the same as Mathematica. Now i know, it's not even in the same league.
now with navigation panel
notation and thought
this, collection of articles about notation and thought, is excellent! https://github.com/hypotext/notation
the vengeance of my thesis!
here's relevant articles. Actually, most of my 100+ computer lang articles of the past decade, is around this subject matter.
The quality of a programing language, can be judged by how much of it can be explained by its syntax alone. Programing Language Syntax Soup
how does a modern massive multiplayer online game work?
how a game work? any tutorial recommendation? not interested in exact how-to tutorial nor framework recommendation. But how does it work, in general, explained to a programer.
for example, i know how web site work, all details, from server to client to protocols to lang and framework, database, components, all.
so i want to know how game works, especially understand how modern complex 3D game works. the skeleton, tech.
for example, As far as i know, i know about Tetris or writing a board-game. In Tetris, basically you have a loop… take user input, update screen, something like that. But in more complex games, such as 2D Mario or Donkey Kong… how does it work? and in complex 3D games today, The Legend of Zelda: Ocarina of Time , how does it work? the 3d graphics, the scene map, the AI, how it all work?
some one showed me this heavy site, deep dissecting a game engine. May not be exactly what i was looking for, but interesting anyway.
〔DOOM3 SOURCE CODE REVIEW: INTRODUCTION (PART 1 OF 6) By Fabien Sanglard. @ http://fabiensanglard.net/doom3/index.php〕
paradox: currying, pointless programing, and referential transparency
just had a epiphany functional programing paradox, on currying, pointless programing, and referential transparency.
in haskell etc, you have currying, which relies on resolving variable in outer scope to work.
then, there's the idea that every function's variable/constants, must be passed thru parameter.
but these two conflicts.
i have yet to resolve it.
doc by dummies (now with side nav panel. some are recent.)
Python Documentation Problems (old essays. now with side nav panel)
Jargons of Software Industry (old essays. now with side navigation panel)
history of programing languages
one guy, works with unix tools grep sed bash etc, got fed up. Tried to improve it. that's the gist of perl history.
the history of python is, one guy, worked with ABC lang, got fed up, tried to improve it, and begot python, then think it's greatest lang.
the history of ruby is, Matz saw perl, thought it's powerful but syntax bad, and want to improve it, with emacs lisp influence.
the history of PHP is, a kid created his Pretty Home Page ~1997, CGI with perl scripts. then it became PHP.
the creator of these languages, technically, know nothing about language design or computer science. (possibly except the js guy.)
these in contrast to ocaml, which has origin in theorem proving, the heart of compute science.
〔Code-execution vuln resides in code used in cell towers, radios, and basebands. By Dan Goodin. @ http://arstechnica.com/security/2016/07/software-flaw-puts-mobile-phones-and-networks-at-risk-of-complete-takeover/〕
〔FLAWS IN WIRELESS MICE AND KEYBOARDS LET HACKERS TYPE ON YOUR PC By Andy Greenberg. @ https://www.wired.com/2016/02/flaws-in-wireless-mice-and-keyboards-let-hackers-type-on-your-pc/#slide-1〕
Intro to POV-Ray (added navigation panel)
Clojure Instaparse Parser Tutorial (added navigation panel)
what kinda semantics is amendable to static analysis (so can compile fast code)? golang, rust, ocaml, are good to look into
linux desktop progress; creating linux theme = pain
linux i thought, after 2 decades, creating a theme is just parametrized gui tweak. Like, you'd just pick a color for different places, pick different background image for widget's look. but it's not like that at all. It's actually a major pain in the ass.
see this xfwm4 theme how-to at https://wiki.xfce.org/howto/xfwm4_theme
Of all languages, i have preferences of my own, but mostly, i voice agaist those that are lies by either marketing (e.g. java) or fashion (perl, now haskell).
have you heard of Teach Yourself Programming in Ten Years By Peter Norvig? that's widely cited, and most unreal article, loved by hackers.
but today, even #haskell is passé. It's like, we have a new shiny better-than-haskell language every month.
old articles navigation panel
a decade old newsgroup rants now have side-panel index, for your reading pleasure.
swashbuckling thru all the idiocy of the world
next 4 hours, ocaml ＆ js. ma like, gonna study myself to death, brace ＆ blast thru all odds.
like, swashbuckling thru all the idiocy of the world and die a martyr.
the incredible crime of unix, is forgotten. new generation knows not an iota.
there's a change in past decade of IT industry, that unix/linux command line art is no longer a thing.
sys admin becomes dev ops, and that's like cloud stuff, and docker and semi python.
sometimes i wonder, aren't there computer scientist research on syntax stuff like those i care about.
i think the answer is yes, but rather considered unimportant and esoteric. To see them, one has to be in the field of parser and compiler.
you know? as in math, there are hundreds of branches and aspects, interest and take comes and go as fashion. Similarly is computer sci topics.
ocaml syntax abuse is dire
wow, ocaml syntax abuse is dire.
= is both assignment and equality test, depends on context.
i get the sense that since Meta Language, most functional language syntax derives from it, and are ad hoc garbage, possibly worse than C. e.g. haskll
command line to suspend machine propertly (also lock), for xfce.
# command to suspend machine xfce4-session-logout --suspend
xubuntu system tray icons missing
in Ubuntu 14.04, when running xfce (xubuntu), the system tray (notification area) icons is missing. That is, you don't see your internet connection status, sound volume, etc.
the problem is Ubuntu Unity's “indicator plugin”. It is some kinda replacement, but doesn't work well. Kill it, and icons will show in your old system tray.
to find all the process fullname, do
grep -ef | grep indicator
there are few others, starting with “indicator-”.
goto control panel, “Sessions and Startup”, in the autostart tab, uncheck the Indicator stuff.
in Ubuntu linux, there's this Zeitgeist daemon. It logs your activities, for the same reason you don't want to be on Windows.
OCaml Tutorial: Function (rewrite. For beginner. My learning notes.)
amazon $50 tablet
amazon is selling tablets for $50. amazon
must be some kinda theory of economy. like, suck u in first, than make u do.
why syntax is more important than semantics
- 1. xah's edu corner extempore! episode 20160621920160700 why syntax is more important than semantics!
- 2. it's popular among hackers, the notion that semantics is more important than syntax. Even comp sci professors have said so, in text books.
- 3. IDIOTS
- 4. if you've studied history of math notations, you'll know. The notation, leads your perspective, and future direction on the subject.
- 5. for example, if lisp not parens, lisp macro would not have developed. if unix shell used lisp syntax, pipe | will not have developed.
the guy who started the idiotic chant among hackers that semantics is more important than syntax, is probably Matthias Felleisen.
xfce vs lxde
after many back and forth over the years, i really want to like lxde, but prefer xfce.
pros of lxde: more energy efficient than xfce. GUI simpler ＆ functional. Things Just work. Doc is excellent.
xfce you have to diddle a lot, things don't work, confusing UI, incomplete or non-existent doc.
lxde major problem: no display composition = sometimes tear＆freeze, drag image is opaque, this is a problem, not just prettiness issue.
lxde major problem 2: No key to switch window of current app (and no, can't be easily scripted neither).
xfce window focus bug
lots focus bug mouse hover to raise window, in xfce ubuntu 14.04. upgrading to xfce14.12, then you got wmctrl problem. 4 hours wasted.
here's the detail.
Activating a window from the taskbar doesn't focus it when 'focus follows mouse' https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1292122
now, its supposedly fixed. See: http://git.xfce.org/xfce/xfwm4/commit/?id=1a20a88
so, now you upgrade xfce to 4.12. Linux: How to Upgrade Xfce
but now, there's wmctrl problem. That is,
when you use the wmctrl tool to switch window
wmctrl -xa emacs, it won't focus, only raise.
if you turn off mouse raise window, then the problem goes away. But, i want mouse raise window.