IDE
#
VS (Visual Studio) Community (Free Version)
#
(TODO)
CodeBlocks
#
中文版(含 MinGW GCC): https://github.com/anbangli/codeblocks-cn
VS Code (VSC)
#
(TODO)
on windows
#
For English, see official doc: https://code.visualstudio.com/docs/languages/cpp
Install msys2-x86_64-20240727.exe (use the default path, which is on C:…).
Install w64devkit-x64-2.0.0.exe (change path to C:, it will add w64devkit folder.)
VSCode 配置 LLM 提供商
#
tested: 2026-07-01, version 1.126.0.
点击 “Chat” 的 模型选择 》管理语言模型: . (在普通 Coding 模式或 Agents 模式都可以)
或:Ctrl + Shift + P 搜索 “manage language models” (中文版:“管理语言模型”???)
打开模型管理窗口后,点窗口右边 “添加模型” 》“自定义接入端口”: .
给这个供应商起个昵称:
.
填写 apikey: .
选择 api 格式(类型): .
然后弹出 json 编辑器,有 5 行(红框部分)暂时(2026-07-01)还需要手动修改。
注意:URL 一定要写全(红圈部分);上下文窗口大小(context window max tokens)需要自己查清楚输入和输出窗口大小,实在查不到只能按能兼容的最小数值写。
提示:apikey 已经被自动放到其他地方,避免 json 备份泄露;如果你个人使用不在意,也有直接写到 json 文件的。 .
回到 Agents 界面,就可以搜索并选用新添加的模型了: .
老界面的 “Chat” 功能也可以用: . .
...
Data Structure Alignment 数据结构对齐
#
x86-64 architecture
#
Overall rule: any data structure/element should be accessed by CPU with minimum CPU cycles. A 32bit CPU can access 4Bytes in one cycle, while a 64bit one can access 8Bytes. When a memory access is not aligned, it is said to be misaligned (wiki).
Thus, there are two practical rules for us to understand compiler’s padding:
Rule 1: any basic data structure/element/variable should be aligned so that their beginning address is divisible (任何变量的开始地址都能被自己的大小整除,即:当被访问的数据长度为 n 字节时,数据地址为 n 字节对齐。).
...
Before comparison, we need to know that the following sizes are roughly the same: dejavu09 vs mononoki10 vs inconsolata10
Dejavu
#
If you are looking at this page, you know coding. If you know coding, you should know Dejavu. Thus, I will skip the intro for it.
Mononoki
#
looks similar like dejavu, but its punctuation is much bigger and easier to see. // may draw mroe attention than code ?
...
Comments? NO Comments!
#
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Code for readability. – John F. Woods
A comment is an apology.
ref1,ref2
URL’s
#
Learn Programming by Game
Variable Names
#
finding suitable names
#
CN-EN variable names: web: CODELF, (intro: video)
general rules
#
Dan McDougall 发布了Gate One v0.9版。Gate One是利用HTML5技术开发的Web终端模拟器和SSH客户端,使用WebSockets,不要任何插件;支持单一浏览器多同步终端/SSH会话;能在断开后恢复用户会话;支持客户端和服务器端会话记录/回放;可以嵌入到其它应用中。
项目 https://github.com/liftoff/GateOne
视频演示 http://vimeo.com/24857127
from: http://internet.solidot.org/article.pl?sid=11/10/14/0913242
恭贺新春~!
language:
Will start level 2 unit 3, excited to saw there will be speaking at the beginning ………..
shell:
something wrong with the format of echo ...... ………..