Hacker Newsnew | past | comments | ask | show | jobs | submit | mkdirp's commentslogin

Pretty sure it's because the core devs are RH employees, who owns Quay. Seems reasonable to keep things on your own infra.

Having said that, I know there has been some falling out between RH and Docker some time ago, which was one of the reason RH ended up creating Podman.


This is also part of how you could interrupt `time.Sleep`.

> In Go there is less noise, but also there no way to interrupt Go's time.Sleep.

The full piece would be something like:

    func sleepCtx(ctx context.Context, delay time.Duration) {
        select {
        case <-ctx.Done():
        case <-time.After(delay):
        }
    }

    func main() {
        fmt.Printf("%v\n", time.Now())
        ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
        defer cancel()
        sleepCtx(ctx, 1*time.Second)
        fmt.Printf("%v\n", time.Now())
    }
Runnable example on Go playground: https://go.dev/play/p/S5TY3CRmsYO


Yep this is a utility function in sure thousands have written, including myself. It's not in std which is weird but go had been a bit inconsistent since context was a big api change.

Fun fact: that func has a hidden bug, if one should be pedantic. Can you spot it?


> Fun fact: that func has a hidden bug, if one should be pedantic. Can you spot it?

Are you referring to the fact that the timer is still hanging around? Would this be the most-correct version?

    func sleepCtx(ctx context.Context, delay time.Duration) {
            t := time.NewTimer(delay)
            defer func() {
                    if !t.Stop() {
                            <-t.C
                    }
            }()
            select {
            case <-ctx.Done():
            case <-t.C:
            }
    }


[Weird, I remember already replying to this comment.]

Yes that's what I was thinking of :)

I'm a bit unsure what's the value in draining the channel (which is internal to this func), given that Go should garbage collect channel (and in this case perhaps even some escape analysis).

EDIT: Ah they aren't just closing the channel, but sending a time.Time. That makes sense, the timer wouldn't have anyone to send to if it's unbuffered.


As an aside, there's Refined Hacker News[0] which seems like it would be a great option for this to be built into. It has lots of great features while keeping things minimal.

[0] https://github.com/plibither8/refined-hacker-news


Thanks for extensions.

But I think there's no need to integrate its functionality to the site. This way one can choose how to customize the site without increasing complexity of the site itself.


Sorry! I meant to integrate the favicons into the extension, not to integrate the extension into the website :)


With inline reply HN would decrease the number of requests needed to make replies, so it sounds like a net gain.


Why not?

Podman has an almost identical CLI to Docker, and can have a daemon that is fully Docker compatible (thus, all Docker integrations work against it including docker-compose). It is literally a drop-in replacement but it doesn't require your company to buy licenses. So yes, you should if you can.


podman has had repeat compatibility issues for us, and redhat has made docker installation stupidly hard in rhel8 at the policy level, which matters given the monopoly status of rhel in secure environments. It is hard for me to support the podman community for basically ethical reasons at this point. Normally I like competition and innovation, but not like this.


This doesn't sound like an ethics issue unless you have other issues with Red Hat's behavior.


Strong disagree. See above.

IBM/RHEL seem to be the effective the stewards of Podman, and are using their monopoly-like position in enterprise OS segments to take control of the virtualization layer through it. This is similar but worse to old MS/Windows doing tricks for IE vs others. Supporting Podman is supporting explicitly anti-competitive IBM/RHEL OSS behavior for enterprise, utility, & gov environments.


This doesn't make any sense to me. How is stewardship over a method of running and managing containers that was originally born out of another project not collaborating with the commons (docker engine) enforcing a monopoly position?

Everything Red Hat produces is open source (except the branded offerings, which are derived from the OSS upstreams). They charge for support. If you don't want support, use the OSS upstreams. What lock-in are you explicitly pointing to? Because I have no idea what you mean by taking "control of the virtualization layer".

Also, I should note that Nutanix and VMWare are a thing but again I am unclear at what unethical behavior you are actually pointing to at Red Hat. I am only responding to a shaky interpretation of what I think you are pointing to.


Maybe you are not familiar with how enterprise , and especially utility and gov systems work? It is often hard to not use RHEL due to compliance policies. IBMers deciding to swap in their race horse -- and simultaneously hobbling the current one -- is effectively making the decision for the US Gov for the next 2 years.

Yeah sure OSS in theory and IBM is a free entity. But for the same freedom, I am free to call from for divesting from any use of IBM/RHEL products and consultants in enterprise and gov contracts as no longer a trusted and ethical partner due to their anti-competitive self-dealing at the clear expense of the community & customer. RHEL lost neutrality & HA credibility as an infra layer and IBM as a partner through this. Nothing personal, just business and trying to protect our users, same as the RHEL org's actions helping themselves.


Well I am deeply familiar with how enterprise gov systems work in Denmark but no I am not familiar with the US side.

Can you clarify what you mean by swapping their race horse? What is the horse being swapped?


Docker largely entered Enterprise (regulated & security conscious markets) like utilities, us gov, banks, etc. via rhel 7 / centos 7 . A lot of people doing a lot of compliance work everywhere, from approvals to infra to audits, invested serious time, $, and social capital to make that happen. With RHEL 8, IBM / RHEL bet on podman (or, "not docker"), all the way from marketing to M&A to repositories to where developer hours go. On its own, I think that's great: tech should keep pushing, and good pressure on docker for things like rootless. But, that's not the issue here.

Where this gets problematic for a commonly "single-sourced" infrastructure technology in regulated envs is IBM/RHEL also prevented docker from making it into the RHEL 8 repos. Podman was obviously technically deficient as a critical infra replacement due to immaturity like many unimplemented compatibility APIs, yet it was marketed as compatible and instead of offering both until the community could prove it out etc, RHEL8 didn't include docker. NBD for people doing redhat at home or whatever easy environments, but if you're doing something like bringing AI to important societal problems at big world-reaching orgs, having to go outside the main repos can be a major drain on time, staff, budget, and even an existential risk. This is the kind of BigCo malfeasance we're supposed to be moving away from by promoting Linux, OSS, and containers.


It's difficult to add docker's RPM repo and install it?


In secure airgapped environments, very much so. We blew time setting up new offline install processes & tutorials for the Nvidia docker ecosystem for rhel8, which basically reused centos7, as most of our users took weeks/months when they tried to figure out for themselves. Think utilities, gov, banks, etc: Anything not supported by official RHEL8 repos causes problems both technical and compliance.

RHEL8 felt like a repeat of IE vs Firefox but now for RHEL (main sponsor of Podman) vs Docker, and much worse. It's one thing if docker was never there or containers were removed, but this was replacing with a binary-incompatible tool under their effective control and marketing to security-critical customers (and on hackernews) as a safe and ready replacement. So we also burnt time diagnosising people were trying to use broken podman tech because that's all RHEL gave them and tricked them into thinking was appropriate.


Podman doesn’t have a daemon, it has a socket that will replicate the docker API. That comes with some limitations, especially around the lifecycle of containers in ie starting containers on boot, restarting unhealthy containers etc which require you to use systemd. Podman’s integration with systemd is pretty easy now though.


If you're running zsh, I suggest using powerlevel10k[0]. It is stupid fast, and extremely customisable.

[0] https://github.com/romkatv/powerlevel10k


P10k is one of those revelations that feels “next generation”. Trying to back to anything else is very painful for me, even things that are supposed to be “fast” like starship.


For p10k users, adding extra info to your prompt is really easy. Here's my epoch-seconds display:

    function prompt_epoch() {
      MYEPOCH=$(/bin/date +%s | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta')
      p10k segment -f 66 -t ${MYEPOCH}
    }
It looks like this in action:

https://i.imgur.com/0IT5zXi.png


In the spirit of p10k speed, you can perform that task without forks:

    $ zmodload -F zsh/datetime p:EPOCHSECONDS
    $ printf "%'d" $EPOCHSECONDS
    1,648,943,504


Do you know how to do that printf within a zsh variable? i.e. here:

    function prompt_epoch() {
      p10k segment -f 66 -t ${MYEPOCH} <-- replace MYEPOCH with EPOCHSECONDS but with commas?
    }
EDIT: printf can assign output to a variable using -v. Therefore my function can be rewritten as:

    function prompt_epoch() {
      printf -v COMMA_EPOCH "%'d" ${EPOCHSECONDS}
      p10k segment -f 66 -t ${COMMA_EPOCH}
    }


Nice, thank you!


Your imgur link isn't working for me. I'm getting an "oops we can't find the image".



I've been using Pure for a handful of years now. I just want pwd, git and vi status, and prompt on its own line, and it does it all. Available on both zsh and fish, I seem to remember a Powershell port as well, if that's your style.


I used to use Pure a couple of years ago. I found it had some weird bugs that were really annoying, not very reproducible and my shell knowledge was not nearly good enough to debug it. I think especially the async stuff was very error-prone. Maybe that’s changed now.

Powerlevel10k is very customisable, faster, can be configured to function exactly like Pure out of the box and in my experience, more reliable.

I would recommend powerlevel10k over Pure any day. But it’s just an anecdotal datapoint.


Yeah, maybe. I'm just really lazy.

Edit: Well that was easier than expected, their initial setup daemon is pretty well made, and the "instant prompt" is pretty cool. Feels snappy.


On a related note, there was an article/website that talked about how to design the ux of a cli tool properly. E.g. how to design the arguments among other things.

I've been struggling to find it again. Does anyone remember what the article/site was called?



Aah, thank you so much! Very helpful!



I used dracula for a while, but I just can't deal with it during the day. So I've been looking for a uniform light theme for day time coding. I hope nord theme can fill in the gaps there, but it looks like it's still early days for it.


I really like papercolor for a light theme: https://github.com/NLKNguyen/papercolor-theme


Used to use Dracula, got a little uncomfortable with it for the same reasons as the grandparent commenter, switched to Papercolor and love it, it's an Industrial Design based theme and in particular the background colour is not as dark as Dracula.


I came across the themer.dev the other day. It's comes close to this, but I struggled to get a theme to be consistent across apps. There are still some apps it doesn't support.


As in OPA determines if a user has access to a resource? Do you have some resources on how to do this?


You do need to have a strategy for how to load the resource mappings into the OPA engine. If they don't change very much you could embed them in the data.json file of the OPA policy itself. But more often than not, that data is changed often (e.g. when someone grants someone else access to a resource). In that case, you'll need the OPA engine to query an external data store via an HTTP request. Or you can use a resource cache, the way we do at Aserto.

Here's a blog post [0] about the challenges we faced when using OPA for application authorization.

[0] https://www.aserto.com/blog/the-challenges-of-using-opa-for-...


OPA has a whole policy language to define how people have access to resources however you please. See details here: https://www.openpolicyagent.org/docs/latest/policy-language/


> There's an old adage "pick your battles".

I suppose, so we shouldn't try breaking monopolies any more? There are plenty of examples where $big_corp is basically ubiquitous to $their_market until $competitor comes along.

The data Bloomberg uses can probably mostly be licensed outside of Bloomberg. Nothing stopping from these guys getting at least some of that data. Being it is open source, it likely means you can pick and choose your data instead of having _everything_. At which point the price can go down.


> Nothing stopping from these guys getting at least some of that data.

No mate. "some" won't cut it.

What would you say if I presented you with a pen and paper and said I was challenging Microsoft Excel ?

If we took your line of argument then I should be taken seriously because I am providing "some" of the functionality, and so what about the fact that a sheet of paper has no formulas or macros or anything else that a serious Excel user might want.

If somebody is launching a product claiming to be the next "Bloomberg killer/challenger/$insert_word_of_your_choice", then the product need to provide an equal product. Otherwise the product is, by definition, NOT challenging Bloomberg.

I mean, there's a whole ton of so-called "Bloomberg killers" that do little more than provide the same old US-markets data that any man and his dog can get hold of cheaply. And even then, they are only providing a small subset of US-market data, so they are not even competing with Bloomberg on US data.

I'm not going to repeat what I've said already here. If a product does not have data/feature parity on Bloomberg or Refinitiv, then don't waste my time.


They aren’t a monopoly.

Nobody puts everything as well together as they do. And obviously they have a massive library of unique data and functionality.

But there are thousands of competitors of all sizes.

It’s just very hard to see any of those competitors providing a free/open source alternative because the code is not a very large part of the value they provide.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: