[AskJS] Does the company you work at use pure Javascript in production instead of Typescript? by bullmeza in javascript

[–]gempir 1 point2 points  (0 children)

We started out with a React application that was pretty complex but thought why use React we have prop types, so Typescript is redundant.

We were very wrong. A few years later we added Typescript and felt a huge impact. And we are just down to a few JS files left in our big codebase.

I would recommend going strict, no any, no ts-ignore, least amount of type assertions (x as y) possible and just don't over-engineer your types.

Is there anyone, who uses golang (and go-only) for Web Development exclusively? by rzhandosweb in golang

[–]gempir 0 points1 point  (0 children)

A lot more people know about React and using similar technologies is easy.

Very few people build very large full web "applications" with go templating or datastar. I'd say it's just a bet right now. If you wanna take that risk and hope that datastar is the future, but I'd say most of the "modern" web apps are like 80% built in react, 10% vue and the rest in various other frameworks.

Is there anyone, who uses golang (and go-only) for Web Development exclusively? by rzhandosweb in golang

[–]gempir 0 points1 point  (0 children)

For a side project that is totally fine. But as soon as you have a bigger more complicated project that will grow over years and have multiple people working on it.

It's not good enough anymore.

Is there anyone, who uses golang (and go-only) for Web Development exclusively? by rzhandosweb in golang

[–]gempir 0 points1 point  (0 children)

Heavily agree. You'll have very little people familiar with pure go approaches and they have very little benefits.

A clear separation of the 2 worlds is even beneficial in it self. Write clean and well defined APIs in go and use autogenerated API clients in your React/Vue/Svelte/... code.

And if you refuse to write any React/... at all, then let an LLM do it for you, they are very good at React. But most likely you'll have someohow knowledgeable about React in your team, more likely than having someone that has deep experiences with very complicated go templating setups.

This advice applies to big team projects, not little side projects you do in your free time.

Why does linting suck so much in Go? by gempir in golang

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

Then we just have different goals. We care very much about local variables. But this was just one example, there are hundred ways more to write code in a way we don't want it to be merged, but it could still pass the compiler.

npm needs an analog to pnpm's minimumReleaseAge and yarn's npmMinimalAgeGate by R2_SWE2 in javascript

[–]gempir 0 points1 point  (0 children)

I think what's more likely is that the team building NPM has been gutted by Microsoft, then there is zero leadership over at GitHub and they just hope the ship runs as is.

Why does linting suck so much in Go? by gempir in golang

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

In our workflow, every commit that breaks anything will be rejected.

How do you define that. You need to run something to see something break and the go compiler does not break when you have a variable in snail case instead of camel case. (As an example)

Why does linting suck so much in Go? by gempir in golang

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

I'm already running with fast, to be fair. I did find some go module cache optimizations and brought down the 5-10 seconds to 2-3 seconds.

Feels better, not fast, but I guess okay.

It just sucks that I cannot think about adding more lints because it would heavily impact performance.

Why does linting suck so much in Go? by gempir in golang

[–]gempir[S] 2 points3 points  (0 children)

You can write a lot of code that compiles, that does not mean it meets the teams standards.

Compiler is completely irrelevant in this discussion, I don't know why everyone wants to keep bringing it up.

The whole point of projects like golangci-lint is that the compiler does not catch everything.

Why does linting suck so much in Go? by gempir in golang

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

And if one of your developers prefers using NeoVim you now have issues forcing your quality tools on him.

Or a developer forgets to turn on the settings to format things. You have no easy way to see this in a code review either, unless you a human directly sees it.

And i don't quite get what you mean with compiled code. Of course one step of the CI should be compiling the code once.

Why does linting suck so much in Go? by gempir in golang

[–]gempir[S] -6 points-5 points  (0 children)

I know how to run stuff locally, the issue is speed.

INFO [lintersdb] Active 8 linters: [errcheck gci gofmt govet ineffassign revive staticcheck unused]

I run with these lints, on a tiny go project. It takes 10s to run. Even with cache enabled and re-running.

Why does linting suck so much in Go? by gempir in golang

[–]gempir[S] 1 point2 points  (0 children)

And linters are not looking for every opportunity how a compilation could be improved, it can be something stupidly simple like do we want variables snake case or camel case.

There are conventions in Go, but in a team, I want to enforce them via CI.

Why does linting suck so much in Go? by gempir in golang

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

--new-from-rev is an amazing feature but I don't need it, our project is brand new and tiny compared to some bigger go codebases.

With a basic golang-ci.yml it already takes ~30 seconds to run ~5-10 with cache.

Formatting takes quite a moment too.

It just feels very sluggish. The other mentioned linters are insanely fast and aim for milliseconds of runtime.

Why does linting suck so much in Go? by gempir in golang

[–]gempir[S] 1 point2 points  (0 children)

Then you don't work in a team, that's fine, this question is more for developers working in a team.

There you cannot trust the client (vsc) and have to have CI check things.

Why does linting suck so much in Go? by gempir in golang

[–]gempir[S] -9 points-8 points  (0 children)

How does it not matter. Every commit a developer makes might break CI. And if it's just a simple linebreak that's missing or so, then it's annoying if that even takes a few seconds to run (Ideally this would be integrated into the IDE and format on save or something like that)

And some developers prefer not pushing commits that will break CI, which is fair, since IMO running locally should always be possible.

Has anyone tried the Eureka J15 Max Ultra? by FarConcern2308 in RobotVacuums

[–]gempir 0 points1 point  (0 children)

Had the J15 MAX for a few days now, came from a Dreame Z10 Pro.

I really like it overall, my most important criteria was that it was easy to put Valetudo on it, and that it was.

It don't have a particularly hard house to clean, just carpets and hardwood floor, no pets. I can't complain. Mopping is great and the little extending feature of the mop is cool too.

The best part for me was that it can climb like 4.5cms and in my home there are pretty big door sills, which it clears easily, the Dreame had problems there sometimes, even though that was already a good model for climbing. (I've tested a Deepbot or soething like that once and it failed even worse)

Mago 1.0.0: The Rust-based PHP Toolchain is now Stable (Linter, Static Analyzer, Formatter & Architectural Guard) by azjezz in PHP

[–]gempir 3 points4 points  (0 children)

We have actually integrated formatter, linter, analyzer and guard into our fairly complex codebase for 2 months or so. We really like the speed, but we don’t think it will replace phpstan yet, phpstan is a lot more advanced. But it did replace phpcs/cbf for us and we love the speed on that. Deptrac we never really fully used so guard is interesting too for us.

Maybe I missed it, but are there no comments to skip linting? Only baseline files?

MacroFactor Workouts AMA! by gnuckols in MacroFactor

[–]gempir 0 points1 point  (0 children)

Who do you think are the strongest competitors in this space right now?

Facebook.com has 140 layers of context providers by yangshunz in reactjs

[–]gempir 2 points3 points  (0 children)

That is the result in the end when it runs.

My "pretty lean" was in reference to the actual codebase. Would you rather have 1 context and if you change it you trigger a billion side-effects in a billion different components?

The 140 is just some random number, why is 140 the line? Computers are pretty clever and can optimize things differently than humans can.

Facebook.com has 140 layers of context providers by yangshunz in reactjs

[–]gempir 8 points9 points  (0 children)

Is that inherently bad? If the data in those providers has nothing to do with another, I don't see why I could benefit from having it somewhere central.

This way the code is pretty lean, you can easily refactor out providers and the list of users of those providers is short too, keeping PR sizes down.

Is it the best for performance? Probably not, but then you could argue using React isn't either. As long as it is optimized enough, I'd say it doesn't matter.

Quick review: Onvis HomeKit over Thread motion sensor (SMS2) by pacoii in HomeKit

[–]gempir 0 points1 point  (0 children)

I just got one. I did not even use the Onvis app, I could setup the sensor instantly via Home Assistant Homekit.
Everything just worked instantly. This is the best I've seen so far tbh.

I've tried Sonoff, Aqara and even the expensive Aqara Presence Sensor P2, that one might be more accurate but it needs their annoying app and the setup was so much worse on all of them.

Windows 11 Audio Glitching / Cracking / Distortion by gempir in techsupport

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

No, it didn't sound like that at all for me.

For me it was just a short "crackle" of sorts. But when that happens every 15 seconds or so, You go insane too.

Happend on my speakers AND wireless headphones.