nicy icon indicating copy to clipboard operation
nicy copied to clipboard

Any complaints against adding nimgit and the libgit2 dependencies?

Open MisterBianco opened this issue 4 years ago • 5 comments

I have been using nicy for a bit with some modifications particularly around the gitBranch and gitStatus procs. I have one proc that gets both as a tuple and uses libgit2.

This is a beefy dependency and really changes nicy, if you are intereseted I can submit the code and let you decide what to do with it.

Time tests:

let t0 = getTime()
for x in countup(0, 1000):
  discard gitInfo()
echo getTime() - t0

let t1 = getTime()
for x in countup(0, 1000):
  discard gitBranch()
  discard gitStatus("*", "")
echo getTime() - t1

Times show:

66 milliseconds and 781 microseconds
13 seconds, 485 milliseconds, and 359 microseconds

Speed isnt everything, but those are the stats.

MisterBianco avatar Mar 24 '20 19:03 MisterBianco

This is a beefy dependency and really changes nicy, if you are intereseted I can submit the code and let you decide what to do with it.

I'm not sure really. It does sound better than shelling out though. As long as it doesn't break existing users' prompts -- I'm cool with it. I don't use nicy myself anymore; I think I'll loop in @juancarlospaco just for a second opinion.

icyphox avatar Mar 25 '20 03:03 icyphox

when defined(nimgit):
  # nimgit
else:
  # old code

:question:

juancarlospaco avatar Mar 25 '20 10:03 juancarlospaco

Good idea. That could work. @MisterBianco, do you think you can do that?

icyphox avatar Mar 25 '20 12:03 icyphox

BTW What are you using Fox?, I try Xonsh too, but Python is too slow, too much input lag.

juancarlospaco avatar Mar 25 '20 12:03 juancarlospaco

I'm using plain bash right now. It just works, solves all my needs.

Anirudh Oppiliappan https://icyphox.sh

icyphox avatar Mar 25 '20 13:03 icyphox