flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<mrvn> pierpa: one violates the value restriction and the other doesn't.
<pierpa> I guessed so :) but why
<mrvn> pierpa: without `B the type of v is plain [`A]
<mrvn> and I think that isn't even a value restriction. Just plain indetermined type
<pierpa> hmmm
<mrvn> Drup: why did you think this is a value restriction?
<pierpa> maybe because without the ref it does not happen
<mrvn> # let (v : [`A | `B] ref) = ref `A let f x = match !v with | `A -> 1 | `B -> 2;;
<mrvn> val v : [ `A | `B ] ref = {contents = `A}
<mrvn> val f : 'a -> int = <fun>
<pierpa> hmmm
<mrvn> The function f does not restrict the type of v enough to infer an exact type so it complains that it doesn't know what the type should be.
<pierpa> hmmm. I'm still not convinced
<pierpa> let me experiment more...
<Drup> indeed, I read the error a bit too quickly
<Drup> it's just subtyping
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
fUD has joined #ocaml
<fUD> Hello
<fUD> I notice the link in the topic doesn't even resolve - http://1149.fr/ocaml-mooc
orbifx-m2 has joined #ocaml
<pierpa> It's old. The MOOC finished.
orbifx-m has quit [Read error: Connection reset by peer]
orbifx-m has joined #ocaml
gpietro_ has joined #ocaml
sh0t has quit [Read error: Connection reset by peer]
orbifx-m2 has quit [Ping timeout: 264 seconds]
zRecursive has joined #ocaml
<fUD> Thanks - I'll have a browse.
<pierpa> unfortunately, as far as I can see, the materials of the mooc are not accessible anymore
<fUD> Yes, you're right.
zRecursive has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
FreeBirdLjj has joined #ocaml
scarygelatin has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
copy` has joined #ocaml
rossberg has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
rossberg has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
connorjacobsen has joined #ocaml
uriznik has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
connorjacobsen has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
ril has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
pierpa has quit [Ping timeout: 250 seconds]
johnelse has quit [Ping timeout: 240 seconds]
johnelse has joined #ocaml
gpietro_ has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jonasen has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 250 seconds]
uriznik1 has joined #ocaml
uriznik1 has left #ocaml [#ocaml]
uriznik has quit [Ping timeout: 276 seconds]
jimt_ is now known as jimt
Algebr`` has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SomeDamnBody has quit [Remote host closed the connection]
lokien has quit [Ping timeout: 250 seconds]
copy` has quit [Quit: Connection closed for inactivity]
unbalancedparen has quit [Quit: WeeChat 1.5]
tmtwd has joined #ocaml
lokien has joined #ocaml
jonasen has joined #ocaml
Algebr`` has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
Simn has joined #ocaml
lolisa has joined #ocaml
lolisa|2 has joined #ocaml
lolisa|2 has quit [Client Quit]
lolisa|3 has joined #ocaml
lolisa|3 has quit [Client Quit]
tmtwd has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jonasen has quit [Ping timeout: 260 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
tmtwd has joined #ocaml
jonasen has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
dexterph has joined #ocaml
AltGr has joined #ocaml
dch has quit [Ping timeout: 264 seconds]
dsheets has joined #ocaml
dch has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
dsheets_ has joined #ocaml
FreeBirdLjj has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
jwatzman|work has joined #ocaml
larhat has joined #ocaml
connorjacobsen has joined #ocaml
<pitastrudl> i have a class that uses a type to create a binary tree, and im trying to make a function that deals with the objects made with the class
<pitastrudl> how do i tell the function to accept an object like that?
<pitastrudl> the expression is 'a bin_tree but expects 'b tree
<def`> can you share some code?
<pitastrudl> sure, sec
connorjacobsen has quit [Ping timeout: 250 seconds]
jonasen has quit [Ping timeout: 250 seconds]
<def`> Your method gets seems to return the tree from the object
<pitastrudl> yeah im trying to use it for another function which doesnt seem to work
<def`> So the function that doesn't work is not part of your example :D ?
<pitastrudl> updated the lnik
<pitastrudl> the bottom one is one that im trying to get to work too
<pitastrudl> the one before works, but does not work for the given object
<def`> one remark: the two last lines are equality checks, not binders
<def`> in your Empty branch, you return an object, "new drevo ..."
<def`> in the Node branch, you return a tree, you should wrap it too in an object
<def`> ahhh
<def`> ok the two last lines are field init, my bad
<pitastrudl> field init?
<pitastrudl> i mean i just indeted those
<pitastrudl> becuase my screen is too small
<pitastrudl> to fit the whole line
<def`> yeah ok with indentation it makes sense
<def`> new drevo ("lol", Node { ... });;
<pitastrudl> so i DO have to parse it an object node?
<pitastrudl> hm
<aggelos_> hmm
<aggelos_> I'd like to invoke Utop_main.interact as a fancy debugger at some arbitrary point in my programs execution
<aggelos_> but I'd rather not build my program as bytecode (performance matters)
<aggelos_> is that even possible?
<aggelos_> and, if so, is it supported? ;-)
<def`> there is a native top level, not utop, partially supported...
<def`> If you have good knowledge of runtime internals, it should be possible :D
orbifx has joined #ocaml
dario2 has joined #ocaml
jonasen has joined #ocaml
two_wheels has joined #ocaml
silver has joined #ocaml
algoriddle has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<pitastrudl> i think i found my answers to the problems, i just defined more methods that work with the type structure, which is a binary tree
<pitastrudl> so instead of functions i have methods
<pitastrudl> maybe ill just then make functions that use methods...so its a "function" then
<pitastrudl> ¯\_(ツ)_/¯
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 250 seconds]
AltGr has left #ocaml [#ocaml]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
dsheets_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
rand__ has joined #ocaml
<pippijn> is gasche not on IRC anymore?
<pippijn> companion_cube: ^
<reynir> I see gasche was in here friday accordng to my logs
<pippijn> okay, cool
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mfp_ has quit [Read error: Connection reset by peer]
silver_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
lolisa has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
silver has quit [Ping timeout: 260 seconds]
silver_ is now known as silver
FreeBirdLjj has quit [Remote host closed the connection]
<aggelos_> def`: hmm ok
<aggelos_> def`: doesn't sound too encouraging, tbh
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has quit [Remote host closed the connection]
sdothum has joined #ocaml
<companion_cube> o/ pippijn
<companion_cube> gasche doesn't come here often, probably because he tries to work :p
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has quit [Remote host closed the connection]
AltGr has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
copy` has joined #ocaml
troydm has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
sepp2k has joined #ocaml
<Leonidas> companion_cube: I guess once Reason adopts an interator, that's what we'll be using in OCaml land
<companion_cube> if it's Core's iterator, there's little chance batteries or containers adopts it
<Leonidas> kinda like JSC pushed the error monad into the distribution
<companion_cube> unless its definition is migrated into the stdlib
<Leonidas> yes, exactly what I think would happen
<zozozo> companion_cube: what's Core's iterator ?
<pippijn> companion_cube: work? preposterous!
<pippijn> nothing is more important than idling and chatting on IRC
<companion_cube> zozozo: Core.Sequence, look at the definition
<Drup> Leonidas: jsc didn't push the error monad into the distribution, it was already adopted by all the standard library *and* bunzli ...
<companion_cube> in several isomorphic definitions, yeah
<companion_cube> which is not the case for iterators
<companion_cube> :/
<Drup> yes
<Leonidas> didn't the JSC definition "win out" at the end?
<Drup> No
<Drup> everyone had the same ...
<companion_cube> well, batteries' definition was not used, indeed
<companion_cube> but they were all isomoprhic, it was just a matter of naming the constructors
<Drup> and Ok/Error was more common than Ok/Bad, iirc
<companion_cube> yeah
<companion_cube> `Ok | `Error, also
<dario2> Hey Drup! In Eliom6, Eliom_registration.Html.register_post_coservice et al are gone. Are they all subsumed by Eliom_registration.Html.create/register?
<Drup> yes
<dario2> I've opened a ticket, because the new API forces the duplicate declaration of GET parameters: https://github.com/ocsigen/eliom/issues/311
<dario2> (Unless I'm missing something)
<Drup> one function to register them all and on the ocsigen server bind them.
<dario2> Now say that in the black speech of Mordor...
<Drup> dario2: you'll have to wait for vasilisp's answer on that one
<dario2> Okay. I'm also wondering how Eliom knows that what I want is a co-service.
<dario2> In previous versions that was explicit.
<companion_cube> Leonidas: anyway, the choices made by Reason will not automatically trigger a consensus among other OCaml users
<Leonidas> companion_cube: no, but they might swap opinions if Reason gets big enough.
<Leonidas> *sway
<companion_cube> maybe in a few years, who knows
<dario2> Since we're talking about Reason...
BitPuffin has joined #ocaml
<dario2> Did anyone get the impression that while most changes are actually reasonable...
<pippijn> http://ezyang.com/papers/ezyang15-cnf.pdf <- this seems interesting and pretty easy to implement in ocaml as well
<Leonidas> companion_cube: so sequence expressions are basically like Haskells List Comprehensions?
<companion_cube> in F#? yeah, seems so
<companion_cube> it's cool but not indispensable, thanks to |>
<dario2> The change to structural/physical equality operators is just a disaster waiting to happen.
<pippijn> somehow I rarely find myself using list comprehensions in haskell
<pippijn> much more in python actually
<Drup> dario2: I totally agree
<Drup> I have been saying that since I saw it
<Leonidas> pippijn: I kinda prefer them in Haskell because they nest better. in python the way they nest is kinda weird
<pippijn> that's true, but I still don't use them as much in haskell
<Drup> pippijn: probably because you don't need them
<companion_cube> I wish there was a syntax with the bare minimum of changes compared to the standard syntax
<pippijn> Drup: indeed
<Drup> companion_cube: the revised syntax :3
<companion_cube> no
<companion_cube> I said the minimal amount of changes
<Drup> </troll>
<companion_cube> not their crazy list notation
<companion_cube> and afaik, the revised syntax doesn't handle recent aspects of the language like labels or GADTs... does it?
<Drup> I doubt it does
<dario2> Moral of the story: if you want to change a language's syntax, it's not enough for the new one to be marginally better than the old.
<dario2> Does someone actually use the revised syntax?
<companion_cube> I'm not sure the revised syntax is "better" than the vanilla one
<dario2> I never really got into the revised syntax.
FreeBird_ has joined #ocaml
<dario2> My point about changes pertained to Reason: it may be better in some aspects, but that's not enough to convince me to switch.
<Drup> dario2: you are not the target
<dario2> Besides, I actually like OCaml's good old syntax
<dario2> Drup: Yeah, I realise that.
<Drup> but regardless of changes in syntax
<Drup> the (in)equality operator changes are ... really not a good idea
<dario2> Drup: Yeah, that change was just a brain fart of the Reason team.
<dario2> Why, oh why?!
<Drup> dario2: to copy javascript's operators
<dario2> Yes, but it's not like Javascript is a paragon of virtue when it comes to the equality operators...
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<dario2> In fact it may be the most messed up language out there in that regard...
FreeBird_ has quit [Remote host closed the connection]
<Drup> that's not the point, it's to copy the syntax
<Drup> but anyway, it's a bad idea to mess with symbol tables
<Drup> it's just asking for disasters
<dario2> And it makes Reason code harder to read for OCaml folks and vice-versa.
<zozozo> there's an obvious solution: do not use equality in programs, ever, :p
<companion_cube> heh
<companion_cube> it's not that far from what I do, actually
<zozozo> ^^
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pierpa has joined #ocaml
sgnb has joined #ocaml
<tautologico> ocaml programmers are not the target demographic for reason :)
rgrinberg has joined #ocaml
Denommus has joined #ocaml
sh0t has joined #ocaml
Tatsh has left #ocaml ["Do whatever you like"]
<dario2> Are there any hard facts regarding Reason's uptake? I can see only three questions tagged "reason" on StackOverflow, for instance.
<flux> if anything, they should have chosen := for the assingment operator ;)
sh0t has quit [Remote host closed the connection]
Ravana has quit [Quit: Goodbye for now!]
jonasen has joined #ocaml
Ravana has joined #ocaml
sh0t has joined #ocaml
<dario2> flux: Pascal FTW!
<flux> yeah!
<flux> also didn't vhdl have that. probably modula3 as well. ada?
<dario2> IIRC, the Modula* languages were designed by Niklaus Wirth, the guy also behind Pascal.
<dario2> Therefore, not surprising that the assignment operator would be the same.
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
unbalancedparen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
dario2 has quit [Quit: Konversation terminated!]
<sh0t> guys how do I start the gnome audio applet on another window manager?
<sh0t> what's the command for it?
<sh0t> i installed indicator-sound but i cannot run it
wiredsister has joined #ocaml
wiredsister has quit [Client Quit]
wiredsister has joined #ocaml
wiredsister has quit [Client Quit]
wiredsister has joined #ocaml
<flux> might be you're in the wrong channel.. :)
<orbifx> this channel is explicit for camel rearing
two_wheels has joined #ocaml
struk|work has joined #ocaml
kushal has joined #ocaml
kolko has quit [Ping timeout: 276 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
connorjacobsen has joined #ocaml
ril has joined #ocaml
cross has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
dexterph has quit [Ping timeout: 276 seconds]
<struk|work> hello ocamlers..happy monday :)
<companion_cube> hi struk|work
Kakadu has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 240 seconds]
ril is now known as ril[away]
xitrium has joined #ocaml
buddyholly has quit [Ping timeout: 246 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sh0t> hi guys can some one tell me why the first version doesn't do what I want? while the second does? what i don't undersatnd is why do i need a when clause in that pattern match
sh0t has quit [Quit: Leaving]
sh0t has joined #ocaml
gasche has joined #ocaml
<gasche> (hi)
<sh0t> took me some time to find that bug :/
<reynir> hi gasche
xitrium has quit [Remote host closed the connection]
dsheets has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
dsheets has joined #ocaml
buddyholly has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<def`> sh0t: you woud like pattern matching to also compute equality
connorjacobsen has quit [Ping timeout: 240 seconds]
<def`> in OCaml, pattern matching will only bind value to fresh names, so you are just shadowing x
Denommus has quit [Ping timeout: 264 seconds]
<sh0t> oh def` ok thanks
<sh0t> so pattern mathcing a) doesn't compute equality and b= pattern matching only binds fresh names.
<def`> yes
<def`> (one justification is that there is not a single valid notion of equality, it would be a bit arbitrary to stick to a specific one)
AltGr has left #ocaml [#ocaml]
slash^ has joined #ocaml
AltGr has joined #ocaml
<sh0t> yes def` I understand. Is this 'issue' of equality related to the fact that we functions are values as well? If we had only "simple" values then equality would be easier to define?
<def`> sh0t: it is a bit deeper.
<def`> If you consider syntactic equality (values made from the same constructor are equals)
<def`> then yes it is easy to define, but you have to stick to pure values.
<sh0t> that would make C(4) = C(5)
<def`> And recursively*
<sh0t> for C a constructor
<sh0t> ?
<sh0t> ah ok
<def`> C x = C y iff x = y
<sh0t> sorry if this is a stupid question but integers in ocaml are implemented with constructors?
<def`> No they are not
<sh0t> ok
<def`> But they could.
<sh0t> why isn't this kind of structural equality a good choice?
<def`> The problem is if you consider mutations.
<def`> Are values that were equal but could change still equal?
<sh0t> i see
<def`> And values that can have a coarser grained notion of equality (not algebraic ones)
<def`> E.g an abstract set
<def`> You can consider two sets to be equal if they have the exact same representation, but if you represent them with, e.g. binary search tree, you can have multiple balancing that represents the same set.
<def`> So the definition of equality depends on what you are looking at :).
<sh0t> i see intuition would tell me that i shoudl consider equal to set only if the have the same elements...but i see how representation might be important
<sh0t> *two
<sh0t> sets
ncthom91 has joined #ocaml
<sh0t> ok def` thanks
<def`> You are welcome :)
<def`> (And then you can generalize to other features: lazy values, infinite values, functions, more complex features of the type system, ...)
circ-user-vkmXT has joined #ocaml
sgnb has quit [Remote host closed the connection]
al-damiri has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jonasen has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
dsheets has quit []
shinnya has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
orbifx-m2 has joined #ocaml
xitrium has joined #ocaml
orbifx-m has quit [Ping timeout: 250 seconds]
tane has quit [Quit: Verlassend]
connorjacobsen has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
sh0t has quit [Remote host closed the connection]
tane has joined #ocaml
rgrinberg has joined #ocaml
sh0t has joined #ocaml
connorjacobsen has quit [Ping timeout: 244 seconds]
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
<pitastrudl> could anyone show me a piece of ocaml code and how it's nice to do comments so it looks nice
<pitastrudl> i feel like im not really commenting it very good
<pitastrudl> becuase the comments look like they mix in with the code too much
<pitastrudl> ¯\(°_o)/¯
orbifx-m has joined #ocaml
Algebr has joined #ocaml
orbifx-m has quit [Ping timeout: 246 seconds]
connorjacobsen has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
seangrove has joined #ocaml
orbifx-m has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
maurer has joined #ocaml
<maurer> So, I'm trying to upgrade a library I'm using, and the new one depends on ppx_jane
<maurer> ppx_jane uses js_build_tools, which overrides the default oasis install behavior to use opam-install
<maurer> However, opam-install does not function correctly on my machine (and has not for years)
<maurer> Any ideas on what I should do to try to get packages using js_build_tools to install the old way?
tane has joined #ocaml
<Drup> pitastrudl: I'm not sure I understand your question
kolko has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
<pitastrudl> Drup: comments in the code, best practices on how to format them, etc
<pitastrudl> if there are any hints or tips, ill take them
<companion_cube> hmm, just write the comment above the piece of code to comment? same indentation level
sternenseemann has quit [Quit: Changing server]
<pitastrudl> yeah
Kakadu has quit [Quit: Page closed]
<def`> actually, I often find me in the same situation as pitastrudl: I feel OCaml comments are good for disabling pieces of code, not putting textual information
<pitastrudl> i feel like they blend too much with the code
<companion_cube> what would work better for you?
<pitastrudl> or maybe i just need a better color highlighting syntax
<pitastrudl> using eclipse atm
<Algebr> spacegray theme and solarized-dark are pretty good themes in emacs
<def`> for me syntax highlighting helps a bit, single line comment would be better
<Algebr> single line comment -> Use reason
<companion_cube> http://vrac.cedeela.fr/2016-06-06-201845_542x445_scrot.png for me it's pretty ok as it is
TheLemonMan has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xitrium has quit [Remote host closed the connection]
A1977494 has quit [Read error: Connection reset by peer]
A1977494 has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
xitrium has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
seako has quit [Quit: Connection closed for inactivity]
xitrium has quit []
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<pitastrudl> def`: if you're interested, regarding the first question i had about functions, i finished it :D!
<pitastrudl> me and my schoolmates worked on it for quite some time
algoriddle has quit [Ping timeout: 264 seconds]
<pitastrudl> it's a binary tree, where you add/delete/merge trees
<pitastrudl> add elements or remove them
<pitastrudl> the problem was that i was trying to pass objects to functions that didnt recognize them
<pitastrudl> they always expected a normal binary tree, and not one made from the class
<pitastrudl> so what i did was just put the functions into methods and called methods that had the functions
<pitastrudl> also made 1 function that used methods then later on
<pitastrudl> so that was pretty much what was making me having no progress at all
<Drup> pitastrudl: by pure curiosity, which language is that ? :p
<pitastrudl> slovenian :D
algoriddle has joined #ocaml
<pitastrudl> i usually write comments in english, but some code was in slovenian already so i just stuck with it
<pitastrudl> i didnt think i'd be showing it to anyone else
<Drup> ah ! that's a family of languages I don't know at all
<pitastrudl> (i dont know anybody else that does ocaml, except my schoolmates*)
<pitastrudl> yeah, its slavic, just like russian,ukranian etc..
Kakadu has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
ril[away] has quit [Max SendQ exceeded]
mbrock has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
<def`> pitastrudl: why using an object :O ?
<def`> (there are a few people doing OCaml in Ljubljana, but they are likely to be your teachers :))
AltGr has quit [Remote host closed the connection]
tristero has quit [Quit: tristero]
<pitastrudl> oh really? which ones?
<def`> University of mathematics
<pitastrudl> im in another town tho, but we have teachers from other unis too
<pitastrudl> no, he's not our teacher
<def`> and a few other (OCaml and related, though I think they are teaching Haskell this year)
<pitastrudl> i see
<pitastrudl> def`: also im using an object becuase afaik, it's an object oriented assigment
<pitastrudl> at the start we had to define a type and what type of tree it is and then we did it with defining a class
<def`> argh, ok
connorjacobsen has quit [Remote host closed the connection]
buddyholly has quit [Ping timeout: 244 seconds]
tane has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
<cr4ven> Hi guys: Any idea why merlin (embedded in vim) would give the error "Failed to load some packages: 'ounit'" when I open a .ml file? I have 'PKG ounit' in my .merlin file, which is why it is trying to load it. This works fine on my OS X install, but I get the error on Linux. Same version of merlin (2.3.1), same version of ounit (2.0.0).
<companion_cube> it's oUnit, iirc
<cr4ven> er ... nvm, just tried 'PKG oUnit' and it works.
<cr4ven> yup
<companion_cube> so tricky
<reynir> heh
<cr4ven> I wonder why it doesn't fail on OS X. Presumably something to do with its agnosticism towards cases in directory names ...
<cr4ven> Computers are hard :P
<wiredsister> not case sensitive maybe
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
TheLemonMan has joined #ocaml
TheLemonMan has quit [Client Quit]
TheLemonMan has joined #ocaml
tane has joined #ocaml
connorjacobsen has joined #ocaml
TheLemonMan has quit [Client Quit]
buddyholly has joined #ocaml
TheLemonMan has joined #ocaml
MercurialAlchemi has joined #ocaml
ncthom91 has joined #ocaml
scarygelatin has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
buddyholly has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
scarygelatin has quit [Quit: Leaving]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
<pitastrudl> atlest in ocaml you dont have to specify single/multi comments, and just go to a newline when you want a multiline one
<pitastrudl> so atlest that's one good trait of the comment system it has
<Drup> pitastrudl: and you can nest comments
<pitastrudl> or well, atlest that's what the IDE i have has
<pitastrudl> nest comments?
<pitastrudl> what
buddyholly has joined #ocaml
<pitastrudl> (* comment (*2nd comemnd*)*) ?
<Drup> yes
<pitastrudl> what good is that for
<Drup> if you have a piece of code with comments, you can comment it, and it's fine
<Drup> (it's not the case in C
<Drup> )
<pitastrudl> hm
<pitastrudl> im not sure if i understand
<pitastrudl> (its late and i've been doing ocaml all day x_x)
<def`> if you comment code containing other comments
<def`> it works in OCaml and fails in C
<pitastrudl> oh ok
<pitastrudl> nice
<Algebr> caml all the time
<def`> I am not convinced that's an advantage, but why not...
<pitastrudl> ¯\_(ツ)_/¯
tane has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
marsam has joined #ocaml
ygrek_ has joined #ocaml
orbifx has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tane has quit [Ping timeout: 260 seconds]
rand__ has quit [Quit: leaving]
tane has joined #ocaml
seangrove has joined #ocaml
tane has quit [Quit: Verlassend]
rgrinberg has quit [Ping timeout: 244 seconds]
kushal has quit [Quit: Leaving]
EnergeticLube is now known as cat5e
ocaml885 has joined #ocaml
<ocaml885> I want to write a functor that accepts a module to avoid copy pasting lots of code but I have a snag: ppx_deriving_yojson accepts [@key 'somekeystring'] and it appears at compile time it must be a hard-coded string. I need to have one common struct but one field needs to have a different key as I functorize. Is this possible? Workarounds?
rgrinberg has joined #ocaml
<aantron> maybe you can let Gerd know that it's a pain for Merlin users too :)
silver has quit [Quit: rakede]
data_hope has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
unbalancedparen has quit [Quit: WeeChat 1.5]
wiredsister has quit [Ping timeout: 276 seconds]
ocaml885 has quit []
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 276 seconds]
ygrek_ has quit [Ping timeout: 260 seconds]
Simn has quit [Quit: Leaving]
kakadu_ has joined #ocaml
Kakadu has quit [Ping timeout: 244 seconds]
sepp2k has quit [Quit: Leaving.]
algoriddle has quit [Quit: Connection closed for inactivity]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu_ has quit [Remote host closed the connection]
A19774941 has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 260 seconds]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
wiredsister has joined #ocaml
data_hope has quit [Quit: Lost terminal]
<pierpa>
mbrock has quit [Quit: Connection closed for inactivity]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
mfp has joined #ocaml
connorjacobsen has joined #ocaml
wiredsister has quit [Remote host closed the connection]
wiredsister has joined #ocaml