Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 16 23:54

    scopatz on webconfig

    save setting initial wiring (compare)

  • Oct 16 23:00

    scopatz on webconfig

    status (compare)

  • Oct 16 22:07

    scopatz on webconfig

    bootstrap selection (compare)

  • Oct 16 21:54

    scopatz on webconfig

    app compiles! (compare)

  • Oct 16 19:00
    gforsyth commented #3284
  • Oct 16 17:07
    dclong commented #3157
  • Oct 16 15:34
    scopatz labeled #3360
  • Oct 16 15:34
    scopatz opened #3360
  • Oct 16 13:13
    gforsyth commented #3342
  • Oct 16 13:11
    IuryAlves starred xonsh/xonsh
  • Oct 16 03:50

    scopatz on webconfig

    initial elm app (compare)

  • Oct 16 02:30
    dclong commented #3157
  • Oct 16 02:25
    dclong opened #3359
  • Oct 16 02:14

    scopatz on webconfig

    Add initial webconfig from fish Add working fish webpage Merge branch 'feature/webconfig… and 1 more (compare)

  • Oct 15 22:53
    certik commented #3309
  • Oct 15 22:48
    anki-code commented #3356
  • Oct 15 22:47
    anki-code commented #3356
  • Oct 15 22:46
    anki-code commented #3356
  • Oct 15 22:45
    anki-code commented #3356
  • Oct 15 22:45
    anki-code commented #3356
Jamie Bliss
@astronouth7303
the way I handled exposing values that are expensive to compute/get was to use xontrib-schedule to refresh them regularly and stick the value somewhere for the prompt to get (There's a dict of format values that's good)
(in my case, I was doing opsy stuff, so it was a quick server status via saltstack)
Anthony Scopatz
@scopatz
I thought we might have...
Jamie Bliss
@astronouth7303
Things I should do: respin all the xonsh infrastructure as a github app, and name it Lou Carcolh
Anthony Scopatz
@scopatz
hahah yessss!
Jean Kossaifi
@JeanKossaifi
didn't we recently add self-refreshing prompts?
Ah, indeed, I found a variable $PROMPT_REFRESH_INTERVAL that seems to do that!
re. powerline, the github version seems correct, i guess it's the pip version that wasn't updated -- could xontrib install be made to fetch directly the github version?
Anthony Scopatz
@scopatz
yeah that would be a good fix
PRs welcome for that, should be one line
Jean Kossaifi
@JeanKossaifi
I'll try, as soon as I have a minute.
Anthony Scopatz
@scopatz
Thanks!
Jean Kossaifi
@JeanKossaifi
Currently just trying to get familiar with xonsh in general :)
Where is the xontrib install defined?
Anthony Scopatz
@scopatz
xonsh/xontribs.json contains the install info
Jamie Bliss
@astronouth7303
xontribs are managed through python tooling
so yes, you can install xontribs and other packages from github (specifically, git URLs)
xpip is just an alias that's supposed to point at xonsh's own environment (because the configuration of various python environments can vary wildly)
so, to install from github would be something to the effect of xpip install git+https://github.com/user/repo.git#egg=pkgname
Jamie Bliss
@astronouth7303
So, thinking about the future of xonsh tooling, heroku would be nice and easy to develop (especially with pipelines) would be cheaper and Nick
aws
Ugh, mobile gitter
Aws would likely be cheaper (especially using lambda), but a lot more difficult to set up.
Jean Kossaifi
@JeanKossaifi

xpip is just an alias that's supposed to point at xonsh's own environment (because the configuration of various python environments can vary wildly)

Is xontrib install also just an alias to xpip install?

Jean Kossaifi
@JeanKossaifi
Hmm so I got the prompt to show what I want (was super easy, finding the time is hard!), I just need to get it to refresh.
I tried playing with $PROMPT_REFRESH_INTERVAL but it didn't do the trick: is there something I am missing? Should it be as easy as setting $PROMPT_REFRESH_INTERVAL=5 for instance?
Sorry for the many questions!
Jean Kossaifi
@JeanKossaifi
(I do have $UPDATE_COMPLETIONS_ON_KEYPRESS=True )
Jean Kossaifi
@JeanKossaifi

Since I already have so many questions, I might as well add one more ....

Is there any alternative to:

ENV_VAR=value python script.py

besides than explicitely defining it:

${'ENV_VAR'}='value'
python script.py

The former defines ENV_VAR only for that line while the latter adds it to the environment even after the command is executed.

I know I can use swap:

with ${...}.swap(ENV_VAR='value'):
    python script.py

but it's quite verbose..

Anthony Scopatz
@scopatz

Aws would likely be cheaper (especially using lambda), but a lot more difficult to set up.

@astronouth7303 - yeah it would be really nice to have tool like doctr or cookiecutter or similar that helps set these kinds of tools up

Is xontrib install also just an alias to xpip install?

Actually, where is xontrib install implemented?!

Anthony Scopatz
@scopatz

$PROMPT_REFRESH_INTERVAL=5 for instance?

That is how it is suppossed to work. If it isn't there may be a bug in prompt-toolkit

ENV_VAR=value python script.py

You can run things through the env command: env ENV_VAR=value python script.py

I had started to try to implement this at one point, but there are some funny edge cases that got in the way
I think the branch is still around
Jamie Bliss
@astronouth7303

so, the way to configure cloud/serverless stuff is tooling like Teraform or Pulumi (or helm, if you have an existing kubernetes cluster). It's fairly straight-forward to set CD pipelines with those, with some fixed branches for different environments.

However, your concern with our service-based tooling in the past has been how easily people can contribute to it, and simply using AWS/GCP has a significant learning curve (in ways that Terafrom/pulumi can only sort of cover up). Using heroku means we just throw up a flask app and all the operational aspects are handled.

The flip side is cost: AWS/GCP have a lot more "pay what you use" options, which tend to be cheaper if you don't need stuff running all the time but more expensive if you do. (Our use case most likely falls into the former.) Heroku, meanwhile, would need to have a constant cost to keep the service running all the time (albeit a small one, like $10/mo). Footnote: Heroku hobby is free, but can spin-down. I would have to test if that means "requests will be rejected" or "the initial request will just take a long time".

ah, a quick test showed that even on a cold hobby instance, i still got a response in 300ms
so it looks like we'll probably be able to slide in on a hobby instance.
Jamie Bliss
@astronouth7303
as long as we only need the one web server.
Anthony Scopatz
@scopatz
Yeah, my understanding that heroku hobby is good enough for most uses cases that are relatively small
We have only recently started to outgrow it on conda-forge
Jamie Bliss
@astronouth7303
i mostly concerned about the warm up time and warm up behavior vs github's webhook timeouts
oh, another test showed the time as 9.61s, where github has a documented timeout of 10s
Jamie Bliss
@astronouth7303
and github does not automatically retry webhook deliveries
Jamie Bliss
@astronouth7303
of course, the other problem with any of this is that setting up development tooling for integrations like this is hard
Jamie Bliss
@astronouth7303
(namely because of tokens)
Jamie Bliss
@astronouth7303
well, partly because tokens, partly because test repos
Jamie Bliss
@astronouth7303
yeah, this run was 12.5s to warm up and respond, so heroku free might not cut it
Jamie Bliss
@astronouth7303
something else I'd like to discuss: We currently let every core contributor full admin access to everything. Is this a policy we want to continue as we rope in more services (especially billable services)? Keep in mind, it's not just do we trust them, but do we trust their security stances?
Jean Kossaifi
@JeanKossaifi
@scopatz it isn't refreshing.. Any idea how I could troubleshoot it? It only updates after executing a command..
Just missing that part for y GPU status bar to be complete :)
Jean Kossaifi
@JeanKossaifi
I tested directly the refresh_interval in prompt_toolkit (https://github.com/prompt-toolkit/python-prompt-toolkit/blob/c7851c09ffbfa7d06458408abee77ab6f548852d/examples/prompts/clock-input.py ) and it works fine, not sure what is going on..