ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
Stany has joined #ocaml
ygrek_ has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<def`> ecaml?
Tamae has quit [Ping timeout: 265 seconds]
<afahim> ecaml is an ocaml template engine http://komar.bitcheese.net/en/code/ecaml
<def`> ok
<def`> so what is your question? How did you get this opt file?
<def`> The .opt extension usually means a binary produced by the ocamlopt compiler, it's already an executable
nullcat has joined #ocaml
<afahim> I downloaded the binary tarball from the ecaml website
<afahim> I'm on a mac, and I don't know how to run it / install it so that a project im trying to run can use it
<struktured> def`: do people use merlin with neovim?
<afahim> how do I execute it?
<struktured> afahim: opt files are executable by default typically..just run it, or do chmod +x foo.opt first. or "ocamlrun foo.opt"
ygrek_ has quit [Ping timeout: 265 seconds]
<afahim> struktured: I keep getting Fatal error: the file 'ecaml.opt' is not a bytecode executable file
<afahim> I did try chmod +x as well, and it keeps saying cannot execute binary file
<def`> afahim: ./ecaml.opt
<afahim> i'm on a mac btw
<def`> Arf
<def`> struktured: rgrinberg told me he used it with success, yes
<struktured> def`: interesting, will chat with him about it.
<afahim> yeah ./ecaml.opt says can't execute binary file :/
<struktured> ha...just realized I basically HAVE to use it eventually..as I am using this now https://bitbucket.org/equalsraf/vim-qt/wiki/Home which will be replaced by https://github.com/equalsraf/neovim-qt
thomasga1 has joined #ocaml
AltGr has joined #ocaml
swgillespie has joined #ocaml
shinnya has quit [Ping timeout: 258 seconds]
BitPuffin has quit [Ping timeout: 245 seconds]
thomasga1 has quit [Quit: Leaving.]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<def`> afahim: your installation of ocaml might be broken?! how did you get the ecaml.opt file?
<afahim> def`: I installed ocaml using brew install, and it did work for other files
<afahim> I got the ecaml.opt file by extracting the binary tarball that i downloaded from the ecaml website
struktured has quit [Ping timeout: 256 seconds]
<def`> arf
struktured has joined #ocaml
<def`> of course you're not going to do anything with a binary tarball
<def`> you need the sources
<def`> unless specified, I suspect the tarball to target linux users
<def`> you can still try with the bytecode files, but you should really use the source tarball
<afahim> alright so ive got the source tarball too
<afahim> when I run make, it can't find ocamlfind
<afahim> wait, I was able to install that using opam
<def`> so it should be ok?
<afahim> I installed ocamlfind using opam
<afahim> but when I try to run it, I keep getting -bash: ocamlfind: command not found
<afahim> perhaps its installing it some weird place
govg has joined #ocaml
not-not-pyon is now known as long-exact-pyon
jabesed has quit [Ping timeout: 265 seconds]
<def`> afahim: well, have you sourced opam profile?
<def`> It seems not.
<def`> Is there anything like ~/.opam/.../bin in your PATH?
<afahim> def`: yeah nothing like it on my PATH
<def`> opam should have printed some message when you installed it
<def`> I don't recall the exact procedure
<def`> but something like eval `opam config env` should do it
<afahim> i did an 'opam init
<afahim> when I installed it, and that is supposed to have added opam to my path. I definitely see opam related stuff in by ~/.bash_profile
<afahim> but when I cat $PATH I don't see any path
<afahim> with opam in it
<def`> but the profile is sourced only at login on os x
<def`> you maybe just have to logout, open a new session to get the setup done :)
<def`> (otherwise, move the init line from profile to bashrc)
zipace has quit [Ping timeout: 255 seconds]
<afahim> haha interesting
<afahim> alright let me close my console and open again to see if anything changes :)
<afahim> unless you meant login to the computer?
<def`> login of your session
<def`> not shutting down your computer, just logging out your user account
<afahim> kk, let me try that
<afahim> hey that worked!!
<afahim> thanks for the help
<afahim> now let me install the other libraries its not finding
<def`> np, small os x trick :P
<afahim> pretty big for me haha. I'd be banging my head for no reason until tomorrow when i'd log back into my computer
<afahim> def`: so make worked, and now i have a bunch of cmo and cmi files
<def`> you should learn about OCaml :-)
<afahim> that's what im doing today haha
nullcat_ has joined #ocaml
<def`> lookup some book, realworldocaml for instance
<afahim> yup. i started with the web tutorials, will be soon moving to the book
<def`> fine :), this will good you through all those files
<afahim> :)
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
obadz has joined #ocaml
darryn has joined #ocaml
obadz has quit [Ping timeout: 246 seconds]
govg has quit [Quit: leaving]
BitPuffin|osx has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
struktured has quit [Ping timeout: 256 seconds]
keen__ has joined #ocaml
gabemc has joined #ocaml
keen_ has quit [Ping timeout: 264 seconds]
darryn has quit [Quit: Lost terminal]
struk|work has quit [Ping timeout: 246 seconds]
struktured has joined #ocaml
<struktured> rgrinberg: you are noisy! lol. <clap>
<struktured> rgrinberg: anyhow, do you have any setup instructions on neovim + merlin?
<rgrinberg> struktured: noisy?
<rgrinberg> struktured: should be the same as normal vim. just make sure to do $ pip install neovim
<struktured> rgrinberg: changing mutable stuff to immutable, recently.. I wouldn't even bother complaining about that :)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> i'm not complaining :P i'm making a difference and saving the world!
* struktured nods enthusiastically
idegen has quit [Quit: Leaving.]
darkf has joined #ocaml
swgillespie has joined #ocaml
MrScout has joined #ocaml
* apache2 gives a standing ovation
moei has quit [*.net *.split]
maufred has quit [*.net *.split]
dtscode has quit [*.net *.split]
j0sh has quit [*.net *.split]
hsuh has quit [*.net *.split]
orbitz has quit [*.net *.split]
srcerer has quit [*.net *.split]
Tekk_ has quit [*.net *.split]
hsuh has joined #ocaml
LnL has quit [*.net *.split]
cross has quit [*.net *.split]
jonh has quit [*.net *.split]
jbrown has quit [*.net *.split]
inr has quit [*.net *.split]
wagle has quit [*.net *.split]
frawgie has quit [*.net *.split]
srax has quit [*.net *.split]
so has quit [*.net *.split]
Tekk_ has joined #ocaml
orbitz has joined #ocaml
frawgie has joined #ocaml
maufred has joined #ocaml
wagle has joined #ocaml
jonh has joined #ocaml
moei has joined #ocaml
jbrown has joined #ocaml
j0sh_ has joined #ocaml
srax has joined #ocaml
cross has joined #ocaml
inr has joined #ocaml
dtscode has joined #ocaml
srcerer has joined #ocaml
LnL has joined #ocaml
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
walter|r has quit [Ping timeout: 252 seconds]
mlamari has joined #ocaml
MrScout has quit [Ping timeout: 256 seconds]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
siddharthv_away is now known as siddharthv
tmtwd has quit [Ping timeout: 265 seconds]
tmtwd has joined #ocaml
dtscode has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dtscode has joined #ocaml
hay207 has joined #ocaml
afahim has quit [Quit: Connection closed for inactivity]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
long-exact-pyon is now known as classifying-pyon
Tamae has joined #ocaml
Stany has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
ncthom91 has joined #ocaml
Simn has joined #ocaml
gabemc has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
MercurialAlchemi has joined #ocaml
freling has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rgrinberg1 has quit [Ping timeout: 265 seconds]
Cyanure has joined #ocaml
nullcat has joined #ocaml
fds has quit [Changing host]
fds has joined #ocaml
The_Mad_Pirate has joined #ocaml
Cyanure has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matason has joined #ocaml
ollehar has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg1 has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
Haudegen has joined #ocaml
oscar_toro has quit [Ping timeout: 272 seconds]
hay207 has quit [Ping timeout: 255 seconds]
ygrek_ has quit [Ping timeout: 258 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oscar_toro has joined #ocaml
Submarine has quit [Remote host closed the connection]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
zpe has joined #ocaml
octachron has joined #ocaml
hay207 has joined #ocaml
kushal has quit [Ping timeout: 276 seconds]
amnn has joined #ocaml
kushal has joined #ocaml
milosn has quit [Quit: leaving]
amnn has quit [Read error: Connection reset by peer]
jonludlam has joined #ocaml
amnn has joined #ocaml
Pepe_ has quit [Remote host closed the connection]
rgrinberg1 has joined #ocaml
fredyr has joined #ocaml
rgrinberg1 has quit [Ping timeout: 256 seconds]
freling has quit [Quit: Leaving.]
<flux> "This release is in the form of a cross-compiler. It depends on the cross-compiling support recently added to 4.02.0+trunk." <- the second part of that seems quite nice :)
dsheets has quit [Ping timeout: 265 seconds]
Kakadu has joined #ocaml
nojb has joined #ocaml
Hannibal_Smith has joined #ocaml
dsheets has joined #ocaml
Hannibal_Smith has quit [Client Quit]
<ollehar> wow, so you can compile to windows from linux now?
<dtscode> What a time to be alive
<nojb> whois ollehar
<flux> ollehar, well, I don't know what it adds, perhaps its first priority is targetting another architecture, not another operating system
<flux> someone(TM) can find the mantis ticket for it?-)
<adrien_znc> ollehar: no
<nojb> yes, that's the one
nojb has quit [Ping timeout: 245 seconds]
nojb has joined #ocaml
nojb_ has joined #ocaml
nojb has quit [Ping timeout: 258 seconds]
nojb has joined #ocaml
nojb_ has quit [Ping timeout: 272 seconds]
nojb has quit [Client Quit]
Haudegen has quit [Ping timeout: 246 seconds]
rgrinberg1 has joined #ocaml
<dtscode> Are labeled arguments the same as named arguments in python?
rgrinberg1 has quit [Ping timeout: 256 seconds]
<flux> not 'the same' given the function call mechanism is quite different (currying) but they are intended for the same use case, yes
<dtscode> Err yeah thats what I meant. Thanks
<flux> labeled arguments also have a couple nice shortcuts useful in partcicular when you're forwarding them
freling has joined #ocaml
<flux> ie let foo ~bar () = baz ~bar () is the same as let foo ~bar () = baz ~bar:bar ()
<dtscode> hmmmm interesting
<dsheets> similar to record field punning: let foo ~bar () = { bar }
oscar_toro has quit [Quit: Lost terminal]
thomasga has joined #ocaml
Haudegen has joined #ocaml
_andre has joined #ocaml
jabesed has joined #ocaml
TheLemonMan has joined #ocaml
Hannibal_Smith has joined #ocaml
walter|r has joined #ocaml
obadz has joined #ocaml
ggole has joined #ocaml
sdothum has joined #ocaml
hay207 has quit [Ping timeout: 258 seconds]
Cyanure has joined #ocaml
lyxia has quit [Quit: Changing server]
lyxia has joined #ocaml
lyxia has quit [Client Quit]
Hannibal_Smith has quit [Quit: Leaving]
walter|r has quit [Remote host closed the connection]
Gama11 has joined #ocaml
freling has quit [Quit: Leaving.]
freling has joined #ocaml
matason has quit []
hay207 has joined #ocaml
jabesed has quit [Ping timeout: 265 seconds]
siddharthv is now known as siddharthv_away
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BitPuffin has joined #ocaml
rgrinberg1 has joined #ocaml
jonludlam has quit [Remote host closed the connection]
amnn has joined #ocaml
<companion_cube> rgrinberg1: o/
rgrinberg1 is now known as rgrinberg
<rgrinberg> companion_cube: \o
matason has joined #ocaml
sh0t has joined #ocaml
freling has quit [Quit: Leaving.]
jabesed has joined #ocaml
swistak35 has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
sh0t has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
milosn has joined #ocaml
kushal has quit [Ping timeout: 245 seconds]
octachron has quit [Ping timeout: 256 seconds]
hay207 has quit [Ping timeout: 256 seconds]
tmtwd has joined #ocaml
idegen has joined #ocaml
srax has quit [Quit: WeeChat 1.1.1]
badkins has joined #ocaml
obadz has quit [Ping timeout: 252 seconds]
milosn has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
milosn has joined #ocaml
Pepe_ has joined #ocaml
sh0t has joined #ocaml
freling has joined #ocaml
<companion_cube> rgrinberg: did you see my reply on github?
idegen has quit [Remote host closed the connection]
idegen has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc_ has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
mcclurmc has quit [Ping timeout: 255 seconds]
<rgrinberg> companion_cube: yep. I saw. I haven't checked out your Lwt_pipe.t yet though
<Drup> The [@@deprecated] attributes also works on types <3
avsm has joined #ocaml
<flux> next up: code transformation recipes attached to deprecated tags that just fixes your code ;-)
avsm has quit [Client Quit]
<companion_cube> Drup: are you insinuating something?
<Drup> companion_cube: ?
<Drup> flux: Considering you can add a string to the deprecation warning, given proper tooling, you could do that.
fraggle-boate has quit [Remote host closed the connection]
mcclurmc_ has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
zpe has quit [Remote host closed the connection]
obadz has joined #ocaml
fraggle-boate has joined #ocaml
<companion_cube> Drup: well that could be a snarky remark on someone's code that should be depreciated ^^
<Drup> that could potentially be a lot of things.
Algebr has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
freling has quit [Quit: Leaving.]
hay207 has joined #ocaml
<Algebr> What is the correct way to invoke utop's #typeof
<dsheets> Algebr, #typeof "type"
<dsheets> Algebr, what are you trying to accomplish?
<dsheets> or, #typeof "value" of course... but it needs to be an ident
<Algebr> I forgot how to use #typeof;;
<dsheets> usually, i use #show_type, #show_module, #show_module_type, etc
<Algebr> Okay, forgot it had to be quotes. Interesting that it doesn't work for num literals
obadz has quit [Ping timeout: 264 seconds]
<struktured> Drup: the permission issue on gforge is resolved. thanks
<dsheets> for literals, you can just do literal;; and the interpreter will infer the type
<flux> drup, all we need is coccinelle for OCaml
Submarine has joined #ocaml
Submarine has joined #ocaml
tane has joined #ocaml
<Algebr> What is the point of locally abstract types
<Drup> :gadt:
robink has quit [Ping timeout: 255 seconds]
<flux> well, C interfaces is their main use I guess
<octachron> or local module
lordkryss has joined #ocaml
<flux> but I think that's not 'locally abstract' in the sense algebr means
<Drup> flux: he's talking of the notation "let f: type t . .... = ..."
<flux> oh
<Algebr> yes
<flux> isn't their main use using functors locally?
labichn has joined #ocaml
<flux> ie. you can use Sets in a polymorphic function
<flux> I think they were introduced before gadts were in any case, just for that use
obadz has joined #ocaml
robink_ has joined #ocaml
<Drup> yeah, they are useful with first class modules
<Drup> but the main usage is gadts
darkf has quit [Quit: Leaving]
<labichn> Has anyone had success doing heap profiling for native ocaml? ocp-memprof doesn't seem to support core, and I get very little info from valgrind --tool=massif
<octachron> flux: yes, they were introduced in 3.12 and gadt in 4.00
AltGr has left #ocaml [#ocaml]
<flux> algebr, let sort_uniq : type t'. t' list -> t' list = fun xs -> let module M = struct type t = t' let compare = compare end in let module S = Set.Make(M) in let s = List.fold_left (fun xs x -> S.add x xs) S.empty xs in List.rev (S.fold (fun x xs -> x::xs) s [])
ollehar1 has joined #ocaml
<flux> it has a fun type, it appears the type inference system tries to keep the abstract type labels the same. did it always do that?
classifying-pyon has quit [Ping timeout: 256 seconds]
<companion_cube> \o/
<octachron> Drup: I imagine it would depend a lot on your (gadt/local or first-class modules) usage ratio
<flux> now I realize Set also has of_list, would've simplified that a bit :)
slash^ has joined #ocaml
<companion_cube> it's recent, so some libraries might define their own Set.of_list this way
<flux> fold_right and List.cons would help a bit as well..
<flux> S.fold_right that is
tmtwd has quit [Ping timeout: 252 seconds]
<octachron> flux: since you don't need your function to be recursively polymorph, you can also write let sort_uniq (type t') xs = ...
* companion_cube tends to prefer separating the code and the arguments , it's more readable
<companion_cube> the types and the arguments*
<octachron> so rather let sort_uniq (type t') = fun xs -> ... ?
<companion_cube> let sort_uniq : type t. t list -> t list = fun xs -> ...
<flux> I sort of agree, but only because then it's the same format as in the signature
<flux> otherwise it seems like it's my job to find the correct place for the nth argument from either lists
<companion_cube> when I do this I hit return before : and before =
<companion_cube> so it's kind of aligned :)
jonludlam has joined #ocaml
<flux> do you have an emacs script for aligning each argument after the proper type - if you do, I can but the concept :)
<flux> s/but/buy/
<companion_cube> I don't use emacs, I don't even use autoindent ^^
<flux> (align-current/align-regexp ftw!)
<flux> WHAT
<rgrinberg> Drup: merging your ocaml-re commit.. Hopefully jerome won't mind
<Drup> I think it's ok :)
<flux> well, tuareg's indentation is quite broken, fortunately ocp-indent can work with Emacs
kdef has joined #ocaml
octachron has quit [Quit: Leaving]
<Algebr> flux: I just found another bug with its indentation. Haven't taken the time to use ocp-indent either. yet another thing to fiddle with
labichn has quit [Quit: Page closed]
obadz has quit [Ping timeout: 245 seconds]
<Algebr> a lot of the Stdlib is really implemented in C
<Drup> not "a lot"
<adrien_znc> nothing at all from stdlib/ :)
<adrien_znc> its in otherlibs/ :)
<adrien_znc> it's*
Hannibal_Smith has joined #ocaml
obadz has joined #ocaml
<Algebr> Isn't otherlibs part of the the stdlib
<adrien_znc> except it's optional
<adrien_znc> well, the different parts of it are
<Drup> adrien: *cough* arrays *cough*
<companion_cube> arrays are in C? I thought they were intrinsics
<Drup> that's pretty much the same thing
<companion_cube> hmmmmm
<companion_cube> I fail to see how
<Drup> well, since the runtime is in C ...
<adrien_znc> Drup: it's in byterun/ I bet :D
<companion_cube> but arrays don't need special runtime support, do they?
<adrien_znc> Drup: no, C and intrinsics aren't the same thing at all
<struktured> Tekk_: in cygwin news, I made a few changes to my bootstrap script, it is now able to get to the ocaml "make world" step, which is running now taking about 4x longer than my linux box. Will keep you informed if I have any further sucess
<adrien_znc> 4 is a nice factor
<adrien_znc> struktured: what are you doing?
kushal has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
<struktured> adrien_znc: I am being optimistic with 4. wrote a script that makes automating ocaml /opam from source easier, testing on cygwin past couple days
kushal has joined #ocaml
<struktured> adrien_znc: (cygwin64, I should say)
<adrien_znc> so, cygwin port?
<adrien_znc> 64
<adrien_znc> heh
<adrien_znc> you're going to have to hack on flexdll
<adrien_znc> you should join the wg-windows mailing-list
<struktured> what uses flexdll?
<adrien_znc> ocaml on windows
<adrien_znc> cygwin or not
<struktured> adrien_znc: well its compiling at the moment and I didn't really bother thinking about it..maybe it will bite me later
<adrien_znc> you _will_ need it
<adrien_znc> it's used for dynamic loading
<adrien_znc> and most of the time that includes unix and str
<struktured> lapack/lablas,possibly, in my case
<adrien_znc> it's not a big surprise you were able to not require it until now but you're about to
<adrien_znc> also you should really start with cygwin 32 bits and then port to cygwin 64 bits
<adrien_znc> the ocaml cygwin64 port is not in a very good shape
<adrien_znc> first because of the lack of a corresponding flexdll
<adrien_znc> version/binary
<adrien_znc> also
<adrien_znc> need to do some IRC logs over IRC
<struktured> adrien_znc: aspcud was 64 bit binary from what I saw, which sort of drove my decision. if thats end up too hard I will probably give up for a while, as I'm only doing this to serve a handful of people at work
<struktured> adrien_znc: it was easy to make some progress initially but this flexdll thing is scaring me now
<adrien_znc> but isn't it an executable more than a library?
<adrien_znc> struktured: well, I tried a few days ago and I firmly stand by what I say
<adrien_znc> it's in a bad shape and the lack of cygwin64 support in flexdll is definitely a problem
<struktured> adrien_znc: let me watch it break myself, but I believe you :)
<adrien_znc> aspcud being an executable you can reuse it fairly easily probably
kushal has left #ocaml ["Leaving"]
<adrien_znc> it's fairly painful you know :)
<adrien_znc> but if you love pain
<struktured> well the script is running, gotta see it end now
<adrien_znc> (or better, if you're motivated enough for the flexdll port, plus you can quite probably get help from two people)
<struktured> but I will start a cygwin32 install on a separate thread
ingsoc has quit [Read error: Connection reset by peer]
<struktured> adrien_znc: thanks for tips , will consider my options!
<adrien_znc> :)
<adrien_znc> in any case I think Alain Frisch can help and then Cygwin people too
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
obadz has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
<Drup> rgrinberg, companion_cube, please bikshed. :]
<adrien_znc> pink!
<Drup> adrien_znc: you can bikeshed too: https://github.com/ocaml/ocaml-re/pull/65
<adrien_znc> Drup: "Lapin"
<rgrinberg> Drup: \o/
<adrien_znc> Drup: or "Bunny"
<struktured> adrien_znc: sigh, already got obscure error when opam tried using aspcud.
<struktured> but it compiled opam at least..
<adrien_znc> :D
<adrien_znc> afk
<Drup> rgrinberg: I'm annoyed by the fact that I can't let the deprecation annotations
amnn has joined #ocaml
jonnowww has joined #ocaml
<jonnowww> hey, echo echo echo :)
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
nullcat has joined #ocaml
<jonnowww> gotta question, i'm compiling a module with a function that calls List.assoc, it fails to build giving me "Unbound value List.assoc" ... i've tried other List functions and they work fine... has anyone seen this before?
<Drup> let me guess, you are following RWO ?
robink_ is now known as robink
<Drup> if yes, then it's the fact that you are using Core, which override the stdlib's List module
<Drup> (apparently, it's in the module List.Assoc in Core)
<haesbaert> is there a less manuel approach to have something like an enum ? I have a variant type with 75 members, at some point I need to get an integer value from them, they're all sequential. Right now my approach is to have a function int_of_bla and writing the value manually
<haesbaert> that seems a bit error prone, is there a better solution ?
<ggole> haesbaert: there's a ppx for that iirc
<Drup> (or Obj.magic :D)
<ggole> Or just use ints hidden within a module
<ggole> Ah, that's it
<haesbaert> nah Obj.magic is too dirty !
<haesbaert> hmm, this ppx might do it
<struktured> it works fine, I use it as dirty ORM trick to oracle sql column names effectively
MrScout has joined #ocaml
<haesbaert> awesome, I need to convert a dhcp "parameter_request" variant to the integer code
psy_ has quit [Quit: Leaving]
darryn has joined #ocaml
<darryn> So, in c++, if I wanted to enter in data for a person with various information, I'd create a person class and store data about them in there. What is the functional way of doing this?
<haesbaert> data representation is not really different, you could use a record in ocaml
<rgrinberg> Drup: this is the #1 reason we need to drop pre 4.02 asap
<Tekk_> darryn: you create a record, like type person = {age: int, name: string}, whatever
<Tekk_> then you create functions that work on that
<Tekk_> takes a person, returns the updated person
<darryn> Thanks!
jonnowww has quit [Ping timeout: 246 seconds]
The_Mad_Pirate has quit [Quit: Konversation terminated!]
<tobiasBora> Hello !
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tobiasBora> I come back here to see if someone knows how to solve my problem (same as yesterday) : I have in a folder "myfolder/" several .cmo files and I would like to use them to compile it with ocamlbuild. I tried everything I thought about, like <<ocamlbuild -I "myfolder/" -cflags "-I,myfolder/" -lflags "-I,myfolder/" mytarget>>, however none of them take into account the "myfolder" folder. (and if I manually insert
<tobiasBora> "-I myfolder" in the command that fails (ocamlfind ocamlc ...) it works). If you have any idea how to solve that I would be really happy to hear it. Thank you !
<smondet> tobiasBora: with ocamlc/ocamlopt you need to list the cmo's on the command; I think ocamlbuild follows the same convention
<smondet> (`-I` adds to the search path, but doesnot load the cmos)
nojb has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
<nojb> tobiasBora: add "<myfolder>: include" to your _tags file
BitPuffin has quit [Ping timeout: 264 seconds]
struktured has joined #ocaml
jwatzman|work has joined #ocaml
<Tekk_> darryn: oh, and you might use chains as well. You could initialize using a literal, or you could do it via functions. It's been a while but you could do something like let my_person = create_person () |> set_age 25 |> set_name "foobar"
<darryn> Interesting
<Tekk_> darryn: pipeline is just "take the value of what's on the left of the symbol and put it in as the first argument to the function on the right"
<Tekk_> to make it a bit more clear
<darryn> maybe i'll cover it in the book soon
<Tekk_> struktured: why are you working on building ocaml btw?
<Tekk_> vs just using the provided binaries
darryn has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
<Drup> rgrinberg:
<Drup> yeah
<Drup> as much as I can (barely) live without ppxs
<Drup> living without [@@deprecated] is very annoying
ygrek_ has joined #ocaml
nullcat has joined #ocaml
thomasga has quit [Ping timeout: 255 seconds]
<struktured> Tekk_: brainless installation more than anything so people just run a script and its all setup within my company.
psy_ has joined #ocaml
<struktured> Tekk_: also so I can avoid super user priveledges where possible
<struktured> Tekk_: also, I got it working relatively work on osx/ubuntu/redhat, so I decided to get fancy and see what happens with solaris/cygwin
<struktured> *working relatively ok on
<tobiasBora> smondet: nojb : Thank you, I try and I tell you if it works
<Tekk_> struktured: solaris probably won't be that bad
<Tekk_> bloody windows though
<struktured> Tekk_: it's not great but I have a strategy for it
<Tekk_> Actually stuck on solaris, or have you moved on to openindiana?
* Tekk_ keeps meaning to look into that
<struktured> for solaris my main strategy is to compile gnu/linux tools ontop of it, then do make cold
<struktured> *pure* tools, not solaris equivalents
<Tekk_> struktured: how's bootstrapping going to work?
<Tekk_> does that actually use autotools or does it need a binary?
* Tekk_ has ever built ocaml from source
<Tekk_> not manually at least
<Tekk_> Oh, this reminds me. Are you allowed to specify constraints on a number type?
<Tekk_> I'm looking though this java book and cringing at the idea that it's using doubles to represent money, thought it'd be so nicer in ocaml where I could make Money with an unbound int dollar amount and then constrain cents to 0-99
<Tekk_> But then I couldn't remember if you can actually do that
<Tekk_> At least if I get to survive this shit I get to do F# when I finally get to the Programming Languages course
zpe has quit [Remote host closed the connection]
<struktured> Tekk_: so "make cold" doesn't work in solaris "out of the box" , because of slight differences in solaris unix tools vs gnu unix tools, from what I could tell. a work around is to use a gnu version of the tools that aren't working with the script (or patch the script instead obviously)
<Tekk_> struktured: mhm
<Tekk_> you run into that sometimes on openbsd
<Tekk_> generally not too hard of a fix though, same type of thing for you I guess?
<Tekk_> recursive search/replace regexp to prepend "g" to the tool name
<struktured> Tekk_: I shelved solaris for now, but going to try various things when I get a spare moment
<Tekk_> hm
<tobiasBora> smondet: I tried to use "ocamlbuild -Is myfolder/ -mods myfolder/myfile1.cmo myfile2.cmo ..." But the problem is the same : nothing is given to "ocamlfind ocamlc -i" (I think the '-i' option is important) so it crashs...
<Tekk_> maybe I should just make my stream tonight into getting my game to work in windows
<Tekk_> thinking about it now
<Tekk_> I don't think I actually use any external libraries but Core, I do my own SDL binding
<Tekk_> and I should probably replace Core at some point anyway
<struktured> supposed core kernel works ok, although I have no proof
<struktured> *supposedly
<Tekk_> yeah, I just heard that on the subreddit
<Tekk_> I think I used more than just the kernel though
<Tekk_> Know if batteries works? Could be doable that way
<struktured> dunno, what features? unix level stuff?
<Tekk_> I'd have to check
<Tekk_> sec
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
<tobiasBora> nojb: Same thing : the error, nothing is modified in "ocamlfind ocamlc -i ..." (-i option may be important)
<smondet> tobiasBora: but the `-i` is just showing the interface right? it should not need the `.cmo`s
<Tekk_> looks like I was mostly using it for data types
<Tekk_> batteries probably has me covered
<Tekk_> hashtables and list utils seems like
<tobiasBora> smondet: But my files depend on an external .cmo, so to build the interface the .cmo are needed...
Hannibal_Smith has quit [Quit: Leaving]
<struktured> Tekk_: yeah batteries or containers would do
* Tekk_ wonders how much this game actually does
<smondet> tobiasBora: for the interfaces you need the `.cmi` (then `-I` should be enough)
<tobiasBora> smondet: Hum that's why when I add by and ".cmi" it works. But why the "-I" if ocamlbuild isn't given to this command ?
Enjolras has joined #ocaml
<Enjolras> hi
<Enjolras> can i reference the parent module in a submodule ?
<Enjolras> something like : module Test = struct type t = int module T = struct type t = { t : t; } end end
<Enjolras> damn it. Now it works. I must have made a typo, sorry
<Enjolras> ah no
<Enjolras> only weird toplevel effect
<smondet> Enjolras: you need a name alias `type parent = t type t = { t: parent}`
<Enjolras> smondet: smart ! Thanks :)
<smondet> tobiasBora: I don't know much ocamlbuild, it should pass the `-I` options though
agarwal1975 has joined #ocaml
lobo has joined #ocaml
<tobiasBora> smondet: Hum... Do you know if it could be because I'm using the dispatch of ocsigen ?
amnn has joined #ocaml
<smondet> tobiasBora: maybe the dispath of ocsigen is designed for a "common/ server/ client/" tree structure (???)
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
swgillespie has joined #ocaml
<tobiasBora> smondet: That would be strange but why not... I found this rule, but it's pretty hard to know what it does like this : rule "*.eliom -> **/_server/*.ml" ~deps:[ %(path)/%(file).eliom; %(path)/_type/%(file).inferred.mli ] ~prods:[ %(path)/_server/%(file:<*>).ml ] <fun>
rgrinberg has quit [Ping timeout: 256 seconds]
dsheets has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
<smondet> tobiasBora: that is faaar beyond my ocamlbuild knowledge :D
<tobiasBora> Ok, thank you for you help smondet !
struktured has quit [Ping timeout: 256 seconds]
jonowww has joined #ocaml
<Drup> jonowww: I answered
<Drup> earlier
nojb has quit [Quit: nojb]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jonowww> ah sorry, i closed the lid on my laptop... could you answer the stack overflow for posterity? :)
jgjl has joined #ocaml
badkins has quit []
<Drup> maybe later on, busy right now, but it's a common enough question, so probably going to be answered quickly anyway
<nullcat> swift is open-sourced...
<nullcat> "open-source version of swift is ocaml" not anymore...
<nullcat> well, actually i don't really care...
TheLemonMan has joined #ocaml
<tane> nullcat, what?!
octachron has joined #ocaml
<Drup> nullcat: swift is also not really good
zpe has joined #ocaml
<nullcat> yeah... iirc, you can do something like if a_expression_that_returns_an_option then ... else ...
<nullcat> turn None into false...
<nullcat> something like that, my ios dev friend showed me
<Drup> (However, Apple opening the toolchain is rather surprising)
<nullcat> yeah...
<nullcat> what's your opinion on swift? technical aspect i mean
dsheets has joined #ocaml
hay207 has quit [Ping timeout: 272 seconds]
hay207 has joined #ocaml
hay207 has quit [Read error: Connection reset by peer]
zpe has quit [Remote host closed the connection]
<Tekk_> nullcat: it's a less safe rust with objc interop
<Tekk_> that's about it
<Tekk_> Well, marginally less safe in that at least at first they seemed to be pretty "yeah, just unwrap this" happy
<tane> mh, isn't swifts "switch"|"match" or whatever it's called there a statement instead of an expression?
* Tekk_ looks
<tane> yeah, i found that rather odd
<Tekk_> tane: yeah, looks like it's C-style switch, not a match
<Tekk_> I do like the syntax for option though
<Tekk_> looking at it
<Tekk_> Type? is pretty explanatory imo
<Tekk_> and less typing than option Type
<nullcat> kind of like Rust calls ADT enum. make c/c++ devs feel more familar
gperetin has quit [Ping timeout: 244 seconds]
<Tekk_> it looks like the "proper" way to do it is to make a new scope?
<Tekk_> if let foo = bar { ... }
Hannibal_Smith has joined #ocaml
<Tekk_> Which is technically what ocaml does, but this seems much heavier
gperetin has joined #ocaml
<Tekk_> plus given that people are going to be following C indentation rules...
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tautologico> swift is progress when compared to obj-C
<Tekk_> Yeah, no wonder everyone just unwraps
<tautologico> its design was also constrained by the requirement to interop with obj-C... but it's a step in the right direction
<Tekk_> tautologico: not really
<Tekk_> objc is dynamic dispatch, long as you're sending the messages in the right format it shouldn't really be constraining you
<tautologico> of course, OCaml is much better :)
<nullcat> kind of sad to see my favorite language never gets popular...
<nullcat> yeah i agree OCaml is much better, but few people uses it...
<Tekk_> nullcat: I think it's a law of computing
<Tekk_> the best languages don't get used
<Tekk_> except C. I like C
<tane> well, ocaml has its flaws, but it's getting better i'd say
<nullcat> best language inspires other languages? :)
<Tekk_> nullcat: mhm
<Tekk_> they inspire other languages, but they don't get popular themselves, no idea why
<Tekk_> I guess the issue is that they're the ones pioneering stuff so they get the features before people realize they need them
<Tekk_> By the time people do realize, they're not shiny and new and cool
ggole has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
Anarchos has joined #ocaml
hay207 has joined #ocaml
amnn has joined #ocaml
rishabhjain has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat has joined #ocaml
gabemc has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
hay207 has quit [Quit: Leaving]
srax has joined #ocaml
xificurC has quit [Remote host closed the connection]
xificurC has joined #ocaml
struktured has joined #ocaml
relrod_ has joined #ocaml
relrod__ has joined #ocaml
relrod__ has quit [Client Quit]
BitPuffin|osx has joined #ocaml
jonowww has quit [Ping timeout: 246 seconds]
relrod has quit [Ping timeout: 276 seconds]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slash^ has quit [Read error: Connection reset by peer]
<ollehar1> eh, what libcurl is ocurl really looking for? libcurl.a?
<Tekk_> wtf..
<Tekk_> the openbsd ocaml package doesn't pull camlp4
<Tekk_> that's its own package
<struktured> adrien_znc: got aspcud working now too, can instal some packages but getting dynlink errors trying to build anything heavy like campl4, react, camomile, etc..is that flexdll problem?
<adrien> quite likely
<adrien> if it says "can't load ..."
<adrien> then it is
<struktured> adrien: Cannot find file "dynlink.cmxa" blah blah..
<adrien> that one too
matason has quit []
<struktured> adrien: same problem though? right
relrod_ is now known as relrod
<adrien> dynlink for native code definitely requires flexdll on windows
matason has joined #ocaml
<adrien> it's the reason why the project was made
amnn has joined #ocaml
<struktured> adrien: yeah I figured. so If I am commited to 64 bit, which I tend to be. what are next steps? contact alan frisch?
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> Drup: can you please run ocp-indent against all of lwt -_-
<adrien> struktured: wg-windows@lists.ocaml.org
<adrien> he's on that list too
<struktured> adrien: ok tx
<adrien> rx
<adrien> (sorry)
<adrien> (bad joke)
Haudegen has joined #ocaml
MrScout has quit [Ping timeout: 265 seconds]
MrScout has joined #ocaml
<Drup> rgrinberg: your pull-request is most welcome :3
Denommus has joined #ocaml
<rgrinberg> Drup: haha i will have to ruin blame forever
<adrien> -w
<rgrinberg> Drup: besides, i'm already testing the waters with a small PR :)
<adrien> -w
<adrien> Ignore whitespace when comparing the parent’s version and the
<adrien> child’s to find where the lines came from.
<adrien> you can also specify a commit to git blame and therefore do the process before it
<adrien> i.e. you won't
rishabhjain has quit [Remote host closed the connection]
jabesed has quit [Ping timeout: 265 seconds]
kakadu_ has joined #ocaml
kdas_ has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat_ has joined #ocaml
fredyr has quit [Quit: Lost terminal]
Anarchos has quit [Remote host closed the connection]
Anarchos has joined #ocaml
gabemc has quit [Ping timeout: 255 seconds]
<Algebr> How much code do ocamlc and ocamlopt share?
jabesed has joined #ocaml
<def`> A lot?
<def`> they differ after lambda representation
<def`> there is only one more step (bytecode generation) in ocamlc
<def`> ocamlopt go through more intermediate representations, but that's expected
<def`> sharing is almost maximal:)
<Algebr> thanks
lyxia has joined #ocaml
kdas_ has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
dbohdan has joined #ocaml
dbohdan has left #ocaml [#ocaml]
struktured has quit [Ping timeout: 246 seconds]
MrScout has quit [Remote host closed the connection]
<Algebr> utop needs cmas correct?
Haudegen has quit [Ping timeout: 264 seconds]
s1n4 has joined #ocaml
MrScout has joined #ocaml
Rebelion has joined #ocaml
Gama11_ has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
Gama11 has quit [Ping timeout: 246 seconds]
jgjl has joined #ocaml
xificurC has quit [Remote host closed the connection]
xificurC_ has joined #ocaml
MrScout has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<Algebr> If you have just one .cmo, then making a .cma serves no purpose. Is that accurate?
<adrien> always make .cma :)
<adrien> they carry more information
<adrien> (which C libraries to link iirc)
manizzle has joined #ocaml
fold has quit [Ping timeout: 256 seconds]
nullcat_ has quit [Quit: gone...]
Haudegen has joined #ocaml
kdef has quit [Quit: Leaving]
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 252 seconds]
matason has quit []
f[x] has quit [Ping timeout: 258 seconds]
kdef has joined #ocaml
matason has joined #ocaml
<Algebr> Okay super: Exception: <abstr>.
swgillespie has joined #ocaml
MrScout has joined #ocaml
<adrien> abstract art
<adrien> it can make you very rich
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
lobo has quit [Quit: leaving]
tane has quit [Quit: Verlassend]
Algebr has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> how annoying that we have 2 ssl libs now :/
<Drup> we have two ?
<rgrinberg> async_ssl and ssl
<Drup> ah, obviously
<rgrinberg> Drup: well they could at least share the bindings
<rgrinberg> async_ssl uses ctypes though
<Drup> the core ecosystem not reinventing something ? I dare you !
<Drup> </troll>
swgillespie has joined #ocaml
<rgrinberg> aye. it seems like they just wanted an excuse to try out ctypes :/
<Drup> we will all use hannes's stuff soon enough, anyway :3
ohama has quit [Ping timeout: 256 seconds]
ohama has joined #ocaml
<rgrinberg> Drup: and once you polish off assemblage we'll be able to plug and play any ssl implementation/binding combination we want :D
Gama11_ has quit [Remote host closed the connection]
jonh has left #ocaml ["WeeChat 0.4.2"]
matason has quit []
The_Mad_Pirate has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
kdef has quit [Ping timeout: 265 seconds]
octachron has quit [Quit: Leaving]
f[x] has joined #ocaml
Simn has quit [Quit: Leaving]
kdef has joined #ocaml
rgrinberg has quit [Ping timeout: 258 seconds]
Cyanure has quit [Remote host closed the connection]
inf-gropeoid has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
waneck has joined #ocaml
swgillespie has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
Denommus has quit [Quit: restarting Emacs]
thomasga has quit [Quit: Leaving.]
Denommus has joined #ocaml
manizzle has quit [Remote host closed the connection]
fold has joined #ocaml
MrScout has quit [Ping timeout: 265 seconds]
hasket_ has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
ollehar1 has quit [Quit: ollehar1]
hasket_ has quit [Quit: Textual IRC Client: www.textualapp.com]
blandflakes has joined #ocaml
hasket has joined #ocaml
BuddhistCrusader has joined #ocaml
<BuddhistCrusader> what side of the internet have i now gotten myself into
kakadu_ has quit [Remote host closed the connection]
Algebr has joined #ocaml
<Algebr> I want to use a result library but not sure which one to pick given the current state. I don't want to commit to too much of a library but I also don't want something abandoned.
<BuddhistCrusader> let greeting = "how " :: "are " :: "you " :: "doing " :: [];;
<BuddhistCrusader> greeting :: "?";;
<Denommus> Algebr: "result library"?
<Algebr> Denommus: https://github.com/ocaml/ocaml/pull/147 the opening post mentions a few libraries.
amnn has joined #ocaml
<dtscode> https://bpaste.net/show/6af34e6b98c4 Is this nesting a tuple inside a list?
amnn has quit [Client Quit]
<def`> dtscode: it's a list of triplets, with one element
<dtscode> triplet?
<def`> a tuple of size 3
<dtscode> ah
badon has quit [Ping timeout: 252 seconds]
c74d has quit [Remote host closed the connection]
srax has quit [Quit: WeeChat 1.2]
c74d has joined #ocaml
rgrinberg has joined #ocaml
<Algebr> how much smaller is batteries than core? both in code size and actual code features
rgrinberg has quit [Ping timeout: 265 seconds]
walter|r has joined #ocaml
<Algebr> oh geez, batteries uses more top level modules than core
madroach has quit [Ping timeout: 264 seconds]
<paarth> BuddhistCrusader: greeting @ ["?"];;
<BuddhistCrusader> :D thanks paarth, just noticed the error on the try OCaml website
madroach has joined #ocaml
<BuddhistCrusader> in what other cases can you use @ ?
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<zozozo> BuddhistCrusader: @ is list concatenation, @@ is application operator i.e f (g x)) is equivalent to f @@ g x, I don't know if that answers your question
<BuddhistCrusader> thanks yes it does. interesting use of @
rgrinberg has joined #ocaml
gabemc has joined #ocaml
sh0t has quit [Remote host closed the connection]
kdef has quit [Quit: Leaving]
Algebr has quit [Ping timeout: 276 seconds]
hasket is now known as haskets