MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
keen___ has joined #ocaml
<meteo>
js_of_ocaml uses lwt.
<meteo>
does that mean it's possible to compose ajax requests with join and bind etc
keen__ has quit [Ping timeout: 252 seconds]
<Drup>
sure
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<meteo>
that's pretty awesome
natrium1970 has joined #ocaml
<Drup>
=)
<natrium1970>
When doing pattern matching on a record, I noticed that a pattern like { a; _ } is accepted by the compiler, but { _; b } is not. I’m curious why. http://pastebin.com/jPA2hmtx
igitoor has quit [Ping timeout: 252 seconds]
<Drup>
probably that the syntax accepts "_" only at the end
peterbb has quit [Ping timeout: 264 seconds]
igitoor has joined #ocaml
peterbb has joined #ocaml
swgillespie has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
javamonn has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 250 seconds]
<natrium1970>
Apparently so. I don’t know if that is really encoded as part of the grammar or if it’s a semantic rule that (hopefully) is documented somewhere.
javamonn has joined #ocaml
<Drup>
quite sure it's the grammar
javamonn has quit [Remote host closed the connection]
<natrium1970>
Oh, that’s covered in the “extensions” section. Some of these extensions have been around since version 3.x. Does the compiler handle them separately from the constructs in the main langauge? If not, it seems like they should be integrated into the main part.
<Drup>
they probably should, yes
<natrium1970>
Thanks again for the help.
abbe_ has joined #ocaml
flxx has joined #ocaml
myyst has joined #ocaml
lpaste has quit [Ping timeout: 250 seconds]
abbe has quit [Ping timeout: 250 seconds]
myst has quit [Ping timeout: 250 seconds]
<nicoo>
meteo: To be fair, jsoo as a whole is pretty awsome
<nicoo>
awesome*
rgrinberg has quit [Ping timeout: 244 seconds]
flx has quit [Remote host closed the connection]
AltGr has joined #ocaml
struktured has joined #ocaml
lpaste has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
rgrinberg has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
jabesed has joined #ocaml
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 272 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest63622
nojb has quit [Quit: nojb]
jabesed has quit [Quit: Konversation terminated!]
Guest63622 has quit [Ping timeout: 245 seconds]
BitPuffin has joined #ocaml
nojb has joined #ocaml
myyst is now known as myst
ygrek has joined #ocaml
BitPuffin has quit [Ping timeout: 252 seconds]
struktured has quit [Ping timeout: 245 seconds]
swgillespie has joined #ocaml
destrius has joined #ocaml
nullcat_ has joined #ocaml
kdef has quit [Quit: Leaving]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 245 seconds]
ollehar has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
tokik has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nojb has quit [Quit: nojb]
MrScout has quit [Ping timeout: 245 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
mengu has joined #ocaml
mengu has joined #ocaml
abbe_ is now known as abbe
darkf has joined #ocaml
javamonn has joined #ocaml
rgrinberg has joined #ocaml
mengu has quit [Ping timeout: 244 seconds]
gabemc has joined #ocaml
cesar_ has joined #ocaml
rgrinberg has quit [Ping timeout: 248 seconds]
cesar_ is now known as Guest46349
Guest46349 has quit [Ping timeout: 245 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
idegen has quit [Ping timeout: 256 seconds]
natrium1970 has quit [Quit: natrium1970]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
johnelse is now known as johnel_away
javamonn has quit [Remote host closed the connection]
nullcat_ has quit [Ping timeout: 245 seconds]
nullcat_ has joined #ocaml
MrScout has joined #ocaml
javamonn has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
mhi^ has quit [Ping timeout: 272 seconds]
mhi^ has joined #ocaml
javamonn has quit [Remote host closed the connection]
gabemc has quit [Ping timeout: 250 seconds]
hefner has quit [Ping timeout: 246 seconds]
hefner has joined #ocaml
philtor has joined #ocaml
moei has joined #ocaml
kushal has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest76583
mengu has quit [Ping timeout: 265 seconds]
Guest76583 has quit [Ping timeout: 245 seconds]
olibjerd has quit [Ping timeout: 272 seconds]
myyst has joined #ocaml
myst has quit [Ping timeout: 256 seconds]
<nullcat_>
rgrinberg: ?
rgrinberg has joined #ocaml
jave has quit [Ping timeout: 256 seconds]
jave has joined #ocaml
myyst is now known as myst
ygrek has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
divyanshu has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
philtor has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Ping timeout: 240 seconds]
dav has quit [Ping timeout: 240 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest82196
ygrek has joined #ocaml
rgrinberg has joined #ocaml
ontologiae has joined #ocaml
thomasga has joined #ocaml
Guest82196 has quit [Ping timeout: 245 seconds]
djellemah_ has joined #ocaml
djellemah has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 245 seconds]
Bhavya has joined #ocaml
freling has joined #ocaml
nojb has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
nojb has quit [Client Quit]
olibjerd has joined #ocaml
Haudegen has joined #ocaml
djellemah_ is now known as djellemah
cdidd has quit [Ping timeout: 272 seconds]
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
rand000 has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maufred has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 276 seconds]
ggole has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
moei has quit [Quit: Leaving...]
maufred has joined #ocaml
nojb has joined #ocaml
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
ingsoc has joined #ocaml
mengu has quit [Remote host closed the connection]
pii4 has quit [Quit: [-.-]...]
pii4 has joined #ocaml
larhat has joined #ocaml
rgrinberg has joined #ocaml
cdidd has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest86413
Guest86413 has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
divyanshu has quit [Quit: Connection closed for inactivity]
johnel_away is now known as johnelse
Simn has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
mort___ has joined #ocaml
Gama11 has joined #ocaml
larhat has quit [Read error: No route to host]
larhat has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
larhat1 has joined #ocaml
kakadu has joined #ocaml
larhat has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
Submarine has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
lordkryss has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
SHODAN has quit [Remote host closed the connection]
octachron has joined #ocaml
SHODAN has joined #ocaml
wagle has quit [Remote host closed the connection]
wagle has joined #ocaml
johnelse is now known as johnel_away
Haudegen has quit [Ping timeout: 250 seconds]
johnel_away is now known as johnelse
rand000 has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
yomimono_ has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
milosn has joined #ocaml
Anarchos has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest46529
TheLemonMan has joined #ocaml
Guest46529 has quit [Ping timeout: 245 seconds]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
s1n4 has joined #ocaml
martintrojer has quit [Ping timeout: 264 seconds]
dario_ has joined #ocaml
martintrojer has joined #ocaml
Hannibal_Smith has joined #ocaml
hefner has quit [Quit: Ex-Chat]
yomimono_ has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
nojb has quit [Quit: nojb]
Kensan has quit [Remote host closed the connection]
milosn has joined #ocaml
rgrinberg has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
rgrinberg has quit [Ping timeout: 246 seconds]
johnelse is now known as johnel_away
johnel_away is now known as johnelse
Fullma has quit [Ping timeout: 252 seconds]
s1n4 has quit [Ping timeout: 250 seconds]
_andre has joined #ocaml
olibjerd has left #ocaml [#ocaml]
seanmcl has joined #ocaml
milosn has quit [Ping timeout: 265 seconds]
yomimono_ has quit [Ping timeout: 250 seconds]
Hannibal_Smith has quit [Remote host closed the connection]
nojb has joined #ocaml
milosn has joined #ocaml
mengu has joined #ocaml
olibjerd has joined #ocaml
amatheus has joined #ocaml
govg has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest25196
Guest25196 has quit [Ping timeout: 245 seconds]
amatheus_ has joined #ocaml
amatheus_ has quit [Ping timeout: 248 seconds]
Kensan has joined #ocaml
milosn has quit [Ping timeout: 276 seconds]
AltGr has left #ocaml [#ocaml]
badkins has joined #ocaml
milosn has joined #ocaml
freling has quit [Quit: Leaving.]
yomimono_ has joined #ocaml
rgrinberg has joined #ocaml
thomasga has joined #ocaml
rgrinberg has quit [Ping timeout: 248 seconds]
BitPuffin has joined #ocaml
moei has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milosn has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
shinnya has joined #ocaml
yomimono_ has quit [Ping timeout: 246 seconds]
voglerr3 has quit [Quit: WeeChat 0.4.2]
voglerr has joined #ocaml
mengu has quit [Remote host closed the connection]
ygrek has quit [Remote host closed the connection]
mengu has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
yomimono_ has joined #ocaml
ygrek has joined #ocaml
sdothum has joined #ocaml
milosn has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
idegen has joined #ocaml
jonludlam has joined #ocaml
ygrek has quit [Remote host closed the connection]
<dsheets>
the reproduction is getting on my nerves...
<dsheets>
nojb, wow! that's uncanny. Apparently the compiler itself can achieve that state, though. Utop just makes it easier... somehow.
milosn has quit [Ping timeout: 240 seconds]
<dsheets>
it looks like there is a problem with traversing polymorphic variants through type aliases in functor parameter signatures sometimes
<Drup>
apparently, it's expecting the parameter not to be an alias
<Drup>
at least, that's how I'm understanding the base case of "best_type_path"
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 250 seconds]
<zoetus>
what do i need to add to my _tags file to get [@@deriving show] forms to work?
<Drup>
package(ppx_deriving.std)
<nojb>
how do I convince ocamlc to link in a shared library lib*.so ? I've been going at this for a couple of hours without sccess ...
<dsheets>
nojb, call it dll*.so?
<zoetus>
i've added <src/*>: package(ppx_deriving.std), but this doesn't work
<dsheets>
nojb, you can make an empty dll*.so that requires the lib*.so if you need to (or use a hard link or use a symlink etc)
<Drup>
zoetus: you didn't forgot to pass -use-ocamlfind to ocamlbuild ?
<zoetus>
no, i am doing that
<nojb>
dsheets: wait, I'm checking
<nojb>
dsheets: so I made a symlink dll*.so in the same directory as the .ml file linking to the lib*.so ... now what ? I tried -dllib -l* without success ...
<Drup>
zoetus: if using the command line (-package ppx_deriving.std) is it working ?
<zoetus>
it just seems like ppx_deriving is not being used at all
<dsheets>
nojb, -dllpath?
<Drup>
zoetus: use -classic-display to see the ocaml calls and check it
<zoetus>
hmm, that didn't seem to change the output
<zoetus>
is that a switch to ocamlbuild?
<zoetus>
the strange thing is that in the cmd line output i see -package ppx_deriving (not -package ppx_deriving.std)
<zoetus>
i don't know if that makes a difference
<Drup>
yes it does
<zoetus>
but in my _tags file i refer to it as ppx_deriving.std
<Drup>
that is weird.
milosn has joined #ocaml
mort___1 has left #ocaml [#ocaml]
agarie has joined #ocaml
axiles has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
mengu has quit [Remote host closed the connection]
<zoetus>
ah, i've fixed that issue -- a _tags file in a submodule was using just 'ppx_deriving'
<zoetus>
but still it doesn't work
<Drup>
it calls -package ppx_deriving.std correctly ? Then it works and the issue is in your code
<zoetus>
So this is a ppx_deriving error message then?:
<zoetus>
This expression should not be a function, the expected type is 'a list
<zoetus>
It certainly seems to me like vanilla ocaml's parser is choking on [@@deriving show]
<Drup>
show the code.
<Drup>
ther parser *cannot* choke on annotations, they are either interpreted or ignored
<zoetus>
type sconstraint = | OnlyOneOf of string list | AllOrNoen of string list [@@deriving show]
<reynir>
Isn't there some forum software written in OCaml?
mengu has joined #ocaml
<Drup>
zoetus: that works fine for me, and it gives a parsing error for you ?
<Drup>
reynir: pretty sure it has been written in eliom as a simple forum is trivial to write, I don't have a link
<zoetus>
yeah, it gives the error i wrote before
<Drup>
zoetus: show the whole code please
struk|work has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
milosn has quit [Ping timeout: 256 seconds]
amirmc has joined #ocaml
mort___ has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
Jefffrey has joined #ocaml
eikke has quit [Ping timeout: 255 seconds]
<Jefffrey>
Morning
<Jefffrey>
I'm having an issue. I've installed OCaml trying both with Macport and Homebrew (2 different package managers for Mac OS X) and in both cases the Graphics module didn't come preinstalled.
johnchalekson has joined #ocaml
eikke has joined #ocaml
<Jefffrey>
I've heard that it should come preinstalled but when I run `ocamlc graphics.cma program.ml` where in `program.ml` I use the `Graphics` module, then I get "Error: Unbound module Graphics".
ygrek has quit [Remote host closed the connection]
<adrien_znc>
(no guarantee that it works: expect that I made a typo at least)
<Jefffrey>
With the "s it gives me an usage error for ocamlc
<Jefffrey>
Without it gives the same exact error
govg has quit [Remote host closed the connection]
<Jefffrey>
`ocamlfind query graphics` on its own gives "~/.opam/4.02.1/lib/ocaml"
agarie has quit [Remote host closed the connection]
<adrien_znc>
"s ?
agarie has joined #ocaml
<adrien_znc>
you mean '$' (dollar sign)
<Jefffrey>
The double quotes I mean
<Jefffrey>
The usage error is because it's missing a space between -I and the rest
<Jefffrey>
Let me try with the space
<Jefffrey>
Weird
<Jefffrey>
It gives the same error but `ocamlc -g -I -c Draw.ml` is run
<adrien_znc>
sorry, been doing C and C compilers don't want a space after -I and -L :)
<adrien_znc>
can you pastebin your shell command and its output?
<Jefffrey>
`ocamlc -g -I ~/.opam/4.02.1/lib/ocaml -c Draw.ml` gives me the same error
<Jefffrey>
What output in particular^
<Jefffrey>
?
mort___1 has joined #ocaml
<adrien_znc>
nothing actually
<Jefffrey>
So all output?
<adrien_znc>
no, no
<adrien_znc>
nothing
<adrien_znc>
not needed
<adrien_znc>
I don't understand why it'd give that unbound stuff
Sorella has joined #ocaml
mort___ has quit [Ping timeout: 250 seconds]
<adrien_znc>
can you pastebin the output of the following: find ~/.opam/4.02.1/lib/ocaml -name 'graphics*'
amirmc has quit [Quit: Leaving.]
agarie has quit [Remote host closed the connection]
<Jefffrey>
adrien_znc: empty
<Jefffrey>
return code 0
<dsheets>
ocaml-nox11?
<adrien_znc>
I think ocamlfind can install graphics' META even if graphics isn't built
<adrien_znc>
would need to see opam's build log (I can't tell how: better poke Drup :) )
<Jefffrey>
`ocaml-nox11`?
<Jefffrey>
Maybe I should try with some virtual machine
<Jefffrey>
Is it easier to install ocaml on linux?
<Leonidas>
in general, yes.
<Leonidas>
on my system, it built graphics
<Leonidas>
apparently
<adrien_znc>
the main issue with mac os x is that it remains consistent with itself but doesn't care a lot about compatibility for anything non-apple
<adrien_znc>
so it's possible that graphics doesn't work on recent versions of mac os x
<adrien_znc>
I don't know if it's the case but it's possible
<Jefffrey>
yup, many bad choices have been made by apple recently
<Jefffrey>
I wouldn't be surprised
<Jefffrey>
Alright, let's see with ubuntu
Hannibal_Smith has joined #ocaml
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
amirmc has joined #ocaml
milosn has joined #ocaml
amirmc has quit [Client Quit]
axiles has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
struktured has joined #ocaml
BitPuffin has joined #ocaml
ljs has quit [Quit: Be back later ...]
olibjerd has quit [Ping timeout: 265 seconds]
ljs has joined #ocaml
kdef has joined #ocaml
octachron has quit [Quit: Leaving]
ygrek has joined #ocaml
seanmcl has quit [Ping timeout: 265 seconds]
ljs has quit [Ping timeout: 264 seconds]
seanmcl has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
jwatzman|work has joined #ocaml
zoetus has quit [Quit: Page closed]
kushal has quit [Ping timeout: 256 seconds]
amirmc has joined #ocaml
agarie has joined #ocaml
MrScout has quit [Ping timeout: 245 seconds]
Bhavya has quit [Quit: Quit the channel]
agarie has quit []
nojb has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
Simn has quit [Ping timeout: 276 seconds]
Nicola__ has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 264 seconds]
struktured has quit [Ping timeout: 264 seconds]
ljs has joined #ocaml
ollehar has quit [Quit: ollehar]
Jefffrey has quit [Quit: Leaving...]
MrScout has joined #ocaml
amirmc has quit [Quit: Leaving.]
TheLemonMan has joined #ocaml
BitPuffin has quit [Ping timeout: 276 seconds]
yomimono_ has quit [Ping timeout: 248 seconds]
ggole has quit []
<djellemah>
Hey all. I'm trying to get ocaml and friends installed on a gentoo box. Quite a story so far, I won't bore you with the details. Is there a way to tell ocamlfind about packages I've compiled myself? Currently it can't find camlp4. TIA.
dario_ has quit [Remote host closed the connection]
<Drup>
firsts steps first: are you using opam ? If no, you should and it would simplify everything :p
<djellemah>
I was trying using the system package manger, but I'll give opam a try. Thanks.
MrScout has quit [Remote host closed the connection]
octachron has joined #ocaml
<djellemah>
well, that was easy. I'm looking at a multicoloured utop console :-)
MrScout has joined #ocaml
nojb has quit [Quit: nojb]
swgillespie has joined #ocaml
zoetus has joined #ocaml
<zoetus>
so, i figured out why ppx_deriving was breaking:
MrScout has quit [Client Quit]
<zoetus>
it can't handle lists when using Core.Std
Simn has joined #ocaml
<Drup>
aaah, module shadowin u_u'
<djellemah>
So as an ocaml tryout, I'd like to read some csv and insert to a postgres db. Maybe use a queue to connect the two ends, just for fun. What packages would be helpful for that?
<Drup>
ocaml-csv, pgocaml, lwt
<Drup>
respectively
<zoetus>
is there any way around that?
<Drup>
zoetus: no
<zoetus>
ugh so they're just not compatible
<Drup>
don't open Core.Std
<djellemah>
what's the difference between pgocaml and postgresql-ocaml? (lwt vs async seem to be covered in detail ;-)
<Drup>
no lwt interface for the later
<flux>
postgresql are bindings to libpq, pgocaml is a pure ocaml implementation
<Drup>
ah yes, that too.
<flux>
pgocaml uses a cool syntax extension that provides compile-time type safety for SQL queries
<zoetus>
that won't help if types have fields with types defined in Core.Std
ingsoc has quit [Quit: Leaving.]
<zoetus>
or some third-party module you can't change?
<flux>
btw, has it been ported to the new syntax system?
MrScout has joined #ocaml
<Drup>
zoetus: it would, actually
<Drup>
flux: no, and I would rather port of variation of macaque
<Drup>
s/of/a/
<flux>
well, yes, but pgocaml has still things going for ir, for example complete support of all postgresql functionality
<zoetus>
Drup: how can i do it?
<flux>
present and future
mort___1 has quit [Ping timeout: 250 seconds]
<Drup>
as I said, just don't open the module :)
<Drup>
zoetus: "list" (among other things) is recognized by ppx_deriving and handled specially
<zoetus>
so if i have the type:
<zoetus>
type a = Foo | Bar of Core.Std.String.Map.t [@@deriving show]
<flux>
things that pgocaml doesn't have going for it: dynamic query building :)
<flux>
and queries involving arrays or lists
<Drup>
flux: macaque has that
<zoetus>
i get 'unbound value Core.Std.String.Map.pp'
martintrojer has quit [Ping timeout: 248 seconds]
<flux>
but you can still get quite a mileage out of pgocaml by just knowing how to write sql queries
<djellemah>
oh macaque looks nice. And it talks to pgocaml.
<Drup>
zoetus: just add [@printer fun fmt x -> something_that_prints] after a field to annotate it
<zoetus>
ah, okay -- makes sense. thanks much!
<flux>
is macaque able to express recursive queries, lateral joins, windowing functions? or is there an escape hatch enabling them?
martintrojer has joined #ocaml
<Drup>
the escape hatch is pgocaml
<Drup>
but yes, there are various weaknesses to macaque's model, the syntax is quirky and the documentation not fabulous, that's why I didn't said it first :p
milosn has quit [Ping timeout: 264 seconds]
milosn has joined #ocaml
<djellemah>
Well, that will keep me busy for a while in between paying work. Thanks for your help.
larhat1 has quit [Quit: Leaving.]
pyon has quit [Quit: brb]
pyon has joined #ocaml
c74d has quit [Remote host closed the connection]
amatheus has quit [Quit: Page closed]
dsheets has quit [Ping timeout: 256 seconds]
c74d has joined #ocaml
_2can has quit [Ping timeout: 255 seconds]
Submarine has joined #ocaml
_2can has joined #ocaml
mengu has joined #ocaml
zoetus has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
MrScout has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
kakadu has joined #ocaml
MrScout has joined #ocaml
govg has joined #ocaml
dubosec has joined #ocaml
<dubosec>
hey, had a quick question: I was trying to use the Char.code and Char.chr commands in utop, but it gives me the unbound value error message. What am I doing wrong? (I am using utop with OPAM install on a slackware linux system)
<Drup>
that is weird
<kakadu>
dubosec: maybe Invalid_argument?
<Drup>
dubosec: did you "open Core.Std" ?
<Drup>
(or put that in your .ocamlinit ?)
<dubosec>
I think I had modified the files so that it always opens Core.Std, but I will double check right now
fds has left #ocaml [#ocaml]
<dubosec>
alright, this is what my ocamlinit file says: #require "core.top";; #require "core.syntax";; open Core.Std
kdef has quit [Quit: Leaving]
<nicoo>
Drup: If it wasn't, it would say "unbound module", right ?
<nicoo>
Ah, no, Char is in the stdlib
<Drup>
dubosec: it overrides the Char module with core's Char module, so look there
<nicoo>
dubosec: Can you pastebin the output of #typeof "Char";; ?
MrScout has quit [Remote host closed the connection]
<nicoo>
dubosec: Core.Char has to_int and of_int functions
<dubosec>
oh, is that what i need to use instead of Char.code and Char.chr?
<nicoo>
If you want to use Core, yes
vanila has joined #ocaml
<vanila>
Now compiling OCaml. This may take a while, please bear with us...
<dubosec>
is there a way to switch between using Core and using Std?
<vanila>
it's weird how wrong this looks even though it's actually correct and "bare" is wrong
<dubosec>
that did work, thanks nicoo and everyone else!
<nicoo>
You are welcome :)
<nicoo>
dubosec: Well, just don't do "open Core.Std", and you will have the stdlib
<dubosec>
ah, okay
<dubosec>
I might have to remove it from ocamlinit and simply write it manually when I start up utop
<dubosec>
I'm following a tutorial that expects the Std library, I think
<Drup>
real world ocaml ? yes
ljs has quit [Quit: Be back later ...]
<dubosec>
actually the jason hickey document
<dubosec>
intro to objective caml, I think it's called
<octachron>
nicoo: fair enough, but it becomes cumbersome relatively fast
<vanila>
could anyone tell me how to use ocaml after I 'opam switch' ot a different version and then set the new environment variables?
javamonn has quit [Remote host closed the connection]
<nicoo>
octachron: I suspect that mixing Core and stdlib gets cumbersome anyways
javamonn has joined #ocaml
<Drup>
vanila: well, nothing specific to do
BitPuffin has joined #ocaml
<vanila>
I thought i'd use "ocaml" command line program
<vanila>
but it's giving errors on the example code, i think it's because it's the old ocaml
<octachron>
vanila: did you do eval `opam config env`?
<vanila>
ohh
<vanila>
thanks, got it working now
<Drup>
vanila: ah, so you didn't set the env var :p
johnchalekson has quit [Ping timeout: 250 seconds]
javamonn has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
javamonn has joined #ocaml
<kakadu>
So
<kakadu>
If I want to compare OCaml speed against Scala one.... should I measure it in cycles or milliseconds?
fraggle-boate__ has quit [Ping timeout: 264 seconds]
<Drup>
if you are counting in *milli*seconds, you are probably comparing apple and oranges.
mort___ has joined #ocaml
<kakadu>
okay, nanoseconds
<Drup>
worse.
<kakadu>
How would you do the measurment?
<Drup>
you need to let the JVM boot and then the JIT kick in
<cmtptr>
compare one of them in milliseconds to the other one in nanoseconds
<Drup>
and that's a lot of milliseconds :D
<kakadu>
let's say that JVM is already warmed-up
<cmtptr>
if his test is sufficiently long-running, the JVM-boot and JIT times should become negligible, right?
freling has joined #ocaml
yomimono_ has joined #ocaml
<Drup>
sure :p
<kakadu>
So
<kakadu>
What is wrong with nanoseconds?
<adrien>
0- your clock measurements aren't that precise
MrScout_ has joined #ocaml
<Drup>
kakadu: my point was more about micro benchmarks than the specific unit you are using, which doesn't matter at all
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kakadu>
What about cycles?
<CissWit>
kakadu: in most case, you should repeat the tasks enough time to be able to compare in seconds or minutes.
<adrien>
kakadu: if you have a cycle-accurate way to measures, it's fine
<adrien>
(and there are))
fraggle-boate__ has joined #ocaml
<nicoo>
kakadu: You probably don't care about cycle-level accuracy. Especially if you have other effects, such as “I left a bunch of garbage that will trigger a long GC pause”, which don't happen until after the measurment
dav has joined #ocaml
<dubosec>
just so other people know: apparently you can type "Caml.Char.chr" and "Caml.Char.code" while using Core in utop to access the Char.chr and Char.code commands
olauzon has quit [Quit: olauzon]
<Drup>
you do realize there are equivalent in core's Char module ? :p
<Drup>
(to_int/of_int)
<dubosec>
yeah; nicoo said Char.of_int and Char.to_int work, which they do
<dubosec>
I just wanted to alert people of other options, just in cae
<dubosec>
*case
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nicola__ has quit [Ping timeout: 240 seconds]
_andre has quit [Quit: leaving]
swgillespie has joined #ocaml
Hannibal_Smith has joined #ocaml
seanmcl has joined #ocaml
Simn has quit [Quit: Leaving]
javamonn has quit [Remote host closed the connection]
Gama11_ has joined #ocaml
Gama11__ has joined #ocaml
Gama11 has quit [Ping timeout: 245 seconds]
kdef has joined #ocaml
freling has quit [Quit: Leaving.]
javamonn has joined #ocaml
Gama11_ has quit [Ping timeout: 256 seconds]
Gama11__ has quit [Ping timeout: 252 seconds]
javamonn has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
gabemc has joined #ocaml
mengu has joined #ocaml
struktured has quit [Remote host closed the connection]
struktured has joined #ocaml
Submarine has quit [Quit: Leaving]
freling has joined #ocaml
ontologiae has joined #ocaml
MrScout has joined #ocaml
MrScout_ has quit [Ping timeout: 245 seconds]
wagle has quit [Remote host closed the connection]
olauzon_ has joined #ocaml
olauzon_ has quit [Client Quit]
Lasher` has quit [Read error: Connection reset by peer]
seanmcl has quit [Ping timeout: 250 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
seanmcl has joined #ocaml
freling has quit [Quit: Leaving.]
<maurer>
So, if I have an OCaml process that's serving requests, e.g. with Lwt or similar, and two requests come in, one which will take 10 hours of cpu time, and one which will take 10s
<maurer>
Is there any way for me to make it so that the 10s one only takes 20s, not 10hr10s?
<maurer>
Basically I'm trying to figure out if there's a concurrency primitive or library for ocaml that will get me fair concurrency
Lasher` has joined #ocaml
<flux>
maurer, have you looked at what Lwt_preemptive provides?
<flux>
I don't have any experience with using it (and very little with Lwt in general..)
<flux>
so I don't know if there might be some plumbing involved to make queries work in Lwt_preemptive threads..
<maurer>
flux: Do those inherit fds?
<flux>
it uses threads, so yes
<maurer>
(I'm now reading the documentation and it's not super clear on properties)
<maurer>
OK
<maurer>
I'll look at this more
pgomes has joined #ocaml
lpaste has quit [Ping timeout: 250 seconds]
<maurer>
Hrm. I can't figure out what happens if I spawn more Lwt.preemptive threads than I passed as max when I initialized it
octachron has quit [Quit: Leaving]
<maurer>
Like, one possible behavior is that it waits for computation termination before moving the stuff onto the threadpool
<maurer>
(this would not give me the fairness I'm looking for)
kakadu has quit [Remote host closed the connection]
pgomes has quit [Quit: Leaving]
javamonn has joined #ocaml
lpaste has joined #ocaml
ljs has joined #ocaml
<Drup>
aren't they options to manage the thread pool yourself ?
ljs has quit [Client Quit]
seanmcl has quit [Ping timeout: 250 seconds]
seanmcl has joined #ocaml
thomasga has quit [Quit: Leaving.]
tane has quit [Quit: Verlassend]
<ousado>
maurer: sounds like you want a process pool
<maurer>
ousado: I don't really care what the backend is, I just want the ability to say "do these two things, and share the cpu fairly"
<maurer>
(with two scalable up to an arbitrary number)
<ousado>
hm, not sure about arbitrary number here
<ousado>
you can pause execution explicitly
<ousado>
but that doesn't guarantee fairness, ofc
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
wagle has joined #ocaml
wagle has quit [Ping timeout: 264 seconds]
wagle has joined #ocaml
tristero has quit [Ping timeout: 272 seconds]
claudiuc has quit [Remote host closed the connection]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
leifw has left #ocaml [#ocaml]
javamonn has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
javamonn has joined #ocaml
seanmcl has quit [Ping timeout: 255 seconds]
tristero has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
Sorella has quit [Quit: Connection closed for inactivity]
kdef has quit [Quit: Leaving]
dhil has quit [Quit: Leaving]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
SomeDamnBody has joined #ocaml
nullcat has joined #ocaml
nullcat has quit [Remote host closed the connection]
claudiuc has joined #ocaml
javamonn has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ollehar1 has quit [Read error: Connection reset by peer]