HN user

hknmtt

352 karma
Posts23
Comments253
View on HN
news.ycombinator.com 2y ago

Ask HN: How was setting up EU VAT for you?

hknmtt
1pts1
news.ycombinator.com 2y ago

Ask HN: How to Count Content Views?

hknmtt
1pts0
news.ycombinator.com 2y ago

Ask HN: Why sign in/out replaced log in/out?

hknmtt
10pts13
news.ycombinator.com 2y ago

Ask HN: How to survive indefinite DDoS attack?

hknmtt
40pts59
news.ycombinator.com 2y ago

Ask HN: Anyone else getting overcharged by Aliexpress lately?

hknmtt
4pts1
news.ycombinator.com 2y ago

Ask HN: How to handle KYC for thousands of users?

hknmtt
1pts2
news.ycombinator.com 3y ago

Ask HN: Easiest way to set up email form?

hknmtt
11pts12
news.ycombinator.com 3y ago

Ask HN: Advice for Building a Remote Team

hknmtt
1pts2
news.ycombinator.com 3y ago

Ask HN: Headles Firefox on Windows?

hknmtt
2pts2
news.ycombinator.com 3y ago

Ask HN: EU Bank with Good API?

hknmtt
33pts69
news.ycombinator.com 3y ago

Ask HN: Buld a server for live video encoding

hknmtt
2pts3
news.ycombinator.com 3y ago

Ask HN: How to distribute files in CDN?

hknmtt
1pts3
news.ycombinator.com 3y ago

Ask HN: GIF service that does not collect your data?

hknmtt
2pts3
news.ycombinator.com 3y ago

Ask HN: Unmetered VPS for Video Hosting?

hknmtt
8pts4
news.ycombinator.com 3y ago

Ask HN: Recommend video streaming CDN service

hknmtt
24pts29
news.ycombinator.com 3y ago

Ask HN: How to accept payment from Russian customers?

hknmtt
10pts13
news.ycombinator.com 3y ago

Ask HN: Come up with a name for a new project

hknmtt
1pts2
news.ycombinator.com 3y ago

Ask HN: Real-world examples of WASM usage on FE

hknmtt
7pts6
news.ycombinator.com 3y ago

Ask HN: Design Handling of Money in a Marketplace

hknmtt
2pts0
news.ycombinator.com 3y ago

Ask HN: Not serving EU customers for better sleep?

hknmtt
14pts18
news.ycombinator.com 3y ago

Ask HN: How to migrate between payment processors?

hknmtt
3pts5
news.ycombinator.com 3y ago

Ask HN: Which Subscription Model?

hknmtt
5pts4
news.ycombinator.com 3y ago

Ask HN: Payment Processor Alternatives?

hknmtt
1pts4

yes, ff does a ton of background connections. use wireshark to see what it is doing. i tried to block all that crap once but after a while i just gave up.

it is still my primary browser because it is now the only alternative to google's monopoly(even though mozilla is de facto living off of google's money).

a) why not use switch { case len(a) < len(b): b = b[:len(a)] case len(b) < len(a): a = a[:len(b)] }

b) do you know the usual length of the slices? if so, can't you autogenerate/manually write switch to manually do the math? how would that perform?

Scrum Sucks 3 years ago

Scrum/Agile is awesome! I always used the daily calls to ask as much dumb shit as possible to make the meetings as long as i could so i could keep charging my hourly rate without actually working.

essentially that is how integrals are calculated in mathematics if i remember correctly. you take a curve and divide it into columns, the thinner the column the smaller the deviation(because the curve has round edges so your bar will have inherent error) and you simply calculate each column and then total it and you get the body/volume of the function. same principle like radians with circle. you are merely splitting the work into smaller pieces that you can process.

say you load 1 million records and you average them at 5.1. you then load another million and average them at 4.5. so you 5.1+4.5=9.6/2=4.8. rinse and repeat. as long as you keep the amount of records processed per each run about the same, your numbers will not be skewed. only the last chunk will most likely be smaller and it will introduce small rounding error, like if it has only 10k records instead of 1M. but still it is the simplest solution with good enough outcome.

actually i think you can also just average each chunk and then add it to existing data. like read N rows(say all have one location to keep it simple), average the data from the chunk, update/save min and max, move on to next chunk, do the same but now update the average by adding to existing/previously computed average and divide by two. the result will be the same - disk IO will be the most limiting aspect. this "challenge" is not really a challenge. there is nothing complicated about it. it just seems "cool" when you say "process 1 billion rows the fastest you can".

On a cache hit, SIEVE marks the object as visited. On a cache miss, SIEVE checks the object pointed to by the hand. If the object has been visited, its visited bit is reset, and the hand moves to the next position, keeping the retained object in its original position in the queue. This continues until an unvisited object is found and evicted. After eviction, the hand moves to the next position.

Dude, what?

I used to use it a lot but in time it becomes more of an obstacle than a net positive. http and websockets with json(front end), cbor(back end) or pb(back end) is the way to go. it gives you exactly the same features but zero restrictions. it is nice to have pb schema that is transferable into other languages but you can define schema in anything and port it to anything, it just takes time to initially write it instead of using pb as intermediary. the little layers of code it autogenerates is not worth the limitations you might be needing to overcome in the future with a larger project. also there is massive issue with no value provided vs null or empty or zero value. pb tries to solve this by using wrappers but in code that is massive pain to work with all the nesting. that was actually what broke the camel's back for me.

i just want to mention that i do not use rest, at all. i do use http methods and url routes but i never accept any rest rules for design or behavior. i am using something like json rpc but i am not using a single route to handle all communication. i still use the same approach as grpc does - route per method, but i keep the flexibility of naming and http methods. people seem to be very much stuck with rest and its limitations/rules for some weird reason.

TTL doesn’t say anything about eviction among objects that are still live, no?

TTL IS eviction policy. You just store a timestamp along the value. When you access it, you check the timestamp and if it is stale, you delete it and return not found error(or whatever not found should return). And you have a simple bg worker that scans the cache periodically and deletes these stale entries to free up the memory.

This is the basis for all caches. You can add cost on top of this as yet another eviction policy but that only adds another worker to scan the cache for items to purge and you have to store the cost along with the entry so you are increasing the each entry by at least 4 bytes, if we're talking uint32. Not to mention that for this eviction policy, you need sorted cache because you need to know where the cut off for cost is.

Walking the entire cache to purge expired TTL entries is one thing, but keeping ordered cache is a whole another thing.

As a user, for me, YouTube has been shrinking ever since the first adpocalypse. By that I mean I rarely see new videos or relevant recommendations. It is all stale content and pages only couple of pages instead of going infinite like it used to. My most visited page is home page which shows recommended content(it used to be on a dedicated page) and I literally see the same content for days, rarely with new videos. And I have hundreds of subscribed channels. Youtube is a living corpse, I do not care what numbers they put out in the public.

Ive done many projects in my life, none took off. I've got my first computer in 96 and been online around 2001. So I think i have seen the internet evolve for the past two decades. And what I have been observing ever since we left the 2010s is the rise of monopolization. The 2010s were magical years. Internet was amazing place where you could find a lot of things, communities, people... you could have made anything and you had good odds of attracting people and making it work. For profit or for fun. But ever since we left those golden year, it no longer is about the idea, or even execution. Now it is solely about how much money you can spend on advertising. The internet is too noisy and too monopolized. All meaningful services are owned by big tech. They either compete with you directly or they own services you will have to use(cloud, maps, translations...) so they will make money off of one anyway. And if you hit a unicorn status, they will give you the led or gold offer(they buy you out or make a competing service and bury you business in no time) so you are f'd one way or another, unless you have a ton of cash backing you up and even then you have hard fight against you. And it will only get worse. So good luck to all.

In Go, I would normally have my own time function which would return the std lib time function, which works flawlessly for testing my own code. The problem is if there is foreign code(ie. 3rd library dependency) that uses time and which makes obviously calls to the std library time, making it untestable. The only solution is to overwrite time on language level by some trickery(not all languages allow this) or literally change the OS's clock and test manually one test at a time. This is one of those unsolved programming issues.

no need for captchas, just implement throttling per ip. like bcrypt dues for passwords. if a bot fills up a form(or whatever), so be it, but it won't be able to do it for another N seconds or minutes..so the problem then is lowered from per try, which can be thousands of submissions, all the way down to per period and per ip.

I do like Go tests. Would love to have ability to find out untested parts of the code base though to increase coverage, but I do not think there is a way to measure this with available tools just yet.

Although I have yet to make integration tests that require live database and other dependencies. That will be fun...

Anyway, my main gripe with tests or TDD is that even if the code base is 95% finished, not talking libraries here, even small code changes can cause a cascade of changes that need to be addressed and tests essentially multiply the work load by a factor of 10, easy. And I am not talking about big changes. It might be a simple addition of a new struct field which suddenly breaks half of your test suite. Hence teste should be, in my experience, written as the absolutely last step before going live. Otherwise they might impose massive costs on time, and potentially money(if we're talking actual business and not one man shot type of project).

All of them. But it's not what you think. The experience I gained by working on them simply increased my confidence and THAT always got me a job. To the point where I reached fuck it level and never got stressed out by a work. I set my red lines and that was that. I ended up working the best job I ever had, until I quit working altogether to live off of my investments. Mind you I have worked a full time job only one year in my whole life.

Magicians of The Gods by Graham Hancock. But I will not finish it. It is boring and long-winded and he's more a travel journalist than researcher or scholar, so no real breakthroughs and a sprinkle of Daniken-like sensationalism while stretching the facts quite a bit. But what killed the book for me eventually was his unfounded attack on Sitchin. The previous book I read from him was Fingerprints of The Gods, that one was better but still had similar issues.

I would like to finish reading Hitler's Mein Kampf. I had it for years, started it twice but never finished it. I have no other books to read so I think this will be my next.

I have used something like this in the past:

FROM alpine:latest AS base # Scratch does not have shell so we have to create non-root user in here and later copy it into scratch. RUN adduser -D -u 123456 appusr

FROM scratch # Copy the binary. COPY foo.bin /foo.bin # Copy the user and set is as active. COPY --from=base /etc/passwd /etc/passwd USER appusr # Non-root user cannot bind to "privileged" ports(<=1024). EXPOSE 1234 ENTRYPOINT ["/foo.bin"]

Simple. But i can see ko being good alternative if you for some reason do not want to install docker on your computer but still be able to build docker containers.