adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
hdon has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
ziyourenxiang has joined #ocaml
ctrlsbstr has joined #ocaml
infinity0 has quit [Ping timeout: 255 seconds]
infinity0 has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
hdon has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 264 seconds]
silver has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
spew has joined #ocaml
hdon has joined #ocaml
norvic has quit [Read error: Connection reset by peer]
hdon has quit [Ping timeout: 264 seconds]
spew has quit [Ping timeout: 268 seconds]
mfp has quit [Ping timeout: 260 seconds]
sh0t has quit [Quit: Leaving]
jimmyrcom_ has joined #ocaml
Soni has quit [Ping timeout: 265 seconds]
exarkun has quit [Read error: Connection reset by peer]
exarkun has joined #ocaml
Soni has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 246 seconds]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 250 seconds]
hdon has joined #ocaml
hdon has quit [Ping timeout: 256 seconds]
r_rios has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
jimmyrcom_ has joined #ocaml
pierpa has quit [Quit: Page closed]
zlsyx has joined #ocaml
<r_rios> Is there anything wrong with this match?: let {stms; parent_blk; ctx; parent_msg; eval; seal_state} = blk_rec
<r_rios> The compiler says "Unbound record field stms", but stms is present in the record
davs 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]
<discord2> <bobby> r_rios, where do you define the record type? is it in the same file?
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<discord2> <bobby> if it's not, you may need to either qualify it or put type annotation on it
pierpal has joined #ocaml
<r_rios> discord2: it's in the same file
<r_rios> Interestingly, this same match works on a match arm
<r_rios> Also, blk_rec.stms works
hdon has joined #ocaml
shinnya has joined #ocaml
spew has joined #ocaml
kleimkuhler has quit [Quit: kleimkuhler]
hdon has quit [Ping timeout: 264 seconds]
nolanv has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
tarptaeya has joined #ocaml
zlsyx has quit [Quit: Leaving...]
hdon has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 250 seconds]
ncthbrt has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
cbot has quit [Quit: Leaving]
ncthbrt has quit [Ping timeout: 240 seconds]
davs_ has joined #ocaml
davs has quit [Ping timeout: 256 seconds]
hdon has quit [Ping timeout: 240 seconds]
r_rios has quit [Quit: Konversation terminated!]
hdon has joined #ocaml
pyx has joined #ocaml
hdon has quit [Changing host]
hdon has joined #ocaml
pyx has quit [Client Quit]
orbifx has joined #ocaml
malina has joined #ocaml
<hdon> hi all :) i'm using Hashtbl but it seems like the compiler is complaining when i try to use Hashtbl.find that my key argument is not the right type, but it seems to me that its complaint is invalid
<hdon> apologies for using reasonml
<hdon> but Gmae.Eng.pointLoc is exactly the type of PointLocHash.t, where PointLocHash is the module i pass to Hashtbl.Make and assign to the module Game.Eng.EngHashtbl
<hdon> i can publish the whole thing on github if someone wants to tell me what i'm doing wrong :)
<hdon> is it possible that when compiling my module, it can't see the types it needs to know that the two are equivalent?
<octachron> hdon, it sounds like you make one of the type abstract by accident
<hdon> octachron: well, what i decided to do just now was to create a second function, makePointLoc2 whose return value is typed as an EngHashtbl.key, and export that in my rei file as well. using that works just fine.
<hdon> octachron: does abstract mean that not all of its type parameters have been constrained to a single type?
<octachron> hdon, no, if you rei file you have something like "type t" without a right-hand side, them the "type t" is made asbtract by the signature
<hdon> if so, i think i found the problem in my rei file: module EngHashtbl: Hashtbl.S;
<octachron> an abstract type is a type of which the implementation is hidden
<octachron> hdon, indeed, you want "EngHashtlb : Hashtb.S with type key = ... "
<hdon> thanks octachron
pierpal has quit [Remote host closed the connection]
<hdon> hmm... now i get an error https://pastebin.mozilla.org/9085303
<hdon> perhaps this isn't the reasonml way
<hdon> oh, getting rid of the parens fixed it... that was silly
<hdon> what does the "with type foo = bar" mean? reading hashtbl.ml, shortly after the "with type" bit, it does something more familiar: type t = H.t
<hdon> do the two constructions solve different problems? based purely on my dumb intuition, they "sound" the same.
<hdon> i suppose the "with" construction is part of the functor's type, as opposed to the body of the functor which is not available to an outside consumer
<hdon> lol... aaaaand now i just realized i can't use a hashtbl for this... sigh
<hdon> or at least, my key has more parameters than i thought it needed
roygbiv has joined #ocaml
hdon has quit [Quit: leaving]
mfp has joined #ocaml
jnavila has joined #ocaml
roygbiv has quit [Quit: ™]
malina has quit [Quit: Throwing apples of Montserrat]
dtornabene has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
jnavila has joined #ocaml
kakadu has joined #ocaml
Haudegen has joined #ocaml
davs_ has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 255 seconds]
davs has joined #ocaml
jnavila has joined #ocaml
zolk3ri has joined #ocaml
gtrak has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
davs has quit [Ping timeout: 265 seconds]
davs has joined #ocaml
davs_ has joined #ocaml
davs has quit [Ping timeout: 264 seconds]
davs has joined #ocaml
davs_ has quit [Ping timeout: 248 seconds]
pierpal has joined #ocaml
jnavila has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 240 seconds]
gtrak has quit [Ping timeout: 240 seconds]
davs has quit [Ping timeout: 260 seconds]
davs has joined #ocaml
zolk3ri_ has joined #ocaml
zolk3ri_ has quit [Client Quit]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
BitPuffin has joined #ocaml
davs_ has joined #ocaml
davs has quit [Ping timeout: 246 seconds]
davs has joined #ocaml
davs_ has quit [Ping timeout: 250 seconds]
jnavila has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
gtrak has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
dhil has joined #ocaml
davs has quit [Ping timeout: 256 seconds]
gtrak has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
davs has joined #ocaml
davs has quit [Client Quit]
zolk3ri has quit [Ping timeout: 265 seconds]
LIEW has joined #ocaml
LIEW has quit [Client Quit]
zolk3ri has joined #ocaml
silenc3r has joined #ocaml
hphuoc25 has joined #ocaml
<hphuoc25> Hi, I want to try Ocaml for web development, mainly rest api. Can you recommend me a web framework? I'm relatively new to Ocaml.
ec2-user1 has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
cslqj has joined #ocaml
<orbifx> hphuoc25: ocsigen
<hphuoc25> Thanks. Do you have any recommendation for libraries to work with Redis and PostgreSQL?
<kakadu> nopr
<kakadu> nope*
<hphuoc25> So any library will work?
<Drup> hphuoc25: pgocaml for pgsql
<hphuoc25> Great thanks
<Drup> as for redis, I believe there are bindings
<Drup> called "redis", it seems :)
<hphuoc25> Nice :)
<hphuoc25> Is ocaml suited for building a production level web service?
<hphuoc25> I tried Haskell and it seems really hard to get productive
<fds> Those seem to be two rather unrelated statements. The first is a property of OCaml (in particular its ecosystem), the second is mainly a property of _you_ (and additionally the Haskell ecosystem)
<fds> Don't you think?
<hphuoc25> Yea just realized it's a bad statement. Please ignore it.
dhil has quit [Ping timeout: 246 seconds]
<orbifx> Remembering my self asking such questions, I know what hphuoc25 is asking for is not very objective fds. More of thinking out-loud way.
<orbifx> hphuoc25: I think you might find OCaml to be easier to get productive with.
kleimkuhler has joined #ocaml
<fds> Sorry, I didn't mean to come off as overly critical
<fds> It's fine to think out loud :-)
<orbifx> I noticed two things, the tools are smaller and the libraries more intuitive to the unitiated
<hphuoc25> Sounds good to me ;)
<orbifx> If you are not familiar with functional programming, Lwt (a threading library) might throw you off a bit.
kleimkuhler has quit [Quit: kleimkuhler]
cslqj has quit []
kleimkuhler has joined #ocaml
ctrlsbstr has joined #ocaml
gareppa has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
hphuoc25 has quit [Remote host closed the connection]
gareppa has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
dtornabene has quit [Quit: Leaving]
spew has joined #ocaml
orbifx has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
silver has joined #ocaml
ziyourenxiang has quit [Ping timeout: 260 seconds]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
sh0t has joined #ocaml
yannick has joined #ocaml
pierpal has joined #ocaml
pierpal has joined #ocaml
Haudegen has quit [Remote host closed the connection]
malina has quit [Ping timeout: 240 seconds]
<tg> any idea why topkg build doesnt add all the dependencies from the opam file to the build command?
kleimkuhler has quit [Quit: kleimkuhler]
kleimkuhler has joined #ocaml
<yannick> nope this is actually the 12th largest mysterious in the Universe
<yannick> *mystery
<tg> the mystery part i figured already ;]
BitPuffin has quit [Remote host closed the connection]
Guest42046 has joined #ocaml
Guest42046 is now known as Haudegen
jnavila has quit [Ping timeout: 256 seconds]
malina has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
* orbifx makes an entrance
<orbifx> Anyone using Movim here?
<discord2> <mars0i> Is there a dune command to autogenerate mli files from ml files? I'm not finding it in the manpage or online documentation.
<discord2> <mars0i> There are other ways, of course.
<discord2> <mars0i> Or to make it leave the files around? I'm assuming that dune has to generate mli files in order to compile an ml file, if they don't exist.
<Armael> that only partially answers your question, but usually the generated files sit in _build/default/
<orbifx> mars0i: the command is `sandworm attack` :P
<discord2> <mars0i> @Armael no mli files show up under _build.
<Armael> ah, I guess it doesn't need to generate those then
<Armael> this seems to indicate that it's not supported by dune https://github.com/ocaml/dune/issues/150
<Armael> so I guess you could use cmitomli
<discord2> <mars0i> Thanks @Armael.
<discord2> <mars0i> @orbifx hmm. A Dune reference, ok. But should I use the video game, or install the malware to generate .mli files?
<discord2> <mars0i> Interesting, though. Oasis always generated mli files.
<Armael> I usually use a mix of manually writing the .mli and copy-pasting from merlin's output
<discord2> <mars0i> I have not yet succeeded in making merlin and vim the good friends they should be.
<Armael> ah :(
<Armael> if you manage to make it work, it's really worth it
<companion_cube> really, yes
<Drup> I'm surprised, it's usually pretty simple
<discord2> <mars0i> For my small projects, I actually prefer not having files at all, most of the time. (I feel as if I am supposed to be embarrassed about that. 😃 ) But sometimes you need them. In this case it's a small ml file. I could write the mli by hand. But it generates some functions with ppx_deriving, so it would be nice to get those signatures generated too. But I could get those from utop.
<discord2> <mars0i> Yeah, I know it's supposed to be, @Drup. Maybe my vim config is messing it up.
<discord2> <mars0i> I go through periods of experimenting, and then put it aside and just get some work done.
<discord2> <mars0i> Or maybe it works and I'm just not invoking it properly.
<Armael> not having files at all?
<Armael> hmm
<Armael> clever, this way you cannot have bugs
<orbifx> mars0i, references aside, I think you have to write a custom rule.
<discord2> <mars0i> @orbifx, you mean to configure the malware to generate mli files? OK. I'm on it.
jnavila has joined #ocaml
<discord2> <mars0i> cmitomli worked, @Armael. Got the ppx_deriving-generated functions, too.
<orbifx> What malware?
<discord2> <mars0i> Apparently there's some malware called "sandworm". I wasn't sure what you were referring to, so I went searched and got that and a video game along with the novels.
isd has joined #ocaml
<discord2> <mars0i> I read the original Dune a very long time ago--there were no sequels yet--and I had fogotten about the sandworms.
spew has joined #ocaml
<discord2> <mars0i> Just having fun about the malware, obviously.
<discord2> <mars0i> @orbifx, well it's possible to make ocaml generate mli files, but then I have to figure out how to configure the command line. That's why it was nice that oasis generated mli files, and why I thought that dune could do it. But cmitomli does the job.
<discord2> <mars0i> I kind of hate configuring ocamlc/ocamlopt commandl lines by hand. I believe in build tools.
muelleme has joined #ocaml
isd has quit [Ping timeout: 240 seconds]
kleimkuhler has quit [Quit: kleimkuhler]
isd has joined #ocaml
pierpa has joined #ocaml
cobreadmonster has joined #ocaml
silenc3r has quit [Quit: Leaving]
jimmyrcom_ has joined #ocaml
slack3r_ has joined #ocaml
slack3r_ has left #ocaml [#ocaml]
muelleme has quit [Ping timeout: 260 seconds]
teja_pr has joined #ocaml
teja_pr has quit [Client Quit]
teja_pr has joined #ocaml
teja_pr has quit [Client Quit]
sl33rr has joined #ocaml
sl33rr has quit [Client Quit]
sl33rr has joined #ocaml
sl33rr has quit [Client Quit]
sl33rr has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 256 seconds]
Soni has quit [Remote host closed the connection]
<malina> I lost my virginiity to dune, the movie
<malina> :p
<malina> not sure which channel this is
<malina> ah. (my gtk theme doesn't show a colour difference in active tab ,x)
<malina> sorry, that was old I see :/
<companion_cube> well it's all about giant sand worms, so…
orbifx has quit [Ping timeout: 250 seconds]
kleimkuhler has joined #ocaml
sl33rr has quit [Quit: sl33rr]
Jesin has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 250 seconds]
<malina> :p
<malina> can't say I complained.
Jesin has quit [Quit: Leaving]
jnavila has quit [Remote host closed the connection]
orbifx has joined #ocaml
mk9 has joined #ocaml
<companion_cube> I hope the spice flowed across the universe
kleimkuhler has quit [Quit: kleimkuhler]
yannick has quit [Quit: Leaving]
malina has quit [Quit: Throwing apples of Montserrat]
kakadu has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]
cobreadmonster has quit [Quit: Connection closed for inactivity]
Soni has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cbot has joined #ocaml
ziyourenxiang has joined #ocaml
orbifx has quit [Ping timeout: 248 seconds]
ziyourenxiang has quit [Ping timeout: 268 seconds]
kleimkuhler has joined #ocaml
jimmyrcom_ has joined #ocaml
mcc has joined #ocaml
sh0t has joined #ocaml
shinnya has joined #ocaml
kleimkuhler has quit [Quit: kleimkuhler]
ctrlsbstr has joined #ocaml
tarptaeya has joined #ocaml