Better HN
topnewbestaskshowjobs
Log inSign up

LecroJS

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

Submissions

comment 4y ago · link · parent

A valid concern. My experience is that by now, most apps/projects have support for m1 Mac’s out of the box. For the minority that don’t, I always find a solution that fits nicely in the first gist shown by google. I honestly don’t even consider it to be an inconvenience when I hold it up next to my experience with wsl. Not to mention that the support for new Mac architecture will only continue to improve + be a priority given the market share.

Don’t forget that even if you somehow run out of avenues for support on a mac, you can always dual boot linux on it. You could probably even bootcamp a mac to run windows and then run wsl inside it (I’m kidding but you get the point).

comment 4y ago · link · parent

I bounce between WSL2 running on windows 10 and an M1 mbpro max.

TL;DR is buy an M1/M2 Mac if you want to buy a laptop. I like both setups, but only because I’m done jumping through most of the wsl hoops.

If you go with windows, be sure to use Windows Terminal as all other terminals I’ve used (haven’t tried hyper) suffer performance-wise with wsl.

The biggest issue with wsl is easily the memory usage. No one seems to talk about this part of wsl, but if you use vscode, you’ll quickly fill up 16gb of ram while also doing things like running discord/slack + a dozen chrome tabs. I’ve since transitioned to (neo)vim and the experience is much better RAM-wise. Bare minimum for any windows computer running wsl is 32gb imo, especially if you’re using any amount of docker like that other comment mentioned. I ended up having to write a cronjob to manually clean up terminated containers still hogging memory periodically.

This brings me to another downside of wsl: just by having wsl on, it will take about 2gb minimum in my experience. This is unfortunate, as the only way to run the cron server in wsl on windows startup is to have windows task manager turn it on at startup, essentially forever hogging a minimum amount of ram on your machine. I play lots of games on my windows machine and it feels very clunky to have to always open power shell and run `wsl —shutdown` before I can play games. An unfortunate tradeoff between the wsl cron server, and anything else you’d ever like to do that requires significant memory.

Personally I think any sort of Mac desktop is silly (just get a powerful m1/m2 and external display(s), although be careful of the new m2 which only supports 1 external display iirc) and after using both of these machines/dev environments extensively, I can say that if I had to do it again I’d just go with a Mac laptop. If you have the funds I strongly recommend doing the same. However, if you’d like a pc for anything windows specific (like most games), wsl is a fine choice so long as you get an appropriate amount of ram and don’t mind the extra time/energy required for debugging some wsl specific issues. Most wsl issues are one time things that don’t take too long, but it definitely takes some getting used to.

Also worth noting that something I’ve found to be annoying about wsl is that there’s so few resources online for debugging issues when compared to the mac ecosystem. Not only that, but if you change your distro from the default Ubuntu in wsl, the set of people running into similar issues will be even smaller.

To add to my ramblings, I had issues setting up an xserver for a wsl gui and eventually just gave up.

One of the new Mac’s will just work out of the box.

Hope this helps you make your decision.

comment 4y ago · link · parent

Oops you’re absolutely right. I always thought this was one of the drawbacks of private institutions. Thanks for the info/correction

comment 4y ago · link · parent

Biden’s student loan forgiveness only applies to federal loans. Private student loans (at a liberal arts institution like Oberlin) are not eligible

comment 4y ago · link · parent

How do these archive links work exactly? I always see them getting around paywalls but don’t really know the specifics

36.

Ask HN: Should I clone/use my dotfiles repo at my new job?

1 points · by LecroJS · 4y ago · 1 comment

comment 4y ago · link · parent

I use their family plan and set up everyone (max 5 people) in mine with it and they love it. None of us knew what we were missing until we tried it

comment 4y ago · link · parent

I was in high school there during this time and every day was a new tale of who ran into her before school/during lunch. Many people would check with friends in earlier lunch periods to get the word on where she was for the day so that they could pick a place for lunch on a different street.

comment 4y ago · link · parent

Newbie OO q: What’s the benefit/use case of sealing or making an object final? My experience is in javascript so I wonder why I’d ever need something like Object.seal or Object.freeze. Is it really that difficult to maintain object instances that do not change after some point?

comment 4y ago · link · parent

Ah gotcha that makes sense and would definitely be nice

comment 4y ago · link · parent

Why not just write an extension that does this yourself if you’ve wanted it for 5 years? Not trying to be snarky, but running `code -n TAB_NAME` after dragging a tab with some modifier held doesn’t seem like it’d be all too tricky. I semi-recently switched from vscode to vim when I started thinking of making extensions though so forgive me if this is outside the capabilities of vscode extensions.

comment 4y ago · link · parent

I would also like to hear people’s thoughts on this. Considering pulling the trigger on this tomorrow morning or just getting an M1 Pro/Max

comment 4y ago · link · parent

Thanks! Interesting to hear from someone who started with Go and transitioned to TS

comment 4y ago · link · parent

Yeaaaa hearing c called high level makes me wonder what word would even describe the js/ts/Python I’m familiar with…

comment 4y ago · link · parent

This from the guy who divides himself by zero

comment 4y ago · link · parent

Code complete has been on my list for a while and this definitely bumps it up that list! I like your recommendation about finding a book on subject area in particular. Thanks!

comment 4y ago · link · parent

Hey thanks for the reply. This was really insightful and I really appreciate you taking the time! The most helpful part was definitely where you tell me I’ll never be a good dev because I ask questions I don’t already have the answer to :)

comment 4y ago · link · parent

Thanks for the additional info! Very helpful and I appreciate it greatly.

comment 4y ago · link · parent

Thanks! This helps and gives some great perspective. Given your thoughts on this, would you recommend I start with Go and transition to Rust, or dive right into Rust with the goal of looking back on Go and seeing the difference after 6+ months of Rust?

comment 4y ago · link · parent

Wow, I can’t believe I’m seeing you in these comments! I was so inspired when I first saw Recut, and I’ve been using your interview questions for inspiration in my own interviews recently. My plan as soon as I get my next day job has been to sit down and start making products with the hope of launching on product hunt and the like to start earning money on the side. This post was mainly shopping for input on long-term conceptual growth, so it’s really nice to get this bonus anecdote on Rust in production from you.

I definitely would wait to fully invest my time in it until I have my next job given this + the other replies. I am curious if you did any research on Go or other languages for Recut and why you ended up choosing Rust. Would you make the same decision again? Was it worth the time it took to learn Rust for both product/personal purposes, or would you go with something easier if you had to do it again?

Recut was especially interesting to me since I’ve had a real time video chat based app on my mind for almost 2 years now and have known js just won’t cut it. Seems like quite the indicator that I should invest in Rust.

Thanks for your reply. Means a lot getting feedback from you down here in the HN trenches!

comment 4y ago · link · parent

These give me some good context to go off of. Are there any resources you’d recommend on an intro to garbage collection for devs without the low level cs background? I’ll read a textbook if I have to, I just don’t know where to start with that sort of thing in terms of biting off comprehend-able amounts of info

comment 4y ago · link · parent

Thanks this is what I was looking for! Pointers are one of those things I’ve heard about for years but don’t know too much about. I know that in js objects are passed by copies of a reference to that object in memory. I have never felt that there was something missing here — only that it requires an understanding of which types in js are passed by value vs reference. What is the upside to pointers in C? For instance in js I can pass an object to a function that modifies the object’s properties. The only thing I can’t do (I think) is pass an object to a function, and then reassign that object’s reference to a new object literal such that the original object reference now references the new object literal. Is this gap in a language like js where pointers come in, or am I missing the forest for the trees? If this is where pointers become useful/beneficial to be knowledgeable on, can they really be that useful? Full disclaimer that I don’t know anything about pointers aside from implementing data structures in js e.g. a linked list node has a `this.next` property, but in other languages this seems to be called/implemented as a pointer from what I’ve seen.

To sum my thoughts on this up: can you help me understand why pointers would be useful for me to invest in learning on the level of C versus continuing to let them be abstracted away/not present in my language? What would that knowledge do for me? Will I be a better problem solver etc. thanks again!

comment 4y ago · link · parent

Thanks, exactly what I was looking for!

comment 4y ago · link · parent

Thanks I appreciate the context and resources from someone with a similar background!

comment 4y ago · link · parent

Just replied to another comment recommending C. Can you help me understand which core principles C would help to refine i.e. what am I leaving on the table if I go with a Rust or C++?

comment 4y ago · link · parent

Had a feeling a reply like this was coming. Could you help me understand a bit more about why C would be a better place to start and how it’d lead to me growing my skills in core areas vs something like Rust or C++? I hear about C++ and can’t wrap my head around the benefits of going with something like C that has less features. I recognize I’m asking what will help me grow/learn and am saying, “why use this if x has more niceties?” but hopefully you can humor me. One thing I hear a lot is that Rust is the language for the next few decades, and while I’m sure C isn’t going anywhere, I’d be very curious to hear from someone with more experience about why C would be the way to go here. I’ll admit I’m intrigued as I used to have a professor in college who was a wizard and did everything in C — especially since a game I like from 2001 has an active modding community so long as you know C/ASM.

Explicitly: I’d be curious to know what the “cleaner strokes” are.

I also have never even heard of an FFI so thanks for starting my next research binge! I always thought two langs could interact once they’re both compiled to machine code, but I’m guessing i took that for granted and that C does that heavy lifting..

comment 4y ago · link · parent

Can you say a little about what it means that since Rust has provable ownership at runtime, there is no need for GC? I’m familiar with Rust ownership on the surface, but lack the knowledge to see how it eliminates the need for GC. Is it just Rust’s way of guaranteeing that a program is memory safe, or is there more to it?

comment 4y ago · link · parent

Very pragmatic perspective. I find this helpful in that it defines a line between getting things done vs investing in my own growth. Before reading this, my thoughts on Go were that it was a better way of “getting things done” than how I do it now in TS, but you’ve shifted my perspective to it being more of a middle path. I am perfectly able to get things done in TS and then could supplement that with Rust for growth purposes. Thanks for taking the time to reply Andrew!

comment 4y ago · link · parent

Adding for context: I don’t have a degree/background in CS. I majored in Math back in college and learned Python followed by a js bootcamp. I’m now years beyond that and have developed what I’d deem is enough of an understanding of CS fundamentals to the point that I can comfortably speak about/implement most things in the leetcode/technical interview space.

My college didn’t have cs and I definitely feel like I missed out on learning about some really interesting things and now have an understanding that can only go so deep across the stack.

Based on this, let me know if you think rust is the better choice, or if you have any other thoughts as to how might be good to spend my time e.g. maybe I’m just in the wrong space entirely and should be reading a book on Postgres… I love learning new stuff, but I sometimes find that I don’t invest my time in the wisest thing at a given moment. After thinking on the replies, I am now supplementing this post with a request for whatever you think would help someone like me

comment 4y ago · link · parent

This feels like something I needed to hear. Everything I do in life I try to maximize for long term gains, so this tells me that Rust is very likely for me even if it means I’ll make less flashy stuff at first. Also I am definitely interested in wasm and have been hearing about it for a long while but still admittedly can’t put my finger on what it’d really do for me. I generally find my front end performance to not be limited by js thanks to Cloudflare/web workers, but then again I haven’t done anything I’d consider truly heavyweight just yet. I’d be curious if you knew of any interesting rust/wasm use cases, or if you have any thoughts on where that space is headed and why it’d be good to invest in learning it. Thanks for the insightful reply :)
123