diff options
author | EuAndreh <eu@euandre.org> | 2021-04-24 18:57:40 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-04-24 18:57:40 -0300 |
commit | 0e6bf02503fffd89891eb37f023911ff98d022cf (patch) | |
tree | 09172a1d43c87951a51d7536ad60185fd094a526 /locale/eo | |
parent | Explicitly order TILs written in the same day (diff) | |
download | euandre.org-0e6bf02503fffd89891eb37f023911ff98d022cf.tar.gz euandre.org-0e6bf02503fffd89891eb37f023911ff98d022cf.tar.xz |
Update locale files
Diffstat (limited to '')
3 files changed, 96 insertions, 6 deletions
diff --git a/locale/eo/LC_MESSAGES/_tils/2021-04-24-clojure-auto-curry.po b/locale/eo/LC_MESSAGES/_tils/2021-04-24-clojure-auto-curry.po index 8e448d0..14036ab 100644 --- a/locale/eo/LC_MESSAGES/_tils/2021-04-24-clojure-auto-curry.po +++ b/locale/eo/LC_MESSAGES/_tils/2021-04-24-clojure-auto-curry.po @@ -5,9 +5,6 @@ msgstr "" msgid "title: Clojure auto curry" msgstr "" -msgid "date: 2021-04-24" -msgstr "" - msgid "layout: post" msgstr "" @@ -90,6 +87,12 @@ msgid "" "Clojure's multi-arity support:" msgstr "" +msgid "date: 2021-04-24 1" +msgstr "" + +#~ msgid "date: 2021-04-24" +#~ msgstr "" + #~ msgid "" #~ "A simple macro defined by [Loretta " #~ "He](http://lorettahe.github.io/clojure/2016/09/22/clojure-auto-curry) to " diff --git a/locale/eo/LC_MESSAGES/_tils/2021-04-24-common-lisp-argument-precedence-order-parameterization-of-a-generic-function.po b/locale/eo/LC_MESSAGES/_tils/2021-04-24-common-lisp-argument-precedence-order-parameterization-of-a-generic-function.po index 2676e93..6aa66a8 100644 --- a/locale/eo/LC_MESSAGES/_tils/2021-04-24-common-lisp-argument-precedence-order-parameterization-of-a-generic-function.po +++ b/locale/eo/LC_MESSAGES/_tils/2021-04-24-common-lisp-argument-precedence-order-parameterization-of-a-generic-function.po @@ -7,9 +7,6 @@ msgid "" "function" msgstr "" -msgid "date: 2021-04-24" -msgstr "" - msgid "layout: post" msgstr "" @@ -193,6 +190,12 @@ msgid "" "Oriented_Programming_in_Common_Lisp), by Sonja E. Keene" msgstr "" +msgid "date: 2021-04-24 2" +msgstr "" + +#~ msgid "date: 2021-04-24" +#~ msgstr "" + #~ msgid "" #~ "CLOS has to make a choice between the first and the second definition of " #~ "`yet-another-fn`, but its choice is just a heuristic. What if we want to the" diff --git a/locale/eo/LC_MESSAGES/_tils/2021-04-24-three-way-conditional-for-number-signs.po b/locale/eo/LC_MESSAGES/_tils/2021-04-24-three-way-conditional-for-number-signs.po new file mode 100644 index 0000000..4b98383 --- /dev/null +++ b/locale/eo/LC_MESSAGES/_tils/2021-04-24-three-way-conditional-for-number-signs.po @@ -0,0 +1,84 @@ +# +msgid "" +msgstr "" + +msgid "title: Three-way conditional for number signs" +msgstr "" + +msgid "date: 2021-04-24 3" +msgstr "" + +msgid "layout: post" +msgstr "" + +msgid "lang: en" +msgstr "" + +msgid "ref: three-way-conditional-for-number-signs" +msgstr "" + +msgid "" +"A useful macro from Paul Graham's [On " +"Lisp](http://www.paulgraham.com/onlisptext.html) book:" +msgstr "" + +msgid "" +"(defmacro nif (expr pos zero neg)\n" +" (let ((g (gensym)))\n" +" `(let ((,g ,expr))\n" +" (cond ((plusp ,g) ,pos)\n" +" ((zerop ,g) ,zero)\n" +" (t ,neg)))))\n" +msgstr "" + +msgid "" +"After I looked at this macro, I started seeing opportunities to using it in " +"many places, and yet I didn't see anyonelse using it." +msgstr "" + +msgid "" +"The latest example I can think of is section 1.3.3 of [Structure and " +"Interpretation of Computer " +"Programs](https://mitpress.mit.edu/sites/default/files/sicp/index.html), " +"which I was reading recently:" +msgstr "" + +msgid "" +"(define (search f neg-point pos-point)\n" +" (let ((midpoint (average neg-point pos-point)))\n" +" (if (close-enough? neg-point post-point)\n" +" midpoint\n" +" (let ((test-value (f midpoint)))\n" +" (cond ((positive? test-value)\n" +" (search f neg-point midpoint))\n" +" ((negative? test-value)\n" +" (search f midpoint pos-point))\n" +" (else midpoint))))))\n" +msgstr "" + +msgid "" +"Not that the book should introduce such macro this early, but I couldn't " +"avoid feeling bothered by not using a `nif` macro, which could even remove " +"the need for the intermediate `test-value` variable:" +msgstr "" + +msgid "" +"(define (search f neg-point pos-point)\n" +" (let ((midpoint (average neg-point pos-point)))\n" +" (if (close-enough? neg-point post-point)\n" +" midpoint\n" +" (nif (f midpoint)\n" +" (search f neg-point midpoint)\n" +" (midpoint)\n" +" (search f midpoint pos-point)))))\n" +msgstr "" + +msgid "" +"It also avoids `cond`'s extra clunky parentheses for grouping, which is " +"unnecessary but built-in." +msgstr "" + +msgid "" +"As a macro, I personally feel it tilts the balance towards expressivenes " +"despite its extra cognitive load toll." +msgstr "" |