最新文章
今日新增 445 篇 · 共 7,324 篇 · 来自 241 个博客
APPLE: My Key to Success
Rapid Development Email Templates with Node.js
AI 摘要The article recounts the author's experience building an automated email notification system at Indaba Music using Node.js, initially relying on node-email-templates and Nodemailer. Dissatisfied with node-email-templates' flaws—such as requiring unnecessary text files, lacking template inheritance, preventing CSS sharing between templates, and not supporting dummy context generation—the author wrote alternative modules: boost, swig-dummy-context, and swig-email-templates. Together these tools enable template inheritance, shared CSS inlining, and instant template previews, powering a live email template preview tool used internally.
Elixir v0.8.0 released
On the last 9th January, we celebrated two years since Elixir's first commit and to celebrate this occasion we have prepared a big release. Elixir v0.8 is out, with documentation, optimizations, bug fixes and shiny new features. Let's take
The New Normal
Elixir v0.7.2 released
Elixir v0.7.2 is released, new, improved type specifications syntax and many other improvements.
Elixir v0.7.1 released
Elixir v0.7.1 was released to celebrate the end of a two months journey traveling around Europe, United States and Brazil talking about Elixir.
Elixir v0.7.0 released
Elixir v0.7.0 is released with many improvements! Read on for more information.
A Tour of Acme
AI 摘要This article introduces acme, a text editor written by Rob Pike for Plan 9 in the early 1990s that is built entirely around the idea of text as the user interface, and presents a screencast demonstrating its basics during a short programming session. The author notes that the video only shows a subset of acme's capabilities and directs readers to Rob Pike's papers to learn more. It also explains how to obtain acme on various operating systems (Plan 9, Unix clones via Plan 9 from User Space, and Windows via acme stand alone complex) and includes a mini-FAQ covering scalable fonts and build requirements.
Elixir v0.6.0 released
We have finally released Elixir v0.6.0! This release includes a build tool called Mix, support for Erlang typespecs, many improvements to IEx and improved IO, File and Macro support.
Elixir v0.5.0 released
We have finally released Elixir v0.5.0! This marks the first release since the language was rewritten. In this blog post, we will discuss what we achieved during this time and what are the next steps.
A peek inside Elixir's Parallel Compiler
AI 摘要A parallel compiler has just landed in Elixir main, with the goal of compiling files in parallel while automatically detecting dependencies between them. This blog post takes a look inside the parallel compiler's internals, offering readers a chance to learn more about both Erlang and Elixir in the process.
How to be Successful at PyWeek
AI 摘要This article provides a comprehensive guide to succeeding at PyWeek, a week-long challenge to develop a video game in Python. It covers practical strategies including time management, practicing with game libraries beforehand, brainstorming game ideas before the theme is announced, and applying game theory to create fun gameplay. The author also emphasizes the importance of community engagement through journals, IRC channels, and forums, as well as getting adequate sleep and testing games on friends for feedback.
John Muir Trail from the Perspective of Andrew Kelley
AI 摘要This article is a day-by-day journal by Andrew Kelley documenting his 198-mile hike along the John Muir Trail from July 24 to August 4, 2011, with his dad, Mike, Paul, Bruce, and Chris. The entries detail the group's daily progress over mountain passes such as Donahue, Silver Lake, and toward Muir, Mather, Pinchot, Glen, Forrester, and Mt. Whitney, along with challenges like sore feet, mosquitoes, snow-covered trails, and a resupply stop at Red's Meadow Resort. Throughout the trek, Kelley reflects on camaraderie with fellow hikers, philosophical debates with his companions, breathtaking scenery, and the physical demands of long uphill stretches.
Minimal Boolean Formulas
AI 摘要The article describes how the author and Alex Healy computed that 28 AND/OR operators are the minimum needed to express any Boolean function of five variables, a previously unknown result. Starting from a brute-force algorithm adapted from the Floyd-Warshall shortest paths method, which could only handle up to four variables, they drastically reduced the search space by exploiting symmetries such as function negation, input permutation, and input inversion. Finally, they replaced the iterate-to-fixed-point loop with a methodical exploration that builds functions in order of complexity, considering each function pair at most once.
Lemming - PyWeek #12 Game Development Journal
AI 摘要This article is a day-by-day development journal documenting the author's creation of 'Lemming,' a side-scrolling platformer for the PyWeek #12 competition, in which players lead a stampede of lemming-like clones and strategically sacrifice themselves so the next clone can survive. The journal chronicles technical hurdles such as pyglet bugs, frame rate struggles, and a display engine rewrite, as well as implemented features like power-ups, animation, sound effects, a title screen, and level progression. By the end of the week, the author submitted a working game with 9 levels and roughly 2,021 lines of Python, and in the postmortem admitted the difficulty curve was too steep, offering a save-file editing tip and a speedrun video so players could see all the levels.
Zip Files All The Way Down
AI 摘要This article explains how to create a self-reproducing zip file—one that contains itself, echoing the 'turtles all the way down' idea—building on the classic computer science exercise of writing quines (self-reproducing programs). The author first derives a Python quine, then constructs a Lempel-Ziv compressed data stream that decompresses to itself using only literal and repeat opcodes, including a variant that reproduces itself with arbitrary prefixes and suffixes. Finally, the article addresses the practical challenge of translating this simplified program into the DEFLATE format used by gzip and zip, whose Huffman-coded variable-length opcodes break the fixed-size encoding assumption.
UTF-8: Bits, Bytes, and Benefits
AI 摘要The article explains that UTF-8 encodes Unicode code points (0 through 10FFFF) into byte streams and, by examining the encoding table directly, shows it is far simpler than many people assume. Its design yields convenient properties: full ASCII compatibility and self-representation of ASCII bytes, self-synchronization, byte-based substring search, code point ordering, and no byte-order issues—meaning most 8-bit-safe programs and Unix tools can handle UTF-8 without modification. The main trade-off is the loss of random access by code point index, but since UTF-8 is steadily becoming the standard encoding, the author encourages embracing its well-designed properties.
Computing History at Bell Labs
AI 摘要This article presents a transcription of Doug McIlroy's 1997 retirement talk on the history of computing at Bell Labs, tracing its evolution from the mathematics department and George Stibitz's relay calculators through early transistorized machines like TRADIC and successive IBM computers such as the CPC, 650, and 704. It highlights memorable anecdotes including the bi-quinary relay calculator that ran unattended for years without undetected errors, the struggles of card-based programming, and Bell Labs' development of the BESYS operating system. The author also notes that the original audio was recovered as MP3 files and includes corrections supplied by McIlroy in 2015.
Using Uninitialized Memory for Fun and Profit
AI 摘要The article describes a decades-old programming trick, detailed in Briggs and Torczon's 1993 paper, for representing sparse sets using a 'dense' array paired with a 'sparse' array that maps elements to their indices, allowing arbitrary uninitialized values to remain in the arrays without breaking correctness. This representation performs membership checks, additions, and clearing in constant time and iterates in time proportional to the set size rather than the universe size, making it faster than bit vectors for sparse data at the cost of extra memory. It is especially useful in contexts like compiler register allocation and work-queue-based graph traversal, where sets are small and cleared frequently.