Jinser Kafka › translations [jsr-000N]

翻译文章的列表,标记的时间是翻译时间。

Translation. Python Negatypes [jsr-0014]

This article is translated from Hillel Wayne's article titled "Python Negatypes".
本文翻译自 Hillel Wayne 题为《Python Negatypes》的文章
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。
Translated according to the version last updated on Sep 26, 2019.
根据2019年9月26日更新的版本翻译。

Translation. Grasping `all-the-apples-at-once' [jsr-000U]

This article is translated from Oleg Kiselyov's article titled "Grasping `all-the-apples-at-once'".
本文翻译自 Oleg Kiselyov 题为《Grasping `all-the-apples-at-once'》的文章
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。
Translated according to the version last updated on June 3, 2024.
根据2024年6月3日更新的版本翻译。

Translation. Using zippers to handle huge trees [jsr-000Q]

This article is translated from Diego Olivier Fernandez Pons's article titled "Using zippers to handle huge trees".
本文翻译自 Diego Olivier Fernandez Pons 题为《Using zippers to handle huge trees》的文章
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。有修复原文 typo。

嗨,
Bonjour,

2003年4月9日星期三,Yang Shouxun 写道:
我不知道如何编写尾递归版本来构建树。如果连续属性不多且数据集也不是很大,那树会在堆栈溢出之前停止生长。
(译者按:连续属性是指其在数据集中可以取无限多值,通常是实数,例如身高、温度等。)
On Wednesday, 09 Apr 2003, Yang Shouxun wrote:

> I don't know how to write a tail recursive version to build trees.
> If there are not that many continuous attributes and the dataset is
> not so large, the tree stops growing before stack overflow.

2003 年 4 月 9 日星期三,Markus Mottl 写道:
这里的诀窍是使用延续传递风格(CPS):传递一个包含后续计算所需的所有内容的函数闭包(延续)。子函数不返回结果,而是使用结果调用延续,这使得函数成为尾递归。
On Wednesday 09 April 2003, Markus Mottl wrote:

> The trick is to use continuation passing style (CPS): you pass a
> function closure (continuation) containing everything that's needed
> in subsequent computations.  Instead of returning a result, the
> sub-function calls the continuation with the result, which makes the
> functions tail-recursive.

zipper 是一种处理巨大(实际是无限)tree 的简单方法。
Zippers are a simple way to handle huge (in fact infinite) trees.

Translation. Guile's reader, in guile [jsr-000R]

This article is translated from Andy Wingo's article titled "guile's reader, in guile".
本文翻译自 Andy Wingo 题为《guile's reader, in guile》的文章
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。

晚上好!今天的简短(大概?)记录是一些关于 guile 书呆子 ( nargery ) 的内容。
Good evening! A brief note today about some Guile nargery.

Translation. Baby’s First Garbage Collector [jsr-000P]

This article is translated from Bob Nystrom's article titled "Baby’s First Garbage Collector".
本文翻译自 Bob Nystrom 题为《Baby’s First Garbage Collector》的文章
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。

当我感到压力大、要做的事情太多时,我会产生一种矛盾的反应:通过找其他事情来逃避。通常这件事是一个我可以编写和完成的小型独立程序。
When I get stressed out and have too much to do, I have this paradoxical reaction where I escape from that by coming up with another thing to do. Usually it’s a tiny self-contained program that I can write and finish.

一天早上,我正对我正在写的书我在工作中必须做的事情以及我正在为《Strange Loop》准备的演讲感到害怕,突然间,我想,“我应该写一个垃圾回收器。”
The other morning, I was freaking myself out about the book I’m working on (http://gameprogrammingpatterns.com/) and the stuff I have to do at work (http://dart.dev/) and a talk I’m preparing for Strange Loop (https://www.infoq.com/presentations/dart-introduction/), and all of the sudden, I thought, “I should write a garbage collector.”

是的,我意识到那段话让我看起来有多么疯狂。但我的搭错神经带来的是编程语言实现基础的免费教程!在大约一百行常规 C 代码中,我成功地创建了一个基础的标记清除,你知道的,垃圾回收。
Yes, I realize how crazy that paragraph makes me seem. But my faulty wiring is your free tutorial on a fundamental piece of programming language implementation! In about a hundred lines of vanilla C, I managed to whip up a basic mark-and-sweep (https://en.wikipedia.org/wiki/Tracing_garbage_collection#Na%C3%AFve_mark-and-sweep) collector that actually, you know, collects.

一般认为,垃圾回收是编程中充满挑战的领域之一,不过在这篇文章里,我会引导你走上一条相对平坦的道路。(路上仍然可能有坑,但至少会浅一点)
Garbage collection is considered one of the more shark-infested waters of programming, but in this post, I’ll give you a nice kiddie pool to paddle around in. (There may still be sharks in it, but at least it will be shallower.)

Translation. Zipper in scheme [jsr-000O]

This article is translated from Oleg Kiselyov's article titled "zipper in scheme".
本文翻译自 Oleg Kiselyov 题为《zipper in scheme》的文章
Title added by translator. 标题由译者添加。
tips: Click on the translation to expand and view the original text. 点击译文可展开查看原文。