Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
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..
Nathan Goldbaum
@ngoldbaum
I saw this on lobsters: https://github.com/terrycojones/daudin/
seems he wasn't aware of xonsh: terrycojones/daudin#6
Anthony Scopatz
@scopatz
Interesting! Thanks for pointing that out @ngoldbaum!
Sean Farley
@seanfarley
@ngoldbaum: You're here too?
Nathan Goldbaum
@ngoldbaum
i'm everywhere
Sean Farley
@seanfarley
That's fair
Jamie Bliss
@astronouth7303
i'm quite happy with the container automation i set up
DID YOU KNOW: Xonsh has containers! And they're updated every day, automatically!
Anthony Scopatz
@scopatz
♥️♥️
watiko
@watiko

Hi, I am begginer of xonsh.

I read Tutorial: Subprocess Strings but I cannot understand how to unquote an embedded string.
https://xon.sh/tutorial_subproc_strings.html

In bash:

OPTIONS=""

if [[ some_condition ]]; then
  OPTIONS="$OPTIONS -c optional_key=$VALUE"
fi

awesome_command \
  -c key1=value1 \
  -c key2=value2 \
  $OPTIONS

In xonsh(wrong):

$OPTIONS = ""

if some_condition:
  $OPTIONS  = f"{$OPTIONS} -c optional_key={$VALUE}"

awesome_command \
  -c key1=value1 \
  -c key2=value2 \
  $OPTIONS # $OPTIONS treated as one quoted string
Derrick Johnson
@dekee
How do you install packages? Xonsh doesn't seem to respect the local pip
Derrick Johnson
@dekee
The search is awesome xpips install requests
For anyone else that has the same question ^^
Timothy M. Shead
@tshead2

I'm enjoying Xonsh, but having a lot of difficulty with command substitution. The following is something I do in bash a lot - could you show me what the Xonsh equivalent is?

grep -Ri foo $(find . -iname "*.py")

From the docs, I thought it would be grep -Ri foo @$(find . -iname "*.py"), but that clearly doesn't work the way I think it does.

Tim Stahel
@Swedneck_gitlab
hi all, xonsh says i have enabled xontribs that aren't installed, even though i have definitely installed them
any ideas why this might happen?
Isaiah Norton
@ihnorton
Is there a howto on adding a custom command table? I want to add pseudo-commands written in python (more or less), and search the custom table ahead of PATH to decide what to execute
Dominic Ward
@deeuu
@tshead2 I too don't quite understand this, because according to the tutorial, @$(find . -iname "*.py") should be the same as @([i.strip() for i in $(find . -iname "*.py").split()]). Unless I'm missing something?
Any how, you can explicitly pass in the list of files grep -i foo @($(find . -iname "*.py").split())
Dominic Ward
@deeuu
@Swedneck_gitlab Hey, so xpip list shows the packages that you have xontrib loaded in your xonshrc?
Owen Campbell
@meatballs
What's the easiest/most concise way to replay a single command from my history if I know its id? At the moment, I'm using @$(history <id>) but is there a better way? (I don't really want to enable the bashisms xontrib)
Tim Stahel
@Swedneck_gitlab
@deeuu yeah:
xontrib-autojump             1.2        
xontrib-avox                 0.7        
xontrib-powerline            0.4.0      
xontrib-prompt-vi-mode       0.1.3      
xontrib-readable-traceback   0.3.2      
xontrib-schedule             0.0.1      
xontrib-ssh-agent            1.0.1
Dominic Ward
@deeuu
Strange... perhaps try a fresh install and see if you can reproduce
Tim Stahel
@Swedneck_gitlab
what do you mean by fresh install?
reinstalling xonsh?
Tim Stahel
@Swedneck_gitlab
uninstalling via dnf and installing via pip seems to work fine, although it now instead complains that __xonsh_env__ isn't defined
Dominic Ward
@deeuu
Yes reinstall xonsh. How are you installing it ? More than happy to try and reproduce
Tim Stahel
@Swedneck_gitlab
i had it installed via dnf, fedora 30
Tim Stahel
@Swedneck_gitlab
strange, if i load the prompt_vi_mode xontrib the shell gets slow as molasses
eggcaker
@eggcaker
Hi all, is there a way to do text expand, ex: when typing npr,press some key(tab ) npr'll replace to np.random.randn( ) 
eggcaker
@eggcaker
Any one use xontrib-kitty xontrib ? after upgrade xonsh to latest version (xonsh/0.9.13.dev1), the plt.show() donesn't show any thing