Readit News logoReadit News
CapriciousCptl commented on A cross-platform GUI for YouTube-dl   github.com/jely2002/youtu... · Posted by u/ducktective
iKlsR · 4 years ago
I built my own personal version where it runs in the background and automatically downloads stuff I like (I highly curate my likes) or send to select playlists. Too often I go through my favorites and see deleted videos so I just cooked up something one weekend. I have an entire hard drive dedicated as an offline archive where I can playback at anytime, search the library and it even alerts me if any video or audio I saved was deleted (I have quite some rare pulled videos). It will also grab the subtitles/transcript if available, description and top 100 comments (if a tutorial etc).

https://i.imgur.com/yxlRTI8.png

CapriciousCptl · 4 years ago
Neat! Seeing this I'm considering making a similar project that takes a search and drops the preview pictures. No post-video-watching suggest + no 1 minute video shorts + no clickbaity preview pictures + setting a watch timer or something like that might get me back on youtube.
CapriciousCptl commented on How We Went All In on sqlc/pgx for Postgres and Go   brandur.org/sqlc... · Posted by u/conroy
forrest2 · 4 years ago
We're using a very similar lib for typescript: https://github.com/adelsz/pgtyped

Would love to hear if any others of comparable or better quality exist for js/ts

CapriciousCptl · 4 years ago
Personally, I tried pgtyped in a greenfield project but ended up switching to Slonik. Both are brilliant packages-- if you ever peak at the source of pgtyped it basically parses SQL on its own from what I could understand. The issues I had were-- 1) writing queries sometimes felt a little contrived in order to prevent multiple roundtrips to the database and back and 2) pgtyped gave weird/non-functioning types from some more complex queries. I've had better luck with Slonik and just writing types by hand.

Deleted Comment

CapriciousCptl commented on TikTok overtakes YouTube for average watch time in US and UK   bbc.co.uk/news/technology... · Posted by u/iamnotarobotman
CapriciousCptl · 4 years ago
Note that this is watch time *per active user* lest anyone interprets the title as TikTok having more total active user-time.
CapriciousCptl commented on FSNotes: Notes manager for macOS and iOS – native, open source   fsnot.es/... · Posted by u/codetrotter
CapriciousCptl · 4 years ago
This is nice! Quiver was my previous go-to, but it's all but abandonware in 2021.
CapriciousCptl commented on How database indexing works internally   blog.pankajtanwar.in/how-... · Posted by u/the2ndfloorguy
thinkharderdev · 4 years ago
I don't understand why ``` SELECT total(amount) FROM orders WHERE createdAt BETWEEN '2020-01-01 00:00:00' AND '2020-12-31 23:59:59'; ```

would do a full table scan. Wouldn't the engine be able to use the index to find just the correct rows and then only do the total on those?

CapriciousCptl · 4 years ago
I was curious so I tried it in postgres 13. Postgres, at least, uses the index to form a bitmap and scans that when aggregating in the first case (10% rows in the bitmap) and not in a second case WHERE "createdAt" BETWEEN '1990-01-01 00:00:00' AND '2020-12-31 23:59:59'; (100% rows in the bitmap, obviating the need for the intermediate step). I also tried ~20% rows (2019-2020) and the planner skipped the index. '''

CREATE TABLE temp (id SERIAL PRIMARY KEY, amount MONEY, "createdAt" TIMESTAMPTZ); CREATE INDEX ON temp ("createdAt");

INSERT INTO temp(id, "createdAt", amount) SELECT generate_series(1,1000000) AS id, NOW() + (random() * (interval '10 years')) - interval '10 years' AS createdAt, random() * 100::money AS amount.

EXPLAIN SELECT sum(amount) FROM temp WHERE "createdAt" BETWEEN '2020-01-01 00:00:00' AND '2020-12-31 23:59:59';

Aggregate (cost=10286.06..10286.07 rows=1 width=8) -> Bitmap Heap Scan on temp (cost=2148.00..10033.48 rows=101032 width=8) Recheck Cond: (("createdAt" >= '2020-01-01 00:00:00-05'::timestamp with time zone) AND ("createdAt" <= '2020-12-31 23:59:59-05'::timestamp with time zone)) -> Bitmap Index Scan on "temp_createdAt_idx" (cost=0.00..2122.75 rows=101032 width=0) Index Cond: (("createdAt" >= '2020-01-01 00:00:00-05'::timestamp with time zone) AND ("createdAt" <= '2020-12-31 23:59:59-05'::timestamp with time zone))

And when running a longer query: Finalize Aggregate (cost=14596.71..14596.72 rows=1 width=8) -> Gather (cost=14596.49..14596.70 rows=2 width=8) Workers Planned: 2 -> Partial Aggregate (cost=13596.49..13596.50 rows=1 width=8) -> Parallel Seq Scan on temp (cost=0.00..12620.00 rows=390597 width=8) Filter: (("createdAt" >= '1990-01-01 00:00:00-05'::timestamp with time zone) AND ("createdAt" <= '2020-12-31 23:59:59-05'::timestamp with time zone))

CapriciousCptl commented on Endless Sky: an open source space trading and combat game   endless-sky.github.io/... · Posted by u/blopker
CapriciousCptl · 4 years ago
Sweet! An MMORPG element would be the bees knees here. Years ago there was a similar (though-MMORPG) game called Diaspora from a small studio[1]. I still remember waking up at all hours of the night to play inconspicuously (without tying up the phone line). It was freeware and featured in PC Gamer. Eventually cheaters/bots overtook the game, literally DDOSing the thing as each "node" could only support maybe 50 ships because of how they were displayed in game (~5x10 grid or so). Ultimately, the studio didn't have a solid monetization strategy and the project disappeared off the face of the earth when its users spiked. They would have made a killing with micro-transactions, but online payments weren't ubiquitous then. Instead these poor devs spent all this time/money developing the game, maintaining the servers and fighting cheaters for free before the whole thing crumbled under its own weight. It lived on in clones (Rillaspora, Xiaspora and The Reunion) but they all died within a year or two.

[1] https://en.wikipedia.org/wiki/Diaspora_(video_game)

CapriciousCptl commented on Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup   nauman.medium.com/my-rail... · Posted by u/nauman
toberoni · 4 years ago
It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old.

I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

CapriciousCptl · 4 years ago
I could be wrong but didn’t phoenix just switch to webpack from some other package manager? I guess that was 3ish years ago so a lifetime more or less in JS.
CapriciousCptl commented on Amazon Web Services In Plain English (2019)   web3us.com/how-guides/ama... · Posted by u/mbildner
Traster · 4 years ago
Some of these are clearly deliberate obfuscation. I need something to handle Queues, what should I use? Amazon SQS obviously. Oh cool, what’s that? It’s a Queue service! Oh great, why is called SQS? Simple Queue Service duh! Is there a more complex queuing service? No. There’s only SQS.

The acronym is totally useless, tells you nothing beyond it being for Queues and completely obfuscates what’s happening for anyone not in the eco system.

CapriciousCptl · 4 years ago
I think SQS was the first AWS offering. In that context “simple” means simple compared to other offerings of the 2000s/rolling it out yourself. I agree it’s a little convoluted for newcomers in 2021 although probably unintentional.

u/CapriciousCptl

KarmaCake day1466January 29, 2020View Original