adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
blik71 has joined #ocaml
madroach_ has quit [Ping timeout: 260 seconds]
AltGr has joined #ocaml
madroach has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blik71 has quit [Ping timeout: 252 seconds]
__uu___ has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
__uu__ has joined #ocaml
obadz has quit [Ping timeout: 256 seconds]
obadz has joined #ocaml
travisbrady has quit [Quit: travisbrady]
python476 has joined #ocaml
<python476> hello
<python476> anyone knows if there's an irc channel for the fun ocamlmooc that started a few days ago ?
govg has quit [Ping timeout: 264 seconds]
<Enjolras> python476: i don't know, they have a forum iirc. But you are welcome to ask questions here :)
<python476> Couldn't find any answer on it so far and it's a stupid question (social anxiety) so I wanted to ask outside
<python476> plus the discussion system is so slow it's borderline unusable
<python476> One trivial exercise is writing a last_char <string> function 'assuming <string> is not "" '
<python476> but the test suite includes last_char ""
<Enjolras> you should not be afraid to ask question.
<python476> Ill do that
<python476> I used assert to raise an execption but it's not what's expected either
<Enjolras> python476: i guess it's either a bug in a spec
<Enjolras> python476: maybe you're expected to return option ?
<Enjolras> you could try that.
<python476> doesn't seem so, the other tests are happy with a Char
<Enjolras> Based on usual practice, i guess it's either expecting None or raising Not_found
<python476> And it's week 2, they barely introduced function syntax, that would be odd to pull an Option type
<python476> actually exceptions are yet to be covered, even assert wasn't .. or maybe they wanted us to dig in the manual
<python476> I'll try thanks
<Enjolras> could also expec Invalid_argument
<Enjolras> this is the 3 behavior you could expect from the stdlib
<Enjolras> In anycase i think you should mention this on the discussion platform of the mooc
<Enjolras> (wow you're right the website is sow)
<Enjolras> slow*
<python476> They leveraged edx framework but it seems very weirdly designed
<python476> either it requires larger servers or it's just throttled to death
govg has joined #ocaml
<python476> and it's buggy .. irc ftw
travisbrady has joined #ocaml
blik71 has joined #ocaml
<Drup> edx is, to put it mildly, not a fabulous plateform.
<python476> Drup: designed by comitee effect I guess
<Drup> I actually don't think so
<python476> *committee
<python476> http://imgur.com/0kVF3jg relevant
<python476> it's used by edx FP in haskell too, it's a tad faster
<python476> but still slower than necessary
nullcatxxx_ has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
travisbrady has quit [Quit: travisbrady]
swgillespie has joined #ocaml
govg has joined #ocaml
Algebr has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
tristero has joined #ocaml
darkf has joined #ocaml
darkf has joined #ocaml
darkf has quit [Changing host]
travisbrady has joined #ocaml
__uu__ has quit [Ping timeout: 240 seconds]
canhtak has quit [Quit: canhtak]
travisbrady has quit [Quit: travisbrady]
struktured has joined #ocaml
govg has quit [Ping timeout: 272 seconds]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
<Algebr> in an opam file's build target, can I say if the os is darwin I want to to use ["./configure" ...], else if os is freebsd then use ["./configure"]... else use ...
struktured has quit [Ping timeout: 256 seconds]
toomuchtvrotsurb has joined #ocaml
govg has joined #ocaml
struktured has joined #ocaml
toomuchtvrotsurb has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has joined #ocaml
<Drup> Algebr: look at filters in the manual
AltGr has left #ocaml [#ocaml]
swgillespie has quit [Excess Flood]
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
swgillespie has joined #ocaml
tmtwd has joined #ocaml
mankyKitty is now known as Mean_n_Manky_KIT
Mean_n_Manky_KIT is now known as MeanMankyKITTEH
mac10688 has quit [Ping timeout: 246 seconds]
python476 has quit [Ping timeout: 246 seconds]
<Algebr> So I think one can do these filters in a row?
<Algebr> err, nvm.
ygrek has quit [Ping timeout: 268 seconds]
<Algebr> Is it rude if I submit something to opam for a package of which I don't own. ocaml-ssl is broken on OS X, told maintainer the fix but he isn't doing it, i think I have the fix.
nullcatxxx_ has quit [Read error: Connection reset by peer]
AltGr has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
nullcatxxx_ has joined #ocaml
native_killer has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 260 seconds]
toomuchtvrotsurb has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has quit [Remote host closed the connection]
__uu__ has joined #ocaml
blik71 has quit [Ping timeout: 265 seconds]
__uu__ has quit [Remote host closed the connection]
__uu__ has joined #ocaml
__uu___ has joined #ocaml
__uu___ has quit [Remote host closed the connection]
__uu__ has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
python476 has joined #ocaml
<python476> hi again
<python476> just in case some people are following the ocamlmooc (FUN 56002 Introduction to Functional Programming in OCaml), since the board is still fragile, I talked some people into gathering at #ocamlmooc
govg has joined #ocaml
MercurialAlchemi has joined #ocaml
<dmbaturin> python476: HHm, fragile? What are the problems with it?
<dmbaturin> I've looked into the current week material yesterday but didn't have time to check the board.
<python476> dmbaturin: I experience regular ajax errors while searching or answering on the board
<dmbaturin> Ah, odd.
<python476> and as I said earlier, it's sluggish anyway
<python476> The few MOOCs I did we all gathered on IRC, it was a great addition
<python476> I'm pushing the idea, we'll see
<python476> if I can submit my new post that is..
<python476> such a nice instance of a recursive problem
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
nullcatxxx_ has quit [Ping timeout: 260 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
kushal has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
psy_ has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
psy_ has quit [Ping timeout: 246 seconds]
nullcatxxx_ has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
zpe has joined #ocaml
Mercuria1Alchemi has joined #ocaml
eni has quit [Remote host closed the connection]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
igitoor has quit [Ping timeout: 250 seconds]
igitoor has joined #ocaml
antkong has quit [Quit: antkong]
igitoor has joined #ocaml
igitoor has quit [Changing host]
ggole has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 246 seconds]
zpe has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 264 seconds]
obadz has quit [Ping timeout: 260 seconds]
obadz has joined #ocaml
zpe has joined #ocaml
Haudegen has joined #ocaml
mort___ has joined #ocaml
freehck has joined #ocaml
ely-se has joined #ocaml
def`_ is now known as def`
gobbledigook has joined #ocaml
<gobbledigook> hi guys, some clarification on the @ operator
<gobbledigook> so @ appends
<gobbledigook> d@[a, b], does that add [a, b] to the list d?
rwmjones_holiday is now known as rwmjones
<MasseR> It returns a new list with d appended with [ə,b]
<freehck> yep. the new list will begin with "d" followed by [a,b]
<gobbledigook> so let's say d = [[a,b];[c,d]]
<gobbledigook> woops
<gobbledigook> replace [a,b] in there with [e,f]
<gobbledigook> then d@[a,b] = [[e,f];[c,d];[a,b]]?
<freehck> no, this won't work.
<freehck> d should have the same type that [a, b]
<flux> gobbledigook, your list [[e, f]; [c, d]..] is a ('a * 'b) list list, but [a, b] is ('a * 'b) list
<freehck> I mean if [a, b] is 'x list (a has type 'x and b is the same), then d should be also of type 'x list
<freehck> oh...
<freehck> [a, b], not [a; b]...
<freehck> sorry
<gobbledigook> so then if d = [c,d,e], then d@[a,b] would be [c,d,e,a,b]?
<flux> gobbledigook, be aware of course that [a, b] is exactly the same as [(a, b)], if that's what you mean
<gobbledigook> yes
<gobbledigook> that is what I mean
<flux> gobbledigook, well no, c, d, e, a, b would be a 5-tuple
<freehck> gobbledigook: a,b = (a,b)
<flux> so you probably mean: d @ [ a; b ] = [c; d; e; a; b]
<freehck> [a,b] = [(a,b)]
<freehck> ('a * 'b) list
<gobbledigook> flux well, it's not a;b
<gobbledigook> it's a,b
<gobbledigook> d starts off as an empty list []
octachron has joined #ocaml
<flux> gobbledigook, just try it out and see what happens.. :)
mort___ has quit [Quit: Leaving.]
<flux> let a, b, c, d = `a, `b, `c, `d
govg has quit [Ping timeout: 240 seconds]
<octachron> flux, "`a" is a quite questionable part of ocaml syntax
<MasseR> You can have lower-case variants?
* ggole is impressed that MasseR managed to type a ə by accident
<flux> octachron, well, it cannot be removed :)
<flux> and probably there's no real reason to, either
<MasseR> ggole: I'm amaze to find ə from my code every now and then :)
<flux> except that it's surprising.. :)
<flux> masser, yes, due to a historical accident
<ggole> You can have upper case type variables too
<ggole> (As octachron pointed out recently.)
<flux> mind.. blown :)
<freehck> gobbledigook: let x = [(1,2); (3,4)] in x@[(5,6)] --> (int * int) list = [(1, 2); (3, 4); (5, 6)]
<flux> ggole, next you're telling me.. they don't need to be single letters from the beginning of the alphabet ;-)
<companion_cube> oh nice, I didn't know, but 'A is indeed a valid type var
<ggole> And the ' is a separate token, so let x : ' (* whee*) A = 0 is valid
<flux> cool, I need to remember these tricks when I attend the next round of International Obfuscated OCaml Code Contest
<flux> IOOCCC ;-)
<ggole> OCaml is quite lexically surprising
<companion_cube> Foo . (* hello *) Bar . world
<flux> bonus points for leaving ' to the previous line
<ggole> let f _ _ _ _ = () in let x = () in f 1.0x 2.0x;;
<ggole> Who needs those redundant spaces anyway.
<companion_cube> :D
<flux> I've been recently using this postgresql-trick, I don't know if it's SQL: select*from foo;
<companion_cube> for a moment I thought those were hexa floats
<gobbledigook> okay, another random question
<gobbledigook> when myfun is calling match
<companion_cube> funny, isomorphis.me is getting more popular
<gobbledigook> it passes (b a) to f
<gobbledigook> what exactly does (b a) do?
<flux> gobbledigook, ..match is a keyword in ocaml, so maybe not the greatest example :)
<companion_cube> wait, how can you define a function named 'match'
<gobbledigook> oh
<gobbledigook> well let's say match is named differently
<gobbledigook> haha
<companion_cube> (b a) is calling function b on a
<ggole> (b a) is the application of b to a
<gobbledigook> ah
<companion_cube> so (a, b) will have type 'x * ('x -> 'y)
<gobbledigook> can you refresh my memory on what the * symbol means?
<freehck> gobbledigook: you should define "match" specifically before using.
pyon has joined #ocaml
<freehck> of course you should remembere that match "is now named differently"
<flux> gobbledigook, it is the 'constructor' of a tuple type
<flux> gobbledigook, ie. enter this in your toplevel: (1, 2);;
<gobbledigook> int * int type
<companion_cube> yes, * is the type of tuples
<companion_cube> I mean a * b is the type of tuples of a and b
<ggole> It's not really a binary type operator though
<ggole> a * b * c is not a * (b * c) or (a * b) * c
<gobbledigook> ggole what do you mean by that?
<gobbledigook> multiplication?
<ggole> So thinking of * as a type constructor is a little off: it's more like syntax for a family of type constructors
<gobbledigook> nvm
<ggole> Ah, sorry: I was talking about type expressions there.
<flux> gobbledigook, it does sort of mean set multiplication
<ggole> The * is intended to mean something like multiplication at the type level though.
<flux> gobbledigook, if you think 'int' means the set of integers
<ggole> Tuples are also known as product types.
<flux> gobbledigook, then int * int is those sets multiplied
<gobbledigook> I'm a bit lost here
<gobbledigook> how is (1,2) and int multiplied by an int?
<flux> here we are talking about the types, not the values
<ggole> It's the types that are multiplied, not the values
<ggole> ^
<gobbledigook> oh
<flux> plain expression 1 * 2 is of course the number 1 multiplied by number 2
<octachron> and it is a cartesian product not ordinary multiplication
<flux> but expressions are not types, the _have_ types :)
JuggleTux has joined #ocaml
orbifx1 has joined #ocaml
<gobbledigook> ah, thanks
JuggleTux has quit [Client Quit]
<def`> z
<ggole> Hmm, core quickcheck thingy
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
* ggole tickles companion_cube's competitive spirit
orbifx1 has quit [Quit: WeeChat 1.3]
orbifx has joined #ocaml
JuggleTux has joined #ocaml
<companion_cube> I don't even try to compete with JST's libraries :)
<companion_cube> I won't use theirs, they won't use mine (or anyone's except theirs)
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
dsheets has joined #ocaml
JuggleTux has quit [Client Quit]
ollehar has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
larhat1 has quit [Quit: Leaving.]
<orbifx> Do they put much thought into that? do they have a particular style?
<companion_cube> JST?
<orbifx> yeah
JuggleTux has joined #ocaml
<companion_cube> well they want all the libraries to be linked together, I think, and they want to have control (to do what they want)
Kakadu has joined #ocaml
<reynir> gobbledigook: (1, 2) : int * int is similar to (1, 2) ∈ ℤ × ℤ in mathematics, if that helps (let me know if you can't see all the characters)
<gobbledigook> ah!
<gobbledigook> okay, I get it
<gobbledigook> thanks
ygrek has quit [Ping timeout: 268 seconds]
JuggleTux has quit [Quit: leaving]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
antkong has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
<companion_cube> ok, I was wrong, they do use some external libraries.
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
govg has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
JuggleTux has quit [Client Quit]
JuggleTux has joined #ocaml
rgrinberg has joined #ocaml
dsheets has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
JuggleTux has quit [Quit: leaving]
<orbifx> companion_cube: yeah, it be better if they were open about their development not just open about their source.
obadz has quit [Ping timeout: 255 seconds]
obadz has joined #ocaml
<jmasseo> I think the nature of their work probably precludes that.
<jmasseo> Probably not on Core and friends.
AlexRussia has joined #ocaml
_andre has joined #ocaml
<jmasseo> My interest in OCaml specifically stems from an interest in JST. Now that I've poked it, there are some things I appreciate about it.
<jmasseo> I like compiled code.
<jmasseo> I like type safety.
<jmasseo> I like that I got my wife to do the MOOC with me. heh
native_killer has quit [Ping timeout: 265 seconds]
AltGr has left #ocaml [#ocaml]
<companion_cube> :)
<jmasseo> another thing that i like about it, which i also noticed with lisp, is that i end up writing much tighter code
<jmasseo> also because i have to write it three times to get it right
<jmasseo> go lets me slop code, although not as much as python
<jmasseo> (go also having type safety(ish) and compiled code)
<companion_cube> very -ish, indeed
<jmasseo> go will let you hang yourself.
<jmasseo> it's just harder than in C.
native_killer has joined #ocaml
<jmasseo> the only unexpected behaviours i've encountered thus far in ocaml have been related to my understanding of Lwt.
<flux> ocaml certainly lets me slop code, but it keeps my code working somehwat.. :)
<flux> ..if I get what 'slop' means. I just type code with n-tuples and functions going all around, instead of putting them inside records ;)
<flux> later, there's time to refactor.
<flux> in fact, merlin would be pretty cool if it were able to extract records out from tuples :)
<jmasseo> my merlin config struggles a little with Lwt.
<jmasseo> i'm still super green to ocaml though
<jmasseo> and emacs :/
<jmasseo> i tried emacs in the 90's but i didn't inhale.
<jmasseo> flux: records don't seem to be too much harder than tuples if you use punning
<flux> well, it starts with a value
<flux> then you make a 2-tuple
<flux> and maybe (a, (b, c))
<jmasseo> via the process of iterative development
<flux> yes
<flux> sadly it's not very easy to programmatically make that transformation
<flux> it would need to actually follow the flow of that type instance
<flux> but, I think it'd be doable
<flux> you could manually point it to places it misses
<jmasseo> the type inference bit confuses me a lot.
<jmasseo> like it won't always infer the type i want it to.
<flux> another thing is that the 'automatic' simple transformation could end up with: type ('a, 'b, 'c, 'd) r = { a : 'a; b : 'b; c : 'c: d : 'd }
<jmasseo> because i have not been explicit and i'm using.
<jmasseo> whatever the right word is
<jmasseo> polymorphic multivariants or whatever the fuck
<flux> and then you would need to again refactor that to rename the fields and eliminate polymorphism
<flux> jmasseo, you mean `Foo etc?
<jmasseo> yeah
<flux> polymorphic variants
kaihaosw has joined #ocaml
<jmasseo> it's one of those lofty cs terms
kaihaosw has quit [Remote host closed the connection]
<flux> they are nice.. at times. in fact, they are a great fit when you deal with parts of the constructors in separate places
<jmasseo> i'm not sure i follow
<jmasseo> parts of the constructors in seperate places?
govg has quit [Ping timeout: 260 seconds]
<flux> ok, let's say we have let foo a = match a with `A | `B -> "a or b"
<flux> then we have: let bar a = match a with (`A | `B) as x -> foo x | `C -> "c"
<jmasseo> match is another one of my favorite parts of ocaml
<flux> so the type 'a' is different in these functions
<jmasseo> yeah
<jmasseo> so that should fail
<flux> no, it compiles just fine
<jmasseo> becauyse c is type = [ `A | `B ]?
<flux> what c?
<jmasseo> won't it throw out errors because of the incomplete match?
<flux> there's no incomplete match
<flux> all cases, `A, `B and `C are always handled
<flux> it's the ~magic of polymorphic variants~
<flux> and that's the one case you can't do with regular variants
<jmasseo> but you can't actually execute that code.
<jmasseo> i think?
<flux> well, try it?
<flux> seeing is believing :-)
ceryo has joined #ocaml
ceryo has quit [Client Quit]
ceryo has joined #ocaml
govg has joined #ocaml
rgrinberg has joined #ocaml
<jmasseo> weird
<jmasseo> ahh because it's a tag not a type?
<jmasseo> i still don't really get it.
<jmasseo> how does it infer that `C is also (`A | `B)?
<jmasseo> i guess it has to be for that case to execute
rgrinberg has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
ely-se has quit [Quit: leaving]
<edwin> jmasseo: it might help to think about what the type can be at each branch, although this is not the exact algorithm the compiler uses for type checking:
<edwin> match a with (* here the compiler doesn't know what a is yet *)
<edwin> (`A | `B) as x -> foo x (* here the compiler knows that 'a' can be either `A or `B, so it assigns the type [< `A `B] *)
<edwin> `C -> "c" (* here the compiler knows that 'a' can be `C, so if this was the only branch the type would've been [< `C], but due to the previous branch the type is 'grown' to include `C too, i.e. the type of 'a' is now [< `A `B `C] *)
<edwin> also please look at the manual's section about polymorphic variants, even if it seems a bit overwhelming at first read http://caml.inria.fr/pub/docs/manual-ocaml/lablexamples.html#sec46
sgnb`` has quit [Ping timeout: 246 seconds]
<jmasseo> thank you
<jmasseo> how about the second example under Advanced Use
<jmasseo> wow
blik71 has joined #ocaml
native_killer has quit [Ping timeout: 244 seconds]
mobius-eng has joined #ocaml
<edwin> for the 2nd example think of f1 and f2 as above (pattern matching on polymorphic variants unifies or grows the types)
<edwin> it is like an 'or' operation
ely-se has joined #ocaml
<edwin> in 'f' there is no pattern matching, it is just 'x' used multiple times. OCaml must find a type that is valid for all uses of 'x', so this is like an 'and' operation or an intersection
<edwin> if you are just learning about polymorphic variants it is probably better to take a few of these examples and try them out in your toplevel (plain ocaml, or utop), and change some of the branches and see how the inferred type changes
<edwin> add some branches, remove some, change the type of tags
<edwin> think about what you expect the type to be, and then check what the compiler did
<edwin> if its not what you expected try to understand why
<edwin> and try to understand the basic functionality before moving on to the advanced section :)
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
gobbledigook has joined #ocaml
Mercuria1Alchemi has quit [Remote host closed the connection]
<gobbledigook> can someone explain to me first off, what type ('a, 'b) symbol = ... does
<gobbledigook> and then what (T tsym)::t0 checks for?
<flux> well, the type definition is pretty basic.. just a polymorphic 'either' type, which is either T 'a or N 'b :-)
<flux> the second case matches when the first element of the list 'rule' is a T, and then binds its argument to 'tsym'
<gobbledigook> are T and N keywords in Ocaml?
<flux> no
<flux> it defines to constructors
<flux> they could be mostly anything
<flux> and the ::t0 part then binds the rest of the list (not including the first element) to 't0'
<flux> "TWO constructors"
<gobbledigook> what exactly does the "of" mean in T of 'a?
Mercuria1Alchemi has joined #ocaml
<flux> it doesn't inherently 'mean' anything, it's part of the syntax.. if you are to give arguments to constructors, you must have the keyword 'of'
<flux> do you know the option type?
<gobbledigook> so "of" is a constructor?
<flux> well, the whole thing is a constructor
<flux> the part before 'of' is the name of the constructor and the part after that is the data associated with it
<gobbledigook> so "T" is the constructor
<gobbledigook> I mean, it's not like you can replace T or N with anything else can you?
<gobbledigook> you can't go like say Y of 'a
<flux> you can replace all Ts with something else
<gobbledigook> or B of 'b?
<gobbledigook> oh
<flux> like Gobbledigook
<flux> try it :-)
<gobbledigook> also just a random question
<gobbledigook> why is 'a used?
<gobbledigook> I mean, the apostrophe
<flux> I think in other contexts it might introduce an ambiguity if it were dropped
<flux> for example: foo list -> is "foo" a type argument of a type?
<flux> "OR a type" typoing :-)
<flux> and ocaml syntax is quite disambiguous
<gobbledigook> so people use apostrophe to denote args?
<flux> they can and must be used only with type arguments, yes
<flux> 'foo always mean that 'foo is a parametrized type
Mercuria1Alchemi has quit [Quit: Lost terminal]
<gobbledigook> does the apostrophe actually do anything, or is it just tradition?
<flux> it's just part of the syntax
<pippijn> gobbledigook: it means type parameter
<pippijn> without ' it is a type name
<flux> for example: this compiles: type 'a foo = Foo of 'a
<flux> this is a syntax error: type a foo = Foo of a
<gobbledigook> so if 'a is a type parameter
<gobbledigook> let testfunction a b = ... works though
<gobbledigook> even though a and b are parameters to the testfunction?
<pippijn> gobbledigook: a and b are not type names
<flux> they are value parameters, not types
<flux> types and values are sort of separate things, even though all values have a type (but not all types may have values)
<gobbledigook> ok, so I think I know where I'm getting confused on
<gobbledigook> I should probably read up more on types
<flux> I guess OCaml is your first statically typed language then?
<gobbledigook> yes
<flux> welcome to the static side.. ;-)
Mercuria1Alchemi has joined #ocaml
<flux> if you want to use types in the function definition, you would use: let testfunction (a : typenamehere) = ..
<flux> even this works, even if not exactly how you may think it works (don't worry about it yet ;-)): let testfunction (a : 'a) = ..
govg has quit [Ping timeout: 255 seconds]
dsheets has quit [Ping timeout: 260 seconds]
mobius-eng has quit [Ping timeout: 250 seconds]
<gobbledigook> flux, are you still there?
<flux> yes
<gobbledigook> so going back to what I linked previously
<gobbledigook> (T tsym)::t0
<flux> ok..
<gobbledigook> (N ntsym)::t0
<gobbledigook> how does it know if an element of rule is of type T or N?
<gobbledigook> I'm still not fully understanding this
<flux> it doesn't know, it checks
<flux> if it is in fact (ie.) T tsum, then it proceeds to that branch of code following the ->
<flux> if it doesn't, then it tries to find a new case to match against
<flux> in this case it doesn't find it and it raises an exception. but, to be fair, it also complained at compile time that the match is not exhaustive
<flux> for example you see the match [] -> None.. there it check that if frag is empty, it evaluate to None. and if it's not empty, then it binds the first element to h (for 'head') and the rest of the list to t (for 'tail')
<gobbledigook> well yes, I get that part
<gobbledigook> I'm still not getting how it checks if the rule head is of type T or type N
mobius-eng has joined #ocaml
<gobbledigook> especially because I still don't really understand type ('a, 'b) symbol = ...
<flux> have you tried how things work in the ocaml shell (toplevel)?
<gobbledigook> does this mean rule has to be in the form (a, b) and "a" would be T and "b" would be N?
<flux> well, they could be, but more likely 'a is like string and 'b is like int
<flux> but no, the rule isn't a tuple
<flux> let's say we rewrite that code
<flux> replace the first three lines with: type symbol = T of string | N of int
<flux> it still compiles and works, but only for that pair of types
<gobbledigook> okay, so say we had type symbol = T of string | N of int
blik71 has quit [Ping timeout: 260 seconds]
<gobbledigook> then in (T tsym), it would check if the head of rule is of type T aka string
<gobbledigook> and then in (N ntsym), it would check if the head of rule is of type N aka int
<flux> well no, it cannot be plain string, it must eb T string
<flux> for example T "hello" would be a valid value
<flux> "hello" would not
<flux> it's not a type alias
<flux> you should play in the toplevel and try out what values and types you can make ;)
<gobbledigook> oh.
<ggole> T and N aren't types, they are constructors
<Drup> (09:39:15) ggole: let f _ _ _ _ = () in let x = () in f 1.0x 2.0x;; <--- That one is gonna broke next version of OCaml
<ggole> Oh, really? Why?
mrvn has quit [Ping timeout: 250 seconds]
native_killer has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
<rks`> ggole: because of https://github.com/ocaml/ocaml/pull/170 I'd guess
mrvn has joined #ocaml
<ggole> Aha.
<flux> oh no, all my code needs to be rewritten
rgrinberg has joined #ocaml
Mercuria1Alchemi has quit [Remote host closed the connection]
Mercuria1Alchemi has joined #ocaml
travisbrady has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
<edwin> you just need spaces between 1.0 and x right?
<Drup> yes
<edwin> I wasn't aware that it worked without spaces currently :)
mrvn has quit [Ping timeout: 252 seconds]
Mercuria1Alchemi has quit [Remote host closed the connection]
Haudegen has joined #ocaml
toomuchtvrotsurb has joined #ocaml
mrvn has joined #ocaml
Mercuria1Alchemi has joined #ocaml
dsheets has joined #ocaml
mrvn has quit [Ping timeout: 250 seconds]
mrvn has joined #ocaml
govg has joined #ocaml
mrvn has quit [Ping timeout: 246 seconds]
BitPuffin has joined #ocaml
mrvn has joined #ocaml
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Leonidas> I'm wondering, I have some code going
<Leonidas> ignore @@ foo#bar args;
<Leonidas> ()
<Leonidas> and every time I try removing ; (), the compiler complains
<flux> complains what?
<companion_cube> maybe you have an expression e after, and it becomes ignore @@ foo#bar args e
<flux> no, ignore @@ foo#bar args; () e would invalid as well
<flux> can you make a test case in one line :)
jwatzman|work has joined #ocaml
<Leonidas> looks like it might be from Camlp4 :-/
<Leonidas> oh yes, it was
dsheets has quit [Ping timeout: 250 seconds]
mobius-eng has quit [Ping timeout: 256 seconds]
freehck has quit [Ping timeout: 240 seconds]
blik71 has joined #ocaml
dsheets has joined #ocaml
native_killer has quit [Ping timeout: 244 seconds]
sgnb has joined #ocaml
mrvn has quit [Ping timeout: 240 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
mrvn has joined #ocaml
dsheets has quit [Remote host closed the connection]
mrvn has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
jeffmo has joined #ocaml
mrvn has joined #ocaml
native_killer has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
mrvn has quit [Ping timeout: 244 seconds]
mrvn has joined #ocaml
zpe has joined #ocaml
micro_ has joined #ocaml
spacebat has quit [Quit: WeeChat 0.3.8]
mrvn has quit [Remote host closed the connection]
mrvn has joined #ocaml
freehck has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
python476 has quit [Quit: Page closed]
Tekilla has joined #ocaml
python476 has joined #ocaml
mobius-eng has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
sternenseemann has quit [Ping timeout: 240 seconds]
jeffmo has joined #ocaml
thorsten` has quit [Ping timeout: 244 seconds]
stomp has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 240 seconds]
mrvn has quit [Ping timeout: 256 seconds]
mrvn has joined #ocaml
blik71 has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
thorsten` has joined #ocaml
mrvn has quit [Ping timeout: 244 seconds]
mrvn has joined #ocaml
sternenseemann has joined #ocaml
stomp has joined #ocaml
__uu__ has joined #ocaml
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
obadz has quit [Ping timeout: 268 seconds]
mrvn has quit [Ping timeout: 268 seconds]
mrvn has joined #ocaml
darkf has quit [Quit: Leaving]
sgnb has quit [Remote host closed the connection]
obadz has joined #ocaml
<seliopou> rgrinberg: incoming pr
<rgrinberg> seliopou: \o/
<seliopou> Drup: gonna take care of those prs today
swgillespie has joined #ocaml
<seliopou> i have comments, but the tyxml one i wanna get in there
swgillespie has quit [Client Quit]
marsam has joined #ocaml
toolslive has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<Drup> cool
Haudegen has joined #ocaml
toomuchtvrotsurb has joined #ocaml
mrvn has quit [Ping timeout: 260 seconds]
mrvn has joined #ocaml
keen________ has quit [Read error: Connection reset by peer]
keen________ has joined #ocaml
slash^ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
marsam has quit [Remote host closed the connection]
native_killer has quit [Ping timeout: 244 seconds]
native_killer has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
libertas has joined #ocaml
ely-se has quit [Quit: leaving]
marsam has joined #ocaml
<seliopou> rgrinberg: how do you usually do template inheritance with mustache?
<seliopou> or do you just not :/
Tekilla has quit [Quit: Quitte]
zpe has quit [Remote host closed the connection]
govg has quit [Ping timeout: 246 seconds]
<rgrinberg> seliopou: i haven't used it yet
ollehar has quit [Quit: ollehar]
mrvn has quit [Remote host closed the connection]
mrvn has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
canhtak has joined #ocaml
blik71 has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
octachron has quit [Quit: Leaving]
nullcatxxx_ has joined #ocaml
noze has joined #ocaml
mengu has joined #ocaml
mengu has quit [Remote host closed the connection]
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
jwatzman|work has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
marsam has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has joined #ocaml
rgrinberg has joined #ocaml
travisbrady has quit [Quit: travisbrady]
canhtak has quit [Quit: canhtak]
mobius-eng has quit [Ping timeout: 265 seconds]
pierpa has joined #ocaml
travisbrady has joined #ocaml
ygrek has joined #ocaml
Kakadu has quit [Quit: Page closed]
Algebr has joined #ocaml
__uu__ has quit []
shinnya has joined #ocaml
psy_ has joined #ocaml
blik71 has quit [Ping timeout: 272 seconds]
shinnya has quit [Read error: No route to host]
shinnya has joined #ocaml
blik71 has joined #ocaml
^elyse^ has joined #ocaml
blik71 has quit [Ping timeout: 250 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
struktured has joined #ocaml
noze has quit [Ping timeout: 240 seconds]
raphaelss has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
orbifx has quit [Quit: WeeChat 1.3]
Kakadu has joined #ocaml
Algebr has quit [Remote host closed the connection]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Lis has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
canhtak has joined #ocaml
travisbrady has quit [Quit: travisbrady]
larhat1 has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
<Drup> MercurialAlchemi: just finished the last laundry files .... I didn't liked it at all. While I loved all the previous ones :/
<MercurialAlchemi> the Annihilation Score?
<Drup> yes
<MercurialAlchemi> I liked the different perspective
<MercurialAlchemi> also, "perv suits" :)
<Drup> the superhero part is very nice
<Drup> it's the subplot of the personal drama of Mo that I disliked significantly
<MercurialAlchemi> I thought it added depth to her character and the relationship
<dmbaturin> What files are you talking about?
<Drup> I ... don't think it's very well writen
<MercurialAlchemi> my biggest problem with the book is that the cat should obviously have a much more important role
<dmbaturin> Drup: Ah, I thought "laundry files" was a metaphor for... not very clean code? Or something. :)
<Drup> :p
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
native_killer has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
ggole has quit [Ping timeout: 268 seconds]
ygrek has quit [Remote host closed the connection]
rgrinberg1 has joined #ocaml
ygrek has joined #ocaml
<nicoo> Drup: Oh, you finally started reading them? :)
<nicoo> Ah, ok, you even read the last.
sepp2k has quit [Quit: Leaving.]
<nicoo> >_<'
* nicoo is somewhat out of touch.
rgrinberg has quit [Ping timeout: 264 seconds]
<Drup> x)
rand__ has joined #ocaml
<MercurialAlchemi> Drup: ever tried Aliette de Bodard?
<Drup> nope
<Drup> I'll add it to my very long reading list
<Drup> I will probably do a break and read some fantasy now anyway :p
<MercurialAlchemi> I haven't tried her myself, but I think she has an interesting background
jwatzman|work has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
jwatzman|work has joined #ocaml
<orbifx> I started writing an a application in Haskell a while back and now I am reconsidering restarting it in Ocaml.
<orbifx> Anyone with wisdom to share regarding that?
<orbifx> Also has anyone seen QML being used with Ocaml?
<orbifx> I found this
pyon has quit [Quit: Angels fall, all for you, heretic! Deamon heart, bleed for us!]
<MercurialAlchemi> orbifx: I can read my old ocaml code, I can't read my old Haskell code
<orbifx> :P
<orbifx> explain
<Kakadu> orbifx: AFAIK, nobody is interested
<orbifx> because you don't like it, becayse it makes no sense?
<orbifx> kakadu: wow, you are here :P
<orbifx> This might be the second time in my life the developer pops up, first time it happens when it it's not actually his channel.
<orbifx> kakadu: I'm interested
<orbifx> MercurialAlchemi: why can't you read your old Haskell code?
<MercurialAlchemi> orbifx: Haskell lasks readability compared to OCaml
<MercurialAlchemi> no labeled arguments, no |>
<MercurialAlchemi> and monadic effect systems are clumsy
<orbifx> kakadu: what is the state of the project?
<Kakadu> orbifx: `Nobody uses it, I don't know why`
<orbifx> MercurialAlchemi: the labaled arguments to my limited knowledge is an advantage of Ocaml. But Regarding |> you have >> and >>=, no?
<orbifx> kakadu: state?
<orbifx> can I base my project on it now?
<MercurialAlchemi> orbifx: that's not the same
<MercurialAlchemi> |> is for normal functions, not monads
<Kakadu> orbifx: There is something like qocamlbrowser in opam
nullcatxxx_ has joined #ocaml
Haudegen has joined #ocaml
<orbifx> MercurialAlchemi: hmm never actually noticed the lack of equivalent.
swgillespie has joined #ocaml
<orbifx> kakadu: does that mean that is practically read for industrial use?! :P
<MercurialAlchemi> orbifx: and composing functions the other way just feels unnatural
pyon has joined #ocaml
<Kakadu> Yep, and there are no any bugs there :)
psy_ has quit [Ping timeout: 268 seconds]
<orbifx> MercurialAlchemi: you mean: (fn1 . fn2 ...) data ?
<MercurialAlchemi> yeah, goddamn pointfree mess
<orbifx> kakadu: I think i will switch and try it. Cause I know what it's like to be looking for someone to try your project :)
<Kakadu> I'll be waiting for your feedback
<orbifx> MercurialAlchemi: maybe I'm used to worse messes but I will take your word for it. How long have you been coding Ocaml? How long Haskell?
<MercurialAlchemi> (also, letting library authors go wild with ASCII operators is really not the best thing to do)
<dmbaturin> MercurialAlchemi: You could trivially define |> in haskell though. :)
<MercurialAlchemi> yes, of course
<MercurialAlchemi> but it's a question of ecosystem
<dmbaturin> In fact, I wonder why no one did.
<MercurialAlchemi> orbifx: hmm, must have spent a couple of years playing with Haskell on the side, I guess?
<dmbaturin> Perhaps because so many things are represented and monads and thus provide >>=?
<MercurialAlchemi> maybe another couple of years OCaml? I have a terrible sense of time
jeffmo has quit [Ping timeout: 250 seconds]
lobo has joined #ocaml
jeffmo has joined #ocaml
<companion_cube> dmbaturin: it's called $
<dmbaturin> companion_cube: But $ is @@.
<companion_cube> oh right, sorry
<companion_cube> it's called flip ($) !!
<orbifx> MercurialAlchemi: I agree with the wild use of ASCII sequences for functions.. that should be edoteric shorthands not interfaces :P
<dmbaturin> orbifx: What is your project about?
<dmbaturin> companion_cube: Good point.
<orbifx> dmbaturin: controlling a server system I made in ocaml
<MercurialAlchemi> orbifx: yeah, scala has the same issue
<dmbaturin> What does the server do?
<orbifx> home server
<orbifx> I have a packge for Arch Linux in AUR for it.
<orbifx> I'm making a small board computer to go with it.
<dmbaturin> orbifx: Oh. So it's supposed to manage configs for multiple third-party components, right?
<orbifx> dmbaturin: yes and also provide a new thin layer and coherense
<orbifx> so functionality is shared by all components in a modular way
<dmbaturin> orbifx: Why I'm asking, I'm making pretty much the same, but "up to eleven", so to speak. A thing that will allow one to make such appliances in a robust way: https://github.com/dmbaturin/vyconf-experimental We could join our efforts.
<orbifx> dmbaturin: reading it
<orbifx> kakadu: your github repo Readme is a bit hard to understand
<dmbaturin> It's a bit out of sync with my half-broken local copy. :)
<orbifx> kakadu: might give the wrong impressions to those easily spooked
toomuchtvrotsurb has quit [Remote host closed the connection]
poulpeux has joined #ocaml
<Kakadu> Well, The most obvious problem is that it point to the outdated tutorial
jeffmo has quit [Ping timeout: 268 seconds]
<Kakadu> orbifx: What concretely should I consider for rewriting?
toomuchtvrotsurb has joined #ocaml
jeffmo has joined #ocaml
<orbifx> kakadu: "There you can find my experience about interfacing OCaml and Qt." Where?
<orbifx> dmbaturin: val dmbaturin : coffee → α code ---- haha true
uggwar has left #ocaml [#ocaml]
freehck has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<orbifx> dmbaturin: did you write a lot BASH itself (the interpreter) or scripts for it?
slash^ has quit [Read error: Connection reset by peer]
<Drup> dmbaturin: you are a metaocaml function :O
swgillespie has joined #ocaml
poulpeux has quit [Quit: Leaving]
<dmbaturin> orbifx: I wrote a lot of scripts for it, sadly. I never touched its code, "no one knows the Bourne shell grammar anymore, even reading the code doesn't help". :)
gobbledigook has joined #ocaml
jave has quit [Ping timeout: 252 seconds]
<orbifx> lol
<orbifx> ok
<dmbaturin> vyconf is going to use a custom shell, I'm still to get to it. First things first.
marsam has joined #ocaml
marsam has quit [Remote host closed the connection]
marsam has joined #ocaml
<orbifx> dmbaturin: My intent is to have a minimal layer
<orbifx> do you have any more documentation anywhere for vyconf?
<dmbaturin> Not yet. I indeed should document design decisions made so far.
jave has joined #ocaml
<Drup> I read "minimal lawyer"
<Drup> I was confused
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<orbifx> Drup: I want a minimal lawyer too.. In Ocaml ideally :P
<dmbaturin> It's a replacement for the config backend of http://vyos.net , except reusable. In enterprise/service provider routers you usually want to be paranoid rather than minimal: if it fails, a lot of people are going to be upset. :)
<orbifx> what do you mean by config backend?
<orbifx> the program which controls the configurations on the server?
<dmbaturin> orbifx: Drup is an ocaml language lawyer and a public defender.
mobius-eng has joined #ocaml
<Drup> Er no, I'm not procedural enough
<dmbaturin> Yep. In vyos there's clear separation between components that manage the system-wide config tree and components that use it to generate actual configs for quagga etc.
<MercurialAlchemi> Drup: that actually made me laugh
antkong has quit [Quit: antkong]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nicoo> Drup: Well played.
<Drup> :D
<sgeisenh> gobbledigook: if d = [c,d,e], then d@[a,b] would result in a type error since d is a list of triples and [a,b] is a list of pairs
nullcatxxx_ has joined #ocaml
<sgeisenh> oops, my window was scrolled, sorry
ncthom91 has joined #ocaml
ncthom91 has quit [Max SendQ exceeded]
ncthom91 has joined #ocaml
ncthom91 has quit [Max SendQ exceeded]
<gobbledigook> haha sgeisenh that question was answered a long time ago
<gobbledigook> but thank you nonetheless :)
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<seliopou> rgrinberg1 how do you feel about adding dependencies to mustache?
mearnsh has quit [Ping timeout: 250 seconds]
mearnsh has joined #ocaml
<rgrinberg1> seliopou: depends on the dependency
<Drup> "core"
<Drup> </troll>
<orbifx> seliopou: like combing and other grooming features?
<rgrinberg1> core would be a no-no of course
<seliopou> nothing like a discussion of dependencies to get #ocaml riled up
<seliopou> :D
<seliopou> I was thinking ocamlgraph
<companion_cube> dependencies? where? where?
<rgrinberg1> companion_cube: nowhere, so we can settle down :P
<seliopou> i wrote some code to automatically resolve partial dependencies
<companion_cube> ^^
<seliopou> was gonna send a PR with it in a subpackage
<MercurialAlchemi> didn't somebody make a jinja2 clone, talking about templating?
<seliopou> but thought i'd ask beforehand
<companion_cube> I feel the relation to dependencies is another aspect in which OCaml and Haskell communities diverge
<MercurialAlchemi> I like mustache for simple things, but it's a bit limited
<seliopou> MercurialAlchemi: yeah https://github.com/tategakibunko/jingoo
<Drup> seliopou: you can basically assume ocamlgraph is installed on every opam instalation
<seliopou> ohhhhhh
<seliopou> :)
<rgrinberg1> seliopou: optional dependencies are usually ok
<seliopou> then the only issue is js bloat if people wanna use it there
<seliopou> MercurialAlchemi: i've got mustache to the point where I can use it as a general templating engine, with inheritance and whatnot
<Drup> This also hold for merlin's dependencies (yojson ...) and utop's dependencies (react, lambda-term ...)
<seliopou> only took a couple hours :)
* MercurialAlchemi twiddles his mustache
<companion_cube> Drup: why is ocamlgraph installed everywhere?
<seliopou> rgrinberg1 sup with all the oasis files being in .gitignore? if I change them want me to force include them?
<seliopou> ocamlgraph, btw, is an awesome library
<seliopou> just throwing it out there
swgillespie has joined #ocaml
<pippijn> seliopou: unless you have high scalability requirements
<pippijn> it's super generic, and that has a cost
<Drup> pippijn: are you talking about cross-functor inlining, or something different ?
<rgrinberg1> seliopou: my usage of oasis is a bit controversial - i don't check in the generated garbage
<companion_cube> it's not controversial
<Drup> seliopou: I agree
<companion_cube> I do the same on the developement branch
<companion_cube> then, I check generated stuff in for release
<seliopou> rgrinberg1: that is very controversial
<Drup> ocamlgraph is awesome <3
<seliopou> Drup: +1
<rgrinberg1> companion_cube: yeah i thought of doing it. too much work for little benefit
<rgrinberg1> who doesn't have oasis installed
<companion_cube> no work required
<Drup> seliopou: about templating, I would like to point out that I do my templating in plain OCaml, with functions, that support composition very well :3
<pippijn> Drup: I haven't used it in a while
<pippijn> when I used it, there was 3.12
<Drup> rgrinberg1: CI doesn't
<seliopou> Drup, hah. That's is preferable but I also don't want to recompile all the time during development
<companion_cube> CI doesn't install dependencies, really?
<seliopou> companion_cube: literally no work required. ;)
<pippijn> and it was super much slower than using "int array array" or something
<Drup> seliopou: that is why we have :awesome: separate compilation
<Drup> :tada:
<companion_cube> int array array is only for very dense graphs
<Drup> :D
<seliopou> Drup: way over my head, I'm an oasis user :P
<pippijn> companion_cube: yes, my graphs were very dense
<pippijn> and very large
<companion_cube> but still, I think ocamlgraph can accept those
<companion_cube> you need to implement the correct module type
<Drup> pippijn: there is an implement for dense graph
<companion_cube> anyway, what do people use ocamlgraph for?
<Drup> and worse case, as companion_cube said, you implement the base, and you get the goodies free
<pippijn> Drup: I may look into changing the code to use ocamlgraph
<seliopou> and the goodies are very good
<pippijn> I actually like that project a lot
<pippijn> and it could use some improvements
<pippijn> but I don't want it to become slower.. it's already slowish
<companion_cube> this doesn't answer the "what" -_-
<Drup> ah, well, graphs, duh :D
<companion_cube> I think I have none of those installed :D
<pippijn> I think I have a my-graph to ocamlgraph thing
<pippijn> for the goodies
<seliopou> oh rgrinberg1 i have a few other prs but don't want to innundate you :)
<pippijn> and using my-graph for the performance sensitive parts
averell has quit [Remote host closed the connection]
<Drup> pippijn: that kinda miss the point of ocamlgraph
<pippijn> what's the point?
<Drup> the point is to implement a generic things that "looks like a graph" (i.e. "is a module that answers Graph.Sig.G")
<Drup> and then you can happily apply functors on it to get all the algorithms
<Drup> You can still use your own structure
<Drup> you don't have to translate anything
<pippijn> maybe I have that
<pippijn> I don't remember
<Drup> it's just implementing the signature to get the goodies
* pippijn checks
<Drup> companion_cube: in opam, it's used for the // engine
<Drup> (graph of actions with dependencies, all that)
<pippijn> yes
<companion_cube> ok, I see
<Drup> companion_cube: I used it for https://github.com/Drup/llvmgraph
<companion_cube> (although, writing a topological sort is really trivial)
whitequark has joined #ocaml
<pippijn> the module implements everything :P
<whitequark> adrien: ping
<whitequark> I might want to use ypkg (or was it yypkg)?
<adrien> whitequark: pong
<pippijn> for Hashtbl.Make, Map.Make, Graph.*
<adrien> (although I'm not too far from bed)
<adrien> whitequark: yypkg
<whitequark> I need a package manager that works on Windows and Linux and is not a bucket of shit, like conda is
<adrien> never heard of it
<pippijn> Drup: so yeah
^elyse^ has quit [Quit: Leaving]
<pippijn> seems I did it right
<whitequark> it's a python thing that is one of the most frustrating pieces of software I ever had the displeasure to use
<Drup> :D
<pippijn> but the algorithms were a lot slower than my implementations
<adrien> :)
<Drup> whitequark: source or blob ?
orbifx has quit [Quit: WeeChat 1.3]
<whitequark> Drup: blob only
<whitequark> hence, not opam
<Drup> why not 0install ?
<pippijn> maybe I didn't try a dense graph impl
<whitequark> hm.
<whitequark> adrien: why not 0install?
<Drup> :D
<MercurialAlchemi> whitequark: I don't know conda, but how do you like msbuild?
<pippijn> only a hashmap and a treemap based one, I think
<companion_cube> oh, hi whitequark
<whitequark> MercurialAlchemi: that's windows-only, isn't it?
<whitequark> companion_cube: hi
<whitequark> MercurialAlchemi: mostly we have "python setup.py install" as the build system
<MercurialAlchemi> Mercuria1Alchemi: so far, but they're going to infect other platforms
<pippijn> Conda is an open source package management system and environment management system for installing multiple versions of software packages and their dependencies and switching easily between them.
<adrien> whitequark: if you want to have a quick look, you can install win-builds for "native usage" (i.e. not cygwin nor msys) and then run the yypkg.exe binary (or is it "win-builds.exe") that goes inside the "bin" directory
<MercurialAlchemi> er, whitequark
<adrien> whitequark: because back then it was in python :P
<whitequark> MercurialAlchemi: well, I need it right now
<whitequark> adrien: oh
<MercurialAlchemi> this was in the "comparison of shitty software" spirit
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adrien> more seriously, it was quite different and as far as I know it's not really meant for distributions
<MercurialAlchemi> not in "this is software you should use"
<whitequark> so you have no particular objection to 0install
<MercurialAlchemi> (just don't)
<whitequark> hm
<adrien> but in your case, I was also going to say you shouldn't forget to evaluate it :)
<whitequark> adrien: my use case is distributing a bunch of python code plus a bunch of its native dependencies such as qt
<adrien> (heart attack)
<adrien> (Qt)
<whitequark> I don't have any problems with Qt...
<adrien> whitequark: as a single package?
<MercurialAlchemi> whitequark: you can't sell them on virtualbox appliances?
ceryo has quit [Quit: Textual IRC Client: www.textualapp.com]
<adrien> whitequark: its build is most-awfulest
<whitequark> adrien: no, as different packages
<whitequark> mostly because it would take forever to build everything
<seliopou> Drup: the rectangle bug has to be due to iter_selection
<Drup> seliopou: I would not be surprised by that
<whitequark> MercurialAlchemi: I don't sell it, it's federally funded FOSS, and unfortunately no
<seliopou> gonna see if i can swap in append and make it work
<Drup> I'm gonna be honest and say that my thinking was "I will show it to seliopou, and he will figure out a nice way to write it correctly"
<seliopou> lol
<seliopou> i can do that
<seliopou> btw had no idea tyxml is what it is
<Drup> seliopou: what did you though it was ?
<seliopou> meaning, i didn't know that the underlying representation was completely abstracted
<Drup> ah, yes
<seliopou> which is cool
<Drup> it opens various interesting properties
<Drup> and suddendly, there are 8 instanciations of Html combinators in eliom
<seliopou> haha
<seliopou> well, there's that to
<Drup> seliopou: at the moment, the syntax extension that interprets html as tyxml combinators is a bit in the mist
<seliopou> with camlp4 -> ppx transition
<seliopou> like like lord of the rings, the age of magic is over
<Drup> but, once it's back alive again, it will mean you can write svg and have it inside d3 elements, which is not possible in d3 itself, because it relies on innerHtml
<adrien> whitequark: well, it's difficult to tell: I really don't have enough experience with 0install to say; in any case, you can play with yypkg on windows easily so you can tell for yourself
<Drup> and I find that deeply delicious
* MercurialAlchemi finds his delicious bed
<MercurialAlchemi> night folks
<Drup> o/
<seliopou> well, if you use the module that you've written, along with the cast and the d3 `call()` operator, it should be doable-ish now
<seliopou> the only issue is static stuff
<Drup> seliopou: yes, but I meant, you can't use the xml syntax
<seliopou> ah
<seliopou> yeah that's weet
<seliopou> sweet
<Drup> (I consider not using the xml syntax a good point, though)
<adrien> whitequark: the packaging with yypkg is fairly basic; what I do in practice is use a template metadata file generated through the --template option and pipe it to 'yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${DESTDIR}/${PREFIX}"' with YYOUTPUT being a directory and --directory being the directory from where to start the archive creation
<Drup> seliopou: another interesting property is that you can write target-agnostic templates
<adrien> (the template needs some changes, the non-obvious one being that ${TGT} should be deleted if it's not set; others could actually be anything)
swgillespie has joined #ocaml
<whitequark> hm
<whitequark> just checking, does yypkg work on linux too?
<adrien> yes; I do all the packaging on linux
<whitequark> alright
<adrien> it actually works on os x and bsd too
<whitequark> is the dependency resolution ok?
<adrien> it's very basic
<whitequark> right now I have realized that in conda you cannot even require a specific build of a package
<whitequark> because it crashes with an assertion failure
<adrien> "you want X and it depends on Y and Z? I'll install Y and Z too without asking"
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<adrien> hmm
<whitequark> can I require a specific version of X and have it downgrade Y and Z too (possibly with appropriately set metadata)?
<adrien> the repository in yypkg only exposes the latest package build
<whitequark> oh, then yypkg is unsuitable for me.
<adrien> but I don't really understand the usecase
<whitequark> we distribute nightlies to end users and sometimes they're broken, but you have work to do
<adrien> ah
<whitequark> so you roll back to an earlier version
<seliopou> hmmm type errors
<adrien> you can have several repos
<whitequark> that's ridiculous
<whitequark> I mean, sometimes there's ten builds per day
<adrien> yeah, I understand
jwatzman|work has quit [Quit: jwatzman|work]
<adrien> the approach is quite different
<adrien> I'm curious: how do you handle (or want to handle) the UI for that?
<adrien> if you have ten builds per day then the UI can become crowded
<whitequark> conda does not have a GUI
<adrien> heh, it helps avoid the issue
<whitequark> there is no need for GUI, this is software for scientists, who are ok with command line
<whitequark> except half the labs use windows for whatever reason
<adrien> lucky you
<adrien> less lucky you
<whitequark> labview is probably part of it
<adrien> far less lucky you :P
<whitequark> fortunately, I only write python
<whitequark> (un)fortunately
<adrien> :)
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mac10688 has joined #ocaml
<adrien> need to go to bed now :)
<adrien> maybe I should revisit that last aspect of yypkg because I've been a bit annoyed with making experimental/development builds avaiable
^elyse^ has joined #ocaml
<adrien> there are at least: stable / ready for next version / probably ready for next version / it seems ok / all I can say is that it builds
ygrek has quit [Ping timeout: 260 seconds]
mobius-eng has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
rgrinberg1 has quit [Ping timeout: 252 seconds]
antkong has joined #ocaml
<orbifx> kakadu: are you planning on refreshing any documentation, links, pushing newer code before I try to use lablqt?
^elyse^ has quit [Quit: Leaving]
<Kakadu> orbifx: code -- definitely not
<Kakadu> I should update some links probably
<orbifx> but you are going to continue maintaining it?
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
lobo has quit [Quit: leaving]
ygrek has joined #ocaml
<Kakadu> orbifx: I'm planning to
<orbifx> ok
Kakadu has quit [Remote host closed the connection]
gobbledigook has joined #ocaml
nullcatxxx_ has joined #ocaml
ivan\ has quit [Ping timeout: 244 seconds]
raphaelss has quit [Read error: Connection reset by peer]
ivan\ has joined #ocaml
ncthom91 has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
smtb has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 246 seconds]