git ssb

10+

Matt McKegg / patchwork



be more consistent with patchbay.

%41jFAuKIKtPVWcGercJMvSqXhT3OL7OgIGgGK0CHqlk=.sha256
Closed Dominic wants to merge commits into master from modules
Dominic · 11/12/2016, 11:15:55 AM

be more consistent with patchbay.

This pull request updates patchwork-next to use the latest version of patchbay, which brings in the key idea of merging layers of modules. The idea of merging layers is intended to enable easily distributing separate curations of patch* ui features - so patchwork-next is a good test of that!

I'm not expecting you to merge this as is, but am making this PR to negioate a common direction. Currently, to run this, start an sbot and run electro main-window.js. Gonna get patchwork-next style working next.

I had to bash around to get the styles working, as I said I will tidy up before we merge, but just for discussion...

Dominic updated the branch to c3ab9263 · 11/12/2016, 2:17:19 PM
dinoworm ๐Ÿ› updated the branch to 809c5198 · 12/2/2016, 9:33:43 AM
%1t8bRUOewhcqABXyme8WJhw/fwywaJoSWx8HeOUseF4=.sha256 dinoworm ๐Ÿ› · 12/2/2016, 9:42:41 AM

hey @dominic, is it cool if i take over this pull request? i realized before i can update patchbay to support something in patchwork-next, i need this done. it's also a nice way to learn both the patchbay and patchwork-next codebases.

however i noticed that there's no way to dependency inject the config, which leads to duplicate module declarations if really you just want to change the default config overrides.

so i had an idea to create some "base" modules: %hFAgSbS... (git-ssb.celehner.com). i got stuck on how to do sbot.js (almost need dynamic module injector, like an init function for each module, because some module definitions depend on other modules being defined), is this a terrible idea or a good idea?

%pJ7vVzfkJsbDB1SxWetu+vtRQ75eDueqWRKurSSdvM0=.sha256 dinoworm ๐Ÿ› · 12/2/2016, 9:44:08 AM

also @dominic, do you remember anything that would be on your mental TODO list here?

%MOoW3Uy77zzHH3mxhw0oPa4vjTcjn5TAQFab/oJhaEE=.sha256 Dominic · 12/2/2016, 12:24:20 PM

Please do! so i think the main TODO is get npm start running in a way that @matt likes.

I was running patchbay with electro, but ferment wants a thing that can start the sbot and the ui within one command. I actually quite like the way that ferment does this with sbot inside a hidden "window".

dinoworm ๐Ÿ› updated the branch to 4563b964 · 12/3/2016, 9:54:42 AM
dinoworm ๐Ÿ› updated the branch to 32d251a7 · 12/4/2016, 9:53:20 AM
%c93Xq8vvKuwdv3oH+iWpwMvz3zWcrK1rJp7wEE5BoRs=.sha256 dinoworm ๐Ÿ› · 12/4/2016, 9:55:19 AM

@matt can i haz review? :peach:

(a nice side-effect of this pull request is that composing a message now includes emoji auto-completion.)

%8A9wHvbr4SCsJ7E4aaaQAydSw6/S5T7l1upub/omET0=.sha256 dinoworm ๐Ÿ› · 12/4/2016, 10:13:40 AM

%NsoDwrA...

%2nqdlGSKvFoB6kkMSTC0A3LTc6BUkWKSeXpO/hklj7o=.sha256 Matt McKegg · 12/5/2016, 3:23:01 AM

@dinosaur nice, I'm fairly happy with this approach :sunglasses:

  • Just an opinion, but I prefer using ~ for deps like patchbay and scuttlebot so that npm install is all people need to make sure they are running the latest version. It also makes things a little more atomic.

  • The dependency ursa is failing to build on my machine. This seems to be a dep of ssb-ws.

    > ursa@0.9.4 install /Users/matt/Code/patchwork-next-dominic/node_modules/ursa
    > node-gyp rebuild
    
      CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
    In file included from ../src/ursaNative.cc:3:
    ../src/ursaNative.h:13:10: fatal error: 'openssl/rsa.h' file not found
    #include <openssl/rsa.h>
    
  • Maybe ssb-ws should be made an optional dependency of patchbay to prevent it from breaking the build?

  • Upgrading to the latest patchbay seems to have broken styling of about messages, but these are in desperate need of work anyway.

  • Also, auto-complete doesn't seem to be highlighting the selected item (on both emoji and name pickers).

But otherwise, things seem to be working nicely :)

%VOLsYlNGX/gTJpWtgoXlxUhnhVn16lebLMOZDESiUEc=.sha256 dangerousbeans · 12/5/2016, 4:06:38 AM

@Matt I ran into the openssl/rsa.h missing thing too, this seemed to fix it

$ brew uninstall openssl --ignore-dependencies
$ brew install openssl
%bzkLyh10h5+btLJkCAvjjiPOjtEUNs7ZHjXDwUoCvpc=.sha256 Dominic · 12/5/2016, 6:26:20 PM

we can ditch usra. (or make it optional) since it's only needed for letsencrypt which had other problems with it.

%kiwVi9d1uiQTBiRRLlvjrxoEa8IlBvxztONGchk0BmQ=.sha256 ev · 12/6/2016, 3:06:58 AM

I haven't been able to get that letsencrypt module working at all. I say rip it (and ursa) out.

I use caddy and redirect ssb-ws to /ws. This kind of makes the --modern invite setup a little finicky because I have to manually edit them from ws://...:8989 to wss://.../ws.

dinoworm ๐Ÿ› updated the branch to 99aead0a · 12/7/2016, 8:47:49 AM
dinoworm ๐Ÿ› updated the branch to d3526827 · 12/9/2016, 3:05:15 AM
%ZfhDW7ukxvHvHVAUq+23sYIioZ3BVtfQkyiB6RpvxK0=.sha256 dinoworm ๐Ÿ› · 12/9/2016, 3:06:01 AM

hey @matt, so local peers show up as connected pubs in the sidebar. any recommendations on where to look to fix this? chur.

%jhhC+854OEn+FJgg5TDFD7K/o5uz0bcwulaRCoKWxZU=.sha256 Matt McKegg · 12/9/2016, 5:32:05 AM

It's probably this:

modules/sbot.js:183

  //this can actually be implemented by filtering gossip.peers
  sbot_list_local: rec.async(function (cb) {
    cb(null, [])
    //return sbot.local.list(cb)
  })

and modules/public.js:35:

var connectedPubs = computed([connectedPeers, localPeers], (c, l) => c.filter(x => !l.includes(x)))

@dominic disabled this because it is not compatible with stock sbot.

If local peers actually worked properly, this hack wouldn't be neccessary, and we could just use gossip.peers as dominic suggests. But the advantage to sbot.local.list is that it is actually a realtime list of local users that are broadcasting the udp message, rather than peers you are actually connected to. This means they disappear when users go offline rather than staying in your peer cache.

%5ie6gm4YSgzRIHr2NX4gVz6s2xWZ2gx6iNgvyWRhUPs=.sha256 Dominic · 12/14/2016, 3:27:59 PM

since letsencrypt is already an optional dependency, it should work as it is. I think the simplest is to just completely remove letsencrypt. can figure out a better way to add that again later.

%d5xyWPej8QabXZzpA+Q5AHNJCufHWMqv/HuVQHdvxC0=.sha256 Matt McKegg closed this pull request · 2/20/2017, 4:12:39 AM

Built with git-ssb-web