mackwic
Joined 13 years ago
Joined 13 years ago
Give it a try !
If you have a direct or indirect contractual relationship with the person whose PII you are storing, there is nothing more to do. If you don't, ask for permission and store the timestamp of the authorization.
That's all. Really it's that simple.
It's a matter of fact that the EU is still more open to commerce from US, than the US is with the EU.
Would it be 4 women and 4 men, it would still be out of context and not right. I don't know if it's more jackass or more redneck, anyway it's not something that should be encouraged.
Congrats on the steady advance anyway. It's been a pleasure to use scaleway so far.
Interested by complexes challenges: Kernels, Compilers, or any complex applications, always open to learn new things.
Location: France
Remote: No
Willing to relocate: Yes
Technologies: C, Rust, Ruby, Ocaml, Backend (RoR, Node.js), DevOps (Linux, Debian, CoreOs, CM, AWS)
Résumé/CV: https://fr.linkedin.com/in/thwickham
Email: mackwic+hn @ gmailNot close to death, it's just not a unicorn. They can IPO whenever they want as long as they claim a correct valuation.
> Although perhaps writing code in OCaml has made me somewhat overconfident in my code
Many Ocamlers could be caught of overconfidence. It's hard to understate how ML typing help seeing the data flow.
I am amazed to see how the MirageOS team used this, but this method cannot be used for all the code.
> As a side note, I usually see mocking being used to test badly structured code.
You could want to mock just because you are inspecting particular stack frames in a specific call stack, trying to reproduce a bug. It happens.
Yeah, I am a long date contributor and user of ocaml for little projects (mostly compilers and AIs). But not professionally.
> It's been years since I used OCaml and I don't know anything about OPAM so I'm also interested in the answers.
Opam is Bundler done right. It manages ocaml toolchains and packages dependencies. It's easy to pin a specific version or publish your own.
A setup oasis + ocamlbuild + $editor could go quite far. After that, it will depend of how you works and what you are developing.
> Like, testing is basically just checking a bunch of if statements. You can use fancy frameworks that color your tests red and green, but other than that kind of thing, what's the actual problem? Why do you say testing in isolation is particularly challenging with OCaml?
That is a very interesting question that deserve a blog post on its own. But I don't have the time nor the patience to do so, so let it be the HN comment.
> Like, testing is basically just checking a bunch of if statements.
Wrong ! There's multiple kind of "if statements to test";
-1- I want to test that `my_inner_fibo(0, 1) == 1`. This is unit test. Basically a transcript of the technical specifications into assertions. This is the easiest test, the most verbose, but it's also the kind that test the least.
-2- I want to test that `UserModule.retrieve_orders(user, command)` makes the good calls. This is integration testing in white box, which test that the API contracts between you inner interfaces are respected (which is also part of the technical specifications). I don't find it very useful but it's better than nothing when you can't do more.
-3- I want to test that, with a given state `user`, and `command`, when I call `UserModule.retrieve_orders(user, command)` I get exactly this object. This is integration testing in black box. This is useful to find errors in inner logic a group of modules (but you don't know immediately what gone wrong). As the call stack could be very large (and so the scope of what you are testing), you want to reduce the moving parts and replace some of the modules with trivial mocks. Integration testing in a black box test a lot of things and is very useful to find bugs.
-4- I want to test that a call to `$./my-binary ctl command --flag=true` have a specific behavior. Could also be a network request to a server, a message to a deamon, a click on a GUI... Anything exterior to the program. Here we test the behavior. This is what the user will use, that's why it's functional testing. This could break often (in the case of a GUI) or not (in the case of a CLI binary). You should always do functional testing if you respect you users a little.
All these kinds of testing have different requirements, and some need a perfectly controlled state to be created. The issue is not in the conditional testing, but in the setup this perfect controlled state, which sometimes need to make the code believe it use the good module, but you gave him a stubbed one which does trivial work, or signal you when something happens.
I don't know any simple way to spy on functions without using the MirageOS design which heavily use Functor injunction. It's quite an academic way of doing it.
- you create and manage the build of your project with Oasis which call ocamlbuild nicely
- Opam works great with ocamlfind to manage the dependencies and the toolchain you use
- OUnit has backgroud workers for parallel testing
- Merlin and ocamlc annotations do wonders in term of semantic completion
- utop is an excellent toplevel with colors, completion and integration with ocamlfind so that you can load dependencies inside
All these technologies have greatly improved in the past 2 years, which is a really short span compared to the age of Ocaml.
I saw some pieces of F# in the FinTech here and there, I think Microsoft could do a better job at marketing it because it really has great potential in the .Net ecosystem.