Code Monkey home page Code Monkey logo

flitter's Introduction

Flitter

A Livesplit-inspired speedrunning split timer for terminal / command-line.

Animated demo GIF

All screenshots

Features

  • Global hotkeys
  • ๐ŸŒˆ Animated rainbow best splits
  • 24-bit terminal color
  • Undo / delete split
  • Pause / resume
  • Splits and history stored in single human-editable file
  • 60 FPS rendering with low CPU usage
  • Robust time computations: float math is mostly avoided

Install

Flitter has been tested on Linux, but in theory it should work on MacOS as well. Windows is not supported.

OCaml Dependencies

Flitter is mostly written in OCaml.

Install opam: opam install instructions

Set up opam and install OCaml dependencies:

$ opam init
$ opam switch create 4.07.0
$ opam install dune core lwt re color sexp_pretty uutf lwt_ppx uuseg notty

Python Dependencies

Flitter uses a tiny amount of Python to provide global hotkeys.

Install pip for Python 3. For example, on Ubuntu / Debian:

$ sudo apt install python3-pip

Install Python package dependencies:

$ pip3 install --user pynput

Install Flitter

$ git clone --recursive https://github.com/alexozer/flitter.git
$ cd flitter
$ dune build
$ dune install

Usage

Create your splits:

Copy examples/splits.scm somewhere. Edit it and add your game and split information. The personal best splits, world record splits, and gold segments are not required.

Launch Flitter with your splits file:

$ flitter my-splits.scm

Warning: Don't edit your splits file while Flitter is running, your changes will be overwritten.

Keybindings

Keybindings are all global hotkeys; they will work even when the terminal is not focused.

Keys Action
Space Start / split / save and reset if run finished
J Start / split
K Undo split
D Delete last segment
Backspace Pause / reset (save run if finished and save golds)
Delete Pause / delete run (don't save anything)
Q Quit (if not currently timing)

Contributing

Feel free to make an issue or a pull request!

flitter's People

Contributors

alexmorson avatar alexozer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flitter's Issues

opam switch create 4.07.0 not working

I installed opam:
user@dell-2017:~$ opam --version
2.0.8

ran opam init
but the next two commands didn't work
user@dell-2017:~$opam switch create 4.07.0
[ERROR] No compiler matching '4.07.0' found, use 'opam switch list-available' to see what is available, or use '--packages' to select packages explicitly.
user@dell-2017:~$ opam install dune core lwt re color sexp_pretty uutf lwt_ppx uuseg notty [ERROR] No package named dune found. [ERROR] No package named core found. [ERROR] No package named re found. [ERROR] No package named color found. [ERROR] No package named sexp_pretty found. [ERROR] No package named uutf found. [ERROR] No package named lwt_ppx found. [ERROR] No package named uuseg found. [ERROR] No package named notty found.

Be smarter about working with option

We could use some of Core's facilities to make working with optional types more sane.

Some examples:

Option.map timer.comparison ~f:Archived_run.splits |> Option.bind ~f:(fun comp -> List.nth comp split_num) |> Option.bind ~f:Split.time
Option.merge (List.nth seg_durations i |> Option.join) (List.nth old_durations i |> Option.join) ~f:Time_ns.Span.min )
open Core
open Option.Let_syntax
 
let some_ten =
    let%map unpacked_option = Some 5 in
    unpacked_option * 2

Or >>| and >>=

After opening Flitter it closes immidiately

log:
Uncaught exception:

(Failure "Hotkeys stream exited unexpectedly")

Raised at file "src/event_loop.ml", line 169, characters 4-241
Re-raised at file "src/core/lwt.ml", line 3072, characters 20-29
Called from file "src/unix/lwt_main.ml", line 31, characters 10-20
Called from file "src/unix/lwt_main.ml", line 118, characters 8-13
Re-raised at file "src/unix/lwt_main.ml", line 124, characters 4-13
Called from file "bin/main.ml", line 1, characters 9-23

Dune install error

dune install is not working and giving the following output:

Error: The following <package>.install are missing:
- _build/default/vendor/notty/notty_lwt.install
Hint: try running: dune build @install

When I try following the hint I get this:

malb@greybox:~/Apps/flitter$ dune build @install
File "vendor/notty/lwt/notty_lwt.ml", line 68, characters 25-64:
Error: This expression has type (unit -> unit) Lwt.t
       but an expression was expected of type unit Lwt.t
       Hint: Did you forget to provide `()' as argument?
Done: 216/229 (jobs: 1)

opam switch create 4.07.0 not working

`user@dell-2017:~$ opam init

<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><><><>

In normal operation, opam only alters files within ~/.opam.

However, to best integrate with your system, some environment variables
should be set. If you allow it to, this initialisation step will update
your bash configuration by adding the following line to ~/.profile:

test -r /home/user/.opam/opam-init/init.sh && . /home/user/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true

Otherwise, every time you want to access your opam installation, you will
need to run:

eval $(opam env)

You can always re-run this setup with 'opam init' later.

Do you want opam to modify ~/.profile? [N/y/f]
(default is 'no', use 'f' to choose a different file) y
A hook can be added to opam's init scripts to ensure that the shell remains in
sync with the opam environment when they are loaded. Set that up? [y/N] y

User configuration:
~/.profile is already up-to-date.
[NOTE] Make sure that ~/.profile is well sourced in your ~/.bashrc.

user@dell-2017:$ opam switch create 4.07.0
[ERROR] No compiler matching '4.07.0' found, use 'opam switch list-available'
to see what is available, or use '--packages' to select packages
explicitly.
user@dell-2017:
$ opam switch create --package 4.07.0
opam: option --package': invalid element in list (4.07.0'): Invalid
character in package name "4.07.0"
Usage: opam switch [OPTION]... [COMMAND] [ARG]...
Try opam switch --help' or opam --help' for more information.
user@dell-2017:$ opam install dune core lwt re color sexp_pretty uutf lwt_ppx uuseg notty
[ERROR] No package named dune found.
[ERROR] No package named core found.
[ERROR] No package named re found.
[ERROR] No package named color found.
[ERROR] No package named sexp_pretty found.
[ERROR] No package named uutf found.
[ERROR] No package named lwt_ppx found.
[ERROR] No package named uuseg found.
[ERROR] No package named notty found.
user@dell-2017:
$ lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
user@dell-2017:~$ opam --version
2.0.8
`

Won't build. Deprecated warnings.

I get a bunch of "alert deprecated" errors when trying to build this on Arch:

File "src/colors.ml", line 34, characters 27-44: 34 | let h = Float.mod_float (Unix.gettimeofday ()) period /. period *. 360. in ^^^^^^^^^^^^^^^^^ Error (alert deprecated): module Core_kernel.Unix [since 2020-03] Core_kernel shadows Unix. Use Core.Unix, which overrides some of Unix's behavior. If necessary, Unix is available and unshadowed as Caml_unix. File "src/colors.ml", line 34, characters 27-44: 34 | let h = Float.mod_float (Unix.gettimeofday ()) period /. period *. 360. in ^^^^^^^^^^^^^^^^^ Error: Unbound value Unix.gettimeofday File "src/splits.ml", line 6, characters 57-74: 6 | let curr_time = match now with Some t -> t | None -> Unix.gettimeofday () in ^^^^^^^^^^^^^^^^^ Error (alert deprecated): module Core_kernel.Unix [since 2020-03] Core_kernel shadows Unix. Use Core.Unix, which overrides some of Unix's behavior. If necessary, Unix is available and unshadowed as Caml_unix. File "src/splits.ml", line 6, characters 57-74: 6 | let curr_time = match now with Some t -> t | None -> Unix.gettimeofday () in ^^^^^^^^^^^^^^^^^ Error: Unbound value Unix.gettimeofday File "src/duration.ml", line 106, characters 22-39: 106 | between time_float (Unix.gettimeofday ()) ^^^^^^^^^^^^^^^^^ Error (alert deprecated): module Core_kernel.Unix [since 2020-03] Core_kernel shadows Unix. Use Core.Unix, which overrides some of Unix's behavior. If necessary, Unix is available and unshadowed as Caml_unix. File "src/duration.ml", line 106, characters 22-39: 106 | between time_float (Unix.gettimeofday ()) ^^^^^^^^^^^^^^^^^ Error: Unbound value Unix.gettimeofday File "src/loadsave.ml", line 5, characters 16-27: 5 | time : string sexp_option; ^^^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_option [since 2019-03] use [@sexp.option] instead File "src/loadsave.ml", line 24, characters 20-31: 24 | duration : string sexp_option; ^^^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_option [since 2019-03] use [@sexp.option] instead File "src/loadsave.ml", line 50, characters 21-32: 50 | golds : gold array sexp_option; ^^^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_option [since 2019-03] use [@sexp.option] instead File "src/loadsave.ml", line 51, characters 31-42: 51 | personal_best : archived_run sexp_option; ^^^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_option [since 2019-03] use [@sexp.option] instead File "src/loadsave.ml", line 52, characters 30-41: 52 | world_record : archived_run sexp_option; ^^^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_option [since 2019-03] use [@sexp.option] instead File "src/loadsave.ml", line 53, characters 25-34: 53 | history : archived_run sexp_list; ^^^^^^^^^ Error (alert deprecated): Core_kernel.sexp_list [since 2019-03] use [@sexp.list] instead Done: 95/109 (jobs: 1)%

error running flitter

When I run try to run flitter using flitter splits.scm (it doesnt detect my-splits.scm which is whats reccomended) it throws the error
`Uncaught exception:

(Failure
"Sexplib.Sexp.gen_load_sexp: EOF in splits.scm while in state Parsing_list")

Raised at file "stdlib.ml", line 33, characters 17-33
Called from file "src/pre_sexp.ml", line 682, characters 15-44
Re-raised at file "src/pre_sexp.ml", line 685, characters 33-42
Called from file "src/pre_sexp.ml", line 734, characters 13-40
Called from file "src/pre_sexp.ml", line 745, characters 23-59
Called from file "flitter/src/loadsave.ml", line 137, characters 13-58
Called from file "flitter/src/flitter.ml", line 14, characters 16-34
Called from file "flitter/bin/main.ml", line 1, characters 9-23`
what do i do?

After getting around some installation issues on macOS, no response to global hotkeys.

I'm on macOS High Sierra 10.13.6 and encountered the same issues as @slashinfty in #15, but got past them. However, the application does not respond to any of the global hotkeys.


First though, it should be mentioned that at first I skipped opam switch 4.07.0 because it asked if I meant opam switch create 4.07.0 instead. I figured I'd take my chances with the newer version I had installed (4.09.x) than do something that seemed semantically different. Later in a second attempt I came back to try opam switch create 4.07.0.

Either way, on dune build I got the message about uuseg, lwt_ppx, and uutf being missing. (And one of the hints has a typo, saying to install uuset instead of uuseg.) After installing these, in my first attempt with 4.09.x I got the same as @slashinfty, about pp_set_formatter_tag_functions being deprecated. But on my second attempt with 4.07.0, I had less errors, only this:

$ dune build
File "_none_", line 1:
Warning 58: no cmx file was found in path for module Toploop, and its interface was not compiled with -opaque
File "vendor/notty/lwt/notty_lwt.ml", line 68, characters 25-64:
Error: This expression has type (unit -> unit) Lwt.t
       but an expression was expected of type unit Lwt.t
       Hint: Did you forget to provide `()' as argument?

Opening up vendor/notty/lwt/notty_lwt.ml and changing

Lwt.async (fun () -> Lwt_stream.closed stream >|= fun _ -> f);

to

Lwt.async (fun () -> Lwt_stream.closed stream >|= fun _ -> f ());

fixed this for me, despite warnings. I was then able to dune install and run flitter examples/my-splits.scm:

image

Unfortunately, none of the global hotkeys do anything, whether or not the terminal is focused.

If the author would like to pair on solving this issue for macOS, happy to offer my time in exchange for guidance. @alexozer

Don't show live delta until behind

Actually, it seems that Livesplit's rule is to show the delta only when it is worse than the gold segment: LiveSplit/LiveSplit#979

The question is how to handle segments that don't yet have a gold (yet have a PB split time), and when the previous split was deleted.

Exception when running example splits: Failure "Hotkeys stream exited unexpectedly"

I've successfully built flitter but when I try to run flitter splits.scm with the example, I see the timer as it's shown in the screenshot for just a moment then get the following error:

Uncaught exception:
  
  (Failure "Hotkeys stream exited unexpectedly")

Raised at file "src/event_loop.ml", line 169, characters 4-241
Re-raised at file "src/core/lwt.ml", line 2987, characters 20-29
Called from file "src/unix/lwt_main.ml", line 26, characters 8-18
Called from file "bin/main.ml", line 1, characters 9-23

I ran opam list and lwt is the latest version, 4.1.0. Also using opam 2.0.0 and ocaml 4.07.0 but on debian 9 stable. I installed opam manually from the unstable repo.

dune build wont work

typing dune build turns int this

File "src/dune", line 4, characters 53-64:
4 | (libraries core lwt.unix notty notty.unix re color sexp_pretty)
^^^^^^^^^^^
Error: Library "sexp_pretty" not found.
Hint: try: dune external-lib-deps --missing @@default

Trying the hint turn int this

  • color
  • core
  • lwt.unix
  • lwt_ppx
  • notty
  • notty.unix
  • ppx_sexp_conv
  • re
  • sexp_pretty
    Hint: try: opam install color core lwt lwt_ppx notty ppx_sexp_conv re sexp_pretty

trying this hint leady to this

[NOTE] Package sexp_pretty is already installed (current version is v0.12.0).
[NOTE] Package re is already installed (current version is 1.9.0).
[NOTE] Package ppx_sexp_conv is already installed (current version is v0.12.0).
[NOTE] Package notty is already installed (current version is 0.2.2).
[NOTE] Package lwt_ppx is already installed (current version is 2.0.1).
[NOTE] Package lwt is already installed (current version is 5.4.0).
[NOTE] Package core is already installed (current version is v0.12.4).
[NOTE] Package color is already installed (current version is 0.2.0).

If I try dune build again I get the same problem over and over again even if i close and reopen the terminal
I'm in ubuntu linux

Disable drawing of background in terminal

Hi everyone :)

I'm not very experienced with Ocaml, and I'd really like to figure out how to run Flitter without drawing a background in the terminal (ie use whatever the terminal background is). This is because I'd like to set my terminal to transparent so I can use Flitter as an overlay. I've already tried changing the background color in colors.ml, but afaik the RGB format used does not support transparency. If anyone can point me towards the right part of the code to modify I'm sure I can handle the rest. Thank you!

Sum of best drops when I quit and relaunch flitter

Hi!
First of all, I just want to say that I love flitter and I think it's the best speedrun timer to use on linux.
I'm however experiencing an issue where the sum of best drops in time after I quit and relaunch flitter.

So as an example: I finished a run yesterday. Had a gold split and sum of best went down to 15:30.x (accurate) I press space after the run is done and the timer clears and everything looks good.
I press 'q' to quit. I then start flitter again and the layout now says the sum of best is 15:28.x

I'm not sure what the issue is.
Also the terminal I'm using to run flitter in is cool-retro-term to make it look a little nicer. Not sure if that's related to the issue, but after flitter has been running for a while and I quit it, there's some garbage output in the terminal upon exit.

Here is a twitch clip of it happening. I had just finished a run and the sum of best was 15:30. I quit flitter and cleared the garbage terminal output and restarted flitter and the sum of best went down to 15:28.

https://clips.twitch.tv/MoistKitschyGarlicNerfRedBlaster

Hoping to get this resolved so my golds can be accurate.
Thanks.

Dune build & install

Minor inconvenience, but on the first attempt to build with dune, I was notified three libraries were not found (after installing dune core lwt re color sexp_pretty): uuseg, lwt_ppx, and uutf.

Then, I attempted dune build, and I received this:

$ dune build
File "vendor/notty/src/notty.ml", line 432, characters 6-36:
432 |       pp_set_formatter_tag_functions fmt
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_set_formatter_tag_functions
This function will erase non-string tag formatting functions. Use Format.pp_set_formatter_stag_functions.
File "vendor/notty/src/notty.ml", line 441, characters 41-52:
441 |     let pp_open_attribute_tag fmt attr = pp_open_tag fmt (A.to_tag attr)
                                               ^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_open_tag
Use Format.pp_open_stag.
File "vendor/notty/src/notty.ml", line 458, characters 47-59:
458 |       pp_open_attribute_tag fmt attr; f fmt a; pp_close_tag fmt ()
                                                     ^^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_close_tag
Use Format.pp_close_stag.
File "vendor/notty/lwt/notty_lwt.ml", line 128, characters 6-24:
128 |       Lwt_sequence.add_r (fun () -> release t) Lwt_main.exit_hooks |> ignore;
            ^^^^^^^^^^^^^^^^^^
Alert deprecated: module Lwt_sequence
 Use package lwt-dllist. See
   https://github.com/mirage/lwt-dllist
File "vendor/notty/lwt/notty_lwt.ml", line 128, characters 47-66:
128 |       Lwt_sequence.add_r (fun () -> release t) Lwt_main.exit_hooks |> ignore;
                                                     ^^^^^^^^^^^^^^^^^^^
Alert deprecated: Lwt_main.exit_hooks
 Use module Lwt_main.Exit_hooks.
File "_none_", line 1: 
Warning 58: no cmx file was found in path for module Toploop, and its interface was not compiled with -opaque
File "vendor/notty/lwt/notty_lwt.ml", line 128, characters 6-24:
128 |       Lwt_sequence.add_r (fun () -> release t) Lwt_main.exit_hooks |> ignore;
            ^^^^^^^^^^^^^^^^^^
Alert deprecated: module Lwt_sequence
 Use package lwt-dllist. See
   https://github.com/mirage/lwt-dllist
File "vendor/notty/lwt/notty_lwt.ml", line 128, characters 47-66:
128 |       Lwt_sequence.add_r (fun () -> release t) Lwt_main.exit_hooks |> ignore;
                                                     ^^^^^^^^^^^^^^^^^^^
Alert deprecated: Lwt_main.exit_hooks
 Use module Lwt_main.Exit_hooks.

I installed lwt-dllist. When I attempted dune install after, I got:

Error: The following <package>.install are missing:
- _build/default/flitter.install
- _build/default/vendor/notty/notty.install
Hint: try running: dune build @install

Then I got to this with dune build @install:

File "vendor/notty/src/notty.ml", line 432, characters 6-36:
432 |       pp_set_formatter_tag_functions fmt
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_set_formatter_tag_functions
This function will erase non-string tag formatting functions. Use Format.pp_set_formatter_stag_functions.
File "vendor/notty/src/notty.ml", line 441, characters 41-52:
441 |     let pp_open_attribute_tag fmt attr = pp_open_tag fmt (A.to_tag attr)
                                               ^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_open_tag
Use Format.pp_open_stag.
File "vendor/notty/src/notty.ml", line 458, characters 47-59:
458 |       pp_open_attribute_tag fmt attr; f fmt a; pp_close_tag fmt ()
                                                     ^^^^^^^^^^^^
Error (alert deprecated): Stdlib.Format.pp_close_tag
Use Format.pp_close_stag.

I'm now at a point I can't continue.

Rerouting should not be so hard

Currently, if I want to reroute, I have to hand-edit my file. I can use the sexp utility to make it a little easier, but not by much.

I don't have any concrete requests yet, and I imagine that I could implement any features myself. This is more of a placeholder.

Dune build fails and takes ages to install

why do i have to install so much fucking dependencies, seriously, installing opam and all this shit took 1 hour and 30 minutes and now dune tells me to install more dependencies, can't you just compile this yourself and make it a release?

Issue with color.ml

Hi,
I managed to install opam & the dependencies but when I try 'dune build' I get following error:

File "src/colors.ml", line 5, characters 8-26:
Error: Unbound value Color.of_hexstring
Hint: Did you mean to_hexstring?

I played around with the code, but i have no clue about ocaml, so I stopped after some fruitless tries. I hope you can figure out by these lines what is going on.
Regards

Unbound value error when running "dune build"

When I try to run dune build I get the following error:

File "src/colors.ml", line 5, characters 8-26:
Error: Unbound value Color.of_hexstring
Hint: Did you mean to_hexstring?

I tried following the hint and got a type error.

Tag releases

For downstream package maintainers it would be great to have release tags!

Delta doesn't work

Whenever I have a history in the .scm files, the delta shows a dash instead of an actual delta.

Screenshot_2021-05-22_17-21-32

scm file:

((title     "Top Gear 2 (SNES)")
 (category  USA%)
 (attempts  6)
 (completed 4)
 (split_names ("Las Vegas" "Los Angeles" "New York" "San Francisco"))
 (golds (
   ((title "Las Vegas")     (duration 2:06.271))
   ((title "Los Angeles")   (duration 2:24.423))
   ((title "New York")      (duration 2:19.256))
   ((title "San Francisco") (duration 2:50.358))))
 (history (
   ((attempt 4)
    (splits (
      ((title "Las Vegas")     (time 2:06.271) (is_gold false))
      ((title "Los Angeles")   (time 4:36.334) (is_gold false))
      ((title "New York")      (time 7:01.173) (is_gold false))
      ((title "San Francisco") (time 9:51.531) (is_gold true)))))
   ((attempt 3)
    (splits (
      ((title "Las Vegas")     (time 4:14.414)  (is_gold false))
      ((title "Los Angeles")   (time 6:38.837)  (is_gold true))
      ((title "New York")      (time 9:07.203)  (is_gold false))
      ((title "San Francisco") (time 11:58.386) (is_gold true)))))
   ((attempt 1)
    (splits (
      ((title "Las Vegas")     (time 2:11.959)  (is_gold false))
      ((title "Los Angeles")   (time 4:52.367)  (is_gold false))
      ((title "New York")      (time 7:27.047)  (is_gold false))
      ((title "San Francisco") (time 10:23.414) (is_gold true)))))
   ((attempt 0)
    (splits (
      ((title "Las Vegas")     (time 2:11.120)  (is_gold true))
      ((title "Los Angeles")   (time 4:48.601)  (is_gold true))
      ((title "New York")      (time 7:07.857)  (is_gold true))
      ((title "San Francisco") (time 10:10.049) (is_gold true))))))))

Timer doesn't show with many splits

Hi,
I was configuring my splits file for a run and wanted to test the display. But unfortunately, the main timer doesn't show, nor the splits are scrolling when I mark 2-Ca (in the example below) as complete... Is there a way to get around this ?
image

After installing lwt_ppx, uutf, and uuseg, can't dune build due to some error

Followed the build instructions up until dune build. I manually installed the three missing libraries (as seen in other issues) but now I'm getting the following error:

File "vendor/notty/lwt/notty_lwt.ml", line 68, characters 25-64:
Error: This expression has type (unit -> unit) Lwt.t
       but an expression was expected of type unit Lwt.t
       Hint: Did you forget to provide `()' as argument?

I have absolutely no experience with OCaml so I don't know how to continue with this. Is there a workaround?

Edit: seems like PR #17 fixes this

Opam switch error

On a fresh Ubuntu 20.04 install, got this error

$ opam switch 4.07.0
[ERROR] No switch 4.07.0 is currently installed. Did you mean 'opam
    switch create 4.07.0'?
    Installed switches are:
      - default

Should the create option be used?

Comparing initial segments of many routes

I run a game where the leaderboard has many different routes, but many routes share an initial segment, or even several initial segments in a path. It would be nice to have ways to compare those initial segments.

dune build

hi im having some issues

I have done all the steps up to the command dune build when I try it, it gives me bash: /usr/bin/dune: No such file or directory the only thing I havnt done is doing it as a root user

if you can respond that would be great im trying to get into speed running

update
I realised I was dumb and I cloned and downloaded all the files but it still doesn't work
when I do dune build it gives me The program 'dune' is currently not installed. You can install it by typing: sudo apt install whitedune

"Unbound module Core_kernel" Error when running "dune build"

I have multiple unbound value errors when I run "dune build":

nameofuser@iMac flitter % dune build

File "src/colors.ml", line 1, characters 5-16:
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

File "src/splits.ml", line 1, characters 5-16:
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

File "src/duration.ml", line 1, characters 5-16:
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

File "src/big.ml", line 1, characters 5-16:    
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

File "src/hotkeys.ml", line 1, characters 5-16:
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

File "src/loadsave.ml", line 1, characters 5-16:
1 | open Core_kernel
         ^^^^^^^^^^^
Error: Unbound module Core_kernel

When I run opam list, there is this entry :

core_kernel v0.16.0

I have no idea how I could fix this problem

flitter not found

west@pop-os:~/flitter$ dune build
File "src/dune", line 5, characters 27-40:
5 | (preprocess (pps lwt_ppx ppx_sexp_conv))
^^^^^^^^^^^^^
Error: Library "ppx_sexp_conv" not found.
Hint: try:
dune external-lib-deps --missing @@default

however,

west@pop-os:~$ opam install dune core lwt re color sexp_pretty uutf lwt_ppx uuseg notty
[NOTE] Package notty is already installed (current version is 0.2.2).
[NOTE] Package uuseg is already installed (current version is 15.0.0).
[NOTE] Package lwt_ppx is already installed (current version is 2.0.1).
[NOTE] Package uutf is already installed (current version is 1.0.3).
[NOTE] Package sexp_pretty is already installed (current version is v0.12.0).
[NOTE] Package color is already installed (current version is 0.2.0).
[NOTE] Package re is already installed (current version is 1.10.4).
[NOTE] Package lwt is already installed (current version is 5.5.0).
[NOTE] Package core is already installed (current version is v0.12.4).
[NOTE] Package dune is already installed (current version is 3.7.0).

no package called external-lib-deps is available, and installing depext leaves me with nothing

west@pop-os:$ opam install depext
[ERROR] depext unmet availability conditions, e.g. 'opam-version >= "2.0.0
beta5" & opam-version < "2.1"'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.