Re: bump to 4.03

2019-11-23 Thread Simon Cruanes
I was told that bucklescript is still on OCaml 4.02, but it seems they
also maintain 4.06. Anyone knows more about that subject?

-- 
Simon Cruanes


signature.asc
Description: PGP signature


[containers-users] bump to 4.03

2019-11-20 Thread Simon Cruanes
Next version of containers might require 4.03,
as discussed here:
https://github.com/c-cube/ocaml-containers/issues/274

Comments are welcome! :)

-- 
Simon Cruanes


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] discord channel

2018-11-02 Thread Simon Cruanes
Le Fri, 02 Nov 2018, SP wrote:
> Please don't put the list away, crickets need a place too and they don't tend 
> to like fad-y closed systems.  :)

Fair enough :-)  

-- 
Simon Cruanes


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


[containers-users] discord channel

2018-11-02 Thread Simon Cruanes
Hi everyone,

Fyi there's now a #containers channel on the OCaml discord
(cf https://discuss.ocaml.org/t/ocaml-discord-server/1884) and  I'll
try to be there to discuss as often as possible. Unless people here
complain I'm considering eventually removing the mailing list as it's
mostly crickets chirping and my occasional ramblings.

Cheers!

-- 
Simon Cruanes


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Possible additions to Containers and Friends

2018-03-06 Thread Simon Cruanes
Of course I spoke too soon, and missed so validation cases (that would
have been accepted by Peter's code).

In particular, I just learnt about some interesting corner cases of UTF8,
namely overlong encodings.

If anyone is knowledgeable about UTF8, reviewing the code would be
greatly appreciated!

Cheers! :)


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Possible additions to Containers and Friends

2018-03-06 Thread Simon Cruanes
I merged and adapted the code from Peter:

https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.mli
https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.ml

it's stricter (only accepts valid UTF8) and the random tests should
ensure that it agrees with Uutf on what is valid utf8, and on the list
of codepoints of a valid UTF8 string.

The code is not that complicated: encoding is 25 lines, decoding is 67
lines. I had to rewrite part of it to make it strictly UTF8 compliant.

Comments very welcome! And thanks again to Peter, without whom I'd never
have had the courage to do it.

-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Possible additions to Containers and Friends

2018-02-25 Thread Simon Cruanes
Well, there's the standard uchar type, I think compatibility is achievable :) ___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Possible additions to Containers and Friends

2018-02-24 Thread Simon Cruanes
Le Sat, 24 Feb 2018, Drup wrote:
> Shouldn't we just standardize on bunzli's libraries (including the new
> https://github.com/dbuenzli/utext) instead of trying to re-write code that
> usually ends up being quite subtle in each standard library ?

We could build on uutf, it's relatively small and doesn't have too many
deps. However, I also don't think utf8 is that complicated that we
couldn't just redo the codepoint<-> byte conversions in a simpler (and
arguably lower overhead) way. In particular,
`Utf8string.to_seq : t -> codepoint sequence` could be faster than
calling uutf with all its poly variants.

For utext, meh. It's not stable yet, and relies on a complicated non
standard underlying vec structure. Ustring (or Utf8string, possibly, as
it's the only reasonable string to support) should be a (possibly
private) alias to string. There should be a similar Utf8buffer where you
can push/pop codepoints and append other Utf8buffers.


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Request for comments on BiMap

2018-02-24 Thread Simon Cruanes
Le Sat, 24 Feb 2018, Drup wrote:
> Why not call this "Bijection" or "BijMap" ? BiMap simply implies two maps.
> This a bit more specific.

It makes sense! `Bijection` is about the intent, `BiMap` ties to an
implementation. However if we change the name we still have to convey
that it's a functional bijection (rather than imperative).


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Request for comments on BiMap

2018-02-23 Thread Simon Cruanes



>Shall I revert the order for this module, or has the "new convention"
>have to be upheld?

Put the map last, as is convenient for piping. 

-- 
Simon 

___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] Commentaires Containers - questions diverses

2018-02-02 Thread Simon Cruanes
gt; connaissances sont trop faibles pour pouvoir écrire du texte technique
> pertinent).

I agree. Even a few lines at the beginning explaining what the intended
use is, would be useful.

> * Rem: le module CCMonomorphic semble important. Quelqu'un (jpdeplaix ?)
> écrive une présentation dans CCMonomorphic.mli.
> 
> Sinon, j'ignore tes intentions mais j'espère que tu vas continuer à
> développer Containers.

I do intend to continue :-)

> Je suis curieux de voir l'influence que va avoir Base (avec l'arrivée
> annoncée d'une documentation, la ré-écriture des exemples de RWO et la
> propagande de JST ...) .

Base seems to have a good design but I don't want to rewrite tens of
thousands of lines of code (probably not far from 100k) just because
they decided to be incompatible with the stdlib.

> Je serais également curieux d'avoir l'avis des Gourous OCaml (qui refusent
> presque toutes modifs de la Std librairie) à propos de Base.
> En faisant 'open Base' et en tapant les tout premiers exemples de la doc
> OCaml officielle on reçoit des tonnes de "Warning - deprecated" mais aussi
> des erreurs sur du code très très basique (# (1 < 2) = false) . C'est quand
> même chaud !
> 
> Mais bon, si c'est l'avenir.

^^
who knows…

> PS : lors des élections de novembre prochain tu vas être aux premières
> loges pour assister au basculement politique du Texas (même si Austin est
> déjà démocrate ). Le Texas. Un Blue State. MAGA !!!

Heh, wait and see! 


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


[containers-users] hashing

2016-06-16 Thread Simon Cruanes
Hello,

I released 0.18 a few days ago, a small release. There are a few
deprecated functions around containers right now, but I'm considering a
possibly more breaking change.

The module CCHash (in core) is one of the modules I dislike the most, as
I had to write a custom hash function, and the type of hasher:

type 'a hash_fun = state -> 'a -> state

is pretty annoying to work with in practice. Hashtbl.Make, for instance,
requires `val hash : 'a -> int`. I am considering replacing this module
with a new one, that would be based on `'a hash_fun = 'a -> int` (only
positive ints), and combine hashes using variants of `Hashtbl.seeded_hash`.
Something like

```
type 'a hash_fun = 'a -> int

val hash : 'a hash_fun  (* hashtbl.hash *)
val int : int hash_fun
val string : string hash_fun
(* ... *)

val combine : int -> int -> int (* hashtbl.seeded_hash *)

val hash_list : 'a hash_fun -> 'a list hash_fun
(* relies on combine *)

val pair : 'a hash_fun -> 'b hash_fun -> ('a * 'b) hash_fun
(* relies on combine *)
```

Opinions on this? Would this break anyone's code except mine?

-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


[containers-users] CCKMP should be... yeah, deprecated

2016-03-09 Thread Simon Cruanes
Once more!

Currently I don't use `containers.string` much, although I do use
CCString basic features. I think having the functorial interface of
CCKMP [1] is nice, but it would be better in its own small opam library.
On the other hand, I plan to have a simple version of the algorithm
moved into CCString so it can make string search more efficient
(including all the split functions that rely on string search).

Cheers!

[1] Knuth Morris Pratt substring search 
(https://en.wikipedia.org/wiki/Knuth–Morris–Pratt_algorithm)


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users


Re: [containers-users] more deprecations(!), overview of next release

2016-02-25 Thread Simon Cruanes
Le Thu, 25 Feb 2016, Nils Becker a écrit :
> congrats on the new release. i think the tutorial is an excellent idea.
> it's inviting, and it's a super efficient way for someone to decide if a
> library is what he/she needs. every project should have one.

Thanks! 0.16 is a big release, and the project needs to move forward, so
I hope it will help potential users to decide. I also feel like there
the rate at which newcomers ask about stdlib(s) on #ocaml has increased :)

Cheers!

-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6


signature.asc
Description: PGP signature
___
Containers-users mailing list
Containers-users@lists.ocaml.org
http://lists.ocaml.org/listinfo/containers-users