FHIR Chat · sushi gists · shorthand

Stream: shorthand

Topic: sushi gists


view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 18:56):

Hi. Instead of only sharing code here, which is annoying for collaboration, what about we have a gists/fiddle -like thing ?
This could be a feature for fshschool.org, or some other way to have 2+ people look at (and collaborate on) the same fsh, without typing it here

view this post on Zulip David Pyke (Dec 30 2020 at 18:59):

Sort of like a git repository. But where could we find that?

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 19:01):

more of a gist than a repo. we'd have a (short) url for that, and we'd exchange that.

view this post on Zulip David Pyke (Dec 30 2020 at 19:12):

Is https://gist.github.com/ not usable? It has secret gists

view this post on Zulip Elliot Silver (Dec 30 2020 at 19:26):

I admit I don't know what gists are, but "secret" anything, and having to exchange urls doesn't seem to me to be more friendly/discoverable/accessible than posting code here.

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 20:57):

why secret?

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 20:58):

The intent is to share.

view this post on Zulip Elliot Silver (Dec 30 2020 at 20:58):

David Pyke said:

It has secret gists

Just repeating what was said.

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 20:58):

@Elliot Silver you can think of it (my idea) as a google doc

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 20:59):

indeed, my question was to David - I don't see the relevance of secrets.

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 21:00):

even better (potentially) would be to add a few feature to fshschool, to upload a fsh to the cloud, like in jsfiddle

view this post on Zulip Jose Costa Teixeira (Dec 30 2020 at 21:00):

image.png

view this post on Zulip Chris Moesel (Dec 31 2020 at 00:44):

As it would so happen, we're already working on a feature to support "permalinks" in FSH Online. The idea is that you can type in (or copy) your FSH to FSH Online and then click a "Create Permalink" link -- which will then create a unique link that you can share. When people click the link, it goes to FSH Online with your FSH preloaded (and then they can experiment with it themselves).

view this post on Zulip Chris Moesel (Dec 31 2020 at 00:46):

There are some technical challenges, however, because we don't actually have a dynamic server. FSH Online is just a straight HTML/CSS/JS app (albeit built using React) that is hosted on GitHub pages. So we don't have a DB to store things in. Right now we're experimenting w/ encoding the FSH into the URL itself (and then running it through something like TinyURL). Stay tuned!

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 09:23):

https://plantuml.com/text-encoding

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 09:26):

PlantUML does this. the content is encoded/compressed into a string that can be appended to the URL
https://en.wikipedia.org/wiki/Brotli

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 09:29):

A short URL creates another dependency that you may or not control. Content compression is independent.
OTOH, short URL remains the same when the content changes, but content compression means the url will change for every iteration (which I think is good, but depends on what we want to do)

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 11:38):

so, ideas (taken from how PlantUML works):

  1. add the possibility to pass encode fsh content and pass it as part of the URL -
    http://fshschool.org/XXXXXXXXXXXXXXXXX or
    http://fshschool.org?fsh=XXXXXXXXXXXXXXXXX

  2. allow the fsh content to come from somewhere else
    http://fshschool.org?&src=https://raw.githubusercontent.com/user/myfshfile


Last updated: Apr 12 2022 at 19:14 UTC