HNHacker News
TopNewBestAskShowJobs

valcron1000

353 karma · joined December 8, 2021

submissionscomments
valcron1000··on TypeScript: Branded Types
More like `newtype` with implicit `coerce`
valcron1000··on Coroutines and effects
You already have something like this (production ready) through effect systems in Haskell (ex. https://hackage.haskell.org/package/effectful)
valcron1000··on Emacs 2011-2023
> love2d

For Lua last time I tried I just did not install any Lua extension, just use the native syntax highlighting and move on.

valcron1000··on Ethereum has blobs. Where do we go from here?
> The only reasonable answer crypto advocates can ever offer is “decentralization” and the lack of trust required.

That a very big "only". For me that's the killer app. I do not trust financial institutions and the ones that I trust do not want to accept me as their customer.

> “the average person doesn’t care about decentralization”

It's like saying "the average person does not care about a system of interconnected computer networks that communicates through TCP/IP". The average person cares about watching reels on Instagram or sending messages through WhatsApp.

> That’s what blockchain technology is: interesting research which will never be popular

I have no doubt that someone said the same regarding the Internet.

valcron1000··on Ethereum has blobs. Where do we go from here?
> It looks like not a single HN reader is using blockchain technology for anything.

> If nobody is using blockchain technology outside of blockchain projects

HN is very adverse to the blockchain space. This is not the best place to look for people using the technology since 9/10 times you would get downvoted to oblivion

valcron1000··on Losing faith in testing
> In both codebases I’ve merged PRs without any tests and frequently see others do the same.

I would never accept such PR. This kind of policies then end up biting you in the long run (experience talking)

valcron1000··on We need to talk about parentheses (2020)
Except for the structural editing enabled by the usage of parenthesis, all the other features can be achieved without them in ex. Haskell:

  a =
   let foo = 10
       bar = foo + 32
   in  foo * bar

  b =
   1
   & (+ 2)
   & (* 9)
   & (/ 5)
valcron1000··on Context Control in Go
I also find it curious that a language with a preemptive scheduler requires manual "yield" points by constantly checking on the context if the current function should stop executing.
valcron1000··on Context Control in Go
Is it correct to assume that the "cancellation" part of `Context` is similar to C#'s `CancellationToken`? Also, it looks like it allows to pass some "implicit parameters" to another function. If that's the case, why does Go have a single entity performing two roles: cancellation + implicit parameter passing? I would expect to have these things separated.
valcron1000··on New GitHub Copilot research finds 'downward pressure on code quality'
100% agree. It usually autocompletes better than the language's LSP since it takes a lot of context into consideration. It's a godsend for repetitive tasks or trivial stuff.
valcron1000··on Common Lisp's block / return-from and unwind-protect
> They are equivalent to the Lisp condition system

Not exactly correct due to the lack of higher order effects (https://news.ycombinator.com/item?id=20513370), but the condition system is "good enough" for a lot of use cases

valcron1000··on A lowering strategy for control effects in Rust
> Rust should learn from this work and skip the layering.

As someone who uses Haskell professionally, 100% agree. Monad transformers are an (unfortunate) solution to the problem of stacking effects, not only due to the required lifting (to pick the appropriate handler), but due to the lack of compositionality and rough UX for the developer. Algebraic effect libraries are a lot easier to use (but I cannot speak for how easy/hard are to implement).

valcron1000··on Prices aren't just about supply and demand, but control over supply and demand
The author has no background studies on economics.
valcron1000··on Prices aren't just about supply and demand, but control over supply and demand
I'll never understand why people decide to blog about topics in which they don't have any background studies.
valcron1000··on .NET 8
It was tried and the dotnet team decided to drop it: https://github.com/dotnet/runtimelab/issues/2398
valcron1000··on Seeing like a bank
> Let individuals freely transact. Which as you rightly point out, has failed for good reasons.

How has this failed? Every month I transact in crypto while I could not do the same using traditional methods.

valcron1000··on How LSP could have been better
I don't care how many credentials Jonathan Blow has, this take is pure bs. "we're spending all this time overcomplicating stuff that we used to be able to do in 1960", yet he takes the time to explain "tricks" on how to rename variables [1], while modern tools (not necessarily LSP) let you fly through the code [2].

This is just an "old man rants at cloud" take.

1. https://youtu.be/2J-HIh3kXCQ

2. https://youtu.be/AxxNHKCldzA

valcron1000··on Strong static typing, a hill I'm willing to die on
> In Python you have a simple function, `int()` that will happily turn any string consisting of numbers into a proper integer that can be used for math operations.

For starters this is not the case, it does not work on a string of numbers:

       >>> int("123 890 123")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: invalid literal for int() with base 10: '123 890 123'
> Before we can select a function to convert a string into a number we must first pick a numerical type and before we can do that we must think real hard about how big of a number we're going to support in this application

Aren't you doing the exact same thing in Python by picking `int()` over `float()`?

> what type of string are we going to get from the command line?

Well, this might be the case for system languages, but most have a single `String` type.

Here is the program you described in Python

    def main():
        n1 = input()
        n2 = input()
        sum = int(n1) + int(n2)
        print(sum)
And here it's in Haskell

    main = do
      n1 <- getLine
      n2 <- getLine
      let sum = read n1 + read n2
      print sum
Accepting a single line of numbers is not much different

    main = do
      nums <- words <$> getLine
      let res = sum $ map read nums
      print res
I didn't think much about it, it's not a lot of code and I guess it's easy to reason about?
valcron1000··on Strong static typing, a hill I'm willing to die on
Look up 'Hindley–Milner type system'. AFAIK, one feature that break this system is subtyping which is very common in many programming languages.
valcron1000··on Leaving Haskell behind
In the general case, adding IO to any piece of code requires changing all callers. I would argue that it's a feature, not a bug: now `f x` is no longer a value, but an action: calling it twice can result in duplicated logs, for example.

If you need that logging for debugging then you should use `Debug.trace` though.

valcron1000··on Observable API Proposal
My experience has been a total opposite. I've been able to deliver quite complex features in a couple of lines of vert readable code thanks Observables. Of course, you can write terrible code with it, but the same goes for every technology.

I think that this presentation from Netflix engineering team is still the best demonstration of how productive you can be wit RxJS: https://youtu.be/FAZJsxcykPs

valcron1000··on Tour of our 250k line Clojure codebase (2021)
Sounds like a great way to burn money: the company was founded in 2019 and they still haven't released anything, probably because they've spent most of their time building other stuff. Their devs sure are having a lot of fun though.
valcron1000··on Merklizing the key/value store for fun and profit
Does anyone know a good resource on how to efficiently build a Merkle tree from a big k/v store? for example, should you cache intermediate nodes?
valcron1000··on Tell HN: "I don't care about cookies” extension bought by Avast, users jump ship
How much did Avast paid for the extension?
valcron1000··on Counterexamples in Type Systems: programs that crash, segfault or explode (2021)
And what are you using now?
valcron1000··on Apple Vision Pro: Apple’s first spatial computer
> Forget what people should do, look at what people actually do

I'm going to borrow that one mate.

valcron1000··on Apple Vision Pro: Apple’s first spatial computer
> Once this headset's form factor shrinks down to sunglass size it will be the next iPhone.

So true. The company that is able to do so will have such an advantage over the competitors it won't even be fair. I sure as hell will be developing apps for such device. Potential is unlimited

valcron1000··on Death by design patterns, or On the cognitive load of abstractions in the code
> To this end, I think Haskell, in its pursuit of the purest, can lead to incredibly-high cognitive load abstractions that make reading code daunting.

Hard disagree. The Haskell abstractions in the standard library are (mostly) great. Classes like `Monoid` or `Functor` as as basic as they get (in the sense that they describe a very small set of behaviors) and include laws.

Of course, user defined classes can incur in high cognitive load, but that is applicable to any language that supports abstraction.

valcron1000··on A semester of Haskell-language-server: an internship report
Not at all in my experience, extremely laggy and resource hungry, not even mentioning incorrect multiple times
valcron1000··on A semester of Haskell-language-server: an internship report
TIL that C cannot be used for serious projects
← PreviousPage 3 of 6Next →