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
qln` has joined #ocaml
qln` has quit [Ping timeout: 250 seconds]
silver has quit [Quit: rakede]
Denommus has quit [Remote host closed the connection]
cnu- has quit [Ping timeout: 258 seconds]
cnu- has joined #ocaml
qln` has joined #ocaml
qln` has quit [Ping timeout: 250 seconds]
segmond has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
<kv> So what is the best way to build ocaml projects? Seems like there is no de-facto standard :-/
<kv> oasis vs. ocamlbuild vs. omake vs. ???
<bruce_r> I have been adviced to use oasis
qln` has joined #ocaml
<bruce_r> looks like it's becoming the standard
<bruce_r> it's also fairly easy once you've taken 1h to understand how to set it up the first time
qln` has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
<kv> bruce_r that has been my sense as well. There are just lots of flags that are a little hard to understand
<kv> Im also more interested in js_of_ocaml than vanilla ocaml so maybe that is part of my struggle
<kv> yminsky you happen to be here?
ygrek_ has quit [Ping timeout: 265 seconds]
<kv> Trying to build https://github.com/janestreet/incr_dom/tree/master/example and running into issues
FreeBirdLjj has joined #ocaml
<bruce_r> You shouldn't have to know all the flags to start
<bruce_r> I am myself just starting with oasis, and I was able to set it up fairly quickly for my little project
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
qln` has joined #ocaml
pyon has quit [Quit: fix config]
pyon has joined #ocaml
qln` has quit [Ping timeout: 260 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
Nahra has quit [Read error: Connection reset by peer]
Nahra has joined #ocaml
lwj has joined #ocaml
nicholasf has quit [Ping timeout: 252 seconds]
<lwj> Hi all, I used corebuild to generate a myproc.native file, its size is 9.4M, I just copy it from _build to another dir, and tried to run it in that dir, but there's an error: "myproc.native: cannot execute binary file"
nicholasf has joined #ocaml
<lwj> Sorry to bother you, I used `sh myproc.native`, there's an error. but I used `./myproc.native`, and it's fine now:)
lwj has quit [Quit: Page closed]
qln` has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
qln` has quit [Ping timeout: 276 seconds]
M-jimt has quit [Remote host closed the connection]
Kakadu2[m] has quit [Remote host closed the connection]
M-Illandan has quit [Remote host closed the connection]
M-martinklepsch has quit [Remote host closed the connection]
barkmadley[m] has quit [Read error: Connection reset by peer]
Bluddy[m] has quit [Remote host closed the connection]
M-pesterhazy has quit [Remote host closed the connection]
srenatus[m] has quit [Remote host closed the connection]
regnat[m] has quit [Remote host closed the connection]
M-ErkkiSeppl has quit [Read error: Connection reset by peer]
ygrek_ has joined #ocaml
jaredly has joined #ocaml
MercurialAlchemi has joined #ocaml
nicholasf has joined #ocaml
Kakadu2[m] has joined #ocaml
qln` has joined #ocaml
qln` has quit [Ping timeout: 265 seconds]
sdothum has quit [Remote host closed the connection]
kv has quit [Ping timeout: 260 seconds]
nicholasf has quit [Ping timeout: 252 seconds]
nicholasf has joined #ocaml
boadie has joined #ocaml
nicholas_ has joined #ocaml
xvw_ has joined #ocaml
boadie has quit []
nicholasf has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
ggole has joined #ocaml
regnat[m] has joined #ocaml
M-martinklepsch has joined #ocaml
M-jimt has joined #ocaml
Bluddy[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
barkmadley[m] has joined #ocaml
M-pesterhazy has joined #ocaml
srenatus[m] has joined #ocaml
M-Illandan has joined #ocaml
qln` has joined #ocaml
qln` has quit [Ping timeout: 265 seconds]
xvw__ has joined #ocaml
xvw_ has quit [Ping timeout: 276 seconds]
xvw__ is now known as xvw_
tane has joined #ocaml
jaredly has quit [Ping timeout: 264 seconds]
bruce_r has quit [Ping timeout: 260 seconds]
Algebr` has joined #ocaml
Simn has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
bruce_r has joined #ocaml
qln` has joined #ocaml
qln` has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
nicholas_ has quit [Read error: Connection reset by peer]
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 276 seconds]
ggole__ has joined #ocaml
ggole__ has quit [Client Quit]
ggole_ has quit [Ping timeout: 276 seconds]
xvw_ has quit [Quit: xvw_]
toolslive has quit [Remote host closed the connection]
qln` has joined #ocaml
qln` has quit [Ping timeout: 265 seconds]
Algebr` has quit [Ping timeout: 264 seconds]
test1234 has joined #ocaml
test1234 has quit [Remote host closed the connection]
edwin has joined #ocaml
test5678 has joined #ocaml
test1234 has joined #ocaml
test1234 has quit [Remote host closed the connection]
test5678 has quit [Client Quit]
test5678 has joined #ocaml
test1234 has joined #ocaml
test1234 has quit [Remote host closed the connection]
test5678 has quit [Client Quit]
kv has joined #ocaml
Algebr` has joined #ocaml
xvw_ has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
johnelse has joined #ocaml
bruce_r has quit [Ping timeout: 260 seconds]
<xvw_> Hi
Submarine has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
ygrek_ has quit [Ping timeout: 260 seconds]
qln` has joined #ocaml
TheLemonMan has joined #ocaml
qln` has quit [Ping timeout: 265 seconds]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
zpe has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
nicholasf has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
jwatzman|work has joined #ocaml
zpe has joined #ocaml
nicholas_ has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
qln` has joined #ocaml
zpe_ has quit [Ping timeout: 276 seconds]
nicholas_ has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 276 seconds]
zpe has joined #ocaml
nicholasf has joined #ocaml
Mercuria1Alchemi has joined #ocaml
<ia0> is it possible to define a local exception?
<ia0> something like `let exception E of a in` which doesn't work
<ia0> I guess I should use a local module maybe
tane has quit [Quit: Leaving]
Distortion has joined #ocaml
michbad has joined #ocaml
<flux> yes. actually there's a suggestion to allow local exceptions, but that issue hasn't been resolved yet.
<flux> (yes = yes, use a local module)
ggole has joined #ocaml
Anarchos has joined #ocaml
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
nicholasf has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
brab has quit [Ping timeout: 240 seconds]
dakk has quit [Ping timeout: 252 seconds]
brab has joined #ocaml
<ia0> thank
nicholas_ has joined #ocaml
nicholasf has quit [Ping timeout: 240 seconds]
cthuluh has quit [Ping timeout: 244 seconds]
cthuluh has joined #ocaml
Submarine has joined #ocaml
silver has joined #ocaml
Algebr` has joined #ocaml
dhil has joined #ocaml
tane has joined #ocaml
sdothum has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
nicholasf has joined #ocaml
nicholas_ has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
nicholasf has quit [Ping timeout: 250 seconds]
sepp2k has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
nicholasf has joined #ocaml
al-damiri has joined #ocaml
d0nn1e has quit [Ping timeout: 264 seconds]
d0nn1e has joined #ocaml
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
two_wheels has joined #ocaml
zpe has joined #ocaml
kushal has joined #ocaml
qln` has quit [Ping timeout: 265 seconds]
nicholasf has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
kushal has quit [Quit: Leaving]
yomimono has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seangrove has joined #ocaml
two_wheels has joined #ocaml
yomimono has quit [Ping timeout: 252 seconds]
yomimono has joined #ocaml
mg- has joined #ocaml
<mg-> Hey peeps. Trying to get my feet wet with ocaml, and been reading Real World OCaml (that uses core heavily). I'm working on an IRC client for fun, and I'd like to support TLS. What is the simplest way to support TLS with Core.Async?
agarwal1975 has joined #ocaml
qln` has joined #ocaml
<Algebr`> interesting, hopefully someone that knows core better can answer. The tls package says that it comes with an Lwt front end
FreeBirdLjj has joined #ocaml
<Algebr`> which if you're doing any open source OCaml ever again, you'll see that Lwt is basically used by the majority of open source Ocaml
<mg-> I saw the lwt part, haven't looked at what is is really yet. How does it relate to async?
<flux> my _guess_ is it's be easy to convert to Async
<mg-> Or is perhaps Async not the normal way to roll tcp clients in the ocaml world?
<flux> it really does seem like an omission if there really is no tls library for Async..
<mg-> flux: I might have just failed in looking, but haven't found anything yet
<Algebr`> lwt is an alternative to async
<Algebr`> these are the two de facto concurrency libraries.
<mg-> I guess this is what I find most difficult about ocaml, lack of examples! All searches inevitably leads back to the same book I've read already :p
<mg-> Algebr`: I see, thanks
<Algebr`> mg-: 1) have you checked ocaml.org 2) There are blog posts floating about, I have many posts/examples at hyegar.com/archive
<companion_cube> mg-: there is an irc-client lib for OCaml
<companion_cube> right now the TLS support is in a PR, feel free to comment/contribute/review!
<Algebr`> 3) Others have blog posts as well, try googling
<mg-> companion_cube: thanks, I'll have a look.
<flux> https://github.com/solvuu/future seems to be still maintained :)
<flux> even if its builds are failing :)
<companion_cube> (also, the irc library is parametrized by a IO monad)
<Drup> flux: I wouldn't advise that for a beginner
<Algebr`> yea, abstractions over abstractions....probably mental overload
<mg-> Drup: thanks, that seems like a good starting point!
<hannes> just to be fair, there's async_ssl https://github.com/janestreet/async_ssl/
<companion_cube> mg-: btw, it's https://github.com/johnelse/ocaml-irc-client if you don't want to parse IRC again
<Drup> hannes: right, I was surprised that it was not something obvious like that
<flux> I was googling for ocaml async tls.. stupid google ;).
<hannes> and isn't there a core of the IRC protocol which should be completely independent of IO? (wishful thinking of mine to get purely functional protocol implementations)
<companion_cube> it's parametrized by a monad
<companion_cube> which is simpler to write, imho
<companion_cube> (albeit a bit less clean)
<hannes> I disapprove of that.
<Drup> flux: why are you googling for opam packages ? :O
<companion_cube> also, it's annoying to handle "ping" messages explicitely
<flux> drup, well opam search didn't find any better results
<Algebr`> "... parser IRC again"
<Algebr`> Speaking of which....where is our IRC bot?
<hannes> should be handle : state -> input -> state * output option
<flux> also its search is completely useless for >1 keyword :(
<Algebr`> !learning
<companion_cube> Algebr`: the chan owners don't like bots much, I think
<Algebr`> derp
<flux> who wants to search for this OR that, instead of this AND that?-o
<companion_cube> hannes: please contribute :p
<flux> opam search tls async -> returns all async stuff
<hannes> companion_cube: sure, ones I'm done with my other projects
<hannes> s/ones/once/
<Drup> Algebr: what would you want a chat bot to do, specifically ?
<flux> xavierbot was nice.
<Algebr`> Drup: default messages about what async is, async vs lwt
<Algebr`> learning materials
<Algebr`> !monad
<Algebr`> stuff that comes up every day
<Algebr`> !multi-core
<mg-> hannes: uh, how did I miss that. Thanks!
<Drup> Algebr: if you/someone is going to write that content, it should be in ocaml.org, and then it's barelly longer to write "ocaml.org/monad"
<Drup> I agree it would be nice to have, but I doubt having it in an IRC bot is a good solution
<flux> it's not the same as it brings the topic up and lets others easily to discuss the subject having the same information
<flux> and it seems to me it has been used to good effect in some language-related channels
<flux> also one-line blurp requires the factoid to have the very essence of the topic compressed into small space ;-)
<Algebr`> this is the only chan I come to that doesn't have a channel wide bot
<Algebr`> for whatever that's worth
<Algebr`> Drup: I prefer to not be tied down to the site itself, its nice to have your own site.
thizanne has joined #ocaml
seangrov` has joined #ocaml
seangrove has quit [Read error: Connection reset by peer]
<Drup> flux: I'm not really convinced, but okay
<Algebr`> What if we just tried it for a week? :)
<Algebr`> Also gives someone a nice fun starter project
kushal has joined #ocaml
<Drup> it seems like it would end up like awesome-ocaml. A mine of information that is not on the main repository of information (ocaml.org) and that you only discover if someone tell you
<flux> the database itself could be pushed periodically as markup to some github README.md ;-)
<flux> (or why not ocaml.org)
<Drup> (I would prefer an improved xavierbot :p)
dakk has joined #ocaml
<flux> you could implement it in xavierbot. Factoids.lookup("monad");; ;-)
<flux> (oops, too much c++)
<Drup> As far as fun starter project, I would really like a bot that monitor activities of this channel and push the statistic onlines
<Algebr`> !starter-project-ideas
thizanne has quit [Ping timeout: 240 seconds]
thizanne has joined #ocaml
<flux> ;)
<companion_cube> I have a factoid bot in OCaml somewhere (used on another chan)
<companion_cube> it's full of random plugins, but the core is based on a simple DB of factoids
shinnya has joined #ocaml
<Algebr`> can we test it here for a week, see if its useful ?
cube_bot has joined #ocaml
<companion_cube> !async_ssl = https://github.com/janestreet/async_ssl
<cube_bot> Bien reçu
<companion_cube> oops
<companion_cube> right, it's in french
<Algebr`> maybe post in French and English
<companion_cube> nah, I should translate the messages
<companion_cube> and strip it down of the various features specific to the other channel
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<companion_cube> let me clean it up a bit
silver_ has joined #ocaml
cube_bot has quit [Remote host closed the connection]
cube_bot has joined #ocaml
<companion_cube> !async_ssl
<companion_cube> ok, let's give it a try for a while; it doesn't talk if not invited so it should not flood
silver has quit [Ping timeout: 258 seconds]
unbalancedparen has quit [Quit: WeeChat 1.4]
unbalancedparen has joined #ocaml
silver_ is now known as silver
<companion_cube> Algebr`: counting on you to fill the bot ;-)
al-damiri has quit [Quit: Connection closed for inactivity]
<Algebr`> with what, factoids?
<Algebr`> sure
<Drup> Algebr: how do we add more ?
<Drup> companion_cube: *
<companion_cube> !foo = bar
<cube_bot> done.
<companion_cube> !foo
<cube_bot> bar
<companion_cube> !foo += hello
<cube_bot> done.
<companion_cube> (then it becomes random among possible choices)
<Algebr`> oh my god its already here
<Algebr`> I was thinking, hmm, what a curious concidence, a user came in with a name of cube_bot just as we were talking about a bot...
<Algebr`> !multicore
<Algebr`> does `-=` delete stuff?
seangrov` has quit [Remote host closed the connection]
<companion_cube> nah :/
Simn has quit [Quit: Leaving]
<companion_cube> (it could be done though)
<companion_cube> it's really a hack right now, I'll make a proper project out of it on github if it's accepted by the chan
<companion_cube> !help
<cube_bot> companion_cube: help tell
<companion_cube> there is just one other fearure left: send messages to people absent, delivered next time they speak
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
<Algebr`> hmm, will need a way to edit, since some topics will need several iterations to get a good description down, community effort, so on and so forth
<companion_cube> you can just `!foo = ` to remove
<companion_cube> !foo=
<cube_bot> done.
<companion_cube> !foo
<companion_cube> but it's for sets of multiple answers that things are a bit trickier
<companion_cube> it can be done though ^^
tizoc has quit [Client Quit]
<companion_cube> also, most factoids will be single entry anyway, just set them again
tizoc has joined #ocaml
thizanne has quit [Ping timeout: 276 seconds]
thizanne has joined #ocaml
<cube_bot> OK.
<Drup> tada; I have done my job, your turn x)
<Algebr`> ya!
tizoc has quit [Client Quit]
tizoc has joined #ocaml
tizoc has quit [Client Quit]
tizoc has joined #ocaml
tizoc has quit [Client Quit]
tizoc has joined #ocaml
<companion_cube> !tell companion_cube hello
<cube_bot> OK.
<cube_bot> companion_cube: (from companion_cube): hello
<companion_cube> heh
tizoc has quit [Client Quit]
<Algebr`> looking for this awesome reddit post that was quite comprehensive for multicore
tizoc has joined #ocaml
<Algebr`> yea, that massive one
<cube_bot> done.
<companion_cube> ✔
tizoc has quit [Client Quit]
tizoc has joined #ocaml
al-damiri has joined #ocaml
<Algebr`> !async
<Algebr`> !lwt
<cube_bot> done.
<cube_bot> done.
<companion_cube> it should also work in query ;-)
<Algebr`> what do you mean
<Algebr`> !query
<def`> !lwt
<Algebr`> I always have to end up googling lwt ocaml to get that manual
<companion_cube> I mean /query cube_bot
<companion_cube> then you can add factoids
rgrinberg has joined #ocaml
<cube_bot> done.
<companion_cube> !logs
<Algebr`> !lwt |> open
<Algebr`> heh
<companion_cube> tss tss
<companion_cube> it's pretty naive :p
<companion_cube> if we keep the bot, I will obviously accept PRs ;-)
antranigv is now known as MrArmenian
<Algebr`> !concurrency = There are two de facto concurrency libraries, async and lwt.
<cube_bot> OK.
<Algebr`> !repl = https://github.com/diml/utop install with opam install utop
<cube_bot> done.
<cube_bot> done.
<Algebr`> !show_all
<Algebr`> !dump
<Algebr`> !select * from tables
<Algebr`> !drop tables
<Algebr`> !haskell = exit 0
<cube_bot> OK.
<Algebr`> lol
<companion_cube> tss tss
<companion_cube> there is no listing process for now, I don't even know how it would print the set of rules (which is stored in a json file)
<Algebr`> it should have a trusted list of users, otherwise someone will come in an troll the crap out of it
<companion_cube> wait and see
pierpa has joined #ocaml
<Algebr`> hmm, just dump the json
<companion_cube> on IRC? no way :p
<Algebr`> lol
<Algebr`> oh right
<companion_cube> otoh at some point we will need a search function
<Algebr`> !ide !lwt
<companion_cube> but I'd like to wait at least a week before we start discussing new features
<Algebr`> agreed
<cube_bot> OK.
<ggole> Bot spam? In my #ocaml?
MrArmenian is now known as antranigv
<companion_cube> no spam unless someone talks to the bot
<Algebr`> ggole: give it a shot, makes it easier to tell beginners the basic and go to facts.
<Algebr`> !tutorials = http://ocaml.org/learn/tutorials/
<cube_bot> OK.
<cube_bot> OK.
<companion_cube> ah, the manual one is nice
<cube_bot> done.
<Algebr`> I always end up googling for that ocamlbuild page, a goldmine btw
<companion_cube> indeed
thizanne has quit [Ping timeout: 264 seconds]
thizanne has joined #ocaml
DmZDsfZoQv has joined #ocaml
Algebr` has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
bruce_r has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
zpe has quit [Remote host closed the connection]
Muzer has quit [Read error: Connection reset by peer]
dhil has quit [Quit: Leaving]
Heasummn has joined #ocaml
fraggle-boate has quit [Ping timeout: 240 seconds]
<Heasummn> This isn't an Ocaml specific question, but how would I represent a Symbol Table in a functional manner
jwatzman|work has quit [Quit: jwatzman|work]
<ggole> In OCaml, you would use Map
<Heasummn> I'm specifically having problems with Scoping
<Heasummn> I'm unsure how to maintain the current scope, as well as search through the scope from bottom up
<Heasummn> I was thinking a Stack would work
<zozozo> Heasummn: since maps are persistent, it is easy to use them to represent the current scope
<Heasummn> Can I get an example?
<zozozo> of maps in general ? or maps to maintain a list of bindings for the current scope ?
<Heasummn> the latter. I've messed with Maps before.
<Heasummn> I have yet to find a small compiler written in OCaml that I can look at. Most of them are way too big
elfring has joined #ocaml
<elfring> Can you recommend any call-graph generators for OCaml software?
<zozozo> hmm.. I have an example in one of my project, but it might be a bit complex
copy` has joined #ocaml
Muzer has joined #ocaml
<def`> small compilers : http://andrej.com/plzoo/
<ggole> Heasummn: that's pretty tiny and uses Map for type checking (and for runtime environments, disgustingly)
<Heasummn> zozozo, Can I see it anyway
<def`> (env is maintained as associative list, not a map, but you get the design for very simple PL stuff)
<zozozo> Heasummn: sure, let me put it online somewhere
<Heasummn> I'm still unsure how to define Scoping. Would it be a List of Maps?
<zozozo> Heasummn: http://paste.isomorphis.me/Rne&ln
tane has quit [Quit: Leaving]
<Heasummn> Maps are immutable unlike Hashtbl's right?
<zozozo> Heasummn: you use the map as argument to the function doing the typechecking, and then you do recursive call with the correct arguments
<zozozo> Heasummn: right
<Heasummn> alright
<Heasummn> I've been doing it rather incorrectly trying to maintain a global Map
<zozozo> in the example I gave above, I actually use both a global hashtbl and a local map for scoping though, :p
<rgrinberg> companion_cube: looks like this oasis thing is breaking other people as well: https://github.com/ocaml/opam-repository/pull/7281
<rgrinberg> Out of curiousity (and off topic), how's your patchset for oasis coming along?
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube> a big chunk of it is integrated (or even everything, I'm not sure?)
<companion_cube> the parser is not mine though
<rgrinberg> companion_cube: \o/ is camlp4 finally not a dependency?
<companion_cube> yes!
<companion_cube> unrelated, but I feel like I'm going to suffer a lot to compile sth on windows :s
<companion_cube> (and apparently cygwin binaries shoudl only be distributed if GPL??)
<rgrinberg> isn't cygwin finally dead on windows? I thought people use this msys suite now.
<Heasummn> msys and cygwin are different things
<companion_cube> I don't know much about msys
<companion_cube> is it as complete as cygwin (in particular in emulating unix)?
<Heasummn> It doesn't emulate unix, it's pretty much just a package manager
<Heasummn> Cygwin gives you linux headers so you can compile unix programs
<Heasummn> Msys is a collection of those, with a nice shell interface
<rgrinberg> not at all. but you shouldn't need all that stuff just to compile things
kv has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 244 seconds]
<Heasummn> Can I concat maps?
<Heasummn> I shouldn't need to nvm
<flux> heasummn, you fold over the map you want to add into another, adding elements to the other map
<Heasummn> thank though
<zozozo> Heasummn: the 'union' function does that too
<Heasummn> where is that defined?
<companion_cube> there is Map.union indeed
<companion_cube> or Map.merge, can never remember
<zozozo> companion_cube: Map.union since 4.03
thizanne has quit [Read error: No route to host]
<zozozo> there is also Map.merge interestingly
<companion_cube> yeah, Map.merge then :p
<companion_cube> Heasummn: wrong version of the documentation of batteries
<companion_cube> gasche: another occurrence of the old doc of batteries confusing people
<Heasummn> first google result was that
<Heasummn> yeah
<cube_bot> OK.
<Heasummn> that has way more
<companion_cube> anything the stdlib has, should also be in batteries
wibblewobble has joined #ocaml
<Heasummn> thanks
<Heasummn> I have a rather hacky solution to typing right now. I'm doing what C++ does and use a global Map to store types and evaluate them at Parsing
<Heasummn> I don't like it and it makes my Parsing code a bit ugly, unfortunately, not doing so makes any Code that messes with Types really ugly
<zozozo> Heasummn: why do you not simply do parsing, then typing on the ast ?
<zozozo> parsing is usually complex enough so typing at the same time seems like asking for bugs
tane has joined #ocaml
<Heasummn> I could do that yeah. My code currently relies on the fact that Types are already parsed as a Type.t by the time the code gets to it. I could make a pass that does this
<zozozo> what I usually do is have an intermediary untyped ast between parsing and typing
ggole has quit []
<Heasummn> It's not really "typing", I just convert the strings that make up a type into a Type.t type
<Heasummn> And once I get to user types, It'll probably have to handle creation of Types...
<zozozo> what kind of language are you trying to parse/type ?
<Heasummn> It's one I'm defining as I go. I'm learning a lot about Language Design and why to never use C++ as an example of good language in terms of design
<Heasummn> It's probably not the best idea to do this whilst also using the project to learn OCaml
<zozozo> nice ! so it's some kind of custom programming language ?
<Heasummn> yeah. It's called Crab.
<Heasummn> I'm also writing it in C++, but that repo is private, and still really simple
<zozozo> ah, so currently, you have a field that you update when you do the type-checking ?
<Heasummn> yeah it's a simple record field. That's not the problem though, I do that as a seperate AST pass. The problem is that when I write say "int", the Parser handles converting that from "int" to Types.TInt
<Heasummn> I'm completely rewriting the symbol table to allow for scopes and variable declarations
<zozozo> seems fun
<Heasummn> Yeah. It originally started cause there's no decent JS transpilers imo, but then I learned that OCaml has LLVM bindings, and I want to make it an actual, compilable language
ebird has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<orbitz> Is tehre a simple HTTP client/server that separates the parsing from I/O? Cohttp is quite complicated.
ygrek_ has joined #ocaml
Submarine has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
LiamGoodacre has joined #ocaml
<companion_cube> it's not that much complicated actually, if you use the instantiated functor
<orbitz> Yeah, I just don't get why I can't read bytes off something and pass them to a stat e machine. No functor at all
<companion_cube> well there is cohttp_lwt I think
<companion_cube> but yeah, you've got to find the right module
<companion_cube> there is an example in the readme
<orbitz> THat is just cohttp over lwt, I'd like the I/O and state machine decoupled.
<companion_cube> ah.
<companion_cube> but it's so much more complicated to write -_-
<orbitz> I wonder how hard it would be to implement the S module type as prue continuations.. ;)
<orbitz> I mean, it's not tha much more complciated, there are clear places where any implemtnation will have toask for more input, you just suspend execution, which is already happening, just inside an Lwt monad
<orbitz> or Async
<orbitz> companion_cube: I've made some great progress on my concurrency library btw. Really good learning experience for me. I don't expect it to ever be used in production but it's nice to understand the undrlying ideas.
<companion_cube> you mean, write the parser in the continuation monad?
<orbitz> Sure, it already is, right?
<orbitz> I assume that is why I/O is entangeld with the parsing in Cohttp
<companion_cube> well IO monads are not exactly continuation monads
<companion_cube> but you could, maybe, use a pure continuation monad to write the state machine
<companion_cube> storing the continuation in the state
<orbitz> The Cohttp documentation says that you just have to implement the S module, but looking at async and lwt, seem slike a lot of code...
Submarine has joined #ocaml
Algebr` has joined #ocaml
wibblewobble has quit [Quit: Page closed]
xvw_ has quit [Quit: xvw_]
seangrove has joined #ocaml
<Algebr`> !lwt
seangrove has quit [Ping timeout: 244 seconds]
kakadu has joined #ocaml
<Algebr`> !concurrency
<cube_bot> There are two de facto concurrency libraries, async and lwt.
<Algebr`> !ocamlbuild
<Algebr`> this is pleasing.
<flux> :-)
<flux> though technically responses should be notifys. but some irc clients behave badly in that case..
<Algebr`> what do you mean? I use erc.
<flux> I mean that the IRC RFC says bot responses should be notifys instead of privmsgs, but some irc clients show them in an annoying way
<flux> I don't know if such irc clients are still common-place
tg has quit [Excess Flood]
<Algebr`> TIL: there's an IRC RFC and it talks about bots
tg has joined #ocaml
soupault has joined #ocaml
Orion3k has quit [Quit: Leaving]
<Algebr`> so this is awesome, oasis now dropped camlp4?
<Algebr`> go syvlain!
kushal has quit [Ping timeout: 265 seconds]
<Heasummn> Is there some sort of extract_exn in the stdlib?
<Heasummn> that extracts the value out of an option, and throws an error if it is None
<mrvn> let Some x = opt in
<companion_cube> not in the stdlib, but in some complements/replacements of the stdlib
<companion_cube> Algebr`: this was a lot of work :s
<Heasummn> opt?
Ravana has joined #ocaml
<Algebr`> Heasummn: you could make such a function
<Algebr`> go companion_cube !
<Heasummn> Yeah, that's what I've done.
<Algebr`> its alittle bit of code smell, sort of, to do this. Its kinda defeating the purpose of using optionals.
<Algebr`> IMO
<Algebr`> like Java optionals or something
<Heasummn> It is a bit of a code smell
<mrvn> Heasummn: opt being your 'a option
<flux> heasummn, Batteries, Containers and Core come with such a function
<flux> the fact that it exists in those suggests that regardless of the smell it can be useful :)
rgrinberg has quit [Ping timeout: 250 seconds]
<Heasummn> it gets really ugly when a function doesn't expect an option, but it does. Or for defaults, where you can be sure it is absolutely never None, but need it for the start
tg has quit [Excess Flood]
tg has joined #ocaml
zpe has joined #ocaml
rgrinberg has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
<companion_cube> orbitz: you still there?
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Simn has quit [Read error: Connection reset by peer]
<bruce_r> Hey guys. I have a library build with oasis and installed, I modified it by adding a module to it. After running oasis setup, when I run make (re)install, it tells me that there's nothing to do for that library. I tried to distclean but it didn't change anything. I was only able to install my library by changing its name. Any idea what I did wrong?
<companion_cube> orbitz: http://paste.isomorphis.me/8oP I tried implementing non-blocking parsers using continuations (still some bugs, but looks promising)
<companion_cube> orbitz: basically, parsers are pure combinators, and then there is a state with an internal buffer and a current parser, that either returns a value or asks for refill
_andre has quit [Quit: leaving]
<ygrek_> bruce_r, make build then make reinstall
<bruce_r> I think I tried make all
<bruce_r> make build does something different?
<bruce_r> Also when I run make reinstall, I get an error saying that my package is already installed.
<bruce_r> which I know, that's why I run REinstall :)
<bruce_r> META already exists
infinity0 has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
<bruce_r> even if I run 'make uninstall', I still see my package in 'ocamlfind list'. Is that expected?
<kakadu> it is possible that while calling ./configure some paths have become hardcoded
<kakadu> hardcoded in setup.data
<kakadu> So,it can reinstall from another compiler switch or something like that
ontologiae has joined #ocaml
<bruce_r> do I have to change the version in order to reinstall it?
<bruce_r> changing the version didn't seem to fix anything
<kakadu> btw, does `make uninstall` (or something like that) work ?
<kakadu> maybe reinstall target generated by oasis is just buggy
<kakadu> make reinstall should be a synonym to make uninstall && make install
<bruce_r> That's how I was assuming it was working
<bruce_r> but look like make uninstall doesn't work
<bruce_r> I was assuming that I would remove the package from the ocamlfind list
<bruce_r> hmm OK I think there's an issue with my package, cause when I ran make uninstall it did uninstall the second library I installed, but not the first one
<bruce_r> it seems to be stuck somehow
<kakadu> You can temporarily do `ocamlfind remove packagename` and maybe it will be enough for your issue
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<bruce_r> OK I did that, and the command was successful, but I still see my package in ocamlfind list :(
<bruce_r> if I try to run the command again, it fails saying that the directory doesn' exist
<bruce_r> I think I fixed it by manually deleting the library's directory in .opam
<bruce_r> thanks for the help guys
michbad has quit [Remote host closed the connection]
nicholasf has joined #ocaml
infinity0 has joined #ocaml
LiamGoodacre has quit [Quit: Leaving]
<Heasummn> Crab now has let statements, thanks for all the help guys
kakadu has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 264 seconds]
ontologiae has quit [Read error: No route to host]
soupault has quit [Remote host closed the connection]
ontologiae has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Xizor has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
Heasummn has quit [Remote host closed the connection]
agarwal1975 has quit [Quit: agarwal1975]
nicholasf has quit [Remote host closed the connection]
Submarine has quit [Remote host closed the connection]
Xizor has quit [Read error: Connection reset by peer]
bruce_r has quit [Remote host closed the connection]
bruce_r has joined #ocaml
tane has quit [Quit: Leaving]
al-damiri has quit [Quit: Connection closed for inactivity]
silver has quit [Quit: rakede]
bruce_r has quit [Ping timeout: 250 seconds]