How to run the Kappa web UI locally

22 views
Skip to first unread message

Sandro Stucki

unread,
Sep 26, 2018, 9:46:50 AM9/26/18
to kappa-users
Hi!

Is there a way to run the Kappa web UI/IDE locally, say on a laptop,
and then connect to it through the browser?

I managed to compile the binaries from source (latest master from the
Github repo, using opam) and I'm able to run KaSim from the command
line, but I can't seem to find any documentation on how to launch the
web UI.

Cheers
/Sandro

Walter Fontana

unread,
Sep 26, 2018, 9:52:01 AM9/26/18
to kappa-users

Walter Fontana

unread,
Sep 26, 2018, 9:56:53 AM9/26/18
to kappa-users
Or, if you want to run your browser but not the app,
start KaSim with a port number (should be among the options), say 8080, and enter the URL

Pierre?

Sandro Stucki

unread,
Sep 26, 2018, 10:14:34 AM9/26/18
to Walter Fontana, kappa-users
Hi Walter,

thanks for the quick reply.

> Or, if you want to run your browser but not the app,
> start KaSim with a port number (should be among the options), say 8080,

I couldn't find a KaSim option to specify the port-number. There's one
for WebSim called '--port', but I'm not sure what it does.
Is there a way to do this without going to through the
https://tools.kappalanguage.org webpage? Basically, I'm looking for a
way to use the web UI while being offline. I'm giving a talk where I'd
like to do some live coding in the Kappa UI, but I can't rely on WiFi
being stable.

/Sandro
> --
> You received this message because you are subscribed to the Google Groups "kappa-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kappa-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Walter Fontana

unread,
Sep 26, 2018, 10:21:19 AM9/26/18
to Sandro Stucki, kappa-users
For demo purposes the app “Kappapp” seems perfect. You can download it for any OS at
https://kappalanguage.org/download

Pierre Boutillier

unread,
Sep 26, 2018, 10:25:34 AM9/26/18
to Sandro Stucki, kappa-users
Hi,

Basically :
- `opam install lwt_react tyxml-ppx js_of_ocaml-lwt js_of_ocaml-tyxml atdgen`
- `make site/index.html`

open this `site/index.html` in your browser (Beware: your browser must be allowed to "load files from the disk in the background" which is a "developer" option only on modern browsers because it is a security hole under some circumstances) so get sure you set that up...)

If you want a completely offline version do `make APP_EXT=local site/index.html` (it will download on your disk the external javascript libraries required, you need a internet connection to compile (at least the 1st time after each a `make clean`) in any case, sorry...)

Pierre B.

Jérôme

unread,
Sep 26, 2018, 10:29:01 AM9/26/18
to kappa-users
I used it recently for a demo at a conference (with no WIFI access) and =
it worked perfectly out of the box.

Cheers.

Sandro Stucki

unread,
Sep 26, 2018, 11:24:18 AM9/26/18
to Jérôme Feret, Pierre Boutillier, kappa-users
Thanks Pierre for the instructions. That worked perfectly for me as well.

Combining Pierre and Walter's suggestion, I also tried using the web
UI with a local simulator backend by first running

WebSim --port 8080

then connecting to

file:///<path-to-KaSim-repo>/site/index.html?host=http://localhost:8080/

in the browser, which seemed to work as expected.

> For demo purposes the app “Kappapp” seems perfect. You can download it for any OS at
> https://kappalanguage.org/download

I agree. Actually, I tried that first and it worked, except the
resolution of the UI window was somehow messed up on my MacBook, i.e.
the font and graphics looked rather ugly and low-res. I guess this is
related to the MacBook's retina display, but I wouldn't know how to
fix it. The fonts look great in my normal browser.

I'll try it again with a projector too see whether the problem persists.

In any case, it's good to know I can run it in the browser too.

Cheers
/Sandro

On Wed, Sep 26, 2018 at 4:27 PM feret <Jerome...@ens.fr> wrote:
>
> I used it recently for a demo at a conference (with no WIFI access) and it worked perfectly out of the box.
>
> Cheers.
> Jérôme.
Reply all
Reply to author
Forward
0 new messages