V2EX xuanwu
xuanwu

xuanwu

V2EX 第 338573 号会员,加入于 2018-08-05 00:29:16 +08:00
今日活跃度排名 18727
xuanwu 最近回复了
写出的英文代码往往更没有拥有感:
https://www.zhihu.com/question/355691918/answer/904463940
木兰项目用 rply 生成 python 语法树:
https://gitee.com/MulanRevive/mulan-rework
项目源码用中文命名,方便阅览:
![分析器]( https://pic1.zhimg.com/80/v2-09c2cd22c6908f3869fc53900100280f_1440w.webp?source=2c26e567)
第一个例子,用二楼的 token 计算器测“我爱人工智能” 是 4 个。
自己先做下实验为好。
关于 Basic ,之前看到这篇: https://nicolasbize.com/blog/2016/05/16/Thirty-years-later-QBasic-is-still-the-best/
一个针对初学者的简约的 basic 版本且将报错等反馈信息和界面等逐步本地化,感觉是有长期社会价值、维护开销也较低的课题。
记得 gh 也有不少开源的 basic 可参考。

另外,通过母语命名标识符可改进可读性、降低维护开销:
Python3 选择支持非 ASCII 码标识符的缘由: https://zhuanlan.zhihu.com/p/31598712
https://gitee.com/gitee-community/opensource-guide/blob/master/guide/introduction/misconceptions.md#%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%E5%BF%85%E9%A1%BB%E7%94%A8%E8%8B%B1%E6%96%87%E5%91%BD%E5%90%8D%E6%A0%87%E8%AF%86%E7%AC%A6%E5%90%97
[随笔] 业余项目用中文命名的舒适: https://zhuanlan.zhihu.com/p/261451253
在国内原创开源项目中使用中文命名的意义与方式: https://zhuanlan.zhihu.com/p/53050766

[隔壁十数年的坚持] 如何看待“抚子”等日语编程语言用于日本中学教学? https://www.zhihu.com/question/510639541
把项目用起来。
如木兰编程重现项目中,对 rply 进行了定制和本地化: https://github.com/nobodxbodon/rply
后用它做了各种设计的验证原型: t/1149176?p=2#r_16569607

用木兰写了博客聚合工具: https://github.com/nobodxbodon/collection-of-chinese-blogs/tree/master/%E5%8E%9F%E5%9E%8B
71 天前
回复了 2024 创建的主题 程序员 大家愿意中文编程吗
@loading 「母语命名标识符对代码清晰度和可维护性的提高」 Python3 选择支持非 ASCII 码标识符的缘由: https://zhuanlan.zhihu.com/p/31598712

“Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.” — Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

例程中英版本对比: https://zhuanlan.zhihu.com/p/343234177

![截图]( https://picx.zhimg.com/v2-9930ed0933ec61ca05fc88abfbcea9b9_r.jpg)
71 天前
回复了 2024 创建的主题 程序员 span class="chevron"> 大家愿意中文编程吗
72 天前
回复了 2024 创建的主题 程序员 大家愿意中文编程吗
七年前起搜集的一些本地化的编程语言项目: https://github.com/program-in-chinese/overview/issues/25

一对一的关键字中文化在语法设计上的受限挺大。可以试试用类似 rply 的解析器框架作语法设计的快速原型,几个例子:
- 从“零”开始设计中文编程语言SQL 领域演示: https://zhuanlan.zhihu.com/p/415732605
- 编写语法解析器一例程时撞到的常见报错与解决: https://zhuanlan.zhihu.com/p/684860819
- 用 z3-solver 搭个微型逻辑编程语言原型: https://zhuanlan.zhihu.com/p/1924448382409213544
72 天前
回复了 2024 创建的主题 程序员 大家愿意中文编程吗
「母语编程的范畴相当广。个人看来,将关键词母语化与其说是第一步,不如说是锦上添花的“花”。」
MoonBit 国产编程语言提供中文关键字的可能性有多大?: https://www.zhihu.com/question/632589892/answer/3310126506
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     831 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 20ms UTC 21:41 PVG 05:41 LAX 14:41 JFK 17:41
Do have faith in what you're doing.
ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86