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.

discuss at https://plus.google.com/+XahLee/posts/KsqfHJv5wZJ

Linux: iptables & netfilter Firewall Tutorial

Computer Network Tutorial

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

On Constructed Languages, Computer Languages, and Their Grammar Complexity

Formal Definition of Systematic Grammar

Programing Languages Sugar Syntax: Compiler Level vs User Level

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

http://haxeflixel.com/documentation/enemies-and-basic-ai/

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.

Practical Aspect of Expressiveness of a Language

Linux: How to Restart X11

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 history of JavaScript is, Nescape, desparate to make money, envisions a dynamic html. hired a Scheme lisp fan to do it, and it's done in 10 days.

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.

How Does a Unicode Character Get Mapped to a Glyph in a Font?

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/

https://github.com/programa-stic/security-advisories/tree/master/ObjSys/CVE-2016-5080

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

Linux: Xfce Good Themes

Linux: PulseAudio Control Panel Command Line

What Languages to Hate

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.

The Condition of Industrial Programers: Learn LISP in 10 Days

but today, even #haskell is passé. It's like, we have a new shiny better-than-haskell language every month.

old articles navigation panel

What Languages to Hate

a decade old newsgroup rants now have side-panel index, for your reading pleasure.

swashbuckling thru all the idiocy of the world

[twitter quibbles]

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

then, killall indicator-application-service

there are few others, starting with “indicator-”.

linux xfce session and startup 2016-06-29
linux xfce session and startup

goto control panel, “Sessions and Startup”, in the autostart tab, uncheck the Indicator stuff.

Linux: What's Zeitgeist, How to Uninstall It

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

amazong fire tablet 82660
amazon Fire 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

the guy who started the idiotic chant among hackers that semantics is more important than syntax, is probably Matthias Felleisen.

Method Chaining, Postfix Operator, and OOP

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).

Programing Language Tutorials Index

now phone friendly (that is, display well in small screen). Best there are JavaScript, then emacs lisp then python.

unicode white flower
💮 U+1F4AE: WHITE FLOWER

Unicode Search

a passage of process 2016-06-13
a passage of process

https://plus.google.com/+XahLee/posts/6s4MQHp363s

hi im cortana 21221

Siri, Cortana, Ok Google, Are the Future of AI, the Embodiment of AI

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.

sad face.

Linux: How to Upgrade Xfce

How Find Xfce Version?

lisp apostrophe quote '(a b c) came from MacLisp

Past Articles by Date

2016-052016-042016-032016-022016-012015-122015-112015-102015-092015-082015-072015-062015-052015-042015-032015-022015-012014-122014-112014-102014-092014-082014-072014-062014-052014-042014-032014-022014-012013-122013-112013-102013-092013-082013-072013-062013-052013-042013-032013-022013-012012-122012-112012-102012-092012-082012-072012-052012-042012-032012-012011-122011-112011-092011-072011-062011-042011-012010-122010-112010-092010-052010-01