HNHacker News
TopNewBestAskShowJobs

johtso

900 karma · joined June 6, 2011

[ my public key: https://keybase.io/johtso; my proof: https://keybase.io/johtso/sigs/YxYSihnl8rZY30JJDe9RtNmh8OE7Kkem6MSXJtz_IPo ]
submissionscomments
johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
How do I test my jobs?

Is there a local runtime a-la miniflare?

Or do I have to deploy and then run my unit tests against your APIs?

johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
I do wish people had less of a tendency to be shy about Typescript in their product documentation. It's a selling point, show it off! Examples end up being a little more verbose, but they actually end up being useful for people that are writing Typescript (probably a closely overlapping group with those that care about their background jobs not disappearing).
johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
Just ideally the dev experience should be `result = await somethingThatMayHaveBeenCalledBefore(id=txnref, params)`

You shouldn't need to first do a check to see if the task already exists using a different api, and then choose whether or not to run a new task.

At least this is my preference.. a-la Durable Objects.

If you don't specify a custom unique id when calling the task it would then be treated as a task that can (and would make sense to be) run multiple times (i.e. not idempotent).

johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
Often you want to specify your own unique id based on some property of the job, like a transaction reference, or just a unique combination of parameters. This means you can later refer to it without having to store the reference somewhere. Is this possible?
johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
Oh interesting! So say if you wanted to call 3rd party API in your function, with some exponential backoff retry, without blocking your concurrency allowance, would you model that as recursively calling the same function with an attempt argument?

Does this look nice in the observability layer?

johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
Yeah it's not clear how you uniquely reference a task, a super core feature and something that the Temporal documentation for example covers very early on.
johtso··on Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
This looks really exciting! This is a space that's desperate for innovation. Will be interested to have a play and see what the dashboard looks like. Other options in this field like Temporal have a high learning curve and DevOps cost. Something like Cloudflare Durable Objects are also a very tempting option but require rolling your own visibility / dashboard stuff.

I'm guessing this is a "just make sure everything you do is idempotent" approach? Is there any kind of state between attempts?

Also how would you have a task with a unique id / parameter so that when you call it it will only be scheduled once and returns the result of the existing scheduled job?

Another question, how would you have custom retry logic in your job without blocking your concurrency? Or if using the platforms retry mechanism, how can you run some logic when the job fails? Can the job know what attempt it is on? Is there context of any sort? The only solution I can see from the docs would be to execute jobs recursively but that seems like it would be ugly and mess up the observability? I'm looking for a feature like Temporal's sleeping that actually does a delayed reexecution of the job (I think).

Also I can't get the discord link to work, it seems to link to a discussion rather than being an invite link (I'll give it another try on desktop)

johtso··on Man has two more chances before $232M in Bitcoin is lost forever
Joe Grand is one of those people: https://www.youtube.com/watch?v=dT9y-KQbqi4

Also here's a presentation on finding vulnerabilities in Ironkey flashdrive: https://www.youtube.com/watch?v=R8iAqA0pklw

johtso··on A 'CSS reset' for TypeScript, improving types for common JavaScript API's
No, I'm going to parse it with zod and make sure it is what I think it is.
johtso··on Sloth – A Mac app that shows all open files, directories, sockets, etc.
I wish there was a way to see which files were being actively written to sorted by amount of data written. Various times I've seen my disk space rapidly dwindling with no way of know what file was responsible..
johtso··on I had ChatGPT write a Decemberists song and recorded it
Reminds me of the AI generated Christmas song: https://www.youtube.com/watch?v=BVu2y707NFk

That ones's obviously a little less purist though..

johtso··on I had ChatGPT write a Decemberists song and recorded it
Prompt: Could you please summarise Stanislaw Lem's short story "The first sally (A), or Trurl's electronic bard"

ChatGPT: "The First Sally (A), or Trurl's Electronic Bard" is a short story by Stanislaw Lem that tells the story of two constructors, Trurl and Klapaucius, who are famous for building automated machines to do tasks for their clients. In this story, Trurl creates an electronic bard, a machine that can compose poetry. The machine is so successful that it becomes popular throughout the land and Trurl is asked to perform before the king. However, the king is unimpressed by the poetry and orders Trurl to come up with something more magnificent. Trurl attempts to create a machine that can create the ultimate poem, but the machine becomes too powerful and begins to create poems that are too beautiful and perfect, causing people to become depressed and hopeless. Trurl is forced to dismantle the machine and destroy its creations. The story is a commentary on the dangers of technology and the limitations of art and creativity.

Also here's a kagi summary: https://labs.kagi.com/ai/sum?url=https://electricliterature....

johtso··on I had ChatGPT write a Decemberists song and recorded it
I never would have thought that what I'd read in The Cyberiad as a kid would be playing out in the real world. Stanislaw Lem really was a visionary..

https://gwern.net/doc/ai/poetry/1974-lem-cyberiad-trurlselec...

https://gwern.net/gpt-3#stanislaw-lems-cyberiad

johtso··on Voluntarily Stopping Eating and Drinking
Okay, think there was some misunderstanding. I was thinking of the situation where the person is so chronically ill that they cannot do any of those things. They either need someone's help, thereby making them break the law, or they take the only other option to end their lives which is to stop eating or drinking.
johtso··on Voluntarily Stopping Eating and Drinking
This is why people will often make a video recording their intention and their reasoning, and try to demonstrate that they are of sound mind before making the decision to end their lives through a method like this. I can assure you that buying a gun in a country where owning firearms is illegal.. and then shooting a loved one.. is not something that can in any way be compared to an action like this, in the eyes of the law at the _very_ least.

I get where you're coming from about having problems with the tone of the website, and that it doesn't say "this is a nasty way to die, it's going to feel awful". But on the other hand it's trying to push for self autonomy in an area where it's criminalised.

Really laws need to change to give people options.

johtso··on Voluntarily Stopping Eating and Drinking
The awful thing is that, due to assisting suicide being illegal in many places, if you are no longer physically capable of ending your life without assistance, this is your only choice.
johtso··on Show HN: iWF – A new “workflow as code” execution engine
I can't wait for Temporal's cloud offering to work for the "small dev". It would be so wonderful to only need to worry about the learning curve of using the tool, and not the deployment + cost. It would be great to be able to reach for it for any little project that needed robust persistent workflows.
johtso··on Img2Prompt – Get prompts from stable diffusion generated images
Enjoying playing with this! It would be great if the generated images had their prompts embedded in the metadata..
johtso··on Show HN: iWF – A new “workflow as code” execution engine
Right.. the tricky thing is when you think your use case is relatively basic, you're a one person team, and you want to decide whether to pull in such a powerful tool, and deploy and manage it.. or take a more DIY approach, have it all just run on demand in the cloud, and not have to learn a bunch of APIs and concepts as they're described by Temporal etc.

cloudflare alarms seem like a decent solution for scheduling. If you want a state machine, you can just use a state machine (xstate).

The durable object primitives are more limited, but therefor seem a little easier to get your head around if you don't need all sorts of complex signalling.

introspection / analytics is obviously a pain to have to deal with yourself. I guess you'd end up saving the state to a database after any action. And you could probably get a reasonable little analytics dashboard fairly painlessly by chucking something like appsmith in front of it?

johtso··on Show HN: iWF – A new “workflow as code” execution engine
What do you think about using Cloudflare durable objects for long running stuff instead of something like temporal?
johtso··on AI Generated Seinfeld banned on Twitch for transphobic jokes
But the AI has no intention.. unless you call the prompt fed to it its intention. You're anthropomorphising it.

The way its output is received is all that matters.

johtso··on Don’t teach during code reviews
I really resonated with the way you frame it. For me it's absolutely key that ego doesn't get in the way of teaching/learning and the quest for improvement. People need to feel safe so they don't feel bad about having their output critiqued in front of co-workers. They should relish in it! Teaching is a gift! We're all perpetually learning, forgetting and making mistakes. The enemy is the idea that we need to maintain an image of getting things right all the time.
johtso··on Ghost boat with GPS leads father-son duo to man overboard
getting used to peeing in bottles might just save your life one day
johtso··on Anki and GPT-3
The opposite theory is that getting _some_ exposure to the information, even if you can't actively recall it, is still valuable. When you encounter that information in the wild, your brain then has an existing pathway to strengthen.
johtso··on ChatGPT Plus
That's a good idea and probably a healthy habit to build! I might try and start doing that..
johtso··on Show HN: We built a developer-first open-source Zapier alternative
All the example use cases seem to be for non business critical stuff.

Is this being sold as a tool that I could use for.. say.. persistent workflows for customer payments? Say I needed to take payment, and make sure that a ticket is reserved using a 3rd party api once the payment is successfully processed, refund the payment if there's some kind of problem, and then I need to send a confirmation email.

Can I store and query state on the workflow? In my code can I `await` the completion of a workflow and get a result?

johtso··on Show HN: We built a developer-first open-source Zapier alternative
In my mind it will always rhyme with tapir..
johtso··on ChatGPT Plus
I think there's also an argument to be made that $20 per month is a bigger deal than some people realise. The issue isn't just _that one_ specific subscription you're paying for. The issue is how they all accumulate over time.. and eventually you find that your metaphorical bucket of money has turned into a leaky sieve. Not to mention all the services you forget to unsubscribe from even though they've ceased to provide enough value to you to make them worth while.

A one-off purchase is very different from making a hole in the bucket.

Obviously this all depends on how financially comfortable you are. But still.. time is money. Money you're spending today is time you're committing to work to earn back tomorrow.

johtso··on Show HN: We built a developer-first open-source Zapier alternative
"4. Exactly right, each "step" is a block in the UI with clear inputs and outputs. We would really like to have a graph view. That'll be especially useful when you put loops in the code, and of course branching."

I can't help but think that you want a state machine here, rather than imperative code that's being analysed to try and get some kind of a graph out of it..

I'm personally looking forward to a cloud, state machine based service that offers the whole long running workflow thing. The closest I've seen so far was people using xstate within temporal.io workflows.. but would be amazing to have really nice observability out of the box, with all the clarity that state machines bring.

johtso··on Show HN: We built a developer-first open-source Zapier alternative
Unfortunately there's currently a steep mandatory support charge of $200 a month, which makes it unviable for smaller operations. I think they're planning to offer the service without the support aspect, which would be fantastic and I'd be first in line for..
← PreviousPage 5 of 10Next →