Readit News logoReadit News
httgp commented on My Browser WASM't Prepared for This. Using DuckDB, Apache Arrow and Web Workers   motifanalytics.medium.com... · Posted by u/jjp
__mp · 5 months ago
I’ve been toying with the idea of implementing a distributed analytics engine on top of Cloudflare workers and DuckDB.

I’m not sure if this goes against the CloudFlare TOS tough (last time I checked they had some provisons against processing images).

httgp · 5 months ago
BoilingData does something very similar, except with Lambdas on AWS.
httgp commented on Mise: Dev tools, env vars, task runner   github.com/jdx/mise... · Posted by u/ksec
jdxcode · 9 months ago
I don't understand how people don't notice the massive tax they're paying by using nvm:

    $ hyperfine "~/.nvm/nvm.sh" "mise env"

    Benchmark 1: ~/.nvm/nvm.sh
      Time (mean ± σ):      1.722 s ±  0.032 s    [User: 0.064 s, System: 0.112 s]
      Range (min … max):    1.684 s …  1.805 s    10 runs
     
    Benchmark 2: mise env
      Time (mean ± σ):      13.4 ms ±   5.7 ms    [User: 10.0 ms, System: 21.3 ms]
      Range (min … max):     9.4 ms …  42.2 ms    29 runs
      
    Summary
      mise env ran
      128.14 ± 53.94 times faster than ~/.nvm/nvm.sh
100x is definitely something you'll notice

EDIT: for some reason in discord we're getting very conflicting results with this test. idk why, but maybe try this yourself and just see what happens.

httgp · 9 months ago
I switched to https://github.com/Schniz/fnm a while ago and it’s been fantastic. I also bake it into all of our Packer images at work.
httgp commented on 20 Years Ago Today: 'Firefox Browser Takes on Microsoft'   news.slashdot.org/story/2... · Posted by u/MilnerRoute
transfire · 10 months ago
And if we don’t start using browsers other than Chrome we are back in the same boat.
httgp · 10 months ago
Agreed. I’m very closely watching https://ladybird.org/
httgp commented on Next Generation Out of Band Garbage Collection   railsatscale.com/2024-10-... · Posted by u/ksec
worik · 10 months ago
> I bet the engineers at Instagram were unaware of pythons performance profile when they chose it,

Is the Instagram stack Python? I doubt it, but stranger things have happened

I suspect it is actually some derivative of Apache, or Nginx. Something sensible

httgp · 10 months ago
Instagram is built with Django.
httgp commented on Show HN: Tiny Moon – Swift library to calculate the moon phase   github.com/mannylopez/Tin... · Posted by u/mannylopez
adityapurwa · a year ago
In Islam, err is forgiven. If you’ve done your best and there’s a bug you missed, then its forgiven, and when you discover it, just fix it.

That’s why if a scholar based with intensive research and data, has concluded that X is true. If in the end its really true, they’ll receive two rewards; when its debunked and it was actually false, they receive one reward. The sin is to be ignorant and without any research and data concluded that X is true.

Specifically for Ramadan, the guideline is to use Moon sighting. If you see a new moon, then you begin fasting. If not, then you postpone for a day before starting Ramadan. Usually there’s a committee that does this and they will announce the result. But it doesn’t prevent anyone with the ability to observe to decide when to start Ramadan.

Salah guideline is the sun, e.g the dawn prayer is when there’s thin strike of the sun on the horizon. So to calculate the prayer time you use the sun position relative to your position on earth. If there’s a bug that somehow err the prayer time to ~5 minutes. We can always observe the sun first.

So there’s always this second factor that you can use to validate the first method. Time seems off? Look at the sun. Sun not visible? Estimate with time. Both seems off? Estimate with the variables that you can observe.

“ God does not burden any soul with more than it can bear “ (Al Baqarah 286)

——- So to answer the question, the tolerance depends on your effort on trying to reduce the err.

God knows best

httgp · a year ago
Really cool, thank you!
httgp commented on The Bun Shell   bun.sh/blog/the-bun-shell... · Posted by u/pixelmonk
simonjgreen · 2 years ago
Minor tangent, but plucked from that article, why is ‘rimraf’ downloaded 60m+ time a week?! Why is that a thing that need a library? (Asking as a systems guy, not a programmer)
httgp · 2 years ago
It’s quite often used in npm scripts to cleanup stuff (say, between builds), and many developers prefer that over native solutions like `rm` and `del` as it gives them a cross-platform way of cleaning up files and folders.
httgp commented on Deno Cron   deno.com/blog/cron... · Posted by u/0xedb
lambtron · 2 years ago
yes as of 1.38!
httgp · 2 years ago
Would you mind showing how?
httgp commented on Python Requests 3   twitter.com/kennethreitz4... · Posted by u/josuebrunel
falcor84 · 2 years ago
What's the historical context here?
httgp commented on Show HN: Generate pdf with gitbook or mdbook url   github.com/lufengd3/htmlb... · Posted by u/lufeng
vagab0nd · 2 years ago
Just recently I was tasked to convert some huge html pages (with lots of small entries) into a pdf file. The requirements are "fully automated solution" and "pdf must look the same as the page when viewed in a browser". Probably takes less than five minutes, right? I thought the same.

Wrong.

Chrome/Chromium crashes due to hard coded memory limit in V8.

Firefox has no command line option for printing pdfs.

No other libraries render the pdfs correctly because they are not full-fledged web engines.

So what were my options?

1. Read/understand Chromium source, recompile to lift the memory limit.

2. Read/understand Firefox source, recompile to add a command line option.

3. Use some UI testing framework to automate pdf printing in Firefox.

Eventually I did 4, which is split the html files into smaller chunks, convert and re-combine. Of course the problem is how do you know where to split the html so that it's at the boundary of the page? The solution is to do a binary search for the number of entries to put into each chunk when the number of generated pdf pages changes. What a pain.

httgp · 2 years ago
Have you considered Playwright? It offers very straightforward APIs to do exactly this.
httgp commented on Building a high performance JSON parser   dave.cheney.net/paste/gop... · Posted by u/davecheney
CyberDildonics · 2 years ago
If you have files that are large enough that json is a problem, why use json in the first place? Why not use a binary format that will be more compact and easier to memory map?
httgp · 2 years ago
Chances are they can’t control that; they’re perhaps provided by a vendor.

u/httgp

KarmaCake day147July 30, 2019
About
https://httgp.com
View Original