HNHacker News
TopNewBestAskShowJobs

ianjsikes

53 karma · joined June 3, 2016

[ my public key: https://keybase.io/ianjsikes; my proof: https://keybase.io/ianjsikes/sigs/ObcZuAQRk5abcuaeScuTGSN9b3GCFa9_A1_pkSOtN1o ]
submissionscomments
ianjsikes··on Dura is a background process that watches your Git repositories
You can still use VS Code's diff if you have the GitHub Pull Requests extension: https://marketplace.visualstudio.com/items?itemName=GitHub.v...
ianjsikes··on Display-switch: Turn a $30 USB switch into a full-featured multi-monitor KVM
Barrier is almost perfect for my use, with one big flaw. It has no concept of individual displays. For most setups, it probably isn't a big deal. For me, I am back to a hardware KVM.
ianjsikes··on A Modern JavaScript Tutorial
The cheaty way is `let copy = JSON.parse(JSON.stringify(val))`. Doesn't work for functions or cyclic structures though.
ianjsikes··on AMD Zen 3 Ryzen Deep Dive Review
I'm in a similar situation and i'm going with a 5900x FWIW. The 5950 feels a little overkill, I don't expect to be fully taking advantage of the extra cores.
ianjsikes··on Android 11
Wow, the bubbles feature is really interesting. They standardized Facebook Messenger's chat bubbles (the best part of Messenger imo). Pretty awesome to be able to have chats from many different apps accessible in the bubbles.
ianjsikes··on A Superspreading Event: The Sturgis Motorcycle Rally and Covid-19 [pdf]
Actually it was pretty easy to find a paper on that exact subject by the same authors.

https://www.iza.org/publications/dp/13388/black-lives-matter...

> "we find no evidence that urban protests reignited COVID-19 case growth during the more than three weeks following protest onset. We conclude that predictions of broad negative public health consequences of Black Lives Matter protests were far too narrowly conceived."

ianjsikes··on Bye, Amazon
And yet wage theft (by employers) seems to be the largest form of theft in the US by far. Is it really a wonder that people would steal / slack off when they are so consistently getting screwed at their workplace?

https://www.nelp.org/wp-content/uploads/2015/03/BrokenLawsRe...

https://www.deseret.com/2014/6/24/20543670/wage-theft-how-em...

ianjsikes··on How to play board games online with your friends
I am working on a little clone of One Night Ultimate Werewolf using Phoenix LiveView. It has been working out great for me so far.
ianjsikes··on Show HN: Build your own Vim emulation for VS Code
That would be really interesting to me. I have been eyeing Kakoune for a while and love the idea but I'm too invested into VS Code to completely switch editors.
ianjsikes··on Magic Mushrooms Can Help Smokers Kick the Habit
Are you... comparing psilocybin to heroin?
ianjsikes··on Why ['1', '7', '11'].map(parseInt) returns [1, NaN, 3] in JavaScript
> Seems intuitive that if parseInt allows omitting the radix parameter, that it should default to whatever radix a standard integer primitive would default to.

But in this case, the radix is _not_ omitted. The map function passes the index of the current iteration as the second parameter to the function it is passed. It is kinda like this: ``` ['1','7','11'].map((item, index) => parseInt(item, index))

ianjsikes··on JLua: Yet another Lua implementation in JavaScript
1. The "index.js" thing is due to how module resolution is handled with CommonJS and ES modules. If you have a file at "./lib/index.js", then you can omit the "index.js" and just write "require('./lib')" from another file.

2. Not exactly. In JS, every file with an "import" or "export" statement somewhere is its own module.

3. You can write code like this for the browser. Most browsers support ES modules now. However, you do need a bundler tool like Webpack if your code depends on other node modules.

ianjsikes··on Ask HN: How are you building cross-platform (mobile and browser) apps?
Just wanted to mention that React Native + React Native Web _is_ a viable solution (at least for me it was). I was able to convert a mobile React Native project into a usable mobile website with Next.js and `react-native-web`.

I had to use a lot of platform-specific imports (eg: `index.ios.tsx`/`index.web.tsx`) to replace anything mobile-specific, and there are some cases where you need platform-specific UI components as well to make everything look nice on larger screens.

My only complaint is it gets a bit messy having all these different entry points and platform-specific modules and whatnot. Overall, it's probably the best you can hope for to write an app for mobile + web with ~80-90% _actual_ code sharing.

ianjsikes··on Content-aware image resize library
Better yet, scale the image proportionally down to the largest of the two target sides, then run the algorithm once in the direction that needs to shrink.
ianjsikes··on Bundle Phobia: find the cost of adding an npm package to your bundle
Here's a great VS Code extension that shows package size inline next to your import/require statements:

https://marketplace.visualstudio.com/items?itemName=wix.vsco...

ianjsikes··on How we run NPM packages in the browser
What's so funny? Yarn uses the npm package registry, so it is a package manager for npm.
ianjsikes··on Get Started with Rust, WebAssembly, and Webpack
That is a great idea. I expect more usability improvements to come shortly as more people become interested in WebAssembly.
ianjsikes··on Get Started with Rust, WebAssembly, and Webpack
Author here. It is my cursory understanding that the Emscripten SDK handles converting types to and from Javascript values and C-like data in the module's virtual memory. I'm not totally sure how that conversion is happening yet. I can tell you that when I pass a string when it expects an i32, it treats it as 0, so `add("foo", "bar") -> 0`
ianjsikes··on Get Started with Rust, WebAssembly, and Webpack
Hi, author here. Thanks for the tip, I wasn't aware compiling with Emscripten would work on stable. That should simplify the process. I'll do some more research and update the guide.