<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: lokeg</title><link>https://news.ycombinator.com/user?id=lokeg</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 07 Jul 2026 05:37:31 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=lokeg" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by lokeg in "Single header Parser Combinators for C"]]></title><description><![CDATA[
<p>Isn't working with the utf8 stream sufficient? Especially if you only have ASCII keywords/operators/brackets, I feel a ASCII parser should work with utf8 out of the box</p>
]]></description><pubDate>Wed, 01 Jul 2026 10:12:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=48744556</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=48744556</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48744556</guid></item><item><title><![CDATA[New comment by lokeg in "Linux gamers on Steam cross over the 3% mark"]]></title><description><![CDATA[
<p>There is a somewhat famous post about this:<p><a href="https://www.reddit.com/r/gamedev/comments/qeqn3b/despite_having_just_58_sales_over_38_of_bug/" rel="nofollow">https://www.reddit.com/r/gamedev/comments/qeqn3b/despite_hav...</a><p>Essentially stating that Linux users disproportionately care to actually report bugs they encounter rather than ignoring them. I find that very plausible.</p>
]]></description><pubDate>Sun, 02 Nov 2025 22:07:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=45793845</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=45793845</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45793845</guid></item><item><title><![CDATA[New comment by lokeg in "UK's largest battery storage facility at Tilbury substation"]]></title><description><![CDATA[
<p>This can be alleviated by the gas plant operator selling call options, effectively paying them for being reliable. The relevant keyword is "capacity markets".</p>
]]></description><pubDate>Tue, 02 Sep 2025 16:44:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=45105589</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=45105589</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45105589</guid></item><item><title><![CDATA[New comment by lokeg in "Faster substring search with SIMD in Zig"]]></title><description><![CDATA[
<p>What about the worst case? I.e. something like searching for 1000 'a's in a long string of 'a's interspersed with 'b's every 500-1000 steps? Seems accidentally quadradic unfortunately in the absence of some KMP-like fallback</p>
]]></description><pubDate>Mon, 11 Aug 2025 10:33:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=44862721</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=44862721</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44862721</guid></item><item><title><![CDATA[New comment by lokeg in "The borrowchecker is what I like the least about Rust"]]></title><description><![CDATA[
<p>Something like the following? I am trying and failing to reproduce the issue, even with mutable AST nodes.<p><pre><code>  use bumpalo::Bump;
  use std::io::Read;
  fn main() {
      let mut arena = Bump::new();
      loop {
          read_and_process_lines(&mut arena);
          arena.reset();
      }
  }
  #[derive(Debug)]
  enum AstNode<'a> {
      Leaf(&'a str),
      Branch {
          line: &'a str,
          meta: usize,
          cons: &'a mut AstNode<'a>
      },
  }
  fn read_and_process_lines(arena: &Bump) {
      let cap = 40;
      let buf: &mut [u8] = arena.alloc_slice_fill_default(cap);
      let l = std::io::stdin().lock().read(buf).expect("reading stdin");
      let content: &str = str::from_utf8(&buf[..l]).unwrap();
      dbg!(content);

      let mut lines = content.lines();
      let mut latest: &mut AstNode<'_> = arena.alloc(AstNode::Leaf(lines.next().unwrap()));
      for line in lines {
          latest = arena.alloc(AstNode::Branch{line, meta:0, cons: latest});
      }
      println!("{latest:?}");
  }</code></pre></p>
]]></description><pubDate>Sun, 20 Jul 2025 00:41:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=44620863</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=44620863</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44620863</guid></item><item><title><![CDATA[New comment by lokeg in "At Least 13 People Died by Suicide Amid U.K. Post Office Scandal, Report Says"]]></title><description><![CDATA[
<p>What?</p>
]]></description><pubDate>Fri, 11 Jul 2025 14:29:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=44532548</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=44532548</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44532548</guid></item><item><title><![CDATA[New comment by lokeg in "The price is wrong: Researchers explore farmers' interests in carbon markets"]]></title><description><![CDATA[
<p>It indeed does not make sense to have a market for carbon sequestration that does not also include fossil fuel emissions.<p>But implementing a comprehensive cap-and-trade system is superior to a fixed carbon price in that the it directly limits emissions without fiddling with the exact price (which instead is discovered by the market), and therefore can be planned long term.<p>(What should the carbon price be 2050? That depends on inflation and many other factors, but the allowed net emissions should clearly be zero or negative)<p>I recommend everyone to take a look at the EU ETS which unfortunately is surprisingly unknown</p>
]]></description><pubDate>Thu, 04 Jul 2024 09:41:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=40873626</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=40873626</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40873626</guid></item><item><title><![CDATA[New comment by lokeg in "Mfio – Completion I/O for Rust"]]></title><description><![CDATA[
<p>Skimming this I did not really understand the programming model difference from glommio or tokio-uring. Aside from striving to be cross-platform, how is this significantly different?</p>
]]></description><pubDate>Fri, 15 Dec 2023 19:42:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=38657918</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=38657918</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38657918</guid></item><item><title><![CDATA[New comment by lokeg in "Americans Are Still Spending Like There’s No Tomorrow"]]></title><description><![CDATA[
<p>I think this is what they call a doomsday cult..<p>My point is, this would leave you in a really bad position if it turns out after 10 years nothing really happened</p>
]]></description><pubDate>Mon, 02 Oct 2023 19:48:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=37743506</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=37743506</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37743506</guid></item><item><title><![CDATA[New comment by lokeg in "Mathematician proves that Möbius band must have an aspect ratio greater than √3"]]></title><description><![CDATA[
<p>The aspect ratio in that fold is 4, the very first step is folding the square down into a ribbon</p>
]]></description><pubDate>Mon, 18 Sep 2023 22:33:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=37563048</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=37563048</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37563048</guid></item><item><title><![CDATA[Glibc grows non-main-thread heaps by 4K at a time]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/lokegustafsson/glibc-malloc-is-bad">https://github.com/lokegustafsson/glibc-malloc-is-bad</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=36484509">https://news.ycombinator.com/item?id=36484509</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Mon, 26 Jun 2023 19:23:34 +0000</pubDate><link>https://github.com/lokegustafsson/glibc-malloc-is-bad</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=36484509</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36484509</guid></item><item><title><![CDATA[New comment by lokeg in "Two decades of Alzheimer’s research was based on deliberate fraud"]]></title><description><![CDATA[
<p>I am out of the loop, but surely this would be politicized math <i>education</i>? Which is absolutely different from mathematics research and not related to reproducibility.</p>
]]></description><pubDate>Sun, 24 Jul 2022 14:18:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=32213730</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=32213730</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32213730</guid></item><item><title><![CDATA[New comment by lokeg in "Lessons learned from the recent job hunt"]]></title><description><![CDATA[
<p>> It's trivial in quadratic time too, of course, although I would expect a candidate for a senior role to be able at least to find the linear solution, if not to start there outright.<p>I would not call this trivial. The code in your post is incorrect. For example, it cannot find "ababc" within "abababc", since after the first mismatch we skip too much of the haystack.<p>The real solution to this is Knuth-Morris-Pratt, where we must precompute for every index in the needle the longest needle prefix that fits before it. I would not expect your average interviewee to derive or implement this.<p>An easier linear time solution (in my opinion) is rolling polynomial hashing. But if you actually expect solutions in an interview you should settle for the naive quadratic algorithm.</p>
]]></description><pubDate>Mon, 09 May 2022 00:24:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=31309280</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=31309280</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31309280</guid></item><item><title><![CDATA[Rust Quiz]]></title><description><![CDATA[
<p>Article URL: <a href="https://dtolnay.github.io/rust-quiz/">https://dtolnay.github.io/rust-quiz/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=31246211">https://news.ycombinator.com/item?id=31246211</a></p>
<p>Points: 3</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 03 May 2022 09:05:28 +0000</pubDate><link>https://dtolnay.github.io/rust-quiz/</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=31246211</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31246211</guid></item><item><title><![CDATA[Apache Log4j RCE Zero Day]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.cyberkendra.com/2021/12/worst-log4j-rce-zeroday-dropped-on.html">https://www.cyberkendra.com/2021/12/worst-log4j-rce-zeroday-dropped-on.html</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29504200">https://news.ycombinator.com/item?id=29504200</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Thu, 09 Dec 2021 22:54:50 +0000</pubDate><link>https://www.cyberkendra.com/2021/12/worst-log4j-rce-zeroday-dropped-on.html</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=29504200</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29504200</guid></item><item><title><![CDATA[New comment by lokeg in "The Little Book of Rust Macros"]]></title><description><![CDATA[
<p>Using libraries is so much easier in rust compared to many other libraries due to rustdoc. I can trust the type signatures to show me the actual usage, I can trust the code snippets to not be outdated, and above all this is consistent for all code in the entire ecosystem.<p>Almost always when I use python libraries I have to get used to a new documentation format, learn how to navigate it and so on. And then it has to be detailed enough to make up for the lack of type signatures. I cannot tell you how often I have to skim a significant portion of my dependencies' source just to use them. (Though there are counterexamples, stdlib and numpy in particular actually have okay docs)</p>
]]></description><pubDate>Sun, 21 Nov 2021 21:40:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=29300027</link><dc:creator>lokeg</dc:creator><comments>https://news.ycombinator.com/item?id=29300027</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29300027</guid></item></channel></rss>