Readit News logoReadit News
mftb commented on Snake on a Globe   engaging-data.com/snake-g... · Posted by u/rishikeshs
mftb · 7 months ago
gg
mftb commented on Undb – Private first, unified, self-hosted no code database   github.com/undb-xyz/undb... · Posted by u/nichenqin
alfanick · 2 years ago
I'm trying to understand what am I looking at. MS Access like db+ui in browser, with homemade engine and no sql support? What are guarantees here, concurenncy, isolation, single user? Not much on the main page.
mftb · 2 years ago
DB engine appears to be sqlite. It's in the tags on the main page and there's a file full of sql to create what looks like a sample db in the data/ dir.
mftb commented on Spectral Contexts in Go   hypirion.com/musings/spec... · Posted by u/todsacerdoti
floydnoel · 3 years ago
are one-character variables common in Go? every time that i think "maybe i should pick up Go," and then i see the syntax... it gives me pause. seems really ugly!
mftb · 3 years ago
Choosing to name variables with a single character has nothing to do with syntax. At most it could be considered idiomatic, but there's no reason to slavishly follow every idiomatic choice, just as there isn't in natural language.
mftb commented on Lessons from Creating a VSCode Extension with GPT-4   bit.kevinslin.com/p/lever... · Posted by u/kevinslin
weaksauce · 3 years ago
they started the project on the 13th per the git commits. so on the magnitude of two weeks it seems.
mftb · 3 years ago
Ah, good eye, ty.
mftb commented on Lessons from Creating a VSCode Extension with GPT-4   bit.kevinslin.com/p/lever... · Posted by u/kevinslin
kevinslin · 3 years ago
Author here. Happy to answer any questions or comments.

As a teaser for a followup: I've been able to create a version of this that is able to generate an extension in one shot without any issues. This is done by giving GPT more context on the expected project layout as well as a checklist of constraints in order to create a valid app. Its not hard to envision a future where all software projects can be scaffolded by a LLM

mftb · 3 years ago
I appreciate your write-up, it was well done. How long did you spend on this? I'd be most interested to know how long, not counting writing the blog post.
mftb commented on How much memory do you need to run 1M concurrent tasks?   pkolaczk.github.io/memory... · Posted by u/pkolaczk
eptcyka · 3 years ago
What's the point of multiplexing tasks on a particular core if the tasks don't do any I/O? It will be strictly faster to execute the tasks serially across as many cores as possible then.
mftb · 3 years ago
See response to sibling comment.
mftb commented on How much memory do you need to run 1M concurrent tasks?   pkolaczk.github.io/memory... · Posted by u/pkolaczk
throwaway2037 · 3 years ago
This is an interesting post. My understanding: Most of the use case for async code is I/O bound operations. So you fire off a bunch of async I/O requests and wait to be notified. Logically, I/O requests normally need a timeout and/or cancel feature.

However, you raise a different point:

    The tasks I'm running don't involve the network, they either succeed or error after an expensive calculation.
This sounds like CPU-bound, not I/O-bound. (Please correct me if I misunderstand.) Can you please confirm if you are using Go or a different language? If Go, I guess it still makes sense, as green threads are preferred over system threads. If not Go, I would be nice to hear more about your specific scenario. HN is a great place to learn about different use cases for a technology.

mftb · 3 years ago
I think I just responded too hastily. I am working in Go. There is file IO going on in addition to the calculation (which because of a NAS or whatever could also be network IO). As a practical matter I had never felt the need to offer cancellation or timeout for these use cases, but I probably should, so mea culpa.
mftb commented on How much memory do you need to run 1M concurrent tasks?   pkolaczk.github.io/memory... · Posted by u/pkolaczk
cyberax · 3 years ago
But that's the point I'm trying to show. In Go code all calls are the same. There is no sync/async distinction.

In contrast, in C# (or any other similar system) async calls are _expensive_ compared to regular function calls.

mftb · 3 years ago
You've misunderstood how go routines work. You need to put the "go" keyword before the function call in order for it to be run concurrently.
mftb commented on How much memory do you need to run 1M concurrent tasks?   pkolaczk.github.io/memory... · Posted by u/pkolaczk
za3faran · 3 years ago
One thing I wanted to add is that in golang, you end up passing context.Context to all asynchronous functions to handle cancellations and timeouts, so you “color” them regardless. Java folks with structured concurrency have the right idea here.
mftb · 3 years ago
This isn't true. I have use cases that don't require cancellations or timeout. The tasks I'm running don't involve the network, they either succeed or error after an expensive calculation.
mftb commented on Hundreds of millions of stars turned into a map of GitHub projects   anvaka.github.io/map-of-g... · Posted by u/anvaka
mftb · 3 years ago
To me this is proof that doing a good visualization is really an art. I saw this on hn for a couple hours, but really didn't think much of it. As soon as I clicked through the funny names, and "continents" brought a smile to my face.

I guess my little project is too small to make it, but now I too aspire to join the great nation of Golandia.

u/mftb

KarmaCake day822February 2, 2021View Original