adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
orbifx2 has quit [Ping timeout: 264 seconds]
pierpal has joined #ocaml
dtornabene_ has quit [Remote host closed the connection]
dtornabene_ has joined #ocaml
dtornabene_ has quit [Remote host closed the connection]
two_wheels has quit []
pierpal has quit [Read error: Connection reset by peer]
zolk3ri has quit [Quit: Lost terminal]
ziyourenxiang_ has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
mfp has quit [Ping timeout: 252 seconds]
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
Algebr` has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
Algebr` has quit [Ping timeout: 244 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
pierpal has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
noddy2OOO has quit [Ping timeout: 252 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
enikar has quit [Ping timeout: 252 seconds]
pierpal has quit [Read error: Connection reset by peer]
keep_learning has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
adrien has quit [Ping timeout: 252 seconds]
enikar has joined #ocaml
adrien has joined #ocaml
sigma_g has quit [Ping timeout: 252 seconds]
sigma_g has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
tennix has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 272 seconds]
crowley95 has quit [Ping timeout: 276 seconds]
pierpal has joined #ocaml
crowley95 has joined #ocaml
sagotch has joined #ocaml
sagotch has quit [Ping timeout: 250 seconds]
mildtaste has joined #ocaml
sagotch has joined #ocaml
gravicappa has joined #ocaml
freyr69 has joined #ocaml
abel-abel has joined #ocaml
sagotch has quit [Ping timeout: 260 seconds]
sagotch has joined #ocaml
orbifx2 has joined #ocaml
bartholin has joined #ocaml
freyr69 has quit [Remote host closed the connection]
orbifx2 has quit [Ping timeout: 268 seconds]
slamzy has joined #ocaml
tennix has quit [Quit: WeeChat 2.2]
mfp has joined #ocaml
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
malina has joined #ocaml
rpcope has quit [Ping timeout: 244 seconds]
Guest51036 has joined #ocaml
Guest51036 has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
carlosdagos has quit [Quit: Connection closed for inactivity]
Ou42 has joined #ocaml
<Ou42> hello again. Fun MOOC student here. having trouble groking funtors, but get the idea, just not the implmementation
<Ou42> adfadf
<sagotch> do you have question?
<Ou42> having trouble working it, but yes
<Ou42> the homework is in 3 parts. I passed the first part, but I'm starting to doubt that I did it correctly and am just passing their grading mechansm
<Ou42> 1. Implement a module CharHashedType, compatible with the HashedType signature, where type t = char.
<Ou42> I did it by hand, typing everything out. I did not make a reference to HashedType just copied the structure from it.
<Ou42> but I have no clue wha tto do for the 2nd part. ( I have read posts to the forum & have looked on SO, but I don't get it )
<Ou42> 2. Use the module defined in the previous question to instantiate the Hashtbl.Make functor as a module CharHashtbl.
<Ou42> what do they mean by instantiate?
<sagotch> Could you give the link please?
<Ou42> dunno if it'll work if you aren't signed up, but the class is free and reg closes Nov 25... class ends Dec 12
<sagotch> https://caml.inria.fr/pub/docs/manual-ocaml/libref/Hashtbl.html -> Have a look at the "Functorial interface" chapter
<sagotch> It "instantiate` a module use Hasthbl.Make
<sagotch> using*
<Ou42> awesome. TYVM
<sagotch> np
<Ou42> FWIW I had been to that page. The HW either linked to it or linked to a page that linked to it. Never caught this -> module IntHashtbl = Hashtbl.Make(IntHash)
<Ou42> There are strange forces at work here. Strange powerful forces that don't want me to learn FUnctional Programming. ;o)
asymptotically has joined #ocaml
<Ou42> I was attempting something like: module CharHashTbl = (CharHashedType() (* OR *) module CharHashTbl ( H : Hashtbl.Make) : CharHashedType ...
<Ou42> and yet, it was so much the more simple. go figure! TYVM again.
<enikar> it's a funny problem with trie, I've liked this one.
<Ou42> I'm not up to the Trie part yet ( that's the 3rd part ) I'm still trying to get the grader to accept sagotch's insights. ;o)
TC01 has quit [Ping timeout: 268 seconds]
malina has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 244 seconds]
malina has joined #ocaml
pierpal has joined #ocaml
<Ou42> dag nab it! this thing hates me! :p CharHashtbl is NOT the SaMe as CharHashTbl ... gRrRrRrRr
<enikar> programmation is a very accurate activity ;)
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
abel-abel has quit [Read error: Connection reset by peer]
bartholin has quit [Remote host closed the connection]
iAmDecim has joined #ocaml
<Ou42> I'm not convinced that case-sensativity is a good thing. but to each their own.
malina has quit [Remote host closed the connection]
<enikar> I use an editor with smart completion, that solves this issue.
picolino has quit [Ping timeout: 244 seconds]
<Ou42> @enikar good point. Laziness on my part. The course uses a web interface and I'm leaning on it instead. It does lack a few bells and whistles but has more than the standard toplevel. Kinda a mixed bag.
picolino has joined #ocaml
<enikar> Ou42: I've completed the course. I made all code vith vim, tested with utop (an ocaml toplevel), and copy/paste the code in their environment. Thus, I kept all code I've written (with also all text of exercices).
<Ou42> I've not yet made the jump to vim ( or emacs ), but have read that both well support OCaml. I'm using notepad++ and am copying out of the web interface and into npp and saving the files. Time will tell if I'll go back and study them later. Still amazed at how easily I stumble.
jao has joined #ocaml
<enikar> emacs have a nice support with tuareg and merlin. It's neat.
<Ou42> if I may ask, then why stick with vim?
<Ou42> ( not trying to start a flame war!! ) I'm honestly just curious.
<enikar> because, I'm more confortable with vim.
<Ou42> too simple. way to easy
<Ou42> don't they both have the modes to made it easier for ppl to switch?
<Ou42> ie an "emacs" mode for vim and a "vim" mode for emacs?
<Ou42> gonna call it a night. TY sagotch & enikar. TTFN
<enikar> there is a viper mode on emacs that mimics vi, but it's not vim…
<Ou42> OK. a little side learning accomplished. Thanks for the chat. c'ya around. oh and congrats on finishing the course!
<Ou42> I'm 58% done. ;o)
<Ou42> TTFN ( Ta Ta For Now - Tigger )
Ou42 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<enikar> this is a very attractive course, I got 100%
<enikar> …
zolk3ri has joined #ocaml
jaar has joined #ocaml
themsay has joined #ocaml
asymptotically has quit [Remote host closed the connection]
asymptotically has joined #ocaml
themsay has quit [Ping timeout: 244 seconds]
themsay has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
jao has joined #ocaml
jao has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ocaml
Haudegen has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 276 seconds]
<theblatte> opam2 question: how can I specify which compiler to use when creating a local switch?
<theblatte> $ opam switch create . ocaml-variants.4.06.1+flambda
<theblatte> [ERROR] The selected switch /data/users/jul/infer is not installed. Please choose a different one using 'opam switch <name>', or use the '--switch <name>' flag.
<theblatte> same error message with `opam switch create . --empty`
notnotdan has quit [Quit: leaving]
sagotch has quit [Quit: Leaving.]
rpcope has joined #ocaml
<Leonidas> theblatte: `opam switch create ./ 4.06.1+flambda` should do the trick
noddy2OOO has joined #ocaml
manas has joined #ocaml
jao has joined #ocaml
noddy2OOO has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
sagotch has joined #ocaml
rpcope has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
rpcope has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
jao has joined #ocaml
<sagotch> Is there a way to define a library depending on a module which should be provided by the user later, without using functors ? i.e. my module A would use X.foo, I know the signature of X but not the implementation, which should be provided by another library that would be specified by the user when compiling
noddy has joined #ocaml
<Drup> That sounds like a functor :3
<Armael> if you only want to decide at compilation I guess you can play some dirty tricks like swapping cmos?
<Armael> I think dinosaure does that
<Armael> I don't know how that works exactly
<Drup> dune will introduce a feature that allows to make those linking tricks in a slightly principled way
<Armael> ah, cool
sagotch has quit [Ping timeout: 252 seconds]
sagotch has joined #ocaml
<sagotch> That sounds like a functor indeed but let's say that it can not be a functor (it can, but I was wondering if other ways exists, even if they are evil)
asymptotically has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 268 seconds]
tennix has quit [Ping timeout: 264 seconds]
Rosslaew has joined #ocaml
<Rosslaew> sagotch, what about passing the module you depend on to the functions that need it as a first class module ?
<Rosslaew> (I still think that it smells like functor, for coherence, as you could pass different modules that satisfy the same module type between the different function calls ...)
<sagotch> The situation: I have an existing library using functions from a module X. I want to take this module X out of the lib so I can change the implementation (basically, X is a module for reading/writing data, the rest of the lib is algorithm). If the lib is big, with lots of modules, funcotizing it would require a lot of work, so I would prefer. (and unfortunately, it would be even worst with a module as functions parameters.
<dinosaure> it seems close to the linking trick, you can find an example with mirage/checkseum or mirage/digestif
<sagotch> I'll look at it right now
<Drup> sagotch: you can wait until dune provide variants :p
<sagotch> when is that?
<dinosaure> in few weeks I believe
<dinosaure> rgrinberg already did a PoC on that
<Drup> Really ? that seem slightly optimistic
<dinosaure> he showed me an example at the last ICFP
<dinosaure> the biggest problem is much more about mirageos specific flags compilation than the linking trick I think
<theblatte> Leonidas: no luck, I still get "[ERROR] The selected switch /data/users/jul/infer is not installed."
<theblatte> I must be doing something wrong...
noddy2OOO has joined #ocaml
noddy has quit [Ping timeout: 246 seconds]
<sagotch> This linking trick is very intersting, thank you
<sagotch> and it is probably what I need, sounds great
<dinosaure> sagotch: before the dune integration, you need to take about transitivity of your implementation as a dependency. I mean, if foo is your interface, bar depends on foo and baz (which is an implementation of foo), if toto depends on bar, you need to explicitely add baz too
<dinosaure> +care
rpcope has quit [Ping timeout: 250 seconds]
<sagotch> Hum wait, in the Checkseum case, can I define another lib depending on checkseum (lib toto) ? And use toto in a totally different project, defining the implemenation of checkseum in this project ?
<sagotch> or do I need to use checkseum.c or checkseum.ocaml without a third option ?
<dinosaure> you can do the first case
<dinosaure> for example, git depends on digestif
<dinosaure> then git-unix depends on digestif.c and git-mirage depends on digestif.ocaml
<sagotch> yes but can git-toto depends on digestif.toto, which would be defined in git-toto sources?
<dinosaure> yes, digestif.toto just needs to respect interface
<sagotch> Yes of course! It will be perfect for me then! thanks
manas has quit [Remote host closed the connection]
rpcope has joined #ocaml
Rosslaew has quit [Ping timeout: 268 seconds]
rpcope has quit [Ping timeout: 268 seconds]
spew has joined #ocaml
FreeBirdLjj has joined #ocaml
asymptotically has joined #ocaml
tennix has joined #ocaml
rpcope has joined #ocaml
manas has joined #ocaml
manas has quit [Remote host closed the connection]
rpcope has quit [Ping timeout: 276 seconds]
Bronsa has joined #ocaml
bartholin has joined #ocaml
rpcope has joined #ocaml
jack5638 has quit [Ping timeout: 252 seconds]
<Leonidas> theblatte: do you maybe already have a _opam folder?
<Leonidas> what does `opam switch` say? does it list something there?
rpcope has quit [Ping timeout: 245 seconds]
jack5638 has joined #ocaml
manas has joined #ocaml
manas has quit [Read error: Connection reset by peer]
slamzy has quit [Remote host closed the connection]
manas has joined #ocaml
manas has quit [Client Quit]
TC01 has joined #ocaml
rpcope has joined #ocaml
<theblatte> Leonidas: nope, I delete _opam beforehands. I opened an issue on GitHub: https://github.com/ocaml/opam/issues/3677
ziyourenxiang_ has quit [Ping timeout: 252 seconds]
<Leonidas> theblatte: what is `ocaml-variants`?
<theblatte> Leonidas: AFAIU it's for "variants" of the ocaml compiler like flambda, spacetime, ...
<theblatte> (I get the same failures with the vanilla compiler)
tane has joined #ocaml
malina has joined #ocaml
themsay has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
malina has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
Haudegen has quit [Remote host closed the connection]
tennix has quit [Ping timeout: 245 seconds]
rpcope has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
zolk3ri has quit [Quit: leaving]
fraxamo has joined #ocaml
rpcope has joined #ocaml
rpcope has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
sagotch has quit [Quit: Leaving.]
jaar has quit [Ping timeout: 246 seconds]
kakadu_ has joined #ocaml
ski has quit [Ping timeout: 245 seconds]
ski has joined #ocaml
Haudegen has joined #ocaml
rpcope has joined #ocaml
rpcope has quit [Ping timeout: 244 seconds]
jao has quit [Ping timeout: 268 seconds]
rpcope has joined #ocaml
jao has joined #ocaml
spew has quit [Quit: going home]
rpcope has quit [Ping timeout: 252 seconds]
roygbiv has joined #ocaml
Guest31440 has joined #ocaml
Guest31440 has quit [Remote host closed the connection]
rpcope has joined #ocaml
kjak has quit [Quit: Lost terminal]
asymptotically has quit [Remote host closed the connection]
asymptotically has joined #ocaml
kjak has joined #ocaml
themsay has joined #ocaml
themsay has quit [Ping timeout: 245 seconds]
noddy2OOO has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
asymptotically has quit [Remote host closed the connection]
asymptotically has joined #ocaml
jaar has joined #ocaml
jaar has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
roygbiv has quit [Ping timeout: 276 seconds]
spew has joined #ocaml
noddy2OOO has joined #ocaml
Algebr` has joined #ocaml
tane has quit [Remote host closed the connection]
bramford has joined #ocaml
malina has joined #ocaml
philtor has quit [Ping timeout: 245 seconds]
orbifx2 has joined #ocaml
fraxamo has quit [Quit: Leaving]
Haudegen has quit [Remote host closed the connection]
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
DanielRichman has quit [Ping timeout: 264 seconds]
bartholin has quit [Remote host closed the connection]
ski has quit [Remote host closed the connection]
orbifx2 has quit [Ping timeout: 245 seconds]
rpcope has quit [Ping timeout: 268 seconds]
gravicappa has quit [Ping timeout: 268 seconds]
rpcope has joined #ocaml
orbifx2 has joined #ocaml
rpcope has quit [Ping timeout: 245 seconds]
rpcope has joined #ocaml
rpcope has quit [Ping timeout: 240 seconds]
rpcope has joined #ocaml
rpcope has quit [Ping timeout: 244 seconds]
Guest63849 has joined #ocaml
Guest63849 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
sz0 has joined #ocaml
wagle_ is now known as wagle
iAmDecim has joined #ocaml
DanielRichman has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
asymptotically has quit [Quit: Leaving]
Haudegen has quit [Remote host closed the connection]
orbifx2 has quit [Ping timeout: 246 seconds]
iAmDecim has quit [Ping timeout: 264 seconds]
kakadu_ has quit [Remote host closed the connection]