adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<Algebr`> I find that mlis really get the in the way during development
teiresias has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
glesica has quit [Quit: Connection closed for inactivity]
shinnya has quit [Ping timeout: 244 seconds]
noethics has quit [Quit: Leaving]
agarwal1975 has joined #ocaml
<Bluddy[m]> Algebr`: what does that mli comment respond to?
<Algebr`> refactoring, fixing my bindings to brotli
Reshi has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 268 seconds]
teiresias has joined #ocaml
fraggle_ has quit [Ping timeout: 250 seconds]
fraggle_ has joined #ocaml
<Bluddy[m]> ok yes, I agree. I avoid mli files as much as possible until I must have them
Reshi has quit [Ping timeout: 240 seconds]
<Algebr`> yes, this is refactoring code from a phase I had of "Do the MLI first!"
mfp has quit [Ping timeout: 260 seconds]
<hhx> i'm really stuck on this problem, can anyone help me out?
<hhx> Write a function min_index : int array -> int that returns the index of the minimal element of a
<hhx> (it's not homework, it's for the MOOC, but i've been stuck on this for hours)
<Algebr`> hhx: you could fold over the array or write a for loop
<hhx> tried fold, but fold_left and fold_right doesn't give index, right?
<hhx> we haven't learned for loop yet, but i may try that
<Algebr`> then you give the index in an accum
<hhx> mm okay, i'll try it thanks
brunoro has joined #ocaml
<hhx> Algebr`: lol here is my solution http://lpaste.net/1938800026130055168
<hhx> it's so ugly, is that the best i can do?
<Algebr`> don't say that, if its works then that's good. Also you don't need the ;;
<hhx> heh, alright
<Algebr`> small style thing, maybe don't put code on the same line as in
groovy2shoes has quit [Ping timeout: 240 seconds]
brunoro has quit [Ping timeout: 260 seconds]
<hhx> Algebr`: hm trying to figure out how to best style all the nested let..in is hard :P
<hhx> hopefully over time i'll develop a good style
<Algebr`> yep
rgrinberg has joined #ocaml
sepp2k has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 248 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
Algebr` has quit [Ping timeout: 260 seconds]
agarwal1975 has quit [Quit: agarwal1975]
brunoro has joined #ocaml
rgrinberg has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
agarwal1975 has joined #ocaml
ggole has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
kamog` has joined #ocaml
kamog has quit [Ping timeout: 250 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 250 seconds]
ggole__ has joined #ocaml
Reshi has joined #ocaml
ggole_ has quit [Ping timeout: 260 seconds]
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 268 seconds]
ggole__ has joined #ocaml
ggole__ has quit [Client Quit]
ggole_ has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 248 seconds]
rgrinberg has quit [Ping timeout: 248 seconds]
Reshi has quit [Quit: WeeChat 1.5]
kamog` is now known as kamog
kakadu has joined #ocaml
jao has quit [Ping timeout: 248 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
AlexDenisov has joined #ocaml
rgrinberg has joined #ocaml
kamog has left #ocaml ["Konversation terminated!"]
rgrinberg has quit [Ping timeout: 260 seconds]
slash^ has joined #ocaml
for{} has joined #ocaml
Heasummn has quit [Quit: Leaving]
brunoro has joined #ocaml
alexelcu has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
groovy2shoes has joined #ocaml
alexelcu has quit [Quit: Leaving.]
groovy2shoes has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
reynir has quit [Read error: Connection reset by peer]
reynir has joined #ocaml
bigs has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
bigs has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
kakadu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
etc has joined #ocaml
<etc> https://ocaml.io/ 's certificate just expired
Simn has joined #ocaml
etc has quit [Quit: Page closed]
brunoro has joined #ocaml
for{} is now known as nihil
nihil is now known as for{}
brunoro has quit [Ping timeout: 244 seconds]
pyx has joined #ocaml
pyx has quit [Client Quit]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkf has quit [Read error: Connection reset by peer]
hhx has quit [Ping timeout: 240 seconds]
slash^ has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
hhx has joined #ocaml
brunoro has joined #ocaml
ggole has joined #ocaml
vapid has joined #ocaml
rand__ has joined #ocaml
freusque has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
slash^ has joined #ocaml
freusque has quit [Ping timeout: 268 seconds]
mfp has joined #ocaml
dakk has joined #ocaml
zpe has joined #ocaml
<infinity0> when is 4.04 due for release?
hhx has quit [Ping timeout: 240 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 268 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
AlexDenisov has joined #ocaml
alexelcu has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
for{} has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 240 seconds]
alexelcu has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
FreeBirdLjj has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
for{} has joined #ocaml
zpe has joined #ocaml
Algebr has joined #ocaml
ggole_ has joined #ocaml
ggole__ has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
ggole has quit [Ping timeout: 260 seconds]
ggole_ has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
for{} is now known as noManNoCry
ggole__ has quit [Ping timeout: 240 seconds]
<Algebr> Drup: is there a way to just recursively show all modules?
<Algebr> in ocp-browser
<companion_cube> ouch :D
<Drup> not really, but ocp-index can
<Algebr> perhaps a feature request
<Drup> that would be a bit verbose
<Drup> the current navigation system would have to be improved
<Algebr> I'm fine with current nav, say I have one top level module with two submodules which each have a small footprint, want to see all of it at once
<Algebr> companion_cube: what is the trailing int for in Bigstring.map_file_descr
<Drup> There are various other issues with the handling of modules anyway
<Drup> (like showing documentation of modules)
<Drup> or showing functors nicely
<Drup> (those are in ocp-browser, not ocp-index)
<companion_cube> it's the length, Algebr
<companion_cube> this function is mostly sugar for Bigarray.Array1.map_file
<Algebr> ah
<companion_cube> have you seen that ocp-browser can display the doc? :)
<Algebr> ya
<Algebr> space bar
<companion_cube> ✔
rand__ has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
rand__ has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
rand__ has quit [Ping timeout: 260 seconds]
alexelcu has quit [Quit: Leaving.]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
<orbifx> is it ok to call Lwt.run to end the thread and get it's returned value?
<Algebr> What is the general flag to turn on flambda?
<Algebr> ah, just -O{2, 3}
<Drup> orbifx: it's best to not nest calls to Lwt_main.run
<orbifx> What do you mean Drup ?
<orbifx> Also thanks for taking a look at the tyxml issue
dhil has joined #ocaml
AlexRussia has quit [Ping timeout: 248 seconds]
AlexRussia has joined #ocaml
<orbifx> Drup: do you mean I should aim to have one Lwt.run?
sz0 has quit [Quit: Connection closed for inactivity]
<Drup> roughly, yes
sepp2k has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
noManNoCry is now known as audio_heroin
<orbifx> ok thanks
<orbifx> and what's the difference between lwt_main.run and lwt.run?
<Algebr> lwt.run doesn't come up for me
brunoro has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
copy` has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
AlexDenisov has joined #ocaml
<Drup> there is no lwt.run
pierpa has joined #ocaml
audio_heroin is now known as ansible_moca
rand__ has joined #ocaml
larhat has joined #ocaml
rand__ has quit [Ping timeout: 268 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
<orbifx> sorry must have got confused
rgrinberg has joined #ocaml
brunoro has joined #ocaml
sepp2k has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
ansible_moca is now known as noManNoCry
dakk has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 268 seconds]
petroav has joined #ocaml
noManNoCry is now known as for{}
slash_ has joined #ocaml
slash^ has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
zpe has joined #ocaml
<Algebr> how are people making _oasis use clang on linux?
systems has joined #ocaml
<companion_cube> not sure anyone does t his :D
systems has left #ocaml [#ocaml]
systems has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
<systems> test
systems has left #ocaml [#ocaml]
<Drup> Algebr: pretty sure oasis is going to use whatever ocaml is using
<Drup> (see ocamlc -config)
rgrinberg has joined #ocaml
sillyotter has joined #ocaml
petroav has quit [Quit: Ex-Chat]
<Algebr> darn
<Algebr> but I should be able to override CC
<Algebr> also, what's the opam file field to print a message upon build failure?
<Algebr> ah, just in post-messages
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 248 seconds]
for{} has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
jbrown has quit [Quit: Leaving]
jbrown has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 250 seconds]
sillyotter has quit [Quit: WeeChat 1.5]
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
ggole_ has quit [Ping timeout: 240 seconds]
brunoro has quit [Ping timeout: 260 seconds]
hhx has joined #ocaml
jao has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonatin has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
nariyal has joined #ocaml
Heasummn has joined #ocaml
brunoro has joined #ocaml
<nariyal> I'm trying to print all the lines in a text file using this code: `let lines = In_channel.read_lines "big_css.json"; List.iter print_string lines;`, but there is a type error complaining that List.iter expected an int.
<companion_cube> `let foo = bar; ...` is wrong
<nariyal> companion_cube: tried using `in` but same error
<companion_cube> can I see the code? (use a paste)
brunoro has quit [Ping timeout: 250 seconds]
<nariyal> companion_cube: http://lpaste.net/1260570028042878976
<companion_cube> looks fine
<companion_cube> (except I'd believe In_channel.read_lines would take a channel, not a string, but I don't know Core)
<companion_cube> try `List.iter ~f:print_string lines`
<nariyal> companion_cube: read_lines type signature confirms that it takes a filename and returns `stirng list`
<companion_cube> (but I don't think it will change anything)
<companion_cube> ok
<nariyal> companion_cube: that actually worked.
<companion_cube> it's weird that you had a message about an `int`
dakk has joined #ocaml
<companion_cube> so anyway, ~f is a labelled argument
<companion_cube> Core uses those a lot
malina has joined #ocaml
<nariyal> I'm learning OCaml from Real World OCaml by yminsky; and they seem to use ~f there. But it isn't clear what that means yet. I'll dig and come back later. Thanks!
<companion_cube> no problem!
<nariyal> companion_cube: if I were not to use Core, what would be a nice way to read lines from a file into a list and print them separately? A StackOverflow answer shows a recursive method, is that the idiomatic way?
<companion_cube> without any additional library, yes indeed (using input_line)
<companion_cube> otherwise there are equivalents to Core's read_lines
<nariyal> cool. iis ocaml-batteries a viable Core alternative
<companion_cube> yes, sure
<companion_cube> it has slightly different goals, but overall it's a good alternative stdlib
<nariyal> thanks. shall stick to Core for now since the text follows it.
<companion_cube> indeed
<companion_cube> don't hesitate to ask more questions!
zpe has joined #ocaml
malina has quit [Ping timeout: 244 seconds]
nariyal_ has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
danieli has joined #ocaml
orbifx has joined #ocaml
nomicflux has quit [Quit: nomicflux]
shinnya has joined #ocaml
ygrek has joined #ocaml
praisethemoon has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
petroav has joined #ocaml
average has quit [Ping timeout: 260 seconds]
average has joined #ocaml
slash_ has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
brunoro has joined #ocaml
sh0t has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 260 seconds]
<reynir> Core.Std.List.iter: val iter : 'a list -> f:('a -> unit) -> unit
AlexDenisov has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
<adrien> and they even have "JSON.stringify()-like object dumper, more condensed and readable"
<Drup> it seems to be handwritten too, it's not even jsoo/buckle-powered
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
pierpa` has joined #ocaml
nariyal has quit [Quit: Page closed]
pierpa has quit [Ping timeout: 260 seconds]
nariyal_ has quit [Remote host closed the connection]
jao has joined #ocaml
TheLemonMan has joined #ocaml
malina has joined #ocaml
brunoro has joined #ocaml
malina has quit [Ping timeout: 250 seconds]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
brunoro has quit [Ping timeout: 260 seconds]
averell has joined #ocaml
rgrinberg has quit [Ping timeout: 268 seconds]
okuu has quit [Quit: Unyu~. Fix config.]
okuu has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
octachron has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
rand__ has joined #ocaml
rand__ has quit [Client Quit]
Guest26 has joined #ocaml
kakadu has joined #ocaml
octachron has quit [Quit: Leaving]
obadz has quit [Quit: WeeChat 1.5]
<adrien> vapid: yes?
<vapid> ye
<adrien> what's the point of that file?
<adrien> except that it shows you've scanned the channels?
<vapid> dunno
<vapid> i wanted to find out what channels a guy has been connecting to
<adrien> I'm pretty sure this is against the rule of freenode so please refrain from doing that in the future
<companion_cube> huuu, you should remove this file
<companion_cube> it's not respecting the privacy of freenode users at all, it's just plain rude
<vapid> i cant remove it now
<companion_cube> why not?
<vapid> because there is no such feature
<companion_cube> I can see "delete" on my gists
zpe has joined #ocaml
<companion_cube> this is so stupid -_-
<companion_cube> anyway
brunoro has joined #ocaml
<adrien> I can also see this is from may so I'm really wondering what you're doing with this /now/
<vapid> i'm masturbating to the massive amount of data on display in the text file
<companion_cube> okayyy
<vapid> sadly i can't rescan
<vapid> i think i used tor
<vapid> or not
<vapid> i dont really know anymore
<adrien> you better have used tor because otherwise it was a botnet, and it was done over the course of several days
<vapid> i have a nice script
<vapid> that fetches proxies from webpages that list them
<vapid> and checks them against dronebl
<vapid> it can even test socks4 proxies to see which ones are actually working
<vapid> sadly not socks5 ones though
<vapid> i've been too lazy to write a script for those
brunoro has quit [Ping timeout: 268 seconds]
<companion_cube> can you stop bragging about how you collect this kind of data? this is off-topic and out of place
<vapid> ok
<companion_cube> thanks
zpe has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 248 seconds]
brunoro has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
brunoro has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
Orion3k has quit [Quit: Leaving]
smondet` has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
smondet has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skaboy has joined #ocaml
petroav has quit [Ping timeout: 268 seconds]
dhil has quit [Ping timeout: 248 seconds]
malina has joined #ocaml
Guest26 has quit [Quit: Textual IRC Client: www.textualapp.com]
cpdean has joined #ocaml
praisethemoon has quit [Ping timeout: 250 seconds]
skaboy has quit [Quit: leaving]
brunoro has joined #ocaml
<cpdean> Hey Everyone, I'm new to ocaml development. I'm trying to read merlin's source code but my editor claims it can't find 'sturgeon' or 'inuit' packages. I can't find them on opam. am I missing something? 'make' is able to compile merlin without any problems...
<cpdean> `(merlin) findlib: sturgeon: Fl_package_base.No_such_package("sturgeon", "")`
<Drup> IIRC, those are not yet released.
<cpdean> opening small .ml files in my editor, I'm able to use the installed version of merlin to jump to function definitions and lookup type information so not sure what's wrong...
smondet` has quit [Ping timeout: 240 seconds]
<Drup> but, hum, if you are new to OCaml, I don't think reading merlin's sources is a good introduction.
<cpdean> Drup: if i pull down the sources for those things, how do I install them? i tried 'opam pin add .' when in inuit's source dir but no dice
kakadu has quit [Remote host closed the connection]
<Drup> you can pin git repositories directly: "opam pin add sturgeon https://github.com/let-def/sturgeon.git"
<cpdean> Drup: k, will try that
<cpdean> Drup: what would you suggest i read instead of merlin? the book i'm going through is hard for me to absorb
<Drup> Which book are you reading ?
brunoro has quit [Ping timeout: 240 seconds]
<cpdean> Drup: https://realworldocaml.org/ but hard for me to absorb language details in a vacuum. i need to see more of how you actually accomplish things in the language
petroav has joined #ocaml
Heasummn has quit [Remote host closed the connection]
<Drup> You could follow the MOOC that started just two weeks ago :p
<Drup> otherwise, which project to look at depends on your interest
Heasummn has joined #ocaml
<cpdean> i've been meaning to try to write a redis clone
<cpdean> I mostly just want to work on something big enough that I get to feel the benefits of ocaml's type system
<cpdean> i don't have enough experience using static types other than how java annoys you
oriba has joined #ocaml
<cpdean> and i played with elmlang a little, but it wants to exist in a vaccuum in a DOM node so you can't write server code
<cpdean> ocaml felt like a close-enough shift
Simn has quit [Quit: Leaving]
<Drup> hum, there are various database projects in OCaml, you could look at them https://github.com/rizo/awesome-ocaml#databases
<jmasseo> looks like mostly bindings. Nothing whole clothy
<jmasseo> irmin isn't really the same thing it looks like
<jmasseo> and the other two use other backends
<Drup> obigstore is a complete (and serious) implementation
<Drup> (You can even ask the author if you have questions, he hangs around here)
<cpdean> cool!
<cpdean> what was the last ocaml project either of you worked on?
<Drup> last released would be tyre, for me
<jmasseo> i've never worked on a large ocaml project. just MOOC and personal errata.
<Drup> (like, yesterday, literally)
<jmasseo> obgistore runs on the C leveldb it looks like.
<jmasseo> but it looks pretty cool
orbifx has quit [Ping timeout: 260 seconds]
<cpdean> mmm so i wouldn't learn about state stuff in ocaml, it just relies on the c-bindings for that?
<jmasseo> I have no idea.
minn has joined #ocaml
<jmasseo> go root through the code and look though, you'll learn something for sure
<Drup> Also, pgocaml is a postgres client, but it doesn't rely on C code, it's all OCaml
<jmasseo> it has an implementation of a redis like text protocol you can look at
<cpdean> nice
<cpdean> i had an idea for working on something like pgpool, but in ocaml so you could deploy it with mirageos
<jmasseo> the text mode protocol implementation is sort of elegant for obigstore too.
<minn> What does %entry% mean in ocamlyacc parsing automata? For example, if the stack is [1;s;4], how would I reduce according to the rule %entry% : '\001' s? This doesn't look like a traditional part of the LR/LALR parsing algorithm.
shinnya has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ocaml
<cpdean> do you generally have to have all dependencies of a given project installed with opam before you can compile it? what if two projects you want to work on use different versions of the same package?
<copy`> You can use multiple switches for multiple projects
<copy`> There can be multiple switches with the same ocaml version
malina has quit [Remote host closed the connection]
minn has quit [Ping timeout: 240 seconds]
justicefries has joined #ocaml
<cpdean> gotcha... so there isn't something like a `opam getdeps`?
<justicefries> hey everybody. The whole OCaml/Reason/Bucklescript thing is pulling me in the direction of OCaml in general, especially from Haskell. currently at the curious stage. :) I wanted to ask, since I can't find much information: what's the current state of concurrent/parallel OCaml?
minn has joined #ocaml