<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>learn | OKHK 👀</title><description>✨ Thinking...❤️ PM：https://t.me/iokhk?direct</description><link>https://okhk.pages.dev</link><item><title>#learn #cpp Redis 作者展示 </title><link>https://okhk.pages.dev/posts/1573</link><guid isPermaLink="true">https://okhk.pages.dev/posts/1573</guid><pubDate>Mon, 05 Aug 2024 07:32:02 GMT</pubDate><content:encoded>&lt;a href=&quot;/search/result?q=%23learn&quot;&gt;#learn&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23cpp&quot;&gt;#cpp&lt;/a&gt; Redis 作者展示 &lt;a href=&quot;https://yabzhang.github.io/posts/project/reading_smallchat/&quot; target=&quot;_blank&quot;&gt;https://yabzhang.github.io/posts/project/reading_smallchat/&lt;/a&gt;&lt;br /&gt;作为一个展示样例，这端代码展示了如何处理内存管理、网络套接字的使用、多路复用、客户端连接的管理、消息和指令的处理等逻辑。除去注释只有短短两百多行，用来学习和理解服务端编程已经足够了 ———— 麻雀虽小五脏俱全。&lt;br /&gt;&lt;br /&gt;&amp;gt;晚上逛 Github 发现个好用的项目(替代sftp分发)，可以用于传输文本和二进制流，支持 curl 和浏览器端，可选 E2EE，支持自建中转服务器，用于在几台服务器之间临时传文件很方便&lt;br /&gt;&lt;a href=&quot;https://github.com/nwtgck/piping-server&quot; target=&quot;_blank&quot;&gt;https://github.com/nwtgck/piping-server&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;/search/result?q=%23cg&quot;&gt;#cg&lt;/a&gt; &lt;a href=&quot;https://swiftcafe.io/2016/10/29/pdf&quot; target=&quot;_blank&quot;&gt;https://swiftcafe.io/2016/10/29/pdf&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/Losses/pdf-postprocess&quot; target=&quot;_blank&quot;&gt;https://github.com/Losses/pdf-postprocess&lt;/a&gt; &lt;br /&gt;用 headless chromium 把 svg 转成 pdf，这样样式就全都对了。&lt;br /&gt;Typst 编译到 PDF 就是走的 svg，谁愿意写 postscript&lt;a href=&quot;https://yabzhang.github.io/posts/project/reading_smallchat/&quot; target=&quot;_blank&quot;&gt;
  
  &lt;div&gt;yabzhang.github.io&lt;/div&gt;
  
  &lt;div&gt;smallchat 源码阅读&lt;/div&gt;
  &lt;div&gt;smallchat1 是 redis 作者 antirez 所写的一个聊天室的小程序；代码短小精悍，很有意思。据说作者以此例向前端朋友展示系统编程的趣味 &lt;i&gt;&lt;b&gt;😄&lt;/b&gt;&lt;/i&gt; 2~&lt;br /&gt;这里记录下阅读源码所获。&lt;br /&gt;首先从 main 开始:&lt;br /&gt;/* The main() function implements the main chat logic: * 1. Accept new clients connections if any. * 2. Check if any client sent us some new message.…&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>