drup / dowsing Goto Github PK
View Code? Open in Web Editor NEW᚛ A type of divination employed in attempts to locate identifiers matching a given type expression
License: ISC License
᚛ A type of divination employed in attempts to locate identifiers matching a given type expression
License: ISC License
$ dowsindex save
dowsindex: internal error, uncaught exception:
IndexTypes.Bad_format("/Users/kit_ty_kate/.opam/default/lib/dose3-extra/dose_extra.cmt")
# opam config report
# opam-version 2.2.0~alpha~dev (c8f8f74b45e14379cff9811a9aefbbf1770d0da4)
# self-upgrade no
# system arch=arm64 os=macos os-distribution=homebrew os-version=12.0
# solver builtin-mccs+glpk
# install-criteria -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs 7
# repositories 1 (local), 2 (version-controlled)
# pinned 10 (git), 1 (rsync)
# current-switch default
# ocaml:native true
# ocaml:native-tools true
# ocaml:native-dynlink true
# ocaml:stubsdir /Users/kit_ty_kate/.opam/default/lib/ocaml/stublibs:/Users/kit_ty_kate/.opam/default/lib/ocaml
# ocaml:preinstalled false
# ocaml:compiler 4.13.0~beta1
$ dowsindex search "string -> string -> string" | grep "^Stdlib"
Stdlib__String.cat : string -> string -> string
Stdlib__Pervasives.(^) : string -> string -> string
Stdlib__Filename.concat : string -> string -> string
Stdlib__StringLabels.cat : string -> string -> string
Stdlib__Filename.chop_suffix : string -> string -> string
Stdlib__Pervasives.max : 'a -> 'a -> 'a
Stdlib__Pervasives.min : 'a -> 'a -> 'a
Stdlib__Fun.const : 'a -> 'b -> 'a
Stdlib__Pervasives.fst : 'a * 'b -> 'a
Stdlib__Pervasives.snd : 'a * 'b -> 'b
Stdlib__Obj.magic : 'a -> 'b
Stdlib__Pervasives.failwith : string -> 'a
Stdlib__Pervasives.invalid_arg : string -> 'a
I would have expected to see every functions duplicated with their corresponding Stdlib.<Module>
instead of just Stdlib__<Module>
(see #13)
Given most libraries nowadays use dune
and are packed, every functions will be technically available twice:
e.g.
$ dowsindex search "string -> string -> string" | grep "Js_of_ocaml_compiler"
Js_of_ocaml_compiler.Stdlib.String.cat : string -> string -> string
Js_of_ocaml_compiler__Stdlib.String.cat : string -> string -> string
Js_of_ocaml_compiler.Stdlib.Filename.concat : string -> string -> string
Js_of_ocaml_compiler__Stdlib.Filename.concat : string -> string -> string
Js_of_ocaml_compiler.Stdlib.Filename.chop_suffix : string -> string -> string
Js_of_ocaml_compiler__Stdlib.Filename.chop_suffix :
Realistically only the second one is ever used so it would be very handy to detect duplicates and only show the wrapped modules. (an optional argument can be available for users who want the unfiltered output)
Software engineering
Science
Indexation:
Les types « 'a -> 'a list -> 'a » et « 'x -> 'x -> 'x » ne devraient pas être unifiables (en l'état, le programme prétend y arriver avec { 'a = 'a list ; 'x = 'a list }).
Par l'axiome (Ass-0) et curryfication, les types "a -> 'a -> b" et "a -> b" devraient être unifiables avec { 'a = unit } ; de même pour "a -> 'a -> 'b" et "a -> b". Ce n'est pas le cas en l'état.
In your README.md you say:
"Database format
Serialization
To speed up database deserialization, we could use a format that allows random access in an mmap datastructure."
Why don't you use Berkely DB or something like this (a persistent on disk hash table) instead of mem maping a data structure?
L'unification boucle toujours, en particulier sur un « fold » ("('a -> 'b -> 'b) -> 'a list -> 'b -> 'b") mais aussi sur "int list -> 'a -> unit".
There are cases where we have to fall down to proper unification. In this cases, it would be nice if it was fast.
Ideally, the stat
function would have an option to give us a "hall of fame" of the slowest queries. There are cases where it's expected, but I think we should collect examples that are really out of line.
'X * int -> 'X
'a * 'b * 'c * ('a -> 'd) * ('b -> 'e) * ('c -> 'f) -> ('d * 'e * 'f)
Currently, the normal form is not stable by substitution. Tuples are represented as sorted arrays, this property is not preserved by substitution. There are 3 possible ways to fix it:
Also, one need to check that replacing a variable in the head position by an arrow is currently correctly handle.
L'unification boucle encore avec, par exemple, le type « 'a -> a -> 'a ».
To avoid crash when reading the database from the disk, a magic number corresponding to the version of Dowsing could be added at the start of the file.
Par l'isomorphisme (Ass-0), les types "unit * a" et "a" devraient être unifiables. La normalisation des deux types donne "(a)" (singleton) et "a", qui ne sont pas unifiés actuellement. On peut s'en sortir en traitant spécifiquement le cas d'un singleton dans [Type.make_tuple].
Currently, the handling of unifiers is a bit rough:
To understand better the behaviour of the program, several parts of the program should be benchmarked.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.