<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: lucasdicioccio</title><link>https://news.ycombinator.com/user?id=lucasdicioccio</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 30 Apr 2026 08:49:18 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=lucasdicioccio" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by lucasdicioccio in "Ask HN: Could you share your personal blog here?"]]></title><description><![CDATA[
<p><a href="https://dicioccio.fr/" rel="nofollow noreferrer">https://dicioccio.fr/</a><p>Mostly talking about some engineering and project management topics. Often revolves about decision-making (in a broad sense).</p>
]]></description><pubDate>Tue, 04 Jul 2023 17:56:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=36590266</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=36590266</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36590266</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Out of the Tar Pit (2006) [pdf]"]]></title><description><![CDATA[
<p>IMHO in the context of the Tar-Pit Paper (programming for services and applications rather than electronics) mutation merely is a mean to an end. The end being: some piece of memory holds the value I expect (e.g., to transmit, store, show information). Thus I disagree that mutable state is essential complexity. For the rest of the post I don't understand what you mean with "walking the line between avoiding/ignoring mutable state" and I wish you ad elaborated about what you mean by "play very well with Turing neighbors" because I cannot really connect with that.<p>Regarding, functional programming and mutation. In a typed "pure-FP" language like Haskell:
- you need to explicitly declare what constitutes a valid value
- which drives what valid values are observable between program steps
- which informs how corrupted a data-structure can be in your program<p>For instance, using a tree-shaped structure like `Tree1 = Leaf Int32 | Node Int32 Tree1 Tree1` and you have some `MutableRef (Tree1)`. You know exactly that from the ref you can read a whole Tree1, you can change the content of the MutableRef but you need to give a whole new Tree1. In particular, you are sure to never read "an half-initialized tree" or "a tree that was changed while I was reading it" because these things just do not exist in the realm of valid Tree1s. Such simple guarantees are really important to many programs but are not guaranteed in most programming languages.<p>Of course, if for some reason (e.g., for performance) you need something more flexible and are willing to pay the extra complexity, you can do it. As an illustration, you can augment your Tree1 with some MutableRef as well. `Tree2 = Leaf Int32 | Node Int32 Tree2 Tree2 | Cell (MutableRef Tree1)`. Here Tree2 contains mutable references to a valid Tree1 so Tree2 is not fractally complicated but you could do that too. With Tree2, you can interleave reads, writes, and other operations while working on a Tree2. These extra effects could be required (for performance reasons for instance) at the expense of inviting surprising behaviors (bugs). In pure-FP it is clear that with Tree2 we lost the possibility to "read/write a whole tree in a single program step". Thus, if the control flow of the code is not linear (e.g., multi-threaded, callback-heavy) you may have fun things occurring, like printing a half of the tree at a given time and the second half of the tree after a mutation, resulting in printing a tree that never existed. Enforcing global properties like the heap-invariant becomes inconvenient because it is actually hard if we let mutation in. I'd go as far as saying that the Tree2 doesn't exist as a tree: given a Tree2 we are merely capable of enumerating chunks with tree-shapes piecewise.<p>This reply is long already, so I won't go into how Haskell has various flavors of mutable refs in IO, ST, STM and recently even got linear-types to allow some fine-grained composition-of-atomic-mutations/interleaving/prevention of effects. But overall I find pure-FP takes mutability much more seriously than other more mainstream languages. Here, pure-FP just keeps us honest about where non-determinism bites. The collective failure to realize is one of the key reason why we are in The Tar-Pit: violated in-memory-invariants can compound even outside programs by forcing outside/future users to deal with things like misleading information being shown to users, urgently upgrading your fleet of servers, days of one-off data-cleanup and so on and so forth.</p>
]]></description><pubDate>Tue, 28 Feb 2023 23:09:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=34976239</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=34976239</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34976239</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Value-Oriented Programming"]]></title><description><![CDATA[
<p>I'm not sure we need a whole new programming paradigm and languages (with the hiccup that they'll require bindings to other FFI-libs that do not have as much guarantees). If you have a rich domain and want to benefit from performance boost using "fenced" mutations. Haskell has linear-types, software-transactional memory, and the ST monad. Which are three ways to constrain side-effects over references. If you need tight control of "the CPU as a state-machine", for instance, for IO-heavy services, then you have Rust, ADA and other C-targeting DSLs</p>
]]></description><pubDate>Wed, 08 Feb 2023 14:04:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=34708127</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=34708127</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34708127</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Start a fucking blog"]]></title><description><![CDATA[
<p>The way I've done it for my own notes (in a custom-made static-blog generator) is to have a template dedicated to "notes" and some over-engineered pipeline for similarly small datasets [1].<p>[1] <a href="https://lucasdicioccio.github.io/dhall-section-demo.html" rel="nofollow">https://lucasdicioccio.github.io/dhall-section-demo.html</a></p>
]]></description><pubDate>Tue, 03 Jan 2023 18:07:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=34235226</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=34235226</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34235226</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "The Dhall Configuration Language"]]></title><description><![CDATA[
<p>Dhall is advertised as a configuration language but you can do a tad more. I use it in my blog-engine to fit a use-case I found was poorly addressed by other approaches: small-cardinality datasets that benefit from type-checking and templating (e.g., list of notes, a photo gallery). I don't claim the idea is especially novel but I found the use case rare and interesting enough to write some explanations, design, and a demo here:
<a href="https://lucasdicioccio.github.io/dhall-section-demo.html" rel="nofollow">https://lucasdicioccio.github.io/dhall-section-demo.html</a></p>
]]></description><pubDate>Fri, 15 Jul 2022 09:02:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=32106210</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=32106210</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32106210</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Functional programming jargon in plain English"]]></title><description><![CDATA[
<p>There is a myth that "monads" are magical insights of some sort -- it's not.<p>Difficult to understand: likely yes because the myth is not groundless. What "monads" capture is how to combine things with a lot of ceremony: (0) the things that we want to combine are sharing some structure/properies (1) we can inspect the first thing before deciding what the second thing is (2) we can inspect both before deciding what is the resulting combination. What requires a lot of thought is appreciating why "inspect, decide, combine" are unified in a single concept.<p>Important: indeed, because in Haskell-like languages monads are pervasive and even have syntactic primitives. It's also extremely useful when manipulating concepts or approaching libraries that implement some monadic behaviour (e.g. promises in JS) because the "mental model" is rigorous. If you tell someone a library is a monadic-DSL to express business rules in a specific domain, you're giving them a headstart.<p>Some final lament: there's a fraction of people who found that disparaging (or over-hyping) the concept was a sure-fire way to yield social gain. Thus, when learning the concept of monads, one situational difficulty that we should not understate is that one has to overcome the peer-pressure from their circle of colleagues/friends. Forging one's understanding and opinions takes more detachment than the typical tech job provides.</p>
]]></description><pubDate>Mon, 04 Jul 2022 10:34:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=31975563</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=31975563</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31975563</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Lenses"]]></title><description><![CDATA[
<p>I wouldn't call that trivial but "common", and for these cases we could even use something like catMaybes:<p>> sum . catMaybes<p>Lenses (imho) shine when you have to write data-extractors for arbitrary-complex and ill-documented APIs with corner cases or things like HTML scrapping. The beauty of lenses is that you get one composable language across libraries. For instance,  if your HTTP-library has lenses and your XML-library has lenses, you can write things like safely composing a getElementsByTagName with some XML-parsing and data extractions:<p>> response ^.. responseBody . xml . folding universe . named (only "p") . text<p>and the bonus is that if you need to filter, you can do that with a similar mechanism (e.g., filtering based on some html meta-tag)<p>overall it feels like SQL-for-arbitrary-structures: dense but powerful</p>
]]></description><pubDate>Mon, 27 Jun 2022 08:51:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=31892059</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=31892059</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31892059</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Short URLs: Why and How"]]></title><description><![CDATA[
<p>I think it comes down to a mix of (a) how people (and robots) organize and find information (b) tool limitations and genericity.<p>Regarding (a),I personally like the view that the content lives in a "flat world" on top of which we collate different structures to organize/filter a same set of contents. In that worldview, web users entry-points can be more than directory-listings. A great inspiration is how Wikipedia offers a way to find which articles use a given picture: each picture acts like a "category", the same way that "recent-changes" is another filter on the same "flat world" of articles.<p>However, what is immensely difficult is to standardize these in a world where de-facto implementations burgeon, flourish, and eventually becoming out of touch (e.g., site-maps, RSS, OpenGraph). Hence we are stuck with very limited but very generic tools (b) for which rules like "directory-listing on the slash-separator" or "generate a JSON of the whole site connections to display as an interactive graph" (which I do on my personal blog) merely are local work around which require a bit of duck-tape to work.</p>
]]></description><pubDate>Mon, 09 May 2022 12:31:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=31313289</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=31313289</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31313289</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Ask HN: Have you created programs for only your personal use?"]]></title><description><![CDATA[
<p>I've recently written my own static-blog generator. On the one hand, I got irritated trying or figured out I would quickly hit limitations with the popular ones. On the other hand, the effort I would have spent searching for and evaluating the hundreds of existing other ones is on par with re-implementing my own.<p>I've written about the motivations and the architecture here: <a href="https://lucasdicioccio.github.io/how-this-blog-works.html" rel="nofollow">https://lucasdicioccio.github.io/how-this-blog-works.html</a> .</p>
]]></description><pubDate>Wed, 13 Apr 2022 21:49:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=31020727</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=31020727</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31020727</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "Learning Haskell is no harder than learning any other programming language"]]></title><description><![CDATA[
<p>This comment misses the point of the article, which argues against a urban legend that Haskell is too difficult "unless you are this tall" (a Phd, an E.T., a superhuman). I also had a shot at explaining why people are already tall enough in a past short "comic strip" [0]. I think the article makes a good job re-assuring the urban legends are a myth.<p>Now. there are many reasons why one would want to use Haskell. For instance, to have fun, to understand better some pattern, to write expanding-brain memes, or, because they are good at solving problems with it. It is fine if your reasons do not intersect with other people's reasons. You can try finding answers whether Haskell matches your reasons in some other essays [1,2,3]. Maybe it is true for many people that their needs and desires are entirely covered with their own toolset. As a curious/optimistic person I find it incredibly pedant to say I'll never ever need to learn/use something (there's different goodness in everything).<p>Personally, practicing Haskell led me to appreciate the importance and trade-offs that occur when isolating/interleaving side-effects. Similarly, it gave me some vocabulary to articulate my thoughts about properties of systems. Both are super important in the large when you architect softwares and systems. There are other ways to learn that (e.g., a collection of specialized languages), but at least for me, Haskell helped me build an intuition around these topics. That said, the prevalence of negative and derailing comments in discusions about Haskell can be demotivating (but our industry is like this  ️).<p>[0] <a href="https://patrickmn.com/software/the-haskell-pyramid/" rel="nofollow">https://patrickmn.com/software/the-haskell-pyramid/</a>
[1] <a href="https://www.snoyman.com/blog/2017/12/what-makes-haskell-unique" rel="nofollow">https://www.snoyman.com/blog/2017/12/what-makes-haskell-uniq...</a>
[2] <a href="https://www.tweag.io/posts/2019-09-06-why-haskell-is-important.html" rel="nofollow">https://www.tweag.io/posts/2019-09-06-why-haskell-is-importa...</a>
[3] <a href="http://blog.vmchale.com/article/functional-haskell" rel="nofollow">http://blog.vmchale.com/article/functional-haskell</a></p>
]]></description><pubDate>Sun, 06 Oct 2019 09:56:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=21170972</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=21170972</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21170972</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "What Is Good About Haskell?"]]></title><description><![CDATA[
<p>I see roughly the type of issue you face. For the case where there's some good value/effort ratio to invent internal representations, Haskell's being "strong" on parsing tasks make it a good fit. When this ratio is less clear: I found lenses, albeit a bit foreign to typical Haskell code, are a really good addition (for me it's akin to a new language, like `jq` for arbitrary in-memory structures) for extract/read tasks.<p>Anecdotal evidence: I recently had to turbo-build a tool to generate statistics over five-digit numbers of very complex business objects (including dates, strings, IDs, boolean as whatever string, ill-named columns) scattered in a number of systems (some web apis plus some CSV extracts from you don't really-know where). Using 'raw structures' like Aeson's JSON AST with lenses was more than good enough. Lenses have typically solved the "dynamic / cumbersone shape". Then I had to create a CSV extratc with like 50 boolean fields, reaching to intermediate techniques like type-level symbols allowed to really cheaply ensure I was not mixing two lines when adding a new column. I could even reach to Haxl from Facebook to write a layer of "querying" over my many heterogeneous source to automatically make concurrent and cached fetches for it.<p>The main difficulty in this setup is to keep the RAM usage under control because of two things. On the one hand, AST representations are costly. On the other hand, concurrency and caching means more work done in the same memory space.<p>Overall, got the data on time at relatively low effort (really low compared to previous attempt - to a point that some people with mileage at my company thought it would be impossible to build timely). Pretty good experience, would recommend to a friend.</p>
]]></description><pubDate>Thu, 03 Oct 2019 22:20:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=21152877</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=21152877</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21152877</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "GitHub launches Actions, its workflow automation tool"]]></title><description><![CDATA[
<p>That's exactly what I've explored in a Haskell project: DepTrack.
<a href="https://github.com/lucasdicioccio/deptrack-project" rel="nofollow">https://github.com/lucasdicioccio/deptrack-project</a> basically it decorates expressions like in your example to collect actions. It's strongly-typed. As a result, with a bit of Haskell type-system knowledge you can easily enforce invariants like "I won't run a command if you don't install it before" and "if you don't tunnel/proxy a given service then the config will not compile".<p>There are other niceties that the Haskell type system gives you by playing with the underlying effects (e.g., forbidding IOs enforces that a same config always gives the same result, using a List allows to cleanly handle heterogeneous-platforms concerns) but these are advanced topics.</p>
]]></description><pubDate>Tue, 16 Oct 2018 21:04:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=18233252</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=18233252</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=18233252</guid></item><item><title><![CDATA[New comment by lucasdicioccio in "PostgREST – A fully RESTful API from any existing PostgreSQL database"]]></title><description><![CDATA[
<p>I have a (non-contributor) experience with the PostgREST codebase. It's true PostgREST codebase is not great (lots of long functions, need some work to extract the main program into a library etc.) but the codebase definitely is easy to navigate and modify. For a transient project at work I've asked a dev to evaluate how much work it would be to port PostgREST to MSSQL. My dev had a working proof-of-concept in a few days.
The bottleneck was not navigating and patching PostgREST codebase but dealing with MSSQL. We decided to go another route only for the lack of a native MSSQL driver in Haskell: there's an ODBC driver (which my dev used for his PoC) but I don't really trust ODBC+FreeTDS. Hence, we'll write a good-old C# binary with a Microsoft-blessed driver to expose the few ad-hoc queries our own team needs rather than a generic solution for the whole company and we'll move on.
In short, I have some data invalidating your argument about the PostgREST code style being indefensible. Although I don't enjoy PostgREST codebase I love the product because it delivers what the website claims. Rather than diminishing the hard work of devs using a throwaway/slandering account, I just reckon that Haskell and "ship it culture" are reconcilable.</p>
]]></description><pubDate>Sun, 26 Mar 2017 13:47:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=13960757</link><dc:creator>lucasdicioccio</dc:creator><comments>https://news.ycombinator.com/item?id=13960757</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=13960757</guid></item></channel></rss>