adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<Drup> rgrinberg: I've been running on it for 6 months :p
<rgrinberg> without any rm -rf / i hope
hellofunk has quit [Ping timeout: 264 seconds]
<Drup> No, I never had to nuke my .opam
<Drup> I had to nuke some switches when we moved to compiler-as-packages, but that was a long time ago, the migration is a lot smoother now
<rgrinberg> And how do you update your opam2? Just pull from git and make?
<Drup> archlinux's AUR opam-git
<rgrinberg> let's see what that dooes then...
sh0t has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
Ayey_ has joined #ocaml
Ayey_ has quit [Ping timeout: 268 seconds]
hellofunk has joined #ocaml
hellofunk has quit [Ping timeout: 260 seconds]
mfp has quit [Ping timeout: 258 seconds]
<tobiasBora> Bonjour!
<tobiasBora> Juste une petite question:
<lyxia> tobiasBora: #ocaml-fr is the French speaking channel.
<tobiasBora> Oh yes sorry
<tobiasBora> Well, Hello again, I've a small question:
<tobiasBora> I'd like to efficiently download http pages.
<tobiasBora> I saw that the main available solution seems to be cohttp, or the client part of ocsigne
<tobiasBora> *ocsigen
<tobiasBora> I also would like to use an http proxy
<tobiasBora> So first, is there any reason to choose one library or the other?
silver has quit [Read error: Connection reset by peer]
<tobiasBora> In term of efficiency, which one is the most efficient?
<Drup> use cohttp.
<tobiasBora> Ok thank you. Why is it better here than ocsigen? Ocsigen is only for servers?
<Drup> first off, you can't use the ocsigen *client* outside of the ocsigen server. But more than that, it's mostly a quick hack, it doesn't have many features and was never really meant to be used seriously
<tobiasBora> ok thank you
<Drup> (jsoo's module for http request is a different matter, of course. That one is fine)
zpe has joined #ocaml
<tobiasBora> jsoo ?
<Drup> js_of_ocaml
<tobiasBora> oh ok
<tobiasBora> And I can't find in cohttp how to use http proxy, do you have any idea? I though it would be in the header code, but it's not...
<tobiasBora> Or should I manually code it?
<Drup> no idea
<tobiasBora> ok thank you. It seems to be related to this issue https://github.com/mirage/ocaml-cohttp/issues/515
nomicflux has joined #ocaml
fraggle_ has quit [Ping timeout: 264 seconds]
cbot has joined #ocaml
minn has joined #ocaml
sh0t has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
manizzle has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
jao has quit [Ping timeout: 240 seconds]
pilne has quit [Quit: Quitting!]
zpe has quit [Ping timeout: 240 seconds]
Muzer has quit [Ping timeout: 256 seconds]
hovind has joined #ocaml
Muzer has joined #ocaml
phase_ has joined #ocaml
Ayey_ has joined #ocaml
zpe has joined #ocaml
Ayey_ has quit [Ping timeout: 268 seconds]
shinnya has joined #ocaml
gtristan has joined #ocaml
hovind has quit [Ping timeout: 268 seconds]
MercurialAlchemi has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
minn has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
xaimus has quit [Remote host closed the connection]
argent_smith has joined #ocaml
argent_smith has quit [Client Quit]
zpe has quit [Ping timeout: 246 seconds]
hovind has joined #ocaml
xaimus has joined #ocaml
Simn has joined #ocaml
argent_smith has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
phase_ has quit [Remote host closed the connection]
zpe has joined #ocaml
cbot_ has quit [Quit: Leaving]
orbifx has joined #ocaml
ygrek_ has joined #ocaml
argent_smith has quit [Quit: Leaving.]
argent_smith has joined #ocaml
Axle has joined #ocaml
Axle has quit [Client Quit]
mrvn has quit [Remote host closed the connection]
kakadu has joined #ocaml
mrvn has joined #ocaml
mfp has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
<Simn> `| KParam _ , x | x , KParam _ when x <> KString && x <> KOther -> ()` Why does that cause warnings about "Ambiguous or-pattern variable under guard" now?
<orbifx> anyone got OCaml related projects on gitlab.com?
silver has joined #ocaml
bruh has joined #ocaml
gtristan has quit [Ping timeout: 260 seconds]
gtristan has joined #ocaml
<adrien> orbifx: I have, it's not an old one though :P
<orbifx> not an old one?
<orbifx> link? I'm trying to transfer over
<adrien> it's a new project with only a couple commits
zpe has joined #ocaml
<Enjolras> Simn: http://caml.inria.fr/pub/docs/manual-ocaml/comp.html#sec270 see the bottom of the page
<Enjolras> tl;dr; it does not do what you expect
<Simn> Oh my
<Simn> Thanks for the link
<Enjolras> hmm actually i think your code is ok.
<Enjolras> but still it's error prone
<Enjolras> tobiasBora: if you want to use http proxy, you can use ocurl. But this is basically the C api so not really nice to use
<Enjolras> The upside is that it has most of curl features
<Simn> Right, my code is fine because if the guard fails it wouldn't match the second pattern anyway.
<Simn> But I guess that's not so easy to tell for the compiler.
stux|RC-only has quit [Ping timeout: 260 seconds]
argent_smith has quit [Quit: Leaving.]
octachron has joined #ocaml
<mrvn> Simn: if "let x = match foo with | KParam _ , x -> x | x , KParam _ when x <> KString && x <> KOther -> x in ... works then I would expect the compiler to get "it".
argent_smith has joined #ocaml
argent_smith has quit [Client Quit]
<mrvn> newbies keep trying "match v with int -> () | bool -> ()". Maybe ocaml should warn when using a type name as variable name.
<octachron> mrvn, I am not sure if someone can make this mistake more than once. It may make more sense to have this kind of warning/educational notice in a pedagogical linter
<Drup> Given that people have a t type in scope pretty much all the time, and it's very common to have the Tail of a list called "t" in a pattern matching, this would be incredibly annoying for non-beginners
<Drup> and then, you're asking "should this warning be enabled by default" and you realize it's just not a very good idea to begin with
<mrvn> a linter or not having it on per default would make it useless. beginners don't use the former and don't know how to enable the later.
<Drup> precisely
<mrvn> which reminds me: the ocamlopt manpage lists no conffile. Is there something like .ocamlc or .ocamlopt where one can enable warnings globally?
nightmared has joined #ocaml
<octachron> mrvn, not really. For OCaml (≥4.05) the closest thing is probably to use "ocamlopt -args config_file"
argent_smith has joined #ocaml
<Simn> Is there a better way to express this? http://paste2.org/jVbxshZE I need a type value which has a constructor that holds a ValueHashtbl, which is a Hashtbl specialization using the value type...
<mrvn> Simn: variant types with only one Constructor of ... is usualy pointless.
<Simn> The real type has more of course.
<mrvn> Why do you call Make multiple times?
<Drup> octachron: well, there is OCAMLPARAM
<Simn> Because I don't know what I'm doing is probably the answer. :)
<mrvn> Simn: with functors it is bets to assign them to a module first and then use that module. Otherwise each invocation might give you a different module.
<mrvn> Drup: that's what I have in my .zshrc but it's not nice.
<mrvn> Simn: other thing: whey module rec?
<Simn> So it can pass itself to Make
<octachron> Drup, ah yes, I tend to forget OCAMLPARAM
<mrvn> Simn: is that needed? Never seen a recursive module/functor combo before.
<Simn> Well, I'd love to approach this differently because this feels quite hacky.
<Simn> Hence the question
<mrvn> I would add an "module M = Make (ValueHashtbl)". Other than that I see nothing I would change.
<mrvn> recrusive modules generally look like hell.
<Simn> Alright, thanks!
<Drup> Simn: are you trying to make a htbl which keys and values are both hashtables of values ?
zpe has quit [Ping timeout: 256 seconds]
<Drup> (hastables all the way down, until you hit stack overflow ? :p)
<Simn> Yes I think that's what I'm trying to make. :)
<Drup> that sounds like a terrible idea
argent_smith has quit [Quit: Leaving.]
<mrvn> Drup: 14:03 < Simn> The real type has more of course.
<Simn> And I want to represent a map that has value keys, but is also a value itself.
<Simn> Actually it would only have to hold vobject keys, but I don't think that makes much of a different type-declaration-wise.
<Simn> I have to run, thanks for the help!
Simn has quit [Quit: Leaving]
<Enjolras> mrvn: adding warnings for beginners is not a good idea, imo. Think Elm
f[x] has joined #ocaml
<Enjolras> For instance, there is a good example with rust. They tried to add beginner friendly warnings which were suggesting fixes
<Enjolras> it was either incredibly easy information you know already after 20minutes of learning rust
<Enjolras> either, wrong, and actually mis-leading
<Enjolras> and then when you actually learn the language, it annoys you A LOT.
<Enjolras> Because the compiler is burrying you under tons of useless informations
ygrek_ has quit [Ping timeout: 260 seconds]
nightmared has quit [Read error: Connection reset by peer]
<Enjolras> (now for instance rust is now emitting a 5 line warning for unused functions. Adding precise location for where the function starts and stops. It makes it harder to read the information and thanks my editor can point me to function start and termination...)
nightmared has joined #ocaml
<tobiasBora> Enjolras: Ok thank you, do you know if ocurl is efficient?
nightmared has quit [Read error: Connection reset by peer]
stux|RC-only has joined #ocaml
nightmared has joined #ocaml
<mrvn> tobiasBora: does it use BigArray or strings?
<mrvn> Enjolras: The way I think it should work is that you start off with those beginner warnings and learn how to turn them off in .ocamlcrc when you learned them or something.
kakadu has quit [Remote host closed the connection]
<mrvn> Enjolras: although I would be suprised if you write "match v with int -> ... | bool -> ..." since the match is ambigious.
rps_ has joined #ocaml
<Enjolras> tobiasBora: well it's curl. The defacto http client implementation :)
<rps_> hi. I get Access is Denied while running .native
<rps_> I am beginner
<Enjolras> efficient depends on what you want to do, but you can reach hundreds of requests per second easily
<Enjolras> mrvn: as long as you can turn it off. But i'm not convinced that it will help anyway
<Enjolras> guessing the user intention can be difficlt, and when you get it wrongs it's really bad to mislead beginners
<Enjolras> that confuse them a lot
<orbifx> 3
TheLemonMan has joined #ocaml
zpe has joined #ocaml
slash^ has joined #ocaml
spew has joined #ocaml
jao has joined #ocaml
<rps_> hello. would somebody look into my issue. Access is Denied while running .native
<rps_> I installed Ocaml using installer ocpwin32-20160113-4.02.1+ocp1-full-mingw32.exe from https://www.typerex.org/ocpwin.html
<rps_> he REPL works, giving on ocaml the following:OCaml version 4.02.1+ocp1 Following http://ocaml.org/learn/tutorials/basics.html Iwrote a hello program as follows and saved it in my_program.ml in my_projects folder. print_endline "Hello, World!" On compiling with ocamlbuild my_prog.native, E:\ocamlwrk\my_project>ocamlbuild my_prog.native mkdir 'E:\ocamlwrk\my_project\_build' 00:00:00 1 (0 ) my_prog.ml.depends
<Enjolras> it probably means that the .native file is not allowed to be executed
<Enjolras> you need to change permissions on windows somehow
<Enjolras> not sure how, i've not used windows in ages :)
<rps_> that it means. But what is the prblm? I can't figure out
<rps_> ok. I'll chk
<Enjolras> i think you can right click the file, go to properties / security and set it to execute
<Enjolras> something like this
orbifx has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 246 seconds]
orbifx has joined #ocaml
<rps_> yes. I'm trying that
orbifx has quit [Ping timeout: 258 seconds]
rps_ has quit [Quit: Page closed]
wtetzner has joined #ocaml
minn has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
zpe has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
nomicflux has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
nomicflux has quit [Quit: nomicflux]
zpe has joined #ocaml
orbifx has joined #ocaml
toolslive has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml
toolslive has joined #ocaml
mengu has joined #ocaml
shinnya has quit [Ping timeout: 258 seconds]
argent_smith has joined #ocaml
nomicflux has quit [Quit: nomicflux]
Simn has joined #ocaml
ncthom91 has joined #ocaml
<orbifx> anyone well-versed in tyxml?
MercurialAlchemi has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
orbifx has quit [Quit: WeeChat 1.7]
sh0t has joined #ocaml
sh0t has quit [Client Quit]
tane has joined #ocaml
jmiven has quit [Ping timeout: 260 seconds]
Leonidas has quit [Ping timeout: 260 seconds]
Leonidas has joined #ocaml
nopf has quit [Ping timeout: 258 seconds]
Anarchos has joined #ocaml
nopf has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
moei has joined #ocaml
jmiven has joined #ocaml
cranmax has joined #ocaml
frefity has joined #ocaml
phase_ has joined #ocaml
Ayey_ has joined #ocaml
cbot has joined #ocaml
jao has joined #ocaml
cranmax_ has joined #ocaml
cranmax has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cranmax_ is now known as cranmax
zpe has quit [Ping timeout: 268 seconds]
<cranmax> Hi everyone, I want to learn OCaml to develop my own trading system for personal purpose and to learn. I don't know programming in any language but OCaml is one that fits my thoughts and my requirements. I have installed succesfully an enviroment to develop in OCaml. So where I may start? Thanks
hellofunk has joined #ocaml
<mrvn> cranmax: the manual from http://www.ocaml.org/, tutorials, or https://realworldocaml.org/
hellofunk has quit [Remote host closed the connection]
<cranmax> mrvn: this manual this http://caml.inria.fr/pub/docs/manual-ocaml/ ?
spew has quit [Quit: foobar]
octachron has quit [Quit: Leaving]
kakadu has joined #ocaml
vtomole has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<mrvn> it's in the name
<cranmax> mrvn: thanks
tane has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
newbie84 has joined #ocaml
newbie84 is now known as lolisa
govg has quit [Ping timeout: 258 seconds]
lkjh has joined #ocaml
lkjh has quit [Client Quit]
cranmax1 has joined #ocaml
cranmax1 has quit [Client Quit]
cranmax1 has joined #ocaml
cranmax1 has quit [Client Quit]
vtomole has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 264 seconds]
<manizzle> cranmax, why do you think ocaml is the way to go?
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
jbrown has joined #ocaml
<cranmax> manizzle: I have run some little scripts in Python and C# but for mi is not easy thinking that way; I see functional programming in OCaml or F# more straightforward and concise. Also is quite stable and is being used in real business
phase_ has quit [Ping timeout: 246 seconds]
<manizzle> interesting, what parts of ocaml do you think will help you build this trading system?
<manizzle> what about trading is inherently functional? i would think something like erlang would be a better choice for parallelism
<manizzle> it is what you want in a high frequency trading system right?
f[x] has quit [Ping timeout: 268 seconds]
argent_smith has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 256 seconds]
SomeDamnBody has joined #ocaml
<SomeDamnBody> Suppose I am using ocamlgraph, and I have graphs with vertices that have say, a node A with two distinct paths to B. I want to find all cases of this scenario, but I don't know how to do it efficiently.
vicfred has joined #ocaml
Ayey_ has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
tane has quit [Quit: Leaving]
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
zpe has joined #ocaml
Simn has quit [Quit: Leaving]
kakadu has quit [Remote host closed the connection]
<Drup> SomeDamnBody: walk all the nodes, and look at each outgoing neighbours, and register when you hit the same neighbour twice from a node ?
<Drup> that should be rather easy
<Drup> O(|V|+|E|) or something
tweek__ has joined #ocaml
<tweek__> cfcs: you around?
SomeDamnBody has quit [Remote host closed the connection]