<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Ruby China 社区 Erlang/Elixir 节点</title>
    <link>https://ruby-china.org/</link>
    <description>Ruby China 社区 Erlang/Elixir 节点最新发帖。</description>
    <item>
      <title>Elixir Online Unconference 议题征集</title>
      <description>&lt;p&gt;发起一个 Elixir 和相关函数式编程语言的分享活动，在北京时间 2025 年 8 月 17 号晚上 8 点到 10 点半（暂定），现在征集相关主题。每个分享主题 15-30 分钟。欢迎大家分享关于 Elixir，Phoenix，Liveview，Livebook，Tidewave，RabbitMQ，AI Agent，AI Coding，云计算，分布式系统，类型系统等主题，也欢迎相关函数式编程语言或者 Ruby 的分享，以及讨论 AI 相关的话题。&lt;/p&gt;

&lt;p&gt;活动纯线上进行，每个主题 15-20 分钟，预计收集大概 5 个主题。&lt;/p&gt;

&lt;p&gt;本活动纯属社区活动，不涉及商业推广行为。&lt;/p&gt;

&lt;p&gt;现在征集议题，想要分享或参加请填写表单：
&lt;a href="https://tally.so/r/w40QOo" rel="nofollow" target="_blank"&gt;https://tally.so/r/w40QOo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;如有问题请联系邮箱：jiang at sola.day&lt;/p&gt;</description>
      <author>jiang_plus</author>
      <pubDate>Sat, 02 Aug 2025 20:30:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/44238</link>
      <guid>https://ruby-china.org/topics/44238</guid>
    </item>
    <item>
      <title>国内现在使用或者招聘 Elixir 的公司有哪些？</title>
      <description>&lt;p&gt;如题。除了众所周知的：比图，莉莉丝。还有那些公司使用或者招聘 Elixir 开发？&lt;/p&gt;</description>
      <author>MarkHoo</author>
      <pubDate>Sun, 21 Jul 2024 00:18:42 +0800</pubDate>
      <link>https://ruby-china.org/topics/43816</link>
      <guid>https://ruby-china.org/topics/43816</guid>
    </item>
    <item>
      <title>在实际项目中你们是怎么使用 Phoenix 的？</title>
      <description>&lt;p&gt;在实际项目中你们是怎么使用 Phoenix 的？&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;使用 Phoenix 用老传统方式开发&lt;/li&gt;
&lt;li&gt;使用 Phoenix 开发 API&lt;/li&gt;
&lt;li&gt;使用 PhoenixLiveView&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;目前正在学习中，有几个疑问，要是用老传统方式开发感觉挺麻烦的。使用它开发 API 感觉还行。&lt;/p&gt;

&lt;p&gt;对 LiveView 比较感兴趣，但是在使用 LiveView 的时候的最佳实践是什么样的，特别是返回 HTML 页面的东西，我觉得写在函数里面再去写样式挺麻烦的，修改也一样，可能是我不太习惯或熟悉这种方式，可不可以完全分离开使用？还有一种就是是否可以结合 Vue 或者 React 来开发并使用它们的其他组件。&lt;/p&gt;

&lt;p&gt;最后回到题目，你们更喜欢哪一种方式使用它，工作项目中最常用哪一种方式使用？或者不同方式更适合那些场景？&lt;/p&gt;</description>
      <author>MarkHoo</author>
      <pubDate>Tue, 21 May 2024 21:15:22 +0800</pubDate>
      <link>https://ruby-china.org/topics/43697</link>
      <guid>https://ruby-china.org/topics/43697</guid>
    </item>
    <item>
      <title>又一个跑在 Erlang VM 的语言 1.0 了</title>
      <description>&lt;p&gt;Gleam 版本 1.0 发布的新闻文章主要总结为以下几点：&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;2022 年 1 月 17 日，Gleam v1.0 发布。这是一款基于静态类型和模式匹配的编程语言，设计目标是使 Erlang 虚拟机 (以并发、容错和低延迟著称) 的用户能以富有表达力的方式编写高效、安全的系统。&lt;/li&gt;
&lt;li&gt;Gleam 的开发工作开始于 2017 年，其背后的设计目标是使 Erlang 语言更现代化和易用，同时也保留 Erlang 的强大特性。Gleam 语言的设计并没有试图与任何现有的语言竞争，而是致力于填补 Erlang 虚拟机系列语言的空白。&lt;/li&gt;
&lt;li&gt;Gleam v1.0 的发布标志着这款语言具备了稳定的语法和特性集，使得用户可以在实际项目中应用。Gleam v1.0 还带来了一些新功能，例如更优秀的类型推理系统、新的模块和库以及改进的错误消息等。&lt;/li&gt;
&lt;li&gt;Gleam 开发团队计划未来将继续改进编译器，并根据社区的反馈和需求来改进和增强语言的功能。&lt;/li&gt;
&lt;li&gt;Gleam 编程语言的 1.0 版本发布标志着这个令人兴奋的新项目的一个里程碑，给 Erlang 开发者以及那些对高效、安全的并发系统设计有兴趣的开发者，带来一个全新的选择。&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;直达链接&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gleam.run/news/gleam-version-1/" rel="nofollow" target="_blank"&gt;https://gleam.run/news/gleam-version-1/&lt;/a&gt;&lt;/p&gt;</description>
      <author>lidashuang</author>
      <pubDate>Mon, 04 Mar 2024 23:44:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/43611</link>
      <guid>https://ruby-china.org/topics/43611</guid>
    </item>
    <item>
      <title>去年创了个 SaaS，新一年再来一个 SaaS：Reddit 平台的 lead generation 营销工具</title>
      <description>&lt;p&gt;去年的 B2C SaaS，Persumi：&lt;a href="https://ruby-china.org/topics/43269" rel="nofollow" target="_blank"&gt;https://ruby-china.org/topics/43269&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;新一年，发布 B2B：&lt;a href="https://rizz.farm" rel="nofollow" target="_blank"&gt;https://rizz.farm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Elixir, Phoenix LiveView。开发用时仅六个星期。&lt;/p&gt;</description>
      <author>fredwu</author>
      <pubDate>Sat, 06 Jan 2024 16:50:40 +0800</pubDate>
      <link>https://ruby-china.org/topics/43536</link>
      <guid>https://ruby-china.org/topics/43536</guid>
    </item>
    <item>
      <title>2023 年了，现在学习或者使用 Elixir 的人还多吗？</title>
      <description>&lt;p&gt;如题，或者聊聊你和 Elixir 之间的故事。&lt;/p&gt;

&lt;p&gt;附上 Elixir 语言教程和 Phoenix 框架官网&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elixir 语言教程：&lt;a href="https://elixirschool.com/zh-hans" rel="nofollow" target="_blank"&gt;https://elixirschool.com/zh-hans&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Phoenix 框架： &lt;a href="https://www.phoenixframework.org" rel="nofollow" target="_blank"&gt;https://www.phoenixframework.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
      <author>MarkHoo</author>
      <pubDate>Fri, 18 Aug 2023 17:25:19 +0800</pubDate>
      <link>https://ruby-china.org/topics/43284</link>
      <guid>https://ruby-china.org/topics/43284</guid>
    </item>
    <item>
      <title>三个月的夜晚与周末打造 MVP：How I Built a Mostly Feature-Complete MVP in 3 Months Whilst Working Full-Time</title>
      <description>&lt;p&gt;Hi，大家好久不见～ 近几年来我大部分时间都是在用 Elixir。今年年初的时候开始有做自己的平台的想法，于是就慢慢开始搬砖。。。&lt;/p&gt;

&lt;p&gt;技术栈：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elixir + Phoenix + LiveView&lt;/li&gt;
&lt;li&gt;Postgres&lt;/li&gt;
&lt;li&gt;Algolia 搜索引擎&lt;/li&gt;
&lt;li&gt;Google AI API&lt;/li&gt;
&lt;li&gt;Fly.io 全球部署&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;博文：&lt;/p&gt;

&lt;p&gt;&lt;a href="https://persumi.com/u/fredwu/tech/e/blog/p/how-i-built-a-mostly-feature-complete-mvp-in-3-months-whilst-working-full-time" rel="nofollow" target="_blank"&gt;https://persumi.com/u/fredwu/tech/e/blog/p/how-i-built-a-mostly-feature-complete-mvp-in-3-months-whilst-working-full-time&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. 接下去工作方面我又要回到 ruby/rails 的怀抱了。除了去年短暂的接触了一个 ruby 的项目外，我基本上有好多年没怎么碰 ruby 了…… 😅&lt;/p&gt;</description>
      <author>fredwu</author>
      <pubDate>Sat, 12 Aug 2023 15:31:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/43269</link>
      <guid>https://ruby-china.org/topics/43269</guid>
    </item>
    <item>
      <title>[推荐]  Making reliable distributed systems in the presence of software errors</title>
      <description>&lt;p&gt;Joe Armstrong(Elrang 作者)’s PhD thesis, 2003 年发表的，还没开始看，不过毕竟是 Erlang 作者，无脑推荐。&lt;/p&gt;</description>
      <author>yfractal</author>
      <pubDate>Sat, 07 May 2022 23:09:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/42373</link>
      <guid>https://ruby-china.org/topics/42373</guid>
    </item>
    <item>
      <title>ExDoubleEntry - Elixir 的 double entry（复式记账）开源了</title>
      <description>&lt;p&gt;前阵子做 freelancing 时做的。最近开源了：&lt;a href="https://github.com/coinjar/ex_double_entry/" rel="nofollow" target="_blank"&gt;https://github.com/coinjar/ex_double_entry/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;比 Ruby 的版本要稳定。😉&lt;/p&gt;</description>
      <author>fredwu</author>
      <pubDate>Sat, 12 Feb 2022 18:25:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/42131</link>
      <guid>https://ruby-china.org/topics/42131</guid>
    </item>
    <item>
      <title>【演讲视频】Elixir 卖点在哪里，我为什么爱 Elixir... </title>
      <description>&lt;p&gt;今天给公司里的同事们做了个演讲。我们公司用的是 Clojure，所以用这次演讲的机会普及一下 Elixir 的知识。&lt;/p&gt;

&lt;p&gt;感兴趣的同学们可以来拍砖一下。演讲时间不长，50 多分钟而已，英文。&lt;/p&gt;

&lt;p&gt;请翻墙观赏：&lt;span class="embed-responsive embed-responsive-16by9"&gt;&lt;iframe class="embed-responsive-item" src="//www.youtube.com/embed/rFp69YFPPGI" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <author>fredwu</author>
      <pubDate>Tue, 10 Aug 2021 12:15:51 +0800</pubDate>
      <link>https://ruby-china.org/topics/41566</link>
      <guid>https://ruby-china.org/topics/41566</guid>
    </item>
    <item>
      <title>谈一点 Event Sourcing 和 CQRS</title>
      <description>&lt;p&gt;这两个概念是与 Domain 驱动设计相关的，最近稍微研究了一下。&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/chenge/12db605f-6225-47ff-9517-0f6283580037.png!large" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;这个图来自微软的免费书：Exploring CQRS and Event Sourcing，2013 年的，国外似乎已经研究多年了。&lt;/p&gt;

&lt;p&gt;Event Sourcing 主要的思想是记录事件，没有修改和删除。事件 replay 得到结果，有点函数型的数据不变的意思。&lt;/p&gt;

&lt;p&gt;另外，利用 kafka 传递消息可以异步方式解耦服务，特别适合于微服务架构。&lt;/p&gt;

&lt;p&gt;CQRS 是读写分离。&lt;/p&gt;

&lt;p&gt;当然这个还是比较复杂的东西，我尝试了 Elixir commanded 框架，不过没有成功。&lt;/p&gt;

&lt;p&gt;不知道 ruby 社区是否有这方面的框架和尝试？&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Wed, 02 Jun 2021 21:49:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/41331</link>
      <guid>https://ruby-china.org/topics/41331</guid>
    </item>
    <item>
      <title>转：Elixir v1.12 更新介绍</title>
      <description>&lt;p&gt;"前言&lt;/p&gt;

&lt;p&gt;由于带有 JIT 功能的 OTP 24 的发布，相信很多人对于第一个适配此版本的 Elixir 1.12 的期待也多了不少。实际上 1.12 版本在十几天前就发布了正式版，第一个 RC 版本更是一个多月前就发布了。无奈我这个月实在太忙了，想关注但是没有很多时间。&lt;/p&gt;

&lt;p&gt;此版本适配并继承了 OTP 24 的一些新功能，在脚本执行方面也有增强。总的来说，更方便了一些，性能也更好了。&lt;/p&gt;

&lt;p&gt;逐渐增强的脚本编程"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://zhuanlan.zhihu.com/p/376592250" rel="nofollow" target="_blank" title=""&gt;link&lt;/a&gt;&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Wed, 02 Jun 2021 04:42:40 +0800</pubDate>
      <link>https://ruby-china.org/topics/41324</link>
      <guid>https://ruby-china.org/topics/41324</guid>
    </item>
    <item>
      <title>Elixir 学习项目，Liveview 实现俄罗斯方块小游戏</title>
      <description>&lt;p&gt;学习 elixir pheonix liveview，实现俄罗斯方块小游戏（目前是部分实现，如果有空的话，我争取完成）。
可以学习 elixir、liveview、代码组织思路等&lt;/p&gt;

&lt;p&gt;我觉得游戏是学习编程的好方法，比较有趣。发布在这里，希望对你学习 elixir 有帮助。&lt;/p&gt;

&lt;p&gt;代码来自 groxio 的教学视频，感谢 groxio 的 Bruce Tate 老师（七语言书的作者），可以去油管看完整视频。&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gitee.com/chenge3k/tetris_liveview" rel="nofollow" target="_blank" title=""&gt;网址&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/chenge/1be280ea-5bd6-4ba0-91e0-1a865a35b142.png!large" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Mon, 17 May 2021 16:24:55 +0800</pubDate>
      <link>https://ruby-china.org/topics/41275</link>
      <guid>https://ruby-china.org/topics/41275</guid>
    </item>
    <item>
      <title>Elixir 用 sum type 建模</title>
      <description>&lt;p&gt;昨天群里听网友介绍了这个 sum type 的博客，跟大家分享一下。&lt;/p&gt;

&lt;p&gt;场景是设计一个双人比赛游戏，下面展示两种方案&lt;/p&gt;
&lt;h2 id="原来的方案"&gt;原来的方案&lt;/h2&gt;&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="k"&gt;defmodule&lt;/span&gt; &lt;span class="no"&gt;Game&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="k"&gt;defstruct&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:players&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:winning_player&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

  &lt;span class="nv"&gt;@type&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="p"&gt;::&lt;/span&gt; &lt;span class="ss"&gt;:not_started&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="ss"&gt;:in_progress&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="ss"&gt;:finished&lt;/span&gt;

  &lt;span class="nv"&gt;@type&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="p"&gt;::&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt;&lt;span class="bp"&gt;__MODULE__&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="ss"&gt;status:&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="ss"&gt;players:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="ss"&gt;winning_player:&lt;/span&gt; &lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个方案容易产生出现非法状态，导致 bug，接下来改进一下设计。&lt;/p&gt;
&lt;h2 id="sum type 模式"&gt;sum type 模式&lt;/h2&gt;&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="k"&gt;defmodule&lt;/span&gt; &lt;span class="no"&gt;Game&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="k"&gt;defstruct&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:status&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

  &lt;span class="nv"&gt;@type&lt;/span&gt; &lt;span class="n"&gt;players&lt;/span&gt; &lt;span class="p"&gt;::&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
  &lt;span class="nv"&gt;@type&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="p"&gt;::&lt;/span&gt; &lt;span class="ss"&gt;:not_started&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:in_progress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;players&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:finished&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Player&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;

  &lt;span class="nv"&gt;@type&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="p"&gt;::&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt;&lt;span class="bp"&gt;__MODULE__&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;status:&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;更详细的内容，参考原来英文博客
&lt;a href="https://thoughtbot.com/blog/better-domain-modeling-in-elixir-with-sum-types" rel="nofollow" target="_blank" title=""&gt;Better domain modeling in Elixir with sum types&lt;/a&gt;&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Sun, 09 May 2021 07:47:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/41238</link>
      <guid>https://ruby-china.org/topics/41238</guid>
    </item>
    <item>
      <title>好消息，Elixir 的 TIOBE 排名上榜了</title>
      <description>&lt;p&gt;2021 年 4 月，排行 48 名。虽然还不够高，毕竟上榜了。&lt;/p&gt;

&lt;p&gt;相信会逐步提升。&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Sat, 01 May 2021 19:28:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/41223</link>
      <guid>https://ruby-china.org/topics/41223</guid>
    </item>
    <item>
      <title>体验 Elixir 测试的简单例子</title>
      <description>&lt;p&gt;这是一个 Code Beam 会议上分享的小例子，&lt;a href="https://www.youtube.com/watch?v=M8rv-gvTG-M" rel="nofollow" target="_blank" title=""&gt;视频&lt;/a&gt;, 代码在：&lt;a href="https://github.com/rafaelrochasilva/greenbox" rel="nofollow" target="_blank"&gt;https://github.com/rafaelrochasilva/greenbox&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;例子是一个 gen_server，负责更新价格，用了一个模拟的 Client。&lt;/p&gt;

&lt;p&gt;比较简单&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mix deps.get
mix test

iex 

{:ok, pid} = Greenbox.PriceUpdater.start_link()
Greenbox.PriceUpdater.list_products(pid)

&lt;/code&gt;&lt;/pre&gt;</description>
      <author>chenge</author>
      <pubDate>Fri, 30 Apr 2021 12:52:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/41219</link>
      <guid>https://ruby-china.org/topics/41219</guid>
    </item>
    <item>
      <title>Lumen 项目会让 Elixir 出现在前端吗？</title>
      <description>&lt;p&gt;Lumen 用 webasm 实现了 Beam 虚拟机，理论上讲 Elixir 就可以做前端开发了。如果实现了，无疑是增大了 Elixir 的影响力。&lt;/p&gt;

&lt;p&gt;大家怎么看，有这方面的消息吗？&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Thu, 29 Apr 2021 12:33:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/41210</link>
      <guid>https://ruby-china.org/topics/41210</guid>
    </item>
    <item>
      <title>简单体验 Ecto（用自带 ETS 数据库，免安装）</title>
      <description>&lt;p&gt;今天看了一个视频，“Ecto without db”。介绍了几种 adapter，可见 Ecto 是十分灵活的。这里就用 ETS 来演示。&lt;/p&gt;
&lt;h2 id="1 创建项目"&gt;1 创建项目&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mix new ecto_demo
cd ecto_demo
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="2 修改一个主文件mix.exs"&gt;2 修改一个主文件 mix.exs&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def application do
  [
    extra_applications: [:logger, :ets_ecto]
  ]
end

defp deps do
  [
    {:ets_ecto, "~&amp;gt; 0.0.1", github: "wojtekmach/ets_ecto"}
  ]
end
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="3 编译"&gt;3 编译&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mix deps.get
mix compile
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="4 启动iex"&gt;4 启动 iex&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;iex -S mix
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="5 试验Ecto操作"&gt;5 试验 Ecto 操作&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 1. Define `Repo`
defmodule Repo do
  use Ecto.Repo,
    otp_app: :my_app,
    adapter: ETS.Ecto
end

# 2. Configure the application
Application.put_env(:my_app, Repo, [])

# 3. Start the Repo process. In a real project you'd put the Repo module in your project's supervision tree:
{:ok, _pid} = Repo.start_link()

# 4. Import Ecto.Query
import Ecto.Query

# 5. Define schema
defmodule Article do
  use Ecto.Schema

  schema "articles" do
    field :title, :string
  end
end

# 6. Interact with the Repo
Repo.insert!(%Article{title: "Article 1"})

q = from(a in Article, select: a.title)
Repo.all(q)
# =&amp;gt; ["Article 1"]

# 7 changeset
import Ecto.Changeset

 %Article{title: "Article 1", id: 52}  |&amp;gt; cast(%{title: "article 1"}, [:title]) |&amp;gt; validate_required(:title) |&amp;gt; Repo.insert

 %Article{title: "Article 1", id: 52} |&amp;gt; cast(%{title: "new 2"}, [:title]) |&amp;gt; validate_required(:title) |&amp;gt; Repo.update

&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="结束"&gt;结束&lt;/h2&gt;
&lt;p&gt;就这样，好理解吗？不难吧。&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Wed, 28 Apr 2021 19:18:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/41207</link>
      <guid>https://ruby-china.org/topics/41207</guid>
    </item>
    <item>
      <title>一张图了解 Elixir Ecto</title>
      <description>&lt;ul&gt;
&lt;li&gt;仓库模式&lt;/li&gt;
&lt;li&gt;显式&lt;/li&gt;
&lt;li&gt;操作数据结构&lt;/li&gt;
&lt;li&gt;灵活的 schema&lt;/li&gt;
&lt;li&gt;工具库，不是框架&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/chenge/5597d7c1-c85e-4299-a649-83e3986a5e95.png!large" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;理解了设计后，使用起来非常愉快，易于测试。&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Sat, 24 Apr 2021 14:01:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/41186</link>
      <guid>https://ruby-china.org/topics/41186</guid>
    </item>
    <item>
      <title>Confident Elixir</title>
      <description>&lt;p&gt;今天看到这个视频（Tetiana Dushenkivska - Keynote - Confident Elixir），感觉讲得很好，分享一下。&lt;/p&gt;

&lt;p&gt;她主要说了设计和代码，代码设计说了四条，其中强调 Pure 有助于维护和测试，系统中纯和不纯要分开，清晰的边界，减少不纯的代码。Type 主要说了 Struct，编译安全。Organization 是说的多项目组织成子项目在一起。Architecture 说的是基于消息传递，形成的 Event 架构，方便解耦。&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/chenge/1c537a75-d744-4d79-b5b3-00aebca10084.png!large" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;下面是一些测试和分析工具：&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/chenge/ae68645d-feb5-4fbb-b2fb-eda7834fa47c.png!large" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;有兴趣可以找来看看。&lt;/p&gt;</description>
      <author>chenge</author>
      <pubDate>Thu, 22 Apr 2021 16:20:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/41183</link>
      <guid>https://ruby-china.org/topics/41183</guid>
    </item>
  </channel>
</rss>
