<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: humzashahid98</title><link>https://news.ycombinator.com/user?id=humzashahid98</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 29 Apr 2026 20:16:07 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=humzashahid98" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by humzashahid98 in "Show HN: Pong Wars in Standard ML"]]></title><description><![CDATA[
<p>Raylib is definitely a pretty fun and simple library. I used it with OCaml (which has bindings to it already) before.<p>One thing I like about the Functional Core, Imperative Shell architecture is that, if you gather input into an immutable record before sending it to your update function, then your handling of input becomes independent of the windowing/control library you use.<p>That would make it easier to switch to SDL or GLFW if you later want to since you only need to rewrite a minimal amount of code which converts the windowing library's inputs to your own record type. (Although it's not easy to abstract over drawing operations that way.)<p>If you'd like any help, I'm happy for you to shoot me an email (my email is in the repository's LICENSE file). Although there's still a lot I could learn more about too.</p>
]]></description><pubDate>Thu, 20 Jun 2024 15:57:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=40740171</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40740171</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40740171</guid></item><item><title><![CDATA[Show HN: Pong Wars in Standard ML]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/hummy123/sml-pong-wars">https://github.com/hummy123/sml-pong-wars</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=40734827">https://news.ycombinator.com/item?id=40734827</a></p>
<p>Points: 3</p>
<p># Comments: 3</p>
]]></description><pubDate>Thu, 20 Jun 2024 04:13:11 +0000</pubDate><link>https://github.com/hummy123/sml-pong-wars</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40734827</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40734827</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Apple blocks PC emulator in iOS App Store and third-party app stores"]]></title><description><![CDATA[
<p>Thank you for the insightful answer! That's nice to know. I hadn't considered that they had a system like that in place.</p>
]]></description><pubDate>Mon, 10 Jun 2024 21:58:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=40639657</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40639657</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40639657</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Apple blocks PC emulator in iOS App Store and third-party app stores"]]></title><description><![CDATA[
<p>Is the "no JIT' policy somehow baked into the hardware/software of iOS devices, instead of something Apple finds by doing an app review?<p>I thought it was the latter (that running a JIT on iOS would be possible but not accepted on the app store), but then I'm left wondering why they seem to have submitted a JIT-less version on a third party app store.<p>Maybe the intent was ease development by having only one version to support for the first-party and also third-party app stores.</p>
]]></description><pubDate>Mon, 10 Jun 2024 20:48:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=40638863</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40638863</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40638863</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Hurl, the Exceptional Language"]]></title><description><![CDATA[
<p>I prefer to build result-passing, no-exception-throwing systems out of an exception-throwing core where the language itself may throw exceptions but the thing I build from the language always returns result.<p>Elm is an extreme case where indexing into an array returns a result type instead of an exception when the index is out of bounds, unlike most languages including Haskell.<p>Maybe my program logic is intended to always  access only valid indices in an array, but here I'm given a result type where I have nothing to do in the error case since my code is never intended to reach that case. I would rather let the language throw an out-of-bounds exception here to tell me that my implementation is incorrect while I'm testing.<p>Same with libraries in a language. It really depends on the use cases of the library you're writing whether results or exceptions are better. The most convenient thing for the user of a library would be to provide both exception-throwing and result-passing alternatives. This is what the OCaml standard library does as well.</p>
]]></description><pubDate>Sun, 26 May 2024 19:10:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=40484580</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40484580</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40484580</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Study finds that 52% of ChatGPT answers to programming questions are wrong"]]></title><description><![CDATA[
<p>Stack Overflow is a community with an answer-rating system and there is often some level of review from other people commenting on the answer's advantages and shortcomings. You often have multiple answers to choose from too. Those features build trust in an answer or prompt you to look elsewhere.<p>The UI for an LLM answer would have difficulty replicating the same thing since every answer is (probably) a new one and you have no input from other people about this answer too.<p>Edit: After writing my reply, I saw that roughly four other people (so far) made the exact same point and posted it a couple of minutes before. I think your question is a good one (made me think a little) and apologies it feels like you're being piled on.</p>
]]></description><pubDate>Fri, 24 May 2024 13:18:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=40465961</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40465961</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40465961</guid></item><item><title><![CDATA[New comment by humzashahid98 in "LunarML – Standard ML compiler that produces Lua/JavaScript"]]></title><description><![CDATA[
<p>Standard ML is pretty simple and easy to pick up, but a weak point is the lack of { record with updatedValue } syntax to create a new record which is the same as an existing one but with some value changed. You have to specify every field in the record which can be a pain depending on how large your record is.<p>Standard ML has some nice features though and I think what I mentioned is the only serious shortcoming (except for ecosystem if that's important to you).<p>Standard ML is also structurally (but strongly) typed, unlike F# and the vast majority of nominally typed languages, which is rare but nice.<p>type person = { age : int, name : string }<p>is the same as the type<p>type animal = { age : int, name = string }<p>but this hasn't been an issue foe me, and structural typing means you can avoid defining the type at all which is convenient for small records.<p>For example, a function to increment age has no need for you to define the type.<p>fun grow { name, age } = { name = name, age = age + 1 }<p>I think Standard ML helps you understand the origin of some common FP idioms. Like tuples are really just records and SML treats them as such. The empty record {} is the same as the empty tuple (): both are the unit type. And a record like { 1 : "a", 2 : "b" } is exactly the same as the tuple ("a", "b").</p>
]]></description><pubDate>Fri, 24 May 2024 11:08:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=40464921</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40464921</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40464921</guid></item><item><title><![CDATA[New comment by humzashahid98 in "LunarML – Standard ML compiler that produces Lua/JavaScript"]]></title><description><![CDATA[
<p>This is a very cool project.<p>There is also MLKit's SMLtoJs which compiles to Javascript, but not to Lua.<p><a href="https://github.com/melsman/mlkit/blob/master/README_SMLTOJS.md">https://github.com/melsman/mlkit/blob/master/README_SMLTOJS....</a></p>
]]></description><pubDate>Thu, 23 May 2024 13:38:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=40454580</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40454580</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40454580</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Counted B-Trees (2017)"]]></title><description><![CDATA[
<p>B+ Trees (which store data at leaves) rather than B-Trees are what you want for good iteration performance usually.<p>An ordered B-Tree iteration would jump between different arrays in the tree often, but a B+ Tree would only have you jump to another array once you’re done iterating over all the elements in the current array.<p>The following article says the same. <a href="https://www.scylladb.com/2021/11/23/the-taming-of-the-b-trees/#:~:text=There%20are%20two%20different%20ways,keys%20from%20its%20left%20subtree" rel="nofollow">https://www.scylladb.com/2021/11/23/the-taming-of-the-b-tree...</a>.</p>
]]></description><pubDate>Wed, 22 May 2024 21:03:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=40446511</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40446511</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40446511</guid></item><item><title><![CDATA[New comment by humzashahid98 in "NoTunes is a macOS application that will prevent Apple Music from launching"]]></title><description><![CDATA[
<p>Thanks; I didn't see that debate on security and I can see it being a valid point, especially with the burden of a technically-inclined person having to fix others' (family/friends) devices.<p>I was trying to point to the opinion of the majority that I've seen and what I have seen from most of the community when security is mentioned is that Apple needs stronger security from a technical standpoint rather than controlling what and what is allowed on users' devices. I think both opinions hold validity, and you may be right that there is more nuance.</p>
]]></description><pubDate>Tue, 21 May 2024 15:24:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=40429645</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40429645</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40429645</guid></item><item><title><![CDATA[New comment by humzashahid98 in "NoTunes is a macOS application that will prevent Apple Music from launching"]]></title><description><![CDATA[
<p>I don't really have the same impression that you have had when it comes to discussions about Apple's approach to HN.<p>This linked comment (which I randomly found on HN's search) summarises what I've seen here:<p>"The way these discussions usually go is that a bunch of Apple users complain about the restrictions, a bunch of Apple users say they like them, and a few Android users like myself remind the complainers that there are, in fact, other options that don't involve forcing Apple to take away the rules that most iOS users appreciate having."<p><a href="https://news.ycombinator.com/item?id=39574040">https://news.ycombinator.com/item?id=39574040</a><p>I do recall a few users opposing allowing alternative app stores (which is the debate that is freshest in my mind) because they prefer to stick to Apple's, and the common rejoinder from the community that nothing is being taken away from those who prefer to stick to Apple's store but that other users who want something different have more choice.<p>I'm still curious about what additional nuance you have in mind, since I honestly can't remember seeing it.</p>
]]></description><pubDate>Tue, 21 May 2024 14:20:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=40428836</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40428836</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40428836</guid></item><item><title><![CDATA[New comment by humzashahid98 in "NoTunes is a macOS application that will prevent Apple Music from launching"]]></title><description><![CDATA[
<p>Could you tell us what nuance you have in mind?</p>
]]></description><pubDate>Tue, 21 May 2024 13:56:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=40428567</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40428567</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40428567</guid></item><item><title><![CDATA[New comment by humzashahid98 in "NoTunes is a macOS application that will prevent Apple Music from launching"]]></title><description><![CDATA[
<p>This is plainly true considering how hard Apple fought to suppress alternatives to the "App Store". I don't know why your comment was downvoted.</p>
]]></description><pubDate>Tue, 21 May 2024 13:22:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=40428178</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40428178</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40428178</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Piece Chains (2006)"]]></title><description><![CDATA[
<p>I appreciate the history section in particular.<p>VS Code is known to use a Piece Tree (Piece Table represented as a balanced binary tree) and I thought AbiWord (which this article also mentions) was the first to use the data structure. This article points out that the Tweak editor and the MText interface in the Modula-3 programming language uses the same approach, meaning this variant of the data structure goes back even further than I knew.</p>
]]></description><pubDate>Thu, 16 May 2024 15:25:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=40379550</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40379550</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40379550</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Translation of Rust's core and alloc crates to Coq for formal verification"]]></title><description><![CDATA[
<p>I thought to myself a rename to FACT Prover (Formerly known As Coq Theorem Prover) would be nice when seeing they wanted to rename the project and it's a bit of a disappointment that didn't quite pan out.<p>Rocq is similar to the Roc programming language which is confusing naming (and they sound identical as far as I know).</p>
]]></description><pubDate>Wed, 15 May 2024 06:56:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=40363882</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40363882</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40363882</guid></item><item><title><![CDATA[New comment by humzashahid98 in "The Cult of the Haskell Programmer"]]></title><description><![CDATA[
<p>You might benefit from this video [1] on the "Functional Core, Imperative Shell" pattern in Ruby (a very object-oriented language), which sounds like one of the things you are having trouble with.<p>The talk is about segmenting IO and mutation from the rest of your program. The core of your program should be just pure functions and the IO part of your program should be "at the edge".<p>For example, consider a game loop. Game loops tend to have a while loop like this:<p>function loop() {
  while (should_not_close_window) {
    update(); // Run update function which updates mutable state
    draw(); // Draw from the mutable state
  }
}<p>If we wanted to segment IO, we would return an immutable type/value from the update function instead like:<p>function loop(old_state) {
  const new_state = update(old_state); // Call a function which returns a new state given an old_state.
  draw(new_state); // Draw function still uses IO because drawing is inherently imperative<p><pre><code>  if (new_state.should_not_close_window) {
    loop(new_state); // Call the loop function with the new state; this tail recursion replaces the previous while-loop). The program automatically exits the loop if new_state.should_not_close_window is false.
  }</code></pre>
}<p>The key thing is to turn as much of your program into a function that takes a value and returns a new value as possible, and let the IO code be only there for operations which cannot be done without IO (like drawing).<p>There are some cases where you might find yourself wanting to perform IO inside the update call but that can be handled by setting some state (inside your root state object) which the boundary of your program interprets as "do IO at the boundary".<p>For example, let's add an async handler to the loop (async often being IO like disk writes).<p>// Function to handle async messages
function handleAsync(old_state) {
  for (const msg of old_state.msgs) {
    execMsg(msg); // Call function to pattern match and execute this specific message
  }
  const new_state = remove_msgs(old_state); // Call function that returns same state, except msgs is now the empty list (because the msgs have been handled)
  return new_state
}<p>Where type msgs could be a list of types like | WriteFile of string | MaximiseScreen<p>The main loop will be modified by putting a call to this handleAsync function after update, like this:<p>function loop(old_state) {
  const mid_state = update(old_state);
  const new_state = handle_async(mid_state);
  draw(new_state);<p><pre><code>  if (new_state.should_not_close_window) {
    loop(new_state);
  }</code></pre>
}<p>The majority of your code should be in the pure update() function which returns a new value (this example doesn't explain anything about pure functions at all) and IO should be minimised.<p>Generally, don't do IO (except at the boundary/root of your application). When you want to do IO, add some kind of message/datatype value to your state object and do the IO when your state object bubbles up, rreturning to the root of your application.<p>The talk likely explains this better but I hope my attempt at giving an explanation was helpful.<p>[1] <a href="https://www.destroyallsoftware.com/talks/boundaries" rel="nofollow">https://www.destroyallsoftware.com/talks/boundaries</a></p>
]]></description><pubDate>Tue, 14 May 2024 06:32:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=40352244</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40352244</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40352244</guid></item><item><title><![CDATA[New comment by humzashahid98 in "The most backdoor-looking bug I've ever seen (2021)"]]></title><description><![CDATA[
<p>This made me think of that old TV show "Malcolm in the Middle".</p>
]]></description><pubDate>Fri, 10 May 2024 07:21:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=40316225</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40316225</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40316225</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Algebraic Data Types for C99"]]></title><description><![CDATA[
<p>I think you're right to point out that it's too strong a claim to say that sum types are a basic building block of thought, although I believe they are very useful in coding regardless of that claim.<p>There is the still the ongoing debate about how much human perception and human reason are shaped by cultural forces vs. universal forces (where the latter asserts humans reason in the same/similar ways).<p>There's evidence that certain optical illusions don't work across cultures for example (I seem to remember those in Western countries have a tendency to mentally group things in rectangular boxes). The exact balance between cultural and universal forces isn't known and I doubt we could say anything about sum types in that regard.</p>
]]></description><pubDate>Thu, 09 May 2024 19:32:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=40312095</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40312095</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40312095</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Social engineering takeovers of open source projects"]]></title><description><![CDATA[
<p>You're not alone. It made me laugh too.</p>
]]></description><pubDate>Mon, 06 May 2024 00:50:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=40270070</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40270070</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40270070</guid></item><item><title><![CDATA[New comment by humzashahid98 in "Nintendo blitzes GitHub with over 8k emulator-related DMCA takedowns"]]></title><description><![CDATA[
<p>If emulators in general were illegal, Nintendo would be in trouble too and would be obliged to remove the emulated games it sells on the Virtual Console.</p>
]]></description><pubDate>Sat, 04 May 2024 07:17:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=40255626</link><dc:creator>humzashahid98</dc:creator><comments>https://news.ycombinator.com/item?id=40255626</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40255626</guid></item></channel></rss>