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