shp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | nohttp://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
hongboz has joined #ocaml
jamii has quit [Ping timeout: 265 seconds]
gusta959 has joined #ocaml
gusta959 has quit [Excess Flood]
gustav__ has quit [Ping timeout: 255 seconds]
gustav__ has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
lolcathost is now known as DijkstraGroupie
DijkstraGroupie has quit [Ping timeout: 260 seconds]
mye has joined #ocaml
q66 has quit [Quit: Quit]
mye has quit [Ping timeout: 255 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye_ has quit [Ping timeout: 248 seconds]
mye__ has quit [Ping timeout: 260 seconds]
lolcathost has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
lolcathost has quit [Ping timeout: 264 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
mye___ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has quit [Ping timeout: 260 seconds]
lolcathost has joined #ocaml
mye__ has quit [Ping timeout: 246 seconds]
mye_ has joined #ocaml
mye___ has quit [Ping timeout: 240 seconds]
hongboz` has joined #ocaml
mye__ has joined #ocaml
mye____ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has quit [Ping timeout: 248 seconds]
mye_ has joined #ocaml
mye__ has quit [Ping timeout: 260 seconds]
mye____ has quit [Ping timeout: 264 seconds]
mye has quit [Ping timeout: 276 seconds]
mye_ has quit [Ping timeout: 246 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
mye____ has joined #ocaml
mye has quit [Ping timeout: 246 seconds]
mye_ has quit [Ping timeout: 246 seconds]
mye_ has joined #ocaml
mye__ has quit [Ping timeout: 260 seconds]
mye____ has quit [Ping timeout: 255 seconds]
mye_ has quit [Ping timeout: 276 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
mye___ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has quit [Ping timeout: 256 seconds]
mye_ has joined #ocaml
mye__ has quit [Ping timeout: 255 seconds]
mye__ has joined #ocaml
mye___ has quit [Ping timeout: 255 seconds]
mye___ has joined #ocaml
mye has quit [Ping timeout: 276 seconds]
mye_ has quit [Ping timeout: 255 seconds]
mye__ has quit [Ping timeout: 252 seconds]
mye___ has quit [Ping timeout: 260 seconds]
mye has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
mye___ has joined #ocaml
mye has quit [Ping timeout: 252 seconds]
mye_ has quit [Ping timeout: 276 seconds]
mye has joined #ocaml
mye__ has quit [Ping timeout: 276 seconds]
mye_ has joined #ocaml
mye___ has quit [Ping timeout: 240 seconds]
mye__ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has quit [Ping timeout: 265 seconds]
mye__ has quit [Ping timeout: 240 seconds]
mye has quit [Ping timeout: 260 seconds]
mye has joined #ocaml
mye__ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye__ has quit [Ping timeout: 255 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye_ has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye__ has joined #ocaml
Yoric has joined #ocaml
mye has quit [Ping timeout: 255 seconds]
mye has joined #ocaml
mye_ has quit [Ping timeout: 240 seconds]
mye_ has joined #ocaml
mye__ has quit [Ping timeout: 248 seconds]
mye has quit [Ping timeout: 276 seconds]
mye_ has quit [Ping timeout: 248 seconds]
mye has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
iratsu has quit [Read error: Connection reset by peer]
thelema has quit [Ping timeout: 255 seconds]
iratsu has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
mattrepl has joined #ocaml
mattrepl has quit [Client Quit]
mye_ has joined #ocaml
mye has quit [Ping timeout: 248 seconds]
mye_ is now known as mye
hongboz has quit [Ping timeout: 246 seconds]
myx has quit [Ping timeout: 240 seconds]
tac has joined #ocaml
thelema has joined #ocaml
PM has quit [Ping timeout: 246 seconds]
thelema has quit [Ping timeout: 260 seconds]
mgodshall has quit [Quit: Leaving]
ulfdoz has joined #ocaml
pippijn_ has joined #ocaml
pippijn_ has quit [Changing host]
pippijn_ has joined #ocaml
jave_ has joined #ocaml
pippijn has quit [*.net *.split]
gnuvince_ has quit [*.net *.split]
jbrown has quit [*.net *.split]
Submarine has quit [*.net *.split]
dsheets has quit [*.net *.split]
jave has quit [*.net *.split]
dsheets has joined #ocaml
Submarine has joined #ocaml
gnuvince_ has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
pippijn_ is now known as pippijn
jbrown has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
thelema has joined #ocaml
pkrnj has joined #ocaml
weie has joined #ocaml
jbrown has quit [Ping timeout: 248 seconds]
wks has quit [Quit: Konversation terminated!]
thelema has quit [Remote host closed the connection]
jbrown has joined #ocaml
thelema has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ttamttam has joined #ocaml
thelema has quit [Write error: Broken pipe]
thelema has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
lolcathost has joined #ocaml
thelema has quit [Ping timeout: 255 seconds]
pkrnj has quit [Ping timeout: 265 seconds]
thelema has joined #ocaml
thelema has quit [Ping timeout: 255 seconds]
gour has joined #ocaml
ygrek has joined #ocaml
weie has quit [Quit: Leaving...]
hongboz` has quit [Read error: Operation timed out]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
PM has joined #ocaml
djcoin has joined #ocaml
osa1 has joined #ocaml
chambart has joined #ocaml
mika1 has joined #ocaml
AltGr has joined #ocaml
cago has joined #ocaml
weie has joined #ocaml
thelema has joined #ocaml
thomasga has joined #ocaml
thelema has quit [Read error: No route to host]
thelema has joined #ocaml
ggherdov has joined #ocaml
Submarine has quit [Remote host closed the connection]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
thelema has quit [Ping timeout: 252 seconds]
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
thelema has joined #ocaml
thelema has quit [Ping timeout: 246 seconds]
mye has quit [Ping timeout: 240 seconds]
jbrown has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
jbrown has joined #ocaml
ocp has joined #ocaml
<osa1> why are data constructors not functions ?
<osa1> thanks
cdidd has joined #ocaml
<osa1> so actually there's no reason for them to not be functions. it's bad because it would be great to have functions as data constructors like in haskell. I find them so useful.
RagingDave has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
_andre has joined #ocaml
rgf has joined #ocaml
rgf has quit [Client Quit]
<osa1> can anyone explain me why this code is not valid: http://hpaste.org/80450 ?
<Enjolras> because h is unbound when you use it
<Qrntz> osa1, because OCaml compiles function in the sequence it encounters them, it is not a lazy language
<Enjolras> You need to use "and" instead of let to define mutually recursive functions
<Qrntz> in that example, you'll have to define h first, then g, then f
<Qrntz> or that
weie has quit [Quit: Leaving...]
<Qrntz> well, not instead of «let», but in conjunction with «let rec»
<Enjolras> ok that's not really mutually recursive, but still
mika1 has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 246 seconds]
chambart has quit [Ping timeout: 246 seconds]
<pango> I suppose it's also surprizing if you think of module signature as "declarations" as you would have in C; It's not that way, the module signature just puts extra restrictions on what's visible from the module to the external world, but has no impact on the way the module itself is compiled
weie has joined #ocaml
Cyanure has joined #ocaml
mika1 has joined #ocaml
Enjolras has quit [Quit: reboot]
RagingDave has quit [Quit: Ex-Chat]
myx has joined #ocaml
jbrown has quit [Ping timeout: 255 seconds]
asmanur has joined #ocaml
Enjolras has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
asmanur_ has quit [Ping timeout: 276 seconds]
jbrown has joined #ocaml
<osa1> why am I getting a syntax error in this code: let add = (::);; ?
<jbrown> I think :: is somehow special syntax, and not actually an operator
* jbrown read that somewhere.
<flux> :: is maybe better thought as a constructor in this context.
<osa1> Instruction to OCaml book (Jason Hickey, 2008) has that code
<jbrown> oops.
<flux> sadly it's incorrect :)
<flux> is it really code?
<osa1> page 150
<benmachine> you can't partially apply constructors?
<flux> well, it's really code, and yes, it's incorrect.
<flux> benmachine, correct
<flux> I guess Jason was feeling a bit lazy and too self-confident when writing that without testing ;-)
<flux> I think it might actually work in caml-light, not sure though
<flux> (I've never written a line of caml-light)
<benmachine> flux: huh, weird. are there standard-library functions that are essentially just "constructors you can partially apply"?
* benmachine # let some x = Some x in List.map some [1;2];;
<flux> benmachine, I can't think of any
<osa1> do we have an evaluator bot in the channel ?
<flux> no. we used to have xavierbot around, though.. not sure whre it's gone
mcclurmc has joined #ocaml
ggherdov has quit [Changing host]
ggherdov has joined #ocaml
ggherdov has quit [Changing host]
ggherdov has joined #ocaml
philed has quit [Read error: Operation timed out]
ontologiae has joined #ocaml
ftrvxmtrx has joined #ocaml
chambart has joined #ocaml
q66 has joined #ocaml
RagingDave has joined #ocaml
<fasta> Erlang has the nice property that you can replace features while it runs. Is there some way to fake that with OCaml for internet services?
<adrien_oww> Dynlink?
<fasta> adrien_oww: isn't that for bytecode only?
<thizanne> fasta: erlang is also bytecode only :}
Makedonia has joined #ocaml
Makedonia has left #ocaml []
<fasta> Does the interface actually expose any byte code assumptions?
<fasta> I don't think it does, which is good.
weie has quit [Quit: Leaving...]
dwmw2_gone is now known as dwmw2
<adrien_oww> fasta: there's support for native code too (natdynlink)
<adrien_oww> it will make the same checks as regular compilation: all the MD5s of the module interfaces must match
leoncamel has joined #ocaml
cago has quit [Quit: Page closed]
ImAlsoGreg has quit [Ping timeout: 260 seconds]
metasyntax has joined #ocaml
thelema has joined #ocaml
thelema has quit [Ping timeout: 240 seconds]
thelema has joined #ocaml
mye has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
hongboz has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
Cyanure has quit [Remote host closed the connection]
oandrieu has joined #ocaml
ImAlsoGreg has joined #ocaml
jpdeplaix has quit [Ping timeout: 260 seconds]
jpdeplaix has joined #ocaml
ggherdov has quit [Ping timeout: 245 seconds]
tac has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
<osa1> I'm trying to understand ocaml modules, is there a way to use that module: http://hpaste.org/80456 ?
<thelema> I don't see a problem with it immediately
<osa1> thelema: can you try insert 10 empty ?
<thelema> you could use it like: let x = IntSet.empty |> IntSet.insert 3 in ...
<osa1> or wait I'll paste the error
<osa1> Error: This expression has type int but an expression was expected of type
<osa1> IntSet.elem
<oandrieu> elem is abstract, you have no way to construct values of type elem
<thelema> oh yes, you probably want to expose elem
<thelema> line 2: type elem = int
<osa1> how can I do that ? actually what I was trying to do was hiding the elem and set type
<osa1> hmm
<thelema> if you hide the elem type, then how will you ever produce a value of type elem to call member or insert?
<osa1> right
<osa1> brb
<osa1> strange, so I changed line 2 to "type elem = int"
mcclurmc has joined #ocaml
<osa1> but I still have to redefine it in module definition, why is that ?
<osa1> it's already defined in interface
<thelema> module definition is independent from interface
<thelema> the module definition is first completely processed by itself, and then the resulting signature is verified against the interface.
<thelema> this is just how it works.
hongboz has quit [Ping timeout: 248 seconds]
mika1 has quit [Quit: Leaving.]
oandrieu has quit [Quit: Page closed]
ttamttam has quit [Quit: ttamttam]
wuttf has joined #ocaml
mgodshall has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
<wuttf> Can't compile Ocaml code it says can't find i686-w64-mingw32-as
<wuttf> I installed mingw
<thelema> how did you install ocaml?
<wuttf> *Win7
<wuttf> I found a link on ocaml.org
<wuttf> It was a big ass installer which took me an hour to download everything
lolcathost has joined #ocaml
<thelema> that one?
<wuttf> (Was very slow)
<wuttf> Yes, 4.00.1
<thelema> ok, how are you running compiler?
<wuttf> in command line ocamlopt "E:\Ocaml\example.ml"
<testcocoon> thelema: are you the author of http://protz.github.com/ocaml-installer/ installer?
<thelema> testcocoon: not at all.
<thelema> wuttf: did you install to a dir with spaces in it?
<testcocoon> I was just curious
<thelema> testcocoon: I know little about making windows installers
<wuttf> thelema: No, it is in C:\Ocaml
<thelema> wuttf: hmm...
<benmachine> <wuttf> It was a big ass installer which took me an hour to download everything ← this is regrettably necessary if you want to install big asses
<wuttf> I may try to reinstall, maybe avast fucked it up?
<thelema> yes, I'm guessing avast ate the gnu assembler
<wuttf> benmachine: :-D Trolol.
<testcocoon> thelema: I had some issues with ocamldebug on windows, but I guess it does not make sense to add a bug report to the installer
<benmachine> wuttf: :P
<wuttf> Avast is irritating
<thelema> testcocoon: depends on the issue; it could be the installer or just windows support for the debugger in general
<wuttf> I am so excited to learn Ocaml but this installation process kills me :D
<thelema> ocaml windows support definitely needs work.
<thelema> most ocaml users are under linux
<wuttf> *Or rather, the fact that Avast is so anti-Ocaml. It whines for all compilers generally (Go, GHC), but in the case of Ocaml, it even deletes and corrupts things
<testcocoon> thelema: I could not remember, but I will report something when I return to the development of oqamldebug on windows
<thelema> testcocoon: It's better for these issues to be reported so they can be fixed
<wuttf> "Couldn't download the ActiveTCL installer : HTTP 1.1 404 not found"
<wuttf> may that be a problem?
<thelema> wuttf: not for you
<flux> I think we can only deduce that OCaml is very popular in the malware scene..
<thelema> flux: lol
<wuttf> :DDDD
<thelema> wuttf: it's a minor issue with the installer, but everything (but TCL/TK integration) should work without it.
<wuttf> I dont intend to touch TCL (antirez said good things about it though)
<thelema> it's quite usable, but also quite old
<wuttf> Can't wait to use Ocaml. No more monad transformers.
<wuttf> I am kinda worried about the multicore support though
<wuttf> Or rather, the lack of it.
<benmachine> seems like ocaml would support monad transformers, if you were sufficiently dedicated :P
* benmachine restrains urge to jump to haskell's defence
<thelema> wuttf: worry about it later when you really need something to run on multiple CPUs simultaneously
lopexx has joined #ocaml
<wuttf> benmachine: Please don't hold yourself back.
<wuttf> thelema: Well, yes, later will be 1 week later when I push my first app written in OCaml into production :-)
<thelema> wuttf: production doing what?
<wuttf> Web apps
<benmachine> wuttf: well, Haskell is my favourite language, but I don't habitually use monad transformers at all
<thelema> wuttf: on windows?
<wuttf> thelema: No, Linux
<benmachine> actually, I guess that's not true, I use them sometimes
<benmachine> but usually I manage to get away with ignoring them
<thelema> wuttf: any framework plans?
<benmachine> but I guess I can do that because I spent so much time learning how they work :P
tane has joined #ocaml
<wuttf> benmachine: I am only learning functional programming for 3 weeks, and I liked Haskell, but nested monads, lifting and shit support for updating nested record fields (i know about lenses) made me cry. Also, Haskell users like to write unreadable code as I noticed. I hope OCaml will fix these issues
<wuttf> I will miss type classes though I think.
<tac> wuttf: I think monad transformers would many any programmer with a soul tear up at least a little bit
<tac> s/many/make
<benmachine> wuttf: only lamers like writing unreadable code :P
<wuttf> tac: :)
<benmachine> monad transformers are just a way to combine the functionality of two monads, what's the big deal
<wuttf> tac: Probably.
<benmachine> wuttf: lenses have had a lot of recent innovation, but yeah, record-syntax is crap
<tac> benmachine: I think the issue is once you move past one transformer, you start pushing the limits of your mental complexity limit
<tac> You start having to babysit your types
<benmachine> tac: well, but you can abstract pretty easily
<wuttf> benmachine: I dunno, I like the theory, but I hate it in practice. Maybe I could get used to it.
<wuttf> tac: +1
<wuttf> tac: Very well expressed.
<benmachine> tac: I suspect that transformers are used more than they're really needed, which might itself be a legitimate criticism
<tac> ehh, not really
<tac> benmachine: Could be
<benmachine> tac: if you're using loads of transformers then either you're overdoing it or your problem is legitimately complicated
<wuttf> I think explicitly distinguish between mutable and immutable stuff is the way to go.
<benmachine> in which case, it would be complicated without transformers, too
<wuttf> And you could argue that with monads you do exactly that but
<tac> I think best practices should be that you don't expose those kinds of transformer stacks in your public API
<tac> It's fine if your brain can handle all of that, but pity your users :)
ocp has quit [Ping timeout: 245 seconds]
<benmachine> tac: agreed, but I can't think of a library that I use that does
<benmachine> but again, that might just be I have different uses
<wuttf> I am too stupid to fight monads all the time.
<gour> my feeling is that ocaml is just more pragmatic without too much trade-off
<tac> Maybe I'm just wary because I had to use one just two days ago that had an... ErrorT (StateT Foo IO)
<tac> I couldn't figure out how to run the damn thing!
<tac> (at the very least, if you have fancy types like that, you ought to have a fancy online IDE.... something which I don't think any language outside of Microsoft have really gotten yet)
<benmachine> tac: runStateT . runErrorT, much good may it do you :P
<wuttf> There is a thing called intuition which saved my life multiple times, Now that thing told me when I first encountered nested monads: "IT IS GROSS, mothafuka"
<thelema> tac: and java (with eclipse). Ocaml is moving towards better ide, with typerex
<gour> wuttf: +1 ;)
<gour> thelema: any work done on typerex?
<tac> benmachine: I'm sure it's obvious once you have the answer in front of you. But the problem I was solving had nothing to do with transformers :)
<benmachine> wuttf: maybe the problem is that people are looking at this as "monads are super hard, nested monads must be super hard squared"
<tac> thelema: I just want to see hole-based programming for Haskell/Ocaml like we have in Agda
<benmachine> wuttf: I think monads themselves have an undeserved reputation
<benmachine> most of them are simple
<benmachine> IO is weird, Cont is super weird, but ErrorT and etc. are friendly
<benmachine> tac: I think GHC is actually developing such a thing
<gour> benmachine: it's too late now
<tac> IO is pretty intuitive as long as you just show a few examples, I feel. Trying to explain what a monad "is" is where you get into trouble.
xavierm02 has joined #ocaml
<wuttf> I think monads are kind of easy, (If I get them right). But I have an aversion toward nested things.
<tac> wuttf: you want to keep things as flat as possible, generally
<gour> that's the price of pushing purity to the extremes
<benmachine> wuttf: out of interest, could you understand the type 's -> m (Either e a, s)'?
<wuttf> But, apart from that, I bet SPJ has approx ten quadrillion times the IQ of mine so who am I to judge.
<Qrntz> a monad is a programmable semicolon
<Qrntz> (as far as I am concerned)
<benmachine> Qrntz: that's one way of looking at it
<tac> SPJ is a bright guy, but don't think you don't have a hidden genius inside of you.
<benmachine> I look at monads as "a way of composing fancy functions", cf. http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html
<wuttf> benmachine: function from s to a monad which contains a tuple, fst member is an Either e a, second is s
<wuttf> benmachine: ?
<tac> I still think of monads in terms of "I have an IO Int, but I need to 'take out the Int'.... so x <- read.... then I need to end by wrapping the result in an IO... so return (x + 1)...."
<benmachine> wuttf: right, that's ErrorT e (StateT s m) a, but unwrapped
<tac> very procedural, and type-based :)
<tac> yet somehow I manage to understand thing like parsers with the same thoughts
mcclurmc has joined #ocaml
<wuttf> benmachine: 1. I can barely understand. 2. If I would understand it easily, God save my I don't want to read type signatures like that. Maybe this will change with time.
<benmachine> wuttf: so you can think of it as "function from a state to a monad 'containing' either an error or a value, and a new state
lolcathost has quit [Ping timeout: 265 seconds]
<benmachine> "
<tac> gotta run chaps
<tac> nice chatting with you all
tac is now known as tac-lunch
<benmachine> wuttf: well, what you think of as complex or not is up to you, but I think if you take away the serious-sounding names and look at the types underneath, they tend to make sense
<wuttf> benmachine: I don't know if getting used to it with weeks/months of work worths it.
<benmachine> oh, strictly speaking I shouldn't say monad containing value
<benmachine> monads don't contain values, monads are type constructors
<benmachine> monadic values contain other values (...sort of :P)
<wuttf> They tend to make sense, but it requires my to allocate to much mental resources to the task of deciphering those signatures.
<gour> here http://pastebin.com/9wQjHyeE is nice quote from richard hipp (author of sqlite) comparing fossil with git which, in my case, very nicely fits in haskell vs ocaml
<gour> ...dsicussion here
jbrown has quit [Ping timeout: 255 seconds]
<benmachine> gour: that's a noble idea, but I think all the work Haskell makes you do is in aid of preventing you from having to do some other kind of work
<benmachine> like laziness; Haskell makes you think about space consumption and when stuff gets evaluated, and in exchange you don't have to think about how your data will be consumed while you're producing it
mcclurmc has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
<wuttf> benmachine: But its kinda swapping one problem for another then
<gour> benmachine: well, very often the real-world haskell code i saw lost much of the promised beauty in order to fight performance issues due to laziness
<benmachine> wuttf: yes, but you're always doing that
<gour> benmachine: so i'm ready to make soem trade-off and use imperative stuff when needed
<benmachine> gour: there's a lot of effort from compiler writers to make that stuff unnecessary; when you're not writing performance-critical code, it's not necessary anyway
<gour> benmachine: well, now i'm here and gave up on haskell ;)
<wuttf> Dudes, I reinstalled Ocaml but (i686-w64-mingw32-as) is still not found. Any ideas?
<thelema> wuttf: can you look for that file in your computer?
<benmachine> gour: that's up to you, I guess :)
<thelema> dir /s /b \i686-w64-mingw32-as.*
<wuttf> thelema: Of course, a minute please.
<wuttf> This gonna be slow.
lolcathost has joined #ocaml
<thelema> wuttf: I'm surprised at how slow the pretty find is compared to this dir invocation sometimes.
Yoric has joined #ocaml
gour has quit [Ping timeout: 245 seconds]
<wuttf> I am very used to interfaces/typeclasses, Does OCaml have something like that?
<thelema> wuttf: modules. real modules.
<wuttf> I searched the net day and night but I could not grok how they work and how are they different
<thelema> they're not like typeclasses, magically attaching themselves to values
<wuttf> What do you mean by "real modules" I don't even know what a module is yet. Any link?
<thelema> they're a collection of types and values (including functions)
gour has joined #ocaml
<gour> benmachine: how is ghc without SM?
<benmachine> gour: SM?
<wuttf> I think I will write a transpiler from Haskellish Ocaml to Ocaml just for fun.
<wuttf> About transpiling: would it be possible to transpile Ocaml to Haskell and piggyback the GHC runtime?
<thelema> wuttf: unlikely
<wuttf> thelema: Why?
<thelema> well, in theory it's possible, in practice... arbitrary ocaml has features that are hard to implement in ghc
<thelema> such as objects
<benmachine> you certainly won't get idiomatic Haskell out of it
<benmachine> why do you want the GHC runtime anyway?
<thelema> I imagine so that he can lose a ton of performance, but do so on multiple cores
<benmachine> there are easier ways to do that :P
<benmachine> thelema: why do you think objects would be hard?
<thelema> benmachine: the typing on ocaml's object system is complex, and not a good fit for HM-based typesystems where it's not already baked in.
<benmachine> thelema: fair enough
jbrown has joined #ocaml
<wuttf> benmachine: The aim is not to get idiomatic haskell but to use the GHC runtime which is pretty neat (lightweight threads etc)
<benmachine> wuttf: fair enough, but, well, idiomatic haskell is what GHC was trained to compile, so you may find practical results compromised if you don't produce it
<wuttf> benmachine: Indeed.
<wuttf> thelema: File can not be found btw
<thelema> did cygwin install properly from the installer?
<wuttf> I think so.
<wuttf> Never mind, I will crack it tomorrow.
<wuttf> I am fairly persistent.
dwmw2 is now known as dwmw2_gone
<thelema> I have a file c:\cygwin\bin\i686-w64-mingw32-as.exe
<wuttf> I don't :S Wtf.
<wuttf> I gtg now, thanks for the help. I will
<wuttf> look out for that file =)
<thelema> curl,make,mingw64-i686-gcc-g++,mingw64-i686-gcc-core,mingw64-i686-gcc,patch,rlwrap,libreadline6,diffutils,wget,vim
<thelema> that's the list of cygwin packages that need to be installed.
<wuttf> Thank you. Good night all.
wuttf has quit [Quit: Page closed]
thomasga has quit [Quit: Leaving.]
pkrnj has joined #ocaml
<gour> benmachine: Simon Marlow
Nahra has joined #ocaml
Nahra has quit [Changing host]
Nahra has joined #ocaml
<osa1> do we have a vim plugin for better syntax higlighting, showing types of expressions under the cursor etc. ?
<benmachine> gour: ohh. I'm not sure, I don't follow development that closely; GHC has loads of other contributors these days though
* gour decided to use Emacs & tuareg/typerex
<thelema> I use emacs too
ocp has joined #ocaml
ocp has quit [Client Quit]
<orbitz> I use EmacsOS
<osa1> where can I find a list or arithmetic functions ?
<osa1> do we have a exponention function for Int32/Int64 ?
<orbitz> osa1: Core does
<orbitz> and Battaries
ftrvxmtrx has quit [Ping timeout: 252 seconds]
<orbitz> I don't know if Ocaml stdlib does
<osa1> hmm, I don't think I have those libs
<osa1> which one should I install ?
<orbitz> I prefer Core
<orbitz> thelema works on Batteries
<orbitz> osa1: do you use opam?
<osa1> orbitz: I use default installation
<orbitz> yes this
<orbitz> but it's terrible to install without opam
<osa1> opam looks nice, installation was easy too
ftrvxmtrx has joined #ocaml
tac-lunch is now known as tac
<orbitz> osa1: yeah, opam is great
<orbitz> you can install batteris or the Core Suite throug hit. I gnerally install core, core_extended, and async
tac has quit [Ping timeout: 245 seconds]
mye has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 252 seconds]
<osa1> I'm getting this error message from opam, any ideas? http://hpaste.org/80463
<orbitz> osa1: Hrm, looks like someone submitted a bad package, one sec
_andre has quit [Quit: leaving]
tac has joined #ocaml
mye has joined #ocaml
<orbitz> osa1: are you off master or a tag of opam?
<osa1> orbitz: no ideas. I just installed opam and then `opam install core`
<orbitz> how did you install opam?
<osa1> copied the precompiled binary
<osa1> downloaded from it's website
<orbitz> Oh, I have no experience with taht one, i use the github repo
<osa1> orbitz: it's 0.9.0-dev0
<osa1> which version is yours ?
<orbitz> Hrm I don't know, from a few months back I haven' used opam in awhile
<orbitz> osa1: i would try to pin the version of core to the previous version. i think it's 107.08.01 or 108.07.01 i think it's opam pin -kind version core 107...
<orbitz> then install again
<osa1> nice. so can you help if I compile from github repo ?
<osa1> ok let me try that
<orbitz> osa1: i'd almost post the issue to caml-list, Anil has pretty quick SLA's on there
<orbitz> i have to go make dinner, I might check in later so feel free to leave questions
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<osa1> orbitz: ok I installed an older version of it and it compiled
<osa1> now I can't open Core modules though
<osa1> so can anyone help me ? after installing Core with opam, how can I load it's modules ?
<thelema> osa1: you've run eval `opam config env`?
<osa1> thelema: yes
<osa1> I also added it to my .zshrc
<thelema> ok, how are you trying to access the core modules? toplevel? ocamlc?
<osa1> thelema: both. I'm trying "open Core;;"
<thelema> osa1: start with #use "topfind";; #require "core";;
<thelema> (in the toplevel
<osa1> thelema: "Cannot find file topfind."
<osa1> "Unknown directive `require'"
<thelema> odd; can you go bakc in your history to see if ocamlfind was installed by opam?
<thelema> I can't imagine opam skipping it
<osa1> I don't have ocamlfind installed
<osa1> should I install it ?
<osa1> hmm
<osa1> no it's alredy installed
<thelema> I don't know how core was installed without it
<osa1> Package ocamlfind is already installed (current version is 1.3.3)
<osa1> but I don't have a binary `ocamlfind`
<osa1> yeah because opam's bin is not in my PATH
<osa1> thelema: ok I added opam's bin to my path, #use "topfind" still doesn't work
<thelema> there should be a file 'topfind' in `ocamlc -where`
<osa1> thelema: no
<osa1> thelema: any ideas ?
<thelema> it seems opam doesn't install that part of findlib...
<thelema> ok, let's just try to get it working in a compiled program
<thelema> ocamlfind ocamlc -package core foo.ml -o foo
<osa1> thelema: ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
<thelema> ok, just add -thread
<osa1> ocamlfind: Package `-thread' not found
<osa1> oh wait
<thelema> ocamlfind ocamlc -thread -package core foo.ml -o foo
<osa1> I added it to last position and it worked
<osa1> your command also works
<osa1> thelema: ok, do you have any ideas for toplevel ?
<osa1> maybe we should update Core wiki, it doesn't have how to install guides etc.
<thelema> the basis for all this is getting "#use "topfind""
<thelema> which is normally part of installing findlib with ocaml (outside opam, apparently)
<osa1> ok so what is full name of that package, I have to install it by hand, right ?
<thelema> you said you had ocamlfind 1.3.3 installed, using your system package manager, no?
<thelema> can you list the files installed by that, and check for a topfind?
<osa1> thelema: no, I installed ocaml and opam by hand, not with distro's package manager
<thelema> you say that findlib is installed?
<osa1> I said I have ocamlfind installed
AltGr has quit [Quit: Konversation terminated!]
<osa1> hmm wait, I run it with "ocaml -I $OCAML_TOPLEVEL_PATH"
<thelema> hmm, it looks like opam installs a topfind script in ~/.opam/system/lib/toplevel
<osa1> and now #use "topfind";; works
<thelema> yay
<osa1> \o/
<osa1> someone should update Core wiki
<osa1> thelema: some module names are same with standard lib's, are those overriden by Core ?
<thelema> yes
<thelema> doing 'open Core.Std' will extend the stdlib modules
<thelema> (highly recommended)
<osa1> is there a way to search by signature or name in Core ? I'm looking for power functions for Int, Int32 etc.
<thelema> hmm, all that work, and I don't even see an Int64.pow
<osa1> also, Int32 is not really 32 bit
<osa1> or is it signed ?
<thelema> all ocaml ints are signed
<osa1> not good for my purposes. also they don't have power function ?
<thelema> not in Int*
<osa1> what is it's name for int ?
<thelema> ?
<osa1> name of the power function
<thelema> in batteries it's 'pow'
<thelema> I'm a batteries dev
<osa1> aww
<thelema> you can use 'opam install batteries' to install an older version of batteries, but I'd recommend downloading the 2.0 tarball and installing by hand (just make && make install)
chambart has quit [Ping timeout: 255 seconds]
Hydraze has joined #ocaml
<osa1> ok I installed batteries from git
<thelema> I recommend putting the ocamlinit file from batteries into ~/.ocamlinit
<thelema> then when you start the toplevel, batteries will automatically load
<osa1> yea I did that too
myx has quit [Ping timeout: 246 seconds]
<thelema> I guess our instructions aren't so terrible
<thelema> then you should have Int64.pow
<osa1> batteries's instructions are obviously better
<thelema> There's still lots of improvement possible. But it takes work
<osa1> ok now how can I compile with batteries enabled :-)
<thelema> same as core; -package batteries
<thelema> maybe with -linkpkg as well, because ocamlfind is dumb
<thelema> better is to use ocamlbuild.
<thelema> for multi-file projects
<osa1> hmm "ocamlbuild -use-ocamlfind foo.byte" didn't compile anything
<osa1> aha
<osa1> because I didn't tell use batteries
<osa1> I'm crying right now. after hours of work without writing a single line of code, I can finally have a good stdlib and can also compile my files
pkrnj has quit [Quit: Computer has gone to sleep.]
<osa1> also toplevel is working
<osa1> now the only problem left is, why my executable's extension is .byte ?
<thelema> yes, the OCaml ecosystem needs work on making compilation easier
<thelema> you can use .native to get a native compiled executable
<thelema> ocamlbuild puts the real executable in _build/
<thelema> you can copy it out as whatever you like; cp _build/foo.byte foo
<osa1> ocamlbuild looks seriously awesome
<osa1> does that handle my .mli files automagically ?
<thelema> of course
<osa1> great, I like magic(sometimes)
<thelema> .mli files are generally automatically handled by the compiler, without extra build tools
<osa1> ok so I can't have 32bit unsigned integers in OCaml, is that right ? I'll write a simple virtual machine which will also have a memory(2^32 words) and allocator
<thelema> integers are treated as signed by every function I can think of.
<thelema> technically it's the same function to do signed and unsigned +/-
<thelema> if you wanted to treat some ints as unsigned, you could write your own functions for them.
<thelema> oh yeah, someone already wrote these
<osa1> wtf that page looks awful
<osa1> nice, opam have that package
ygrek has quit [Quit: Leaving]
<osa1> after installing with opam, how can I use a module ?
<thelema> you just need to know the ocamlfind package name for that package
<thelema> ocamlfind list
<thelema> and then do the same as for batteries/core; -package uint or package(uint)
<thelema> -package foo gives you access to the modules in that package.
<osa1> and for the toplevel ?
<thelema> #require "foo"
<osa1> looks like uint package doesn't have any docs, is there a way to browse functions other than looking to source ?
<thelema> reading the .mli files is usually quite reasonable.
<thelema> or maybe not...
<thelema> the uint author doesn't seem to like comments
<thelema> maybe because the functions should be quite self-explanatory
<thelema> so just reaidng the .mli files
<osa1> # Uint32.of_string;;
<osa1> Error: Reference to undefined global `Uint32'
<thelema> this is after #require "uint";;?
<osa1> yes
<osa1> also, Error: The external function `uint32_of_int' is not available
gour has quit [Quit: WeeChat 0.3.8]
<thelema> eww, looks like something's not happy with uint's C stubs
<osa1> ...
<thelema> maybe you'll have to stick with using signed ints
<Qrntz> it can refuse to work in the toplevel while working in natively linked executables
<Qrntz> (ocurl is notorious for doing just that)
<osa1> http://hpaste.org/80467 and this is what I got when I try to compile
* Qrntz shrugs
<thelema> osa1: 'ocamlfind list | grep uint'
<osa1> uint (version: 1.0.2)
<osa1> uint.uint128 (version: 1.0.2)
<osa1> uint.uint32 (version: 1.0.2)
<osa1> uint.uint64 (version: 1.0.2)
<thelema> .. that's odd...
* thelema reads the meta file
<thelema> I guess you have to use uint.uint32 as the package name
<osa1> thelema: you're my hero
<osa1> but there's no way to use that package in toplevel, right ?
<thelema> yes, same way - #require "uint.uint32"
<osa1> great
<thelema> https://github.com/andrenth/ocaml-uint/issues/6 <- request that uint not be silly with ocamlfind package names
milosn_ is now known as milosn
<osa1> thanks very much
<osa1> I think I can now start working on my program
<osa1> after 3 hours of OCaml installation/setup
<osa1> ocamlbuild's manual lastly updated 5 years ago ...
mcclurmc has quit [Remote host closed the connection]
<osa1> I don't know what to think about OCaml toolchain/libs/community ..
<thelema> toolchain is stuck in the 80's
<thelema> libs are garbage, but this is always the case.
<osa1> sarcasm or for real ?
<thelema> well, some libs are garbage, some are decent
<thelema> and community hopefully isn't so bad.
<osa1> after getting help here for hours I can't say community is bad, but I mean lib/doc qualities
ontologiae has joined #ocaml
<thelema> toolchain is being worked on. opam is a recent development
<thelema> it's still pretty new
<thelema> and there's no real packaging standards. oasis has tried to achieve this, but with little uptake
lolcathost has quit [Read error: Operation timed out]
emmanuelux has joined #ocaml
mye has quit [Ping timeout: 255 seconds]
<osa1> "It is designed to integrate easily in your favorite editor" http://www.typerex.org/ my favorite editor is vim but I can't see vim files in this project, does that work with vim ?
<thelema> osa1: not yet.
<thelema> It is designed to be easy to integrate into vim, but that hasn't happenned
<osa1> hmm maybe I should give it a hand. we don't have a emacs distribution that works out of the box with typerex, right ?
<thelema> correct.
lolcathost has joined #ocaml
Nahra has quit [Quit: leaving]
RagingDave has quit [Quit: Ex-Chat]
RagingDave has joined #ocaml
dwmw2_gone is now known as dwmw2
xavierm02 has quit [Quit: Leaving]
Yoric has quit [Ping timeout: 246 seconds]
pkrnj has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
RagingDave has quit [Quit: Ex-Chat]
RagingDave has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
gnuvince_ has quit [Ping timeout: 256 seconds]
RagingDave has quit [Read error: Connection reset by peer]
RagingDave has joined #ocaml
lolcathost has joined #ocaml
dsheets has joined #ocaml
tani has joined #ocaml
gnuvince_ has joined #ocaml
tane has quit [Ping timeout: 248 seconds]
tani has quit [Quit: Verlassend]
leoncamel has quit [Ping timeout: 252 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
djcoin has quit [Quit: WeeChat 0.3.9.2]
gnuvince_ has quit [Ping timeout: 248 seconds]
ben_zen has quit [Quit: Changing out my router]
cdidd has quit [Ping timeout: 255 seconds]
RagingDave has quit [Quit: Ex-Chat]
ontologiae has joined #ocaml
cdidd has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
q66 has quit [Quit: Quit]
mcclurmc has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
lopexx has quit []
mattrepl has joined #ocaml
pkrnj has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
mcclurmc has quit [Ping timeout: 248 seconds]