Fork me on GitHub
#off-topic
<
2020-05-21
>
dpsutton14:05:14

If anyone cares about trying a new shell, fish shell is incredibly, incredibly nice. It has some bugs where it just gets into a funky state and doesn't work essentially. And it doesn't understand the bash syntax of setting variables so Envfiles don't work.

myguidingstar14:05:40

I set fish as my default shell for years but still can't remember basic syntax like for, while etc because I don't use that much shell at all. But the ux is neat anyway

dpsutton14:05:32

yeah agreed

Drew Verlee16:05:33

what template do you use? i'm trying "Pure" right now.

dominicm14:05:01

Every time I've tried it, I've left because I know && etc too well

rakyi12:05:01

they added && and || a while ago

dominicm12:05:46

I know, but I was in a bank at the time and couldn't update :). That was just one example really.

dominicm14:05:18

It's not too difficult to get zsh setup with the nice prompt from fish

4
dpsutton14:05:55

true. but the autocompletion from history is absolutely killer. and parsing of man pages is amazing

dominicm14:05:50

Zsh has a plugin for the former, not sure what the latter is really

dpsutton14:05:08

oh interesting. thanks

Lennart Buit14:05:26

I have zsh with oh-my-zsh, but its quite slow ;/ should really invest some time in optimising my profile

dominicm14:05:15

My pro-tip is to use zplug https://github.com/zplug/zplug/ it's a light package manager.

👏 4
p-himik14:05:47

Thanks for mentioning it - right now I'm using zgen but maybe this one will be better.

dominicm15:05:10

zgen looks ok too.

dominicm15:05:40

I chose zplug a long time ago, the key thing was it was easy to let me choose. :)

dominicm15:05:49

I should look at zinit!

dominicm15:05:36

For me, the key thing is the API. I want to "declare" the plugins I want, and to add/remove them by changing my zshrc.

dominicm15:05:39

Beyond that I don't care.

dominicm15:05:46

(other than it can't be dog-slow)

Lennart Buit15:05:20

the reason I am still on oh-my-zsh is that I have no clue what it actually configures, and I am afraid that if I remove it, I break my own workflow :’)

p-himik15:05:15

You don't have to abandon it. Zgen and others support loading oh-my-zsh plugins.

dominicm15:05:01

the trick is knowing which plugins I suppose :)

dominicm11:05:42

I just had a go with zinit from zplug. Without much trying I went from 0.23s with zplug to 0.07s with zinit.

dominicm11:05:15

Benched with time zsh -i -c exit which was similar to what pm-perf-test did

p-himik11:05:20

Sounds good!

dominicm14:05:06

zplug zsh-users/zsh-history-substring-search
zplug zsh-users/zsh-autosuggestions
zplug 'zplug/zplug', hook-build:'zplug --self-manage'

zplug load
This is the fish-like part of my config.

dominicm14:05:37

I also use changyuheng/zsh-interactive-cd, which is stellar (fzf on ambiguous cds) and romkatv/powerlevel10k, configured to look like sindresorhus/pure.

dpsutton14:05:59

thanks! i will check this out

plexus15:05:41

I had oh-my-zsh for years but don't think I used 10% of it. Just switched to a new system and dumped it. I did carry over my .zshrc but it doesn't have much zsh specific stuff. So kept it pretty vanilla this time and I haven't noticed the difference. I only installed the spaceship prompt https://github.com/denysdovhan/spaceship-prompt

Lennart Buit15:05:39

oh thats a really nice prompt

Lennart Buit15:05:54

I really like two-line prompts

sogaiu01:05:06

that is spiffy

sogaiu01:05:13

i have one line that show repo info (e.g. branch name) of curr dir and another that shows curr dir path (plus other date time info) - plus color to make recognition of pieces quicker

orestis18:05:11

Reading the XState documentation: https://xstate.js.org/docs/ — what a fantastic library. Makes me jealous we don’t have it in ClojureScript. Kinda big to re-write, perhaps a wrapper might be feasible to make it a little bit more Clojure-like. But it seems like the basis is immutable so perhaps using as-is might not be a big deal.

kszabo19:05:40

We have a quite attractive version this with the latest Fulcro version: http://book.fulcrologic.com/#_ui_state_machines

lilactown19:05:43

it’s not clear to me whether fulcro’s state machines are full blown state charts or just finite state machines

lilactown19:05:55

that’s something that is really attractive about xstate

lilactown19:05:24

also, xstate already has a lot of tooling for visualizing the chart you’ve created in code

lilactown19:05:43

also, xstate doesn’t depend on any other libraries, whereas fulcro’s state machines depends on all of fulcro

lilactown19:05:14

I see little benefit to rewriting xstate in ClojureScript, and a lot of downsides

orestis20:05:52

I’ve never used it, found some time to dive in the docs.

orestis20:05:32

Now I want to use it and see if there’s rough edges with interop etc.

orestis20:05:09

A rewrite sounds like a huge effort for no good result. But perhaps a wrapper might be worth it...

orestis15:05:53

Oh! I wasn’t aware that it’s XState under the hood. Nice!

lilactown20:05:42

you wouldn’t have to wrap much. it seems very data-driven.

lilactown20:05:00

it’s mainly aesthetics of constructing JS objects to pass to Machine