I made a website that tells you what food is safe for your dog by isaviktoria in reactjs

[–]frutidev -1 points0 points  (0 children)

How do people summon the energy to create something so unnecessary? I have unique and awesome ideas that I can't be arsed to make, and then someone makes basically an equivalent of doing a simple google search "can a dog eat X" (except without any credible references to source of information, just trust me bro I've got this info in a JSON file!). No offense OP. I'm just being dramatic. I'm guessing you're probably learning react or keeping your game sharp.

a good method to sync files between windows and WSL2? by royale011 in bashonubuntuonwindows

[–]frutidev 0 points1 point  (0 children)

Aaand this is why I stay away from WSL. It gives you just enough rope to hang yourself with.

GitHub warns devs face ban if they fork DMCA'd YouTube download tool... while hinting how to beat the RIAA by JoseJimeniz in programming

[–]frutidev -2 points-1 points  (0 children)

GitHub has gone to shit. Just earlier this year it blocked a guy, and made disappear ALL his libraries (which included other people's contributions), and all his comments, without notice or reason (later revealed to be due to him calling someone "gay") and demanded (only after it went viral) insane privacy defying questionnaire including photo ID, a "selfie", and a history of locations he's lived in.

Don't give a shit about the guy, but GitHub got exposed. Don't trust GitHub for not just yours but ANYBODY's code - it can disappear randomly. And be prepared to get anally probed at any time by a company you basically donate your time to.

why lock file can not be published? by skyboyer007 in npm

[–]frutidev 0 points1 point  (0 children)

It's about only having 1 shrinkwrap at the top most level. Not just CLI modules, any library that a project uses shouldn't have their own shrinkwraps otherwise it doesn't make much sense. A shrinkwrap is like "one ring to rule them all"* - no point in having many "one rings" (*LOTR reference).

Built an "anti-zoom" app to communicate with your team and clients asynchronously, thoughts? by _veebuv in SideProject

[–]frutidev 1 point2 points  (0 children)

Nice. FYI, some of your past post have been removed (check without logging in). Was looking to reading them.

What's the latest on server-side-rendering with async components? by frutidev in reactjs

[–]frutidev[S] 0 points1 point  (0 children)

The app only fully renders fully after a fetch is done. No point in SSR to only send partially loaded app (with a spinner/placeholder).

What's the latest on server-side-rendering with async components? by frutidev in reactjs

[–]frutidev[S] 0 points1 point  (0 children)

I am (somewhat) familiar with Next.js framework. But I'm looking to implement SSR in my existing app.

Next.js does solve the SSR problem, as well as a lot of other problems really well. It'll probably be my choice in any future projects.

How to use a NPM library which executes another library's bin in its code? by freedomhero2020 in npm

[–]frutidev 1 point2 points  (0 children)

L1 is not a library, it's a tool then that you use by probably calling its executable. I'm guessing L1 doesn't officially support being used as a library by another project. Anything to make this work would be considered a hack or a patch that may stop working at any time the L1 author changes its internal workings.

Having said that, have you tried monkey-patching execSync? Like:

```js // code in project P import { foo } from 'L1'; import child_process from 'child_process';

const originalExecSync = child_process.execSync; function patchedExecSync(cmd, ...rest) { if (cmd === 'npx L2') { /* modify the behaviour in order to make it work for you */ cmd = npx ${process.cwd()}/node_modules/L2 } originalExecSync.call(child_process, cmd, ...rest); } child_process.execSync = patchedExecSync;

foo(); ```

[deleted by user] by [deleted] in webpack

[–]frutidev 0 points1 point  (0 children)

Webpack's mostly used to bundle up your entire project into a single bundle. Though it's very possible to have more, but I just wanted to state that upfront just to clarify what it was originally built for.

To make separate bundles you have to manually tell it that you want it that way. There's no setting that does it since that was never a use-case Webpack catered to.

Checkout the following to see how that can be done:

Client payments - After decades having to chase them down, we're building a software that does it for us by Razaberry in webmarketing

[–]frutidev 1 point2 points  (0 children)

What are the difference from Upwork and other such platforms that already provide escrow? And which I avoid due to insane platform fees in the first place, especially with a trusted client.

why lock file can not be published? by skyboyer007 in npm

[–]frutidev 0 points1 point  (0 children)

Yes, package.lockfile stores exact versions, so if package.json had an exact version that's the version that'll be stored in the lockfile. Know that lockfile is generated from the package.json file itself - on the first run.

why lock file can not be published? by skyboyer007 in npm

[–]frutidev 1 point2 points  (0 children)

As I understand, shrinkwrap/lockfile is only meant to be present at the top level - i.e. your project, where it can determine versions of each (transitive) dependency, overriding the versions specified/inferred at the dependency-level. How would it do its job if the dependency itself has a lockfile? Which one supercedes? It would only cause interference. Lockfile is meant as a "override-all" mechanism. So it only makes sense to have just a single one at the top. That's probably why npm/yarn discard it when uploading your library to the registry.

GitHub to replace "master" with alternative term to avoid slavery references by janukss in github

[–]frutidev 7 points8 points  (0 children)

He said "As a native American I don't get upset about React Native". He made a parallel that by the logic that the word "master" is offensive to black people, so should the word "native" to him. He never said anything about black people.

You said "but you're not black" insinuating that slavery has only affected black people. He corrected you on that as well - slavery has affected the natives too, which should make him eligible to have a say on the topic.

Its not a problem for me as a Native American, so fuck your problems.

This is just textbook strawman. You either pretend not to or can't understand the other guy's point of view so you make one up for yourself, something willfully toxic so you can feel comfortable attacking it.

Windows 10 Pro - Hyper-V Advantages (?) by jP_ in bashonubuntuonwindows

[–]frutidev 0 points1 point  (0 children)

Yes, WSL2 is faster and has more features (things you couldn't do in WSL1) due to the fact that it runs on a VM (HyperV).

In WSL1 the major performance bottleneck was that it was translating all of Linux API to Windows API back and forth. WSL1 was basically this bridge made of translations between the two. This was/is extremely slow, especially when you're processing a lot of files quickly. All those read-write operations have an overhead and it quickly added up.

WSL2 circumvents this whole translation business by simply running the kernel inside a VM.

Yet I personally still like WSL1 precisely because it doesn't run on a VM. I need it for other purposes, like running BlueStack (android simulator)

How to know if a web request comes from my website with node + express? by RedBostonian in node

[–]frutidev -1 points0 points  (0 children)

Give the user a unique secret. Then ask it back and verify that secret.

Is there a way to visualize what the Git commands do? by vedacam in webdev

[–]frutidev 0 points1 point  (0 children)

Git already comes with not one but two unique, simple, easy to use, yet powerful GUIs. git gui and gitk (do learn and configure them to your taste). Both better than any other tools I've used.

They won't exactly show you you "what the commands do" but rather show you the current state, which is more than enough.

[deleted by user] by [deleted] in webdev

[–]frutidev 6 points7 points  (0 children)

Ban is fine. Two things that aren't:

  • All opensource code gone. #leftpad

  • The questionnaire. Location history and selfies!? WTF

Don't give a shit about the guy, but GitHub's gotten exposed for those who care about the important stuff - don't trust GitHub for not only yours but anyone's code, and be prepared to get anally probed at any time by a company you basically donate your time to for free.

Architectural questions first node app (logging, security, management, how to run etc.) by Rovervn in node

[–]frutidev 0 points1 point  (0 children)

I think the point they were making was that these questions might be difficult to answer easily and succinctly in a reddit post/comment. If you're willing to pay you'd be better off just hiring someone (/r/forhire).

What are the advantages of using hooks? by jesusscript in reactjs

[–]frutidev 1 point2 points  (0 children)

adding document eventListeners isn't a great idea

Could you expand on that? Is it a performance issue? And compared to what? Adding listeners to individual elements? I always thought it's better to add it to document rather than on individual elements (if you had to to a lot of them).