HNHacker News
TopNewBestAskShowJobs

tekkk

1,716 karma · joined March 3, 2017

goto.tekk@gmail.com
submissionscomments
tekkk··on Local Stack Archived their GitHub repo and requires an account to run
That doesn't make sense. You use AWS services because they are in the cloud, not because you want to do self-hosting. Similar to Cloudflare wrangler, localstack should be just a well-built local mocking service.
tekkk··on React just left meta. Here's what that means for developers
LLM-generated article at least partially.
tekkk··on Stoolap/Node: A Native Node.js Driver That's Surprisingly Fast
But what is stoolap's binary size? Specifically, WASM size? wa-sqlite is 1.2 MBs.
tekkk··on Show HN: Geo Racers – Race from London to Tokyo on a single bus pass
It's good to follow an example but what works in a TV show can make for a bad game mechanic. Games like geo-guesser are nice because they focus on the fun part, figuring out locations. And leave the rest out. Learning real routes and prices is cool, playing fictional waiter is IMO not.
tekkk··on Show HN: Geo Racers – Race from London to Tokyo on a single bus pass
Just remove the work part man. It's incredibly frustrating when you run out of money. Add some credit card loan or something and your final score is the amount of money you have left. Also, add teleport button—I clicked the big red button thinking it would transport me instantly. Only to be dropped off to in the middle of nowhere. And when you select a departure from train station, it should auto-select the end-stop, so you don't have to scroll down and click it (which is non-obvious btw that you have to)
tekkk··on The Overcomplexity of the Shadcn Radio Button
Well I want to give shadcn some credit, building a comprehensive open-source UI toolkit, on your own basically, isn't as easy as one would think. Yeah you can use native elements except for some tiny edge case with say Safari and then you go deeper into the rabbit hole, until you decide you'll just customize everything. But at this point you probably have lost a lot of time and sanity already.

I'd put the blame on React and poor Web APIs in this case. Both are way too complicated for mere mortals to understand fully, and even simplest things like maintaining 100% container height through nested elements, can become a ridiculous time-sink for something completely unrelated to what is your main objective.

tekkk··on The Gleam Programming Language
Well. Coming from TS, Gleam just wasn't/isn't my jam. It's a nice programming language research project, but it just goes against the grain for me a little too much. All the made-up rules early returning always being weird `use` call, the type boilerplate—no inline object types as I remember. Lot of inventions that just makes me go "why?" Like the opposite ideology of Go. And yes I've used Haskell before (didn't like it) and Rust (kinda like it) and others in smaller quantity.

I am more excited about making things rather than fetishizing about some language paradigms so, I acknowledge that Gleam just isn't for me. I did give me the insight that for me, it might be the best to stick with the common denominator languages for the foreseeable future.

tekkk··on Cloudflare CEO on the Italy fines
While he has a point and Italians are kinda embarrassing in their politics, can't help the feeling that he comes off as a bit of cry-baby. Trying to win points with the JD/Musk mafia that hard seems weird and icky. Seems like signaling to other billionaire bros that they belong to their faction, which in my books isn't that great either. That last uppercase line a cherry on top of shattering my image of CF as respectable tech-vendors.
tekkk··on Eat Real Food
Those science studies are a load of bull if they say added sugar up to 50 GRAMS has no effect on your health. Your gut develops a craving for it like no other and your insulin spikes much harder when you intake that much on daily basis. When you're off sugar for a while, you notice how those "compulsions" you have during groceries is just due to your gut yearning for some sugar. Now fruits and natural sugar are a lot better, but even them I wouldn't consume excessively if you are in the business of high focus -work.
tekkk··on Eat Real Food
Does this mean better school lunches? With real salad and meat, not just hamburgers and ketchup. I'd hope so.
tekkk··on The rsync algorithm (1996) [pdf]
Now that was an awesome blog post, thank you for linking!
tekkk··on Permission Systems for Enterprise That Scale
Strange the article proposes itself for "Enterprise" yet has no mention of Google's Zanzibar and how it compares to the other approaches. AFAIK it doesn't use pre-computed values but just queries really fast (using Spanner so there's that)
tekkk··on Stop Slopware
The blog post is actually much more rational than some of the comments here. There's a fine balance what I call fetishization of tools and just knowing your craft well. Sometimes, we want to use an abstraction even though simpler approach may be better because we are in hurry, want to learn new things or just dont care particularly.

Whose to judge if it works and ships on time? Well, the fool later down the road who has to maintain it probably. But I've never believed in gate-keeping or preaching without pragmatism - I rather put my energy in teaching what little i can and hope that joy of seeing things improve for better will motivate them towards learning. If not, well it's waste of time either way.

tekkk··on Volvo Centum is Dalton Maag's new typeface for Volvo
Are they owned by the Irish?
tekkk··on WeatherNext 2: Our most advanced weather forecasting model
Never thought of that. Probably a bit too generous given that it could be just as well waste of time and resources, nevermind the bias of the voodoo doctor. Most of it was just weirdly provided therapy I suppose to relieve stress.

But it is funny that humans put a great lot of weight on social contracts and being given explicit orders, maybe even publicly, must help pursuing action instead of rumination. Especially in a world where things seemed to happen randomly anyway.

tekkk··on The React Foundation
I'd say React has become broken. The fact you have to by default wrap everything in a hook and cycle the boilerplate from one component to another is insane. useMemo, useCallback-use this and that. What are we even doing here in the first place? Playing whack-a-hook?

And then you still can end up with stale closures.

The fact they are over-engineering the server-side rendering is a cherry on top. React used to prize itself as the minimalistic solution but now they invent abstractions just to feel smart it seems.

tekkk··on Who needs Git when you have 1M context windows?
I can see your point and sometimes I myself include PoC code as commented out block that I clean up in a next PR incase it proves to be useful.

But the fact is your complete PR commit history gives most people a headache unless it's multiple important fixes in one PR for conveniency's sake. Happens at least for me very rarely. Important things should be documented in say a separate markdown file.

tekkk··on What If OpenDocument Used SQLite?
The fundamental problem in my mind is the mixing of binary and text content. An optimal solution would separate them, allowing systems like Git do the versioning. But separating the tightly coupled parts into own files would also be annoying sharing/management wise.

Base64:ing the images into strings, like one could do with html, would probably not be ideal for compression. As a matter of fact, text-files as such would not be ideal compression-wise.

So I suppose if binary-format cant be avoided, SQLite would be as good as any other compression format. But without built-in collaboration protocol support, like CRDT, with history truncation (and diverged histories can always fall back to diff) I dont think it'd be good enough to justify the migration.

tekkk··on Y Combinator files brief supporting Epic Games, says store fees stifle startups
I don't want to get into politics but dont you think it's funny when you can purchase assault rifles, made for killing people, yet we are so afraid of having the poor individuals in control of their own phones. Or farming equipment - the list seems to keep growing.

It's just corporate propaganda that all hell would break loose, you could just offer installing baby mode at Apple physical store that can only be removed at said places. Yeah some people would still climb the fence and touch the power lines but look, can we save them all? Should we? In this world of merciless exploitation, wouldnt it be just fair we stopped pretending it never was about anything else but money?

tekkk··on Y Combinator files brief supporting Epic Games, says store fees stifle startups
What a stupid argument. Maybe grandpas and grandmas should get a different phone then, like a Doro, and stop bringing the rest of us down. And it doesn't even hold water as my mother has been scammed by legitimate App Store apps that have charged extra-fees just because they could.
tekkk··on CRDT: Text Buffer
Jeezs. Thanks for the breakdown. I suppose the layering of different, complicated patterns make it too thick to parse. And some of the CRDT APIs leak quite a bit of complexity once you want to do something a little more complicated eg wrap rich text editor content.
tekkk··on CRDT: Text Buffer
Wow. Didnt know there were these CRDT examples for mere mortals. I supppose once you put Rust in the mix the heads start to explode, mine included. Cool!
tekkk··on Show HN: Bolt – A super-fast, statically-typed scripting language written in C
Really impressive, great job! I was interested to see how you had solved Result type and that seems quite developer-friendly—no wrappers just value & error union. I should try it out to see how it's to write if I can run it on ARM64. I wish Godot Script looked like this.
tekkk··on Lina Khan points to Figma IPO as vindication of M&A scrutiny
Figma's stock quadripled in price from 33 to whatever it is now. Not saying it's good or bad, just that those gains must have been nice with effort akin to staring spreadsheets a while and babbling in meetings.
tekkk··on Why Elixir? Common misconceptions
Hah. Sure buddy, Mr. Sr Dev. Sorry if I offended you and your vast experience. Without types there definitely aren't type bugs, I grant you that, and JVM languages are quite different to TS. I don't know if your argument on type erasure is any better than advocating for dynamic typing but it definitely happens when you just start throwing anys.

And look, I'm first to admit that TS type system isn't perfect (and it can cause some devs to go overboard) but I have read my share of Python scripts that were read-only from the minute they were born.

  It sounds like you’re really trying to justify something and that’s great for you. I’m really happy for you. Keep it up. May you soar where no junior dev has dared to soar before. God speed.
And please, your condescension just sounds insecurity to me. It's highly amusing though that you try to play me down as a silly junior dev, I'm quite satisfied that my original assessment was correct.
tekkk··on Why Elixir? Common misconceptions
Here's my take as TS dev. You just never learned to use types in the first place where there is very little ambiguity on any types anywhere because there is close to no any's used. Sounds like you guys get high and mighty on your tunnel-visioned copium—I mean I used to write JS for god's sake and thought it was okay. And I remember when I first tried TS felt annoyingly hampered by having to actually use interfaces properly.

Sure, the nature of Elixir probably makes it easier but I find little joy in dynamic whack-a-mole and mental gymnastics to infer types instead of fricking actually being able to see them immediately.

I could go commando in TS as well and switch to JS and JSDoc, leaving everything gradually typed and probably be fine but I'd feel terribly sorry for anyone else reading that code afterwards. It'd be especially silly since I can now just infer my auto-generated Postgres zod schemas with little effort. Moreover, a good type system basically eliminates typing-related bugs which you guys apparently still have.

So please, don't over-generalize just because you think you got it figured out.

tekkk··on Why you should choose HTMX for your next web-based side project (2024)
I got a wave of shudder reading the acronym "HAM stack". Yugh. MEAN, MERN, RERN–once hyped up hot air which now sounds so dated and hackneyed. It's cool to be excited about tech but if your main selling point is building "faster and cheaper", I don't know if picking up a minimalistic framework you know nothing about is faster than just re-using your trusty boilerplate.

Be it React or Svelte or whatever. With serverless backend if you want to keep costs down. Although a server from Hetzner isn't that expensive and you can host multiple APIs there.

tekkk··on Bun adds pnpm-style isolated installation mode
So can I use bun now in pnpm monorepo without problems? I like bun and want to try it out more but also, I don't want to do the hassle of migrating only to find out some functionalities are missing eg. ability to run specific scripts on specific packages in monorepo.
tekkk··on Async Queue – One of my favorite programming interview questions
While I'm at it, here's my version, if people want to see and give feedback:

  export interface AsyncQueueOptions {
    timeoutSeconds?: number
  }

  export class AsyncQueue<T> {
    private readonly queue: Promise<T | undefined>[] = []
    readonly timeoutSeconds: number
    private timeout: ReturnType<typeof setTimeout> | undefined
    private reject = () => {}
    private resolve = (value: T | PromiseLike<T>) => {}

    /**
     * @param timeoutSeconds @default 25
     */
    constructor({ timeoutSeconds = 25 }: AsyncQueueOptions = {}) {
      this.timeoutSeconds = timeoutSeconds
      if (timeoutSeconds > 100) {
        console.warn(`You are initializing AsyncQueue with over 100s timeout: ${timeoutSeconds}`)
      }
      this.queue.push(
        new Promise<T | undefined>((resolve, reject) => {
          this.resolve = resolve
          this.reject = reject
          this.timeout = setTimeout(() => resolve(undefined), timeoutSeconds * 1000)
        })
      )
    }

    next(): Promise<T | undefined> | undefined {
      return this.queue.shift()
    }

    push(msg: T) {
      this.resolve(msg)
      this.queue.push(
        new Promise<T | undefined>((resolve, reject) => {
          this.resolve = resolve
          this.reject = reject
          clearTimeout(this.timeout)
          this.timeout = setTimeout(() => resolve(undefined), this.timeoutSeconds * 1000)
        })
      )
    }

    close(msg?: T) {
      if (msg) {
        this.resolve(msg)
      }
      clearTimeout(this.timeout)
    }
  }
tekkk··on Async Queue – One of my favorite programming interview questions
Heh heh. I dont understand what the fuss is about, AsyncQueue is kinda cool in JS. I use it, from time to time, to implement async generators that can be iterated over with for await.

Although my implementation doesnt have any sequencing as never had need for it but, more importantly, it has retrying and timeouts. Well retrying I might have implemented on level higher.

Maybe I'm just one of the rare few who actually would have enjoyed this type of question as a chance to brag about my version. Kinda neat as I've never been interested in programming challenges to, for once, know exactly the solution.

Page 1 of 19Next →