<Profpatsch>
“Several news stories have pointed out that this client was rewritten from scratch, as if that were the moral failing, instead of reusing existing code. That's not the problem.
<Profpatsch>
The problem is that it was rewritten from scratch without taking advantage of the lessons of the past. It makes the same mistakes all over again.
<hannes>
Profpatsch: I recently read this and thought: if the people would only know about types and proper testing ;)
<Profpatsch>
Now I’m really interested who wrote that piece of code.
<Profpatsch>
A git blame is in order.
<damjan>
Profpatsch: why is git blame interesting to you?
mort___1 has quit [Quit: Leaving.]
mort___ has joined #mirage
<Profpatsch>
Why not? Would be really alarming if it was written by someone with a high status at systemd, would it not?
<Profpatsch>
or somebody who claims to write resilient software on a systems level.
apostolis has joined #mirage
<Profpatsch>
I mean, if it was written by somebody relatively new or unknown I can understand, but then it begs the question why it was merged in the first place.
<Profpatsch>
(I don’t say I could write the C code better, that’s why I generally try to stay away from C)
<Profpatsch>
I don’t like that the command is called “blame” by the way, that’s another symptom of some deep problems in our community.
<damjan>
Profpatsch: even someone with "high status" can make mistakes
<hannes>
imho this is getting slightly off-topic for this channel -- where consensus is that writing any network-facing code in C in 2018 is reckless.
<damjan>
the troll-bait article is off-topic sure :)
<hannes>
(and i agree that "git blame" or blaming the author/committer won't lead to anything)
<apostolis>
Hi all, so may I then ask as to which is a good network library for OCaml. I do not want to deal with pointers, only with blobs of binary data.
<hannes>
it's not so much a question of whom to blame, but rather on how to instantiate automated services to not have such things happen again (in this case, it seems the selection of OCaml is sufficient)
<apostolis>
Well, yes I could use it. I glimsed at the code though and It appeared to have CStructs. Is there a higher level implementation?
<apostolis>
something like zeromq or nanomsg.
<hannes>
both TCP and TLS provide a mirage-flow (FLOW) module signature. on top of a flow, you can e.g. use mirage-channel.
<apostolis>
Ah, nice.
<hannes>
there are various zeromq bindings for ocaml, but i'm not sure whether any of them works with mirageos
<hannes>
you could ask on the mailing list, there are usually more developers around who have an idea what works there.
<apostolis>
I don't want something fancy, only something simple, because I am at the experimental phase.
<hannes>
i don't really understand your requirements. for sending authenticated and encrypted messages between two endpoints, TLS should be sufficient. you can use length-prefixed binary blobs.
<hannes>
Cstruct.t is the byte vector type used throughout MirageOS, backed by an OCaml BigArray.
<apostolis>
Not a problem, everything works, just looking for the simplest solution and it appears that mirage-flow is the answer.
<apostolis>
Just compiled my fist mirage uniK in Agda and I am excited.
<hannes>
apostolis: who's outputting the "module XXX (Time : ..) ... end" bits? afaict, the let start = ... is output by agda!?
<apostolis>
Agda simply implements the UniK module.
<apostolis>
so It implements the UniK.start function.
<apostolis>
I made the design choice to have Agda have the same internal representation as OCaml, except that OCaml's type system is more strict, there are types in Agda that cannot be represented by OCaml algebraic data types.
<apostolis>
All algebraic data types in Ocaml are representable in Agda with a similar looking algebraic data type.
<apostolis>
@hannes : I pass the function sleep to UniK.start.If I new the internal representation of a module In Ocaml, I could possibly pass the whole module.
<apostolis>
The analogue structure in Agda would be a record.