ManAmongHippos has quit [Ping timeout: 245 seconds]
tac has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
cyball has quit [Ping timeout: 256 seconds]
ManAmongHippos has joined #ocaml
ftrvxmtrx has quit [Read error: Operation timed out]
justdit has joined #ocaml
cyball has joined #ocaml
sivoais has quit [Ping timeout: 252 seconds]
ftrvxmtrx has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
weie has joined #ocaml
justdit has quit [Quit: leaving]
paolooo has joined #ocaml
sivoais has joined #ocaml
cdidd has joined #ocaml
ManAmongHippos_ has joined #ocaml
paolooo has quit [Quit: Page closed]
adotbrown has quit [Ping timeout: 252 seconds]
adotbrown has joined #ocaml
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Playground has joined #ocaml
ManAmongHippos_ has quit [Quit: ManAmongHippos_]
ManAmongHippos_ has joined #ocaml
ManAmongHippos_ has quit [Client Quit]
ManAmongHippos_ has joined #ocaml
braden_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
tac is now known as tac[idle]
tac has joined #ocaml
dwmw2_SAT is now known as dwmw2_gone
Snark has joined #ocaml
Yoric has joined #ocaml
braden_ has quit [Quit: Page closed]
silkwood has joined #ocaml
silkwood has quit [Quit: Ex-Chat]
adotbrown has quit [Ping timeout: 252 seconds]
ManAmongHippos_ has quit [Quit: ManAmongHippos_]
ManAmongHippos has quit [Quit: Page closed]
ttamttam has joined #ocaml
ManAmongHippos has joined #ocaml
gour has joined #ocaml
silkwood has joined #ocaml
ManAmongHippos has quit [Read error: Connection reset by peer]
ManAmongHippos has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
Cyanure has joined #ocaml
ontologiae has joined #ocaml
AltGr has joined #ocaml
myx has joined #ocaml
Cyanure has quit [Remote host closed the connection]
djcoin has joined #ocaml
ManAmongHippos has quit [Quit: ManAmongHippos]
mika1 has joined #ocaml
cago has joined #ocaml
ftrvxmtrx has joined #ocaml
hkBst has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
Cyanure has joined #ocaml
RagingDave has joined #ocaml
myx has quit [Ping timeout: 248 seconds]
cyball has quit [Ping timeout: 248 seconds]
ontologiae has joined #ocaml
sivoais_ has joined #ocaml
chambart has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
tac[idle] has quit [Ping timeout: 245 seconds]
rwmjones has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
_andre has joined #ocaml
mcclurmc has quit [Ping timeout: 245 seconds]
djcoin has quit [Ping timeout: 260 seconds]
rwmjones has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
RagingDave has quit [Quit: Ex-Chat]
ocp has joined #ocaml
Tobu has joined #ocaml
gour has quit [Disconnected by services]
gour_ has joined #ocaml
djcoin has joined #ocaml
smango has joined #ocaml
djcoin has quit [Ping timeout: 248 seconds]
mfp has quit [Read error: Connection reset by peer]
djcoin has joined #ocaml
mfp has joined #ocaml
mcclurmc has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
leoncamel has joined #ocaml
thomasga has quit [Quit: Leaving.]
weie_ has joined #ocaml
weie has quit [Ping timeout: 248 seconds]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
Tobu has quit [Remote host closed the connection]
eikke has joined #ocaml
thomasga has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
cdidd has quit [Read error: Operation timed out]
mfp has quit [Quit: Leaving]
cyball has joined #ocaml
cdidd has joined #ocaml
Kakadu has joined #ocaml
pippijn has quit [Quit: qq]
pippijn has joined #ocaml
pippijn has quit [Changing host]
pippijn has joined #ocaml
pippijn has quit [Client Quit]
eikke has joined #ocaml
pippijn has joined #ocaml
yroeht has quit [Ping timeout: 252 seconds]
Kakadu_ has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
jamii has joined #ocaml
gour_ is now known as gour
<invariant>
Why is there code with exponential time complexity (and perhaps space) in opam?
<invariant>
Perhaps the problems which opam needs to solve are trivial and hence the bounds are never reached.
matthewt has left #ocaml []
pkrnj has joined #ocaml
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
mcsquiggedy has joined #ocaml
RagingDave has joined #ocaml
silkwood has quit [Ping timeout: 248 seconds]
ftrvxmtrx has quit [Quit: Leaving]
<orbitz>
invariant: which code are you referring to? The SATS solver?
mika1 has quit [Quit: Leaving.]
cago has left #ocaml []
hongboz has joined #ocaml
elixey has joined #ocaml
tac has joined #ocaml
ocp has quit [Quit: Leaving.]
tac has quit [Quit: Page closed]
ManAmongHippos has joined #ocaml
ftrvxmtrx has joined #ocaml
ericfr has joined #ocaml
<invariant>
orbitz, there is a conversion to dnf.
ericfr has quit [Remote host closed the connection]
sivoais has quit [Quit: leaving]
<thelema>
invariant: yes, the problems that it has to solve are generally quite simple
<invariant>
thelema, what kind of problems does it solve?
sivoais_ has quit [Quit: leaving]
<invariant>
Besides 'dependency problems' :)
sivoais has joined #ocaml
<thelema>
that's it; just resolving things like "package x depends on package y version z" and "package w depends on package x"
<thelema>
also negative constraints: "package v is incompatible with package x"
mcsquiggedy has quit [Ping timeout: 252 seconds]
thomasga has quit [Read error: No route to host]
thomasga1 has joined #ocaml
q66 has joined #ocaml
Kakadu_ has quit [Ping timeout: 255 seconds]
eikke has quit [Ping timeout: 248 seconds]
hongboz has quit [Ping timeout: 248 seconds]
Kakadu_ has joined #ocaml
Kakadu_ has quit [Client Quit]
Kakadu_ has joined #ocaml
Kakadu_ has quit [Client Quit]
tac has joined #ocaml
Kakadu_ has joined #ocaml
ttamttam has quit [Quit: ttamttam]
Cyanure has quit [Remote host closed the connection]
thomasga1 has quit [Quit: Leaving.]
hongboz has joined #ocaml
Kakadu_ has quit [Ping timeout: 246 seconds]
Kakadu_ has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
Cyanure has joined #ocaml
yroeht has joined #ocaml
ttamttam has joined #ocaml
eikke has joined #ocaml
dwmw2_gone is now known as dwmw2_SAT
djcoin has quit [Quit: WeeChat 0.3.9.2]
eikke has quit [Ping timeout: 255 seconds]
bondar has joined #ocaml
yezariaely has quit [*.net *.split]
zorun has quit [*.net *.split]
zorun has joined #ocaml
yezariaely has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
Yoric has quit [Ping timeout: 246 seconds]
ontologiae has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
hongboz has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
AltGr has quit [Quit: Konversation terminated!]
chambart has quit [Read error: Operation timed out]
<smango>
I'm trying to figure out how to install my own ocaml library "graph". I do ocamlfind install graph and then I also cp the cma/cmx/cmo/cmxa/etc files to `ocamlfind printconf stdlib`. In the toplevel "open Graph" gives no error but Graph.create;; gives "Reference to undefined global Graph." Any ideas what's wrong?
eikke has quit [Ping timeout: 248 seconds]
<adrien>
yes
<adrien>
"I also cp the cma/cmx/cmo/cmxa/etc"
<adrien>
do not do that
<adrien>
do not reinvent installation steps
<adrien>
that's the first thing wrong
<adrien>
and the second one: building by yourself unless you really need it
<adrien>
but my first point remains: do *not* cp the files
<flux>
but smango, actually don't put .cmo/.cmx-files if you use .cma/.cmxa
<flux>
smango, also I forgot to list *.cmi, which is essential
<adrien>
in install with ocamlfind, and in the toplevel use '#use "topfind";;' and then '#require "graph";;'
<adrien>
and actually you want .cmx files too, only not .cmo ;p
<adrien>
also, *.cmx *.cmxa might fail to expand if there are no .cmx or .cmxa files (for instance if the library hasn't been compiled with native code) so you need to protect against that
<smango>
hmm
sivoais has quit [Ping timeout: 252 seconds]
mfp has joined #ocaml
<invariant>
What is a cmx file again?
<smango>
after doing what flux suggested #use topfind;; #require graph;; gives seemingly successful output but it doesn't know anything about Graph
<thelema>
invariant: native compiled object file
<invariant>
thelema, isn't that extra information only?
<invariant>
thelema, that's what the manual says.
<thelema>
invariant: yes, the actual code is in .o
<thelema>
invariant: it's for cross-module inlining and linking
bondar has quit [Quit: Leaving]
pkrnj has quit [Quit: Computer has gone to sleep.]
<adrien>
smango: what do you try next?
mye has joined #ocaml
<smango>
open Graph;;
<adrien>
and it fails?
_andre has quit [Quit: leaving]
pkrnj has joined #ocaml
<smango>
yeah
<smango>
it appears in #list;; though
<adrien>
have you installed the .cmi files too?
<smango>
yes
<thelema>
smango: what files are in `ocamlfind query ocamlgraph`?
<thelema>
specifically, META and graph.*
<smango>
ah apparently the .cmi file is not there, that's odd
<thelema>
smango: I have no .cmi files in my ocamlgraph install dir
<thelema>
and it works fine for me in the toplevel
<thelema>
# #require "ocamlgraph" ;;
<thelema>
# open Graph;;
<smango>
thelema: this isn't ocamlgraph, it's a simple module I was making, though I now realize I should rename it haha
<thelema>
ah...
<smango>
but that was the problem, I've got it now, thanks :D
<thelema>
glad to help
<adrien>
thelema: don't you have the cmi file elsewhere?
fayden has quit [Quit: Bye]
fayden has joined #ocaml
xavierm02 has joined #ocaml
ManAmongHippos has quit [Ping timeout: 245 seconds]
fayden has quit [Quit: Bye]
fayden has joined #ocaml
<thelema>
adrien: in my ocamlgraph dir? yes, there is one graph.cmi file
<thelema>
and a bunch of .mli files
invariant has quit [Ping timeout: 252 seconds]
<adrien>
hmm, ok, you had said you don't have one
<thelema>
I was wrong; I didn't notice the single .cmi file among the sea of .mli files
<adrien>
:-)
ontologiae has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
Kakadu_ has quit []
Yoric has joined #ocaml
Snark has quit [Quit: Quitte]
SuperNoeMan has joined #ocaml
<SuperNoeMan>
So I've found that I can use step and next with ocamldebug to walk through a program
<SuperNoeMan>
but I am seeing the ocaml runtime I think
<SuperNoeMan>
I only want to see what I wrote execute...
<SuperNoeMan>
how do I walk through execution of only my code?
madroach has quit [Ping timeout: 248 seconds]
weie_ has quit [Read error: Connection reset by peer]
weie has joined #ocaml
gustav__ has quit [Remote host closed the connection]
madroach has joined #ocaml
ttamttam has quit [Remote host closed the connection]
<osa1>
it looks horrible to me and I wanted to know ideas of experienced OCaml programmers
<thelema>
very tight spacing...
<thelema>
lots of "let _ = " in the middle of modules...
pkrnj has quit [Ping timeout: 256 seconds]
<thelema>
least there is a main()
<osa1>
thelema: we can use ; instead of let _ = .., right ?
<adrien>
depends
<thelema>
yes, although the problem is that there's code with side effects scattered throughout the code without any obvious call to it.
<adrien>
if the expression doesn't have "unit" type, you'll get a warning
<thelema>
it'd actually be ;; in this context, but the idea is sound
<osa1>
I'm also wondering if type annotations are considered a good style of OCaml, I put lots of type annotations just to make code clearer and help myself understand it when reading later (and it really helped)
<thelema>
generally no
<thelema>
type annotations are generally not used
<adrien>
and as far as I'm concerned, first thing, I'd double the indentation and add empty lines; this is really too tight as thelema said
<thelema>
indent of 2 is normal
<thelema>
but judicious use of empty lines would help a bit
<adrien>
I'd say: feel free to use type annotations but also try to do without them
<adrien>
they're a nice thing to help when you're debugging or learning but it's also very nice to not care about them ;-)
<thelema>
true; I use them mostly for debugging
<osa1>
right. thanks.
<thelema>
and often leave them in only because it's not worth taking them out
<adrien>
oh, right, code is indented with 2 spaces; I'll blame firefox for making it harder to read
pkrnj has joined #ocaml
<osa1>
another problem, sometimes I get an error in toplevel like: "make inconsistent assumptions over interface", how can I fix that and why I'm getting this ?
mcclurmc has joined #ocaml
<osa1>
actually, I can almost never load my object files because of this error
<orbitz>
osa1: recompile
<orbitz>
I prefer to put my types at start
<thelema>
make clean
<osa1>
hmm
<orbitz>
I'd also break this file over several files
<orbitz>
line 227 - 240 should just be a match
<thelema>
orbitz: can't do partial match on tail of strings
<orbitz>
shouldn't
<orbitz>
match Filename.get_extension blah with ..
<osa1>
that worked, thanks very much
<thelema>
orbitz: oh yeah. n/m
<orbitz>
don't let the booleans blind you!
<orbitz>
osa1: Stylistically, I prefer Foo_bar to FooBar
pkrnj has quit [Client Quit]
<orbitz>
I also prefer let foo = function<newline>
<thelema>
orbitz: if it all fits on one line, I'm fine omitting the newline
weie has quit [Quit: Leaving...]
<orbitz>
yes that's fine, I shoudl have specified: I prefer that to let foo = <newline>function<newline>
<thelema>
ah, yes. function can fit on same line as let
<orbitz>
I also prefer let () = blah to let _ = blah.
<thelema>
orbitz: yes, agreed.
<orbitz>
and will do let () = ignore (...) if need be (although I generaly only have 1 of those in a module at most)
<orbitz>
I'd probably put let pp = eprint at the beginning of the module too
<osa1>
thanks all, I'm leaving to sleep
osa1 has quit [Quit: Konversation terminated!]
pkrnj has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
<orbitz>
oh is osa1 Bobzhang?
<Qrntz>
I doubt that
troydm has quit [Remote host closed the connection]
troydm has joined #ocaml
troydm has quit [Client Quit]
gour has quit [Quit: WeeChat 0.3.8]
troydm has joined #ocaml
<orbitz>
sheesh I have to come up with a consistent rule for make vs create
Yoric has quit [Ping timeout: 252 seconds]
ulfdoz has joined #ocaml
<thelema>
orbitz: no, not bobzhang, osa1 is a beginner
<orbitz>
His URL was from Fan though
<orbitz>
oh i guess he wasn't asking about his own code
<orbitz>
are you sure bobzhang isn't a beginner, based on that code? :)
<adrien>
it's the opposite :-)
<orbitz>
hehe
<thelema>
orbitz: bob is new to ocaml, but has already contributed code to the compiler (well, specifically camlp4)
emmanuelux has joined #ocaml
<orbitz>
Why can't I do type t = [> `Foo ]? I still don't quite grok polymorphic variants
<thelema>
orbitz: because there's some polymorphism that's unbound
<thelema>
i.e. your type still has a free parameter: the unspecified polymorphic variants
<thelema>
that could be values
<orbitz>
Hrm
<thelema>
for example, is `Bar a member of type t?
<orbitz>
ok
<orbitz>
but I can do this, correct: type t = [`Bar]; let a : [> t ] = ..
mye_ has joined #ocaml
<thelema>
# type 'a t = 'a constraint 'a = [>`Foo];;
<orbitz>
Which means I returna `Bar but you can match on more than `Bar and I'm ok with that?
<thelema>
# type t = [`Bar];;
<thelema>
type t = [ `Bar ]
<thelema>
# let a : [>t] = `Foo;;
<thelema>
val a : [> `Bar | `Foo ] = `Foo
ulfdoz has quit [Ping timeout: 248 seconds]
<orbitz>
ok i think this solves the problem I have
tac has left #ocaml []
mye has quit [Ping timeout: 245 seconds]
mye_ is now known as mye
<orbitz>
my mli's are getting ugly because I have a long list of polymorphic variants in the function like [> ... ] and I didn't realize I could apply that over a type to maek it easier to read
<orbitz>
otherwise each function signature is long and ugly
<thelema>
# type 'a t = 'a constraint 'a = [>`Foo];;
<thelema>
type 'a t = 'a constraint 'a = [> `Foo ]
<thelema>
# let a : 'a t = `Bar;;
<thelema>
val a : [> `Bar | `Foo ] t = `Bar
<thelema>
This is the other way to do it
<thelema>
but if you're happy with the [>t], that's fine.
<thelema>
The construct constraint ' ident = typexpr allows the specification of type parameters. Any actual type argument corresponding to the type parameter ident has to be an instance of typexpr (more precisely, ident and typexpr are unified). Type variables of typexpr can appear in the type equation and the type declaration.
jamii has quit [Ping timeout: 252 seconds]
<thelema>
you may need an explicit cast to get the return type of your functions to exactly match type t = [`Foo|`Bar]
Cyanure has quit [Remote host closed the connection]
<orbitz>
ah so constarint let's me say I have a type variable but I want to limit the types that it can be?
<thelema>
yes, although you can't limit to a list or anything like that, you can limit by forcing it to unify with another type
<orbitz>
Can I unify two polymorphic variant types? For example type a = [`A] type b = [`B] and I want to say foo is the union of those two types
<thelema>
you can definitely do type c = [ a | b ]
<orbitz>
ahh i had a syntax error in REPL, thanks
<thelema>
n/p
chambart has quit [Ping timeout: 246 seconds]
RagingDave has joined #ocaml
adotbrown has joined #ocaml
tane has quit [Quit: Verlassend]
tac has joined #ocaml
chambart has joined #ocaml
mcclurmc has quit [Ping timeout: 245 seconds]
SuperNoeMan has quit [Remote host closed the connection]
contempt has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
leoncamel has quit [Ping timeout: 256 seconds]
gnuvince has joined #ocaml
fayden has quit [Quit: Bye]
ontologiae has quit [Ping timeout: 256 seconds]
fayden has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 246 seconds]
sivoais has joined #ocaml
trac has joined #ocaml
trac is now known as tac
adrien_oww has quit [Ping timeout: 248 seconds]
thomasga has quit [Quit: Leaving.]
oriba has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
eikke has quit [Remote host closed the connection]
mye_ has joined #ocaml
silkwood has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]