Xah Programing Blog Archive 2017-11

History of OCaml and Haskell Syntax, and The Next 700 Programming Languages

google AlphaZero beats best chess software stockfish. And AlphaZero only learned the game from scratch, in 4 hours.

Then, in 2 hours it learned shogi (Japanese chess (much more complex)) and beat the best shogi software.

scary AI is happening.

https://www.chess.com/news/view/google-s-alphazero-destroys-stockfish-in-100-game-match

augment protein bacterium fee5e
“It's a 3D model of a protein from a bacterium. This one is called TolC, and is used by E. coli to get rid of compounds it doesn't like (including antibiotics). Our lab seeks to understand how bacteria resist antibiotics and cause infections.” from [2017-11-23 https://twitter.com/Allister_Crow ]

Predicate in Programing Languages and Naming

removed comment system on my site

disqus_ad_spam_2017-04-30-s250
disqus ad spam

Unicode Flags 🏁 (major rewrite)

Unicode User Interface Icon Becomes Emoji

unicode emoji should be ban'd. Extremely annoying to show a symbol it becomes a emoji.

if you have , the last becomes a emoji.

Adding U+FE0E does not always work.

And in MacOS, it has a bug forcing emoji tiny, same size as a letter. It ignores CSS font size spec.

and which symbol will become emoji is unpredictable. On twitter, both become emoji.

ok, the whole thing is pretty fkd.

see [Apple did not invent emoji By Eevee. At https://eev.ee/blog/2016/04/12/apple-did-not-invent-emoji/ ]

and see replies at [ twitter xah_lee ] [ 2017-11-04 https://twitter.com/xah_lee/status/926994405046722560 ]

the problem of computerizing math, began with: THERE EXIST , and FOR ALL . #haskell #coq #typetheory

Plants Emoji 🌹 (added a macOS screenshot)

xah edu corner extempore! episode №20171101042745, ban recursion in programing languages

1 with regards to computer science, recursion should be ban'd in programing languages.

2 it's got the chicken n egg problem: before it's defined, it's calling itself. Like russell's paradox, or 1st order logic in twilight zone

3 But in math, we have recursive relation, and comp sci recursive theory. How to resolve that?

4 in math, nth term is defined by previous term, and f[1] is defined non-recursively. so, it's well defined. In a sense, no “recursion”

5 in most programing langs, body of recursive f use “if” to check input. So, “no recursion” really. But chicken n egg remain in defining f.

6 some lang, (Mathematica, haskell), can define f(1) and f(n) separately. So, no chicken n egg recursive definition problem.

7 actually chicken n egg recursive definition problem remain. With respect to order of evaluation.

need to think about this more

Quiz, Write a NestList Function

Quiz. write a function r(f,x,n) that returns a list [f(x), f(f(x)), ...], length n. write in your fav lang.

f is function (example: f(x) = x+1), x is a number, n is a number ≥ 1. we want [f(x), f(f(x)), ...]

#haskell #javascript #golang #clojure

Someone asked why is this useful? For example, factorial function, or fibonaci sequence. In math it happens often. Check out logistic map or iterated function system or dynamical systems, mandelbrot set.

comment at

https://noagendasocial.com/@xahlee/98929138430987793

https://plus.google.com/+XahLee/posts/f2phScSxUrc

[ twitter xah_lee ] [ 2017-11-01 https://twitter.com/xah_lee/status/925538572832202752 ]