Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 10 2018 04:48

    xiaq on master

    newedit/insert: More godocs. newedit/utils: Add godoc to Act… (compare)

  • Oct 09 2018 16:45

    xiaq on master

    README: Link to the philosophy … (compare)

  • Oct 09 2018 16:43

    xiaq on master

    README: Reword the contributing… (compare)

  • Oct 09 2018 16:40
    xiaq closed #763
  • Oct 09 2018 16:40

    xiaq on master

    Update README.md. Move the Nam… Fix the type of $num-bg-jobs, a… (compare)

  • Oct 09 2018 16:40
    xiaq commented #763
  • Oct 09 2018 16:39
    xiaq labeled #763
  • Oct 09 2018 16:39
    xiaq labeled #763
  • Oct 09 2018 16:28
    iwoloschin edited #763
  • Oct 09 2018 16:28
    iwoloschin opened #763
  • Oct 09 2018 16:18

    xiaq on master

    Update README.md Move the walk… (compare)

  • Oct 09 2018 16:14

    xiaq on master

    Update README.md Provide a wal… (compare)

  • Oct 09 2018 15:59

    xiaq on master

    Update README.md (compare)

  • Oct 09 2018 15:55

    xiaq on master

    Move the building instructions … (compare)

  • Oct 09 2018 15:50

    xiaq on master

    Update README.md * Trim down t… (compare)

  • Oct 09 2018 15:33
    xiaq commented #738
  • Oct 09 2018 15:30

    xiaq on master

    util: Add a Complain and Compla… eval: Add TODO comments for imp… newedit: Implement ${before,aft… and 5 more (compare)

  • Oct 09 2018 14:02
    xiaq commented #738
  • Oct 09 2018 07:49
    xiaq commented #760
  • Oct 09 2018 07:34
    xiaq commented #761
mesajor
@mesajor
[Paradox460] i.e. doesn’t work well (at all really) with multi-line commands
[Paradox460] if you wanted to implement a “good enough” vim mode, i’d say you really would only need these commands: d c ~ y p i, the basic operators (word, end of word, line, char, bracket), and a primitive visual mode
[Paradox460] fish is quite good in this regard
mesajor
@mesajor
[Paradox460] one thing i’ve done in the past, pre-fish vim mode, was make a keystroke that opened a vim editor off a temp file that contained a copy of the current command, allowed me to do full editing, then on quit set the current command to the output value of that file; this is similar to how the edit command in the PRY ruby repl works, and the only real compromise is that you don’t immediately have command history when vim opens, which can be solved in other ways (i.e. loading the shell history into a complete buffer)
[Paradox460] with elvish, i think you might lose a lot of the initial “magic” of how fast the repl and prompt updates are; the eager evaluation letting me know that fo isnt a command but for is, if one was careless in its implementation (edited)
mesajor
@mesajor
[danyspin97] what about neovim embedded? (re @Paradox460: one thing i’ve done in the past, pre-fish vim mode, was make a keystroke that opened a vim editor off a temp file that contained a copy of the current command, allowed me to do full editing, then on quit set the current command to the output value of that file; this is similar to how the edit command in the PRY ruby repl works, and the only real compromise is that you don’t immediately have command history when vim opens, which can be solved in other ways (i.e. loading the shell history into a complete buffer))
[Paradox460] this was several years ago, and neovim was quite unstable then, but i suspect now it could be a much nicer alternative to my solution; athame requires neovim-embedded, or vim-clientserver/job. could embed the vim view in a mutliplexer-like environment, similar to how fzf implementations in zsh bear a striking resemblence to the completions in elvish (edited) (re @danyspin97: what about neovim embedded?)
mesajor
@mesajor
[danyspin97] neovim is really stable rn (re @Paradox460: this was several years ago, and neovim was quite unstable then, but i suspect now it could be a much nicer alternative to my solution; athame requires neovim-embedded, or vim-clientserver/job. could embed the vim view in a mutliplexer-like environment, similar to how fzf implementations in zsh bear a striking resemblence to the completions in elvish)
mesajor
@mesajor
[Paradox460] Yeah, it might be a good alternative to using vim job or remote (re @danyspin97: neovim is really stable rn)
mesajor
@mesajor
[xiaqqaix] Glad that you like it. Re. vim mode, we have a tracking issue: issues.elv.sh/730 (re @Paradox460: 👍i gotta say i’m really impressed with elvish. Im still too dependent on vim mode to leave fish, but i really quite like what elvish is doing)
[xiaqqaix] As the title of the issue states, the show stopper of the current very basic vi-mode is that it doesn't support multi-key bindings
[xiaqqaix] I saw your comment on issues.elv.sh/217 the other day too. Elixir's pattern matching looks pretty standard-ML-ish to me (which Haskell also inherits) (re @Paradox460: i.e.
%{prop_a: a, prop_b: b, prop_c: c} = some_map)
[Paradox460] subscribing (re @xiaqqaix: Glad that you like it. Re. vim mode, we have a tracking issue: issues.elv.sh/730)
[Paradox460] yep, its nothing terribly unusual, but its quite nice for handling error states, instead of exceptions most functions in elixir (and erlang) return tuples, with the first value being either :ok or :error and the remaining values being either the return data from the function or error info. (re @xiaqqaix: I saw your comment on issues.elv.sh/217 the other day too. Elixir's pattern matching looks pretty standard-ML-ish to me (which Haskell also inherits))
[xiaqqaix] Elvish has some interesting constructs that make up for the lack of pattern matching in some places. Using your example, it can be done by indexing a map with multiple indicies:
[Paradox460] reading the elvish docs, and using it over the weekend, it felt very much like a “functional” shell, which is a very nice feeling compared to bash or even more modern works such as fish
[xiaqqaix] ~> x = [&foo=bar &lorem=ipsum]
~> put $x[foo lorem]
▶ bar
▶ ipsum
mesajor
@mesajor
[Paradox460] interesting. i’ll have to try that. could be useful for my git status plugin. (re @xiaqqaix: ~> x = [&foo=bar &lorem=ipsum]
~> put $x[foo lorem]
▶ bar
▶ ipsum)
[xiaqqaix] Glad you like it :) Elvish is definitely a functional programming language. It also falls more on the Lisp side (as opposed to the ML side) (re @Paradox460: reading the elvish docs, and using it over the weekend, it felt very much like a “functional” shell, which is a very nice feeling compared to bash or even more modern works such as fish)
[Paradox460] yeah, it reminded me a lot of writing Scheme
[Paradox460] so far the “biggest” pain point i’ve come across, when scripting in it, is the lack of a case or switch style operation; big blocks of if…else if… feel messy. But i saw that you’re planning on a case when you can get the syntax nailed down
mesajor
@mesajor
[Paradox460] question about the Ctrl-L feature, does it merely use its own internal DB, or does it have the ability to use an external db (such as mdfind in macos, recently-used in GTK envs) in addition to its internal one. I use fasd and fzf to get similar in fish, but its external integrations have been broken for a few years now. might be a nice minor enhancement, whenever more major features are completed
mesajor
@mesajor
[xiaqqaix] It always uses its internal db (~/.elvish/db). Programmability is a long-term goal. (re @Paradox460: question about the Ctrl-L feature, does it merely use its own internal DB, or does it have the ability to use an external db (such as mdfind in macos, recently-used in GTK envs) in addition to its internal one. I use fasd and fzf to get similar in fish, but its external integrations have been broken for a few years now. might be a nice minor enhancement, whenever more major features are completed)
[Paradox460] ah. is it relevancy weighted, or just edit distance? might be able to get some minor programability with a function hook (re @xiaqqaix: It always uses its internal db (~/.elvish/db). Programmability is a long-term goal.)
[xiaqqaix] There is no relevancy scoring, but the entries are sorted by recency
mesajor
@mesajor
[Paradox460] fair enough, easier to do that way.
[xiaqqaix] I didn't really document the matching algorithm, but there is an example in the cookbook: https://elv.sh/learn/cookbook.html (find "x/p/v")
[Paradox460] does it use stemming?
[xiaqqaix] hmm, what is stemming?
[Paradox460] similar to what you’re doing
[Paradox460] the most effective seems to be a mixture of suffix removal and n-gram building
[Paradox460] stemming is what allows you to search for “mouse” in google and get results about “mice”
[xiaqqaix] hmm, that looks overkill for matching directory paths
mesajor
@mesajor
[Paradox460] yeah i’d imagine you can generally use a first-character matcher and get more than adequate results; thats how atom, alfred, and fzf do it
[Paradox460] fzf’s matcher is somewhat simplistic, but does a good enough job
[Paradox460] supports some nice tokens to modify the search: https://github.com/junegunn/fzf#search-syntax
[xiaqqaix] yeah, at some point i would like to introduce a more expressive matching DSL too. kind of early for now :)
[Paradox460] 👍 (re @xiaqqaix: yeah, at some point i would like to introduce a more expressive matching DSL too. kind of early for now :))
mesajor
@mesajor
[xiaqqaix] The README on GitHub now features a simple 4-step walkthrough of becoming a master Elf :)
[xiaqqaix] 1. Download a binary for your platform.
  1. Get started with examples in the cookbook.
  2. Read the reference section to understand Elvish as a programming language; in particular, read the language reference and the builtin module reference.
  3. Get familiar with how to write Effective Elvish. This is a living document that evolves with the Elvish language itself.
[SitiSchu] seems like your client doesn't like markdown links 🤔 (re @xiaqqaix: 1. Download a binary for your platform.
  1. Get started with examples in the cookbook.
  2. Read the reference section to understand Elvish as a programming language; in particular, read the language reference and the builtin module reference.
  3. Get familiar with how to write Effective Elvish. This is a living document that evolves with the Elvish language itself.)
[SitiSchu] 1. Download a binary for your platform.
  1. Get started with examples in the cookbook.
  2. Read the reference section to understand Elvish as a programming language; in particular, read the language reference and the builtin module reference.
  3. Get familiar with how to write Effective Elvish. This is a living document that evolves with the Elvish language itself.
[xiaqqaix] Thanks :)
[xiaqqaix] The next step is to actually update those docs...
mesajor
@mesajor
[Ian] Thanks for fixing $num-bg-jobs 😄
[Ian] figured it would get forgotten since i had forgotten to file an issue
mesajor
@mesajor
[xiaqqaix] Thanks for taking the time to report :) (re @Ian: Thanks for fixing $num-bg-jobs 😄)
Qi Xiao
@xiaq
This room has been deprecated in favor of https://gitter.im/elves/elvish; please join that room!