Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 19 21:54

    xiaq on cliedit

    cli: Remove AddOverlayHandler. … (compare)

  • Aug 19 09:39

    xiaq on cliedit

    cli/listbox: Expose the test It… cli/listbox: Fix Handle not ret… cli/combobox: Add package. and 1 more (compare)

  • Aug 18 18:58
    k1ckk opened #850
  • Aug 17 21:30

    xiaq on cliedit

    cli/clitypes: Add a TestRendere… cli: Use clitypes.TestRenderer. Merge branch 'cliedit' of githu… (compare)

  • Aug 17 21:16

    xiaq on cliedit

    cli/clitypes: Add a TestRendere… (compare)

  • Aug 17 18:10

    xiaq on cliedit

    cli/codearea: Add a CopyState m… edit/ui: Remove Set* methods fr… edit/ui: Remove the Width field… and 2 more (compare)

  • Aug 15 22:15

    xiaq on cliedit

    cli/listbox: Move state mutex i… (compare)

  • Aug 15 09:05

    xiaq on cliedit

    cli/codearea: Move state mutex … (compare)

  • Aug 14 10:09

    xiaq on cliedit

    cli/layout: Full test coverage.… (compare)

  • Aug 13 22:26

    xiaq on cliedit

    cli/layout: Add more unit tests. (compare)

  • Aug 12 20:52

    xiaq on cliedit

    edit/ui: Rename methods of Buff… edit/ui: Remove Col as a field … (compare)

  • Aug 12 09:05

    xiaq on cliedit

    cli/layout: Add package doc and… (compare)

  • Aug 11 14:08

    xiaq on cliedit

    cli/listbox: Full test coverage… (compare)

  • Aug 11 12:38

    xiaq on master

    Force terminal in blocking mode… (compare)

  • Aug 11 12:37
    xiaq closed #588
  • Aug 11 12:37
    xiaq closed #822
  • Aug 11 12:36

    xiaq on cliedit

    Force terminal in blocking mode… (compare)

  • Aug 11 12:25
    hanche commented #822
  • Aug 11 12:19
    xiaq commented #822
  • Aug 11 12:16
    hanche commented #588
mesajor
@mesajor
[dcuadrado] thanks, I made it work
mesajor
@mesajor
[xiaq] test irc bridge
[xiaqqaix] ok, still don't know why the irc bridge broke, but at least from now on it will restart every day.
mesajor
@mesajor
[muesli] yay
mesajor
@mesajor
[xiaqqaix] i really ought to write a bridge in elvish some day, it's all just plain text protocol and http calls anyway
mesajor
@mesajor
[dcuadrado] is there a better way to do this?
edit:completion:arg-completer[cdgo] = [cmd, arg]{
cd $E:GOPATH/src
/bin/ls -d $arg*
}
mesajor
@mesajor
[dcuadrado] probably using find
mesajor
@mesajor
[xiaqqaix] 1) use temp assignment to avoid permanently changing directory 2) you don't need to do filtering in a completer 3) all directories can be matched using */
[xiaqqaix] so i'd do edit:completion:arg-completer[cdgo] = [@args]{ pwd=$E:GOPATH/src put */ }
mesajor
@mesajor
[armin] hi there, can anyone help me out how to determine the "binding" name for binding ctrl-p to "move up in history"? i would have expected this here to work: edit:history:binding[Ctrl-P] = { edit:history:up } - what am i doing wrong?
[armin] self-answering my question: nevermind, i just stumbled upon https://elv.sh/ref/edit.html which explains it.
mesajor
@mesajor
[zzamboni] armin: note also that Ctrl-P and other common readline-like bindings can be configured by just use readline-binding - see https://elv.sh/ref/bundled.html, so you don't have to do them all by hand.
mesajor
@mesajor
[hhanche] I got this just now. Don't know what it means, but the shell is still running, and the cd command appears to have succeeded. This is run as root. The volume in quesetion is nfs mounted:
★ cd /global/www/wiki/lib/plugins/
★ panic: invalid page type: 68: 10 f7:/global/www/wiki/lib/plugins
goroutine 20 [running]:
github.com/elves/elvish/vendor/github.com/boltdb/bolt.(*Cursor).search(0xc000047948, 0x7f8c06768450, 0x8, 0x8, 0x44)
/opt/pkg/gopkg/src/github.com/elves/elvish/vendor/github.com/boltdb/bolt/cursor.go:256 +0x371
github.com/elves/elvish/vendor/github.com/boltdb/bolt.(*Cursor).seek(0xc000085948, 0x7f8c06768450, 0x8, 0x8, 0x0, 0x0, 0xc00002fa80, 0xc, )
/opt/pkg/gopkg/src/github.com/elves/elvish/vendor/github.com/boltdb/bolt/cursor.go:159 +0xa5
github.com/elves/elvish/vendor/github.com/boltdb/bolt.(*Bucket).Put(0xc000129900, 0x7f8c06768450, 0x8, 0x8, 0xc00002fa90, 0xc, 0x10, 0xc00)
/opt/pkg/gopkg/src/github.com/elves/elvish/vendor/github.com/boltdb/bolt/bucket.go:300 +0x120
github.com/elves/elvish/store.(*Store).AddDir.func1(0xc0000cca80, 0x989590, 0xc0000cca80)
/opt/pkg/gopkg/src/github.com/elves/elvish/store/dir.go:44 +0x1df
github.com/elves/elvish/vendor/github.com/boltdb/bolt.(*DB).Update(0xc000138000, 0xc000047ad0, 0x0, 0x0)
/opt/pkg/gopkg/src/github.com/elves/elvish/vendor/github.com/boltdb/bolt/db.go:598 +0x90
github.com/elves/elvish/store.(*Store).AddDir(0xc000130ce0, 0xc000097c00, 0x1c, 0x3ff0000000000000, 0x7f8c06814000, 0x0)
/opt/pkg/gopkg/src/github.com/elves/elvish/store/dir.go:38 +0x82
github.com/elves/elvish/daemon.(*service).AddDir(0xc0001310e0, 0xc000166540, 0xd8e3f8, 0x0, 0x0)
/opt/pkg/gopkg/src/github.com/elves/elvish/daemon/service.go:98 +0x79
reflect.Value.call(0xc000058900, 0xc00000e670, 0x13, 0x95f7bd, 0x4, 0xc000047f18, 0x3, 0x3, 0xc000128c40, 0xc00002f780, ...)
/opt/pkg/pkg/go-1.11/src/reflect/value.go:447 +0x449
reflect.Value.Call(0xc000058900, 0xc00000e670, 0x13, 0xc000030718, 0x3, 0x3, 0xc00001f201, 0xc00014e2a0, 0xc000030780)
/opt/pkg/pkg/go-1.11/src/reflect/value.go:308 +0xa4
net/rpc.(*service).call(0xc000128800, 0xc00007a370, 0xc00002f780, 0xc00002f790, 0xc000104580, 0xc0001662e0, 0x884040, 0xc000166540, 0x16, )
/opt/pkg/pkg/go-1.11/src/net/rpc/server.go:384 +0x14e
created by net/rpc.(*Server).ServeCodec
/opt/pkg/pkg/go-1.11/src/net/rpc/server.go:481 +0x47e
mesajor
@mesajor
[hhanche] Hmm, I think the error message is related to an inability to communicate with the daemon. Trying to go back in history, I get
dial unix /tmp/elvish-13799/sock: connect: connection refused
[hhanche] And exiting the root shell, I get the same in the parent shell, which runs with my uid.
mesajor
@mesajor
[hhanche] Further investigation: root is irrelevant. It happens every time I change directory, even if I change to the current directory or use pwd = … to do so. And it persists until I remove the daemon socket directory.
Perhaps my problem is caused by compiling on one ubuntu machine and copying the binary to another. It works fine where I compiled it! Unfortunately, I cannot compile elvish on those other machines: The go compiler there is too old, and I am powerless to upgrade it.
[hhanche] Both machines run the same kernel and the same ubuntu version, though. It's strange.
mesajor
@mesajor
[xiaqqaix] Hmm, how did you compile it?
mesajor
@mesajor
[hhanche] I am using this script:

[hhanche] ⬥ cat build.elv

-source me in elvish

E:GOPATH=/opt/pkg/gopkg \
b=github.com/elves/elvish/buildinfo \
go build -ldflags (joins ' ' \
[-X $b.Version=(git describe --tags --always --dirty=-dirty)
-X $b.GoRoot=(go env GOROOT)
-X $b.GoPath=(go env GOPATH)])⏎

[hhanche] (I'll be offline for half an hour while going home, in case there are further questions)
mesajor
@mesajor
[xiaqqaix] Try adding CGO_ENABLED=0 to the environment?
[xiaqqaix] Also, does the binary from dl.elv.sh work?
mesajor
@mesajor
[hhanche] Recompiling now. For the precompiled, should I go for the linux-amd64 version? I think the server in question uses intel processors. Certainly not arm, anyway.
[hhanche] The one I compiled now with the extra environment produces
panic: pgid (68719476739) above high water mark (71)
(and a big backtrace).
mesajor
@mesajor
[Ian] Unless it's an Itanium CPU, yeah, linux-amd64 is the right one to use.
[Ian] If you have no idea what Itanium is then don't worry about it and just use linux-amd64 😄
[hhanche] Downloaded and tried https://dl.elv.sh/linux-amd64/elvish-HEAD.tar.gz`. It produces the same error as above.
[hhanche] Even when I run it with -norc
mesajor
@mesajor
[Ian] Ha, I think that was one of my two contributions to Elvish...too bad it wasn't helpful here
[Ian] Is your daemon socket broken or stuck with weird permissions or something like that?
[hhanche] I remove it along with its directory between each new attempt.
mesajor
@mesajor
[hhanche] So anyway, is there a command one can run on linux to find out what kind of cpu is in the machine? All I can find is uname -i, returning x86_64.
[mueslix] cat /proc/cpuinfo
[Ian] close enough, that's the same as amd64
[hhanche] It's a Intel Xeon something-or-other.
[Ian] Yup, it's sometimes called amd64 because AMD beat Intel to the punch for 64 bit extensions to the x86 architecture
[Ian] Intel had a brand new architecture (Itanium), but it did not get broad adoption as it couldn't run x86 software.
[hhanche] Bad name. Like someone removed an initial t. Or perhaps to reminiscent of unobtainium.
[hhanche] s/to/too/
mesajor
@mesajor
[hhanche] So anyway (forgot to ask): What does CGO_ENABLED=0 do?
mesajor
@mesajor
[hhanche] Oh never mind, found by googling (of course): https://golang.org/cmd/cgo/
mesajor
@mesajor
[xiaqqaix] Hmm. That is... weird (re @hhanche: The one I compiled now with the extra environment produces
panic: pgid (68719476739) above high water mark (71)
(and a big backtrace).)
[hhanche] My thought exactly.
[xiaqqaix] What's the kernel version? Go has a requirement for a minimal kernel version IIRC
mesajor
@mesajor
[armin] zzq
[armin] zzamboni seems to have left, if they come back tell them a big thank you from me.
mesajor
@mesajor
[armin] so how do i edit the config file? it seems that adding "use readline-bindings" in neither ~/.elvish/rc.elv nor ~/.elvish/rc.org does what i do. do i actually have to use emacs to generate rc.elv?
[SolitudeSF] no, thats what zzamboni uses
[SolitudeSF] rc.elv is your config file