I’ve tried something recently in a project with Dream.
Suppose you have an url like /page/param1/param2/ : you want to be able to do three things:
Of course, some pages will have two arguments, some other three, and you have to find a way represent this in the type system.
For this, I’ve used a gadt:
type ('a, 'b) t = | Static : string * ('a, 'b) t -> (unit -> 'a, 'b) t | Int : string * ('a, 'b) t -> (int64 -> 'a, 'b) t | String : string * ('a, 'b) t -> (string -> 'a, 'b) t | End : ('a, 'a) tThe string is the parameter name in the url (id, login, …) and the gadt make the representation for this parameter in the type system. This gives me a way to declare some urls in the application:
val root : (unit -> 'a, 'a) t (** The path to root / *) val topic_url : (string -> 'a, 'a) t (** The path to /:topic *) val thread_url : (string -> int64 -> 'a, 'a) t (** The path to /:topic/:thread *)Then I have some some functions wihch handle this gadt:
val repr : (unit -> ('a, 'b) t) -> string (** Represent the route associated with this path *) val unzip : (unit -> ('a, 'b) t) -> (string -> string) -> 'a -> 'b (** Extract the parameters from the request. [unzip path extract f] will apply the function extract for all the arguments in the path, and gives them to f The function [extract] is given in argument in order to break dependency circle. This should be something like: let extract_param request name = Dream.param request name |> Dream.from_percent_encoded *)J’allais le proposer ! Les mises a jours sont fréquentes et le jeu est très riche.
Mon seul regret est la gestion de la difficultés, qui se fait en appliquant des coefficients de plus en plus penalisants. Je trouve que ca ne permet pas de réfléchir aux différentes stratégies dans chaque parties, ca donne plutôt le sentiment d’avoir “une” stratégie gagnante, qui oblige a suivre un chemin de plus en étroit quand on monte en difficulté
Je ne comprend pas les axes :
Cela aurait fait sens si le deuxième axes indiquait le nombre d’habitants, mais là, je n’arrive pas a me représenter la diagonale du graphique
Sinon !lemmy.world/c/piracy est une bonne source
I’ve made something very close, which create a mapping following the window name (windows/xlib)
git.chimrod.com/smartcropad.git/about/
I’ve made it for circuit python, and it works with a serial connexion / JSON messages. (It could be updated with raw USB )
Not yet finished, but already used daily.
Je suis bien d’accord, disais ca dans le sens ou quel que soit le prix que l’on est prêt a mettre, ca vaudra toujours moins cher que ce qu’il nous apporte !
C’est juste inestimable un bon lit !
I’m using passwordstore + self hosted git server.
Passwordstore uses gpg for the encryption layer which combine fine with ssh (used to connect to the private repo).
I’m using qtpass as gui and there is also a client for Android named password store