gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
mdelaney has joined #ocaml
Xizor has quit [Ping timeout: 260 seconds]
Tobu has quit [Ping timeout: 272 seconds]
cdidd has quit [Remote host closed the connection]
mdelaney has quit [Quit: mdelaney]
twittard has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
<thelema> adrien: thanks for more oasis. I'll make sure not to include them
<thelema> adrien: err, make sure not to duplicate them
mdelaney has joined #ocaml
mdelaney has quit [Quit: mdelaney]
Tobu has quit [Ping timeout: 260 seconds]
fantasticsid has joined #ocaml
mdelaney has joined #ocaml
Drup has quit [Quit: Leaving.]
antegallya has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
iago has quit [Quit: Leaving]
ftrvxmtrx has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 248 seconds]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 265 seconds]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
twittard has joined #ocaml
twittard has quit [Client Quit]
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
MaskRay has quit [Quit: leaving]
ousado has quit [Read error: Operation timed out]
ousado has joined #ocaml
bzzbzz_ has joined #ocaml
bzzbzz has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
nhan has joined #ocaml
int_ has joined #ocaml
Tobu has joined #ocaml
int_ has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
int_ has joined #ocaml
ulfdoz has quit [Ping timeout: 272 seconds]
czro has joined #ocaml
EmmanuelOga has quit [Ping timeout: 244 seconds]
ftrvxmtrx has joined #ocaml
czro has quit [Ping timeout: 244 seconds]
twittard has joined #ocaml
co_ajak_cewe_ngi has joined #ocaml
co_ajak_cewe_ngi has left #ocaml []
ankit9 has joined #ocaml
yezariae1y is now known as yezariaely
twittard_ has joined #ocaml
twittard has quit [Ping timeout: 255 seconds]
twittard_ is now known as twittard
pango is now known as pangoafk
ocp has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
eikke has joined #ocaml
ankit9 has quit [Quit: Leaving]
cago has joined #ocaml
czro has joined #ocaml
silver has joined #ocaml
ftrvxmtrx has joined #ocaml
Xizor has joined #ocaml
thomasga has joined #ocaml
djcoin has joined #ocaml
czro has quit [Ping timeout: 255 seconds]
Xizor has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
Xizor has joined #ocaml
edwin has joined #ocaml
dsheets1 has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
dsheets1 has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
ankit9 has joined #ocaml
Kakadu has joined #ocaml
ikaros has joined #ocaml
endre_ has joined #ocaml
Xizor has quit [*.net *.split]
eikke has quit [Ping timeout: 240 seconds]
endre_ has quit [Quit: Leaving]
mdelaney has quit [Read error: Connection reset by peer]
mdelaney has joined #ocaml
Xizor has joined #ocaml
Xizor has quit [*.net *.split]
Xizor has joined #ocaml
sgnb`` is now known as sgnb
antegallya has joined #ocaml
<pippijn> hi
<pippijn> I have this sum type: http://paste.xinu.at/dyI4o/
<pippijn> and I want to get the "location" part from it
<pippijn> is there a better way than writing a pattern match over all variants?
<adrien> I think I'd probably do some Obj stuff (completely unsafe) or, if there will be other similar cases, some code generator
<adrien> another possibility would be that you moved "location" somewhere else
<pippijn> I generate this, already
<f[x]> factor out location
<pippijn> and some code that operates on it
<adrien> like instead of having "ast", having a type "location *ast"
<f[x]> or generate accessors too
<pippijn> I could just add yet another function to get the location
<pippijn> adrien: maybe location * ast is not bad
<adrien> as far as I see (or try to see), you only have the "Nothing" case that doesn't have a location; if you could change that, you could move location out of the tuples
<pippijn> yes, correct
<adrien> (maybe by giving an invalid location if you can't see a better way)
<pippijn> is it generally recommended to add annotations like that?
<adrien> annotations like what?
<pippijn> "like that" as in "in that way"
iago has joined #ocaml
<pippijn> using * types outside instead of putting the annotations into the AST definition
ftrvxmtrx has quit [Ping timeout: 276 seconds]
<pippijn> for example, I will have a typeinfo attached to every node, later
<pippijn> should I have typeinfo * ast or should I put the typeinfo into the ast nodes?
<adrien> you don't really have the choice most of the time and it would be good if you could split the big type a bit more
<f[x]> you can use polymorphic records to have different annotation on different stages
ftrvxmtrx has joined #ocaml
<f[x]> like type 'a t = { extra : 'a; ast : ast; }
<pippijn> hmm
<pippijn> right
cdidd has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
antegallya has quit [Ping timeout: 248 seconds]
<pippijn> f[x]: ast is recursive, so I need to make ast contain 'a t?
<f[x]> probably
cdidd has joined #ocaml
antegallya has joined #ocaml
letrec has joined #ocaml
n25 has joined #ocaml
<pippijn> f[x]: this is making all my code super ugly :
<pippijn> f[x]: everything needs to take care of the extra stuff
<pippijn> :(
<pippijn> I'll keep the location inside and annotate with stuff ad-hoc, I think
<iZsh`> is menhir supposed to support polymorphic variants ?
avsm has joined #ocaml
<iZsh`> pippijn: I recently changed my ast (which looked like yours for the locations) to use a "traits" type, such that I can support location but also type annotation or any annotation
<pippijn> iZsh`: traits?
<iZsh`> a set of trait :P
<pippijn> ah
<pippijn> and trait is a polymorphic datatype?
<iZsh`> type trait = Location of .. .| Ty of .. | … (or you could use polymorhic variants, but menhir didn't let me)
<pippijn> right
<pippijn> ok
<pippijn> that's good
<pippijn> I think I will do that
<iZsh`> that way you can have traits_of_ast
<iZsh`> and then a bunch of helper function to extract a given trait, replace it etc.
<pippijn> keeping stuff outside is too noisy
<iZsh`> also, your ast is very.. flat to my taste, why dont you use stuff like ast * binop * ast etc. ?
<pippijn> yeah..
<pippijn> because it's a parse tree
<iZsh`> well it's an AST :)
<pippijn> it's pretty concrete
<pippijn> it has all the tokens in it
<pippijn> I think I will transform it into an abstract tree, with binop and such
<pippijn> and later transform it back
<iZsh`> why dont you generate an AST directly?
<pippijn> because the tool I get it from expects a parse tree as sexpr
<pippijn> this ocaml program acts as a filter
<iZsh`> well dunno who coded the frontend then, but it's not pretty :P
<iZsh`> I've never seen anyone generating something so flat
<pippijn> the frontend is very basic
<iZsh`> I dont really understand what the tool gained by doing so
<pippijn> it looks like this: http://paste.xinu.at/UuN1/
<pippijn> iZsh`: it's my tool :)
<pippijn> and I'm just experimenting
<pippijn> I already have a proper parser and everything I need
<pippijn> this time, I wanted to see what I can do with a parse tree instead of an AST
<iZsh`> what do you gain from it?
<pippijn> iZsh`: the advantage is that I can output the original source 1:1
<iZsh`> I can too
<pippijn> because I know the original location of every token
<iZsh`> if your ast is properly defined you can output the original source
<pippijn> you don't know where the binop was
<iZsh`> oh you mean, like an exact location, with the space and all
<pippijn> yes
<iZsh`> why would it matter?
<pippijn> I don't know :)
<iZsh`> (actually binop could still have a trait, but mehhhh :P )
<pippijn> I'm just doing this for fun
<iZsh`> a real AST is easier to work with imho :)
<pippijn> sure
<pippijn> but I've done that more times than I can remember
endre_ has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
endre_ has left #ocaml []
avsm has quit [Quit: Leaving.]
iago has quit [Quit: Leaving]
iago has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
oriba has joined #ocaml
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 248 seconds]
eikke has quit [Read error: Operation timed out]
oriba_ has quit [Quit: oriba_]
maufred_ has joined #ocaml
<Ptival> I have three levels of work (a whole executable, a source file, and a particular function), and I need to process them while some information flows
<Ptival> the problem is, there are some pieces of information that are global to the executable, and need to flow through everything
<Ptival> but there are some other that are specific to a "file", or a "function"
maufred has quit [Ping timeout: 272 seconds]
<Ptival> I tried to have a record for exe_info, a record for file_info that include an exe_info, and a record for fun_info that included a file_info
<Ptival> but then when I need to access/update the exe_info while processing a function, I have to cross all these indirections...
int_ has quit [Ping timeout: 252 seconds]
<Ptival> {my_fun_info with file_info = { my_fun_info.file_info with exe_info = { my_fun_info.file_info.exe_info with field = ... } } }
<Ptival> is there something I _should_ use?
<Ptival> the easiest solution right now seems to have exe_info, (exe_info * file_info), and (exe_info * file_info * func_info)
vivanov has joined #ocaml
vivanov has quit [Client Quit]
<adrien> can anyone load https://forge.ocamlcore.org/projects/jingoo/ ? and it seems the forge's "new project" stuff is broken / not updating
vivanov has joined #ocaml
vivanov has quit [Client Quit]
<pippijn> You've been redirected to this login page because you have tried accessing a page that was not available to you as an anonymous user.
int_ has joined #ocaml
eikke has joined #ocaml
avsm has joined #ocaml
vivanov has joined #ocaml
<vivanov> when using output channels, i need to flush frequently otherwise the channels will occupy all memory, right ?
<Drakken> Ptival two questions: (a) is accessing really so bad? and (b) is there some reason you can't just write a constructor for updates?
<djcoin> adrien: I saw jingoo is the port of jinja of ocaml, you are making an OCaml browser and so on. Those are great projects, how do you manage do work on those ?
<djcoin> s/do/to
<Ptival> Drakken: (a) I don't understand your question, (b) in my representation, I would actually need 3 updaters per field of the exe_info record (depending on from what level you try to update), etc.
<adrien> djcoin: I don't do anything with jingoo: I saw it mentionned in the caml weekly news which in turn fetched it from planet.ocamlcore.org
<djcoin> oh ok
<adrien> I wanted to see more but ...
<djcoin> adrien: and well, im still curious, do you program in OCaml for your living ?
<djcoin> :)
<adrien> no, although I wish; I'm a student who is taking some holidays :P
<djcoin> adrien: :) nice ! Why did you choose ocaml ?
<djcoin> may i ask ! :)
<pippijn> where can you find ocaml jobs?
<pippijn> I started ocaml yesterday
<pippijn> so I don't want to start a job in it
<pippijn> but I like it so far
<Drakken> Ptival (a) I mean all you have to write is fun_info.file_info.exe_info.field. no withs or double references to fields.
<djcoin> For myself, I started Ocaml a few days ago ; but its because I feel it may be the right way to go rather than Python, JavaScript /Node.js
<adrien> djcoin: I started it because of studies
<pippijn> I started it because of pattern matching
<Ptival> Drakken: I need updating
<adrien> I think what really motivated me was mldonkey: few developpers; great software; outperforms the competition by a huge margin
<pippijn> first I tried scheme, but it was incredibly slow and died for nesting deeper than 244
<adrien> and stable and fast
<pippijn> (mz scheme)
<adrien> since I had liked it and had also enjoyed the static typing, I started using it for my own stuff
<djcoin> And well, I want to have time to develop in OCaml to use it in Web stuff or other thing; Node.JS is great, will be hard to compete with in the Web sphere, but well, javascript even if I do like it a lot, will not be a substainable solution anyway
<djcoin> All right
<djcoin> And what is your goal ? Make a browser in OCaml ?
<adrien> my goal is that a tool I use all-day long and everyday doesn't suck like all browsers currently available and alive do :P
<pippijn> adrien: how does a donkey outperform other donkeys?
<pippijn> in what way?
<Drakken> Ocaml is the best language in the world for large-scale software development.
<pippijn> I don't quite understand its module system, yet
<pippijn> I mean, I don't get it at all
<pippijn> but I've read 5% of 1 tutorial, so that's ok
<adrien> emule had been plagued by security issues, it used more memory, cpu and didn't have the same server-client modle (mldonkey runs headless and graphical clients connect to it)
<adrien> and with far fewer developpers, mldonkey had more features, was more stable and was faster
<pippijn> ah
<pippijn> making a program in ocaml more stable than a program in C is almost default, I think
<adrien> pippijn: I think that it takes some time before the module system starts appearing as useful
<adrien> emule is worse: C++ :P
<adrien> (iirc)
<pippijn> C++ can be better than C
<pippijn> but is generally not
<pippijn> but not because of the language
<pippijn> but rather because of the developers
<adrien> I'm wondering if they weren't doing C-style C++
<flux> wish donkey was more modular. I once tried to pinch its bittorrent parsing functions out of it, it was a pain in the behind.
<djcoin> Drakken: im okay with that ! no Gc yet so good performance + type checking ; really awesome for large scale dev
maufred_ has quit [Ping timeout: 244 seconds]
<djcoin> GC i mean
<djcoin> s/no//
maufred has joined #ocaml
<djcoin> I want hard to program in ocaml
<pippijn> adrien: how well do you know ocaml?
<djcoin> ahem; lets return to django/python
<pippijn> do you know how it optimises the code?
<pippijn> do you know roughly what machine code comes out of your ocaml code?
<adrien> half-well; there's still a lot of things that I don't know; as for optimization: almost nothing but the generated code is not dumb either
<adrien> and you have the -S switch to ocamlopt to look at the generated assembly ;-)
ankit9 has quit [Quit: Leaving]
<pippijn> I can always objdump the executable
<pippijn> I know what machine code my C++ compiler generates for the things I do
<pippijn> and I know what C code is executed for things in perl
<Drakken> If you really need runtime performance, Mlton is supposed to be good.
<adrien> the main rule with ocaml is that it doesn't go to great lengths to optimize your code
<pippijn> I like to know what things cost
<adrien> so you get what you write
<pippijn> so when I do AST transformations and untouched nodes are copied, they are copied
<pippijn> so every mutating run through the AST will clone the entire tree
<adrien> it will share when you write code that shows there is something to share
n25 has quit [Quit: Leaving]
<flux> pippijn, hmm, of course when you copy roots of whole trees, you only copy the root, not the whole tree
<pippijn> flux: I don't do that
Tobu has quit [Ping timeout: 272 seconds]
<pippijn> I actually clone the entire tree every time
<flux> pippijn, well, at least 'loc' contents are shared, unless it's a plain integer ;)
<pippijn> that's a record, yes
Tobu has joined #ocaml
<pippijn> how should I do this?
<pippijn> better to have mutable fields?
<flux> I would prefer immutable structures for those
<flux> because it appears you are walking through everything in any case
<pippijn> yes
maufred_ has joined #ocaml
maufred has quit [Ping timeout: 276 seconds]
vivanov has quit [Quit: leaving]
Kakadu has quit [Quit: Page closed]
yroeht has quit [Ping timeout: 272 seconds]
smondet has joined #ocaml
yroeht has joined #ocaml
<pippijn> flux: it take 7.3 seconds to load the s-expressions (sexprlib), turn them into ocaml objects, turn them back into s-expressions and print them
<pippijn> flux: all that + doing 3 transformations that copy all the nodes takes 7.4 seconds
<iZsh`> bytecode or native?
<pippijn> native
<pippijn> it's a large file
<flux> pippijn, how many cpu seconds?
<flux> 7.3?
<pippijn> ./xform >| /dev/null 6.99s user 0.38s system 99% cpu 7.433 total
<iZsh`> i used to look at ocaml's assembly a lot. i find frustrating there isn't a wiki about it :P
<thelema> iZsh`: start one
<flux> pippijn, perhaps you can make use of gprof to find out the easiest points to optimize
<iZsh`> thelema: i'm the worst sysadmin ever :P
<pippijn> I do almost nothing
<flux> pippijn, I'm however guessing it's not the tree walking, but rather the s-expression manipulation..
<thelema> iZsh`: so don't host it yourself.
<thelema> iZsh`: maybe ask for some space in the inria wiki
<pippijn> flux: loading takes 2.5 seconds
ikaros has quit [Quit: Ex-Chat]
<thelema> err, not inria wiki, gallium wiki
<iZsh`> thelema: what i meant is that it would take me forever because then i would start tuning the wiki template and stupid thing like that instead of adding content :P
<pippijn> no wait
Tobu has quit [Ping timeout: 272 seconds]
<thelema> you wouldn't have access to the templates, just teh content
<pippijn> reading them takes 2.0 seconds
<thelema> pippijn: is the serialization/deserialization of sexplib too slow for you?
<iZsh`> years ago when i checked, inner "let … in" where not optimized out of a loop even if it is a constant value for instance
<pippijn> turning the loaded sexprs into ocaml objects takes 0.5 seconds
<thelema> iZsh`: correct, ocaml doesn't do hoisting
<pippijn> then running the transfomations takes 0.3 seconds
<pippijn> making sexprs out of the transformed code takes 0.9 seconds
<pippijn> printing them back takes a lot of time, but I'm using output_hum
<pippijn> with output_mach, the whole thing takes 5.9 instead of 7.4 seconds
<iZsh`> where is the time going then?
<iZsh`> you're missing 4s
<flux> perhaps the sexplib output functions are suboptimal, doing string concatenation etc?
<pippijn> 5.8 if the input is not indented
<adrien> you're using "with sexp" with sexplib?
<adrien> .syntax
<pippijn> no syntax
<pippijn> I generated it myself
<adrien> generated or wrote?
<pippijn> generated
<pippijn> with a script
<pippijn> so I might as well have written it
<pippijn> but I'm lazy
<adrien> hmmm
<flux> sign of a true software developer ;)
<adrien> why not sexplib.syntax?
<pippijn> this has all the generated functions
<adrien> I don't think that ocaml likes huge match statements
<adrien> it's going to be a huge if ... then ... else if ... then ... else if ...
<pippijn> I think especially the string matches will be bad
<iZsh`> w
<adrien> I can't say this is why your code is slow but it doesn't look terribly good to me; plus it's hard to reread
<pippijn> maybe it's faster if I sort them by probability
<iZsh`> cant you just profile the code?
<flux> but, it was the transformation that was the fastest piece of all?
<adrien> pippijn: it will definitely be
<iZsh`> adrien: do you know that for a fact?did you look at the assembly?
<pippijn> flux: yes, that's what I wanted to know, and that's nice
<pippijn> the sexpr_of_pt should be a simple switch
<iZsh`> cant remember how it looked like when i checked years ago, but i didnt keep a bad impression about the generated code for the pattern matching
<pippijn> since the data type is limited
<pippijn> pt_of_sexp is a lot of string compares
<flux> pippijn, if you really want speed, perhaps it would be faster to directly generate the serialized sexp string output instead of first creating sexp and then creating the string..
<pippijn> flux: yeah
<iZsh`> IIRC it was doing if then… for small matches and turned it into table for large ones, but maybe i mis-remember
<pippijn> flux: but I don't really want speed, so it's ok
<pippijn> for now
<thelema> pattern matching can take a while to compile, but is generally pretty good. that said, there's some tricks that I doubt the ocaml compiler uses for string matching that could be done here.
<pippijn> I'm still learning, not optimisin
<flux> another would be to use processes in a pipelining fashion. too bad threads won't help here..
<pippijn> thelema: it could make a perfect hash :)
<iZsh`> pippijn: if you really want speed you need to profile the code, otherwise you're just blindly optimizing stuff which might not even be the issue
<thelema> s/is generally pretty good/produces good runtime code/
<pippijn> iZsh`: sure
<flux> I mean, to make use of the multiple CPUs you probably have
<pippijn> I'm not really optimising
<iZsh`> pippijn: you're still trying to understand where the time is going
<adrien> iZsh`: matches over a variant with something like 15 values or less is done with a jump and otherwise it's the if then else if ... stuff if I read the assembly well a couple of months ago
<thelema> pippijn: there's some trie variants that do really well
<pippijn> adrien: it makes jump tables for *few* elements?
<iZsh`> adrien: funny, I remember the opposite, but I checked like 10 years ago
<pippijn> that doesn't make sense
<iZsh`> exactly :)
<pippijn> I'm pretty sure gcc generates jump tables for many elements (in a small range)
<adrien> hmmm, I don't remember well; I only remember the limite of 15 or so since I was looking for something completely different
<thelema> drat, I can't remember the name of the technique, but there was some lexer that generated code to match a set of strings by finding specific characters at specific offsets that could be tested for to minimize the number of character comparisons needed. It would build a series of nested if statements to implement this logic
iZsh` is now known as iZsh
ulfdoz has joined #ocaml
agarwal1975 has joined #ocaml
emmanuelux has joined #ocaml
jave has quit [Quit: ZNC - http://znc.in]
Tobu has joined #ocaml
jave has joined #ocaml
Drup has joined #ocaml
silver has quit [Remote host closed the connection]
ftrvxmtrx has quit [Quit: Leaving]
letrec has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 260 seconds]
cago has quit [Quit: Leaving.]
avsm has quit [Ping timeout: 272 seconds]
yroeht has quit [Ping timeout: 245 seconds]
ulfdoz_ has joined #ocaml
haelix_ has joined #ocaml
ousado_ has joined #ocaml
agarwal1975 has quit [Ping timeout: 245 seconds]
diml has quit [Ping timeout: 245 seconds]
haelix has quit [Ping timeout: 245 seconds]
ulfdoz has quit [Ping timeout: 272 seconds]
ulfdoz_ is now known as ulfdoz
diml has joined #ocaml
ousado has quit [Ping timeout: 245 seconds]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
yezariae1y has joined #ocaml
yezariaely has quit [Ping timeout: 245 seconds]
patronus_ has quit [Ping timeout: 245 seconds]
patronus has joined #ocaml
yroeht has joined #ocaml
agarwal1975 has joined #ocaml
iZsh has quit [Ping timeout: 245 seconds]
Tobu has joined #ocaml
iZsh has joined #ocaml
yroeht has quit [Ping timeout: 272 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ak0s has joined #ocaml
ak0s has quit [Remote host closed the connection]
djcoin has quit [Quit: WeeChat 0.3.2]
agarwal1975 has joined #ocaml
mdelaney has quit [Quit: mdelaney]
ontologiae has quit [Ping timeout: 252 seconds]
ocp has quit [Ping timeout: 252 seconds]
ftrvxmtrx has joined #ocaml
mdelaney has joined #ocaml
iago has quit [Quit: Leaving]
EmmanuelOga has joined #ocaml
pangoafk is now known as pango
twittard has quit [Quit: twittard]
Tobu has quit [Ping timeout: 272 seconds]
iago has joined #ocaml
twittard has joined #ocaml
Tobu has joined #ocaml
nhan has quit [Ping timeout: 245 seconds]
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
twittard has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
twittard has joined #ocaml
zorun has quit [Read error: Connection reset by peer]
zorun has joined #ocaml
mdelaney_ has joined #ocaml
mdelaney has quit [Ping timeout: 245 seconds]
mdelaney_ is now known as mdelaney
eikke has quit [Ping timeout: 272 seconds]
agarwal1975_ has joined #ocaml
agarwal1975 has quit [Ping timeout: 260 seconds]
agarwal1975_ is now known as agarwal1975
ikaros has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
eikke has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
cyphase has quit [Quit: http://www.cyphase.com/]
eikke has quit [Ping timeout: 248 seconds]
agarwal1975 has joined #ocaml
iago has quit [Quit: Leaving]
eikke has joined #ocaml
cyphase has joined #ocaml
eikke has quit [Ping timeout: 255 seconds]
yroeht has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
otk_ has joined #ocaml
otk has quit [Ping timeout: 244 seconds]
ocp has joined #ocaml
commonlisp has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
ocp has quit [Ping timeout: 244 seconds]
Epelii has quit [Ping timeout: 252 seconds]
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
Epeli has joined #ocaml
yroeht has quit [Ping timeout: 272 seconds]
ontologiae has quit [Ping timeout: 272 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
yroeht has joined #ocaml
ontologiae has joined #ocaml
thomasga has quit [Quit: Leaving.]
<Ptival> ok, so how (im-)-mutable are OCaml objects?
<_habnabit> pretty dang {im,}mutable ??
<Ptival> can I update an object as I would a record?
<_habnabit> sure, there's syntax for that
<adrien> val mutable foo = 42
<adrien> method weeee () = foo <- 512
<adrien> and you have syntax for functional updates too
<Ptival> I want functional updates
<Ptival> something like
<Ptival> let objmod = obj#modify in (obj, objmod) (* the pair has the old and the new *)
<adrien> see the official documentation, it's not very hard to find
<adrien> and syntax is something like {< ... >} iirc
<Ptival> oh indeed
<Ptival> but it does a full copy right?
<Ptival> or is there still sharing?
<adrien> I think there's sharing (but the doc should point that out too :-) )
edwin has quit [Remote host closed the connection]
<Ptival> "returns a copy of self"
ontologiae has quit [Ping timeout: 260 seconds]
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
letrec has joined #ocaml
mdelaney has quit [Quit: mdelaney]
ikaros has quit [Quit: Ex-Chat]
Xizor has quit [Ping timeout: 260 seconds]
agarwal1975 has quit [Quit: agarwal1975]
letrec has quit [Ping timeout: 244 seconds]
smondet has quit [Ping timeout: 244 seconds]
yezariae1y is now known as yezariaely
int_ has quit [Ping timeout: 252 seconds]
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
mdelaney has joined #ocaml