flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
mfp has quit [Ping timeout: 248 seconds]
smondet has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 264 seconds]
smondet has joined #ocaml
madroach has joined #ocaml
CissWit has joined #ocaml
iZsh has quit [Quit: Coyote finally caught me]
mfp has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest82028
talzeus__ has quit [Remote host closed the connection]
Guest82028 has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
talzeus_ has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 272 seconds]
nikki93 has joined #ocaml
strobegen has joined #ocaml
boogie has joined #ocaml
ahill-89 has quit [Quit: leaving]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
nikki93 has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest55023
nikki93 has joined #ocaml
q66 has quit [Quit: Leaving]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
wolfnn has quit [Ping timeout: 248 seconds]
BitPuffin has joined #ocaml
<BitPuffin> Hello!
<BitPuffin> Is ocaml suitable for game development?
<Drup> BitPuffin: that's a very broad question
<BitPuffin> Drup: how can I narrow it down? 3D high end quality game development
<Drup> technically, you have everything you need (from a library point of view), plus the natural advantages from ocaml
<Drup> someone is doing a blog about this
<BitPuffin> Drup: the natural advantages?
<Drup> BitPuffin: are you familiar with ocaml ?
<BitPuffin> Drup: I'm just thinking performance wise.
<BitPuffin> Drup: not very
<BitPuffin> Drup: I've heard of it but I just looked at it really for the first time
<Drup> oh, performance wise, yes, it should be ok
<Drup> ocaml is quite fast
<BitPuffin> Drup: but ofc language wise too, but if you don't get the performance you need out of it there isn't any point in looking at the language in this case at least
steshaw has quit [Remote host closed the connection]
<Drup> you will have issues regarding parallelism, but 1) it may be solve in the future 2) it's not that important anyway
<BitPuffin> Drup: how is it a problem?
<BitPuffin> doesn't FP play nice with parallelism
<Drup> yes and now
<Drup> no*
<Drup> the issue with ocaml is that the gc is not concurent
steshaw has joined #ocaml
<BitPuffin> Drup: oh :/
<Drup> so there isn't a runtime lock, you can't execute multiple piece of ocaml code a the same time, at least in the same runtime
<Drup> there is*
<Drup> there are some library with a way around, by using multiple runtime
<BitPuffin> Drup: but I read that ocaml doesn't suffer from a stop the world gc like haskell
<Drup> and soon(™), we may have a way to have multiple with shared memory
<Drup> BitPuffin: that's precisely why it's not concurrent .. ocaml's gc is generational, and having one that is concurrent is very hard.
<BitPuffin> Drup: I see
<BitPuffin> yeah it took me a while to fully understand what you ment (it's a bit late)
<BitPuffin> Drup: when do you think something like that would come to ocaml?
<Drup> about the nice library to trick the runtime lock by using multiple runtime, it's already there
<BitPuffin> Drup: is it a good solution though?
<Drup> it's heavy grain parallelism by message passing. It depends heavily of what you need
<Drup> for a game, I think it's enough
<Drup> one runtime for the render, some other for the engine, you don't really need fine grain for that
<BitPuffin> Drup: well sometimes it is nice to go crazy with parallelism in the game loop where possible though
<Drup> there will be stuff to do shared memory in the not too far future, at most within a year
<BitPuffin> Drup: oh at most within a year? That's not terrible
<Drup> it will still be multiple process, but with shared memory
<Drup> so, still not fine grain
<BitPuffin> ah
<BitPuffin> I see
<BitPuffin> Drup: will there ever be a solution without multiple processes?
<Drup> without an army of engineer, no.
<Drup> ocaml community is quite small, compare to other languages :)
<Drup> and generational concurent gc is really hard
<BitPuffin> Drup: Ah
<BitPuffin> Drup: Well what about doing something with the GC like what nimrod is doing
<Drup> you will have to ask other people for a precise comparison about the gc, I'm not really an expert into this :)
<BitPuffin> Drup: Alright! Maybe someone will see our chat and step in, I'll hang around now and then :P
<Drup> BitPuffin: about game programming, you will also have to realise : you will have probably more work on libraries
<BitPuffin> Drup: I find ocaml interesting though, it's like a nice blend between imperative and functional
<Drup> it's a bit more than that :D
<BitPuffin> Drup: Well I don't use too many libs, glfw, libao, opengl, physics engine (say Newton game dynamics or ODE) and a math library is pretty much what I need
<BitPuffin> and I guess devIL or something
<BitPuffin> not all that many
<BitPuffin> should be quick to bind
<BitPuffin> Drup: what else? :P
<Drup> if you are not afraid to do the physics engine binding, that should be good
<BitPuffin> Drup: shouldn't be harder than binding in any other language right? ocaml can talk to C no?
<Drup> there is several opengl one, you have math stuff already, mostly. I don't know about libao.
<Drup> yes, you can do bindings.
<BitPuffin> Drup: libao is like 2 functions :P
<BitPuffin> no not exactly but it's very small
<Drup> :D
<Drup> about the game engine, you can look here : http://cranialburnout.blogspot.ca/
<BitPuffin> 8 functions or so?
<Drup> ahah :D
<BitPuffin> I did see a little bit of that blog earlier :P
<Drup> yes
<Drup> it's quite interesting
<BitPuffin> Drup: but you said that ocaml is much more than what I said? :P
<Drup> well, you have more safety than just "imperative with functional"
<Drup> (and you have object too)
<BitPuffin> you mean because of the GC?
<Drup> no, because of the type system
<BitPuffin> ah
<BitPuffin> is the type system more or less as strong as the one in haskell?
<Drup> there is several common stuff
<Drup> do you know haskell ?
<BitPuffin> Drup: little bit
<BitPuffin> It seems like ocaml is a little bit less uptight thought
<BitPuffin> though*
<BitPuffin> in a good way
<Drup> yes, it's a nice way to say it :D
<Drup> so you have several stuff in comon, like algebraic data type, polymorphism, all that stuff
<BitPuffin> pattern matching
<Drup> you don't have all the monadic stuff from haskell. Ocaml allows unpurity
<BitPuffin> yep :) that's what I was referring to
<BitPuffin> I think it's a bit strange to ban side effects
<Drup> you have a very powerfull module system, but you don't have type classes
<BitPuffin> or unpurity
goudale has joined #ocaml
<BitPuffin> Drup: oh no type classes?
<BitPuffin> I don't even know if that's good or bad
<BitPuffin> guess it depends on if it makes sense with the language
<Drup> it would make sens, it would be nice to have it, but we don't :)
<BitPuffin> ah
<Drup> we do stuff in another way, with the module system
<BitPuffin> will it ever come maybe?
<BitPuffin> I see
nikki93 has quit [Remote host closed the connection]
<Drup> some people are working on it
<BitPuffin> cool
<BitPuffin> ooooh niiiice
<BitPuffin> infix functions without ``
<BitPuffin> or is it just mod?
<Drup> it's just mod :D
<BitPuffin> aw :(
<BitPuffin> oh well
<Drup> you can do operator anyway
<BitPuffin> you mean create my own operator?
<Drup> yes
<BitPuffin> nice to see that function currying is here
<BitPuffin> ah and call it anything?
<Drup> not *anything*
<BitPuffin> well I mean call it a word
<BitPuffin> like foo
<Drup> no
<BitPuffin> aha!
<BitPuffin> you know I might actually give ocaml a shot
<BitPuffin> I'm currently working on a personal site
<BitPuffin> maybe I could write the backend with ocaml
<BitPuffin> is ohm any good?
<Drup> if you ask me, ohm is dead without being born
<BitPuffin> is there anything else?
<Drup> yes there is :)
<BitPuffin> ohm seems to have a lot of frameworks
<BitPuffin> uh
<BitPuffin> I mean plugins
<Drup> is there ? there is still no documentation
<Drup> the page "documentation coming soon has been there for 2 years I think"
<BitPuffin> oh
<Drup> for a simple http server, there is cohttp, for a complex http server, there is ocsigen, for a complete (and quite complicated) web framework, you have eliom
<BitPuffin> Drup: well what other web stuff are there? ocsigen?
shinnya has quit [Ping timeout: 248 seconds]
nikki93 has joined #ocaml
<Drup> I like ocsigen/eliom, but I'm quite partial :D
<BitPuffin> you mean biased?
ollehar has quit [Ping timeout: 272 seconds]
<BitPuffin> I know this is really silly but I was really turned off by the website lol
<Drup> why ?
<BitPuffin> Dunno it reminds me of website that sell windows adware, don't know why haha
<BitPuffin> what's the license for ocsigen?
<BitPuffin> and eliom
<Drup> LGPL, afair
csakatoku has joined #ocaml
<Drup> with the usual ocaml linking exception
<BitPuffin> why does eliom celebrate Ada's birthday? lol
shinnya has joined #ocaml
<BitPuffin> what kind of database support is there in eliom?
<BitPuffin> I noticed that ohm had stuff like couchdb and persona plugins which is attractive
goudale has quit [Ping timeout: 248 seconds]
<Drup> you have a very nice binding for pgsql, I suppose there is other stuff too, like couchdb
boogie has quit [Remote host closed the connection]
<BitPuffin> Drup: where is that documented?
<Drup> the nice binding for pgsql ? it's called pgocaml
boogie has joined #ocaml
<BitPuffin> Drup: oh so it isn't anything integrated into eliom?
<BitPuffin> does seem really cool though
<BitPuffin> Might be nice to use in conjunction with cohttp
<BitPuffin> doesn't seem like there's any docs for cohttp though
ollehar has joined #ocaml
<Drup> no
<BitPuffin> I wonder if it is simple to use
<BitPuffin> to build a blog app or something with it
<BitPuffin> anyways I should really sleep now! I'll check the logs tomorrow :) night!
BitPuffin has quit [Read error: Operation timed out]
nikki93 has quit [Remote host closed the connection]
csakatoku has quit [Ping timeout: 272 seconds]
yacks has joined #ocaml
<strobegen> BitPuffin: > Is ocaml suitable for game development? I know few examples of mobile games written on Ocaml: http://inventos.ru/games/lc/, http://inventos.ru/our_games/, http://redspell.ru/games/for-ios/lang-en/ (original information about this, gotten from this Russian blog post comments http://habrahabr.ru/post/192048/)
gour has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
talzeus_ has joined #ocaml
nikki93 has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
talzeus_ has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
talzeus_ has quit [Ping timeout: 248 seconds]
caseyjames has quit [Quit: Page closed]
chrisdotcode has joined #ocaml
nikki93 has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
strobegen has quit [Quit: Leaving.]
talzeus__ has joined #ocaml
talzeus_ has quit [Ping timeout: 240 seconds]
talzeus__ has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
talzeus_ has quit [Ping timeout: 240 seconds]
strobegen has joined #ocaml
strobegen has quit [Client Quit]
strobegen has joined #ocaml
derek_c has joined #ocaml
lamawithonel_ has quit [Remote host closed the connection]
DaveS has quit [Ping timeout: 248 seconds]
caseyjames has joined #ocaml
<caseyjames> anyone know if CTypes works in the opposite direction -- calling OCaml functions from C?
derek_c has quit [Ping timeout: 245 seconds]
derek_c has joined #ocaml
derek_c has quit [Ping timeout: 240 seconds]
derek_c has joined #ocaml
csakatoku has joined #ocaml
derek_c has quit [Ping timeout: 240 seconds]
derek_c has joined #ocaml
boogie has quit [Remote host closed the connection]
Guest55023 has quit [Remote host closed the connection]
Drup has quit [Quit: Leaving.]
csakatoku has quit [Ping timeout: 245 seconds]
caseyjames has quit [Ping timeout: 250 seconds]
w0rm_x has quit [Remote host closed the connection]
nikki93 has joined #ocaml
Kakadu has joined #ocaml
iZsh has joined #ocaml
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
w0rm_x has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<Kakadu> > See the documentation of opam switch list to see the ......
<Kakadu> any ideas what should I execute in bash to get help about `opam switch list`?
derek_c_ has joined #ocaml
derek_c_ has quit [Client Quit]
derek_c_ has joined #ocaml
derek_c_ has quit [Quit: leaving]
derek_c_ has joined #ocaml
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
derek_c_ has quit [Client Quit]
derek_c_ has joined #ocaml
derek_c_ has quit [Client Quit]
csakatoku has joined #ocaml
talzeus_ has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
talzeus_ has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
talzeus_ has quit [Ping timeout: 272 seconds]
Kakadu has quit [Ping timeout: 272 seconds]
zacts has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
csakatoku has joined #ocaml
ulfdoz has joined #ocaml
tane has joined #ocaml
derek_c has quit [Ping timeout: 256 seconds]
nikki93 has quit [Remote host closed the connection]
mfp has joined #ocaml
zacts has quit [Quit: leaving]
chrisdotcode has quit [Ping timeout: 240 seconds]
mfp has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
mfp has joined #ocaml
nikki93 has joined #ocaml
q66 has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
nikki93 has quit [Ping timeout: 240 seconds]
rand000 has joined #ocaml
zarul has quit [Remote host closed the connection]
wolfnn has joined #ocaml
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
alllex229 has joined #ocaml
<alllex229> hello
iZsh has quit [Excess Flood]
<alllex229> is it possible to handle a string as a list of chars like in haskell?
<pippijn> yes
ulfdoz has joined #ocaml
<alllex229> how?
<pippijn> type haskell_string = char list
<pippijn> can you be more specific?
<pippijn> what do you want to do?
<pippijn> do you want to convert an ocaml string to a char list?
<alllex229> thx ive written a function that get all suffixes of a string
<alllex229> aehm a of a list
<alllex229> wati
<alllex229> wait
<alllex229> let rec suffix = function
<alllex229> | [] -> [[]]
<alllex229> | hd::tl as suff -> suff::(suffix tl);;
steshaw has quit [Ping timeout: 272 seconds]
<pippijn> ok
<pippijn> and you want to use this function for ocaml strings?
<alllex229> yes
jayprich has joined #ocaml
<pippijn> is using batteries an option?
<alllex229> im a beginner
<pippijn> ok
<alllex229> batteries dont know
<pippijn> do you know how to use libraries?
<pippijn> how do you test your programs?
<alllex229> with ocaml interpreter
<pippijn> the repl?
<alllex229> no
<pippijn> ocamlc?
<alllex229> console and ocaml
<pippijn> "ocaml" is the repl
<pippijn> read-eval-print-loop
<alllex229> ah k :D
<pippijn> ok
<pippijn> install batteries
<alllex229> i thougt you mean the standalone thing
<pippijn> and use BatString.explode/implode
<pippijn> val explode : string -> char list
<alllex229> ok thanks
<pippijn> then you can use your function, and then List.map BatString.implode result
goudale has joined #ocaml
<pippijn> alllex229: in the toplevel, write: #use "topfind";;
<pippijn> alllex229: and then #require "batteries";;
<pippijn> then you can use BatString functions
<alllex229> thx that makes things easier
<pippijn> yes, batteries usually do
goudale has quit [Read error: Connection reset by peer]
ocp has joined #ocaml
iZsh has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
Anarchos has joined #ocaml
alllex229 has quit []
alllex229 has joined #ocaml
alllex229 has quit [Client Quit]
alllex229 has joined #ocaml
Kakadu has joined #ocaml
DaveS has joined #ocaml
DaveS has left #ocaml []
tane has quit [Quit: Verlassend]
brendan has quit [Ping timeout: 248 seconds]
q66 has quit [Quit: Leaving]
brendan has joined #ocaml
q66 has joined #ocaml
darkf has quit [Quit: Leaving]
ggole has joined #ocaml
ollehar has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
BitPuffin has joined #ocaml
<BitPuffin> is there no single precision floating point in ocaml?
<BitPuffin> How does on interface with opengl then?
<ggole> Doesn't OpenGL have double versions of all the usual data transfer operations?
<BitPuffin> ggole: not sure
<BitPuffin> I thought it only spoke float
<BitPuffin> can't remember seeing any double in the API
<ggole> I think it does: if it doesn't, then you would have to copy/convert into a buffer
<pippijn> ocaml C interfaces are usually done via stubs
<BitPuffin> either way, single precision is more efficient
<pippijn> and those can convert to single precision floats easily
<BitPuffin> well, I guess double can be faster on some CPUs
<BitPuffin> not sure
<pippijn> I guess the new ctypes FFI can also do that
<BitPuffin> what's stubs?
<BitPuffin> By the way is there any example on how to use cohttp?
<ggole> As an example, glVertexPointer takes a GLenum type which can be one of GL_SHORT, GL_INT, GL_FLOAT, or GL_DOUBLE
<ggole> So you could use that function with OCaml arrays directly.
<BitPuffin> ggole: ah cool, but isn't a double in ocaml 63 bit?
<ggole> I imagine there is corresponding functionality for all the usual operations.
<ggole> No, they are regular doubles.
<BitPuffin> I guess whatever binding there is for opengl already handles that
<ggole> That's what I would assume, yeah.
<BitPuffin> but not how to accept parameters in the url
<Kakadu> gour: hi!
alllex229 has quit []
alllex229 has joined #ocaml
<gour> hello Kakadu
<Kakadu> Guy have had some problems with Qt linking with OCaml and I wanted some useful advice but now we semi-found an issue
<gour> too bad, i'm swamped with other stuff so can't afford playing with it atm :-/
<gour> i'm also keeping one eye at ada...
dsheets has quit [Ping timeout: 245 seconds]
alllex229 has quit []
alllex229 has joined #ocaml
<BitPuffin> let rodrigue = "The cid"; let diegue = "cid's father" how do I fix that line?
<BitPuffin> I tried putting a space before the
<BitPuffin> ;
<ggole> Two ;;s, or zero
<ggole> ; is for chaining *non-toplevel* expressions into a sequence
<ggole> ;; (or just nothing) separates top level expressions.
<mrvn> or no ; to make it 2 expressions
<BitPuffin> characters = [ fernand ; rodrigue ; diegue ];; what about that one?
<BitPuffin> Is it just that it is missing the let?
zpe has joined #ocaml
<mrvn> yes, without let that becomes an argument to the expression before that
<BitPuffin> aha
<BitPuffin> interesting
zpe has quit [Ping timeout: 248 seconds]
csakatoku has joined #ocaml
<BitPuffin> what about this one
<BitPuffin> let xy = let x = 'x' and let y = 'y' in x ::[y]
<BitPuffin> ah
<mrvn> what about it?
<BitPuffin> remove the let
<BitPuffin> lex x = blabla and y = blabla
<ggole> 'and' is usually only used where you need mutual recursion
<mrvn> s/and/in/
<ggole> let x = foo in let y = bar in ... is the usual way
talzeus_ has joined #ocaml
<BitPuffin> https://gist.github.com/BitPuffin/7070080 how do I fix this one?
<BitPuffin> ggole: not sure I understand completely :P this is tricky
csakatoku has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
<ggole> What's the Char.lowercase for? Is it supposed to be bound to something?
<BitPuffin> ggole: no it's just an exercise
<BitPuffin> lesson 5 step 4
<ggole> Oh
<ggole> let ab = let a = 'a' in let b = 'B' in a ::[Char.lowercase b], I guess?
<ggole> (This is really silly code.)
talzeus__ has joined #ocaml
<BitPuffin> are you sure that's the thing they want you to do?
<BitPuffin> I'm pretty sure they are trying to make you find some small change or something
<BitPuffin> but I guess it works :P
<ggole> It looks to be like it is equivalent: I'm not sure if you are supposed to introduce another binding or not, though.
<ggole> *to me
zpe has quit [Remote host closed the connection]
talzeus_ has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
<BitPuffin> Hm
<BitPuffin> maybe I'm better of learning ocaml from the tutorials or something
zpe has quit [Ping timeout: 245 seconds]
<BitPuffin> I think the lack of overloaded operators in ocaml a bit strange
MoHaX has joined #ocaml
<BitPuffin> what's the reason for it?
<ggole> Makes inference decidable, mostly.
Simn has joined #ocaml
<BitPuffin> ggole: But shouldn't type inference work anyway?
<BitPuffin> I guess it's not as much the type inference that needs it
<BitPuffin> rather the explicit casting
<BitPuffin> because if there were implicit casting it should be able to figure out that 1.0 + 1 is 2.0
<BitPuffin> But even with explicit casting
<BitPuffin> it should be simple for the compiler to figure out
<ggole> let a b = a + b: which type should be chosen?
<BitPuffin> so if I make a function add that takes an int and a float, and explicitly cast the int to a float in the function, the compiler should know
<ollehar> Reference to undefined global `Camlp4'
<ollehar> ?
<ollehar> hm
<ggole> ollehar: in which context?
<ollehar> ocamlc -I +camlp4 -I +toplevel topdirs.cmo dynlink.cma camlp4o.cma pa_wx.cmo test.ml
<ollehar> but know I can't find topdirs.cmo
<ollehar> *now
<ggole> Hmm
<BitPuffin> so does anyone use cohttp here?
breakds has joined #ocaml
<pippijn> ggole: let plus a b = a + b
<ggole> Er, yeah
<ggole> (Wish the compiler was that helpful. -_-)
cthuluh has quit [Ping timeout: 265 seconds]
csakatoku has joined #ocaml
Kakadu has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
csakatoku has quit [Ping timeout: 265 seconds]
<gour> ggole: how does haskell deal with overloaded operators not needing +. etc. ?
<ggole> Type classes.
<ggole> They overlap with objects and modules a bit too much to fit nicely into OCaml... although it would be nice to have them anyway.
Anarchos has quit [Read error: Operation timed out]
<ggole> And SML deals with it by overloading +, choosing int if there is no type information
Anarchos has joined #ocaml
<gour> in any case, ocaml is more pragmatic to me, but i'm still evaluating ada due to, possibly, better gui options
zpe has joined #ocaml
Simn has quit [Ping timeout: 245 seconds]
csakatoku has joined #ocaml
ollehar has quit [Read error: Operation timed out]
csakatoku has quit [Ping timeout: 272 seconds]
dsheets has joined #ocaml
dsheets has quit [Client Quit]
dsheets has joined #ocaml
MoHaX has quit [Ping timeout: 248 seconds]
luke_ has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
moro_home has quit [Read error: Connection reset by peer]
<BitPuffin> in a let name = expression in .... thingy, is the expression lazy and not evaluated until it is used in the in "block"?
dsheets has quit [Ping timeout: 248 seconds]
<ggole> No, OCaml is a strict language.
cesar_ has joined #ocaml
dsheets has joined #ocaml
<ggole> (There's an explicit lazy construct if you happen to need that behaviour.)
<BitPuffin> ggole: okay so it is evaluated immediately? It was just that in the tutorial it said that it is shorthand for the expression
cesar_ is now known as Guest21450
<BitPuffin> so I was thinking it wasn't being evaluated until the part of the block it appears in
zpe has quit [Ping timeout: 240 seconds]
Guest21450 has quit [Remote host closed the connection]
<ggole> The bound expression is evaluated before the body.
zpe has joined #ocaml
<BitPuffin> I see
<BitPuffin> You know what, later tonight I'm just gonna learn ocaml by hacking up my website in it
Drup has joined #ocaml
<BitPuffin> probably with cohttp, problem is that there isn't really any examples, oh well. Is there any tools I should have installed other than the compiler? Like a package manager or something+
<ggole> opam would be useful
yroeht has quit [Ping timeout: 272 seconds]
<ggole> Some useful tools are also usually installed along with the compiler: you can discover those as the need arises, though.
<BitPuffin> ggole: so opam is THE package manager for ocaml?
<BitPuffin> what is findlib then?
<Drup> findlib is a *local* package manager
<BitPuffin> oh
<BitPuffin> I see
<Drup> it's just installing and retrieving package on your system
<BitPuffin> is that even useful :P
<Drup> it is
<ggole> There's no "official" package manager, but opam is probably the closest thing
<BitPuffin> does opam depend on findlib?
<Drup> yes
<BitPuffin> Ah
<BitPuffin> then it makes sense
dsheets has quit [Ping timeout: 245 seconds]
<BitPuffin> brb!
moro_home has joined #ocaml
BitPuffin has quit [Ping timeout: 272 seconds]
breakds has quit [Quit: Konversation terminated!]
csakatoku has joined #ocaml
ollehar has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
talzeus__ has quit [Remote host closed the connection]
talzeus_ has joined #ocaml
dsheets has joined #ocaml
lamawithonel_ has joined #ocaml
talzeus_ has quit [Ping timeout: 248 seconds]
dsheets has quit [Ping timeout: 272 seconds]
nicoo has quit [Ping timeout: 248 seconds]
Simn has joined #ocaml
nicoo has joined #ocaml
Anarchos has quit [Ping timeout: 256 seconds]
rishabhjain has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest53266
shinnya has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
rishabhjain has left #ocaml []
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
Drup has quit [Ping timeout: 245 seconds]
ohama has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
ohama has joined #ocaml
cthuluh has joined #ocaml
milosn has quit [Ping timeout: 246 seconds]
Guest53266 has quit [Remote host closed the connection]
luke_ has quit [Ping timeout: 272 seconds]
MoHaX has joined #ocaml
chrisdotcode has joined #ocaml
csakatoku has joined #ocaml
alllex229 has quit []
alllex229 has joined #ocaml
luke_ has joined #ocaml
MoHaX has quit [Quit: Leaving]
milosn has joined #ocaml
yroeht has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
Neros_ has joined #ocaml
Neros has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 248 seconds]
Neros_ is now known as Neros
Tamae has quit [Ping timeout: 272 seconds]
ggole has quit []
ulfdoz has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
luke_ has quit [Ping timeout: 272 seconds]
_5kg has joined #ocaml
zpe has joined #ocaml
luke_ has joined #ocaml
Tamae has joined #ocaml
boogie has joined #ocaml
ulfdoz has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
Kakadu has quit []
<ollehar> can I install a single opam package without upgrade a bunch? force no upgrade, that is.
robink has quit [Quit: No Ping reply in 180 seconds.]
robink has joined #ocaml
alllex229 has quit [Ping timeout: 248 seconds]
chrisdotcode_ has joined #ocaml
chrisdotcode has quit [Ping timeout: 248 seconds]
<Drup> yes, just install it :)
Anarchos has joined #ocaml
ocp has quit [Quit: Leaving.]
ahill-89 has joined #ocaml
<orbitz> If the new package requires newer versions, the nno
Arsenik has joined #ocaml
w0rm_x has quit [Ping timeout: 248 seconds]
rand000 has quit [Quit: leaving]
Yoric has joined #ocaml
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
yacks has quit [Quit: Leaving]
nikki93 has joined #ocaml
gour has quit [Quit: WeeChat 0.4.1]
yacks has joined #ocaml
boogie has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
<BitPuffin> Hey guys!
<BitPuffin> someone should contribute ocaml to http://learnxinyminutes.com/
<Drup> I saw one of those somewhere
<Drup> I find it a bit stupid, tbh
<Drup> hnrgrgr: the last oups was recorded, right ?
<BitPuffin> Well it's not stupid
<BitPuffin> they are a pretty good fast introduction to just get the syntax and basic concepts
<BitPuffin> so that you can get started fairly quickly
caligula_ has joined #ocaml
Guest76588 has joined #ocaml
Guest76588 has quit [Max SendQ exceeded]
<companion_cube> hmm, someone new
<companion_cube> hi BitPuffin
Guest76588 has joined #ocaml
Guest76588 has quit [Max SendQ exceeded]
<BitPuffin> hello companion_cube
<BitPuffin> Drup: I did
caligula__ has quit [Ping timeout: 265 seconds]
<BitPuffin> companion_cube: yes I am new
<BitPuffin> I'm teaching myself ocaml by making my personal blog with cohttp and pgocaml
Guest76588 has joined #ocaml
Guest76588 has quit [Max SendQ exceeded]
<companion_cube> wow, sounds nice
<BitPuffin> Can the windows version of ocaml generate 64 bit binaries?
<BitPuffin> companion_cube: yes! But I have not started yet, I'm skimming the tutorial :P
<companion_cube> so you're directly starting with some monadic future library, networking, databases...
Guest76588 has joined #ocaml
<BitPuffin> companion_cube: I suppose :P I need to get the basic blog functionality done because I'm getting paid for doing basic blog functionality in a strange language :p
<BitPuffin> I hope it's not too difficult to use cohttp
<companion_cube> do you know some other functional languages?
<BitPuffin> companion_cube: little bit of lisp and haskell
<BitPuffin> But haskell is a bit uptight about stuff
<BitPuffin> and lisp is a little bit slow unless you are very explicit about declamating types etc
<Drup> I really need to remember this way of saying it
<Drup> "uptight" :3
<BitPuffin> and ocaml seems very practical
<companion_cube> BitPuffin: well, you have taste ;)
<BitPuffin> I hope that it one day gets parallelization without using separate processes.
csakatoku has joined #ocaml
<BitPuffin> Drup: haha yeah it's a good way to describe it I think :)
<companion_cube> it may, someday
<BitPuffin> and so far the experience talking to ocaml people here in irc has been nice and friendly. Same was true for lisp and haskell though
<companion_cube> but I'm quite convinced that optimizing for one core is sufficient in many cases
<BitPuffin> companion_cube: Yup, obviously a hard thing to do though
<companion_cube> there are ongoing projects to do something about the monocore restriction
<Drup> the last time I have a discussion about that with an haskelien guy, I said it was "more practical", I got a bit trolled =')
<ollehar> Parse error: [a_LIDENT] expected after "->" (in [expr])
<ollehar> guess there's no simple solution to that ^ ?
<Drup> ollehar: code sample ?
nikki93 has quit [Remote host closed the connection]
<ollehar> that thing by Le Fessant
<ollehar> doesn't work with `when` case in match cases
jayprich has quit [Ping timeout: 256 seconds]
darkf has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
<BitPuffin> companion_cube: after the website I'm probably writing a 3d game in ocaml
<companion_cube> you're an ambitious person :p
<companion_cube> I think there are bindings to openGL though
<BitPuffin> companion_cube: yup! I'm probably gonna have to bind glfw3, libao, and newton on my own though :)
<BitPuffin> and probably DevIL
<BitPuffin> and maybe something else
<companion_cube> good luck.
<BitPuffin> not sure what I'll use for sound files, libsndfile perhaps
<BitPuffin> thanks
<companion_cube> there may be bindings to SDL also
<BitPuffin> companion_cube: Yeah some other 3d game uses it, but I'll use glfw, I prefer it :)
<companion_cube> wait until you've written the website :)
<BitPuffin> haha yep
<BitPuffin> Hopefully I'll be able to get pretty zen about it this evening :P
<Drup> afaik, SDL bindings are quite deprecated, anyway
csakatoku has joined #ocaml
<mrvn> Drup: why?
<mrvn> SDL kills your battery though.
w0rm_x has joined #ocaml
<Drup> mrvn: what do I need to explain/justify ? just look at the current sdl bindings in ocaml
<companion_cube> I would think bindings are easier to update than to write from scratch, but actually I have no idea :D
w0rm_x has left #ocaml []
<adrien> remember SDL cannot do oblique lines on its own
<mrvn> Drup: they are for the old sdl version but otherwise they seem to work fine.
<adrien> good criterium when you wondering whether you should go for sdl or not
<Drup> yes, that's what I said.
<hnrgrgr> Drup: OUPS wasn't recorded. The organizer forget to book the camera.
<Drup> hnrgrgr: T___T
<BitPuffin> why are there so many file extensions for ocaml?
<mrvn> BitPuffin: because there are that many different file types
<BitPuffin> ml, cm, cmx etc
<mrvn> cm?
<Drup> BitPuffin: because it's fun ? :]
<companion_cube> BitPuffin: there are two targets for compilation: native and bytecode
<companion_cube> also, interfaces are compiled
<adrien> for start, because you have both bytecode and native code compilation; both have dif
<mrvn> ml, mli, cmi, cmo, cma, cmx, cmxo, cmxa, mll, mly
<adrien> ='(
<adrien> I'll just go to bed
<companion_cube> that makes many compiled file types
<adrien> cmxs too
csakatoku has quit [Ping timeout: 245 seconds]
<def-lkb> cmt, cmti and cmtd soon
<mrvn> def-lkb: tags/types?
<def-lkb> mrvn: yes, `TypedTree'
<BitPuffin> o_o
<companion_cube> looks cool
<companion_cube> BitPuffin: don't worry ^^
<BitPuffin> thanks Drup that eased my mind a bit
<nicoo> BitPuffin: There are many file extensions for C too : .c, .h, .o, .so
<BitPuffin> companion_cube: haha there is so much
<BitPuffin> nicoo: Yeah that's true, but not quite as many, and you forgot .a :P
<BitPuffin> and .lib
<BitPuffin> and .dll
<BitPuffin> (on windows)
<BitPuffin> on unix only .a and .so is relevant
<mrvn> and .y and .ll
<BitPuffin> thank god
<BitPuffin> what are those?
<nicoo> Yeah, but I cannot count both .so and .dll
<BitPuffin> never even seen
<mrvn> BitPuffin: yacc and bison
<BitPuffin> mrvn: but that's not really C?
<mrvn> lexer and grammar generator
<nicoo> BitPuffin: yacc & bison. mrvn put the equivalents in the list for OCaml
<mrvn> mly/mll is the equivalent to y and ll in C
<nicoo> I agree that it's not part of the language, in OCaml or C, but it's still fairly common
<BitPuffin> well I don't really know about yacc and bison other than what mrvn just said
<nicoo> How do you do parsing without a lexer/parser generator ?
<Drup> parser combinator in C
<Drup> wouuuh /o/
<nicoo> D
<nicoo> D:
<nicoo> D:
<nicoo> D:
<mrvn> nicoo: you can always write them by hand
<nicoo> mrvn: Yeah, but it is saaaaaaaaaaaad.
<companion_cube> you can use recursive descent
<nicoo> companion_cube: Sure. But hand-written often makes me sad. (though LL(1) is relatively easy to write by hand)
<Drup> you can use pcre too, it's super powerful, the description is very clean and it's quite efficicent.
<Drup> or not.
<mrvn> what do you use to make a parser/lexer for python?
<nicoo> <3
<nicoo> Drup: It's PIRE
<nicoo> (Perl-Incompatible “Regular” Expression)
<companion_cube> in python there is pyparse, I think, a bit like weak parser combinators
<mrvn> companion_cube: FOR python, not in python
<companion_cube> oh.
<companion_cube> for C, yacc has a big drawback though: it works with global variables...
q66 has quit [Quit: Leaving]
<pippijn> doesn't ocamlyacc also do that?
<def-lkb> whereas for ocaml, it uses… global variables. But it's ocaml.
<pippijn> menhir doesn't
<nicoo> companion_cube: Yeah. Hilarity ensues when several threads use the parser.
<companion_cube> exactly
<pippijn> and bison can make pure parsers
<mrvn> add a thread local marker in the header
<pippijn> or rather
<pippijn> reentrant parsers
<pippijn> and flex can make reentrant lexers
<nicoo> mrvn: Yeah, it's what I did. But it's still sad
<pippijn> legacy yacc is not really relevant anymore
<companion_cube> pippijn: no, ocamlyacc provides functions
<Drup> nicoo: use happy :]]
<companion_cube> I don't think ocamlyacc uses global variables
<Drup> (I really to stop doing stupid pun)
<pippijn> I think it does
<Drup> companion_cube: it does
<companion_cube> what for?
<nicoo> Drup xD
<Drup> companion_cube: legacy ?
<companion_cube> wat
<nicoo> companion_cube: To be evil. And make us regret not using happy
<pippijn> or menhir
<companion_cube> I mean, the interface of ocamlyacc doesn't expose global variables
<companion_cube> h
<BitPuffin> so when is it that you have to do bla ()
<nicoo> /nick companion_cube tron
<companion_cube> why does it use some inside?
<pippijn> companion_cube: Parsing does
<BitPuffin> is it when something doesn't take any args?
<Drup> BitPuffin: yes
<companion_cube> oh, right :(
<companion_cube> never noticed that
<companion_cube> it should pass a lexbuf along, seriously :(
<pippijn> parsebuf, yes
<companion_cube> BitPuffin: it takes one argument, but the argument is irrelevant
<Drup> or, to be precise, doesn't take any meaningful args.
<nicoo> BitPuffin: Well, it takes one argument, which has only one possible value. It is the same as no-arguments, but without adding more concepts.
<BitPuffin> oh so () is empty tuple?
<mrvn> BitPuffin: () is a unit
<BitPuffin> aaahhh
<pippijn> () is unfortunately not empty tuple
<BitPuffin> which is basically void
<mrvn> often use to make something a function that doesn't take any arguments.
shinnya has joined #ocaml
<BitPuffin> or null?
<pippijn> in the ocaml syntax, it's special
<mrvn> BitPuffin: no, 0
dsheets has joined #ocaml
q66 has joined #ocaml
<BitPuffin> so does the functions you pass () to usually check if that is what you passed?
<Drup> BitPuffin: () is the only member of the type "unit"
<nicoo> BitPuffin: OCaml doesn't have the null concept
<BitPuffin> oh hey q66, you seem to follow me everywhere i go :P
<nicoo> If you want « optional stuff » use type 'a option
<mrvn> BitPuffin: i wouldn't think so, it already knows it is (). It can't be anything else.
jayprich has joined #ocaml
<BitPuffin> nicoo: Well I just mean that it might be similar
<companion_cube> BitPuffin: it's usually to make the distinction between the function itself, and the result of calling the function
<mrvn> BitPuffin: I would hope the compiler ignores the argument completly.
<BitPuffin> okay now I'm just confused xD
<Drup> BitPuffin: except the funny syntax, it's the same as any other stuff in the langage.
<BitPuffin> Well I mean that the function will still bind a value to the parameter
<BitPuffin> even if it is ()
<BitPuffin> and you can probably not do anything with ()
<Drup> indeed
<BitPuffin> so it should check if the value of the param is () I guess?
<mrvn> BitPuffin: let x = [] makes x an empty list, let x () = [] makes a function that creates a new empty list on each invokation.
<BitPuffin> otherwise it might start doing stuff that isn't allowed with ()
<Drup> BitPuffin: if the f is of type "unit -> int", it will only accept () as parameters
<Drup> -s
<nicoo> BitPuffin: The compiler will know the value is (), of type unit
<mrvn> BitPuffin: you can't pass anything but () to it and it can't do anything with it itself. There is no reason to check anything because it can only be ()
<nicoo> The *generated code* won't check that the value recieved is (), since this is statically known
<BitPuffin> but then why even take a parameter?
<BitPuffin> oh
<BitPuffin> it's to not introduce the concept of no argument
<nicoo> Egg-zactly
<BitPuffin> ah :)
<mrvn> BitPuffin: it is the conecpt of no argument
<BitPuffin> So if a function takes () it won't compile if you pass it anything but ()
<BitPuffin> mrvn: well without any extra code
<mrvn> BitPuffin: yes, type error otherwise
<BitPuffin> it's re-using ()
<BitPuffin> which is pretty clever
<BitPuffin> mrvn: because of pattern matching right?
<Drup> yes
<mrvn> no, because of type inference
<q66> <BitPuffin> oh hey q66, you seem to follow me everywhere i go :P
<q66> lies and deceit
<q66> YOU follow me everywhere I go
<companion_cube> incorrect, you arrived later :p
<q66> i was here for the whole day.
<companion_cube> so, are you another new ocaml fan? :)
<q66> I only had to reboot :P
<mrvn> first rule of following: know where you are going and be there first
<Drup> BitPuffin: "let f () = []" is a cleverly disguised pattern match on the unit type.
<q66> I've been here for a few months before that, too.
<companion_cube> mrvn: I see you are a master of stalking :p
<companion_cube> q66: cool! are you learning OCaml? using it? :)
<BitPuffin> q66: but I was here yesterday xD
<q66> BitPuffin, i was here yesterday, the day before that, and many days before that
<BitPuffin> Drup: so it's sugar?
<BitPuffin> q66: shut your face :P
<pippijn> BitPuffin: it will rot your teeth
<BitPuffin> pippijn: gaaah!
<q66> companion_cube, i've been playing around for quite some time
<q66> not really using it for serious stuff though
<q66> because global interpreter lock
<mrvn> .oO(Where have I landed here?)
<q66> :\
<BitPuffin> q66: having as hard of a time as me finding a good language to stick to? :P
<q66> no, not really
<BitPuffin> q66: sticking with rust?
<q66> aye
<nicoo> q66: BitPuffin believes you follow him
<q66> for new things
<nicoo> because
<nicoo> he recently saw Memento
<Drup> BitPuffin: "let f <foo> = ..." is equivalent to "let f x = match x with <foo> -> ..."
<q66> but i don't really do new things these days
<q66> so it's mostly c/c++ for me :P and lua for all kinds of stuff.
<Drup> BitPuffin: <foo> being a pattern, with a constructor
<BitPuffin> q66: I don't use rust because it's not stable yet
<q66> most stuff i do these days is written in lua
<BitPuffin> q66: plus I think nimrod is a bit nicer
<BitPuffin> but that is also not stable yet
<BitPuffin> so here I am
<companion_cube> q66: what do you need parallelism for?
<q66> nimrod has nullable pointers/references
<q66> that alone makes rust superior :P
<companion_cube> lua doesn't have theads, so...
<BitPuffin> q66: not really
csakatoku has joined #ocaml
<BitPuffin> q66: It's good to still have the option, and in rust you can probably set stuff to null in unsafe code
<q66> companion_cube, it doesn't, but things i do these days require a scripting language and don't require parallelism
<q66> if i do native stuff, i want parallelism :P
<companion_cube> q66: great, so you can use ocaml :p
<BitPuffin> Drup: hmm
<companion_cube> I don't know why some many people need parallelism ^^
<BitPuffin> Drup: But how does one refer to an argument if you do let f int ?
<q66> we gotta use all dem cores somehow :P
<pippijn> parallelism is mostly overrated
<BitPuffin> for example
<pippijn> concurrency is not
<Drup> BitPuffin: "int" is not a constructor
<Drup> it's a type
<BitPuffin> Drup: what's a constructor for int then
<nicoo> companion_cube: To compute fast ? But most of the time they don't need to.
<BitPuffin> Drup: oh you mean like 3
<Drup> BitPuffin: yes
<q66> anyway when it comes to scripting it's lua for me; ocaml i'd use where i need a comprehensive static type system, which is not the case in a typical scripting scenario
<pippijn> shared memory is a bad choice for massive parallelism
<BitPuffin> Drup: ah so if I put 3 there it can only be 3?
<q66> pippijn, it is.
<BitPuffin> because it is matched
<Drup> BitPuffin: yes
<pippijn> better use processes and message passing
<pippijn> and ocaml can do that just fine
<q66> well
<Drup> BitPuffin: the compiler will yell at partial patern match, though :)
<q66> i like rust's tasks
<q66> they work really well
<q66> and are lightweight and fast
<nicoo> BitPuffin: Actually, it can be something else than 3, but it will give you a runtime exception (and a compile-time warning)
<q66> and there is no explicit memory sharing (except on exchange heap with unique ownership)
<BitPuffin> nicoo: what how can it be something else?
<pippijn> sounds good
<companion_cube> making things faster isn't just as simple as "let's thrown some threads in"
<BitPuffin> shouldn't that be a compile time error
<mrvn> BitPuffin: matching matches structure, with the exception of literals.
<companion_cube> this only works for easily parallelizable things
<companion_cube> many algorithms aren't
<nicoo> BitPuffin: I can do « let f 3 = () in f 0;;
<nicoo> »
<mrvn> BitPuffin: match x with 3 ->
<companion_cube> q66: to use many cores you can spawn many processes
<mrvn> is a syntactic suggar for 'match x with n when n = 3 -> '
csakatoku has quit [Ping timeout: 256 seconds]
<Drup> mrvn: from a typing point of view, it's not.
<q66> companion_cube, that's neat and all, but i'm writing a 3D game engine and many-process model is not suitable for that .. and I still want to parallelize it in the future
<companion_cube> mrvn: match x with 3 ->
<companion_cube> sorry -_-
<mrvn> Drup: sure it is, it both inferese type int.
<BitPuffin> now you guys are really confusing me :p
<Drup> BitPuffin: practice it.
<companion_cube> aren't there already lots of 3D engines? :)
<companion_cube> for this I would bind some existing C engine in OCaml
<q66> nothing that suits me
<q66> nothing that's like what i'm writing either
<companion_cube> oh, ok.
<mrvn> BitPuffin: The point was that you can't do: let f x y = match x with y -> true | _ -> false
<nicoo> q66: //ism is coming !
<mrvn> BitPuffin: at least it doesn't do what you think.
<companion_cube> nicoo: hopefully
<nicoo> Join the Threadwatch !
<nicoo> Get decapited by Ned Stark !
<BitPuffin> nicoo: doesn't make sense with the real plot
<nicoo> Stack*
<BitPuffin> lol
<BitPuffin> Ned Stack
<BitPuffin> best name ever for a programmer
<nicoo> ^^
boogie has joined #ocaml
<BitPuffin> mrvn: I'm not sure what I think it does
cesar_ has joined #ocaml
<nicoo> BitPuffin: It does, if you desert after having seen scary stuff
<Drup> no really, BitPuffin, just practice it
<mrvn> BitPuffin: well, it doesn't compare x and y
cesar_ is now known as Guest93171
<BitPuffin> Drup: practise pattern matching?
zpe has quit [Remote host closed the connection]
<Drup> yes
<nicoo> Practice writing OCaml
<BitPuffin> mrvn: ah, that's what I eventually came to the conclution that I was expecting. What does it do then?
<BitPuffin> Drup: Totally will
<BitPuffin> and nicoo
<Drup> it will be quicker to try to explain you what it does
zpe has joined #ocaml
<BitPuffin> Anyways ned is ded
<nicoo> BitPuffin: It binds a new variable
<mrvn> BitPuffin: it binds the value to a new y shadowing the old.
<nicoo> Chhhhhhhhhh, no spoils ;)
<BitPuffin> aha!
<BitPuffin> that's something
<nicoo> (Just kidding, I'm much after that in the books)
nikki93 has joined #ocaml
<BitPuffin> after doing this website thing I should probably pick up one of those books you speak of
<Drup> BitPuffin, nicoo: this is absolutely not a reason. Just don't do it on a public chanel.
<Drup> like, never.
<nicoo> Drup: True
dsheets has quit [Ping timeout: 245 seconds]
<BitPuffin> and then after knowing how things should work I'll fix all the stupid vulnerabilities I created
<BitPuffin> oh we are talking GoT
<BitPuffin> i thought we were back on ocaml
<BitPuffin> and that the spoiler was that it binds a variable
<BitPuffin> sorry for the spoils :P
<nicoo> Though spoiling the first 5 minutes of the book is somewhat trivial (the *other* one isn't, though)
<BitPuffin> But it's been years since that episode
<BitPuffin> It's kind of like spoiling hamlet by now xD
<nicoo> Some people have yet to read that play
<BitPuffin> I haven't
<BitPuffin> but I know how it ends
<BitPuffin> or have I read it?
<BitPuffin> hm
<BitPuffin> oh well
zpe has quit [Ping timeout: 272 seconds]
Guest93171 has quit [Remote host closed the connection]
<BitPuffin> isn't ml the programming language ocaml came from?
<Drup> hnrgrgr: and do you know about videos for ocaml 2013 ?
<Drup> BitPuffin: ML is more like a family of languages
<BitPuffin> Drup: I see, well then why does it use .ml extension, doesn't that confuse it with other languages?
<BitPuffin> it's kind of like if clojure used the .lisp extension
<BitPuffin> maybe it does
<Drup> I don't think so
<Drup> clj for clojure, I think
<pippijn> standard ml uses .sml for extension
<pippijn> and .sig
<pippijn> (for .mli)
<BitPuffin> haha
<BitPuffin> "fun fact"
boogie has quit [Remote host closed the connection]
* nicoo belived MLton to be a SML compiler :o
<pippijn> it is
<pippijn> with extensions
<nicoo> Ah, ok. Hence why it is listed in a PL category
<nicoo> kinda like GHC :)
Arsenik has quit [Ping timeout: 272 seconds]
nikki93 has quit [Remote host closed the connection]
isaacbw has left #ocaml []
boogie has joined #ocaml
<BitPuffin> does ocaml have any SLIME like functionality?
<nicoo> BitPuffin: You mean a Read-Eval-Print Loop ? We do : ocaml
<nicoo> Though I recommand you to try utop (fancier one, with auto-complete)
<BitPuffin> nicoo: no imean where you can connect the text editor to the repl
<Drup> ocaml-top
<nicoo> Ah, yeah, there are Emacs and Vim modes for that
<nicoo> And there is this new-fangled ocaml-top thing
<BitPuffin> cool!
zamN has joined #ocaml
<BitPuffin> nicoo, Drup: link?
<Drup> opam.
<zamN> Hi, I'm trying to do: http://pastebin.com/3S9y2tiT
<zamN> but I keep getting syntax errors
<zamN> is there any way to have multiple consecutive if statements in a function?
<nicoo> BitPuffin: http://www.typerex.org/ocaml-top.html (or grab it from OPAM)
<companion_cube> zamN: not this wau
<Drup> zamN: "else if"
<companion_cube> way
<companion_cube> "in" follows a "let"
<zamN> Drup: that is completely different
<companion_cube> zamN: what are you going to do with the result of the if ?
<zamN> companion_cube: in what way can i do it?
<zamN> i want to run those 4 if statements
<BitPuffin> oh it's a text editor
<BitPuffin> no thanks I want my vim
<zamN> like a normal programming language
<BitPuffin> nicoo: where can I find the vim modes?
<companion_cube> zamN: but, you don't have any statements in it
<companion_cube> only expressions
<zamN> okay
<nicoo> zamN: Piut ; instead of in
<nicoo> Put*
<zamN> i get the same error either way
<companion_cube> are you trying to build a list?
<zamN> yes based on the evaluation of the if statements companion_cube
<nicoo> BitPuffin: I'm an emacser myself. Ask def-lkb about vim integration and merlin
<companion_cube> ok, then let narr = if ... then foo::narr else narr in let narr = if .... then bar::narr else narr in ...
<companion_cube> you need to do something with the expressions you are evaluating
<BitPuffin> def-lkb: tell me about vim integration and merlin?
<companion_cube> also, "else" branches are only optional if they return unit
<mrvn> isn't else required in new syntax?
<Drup> zamN: I suppose you are from Java ?
<nicoo> mrvn: AFAIK, no.
<Drup> or C++/C#
<def-lkb> BitPuffin: merlin integrates well with vim
<Drup> zamN: the :: operation on list doesn't modify the previous list, it returns a *new* list
<def-lkb> the vim mode is installed by default, just check the wiki… wait
<Drup> zamN: so you need to actually do something with the result, as companion_cube show you in his piece of code
<BitPuffin> def-lkb: I like the you shall not parse :P
<Anarchos> Drup or feed it to "ignore"...
<nicoo> Anarchos: No. He is trying to build a value.
<Anarchos> nicoo let a = ignore ignore;; it gives a warning :)
<nicoo> <3
<BitPuffin> def-lkb: okay so after installing merlin with opam and adding the stuff to vimrc and running the command I'm done?
<mrvn> Warning 5: this function application is partial,
<mrvn> maybe some arguments are missing.
<mrvn> How does ocaml decide when to warn about this?
<def-lkb> BitPuffin: you can use C-X C-O to check that completion works well
<mrvn> Is that because ignore expects 'a instead of 'a -> 'b?
<zamN> Drup: im from normal programming languges
<def-lkb> BitPuffin: you can also install syntastic to have error reporting
<Drup> zamN: there is no such thing as "normal" programming languages
<BitPuffin> def-lkb: was just currently doing that :P
<BitPuffin> although I have stayed away from it before
<def-lkb> great
<Anarchos> Drup well there are more normal than malbolge...
<def-lkb> Well, I use it only with merlin (not that I use a lot of other languages these days)
<zamN> companion_cube: so what do i need to do?
<zamN> let narr = if ... then foo::narr else narr in let narr = if .... then bar::narr else narr in ...
<nicoo> Anarchos: Ook is normal ... for monkeys
<BitPuffin> Hmm
<BitPuffin> don't have the :Helptags
<BitPuffin> I don't use pathogen, I use vundle
<Anarchos> nicoo Ook ?
<mrvn> nicoo: Ook, Oooks ooks, ook ooook ooooks ooks.
* mrvn sends nico to the librarian.
<def-lkb> BitPuffin: vundle is not really recommended, unless you can pin specific release.
<BitPuffin> ah
<nicoo> mrvn xD
<BitPuffin> it was :helptags
<def-lkb> you risk having the vim mode updated on the git while using an older binary
<zamN> companion_cube: doing it that way i get a syntax error again x|
<BitPuffin> def-lkb: well I probably can but I haven't checked how :p
* nicoo unfortunately isn't wearing his « Unseen Univorsity » shirt.
<def-lkb> without pathogen, you will have to :helptags <explicit-path>
<nicoo> zamN: Pastebin.
<zamN> So right now I have: http://pastebin.com/cNgRLRGt and I'm getting a syntax error on line 12. Any ideas?
<BitPuffin> def-lkb: why?
<zamN> nicoo ^^
<mrvn> zamN: don't use ( ) for function arguments
<Drup> zamN: one in with one let, you need to bind repetidly
<zamN> oh
<zamN> mrvn: why not? they're expecting tuples
<nicoo> zamN: http://pastebin.com/V2fTjkHf i would say
<def-lkb> BitPuffin: :Helptags is a pathogen command that will index documentation of all plugins
<mrvn> zamN: they shouldn't normaly.
Yoric has quit [Ping timeout: 245 seconds]
<def-lkb> BitPuffin: :helptags is a builtin vim command that index documentation in a specified path
<zamN> nicoo: that was public pasted? x|
<Drup> mrvn: that's not important for now, it will not give a syntax error, let's keep things straight, shall we ?
<nicoo> zamN: Probably. Didn't check
<BitPuffin> def-lkb: ah I see
<zamN> lets hope none of my classmates search pastebin
ulfdoz has quit [Read error: Operation timed out]
<BitPuffin> def-lkb: do I need Helptags for anything?
<def-lkb> BitPuffin: if you want to access :help merlin from vim, yes
<BitPuffin> ah
<BitPuffin> well
<BitPuffin> Don't really wanna use pathogen
<BitPuffin> Can I add something to vimrc that will index merlin help?
<zamN> ah nevermind not an issue nicoo. pastebin sucks too much at search :D
ollehar has quit [Ping timeout: 272 seconds]
<nicoo> zamN: Concerned someone will search for the code you turn in ?
<def-lkb> BitPuffin: :helptags /some/path/ocamlmerlin/vim/doc
<nicoo> :D
<def-lkb> as documented on wiki
<zamN> nicoo: very. it could probably get me kicked out of the program
<zamN> lol
<nicoo> Ouch.
<zamN> yeah but thats a longshot imo
<nicoo> Well, rewrite using bind, it should completely manfle the code.
<zamN> nicoo: still getting syntax errors x_x
* nicoo goes into hiding.
<zamN> this time on: ;;
<zamN> oh did you intentionally not do let narr = for the last if?
<nicoo> zamN: I didn't really look at what I wrote. Just fixed the most obvious mistake.
<nicoo> Yes, I did
<zamN> okay. changing that I get 'unbound value narr'
<zamN> at line 8
<BitPuffin> def-lkb: do I have to do :execute "helptags " . substitute(system('opam config var share'),'\n$','','''') . "/ocamlmerlin" everytime I launch or just once?
<Drup> zamN: there is no ;; in your past :)
<zamN> now referencing this Drup: http://pastebin.com/V2fTjkHf
<nicoo> zamN: Is « narr » supposed to be empty « at the beginning ?
<def-lkb> BitPuffin: just once and after update (though missing it won't cause trouble)
<BitPuffin> def-lkb: so after that I'm set and syntastic should work for ocaml?
Yoric has joined #ocaml
<zamN> nicoo: narr is just supposed to be a list with integers
<Drup> zamN: That's not the question, what is the initial value ?
<zamN> []
<Drup> then declare it
<zamN> ah okay
<nicoo> then add « let narr = [] in » before first use
<def-lkb> BitPuffin: let g:syntastic_ocaml_checkers = ['merlin']
<zamN> that worked nicoo Drup. thanks
<def-lkb> BitPuffin: put that in your .vimrc to instruct syntastic to use merlin
<zamN> now if I wanted to modify narr after those if statements how would I do that?
<nicoo> zamN: You are welcome.
<nicoo> Actually, you never modified narr
<mrvn> zamN: you can't. you can only make a new narr
CissWit has quit [Ping timeout: 272 seconds]
<BitPuffin> def-lkb: nice :)
<nicoo> Just overshadowed its definition with another one
<zamN> ah yeah. basically now that I have this list I want to return the sorted version of it.
<zamN> So how can i return sort(narr)?
CissWit has joined #ocaml
<mrvn> zamN: sort narr
<Drup> List.sort* actually
<zamN> not allowed to use that drup
<Drup> oh
<zamN> mrvn so I would put that after my last if statement?
<Drup> do you have a sorting function ?
<mrvn> zamN: function application doesn't use () and the last value in an expression is implicitly returned.
Anarchos has quit [Quit: human beings sleep from time to time]
<mrvn> zamN: after the last "in"
<BitPuffin> def-lkb: so this can connect to a ocaml repl?
<zamN> so after line 13 I put sort narr ?
<zamN> and add an in at the end of it
<mrvn> zamN: and a let before the if
<def-lkb> BitPuffin: no, repl is outside the scope of merlin
<zamN> so basically i'm doing let narr = if ... else narr in
<zamN> like the previous ones?
<mrvn> zamN: yes
<zamN> okay
<Drup> zamN: you will, as previously, need to bind the result of the if
breakds has joined #ocaml
<BitPuffin> def-lkb: ah I see
<BitPuffin> well then is there anything that let's me connect to a repl?
<mrvn> zamN: having your board as a list will totaly kill performance
<mrvn> zamN: you should probably use an array
<def-lkb> you can take a look at utop, though it's a separate process, I don't know anything about integrating repl in vim
<zamN> mrvn: its part of the school project
<zamN> i.e. i have no say
<zamN> okay that worked. thanks guys :D mrvn drup nicoo
<mrvn> what is the game?
<BitPuffin> def-lkb: hmm
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
strobegen has quit [Quit: Leaving.]
<def-lkb> BitPuffin: yes?
<BitPuffin> def-lkb: I guess just running a repl and reloading files is an ad-hoc way to do it, kind of lame though but it would probably work
<def-lkb> BitPuffin: good luck :). Actually I have little to no use for the REPL in my usual workflow
<def-lkb> I am going to sleep. Bye.
<BitPuffin> goodnight!
zacts has joined #ocaml
<zamN> mrvn: its a sliding puzzle
<mrvn> zamN: so 4x4 board with number 1-15 and a hole?
<zamN> yep
ahill-89 has quit [Quit: leaving]
dsheets has joined #ocaml
<mrvn> seems to be dead
<mrvn> The server at www.cs.umd.edu is taking too long to respond.
<mrvn> dead after 12. 75-103-237-110.i95.net 0.0% 5 103.3 108.7 102.5 118.6 7.8
<nicoo> zamN: You are welcome
<zamN> mrvn: its wrking for me heh
<zamN> maybe the page is cached for me
<mrvn> zamN: or the problem is between me and the server
<zamN> possibly
<BitPuffin> okay
<BitPuffin> time to code
<mrvn> zamN: your job is to solve the puzzle?
q66 has quit [Quit: Leaving]
<zamN> mrvn: thats part 4
<zamN> but yeah
<mrvn> zamN: lets hope you don't have to solve it for size 8x8 or more.
milosn_ has joined #ocaml
<zamN> mrvn: heh. i'm just working on solving it right now. I'll worry about performance tomorrow.
<mrvn> zamN: the problem gorws exponentially. Solving an 8x8 puzzle in the optimal way needs quite some tricks to complete in any acceptable time.
milosn has quit [Ping timeout: 245 seconds]
yroeht has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
nikki93 has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
<zamN> mrvn: yeah i'm not sure what the limitations are
csakatoku has joined #ocaml
csakatoku has quit [Read error: Connection reset by peer]
mangaba_leitosa has quit [Ping timeout: 252 seconds]
<BitPuffin> Hmm okay so I have the libraries I need installed
<BitPuffin> But how do I make sure ocaml finds them when compiling a program that opens them?
<BitPuffin> (installed with opam)
<BitPuffin> The error I get is unbound module Lwt, but lwt is installed as a dependency of cohttp
<mrvn> ocamlfind?
<mrvn> what build system are you using?
<BitPuffin> mrvn: ocamlc? xD
<BitPuffin> no but I guess ocamlfind
<BitPuffin> since that's what opam uses
<mrvn> That's the compiler, not the build system
<BitPuffin> ocamlfind?
<BitPuffin> I might not be using a build system then
hmmh has joined #ocaml
<mrvn> I like oasis.
<BitPuffin> should I really need a build system to compile a simple file though?
Yoric has quit [Ping timeout: 245 seconds]
<mrvn> BitPuffin: need? no. you can specify all the options directly on the commandline if you like.
<hmmh> hey, I'm interested in learning ocaml and was wondering if there exists a good 'learn you a haskell' type of tutorial that's available -- I know that Real World Ocaml is coming out soon, but wanted something more focused on the basics of the language
<hmmh> Also, any janestreet people here?
<BitPuffin> mrvn: well I don't really like :P
madroach has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
madroach has joined #ocaml
Simn has quit [Quit: Leaving]
csakatoku has joined #ocaml
csakatoku has quit [Read error: Connection reset by peer]
<BitPuffin> mrvn: do I just do opam install oasis?
<Drup> hmmh: you can already read real world ocaml online
<Drup> hmmh: there is no equivalent of "learn you a haskell", at least not with cute little drawings
csakatoku has joined #ocaml
<hmmh> Drup: Ok, thanks. Drawings aside, I really liked the pace and style of learn you a haskell. Someone should do an equivalent for OCaml.
csakatoku has quit [Ping timeout: 240 seconds]
<Drup> hmmh: if you already know haskell, you will need that much tutorial anway
<Drup> you wont*
<BitPuffin> gah
<BitPuffin> I can't seem to figure out how to do basic serving with cohttp xD
<Drup> cohttp is not really a good stating point to learn how to program in ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest54107
<BitPuffin> Drup: Well it does what I need to get done right now
<BitPuffin> well actually I get how to do it
<BitPuffin> just that I can't seem to open the module
<BitPuffin> Cohttp_lwt_unix
<BitPuffin> oh wait
<BitPuffin> I can
<BitPuffin> hm!