Better HN
topnewbestaskshowjobs
Log inSign up

LecroJS

380 karma · joined Jan 11, 2022 (4y ago) · 81 submissions

Submissions

1.

Ask HN: Which TV do you recommend for privacy?

733 points · by LecroJS · 3w ago · 885 comments

comment 1y ago · link · parent

Thanks that’s good to know

comment 1y ago · link · parent

I had this problem too until I forced myself to use the `gcm` alias from oh-my-zsh’s Git plugin. IIRC it checks out to master if it exists, else main. It has almost entirely removed this distinction from my life.

comment 1y ago · link · parent

Thanks. Do you have any places you would recommend buying from? I am guessing Amazon might not be able to meet this criteria.

5.

Ask HN: Gift Ideas for 3 year old?

1 points · by LecroJS · 1y ago · 10 comments

comment 1y ago · link · parent

So is that post’s sentiment: https://news.ycombinator.com/item?id=43725229

comment 1y ago · link · parent

What did you dislike about connecting to Postgres from AWS lambda?

comment 2y ago · link · parent

Well said. This can go even further by defining JavaScript code as functions in a sheet. For example, if someone pays you back, you click a checkbox in the corresponding cell, and it runs your code to send them a thank you email.

comment 3y ago · link · parent

+1 for Rectangle. It’s the first thing I install after homebrew on any new Mac. I came from Spectacle after EOL and was pleasantly surprised at the additional features (like window snapping) + support for Spectacle binds. If you want to try it out, it’s as easy as `brew install --cask rectangle`

comment 3y ago · link · parent

Super smash brothers melee, and it still has a strong grassroots competitive scene. It’s a work of art made in only 9 months

comment 3y ago · link · parent

Thanks for the extra details, I think I understand what you’re looking for.

Have you looked into something like this[1] for generating the macro as an ahk file? Full disclosure: I have not used it, but it seems like what you’re looking for. If you find that it suits your needs, I’d use that to record the macro and then wrap it in a loop from 1..N where N is based on the Fn key you press. That should do the trick unless I’m misunderstanding.

I wish I could be of more help, but this repo seems like a decent starting point for your use case.

Apologies if the formatting is poor as I am on mobile.

[1] https://github.com/adegard/AHK_SCRIPTS

comment 3y ago · link · parent

This is hilarious. The “final thoughts” section really hit home for me. Thanks for sharing

comment 3y ago · link · parent

I have an adjacent, simple scripting story.

Battlefield 2042 recently had an XP glitch where you could go into a server with BF3 settings, throw ammo to a teammate and get XP for the resupply. Naturally there were several servers dedicated to this with 128/128 players and everyone on one team all standing at one objective.

Rather than actually play the game to level up and get the weapons/gadgets I wanted or even play this accelerated XP mini game, I wrote an ahk script to automate the equipping and dropping of the ammo crate so that I could do other things.

I only had to let it run for a few hours before I was max level, and the 10 minutes of scripting gave me the benefit for something I wouldn’t otherwise subject myself to.

comment 3y ago · link · parent

Can you expand on “from a specific moment till done” and possibly provide an example? What’s the exit condition? Time? A ui change? Seems like you could write a do_macro function and bind a key to loop it till “done” but I may be misunderstanding

comment 3y ago · link · parent

Good to know. Thanks for taking the time to share your insight

comment 3y ago · link · parent

Any recommendations for a under desk treadmill? I’m purchasing a standing desk soon and this seems like a great addition

comment 3y ago · link · parent

Any source for this? I’ve never heard of this and am curious to learn more.

comment 3y ago · link · parent

I owe you for indulging in your recommendation - thanks! The lecture quality is unrivaled when held up to the YouTube tutorials of today.

For anyone else considering investing the time: I am extremely satisfied with the 2 hours it took to learn + practice the basics. As far as high-yield learning investments go, I’d already put awk up there with my time spent learning Vim and Git.

comment 3y ago · link · parent

Any recommendations for one from OP or anyone else with one they’re pleased by?

comment 3y ago · link · parent

Gotcha, thanks for the insight. Quick background on LSP: I believe vscode either created or popularized accessible LSP integration for other editors. Not sure which it is though

comment 3y ago · link · parent

What makes you prefer GoLand over another editor with LSP integration? I don’t write much Go but I’m curious if it provides other features for when I inevitably learn it

comment 4y ago · link · parent

That’s why I use a Jira board for my life goals /s

comment 4y ago · link · parent

This was the first thing this post made me think of. You blew my mind with this back when I was a kid in school. Extremely memorable. Glad to see I’m in good company in this thread.

comment 4y ago · link · parent

Thanks. So what does it mean for a program to be memory safe if it can still memory leak? An example or pointing to a resource for further reading would be much appreciated.

comment 4y ago · link · parent

I have only dabbled in Rust and have no experience with C++/Java/Go. Can you help me understand how those languages would be more memory safe than Rust? My understanding was that safe code was a solution to memory leaks. What’s the benefit to safe rust code if it isn’t getting rid of memory leaks?

comment 4y ago · link · parent

Thanks for taking the time to write that up–I appreciate the explanation.

My only adjacent knowledge here was when I checked the V8 implementation of the `sort` method on the array prototype and saw it changes the sorting algorithm used based on array length (IIRC insertion sort for length < 10 and merge sort otherwise).

Thanks for the V8 resource as well.

comment 4y ago · link · parent

Would you mind elaborating on js arrays intelligently changing their internal structure based on use? My background is only JS/Python and have never touched C++ so I don’t have the context of how these differ.

28.

Ask HN: Is a single source of truth not just a single point of failure?

27 points · by LecroJS · 4y ago · 14 comments

comment 4y ago · link · parent

Yes! This would be great

comment 4y ago · link · parent

Had the exact same thought, but after reading another comment it could make sense assuming it’s a 3rd party service integrated with tiktok
123