time to pivot again
This commit is contained in:
77
human.ml
77
human.ml
@ -1,3 +1,39 @@
|
||||
(*
|
||||
|
||||
1. implement toplevel eval of git repo content
|
||||
1. eval `/init` on startup for now
|
||||
1. start looking under the hood of js_of_ocaml top level to see if
|
||||
1. there are ways to display and allow easy manipulation of the values used when calling
|
||||
Irmin.S.Tree.fold on things.
|
||||
1. Make sure js_of_ocaml toplevel and native top level of ocaml 5.0
|
||||
are reasonably compatible in this "under the hood" stuff
|
||||
1. save all JSOOTOP input into a history file that gets committed for each command!!
|
||||
1. Build a text editor based on irmin-tree?
|
||||
1. What you really want is a data structure that is easy for you to call commands on to manipulate the values of
|
||||
irmin stores
|
||||
1. If you go by the default, a text file is split into a list of lines,
|
||||
which has a cursor which is an index into the list of lines, and an index into the specific line.
|
||||
1. Various common cursor movement commands should be bound to the common keys
|
||||
1. A display of the cursor data structure values
|
||||
1. these commands just mutate the cursor state, so the text editor is just the structure of the Lwd.vars which are Lwd.get'd and mapped against the Tree.watch ified stuff???
|
||||
ughhh
|
||||
|
||||
1. but yea fold being
|
||||
|
||||
|
||||
1. fix fetching of `console/boot` so it doesn't crash and can deal!!!!
|
||||
1. like just tell it to fetch teh latest commit or something
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*)
|
||||
|
||||
(* why *)
|
||||
|
||||
(*
|
||||
@ -3268,47 +3304,6 @@ module Widgets = struct
|
||||
| [ (`Backspace, []) ] -> `Unhandled
|
||||
| _ -> `Unhandled)))
|
||||
|
||||
(* let cursorview =
|
||||
Lwd.var @@ Lwd.pure @@ string "initializing..."
|
||||
in
|
||||
let cv, push_cv = Lwt_stream.create () in
|
||||
let cvroot =
|
||||
Lwd.observe ~on_invalidate:(fun _ ->
|
||||
Log.info (fun m ->
|
||||
m
|
||||
"tree_nav cursorviewroot on_invalidate push_cv \
|
||||
triggered??");
|
||||
push_cv (Some ()))
|
||||
@@ Lwd.map (Lwd.get cursor) ~f:(function
|
||||
| Some cursor_row -> (
|
||||
match Lwd_table.get cursor_row with
|
||||
| Some (focus, step) -> (
|
||||
let path' = path @ [ step ] in
|
||||
Nav.S.kind store path' >>= function
|
||||
| Some `Node -> lwt_lwd_string "Sub-node??"
|
||||
| Some `Contents -> node_edit_area (store, path')
|
||||
| None ->
|
||||
lwt_lwd_string
|
||||
("Nav.S.kind " ^ String.concat "/" path'
|
||||
^ " -> None?"))
|
||||
| None ->
|
||||
lwt_lwd_string "cursor table row doesn't exist")
|
||||
| None -> lwt_lwd_string "cursor doesn't exist")
|
||||
in
|
||||
Lwt.async (fun () ->
|
||||
Lwt_stream.iter_s
|
||||
(fun _ ->
|
||||
Lwd.quick_sample cvroot >>= fun cursorview'' ->
|
||||
Log.info (fun m ->
|
||||
m "tree_nav Lwt.async (Lwd.set cursorview)");
|
||||
Lwt.return (Lwd.set cursorview cursorview''))
|
||||
cv);
|
||||
push_cv (Some ()); *)
|
||||
(*|> Lwd.map2
|
||||
(Lwd.join @@ Lwd.get cursorview)
|
||||
~f:(fun cursorview' tree_view ->
|
||||
Ui.join_x tree_view cursorview') *)
|
||||
|
||||
open Lwt.Infix
|
||||
|
||||
let rec node_ui ?(focus = Focus.make ()) store path
|
||||
|
||||
Reference in New Issue
Block a user