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
Simn has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 240 seconds]
brunoro has joined #ocaml
smondet has quit [Ping timeout: 272 seconds]
brunoro has quit [Ping timeout: 244 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
manizzle has joined #ocaml
troydm has joined #ocaml
mfp_ has quit [Ping timeout: 240 seconds]
eh_eff_ has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
jeffmo has quit [Quit: jeffmo]
kamog has quit [Quit: Konversation terminated!]
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
tmtwd has joined #ocaml
brunoro has joined #ocaml
kv has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
manizzle has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 244 seconds]
eh_eff_ has joined #ocaml
wu_ng has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
kamog has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
kamog has quit [Quit: Konversation terminated!]
ygrek_ has quit [Ping timeout: 264 seconds]
pierpa has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
tmtwd has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
mcc has joined #ocaml
manizzle has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 272 seconds]
eh_eff_ has joined #ocaml
fluter has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
eh_eff_ has quit [Ping timeout: 264 seconds]
brunoro has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
AlexDenisov has joined #ocaml
eh_eff_ has joined #ocaml
MercurialAlchemi has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
fraggle_ has quit [Ping timeout: 272 seconds]
fraggle_ has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
kakadu_ has joined #ocaml
nicholasf has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
dlat has joined #ocaml
vapid has quit [Ping timeout: 276 seconds]
vapid has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
fluter has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
tobias232323 has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
manizzle has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
ggole has joined #ocaml
dmj` has joined #ocaml
manizzle has quit [Max SendQ exceeded]
tobias232323 has quit [Ping timeout: 244 seconds]
manizzle has joined #ocaml
manizzle has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
dmj` has quit [Ping timeout: 264 seconds]
<companion_cube> no one expects the containers inquisition!
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 272 seconds]
nicholasf has quit [Remote host closed the connection]
manizzle has joined #ocaml
alfredo has joined #ocaml
brunoro has joined #ocaml
<reynir> I should take a look at containers - before the inquisition gets to me!
orbifx-m has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
nicholasf has joined #ocaml
manizzle has quit [Ping timeout: 264 seconds]
orbifx-m2 has quit [Ping timeout: 264 seconds]
shepi has quit [Quit: Page closed]
ggole_ has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
minn has joined #ocaml
ggole has quit [Ping timeout: 272 seconds]
manizzle has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
manizzle has quit [Ping timeout: 272 seconds]
struk|desk has quit [Read error: Connection reset by peer]
struk|desk has joined #ocaml
orbifx has joined #ocaml
ggole__ has joined #ocaml
orbifx has quit [Ping timeout: 244 seconds]
ggole_ has quit [Ping timeout: 244 seconds]
<minn> Shouldn't map (f (ref 0)) [1;2;3;4] evaluate to [1;3;6;10] in OCaml (assuming applicative order)? <http://lpaste.net/233203>
orbifx-m2 has joined #ocaml
<flux> minn, the issue here is that f x::map f xs doesn't mean that f x will be evaluated first
<flux> minn, in general don't expect the evaluation order to be left-to-right when function or operator application is used
<flux> minn, btw, here's a nice thing you can do at toplevel: #trace map;; and #trace f;;
<flux> and I wouldn't recommend combining refs with maps in that way. if you want to collect a value, I think you should write a function like scanl: http://batteries.forge.ocamlcore.org/doc.preview:batteries-beta1/html/api/Enum.html
orbifx-m has quit [Ping timeout: 272 seconds]
cthuluh_ is now known as cthuluh
<minn> flux: Interesting. I thought that OCaml guaranteed applicative-order evaluation, so f x would be evaluated before map f xs.
<minn> flux: I agree that combining maps and refs in that way is a bad idea :)
<minn> flux: I didn't know about #trace. Thanks for pointing that out.
brunoro has joined #ocaml
<flux> minn, in fact the order can vary depending if you compile byte code or native code. so don't assume anything ;)
<minn> That's actually really interesting. I imagine that's caused at least one person many sleepless nights of debugging.
brunoro has quit [Ping timeout: 264 seconds]
Simn has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
nicholasf has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 244 seconds]
kakadu_ has left #ocaml [#ocaml]
minn has quit [Quit: Leaving]
ggole has joined #ocaml
orbifx-m has joined #ocaml
brunoro has joined #ocaml
zpe has joined #ocaml
orbifx-m2 has quit [Ping timeout: 264 seconds]
brunoro has quit [Ping timeout: 264 seconds]
eh_eff_ has joined #ocaml
freusque has joined #ocaml
eh_eff_ has quit [Ping timeout: 264 seconds]
eh_eff_ has joined #ocaml
AlexDenisov has joined #ocaml
zpe has quit [Remote host closed the connection]
eh_eff_ has quit [Ping timeout: 272 seconds]
trevorriles has quit [Remote host closed the connection]
trevorriles has joined #ocaml
nicholasf has joined #ocaml
llamatarianism has joined #ocaml
groovy2shoes has quit [Remote host closed the connection]
copy` has joined #ocaml
Algebr has joined #ocaml
mfp_ has joined #ocaml
zpe has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
FreeBirdLjj has joined #ocaml
brunoro has joined #ocaml
<jstolarek> So I am trying to port Links build system to oasis and have stumbled on something that - if not resolved - will be a blocker
<jstolarek> I want users to be able to conditionally enable database backends
<jstolarek> these of course have extra dependencies
kakadu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kakadu has joined #ocaml
<jstolarek> PostgreSQL requires that postgresql OCaml library is installed, MySQL backend requires mysql library and so on
<Algebr> opam depext
<jstolarek> I wanted to extend BuildDepends depending on particular files being set
<Algebr> ah
<jstolarek> but oasis does not allow that
<jstolarek> says that BuildDepends cannot be a conditional field
freusque has quit [Quit: WeeChat 1.4]
<lpaste> jstolarek pasted “No title” at http://lpaste.net/233232
FreeBirdLjj has quit [Ping timeout: 264 seconds]
brunoro has quit [Ping timeout: 264 seconds]
<jstolarek> what is more, if a particular backend is enabled its respective source module should be compiled
<jstolarek> but Executable section does not allow to list modules
freusque has joined #ocaml
<jstolarek> this can only be done in a Library section, not Executable :-/
<jstolarek> Any hints how to resolve these issues
<jstolarek> ?
<companion_cube> no, it's a problem I've had for long
<companion_cube> an issue is that the build files are generated earlier than the call to ./configure
<companion_cube> so they already kind of contain the list of modules, before you select options
<jstolarek> urgh
<flux> so the solution is that you generate multiple oasis files, multiple configures, etc ;)
<flux> you could use the C preprocessor-compatible file as a template!
jwatzman|work has joined #ocaml
<jstolarek> right
<jstolarek> and then have several different packages
<jstolarek> like:
<jstolarek> links-mysql, links-postgres, etc ?
<flux> well I was only half-serious, but if that solves the issue you are facing right now, perhaps it's the way to go
<jstolarek> could I avoid the issue by using ocamlbuild?
<jstolarek> is it more flexible here?
<companion_cube> not with _tags and .mllib
<companion_cube> you might do something based purely on myocamlbuild, I think? but you'd still have to write all the configure logic by yourself
<companion_cube> .mllib is static...
freusque has quit [Quit: WeeChat 1.4]
<companion_cube> maybe (MAYBE) solvuu can do this kind of stuff, I'm not sure
<companion_cube> (it's been released yesterday)
<Drup> jstolarek: I have an example of application that does what you want
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup> beware, it's a tad hackish (at the ocamlbuild level)
freusque has joined #ocaml
<jstolarek> Drup: sure, show it to me
zpe has quit [Ping timeout: 244 seconds]
<llamatarianism> hey everyone
<companion_cube> o/ lllllama
<llamatarianism> o/ companion_cube
* jstolarek needs to go to a meeting
<llamatarianism> oh hey, our names are the same length :)
<Drup> jstolarek: so, is it enough to just link everything together, how does the main app uses the conditional stuff ?
<llamatarianism> jstolarek: seeya
zpe_ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
<llamatarianism> blugh. can someone help me out?
<llamatarianism> I'm trying to write the bit of my parser that'll parse `f x y` into `Call (Call (f, x), y)`
<llamatarianism> but (I guess because menhir goes right-to-left) it keeps making `Call (f, Call (x, y))`
<def`_> share your mly
<llamatarianism> aight
<llamatarianism> the relevant bits are at around lines 36 and 51
<def`_> Warning: 6 states have shift/reduce conflicts.
<def`_> Warning: 41 shift/reduce conflicts were arbitrarily resolved.
<def`_> the relevant bits are here
<llamatarianism> yeah that too
<llamatarianism> honestly, no experience writing parsers. just kinda hacking my way along here :P
<llamatarianism> I know what a shift/reduce conflict *is*, but I'm not really sure how I'd go about finding what's causing it and solving it
<def`_> the problem is that your grammar is highly ambiguous
<def`_> menhir --explain will produce a conflict file showing some of the ambiguities
<llamatarianism> oh, alright
<llamatarianism> I'll try that. thanks!
<def`_> however, splitting your grammar in "expr" and "call" is not enough to help.
<def`_> written this way, the call is redundant and make it worse
<def`_> you could simply have a
<def`_> expr: | expr; expr { Call ($1, $2) }
<def`_> rule
<def`_> but what you should focus on is "which expressions are allowed in a call position"
<def`_> even if you have a single "expr" in your abstract syntax, you are allowed to have different in your concrete ones
<def`_> so split the expr in expr and simple_expr
<llamatarianism> alright
<def`_> the simple_expr is what is callable, and it shouldn't contain IF for instance
<def`_> in your current language
<def`_> f IF true THEN 5 ELSE 6
<llamatarianism> ahh I get it
<def`_> is allowed, but it would probably be better to not allow that without parentheses
<llamatarianism> thanks a lot for your help :)
<def`_> you're welcome :)
<llamatarianism> hurray!
<llamatarianism> it works! :D
<llamatarianism> and now I only have 1 shift/reduce conflict to fix
<llamatarianism> def`_: thanks :)
<def`_> good
brunoro has joined #ocaml
fluter has quit [Ping timeout: 272 seconds]
fluter has joined #ocaml
<jstolarek> Drup: the conditional modules run some code that registers them with the main app
<jstolarek> thanks for showing me your code
average has joined #ocaml
<average> in FP, what's a predicate for growing a list?
<average> fold-left shrinks it, tries to reduce it
<jstolarek> I just had discussion with other team members and we agreed that it would be OK to have optional dependencies, ie. only compile some database backend if the appropriate library is available in the system
<average> but what about the opposite?
<Drup> jstolarek: that doesn't change the problem. The difficulty is in conditional linking, not conditional compilation
<ggole> average: unfold
<jstolarek> Drup: I am still trying to wrap my head around this
<jstolarek> but I think yes, the problem is to conditionally link the extra module
<jstolarek> make just links all the object files into one executable
<average> ggole: unfold!
AlexDenisov has joined #ocaml
<vbmithr_> Hi
<ggole> average: also, see the term 'anamorphism'
<Drup> jstolarek: first step would be to isolate each part in libraries (one big lib and one for each optional part). Then we can think about the executable :p
<vbmithr_> Do anyone knows the command to install a local ocaml install as a switch?
<average> ggole: I'm actually looking for it in XQuery 3.1, but since OCaml and XQuery are both functional languages.. I know there are knowledgeable people here, so I came here
<average> I'll have a look in the W3C TRs maybe they have an unfold
ohama has quit [Ping timeout: 240 seconds]
wu_ng has quit [Ping timeout: 244 seconds]
<ggole> They may well not, OCaml doesn't have one in it's (rather small) stdlib
AlexDenisov has quit [Client Quit]
<average> unfold looks good, I think my main concern is around memory consumption
<average> what I'd like is to be able to write an iterator of sorts
ohama has joined #ocaml
<average> that starts from a point, and then like, generates the next one, but has both available, so prev and next
<average> so like
<ggole> Hmm, lists don't seem suitable for that.
<average> 0,x0 ; x0,f(x0) ; f(x0),f(f(x0)) ; ...
<average> ggole: yeah, that can be true yes
<average> ggole: this is what I'm going to be using it for
<ggole> There's a scan operation that is a bit like that, though
<average> Oh I think we have scan-left in XQuery 3.1
<ggole> scan is usually defined over lists
<ggole> You could use an iterator version.
<average> not sure if we have an iterator version in XQuery
<jstolarek> Drup: hm.... honestly speaking I am not sure how difficult that would be
AlexDenisov has joined #ocaml
<jstolarek> are you suggesting that each of these conditional modules should be pulled into its own project?
<Drup> I was talking about oasis libraries. not separated projects
<Drup> it should be easy.
<jstolarek> yes, that should be simple
<jstolarek> its just creating more sections
<Drup> yes
<jstolarek> and then I should just list those libraries as optional dependencies?
AlexDenisov has quit [Client Quit]
<Drup> yes
<jstolarek> hm... I'll try that
<jstolarek> Drup: but how do I declare optional dependncies in oasis?
brunoro has quit [Ping timeout: 244 seconds]
<jstolarek> Drup: yes, but I want my main library to conditionally depend on, say, bar_with_baz
<jstolarek> Sorry, might be confusing
<Drup> jstolarek: on thing at a time, first conditional libraries, then conditional linking
zpe_ has quit [Remote host closed the connection]
<Drup> one*
<jstolarek> during the meeting we discussed another possibility hear (I;ve been told this is how things are done in Ocaml)
<jstolarek> instead of saying which libraries to compile, we would compile them if dependencies were available
<jstolarek> so for example, by default we enable PostgreSQL backend and require postgresql library unconditionally
<jstolarek> but if user also has mysql library then we also compile mysql backend
<Drup> that doesn't change much
<jstolarek> I was told that in such a setting if user installs mysql in the future, opam will detect that Links now should be reinstalled
<jstolarek> no?
* jstolarek is going afk for some time
_andre has joined #ocaml
tmtwd has joined #ocaml
<llamatarianism> I can't figure out how to get `f x + f y` to parse as `(f x) + (f y)` without creating shift/reduce conflicts
<llamatarianism> http://pastebin.com/vwdnapNP <- this is what `menhir --explain parser.mly` produces
<llamatarianism> http://pastebin.com/ma9DxtE7 <- this is my `parser.mly` file
<llamatarianism> replacing `avg_expr` with `simple_expr` in `call` fixes it, but then I can't do `f x + f y` or `1 + 2 + 3`
freusque has quit [Ping timeout: 272 seconds]
<llamatarianism> oddly, if I just replace `avg_expr` with all possible permutations of `simple_expr` and `call`, I get **4** shift/reduce conflicts
<llamatarianism> (plus 32 arbitrarily resolved ones.)
brunoro has joined #ocaml
llamatarianism has quit [Quit: Page closed]
tmtwd has quit [Ping timeout: 272 seconds]
<Algebr> why wasn't caml_string_get32 exposed in pervasises?
AlexDenisov has joined #ocaml
smondet has joined #ocaml
zpe has joined #ocaml
kv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
llamatarianism has joined #ocaml
<llamatarianism> huzzah \o/
<llamatarianism> no shift/reduce conflicts
<llamatarianism> I just had to add `%left OPER`
fraggle-boate_ has joined #ocaml
fraggle-boate has quit [Ping timeout: 272 seconds]
<average> llamatarianism: is it easy to write a parser in OCaml?
<average> hm, maybe i should read that up somewhere
<llamatarianism> average: I wouldn't call it *easy*, but it's definitely easier than in a lot of other languages
<llamatarianism> union types (proper unions, not unsafe C ones) are super useful
<llamatarianism> and pattern matching
<Algebr> average: well a lot of the boring stuff can be auto generated for you
<llamatarianism> haskell also has that stuff, but people generally use parser combinators rather than parser generators
<llamatarianism> which are neat in some ways. like, you don't have to learn a special DSL like ocamlyacc
<llamatarianism> but you have to grok monads to even slightly understand how they work
nicholasf has joined #ocaml
<Drup> (we are lucky, ocaml has one of the best parser generator around, menhir is so good :p)
<companion_cube> sadly we are not that lucky in other areas
<llamatarianism> well, consider this:
<llamatarianism> with ocaml's great tools for lexing and parsing and stuff
<llamatarianism> you can write a language that's lucky in all areas!
<llamatarianism> and people will still use PHP instead ;^;
nicholasf has quit [Ping timeout: 272 seconds]
ee_ks has joined #ocaml
nicholasf has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
pierpa has joined #ocaml
kv has joined #ocaml
freusque has joined #ocaml
kamog has joined #ocaml
wxfdglm has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
copy` has joined #ocaml
AlexDenisov has joined #ocaml
llamatarianism has quit [Quit: Page closed]
Pepe_ is now known as pep
pep is now known as Pepe_
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
al-damiri has joined #ocaml
shinnya has joined #ocaml
sh0t has joined #ocaml
emmanueloga has quit [Ping timeout: 272 seconds]
emmanueloga has joined #ocaml
<jstolarek> can I tell Oasis to pass extra arguments to ocamlc ?
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rgrinberg> jstolarek: you can tell oasis to tell ocamlbuild to pass extra arguments to ocamlc
<jstolarek> hm... convoluted, but I'll try
<rgrinberg> jstolarek: very convulted. any argument in particular you want to pass?
jao has joined #ocaml
octachron has joined #ocaml
<jstolarek> rgrinberg: -thread
<jstolarek> ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
<jstolarek> perhaps this should be passed to ocamlfind?
<rgrinberg> just add threads to your builddepends
<jstolarek> oh, that worked :-) Thanks
dario9 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
dmj` has joined #ocaml
fre has joined #ocaml
wxfdglm has quit [Ping timeout: 244 seconds]
freusque has quit [Ping timeout: 244 seconds]
Algebr has quit [Ping timeout: 263 seconds]
<jstolarek> Drup: I have separate libraries now. These are built conditionally depending on flags
<jstolarek> Drup: I am now looking at your myocamlbuild.ml and what surprises me that your oasis section is empty
<jstolarek> whereas I have 900 lines of code in myocamlbuild.ml generated by oasis
fre has quit [Ping timeout: 272 seconds]
fre has joined #ocaml
<Drup> jstolarek: yes, that's the dynamic setup, where oasis fills the section during building. It's convenient during dev
<Drup> (you should not use it for release, though, and nowadays, I don't even use it for dev)
<jstolarek> why not use that for release?
<Drup> because it means your build needs oasis
<Drup> building released software should *never ever EVER* need oasis
<jstolarek> hm...
<Drup> oasis was designed so you don't need it to build, by generating everything before hand.
<jstolarek> ok
<jstolarek> What I am trying to figure out is how to avoid holding auto-generated content in the repo
<jstolarek> I assume dynamic will help with this?
<Drup> yes, that's the purpose of the dynamic setup
<jstolarek> so how do I make a release?
<Drup> the tarball your give your users should have the non-dynamic setup
<Drup> you can look at lwt or tyxml's release scripts
<jstolarek> yes, but is there a way of automating this with OPAM?
<jstolarek> pl
<jstolarek> ok
<flux> maybe oasis should come with release-building functionality, it's almost there isn't it?-)
<Drup> yeah
<jstolarek> btw. what are mllib and mldylib files?
<Drup> ocamlbuild stuff
<jstolarek> I noticed these got generated but they are not cleaned by oasis
<Drup> yeah, ocamlbuild needs them
<Drup> ocamlbuild's documentation explains what all those files do
Denommus has joined #ocaml
<jstolarek> ok
<jstolarek> Weird
<jstolarek> despite using dynamic I am still getting huge myocamlbuild
<jstolarek> oasis setup -setup-update dynamic
<jstolarek> is this the way I should be doing it?
<Drup> you need to do a setup-clean to remove the current existing sections
<jstolarek> I removed myocamlbuild from disk
<jstolarek> and the newly-generated one still looks the same
<Drup> "oasis setup-clean -remove" iirc
maufred has quit [Quit: leaving]
maufred has joined #ocaml
<jstolarek> ok, so I am in a state where I have no files generated by oasis
<jstolarek> this includes no Makefile, configure, META, _tags, setup.*, *.mllib, *.mldylib
nicholasf has quit [Remote host closed the connection]
<jstolarek> what should I run now?
<jstolarek> oasis setup -setup-update dynamic
<jstolarek> that's how I started to get setup.ml
<jstolarek> does setup also need an extra flag to generate smaller myocamlbuild?
rgrinberg has quit [Ping timeout: 272 seconds]
<average> "Brian Beckman" <- this name sound familiar?
<Drup> you'll always get a setup.ml, it should be smaller, though
<jstolarek> it is quite small
Sorella has quit [Quit: Connection closed for inactivity]
<jstolarek> 25 lines of comments, 15 lines of code
<jstolarek> `ocaml setup.ml -configure` generates only setup.data
<jstolarek> and now running -build generates the same big myocamlbuild.ml :-/
<Drup> it should remove the big myocamlbuild once it's done
<jstolarek> ah, you're right
<jstolarek> it removed the whole file
<jstolarek> but Makefile is not affected by -dynamic, right?
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
<Drup> that would be unfortunate, wouldn't it ?
<jstolarek> yeah, I think so
<jstolarek> ok, so if I git everything correctly I should now write my own myocamlbuild that would convince the build system to link my optional libraries if they are enabled via flags
<jstolarek> ?
<Drup> you must keep an OASIS section, so that oasis know where to put his stuff
<Drup> but yes
MercurialAlchemi has joined #ocaml
* jstolarek wonders if this is going to be as complicated as it looks
<jstolarek> is that normal that I am getting a warning that myocamlbuild has changed and that a backup is being made?
Algebr has joined #ocaml
<jstolarek> where do I find documentation for writing myocamlbuild?
libertas has joined #ocaml
<libertas> Is there an IRC channel for novice ocaml questions or can I just ask it here?
<orbifx-m> Is there a character that does that same as space, but is printable?
<orbifx-m> like one can use _ to split numbers
<orbifx-m> Using line breaks is obviously a solution, but I don't want to use lines for this
<Drup> libertas: just ask
<Drup> orbifx-m: 
<Drup> (I'm serious)
<Drup> (well, half serious, there is really a character here, and it's not a space)
<flux> orbifx-m, is there some problem you are solving by not just using space?-)
Algebr has quit [Ping timeout: 272 seconds]
<libertas> I'm trying to calculate the integer square root of a positive integer with this:
<orbifx-m> Drup: I asked for printable
Sorella has joined #ocaml
<orbifx-m> flux: I'm doing matrices with 16 parameters
<libertas> let rec isr n = let factor = n in if factor * factor <= n then factor else isr (n-1)
<libertas> the problem is that as n (as parameter) changes, factor also changes each time n is decreased
<orbifx-m> flux: I'm using extra spaces every four parameters now, but I want to using something more terse as a marker
<Drup> orbifx-m: it's printable
<Drup> (proof, I just showed it to you :D)
<libertas> is there a way to fix the initial n to a variable (factor)?
<orbifx-m> Drup: lol
tobias232323 has joined #ocaml
<flux> libertas, you probably need to have an internal function
<flux> libertas, like: let foo n = let rec loopyloop m = if m < n then loopyloop (m + 1) else () in loopyloop 0
<libertas> flux: thanks, I'll try this idea
Algebr has joined #ocaml
tane has joined #ocaml
<orbifx-m> Drup: I need a visible marker, something one can readily see
zpe has quit [Remote host closed the connection]
<orbifx-m> Maybe if there some way of passing multiple values? like (a b c d); but this is treated as 'a' being a function
<octachron> orbifx-m: for matrix, why not use lists if the type are homogeneous?
<reynir> orbifx-m: ␣
<flux> sadly ocaml doesn't support ␣
<ggole> ␣ and then use sed to change it to space? (Yuck.)
<reynir> Oh
darkf has quit [Ping timeout: 264 seconds]
<orbifx-m> octachron: if there is a functor in that library
<orbifx-m> There are row constructors
tobias232323 has quit [Ping timeout: 264 seconds]
agarwal1975 has joined #ocaml
<agarwal1975> future.0.1.0 depends on solvuu_build, so I’m not so sure deleting solvuu_build from opam is a good idea. Maybe we should just let the opam repo progress naturally and see what happens to old dead packages in some general way. What I can do is submit an update to the descr file to say “DEPRECATED” clearly.
<jstolarek> what is pdep function used in myocamlbuild?
nicholasf has joined #ocaml
<jstolarek> I can't find any documentation that would describe API available for writing myocamlbuild :-/
<octachron> orbifx-m: I am not sure what you are trying to do, but maybe grouping logically parameters together would help? 16 parameters sounds like a lot to remember.
<Drup> (also ... just look at ocamlbuild's .mli)
<jstolarek> Drup: but that doesn't document all available functions
rgrinberg has joined #ocaml
<jstolarek> for example, I am getting a warning about unused flag
<jstolarek> and it says that I can suppress this warning by calling mark_tag_used in myocamlbuild
<jstolarek> but nowhere can I find documentation of mark_tag_used that would tell me how to use it
<Drup> the .mlis document the various functions
AlexDenisov has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
sh0t has quit [Ping timeout: 272 seconds]
AlexDenisov has quit [Client Quit]
silver_ has joined #ocaml
fre has quit [Quit: WeeChat 1.4]
silver_ is now known as silver
<orbifx-m> octachron: yeah they are, I want to put markers in between. I could open and close comments I guess
<jstolarek> Drup: thanks
<jstolarek> I wonder if that documentation is available online
<jstolarek> I have found
rgrinberg has quit [Ping timeout: 272 seconds]
<jstolarek> but it does not seem to describe functions contained in the source code :-/
<Drup> yeaah, that's probably old
slash^ has joined #ocaml
fluter has quit [Ping timeout: 272 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
kv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fluter has joined #ocaml
tobias232323 has joined #ocaml
eh_eff_ has joined #ocaml
darkf has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
wxfdglm has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 264 seconds]
TheLemonMan has joined #ocaml
nicholasf has joined #ocaml
orbifx-m has joined #ocaml
nicholasf has quit [Ping timeout: 264 seconds]
orbifx-m2 has quit [Ping timeout: 272 seconds]
Algebr has quit [Ping timeout: 244 seconds]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 244 seconds]
Algebr has joined #ocaml
octachron has quit [Quit: Page closed]
<jstolarek> I think I give up
<jstolarek> I see no way of telling ocamlbuild to link into the executable something that is not a dependency
<Drup> jstolarek: push everything somewhere, I'll take a shot at it
<jstolarek> ok, give me a couple of minutes
<jstolarek> this is all in a horrible state at the moment
<Drup> (just not right now)
<jstolarek> I need to clean it up
<jstolarek> sure, no problem
<jstolarek> I will get back to it on Monday - I need a rest :-/
<Drup> yeah, just make sure the whole conditional compilation part is clean, having something that builds an executable without the conditional link, and then I'll take a shot
<jstolarek> Drup : but I think it would quite hard for you, unless you have a postgres database running ;-)
<jstolarek> otherwise you won;t be able to tell whether it works or not
<Drup> don't worry, I'll now ^^'
<Drup> know*
<jstolarek> Drup: should I include configure and setup.ml ?
<jstolarek> or can you use the generated ones?
brunoro has joined #ocaml
<Drup> I tend to, yes
eh_eff_ has quit [Ping timeout: 272 seconds]
eh_eff_ has joined #ocaml
<jstolarek> one more question
<jstolarek> oasis setup-clean -remove
<jstolarek> this also removes Makefile and configure
<jstolarek> so this is not a replacement for make clean?
<Drup> there is already a target make clean, why do you want to replace it ?
brunoro has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
orbifx has joined #ocaml
<jstolarek> sorry, got confused :-)
<jstolarek> anyway
<jstolarek> here's the current state of my work
<jstolarek> I'm very grateful for all the help
<jstolarek> and will be even more grateful if you figure out how to implement what I want :-)
ygrek_ has joined #ocaml
dario9 has quit [Quit: Konversation terminated!]
<jstolarek> I guess I should also take a look at OMake. Perhaps it will be able to do what I neeed
agarwal1975 has quit [Read error: Connection reset by peer]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
agarwal1975 has joined #ocaml
kakadu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
tobias232323 has quit [Ping timeout: 244 seconds]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
Muzer has quit [Ping timeout: 272 seconds]
orbifx-m2 has joined #ocaml
SpiceGuid has joined #ocaml
orbifx-m has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
wxfdglm has quit [Ping timeout: 272 seconds]
AlexDenisov has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 264 seconds]
_andre has quit [Quit: leaving]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
mrvn has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
brunoro has joined #ocaml
orbifx-m has joined #ocaml
sz0 has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
orbifx-m2 has quit [Ping timeout: 264 seconds]
tobias232323 has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
eh_eff_ has joined #ocaml
SpiceGuid_ has joined #ocaml
SpiceGuid has quit [Ping timeout: 264 seconds]
<average> i kindof like ocaml
SpiceGuid_ is now known as SpiceGuid
<average> but just like with haskell.. i'm not entirely sure that if i should learn it
<average> i'm banned in #haskell btw
<average> because i dared to ask people there how they make money with haskell
<average> which to me seemed like a very legitimate question
<average> apparently you get banned for that there
<average> i asked the question deliberately, especially since there's very few products written in haskell out there and there's a big hype around it, except i've never seen it used anywhere to be perfectly honest.. only talked about and only used in homeworks for universities
<average> with ocaml it's a bit different
<average> there is an anchor and a solid reason why i'm looking at it. it's FB's pfff https://github.com/facebook/pfff
<average> I consider that to be a very useful tool, and it's surprisingly fast
<Algebr> both aren't exactly widely used industry languages, but I think that OCaml has a great upward swing
<average> Algebr: what would an upward swing mean?
<Drup> surprisingly ? :)
<Algebr> gasche: also..
<Algebr> !ocamlbuild
<Algebr> !ocamlbuild_manual
<Algebr> !manual
<Algebr> hmm
smondet has quit [Ping timeout: 272 seconds]
<Algebr> average: upward swing means usage in docker, means mirage, fb. The adoption rate has a positive deriviative
<average> that's very nice
<average> about haskell, i know it's used in finance for throw-away prototypes
<average> but never tell that to people in #haskell, you'll get banned
<average> that's how they roll
<average> you either talk monoids and catamorphisms or you get banned
<Algebr> I wouldn't shortsell haskell or #haskell, focus on the positive :)
<average> true
<Drup> average: when what that ?
<average> Drup: hm?
<Drup> your discussion on #haskell
<average> Drup: uhm, i wrote above about it
<Drup> yes, when was it ?
rgrinberg has joined #ocaml
eh_eff_ has quit [Ping timeout: 264 seconds]
fbmnds has joined #ocaml
<average> Drup: idk
<average> Drup: there was a long time that I was contemplating to learn haskell
<average> Drup: I was just reading these pumped-up posts about it
<average> Drup: i'm glad i didn't learn it
tobias232323 has left #ocaml [#ocaml]
<Drup> I was just wondering what kind of discussion would lead to a ban in #haskell, those people are notoriously nice, but I can't find your discussion in the logs in the last 20 days. Anyway, it's not very important, I was just curious :)
fbmnds has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
AlexRussia_ has quit [Ping timeout: 244 seconds]
orbifx-m2 has joined #ocaml
AlexRussia_ has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
orbifx-m has quit [Ping timeout: 272 seconds]
<reynir> Drup: 2016-06-07
<average> Drup: one of them was quite aggressive even
<average> Drup: it really disturbed him that someone dare to ask more practical questions
<average> anyway, learning a new language is an investment
<average> and I want to make a good assessment, is this a good investment or not
<average> and haskell isn't, for me.
<average> it's just not, it's slow, the syntax keeps piling on tons of extensions
smondet has joined #ocaml
<average> their modules are write-only and then thrown off unmaintained on that cabal thing they got
sh0t has quit [Ping timeout: 244 seconds]
<average> nobody's really using it, just blogging 1+1 examples of it and then writing tons of pages on how awesome it was that they added one plus one
slash^ has quit [Read error: Connection reset by peer]
Algebr has joined #ocaml
<average> not long ago, one of them was absolutely sure that banning all ifs is a good thing
brunoro has joined #ocaml
<average> so he caused this complete circus of a discussion on HN
<Drup> average: While I'm not the biggest haskell fan, please avoid mindless bashing, this is not really the place. If you want to learn OCaml, there is a great MOOC currently ! ;)
<average> it wasn't even funny, it was downright stupid
eh_eff_ has joined #ocaml
orbifx-m has joined #ocaml
Algebr has quit [Ping timeout: 272 seconds]
brunoro has quit [Ping timeout: 244 seconds]
orbifx-m2 has quit [Ping timeout: 264 seconds]
orbifx-m2 has joined #ocaml
eh_eff_ has quit [Ping timeout: 272 seconds]
orbifx-m has quit [Ping timeout: 272 seconds]
average has quit [Quit: leaving]
average has joined #ocaml
brunoro has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
brunoro has quit [Ping timeout: 264 seconds]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
orbifx-m2 has joined #ocaml
<jmasseo_> i used LiquidSoap before I ever even heard of OCaml. I'm was like 'wow how did someone write an application like this in this jibber jabber'. :)
orbifx-m has quit [Ping timeout: 264 seconds]
AlexDenisov has quit [Quit: Textual IRC Client: www.textualapp.com]
eh_eff_ has joined #ocaml
<orbifx> rgrinberg: thanks for the commit
<orbifx> one question before I merge it
Muzer has joined #ocaml
<orbifx> are composition functions used there (>>=) from Lwt?
AlexDenisov has joined #ocaml
ggole has quit []
AlexDenisov has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
ggole__ has quit []
AlexDenisov has quit [Quit: Textual IRC Client: www.textualapp.com]
AlexDenisov has joined #ocaml
agarwal1975_ has joined #ocaml
agarwal1975 has quit [Ping timeout: 272 seconds]
agarwal1975_ is now known as agarwal1975
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
<rgrinberg> yup
dmj` has quit [Ping timeout: 264 seconds]
<orbifx> rgrinberg: how does Lwt get opened there?
<orbifx> because of opening opium?
<flux> open isn't transitive, so that shouldn't happen
<flux> (a module could 'include' another, but that's a more rare tool to use)
<orbifx> maybe it's redefined in opium?
<rgrinberg> orbifx: not redefined, but re-exported in Opium.Std
<rgrinberg> but actually, I wouldn't rely on it. Just open Lwt.Infix yourself
orbifx-m has joined #ocaml
nicholasf has quit [Remote host closed the connection]
orbifx-m2 has quit [Ping timeout: 264 seconds]
pierpa has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
segmond has quit [Ping timeout: 265 seconds]
tane has quit [Quit: Leaving]
<orbifx> ok ill patch that when I do other changes to introduce Lwt
<orbifx> thanks again for the push rgrinberg
<Drup> rgrinberg: that's a tad distateful :p
orbifx-m has quit [Ping timeout: 244 seconds]
richi238 is now known as richi235
orbifx has quit [Quit: WeeChat 1.5]
orbifx-m has joined #ocaml
segmond has joined #ocaml
<rgrinberg> Drup: it's actually a remnant from the move away from async. async does provide you >>= right away when you open
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
segmond has quit [Max SendQ exceeded]
segmond has joined #ocaml
segmond has quit [Max SendQ exceeded]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
sh0t has joined #ocaml
Heasummn has joined #ocaml
sh0t has quit [Remote host closed the connection]
brunoro has joined #ocaml
nicholasf has joined #ocaml
minn has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
nicholasf has quit [Ping timeout: 244 seconds]
kakadu has quit [Remote host closed the connection]
smondet has quit [Ping timeout: 272 seconds]
sillyotter has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.5]
minn has quit [Ping timeout: 244 seconds]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 272 seconds]
libertas has quit [Ping timeout: 244 seconds]
brunoro has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
brunoro has quit [Ping timeout: 244 seconds]
smondet has joined #ocaml
Heasummn has quit [Read error: Connection timed out]