Better HN
topnewbestaskshowjobs
Log inSign up

never_inline

897 karma · joined Aug 26, 2022 (4y ago) · 561 submissions

Submissions

comment 1y ago · link · parent

Doesn't include:component still require all your shell script to be written inside YAML? or is there a way to move the logic to a, for instance, .sh file and call it from YAML?

comment 1y ago · link · parent

I'd say write a Python CLI (or any language you're comfortable with) which does all the actions (setup, deploy), download it and use it in the CI (or install on the runner images if you control them). That way you can use same workflow (command) in local development and CI.

There is a gitlab CI feature `include`, but you pretty much have to write shell scripts inside YAML, losing on whole developer experience (shellcheck etc..). I would recommend this way only if you can't factor your code into a CLI in proper language.

comment 1y ago · link · parent

Python with click and PyYAML can go a long way - then you can build it as a CLI application and use the same from CI. In a java shop, picocli + graalvm probably. I wouldn't like Go for this purpose (against the conventional wisdom - because boilerplate and pretty bad debugging capabilities).

That said, if you absolutely need to use shell script for reasons, keep it all in single script, define logging functions including debug logs, rigorously check every constraint and variable, use shellcheck, factor the code well into functions - I should sometimes write a blog post about it.

334.

Jumping to VSCode Debugger from IPython(mahesh-hegde.github.io ↗)

2 points · by never_inline · 1y ago · discuss

comment 1y ago · link · parent

Many people here install ublock for elders and / or children and leave it. Now they might become target of ads that download malware.

comment 1y ago · link · parent

Hyperbolic space indeed.

comment 1y ago · link · parent

This is definitely AI, repetitive and reads in style of a marketing copy / sensational report.

comment 1y ago · link · parent

You can do that in every ORM including the infamous hibernate.

comment 1y ago · link · parent

The question is about systems programming.

comment 1y ago · link · parent

I use the following commands frequently

* pull

* push

* checkout / switch

* commit (ofcourse)

* merge

But I will end up needing

* log / log --stat

* stash

* diff

* show / show --stat

* blame

* revert

* cherry-pick

* reset

* git grep (can be replaced with rg / grep -rn)

I can't imagine not having these commands now.

If you use something frequently you should know it in-depth. It applies to tools (git, VSCode), frameworks (Spring, Django, whatever), infra (kubernetes, docker). otherwise you're missing out.

comment 1y ago · link · parent

Most graduates in this country needs to be trained from scratch for any serious programming work, due to how horrible the education system is. So it's not worth for the startups.

comment 1y ago · link · parent

I concur, I have seen videos of "Honda Unicorn 160 2025" motorcycle models which looked too much like high-end cruiser motorcycles then realized it was AI generated.

comment 1y ago · link · parent

> So is calling abort(). (Which is the Unix way to do what you described.

But in gui applications and servers, you will need to catch and report the error in some intermediate boundary, not exit the application. That's where go falls short.

comment 1y ago · link · parent

> heavyweight ecosystem

Try micronaut once. It does DI and even ORM mapping (with micronaut data jdbc) at compile time and avoids most reflection.

comment 1y ago · link · parent

Can someone dumb it down for me how the new runtime.AddCleanup is different from much-disliked finalizers in java?

comment 1y ago · link · parent

Core kubernetes (deployments, services etc..) is fairly easy to understand. lot of other stuff in the cncf ecosystem is immature. I don't think most people need to use all the operators, admission controllers, otel, service mesh though.

If you're running one team with all services trusting each other, you don't have problems solved by these things. Whenever you introduce a CNCF component outside core kubernetes, invest time in understanding it and why it does what it does. Nothing is "deploy and forget" and will need to be regularly checked and upgraded, and when issues come up you need some architecture-level of the component to troubleshoot because so many moving parts are there.

So if I can get away writing my own cronjob in 1000 lines rather than installing something from GitHub with a helm chart, I will go with the former option.

(Helm is crap though, but you often won't have much choice).

comment 1y ago · link · parent

Sadly these days when I see .dev domain I will think some SaaS company spam, that's the first thing that comes to my mind.

comment 1y ago · link · parent

Usually the idiom is using the same variable on LHS.

``` a = append(a, elem) ```

If you assign it to anything else, `a` might still remain with the older slice memory which will cause worse problems than equality comparison.

So the kind of code you wrote is hardly ever written in production.

The advantage of having this is avoiding one more heap allocation for slice, which is a good tradeoff if you ask me.

comment 1y ago · link · parent

I thought this was related to compilers, probably ocaml lisp or something.

comment 1y ago · link · parent

I'd please ask people to don't write operators unless absolutely necessary.

I used a certain tool which had its own config format, and it's "cloudnative" operator implemented CRDs of which multiple can exist and they would update the config file in some mounted volume. Such thing is a hell to debug. Why can't we just store the config file in configmap/ secret and listen to changes?

(If we had a better templating solution than helm, I think quite a few operators wouldn't need to exist.)

comment 1y ago · link · parent

This may be related to accessing the page on a vpn or company network

comment 1y ago · link · parent

This summary told me nothing I didn't expect. I'd rather let it summarise something concrete.

comment 1y ago · link · parent

Fennec is still maintained?

Also KDE connect can be alternative to sending files if you use linux on desktop.

comment 1y ago · link · parent

If you have a local development setup, few hours of not being able to push should be a not problem most devs.

Except if you have a release planned but most don't at that time, statistically.

Problem is that people get comfortable with pushing to branch -> deploying in dev and testing from there.

comment 1y ago · link · parent

> non consensual computation

Gonna steal this one.

comment 1y ago · link · parent

> knowledge
1
111213
19