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>
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]
<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
<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>
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]
<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
<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?
<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