mistermetaphor has quit [Remote host closed the connection]
Algebr has joined #ocaml
<Algebr>
I am doing OCaml office hours this Saturday in San Francisco, fyi for anyone else in Bay Area.
bba has joined #ocaml
silver has quit [Quit: rakede]
rgrinberg has joined #ocaml
darkf has joined #ocaml
walter|r has joined #ocaml
demonimin has quit [Ping timeout: 276 seconds]
demonimin has joined #ocaml
kamog has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 250 seconds]
demonimin has joined #ocaml
solrize has joined #ocaml
demonimin has quit [Ping timeout: 276 seconds]
demonimin has joined #ocaml
Reshi has joined #ocaml
ryanartecona has joined #ocaml
FreeBirdLjj has joined #ocaml
demonimin has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sh0t has quit [Ping timeout: 244 seconds]
demonimin has joined #ocaml
scarygelatin has quit [Quit: Leaving]
jeffmo has quit [Quit: jeffmo]
rishi has joined #ocaml
rishi is now known as Guest49265
Reshi has quit [Ping timeout: 244 seconds]
Guest49265 has quit [Read error: Connection reset by peer]
<struk|desk>
Algebr: damn I was there last weekend
Reshi has joined #ocaml
<destrius>
are there any guides to implementing heterogenous lists using GADTs?
<destrius>
hopefully using ocaml, and not haskell, which seems to be what all of the tutorials online are using
<struk|desk>
destrius: if u find one please post the link here
walter|r has quit [Remote host closed the connection]
<destrius>
i'm reading the paper on implementing format strings using GADTs now, maybe that will help a bit
<destrius>
ok, it didn't help
<struk|desk>
doh
<destrius>
when in doubt, i guess you go to github and read the sources
johnelse has quit [Ping timeout: 252 seconds]
<Algebr>
Drup showed an Any GADT once I remember
<destrius>
i'm looking at core's Univ and Univ_map now
kushal has quit [Ping timeout: 240 seconds]
<destrius>
basically, i have some data stored as tuples of heterogenous values. i want to write some kind of functor that lets me mint modules given a "spec" of the tuple, .e.g (int, string, string), which does the validation that the data is of the right type once, and after that lets me access the values without having to do a second pattern match
<destrius>
i think using Univ_map might be the right answer
<destrius>
still figuring it out tho
johnelse has joined #ocaml
<struk|desk>
destrius: seems achieable with functors alone
<struk|desk>
*achievable
struktured has joined #ocaml
mistermetaphor has joined #ocaml
dsheets has joined #ocaml
<Algebr>
struk|desk: ah, you should have messaged me!
MercurialAlchemi has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
kushal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ski has joined #ocaml
FreeBirdLjj has joined #ocaml
<destrius>
struk|desk: the problem is that the spec is of variable length, so i can't use tuples like ('a * 'b * 'c)
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
<Algebr>
destrius: with variable length, tuples probably won't be a good choice
<destrius>
yeah, i'm not using tuples
<destrius>
i'm reaching a point where i think what i want to do cannot be expressed purely in ocaml's type system
<destrius>
think it needs dependent typing or something
<destrius>
essentially the return type of the getter function is dependent on the index being requested for
<Algebr>
you really can't achieve your goals without this complexity?
<destrius>
i probably can, i'm just having a bout of ocd :P
<destrius>
or rather, i definitely can
<destrius>
i'm just trying to remove the need to pattern match a value that has already been validated
<destrius>
or rather, to have the type system express that validation has happened
<destrius>
but i don't really need to do that, i can just treat it as a known invariant of the api
<destrius>
i was justing wondering if it was possible to do so
aantron_ has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 260 seconds]
boegel has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
jinj has joined #ocaml
<Algebr>
destrius: are you in the Bay Area? If so we can meet up and bounce some ideas
<destrius>
nope, i'm pretty far away from the bay area
<destrius>
its 1:30pm where i am now
MercurialAlchemi has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
<Algebr>
ah, 10:45pm here.
A1977494 has joined #ocaml
struktured has quit [Ping timeout: 252 seconds]
* destrius
lives in singapore
alex1a has joined #ocaml
alex1a has quit [Max SendQ exceeded]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ocaml
avarsh has joined #ocaml
leyyin has joined #ocaml
nicholasf has quit [Ping timeout: 252 seconds]
djellemah_ has quit [Ping timeout: 250 seconds]
<destrius>
ok i kind of found an alternative solution that isn't as nice, but works
djellemah_ has joined #ocaml
<destrius>
time to do some actual work
octachron has joined #ocaml
avarsh has quit [Remote host closed the connection]
<Algebr>
always a good thing
<octachron>
destrius, for information having heterogeneous array/list with an access function is possible (but not really pretty)
Simn has joined #ocaml
Reshi has quit [Ping timeout: 240 seconds]
boegel has joined #ocaml
pierpa has joined #ocaml
g4143 has joined #ocaml
iosys has quit [Ping timeout: 264 seconds]
<destrius>
octachron: do you have any pointers to how it can be implemented?
iosys has joined #ocaml
<destrius>
also, is there a way to write a function that does a pattern match on a GADT, but does not make use of the "inner" type of the GADT?
<destrius>
not sure if i'm using the right words
<octachron>
destrius, the idea is mainly to use a special index type which extract the right type from the list
<destrius>
so the index is sort of like a peano number?
<octachron>
destrius, I am not sure I follow what do you mean by not using the "inner" type?
nicholasf has joined #ocaml
<octachron>
destrius, yes a peano number + some associated phantom types
<destrius>
or the index encodes the type that is returned by the index
<destrius>
ok
<destrius>
as i was futzing around it seemed like that was what you needed to do
<destrius>
and i decided to give up at that point :P
<destrius>
octachron: let me try to write a simple example
<destrius>
octachron: validate doesn't compile because: This pattern matches values of type string mytype but a pattern was expected which matches values of type a mytype
<destrius>
companion_cube: yup, in fact a map works better for what i need, but the backing data is in the form of a list
<destrius>
(an array, to be exact)
<companion_cube>
sounds nasty
<destrius>
i'm working with llvm, and want to map llvm llvalues to "proper" types
<octachron>
destrius, as a general rule, or patterns don't work with gadt
<octachron>
you need to write your 3 cases seperatedly
<destrius>
octachron: the hacky way i'm doing it now is having an auxillary function do the pattern match to return a dummy value of type a, and then ignoring it (and raising an exception if its invalid)
pyon has quit [Remote host closed the connection]
<destrius>
octachron: and that works, so i'm wondering why what i currently have isn't ok
<octachron>
destrius, I am betting that you are not using or pattern in your auxiliary function
<octachron>
i.e, you have "| String -> "" | Int -> 0"
<destrius>
i understand what you mean by the or pattern now
dsheets has quit [Ping timeout: 250 seconds]
<destrius>
and i can see why it would be a problem for GADTs, yes
<destrius>
thanks!
pyon has joined #ocaml
_2can has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 252 seconds]
octachron has quit [Quit: Leaving]
kamog has joined #ocaml
mettekou has joined #ocaml
dsheets has joined #ocaml
TheLemonMan has joined #ocaml
sepp2k has joined #ocaml
larhat has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
mettekou has quit [Read error: Connection reset by peer]
jwatzman|work has joined #ocaml
toolslive has joined #ocaml
amnn has joined #ocaml
silver has joined #ocaml
* aggelos__
looks at ocaml-lua
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Reshi has joined #ocaml
mettekou has joined #ocaml
dsheets has quit [Remote host closed the connection]
bba has joined #ocaml
dsheets has joined #ocaml
snhmib has quit [Quit: WeeChat 1.3]
kakadu has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
TheLemonMan has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
TheLemonMan has quit [Ping timeout: 250 seconds]
pierpa has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
TheLemonMan has joined #ocaml
Reshi has quit [Ping timeout: 246 seconds]
<zozozo>
what would be the correct way to use ocamldoc's "-intro <file>" option when calling it from ocamlbuild ? I can't find a tag that corresponds to this option
BitPuffin has joined #ocaml
<companion_cube>
I dont think there is any (see the myocamlbuild.ml)
<zozozo>
I find it sad that a myocamlbuild.ml is required when the tag system should be enough
ggole has joined #ocaml
<companion_cube>
agreed
<companion_cube>
maybe it's possible to contribute a new tag in ocamlbuild for that
thibm has joined #ocaml
Reshi has joined #ocaml
Maxdamantus has quit [Ping timeout: 276 seconds]
Maxdamantus has joined #ocaml
hcarty has joined #ocaml
tane has joined #ocaml
<ggole>
Niiice, the basic idea I've built this whole thing around is obviously wrong
<ggole>
Gotta love it when you focus on details instead of taking the time to understand wtf you are actually doing.
kushal has quit [Ping timeout: 252 seconds]
<zozozo>
ggole: what are you talking about ?
<ggole>
Just some code I'm writing
octachron has joined #ocaml
Maxdamantus has quit [Ping timeout: 244 seconds]
Maxdamantus has joined #ocaml
rgrinberg has joined #ocaml
jeffmo has joined #ocaml
jinj has quit [Quit: Page closed]
kamog has quit [Remote host closed the connection]
kakadu has quit [Ping timeout: 250 seconds]
mettekou has quit [Read error: Connection reset by peer]
aantron has joined #ocaml
<please_help>
Is there a way to install a package through opam while excluding a dependency that was installed separately?
Jaxan has quit [Remote host closed the connection]
Jaxan has joined #ocaml
<hcarty>
please_help: Installed outside of opam?
A1977494 has quit [Read error: Connection reset by peer]
<zozozo>
please_help: you can "fake install" a package using "opam install --fake"
A1977494 has joined #ocaml
<hcarty>
zozozo: Interesting, I didn't know that
<zozozo>
so that way you can install your already installed dependencies through opam, and then install your package normally
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<please_help>
thanks!
<zozozo>
though if possible, pinning your separately installed package would be better
kakadu has joined #ocaml
Maxdamantus has quit [Ping timeout: 244 seconds]
Maxdamantus has joined #ocaml
thibm has quit [Quit: WeeChat 1.4]
cdidd has quit [Remote host closed the connection]
nicholasf has quit [Remote host closed the connection]
copy` has joined #ocaml
cdidd has joined #ocaml
NingaLeaf has quit [Quit: Leaving]
Sorella has joined #ocaml
cdidd has quit [Remote host closed the connection]
sh0t has joined #ocaml
cdidd has joined #ocaml
infinity0 has quit [Ping timeout: 246 seconds]
<hcarty>
Hooray - oasis 0.4.6 installs under OCaml 4.03.0
infinity0 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
ryanartecona has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
cdidd has quit [Remote host closed the connection]
NingaLeaf has joined #ocaml
john51 has quit [Write error: Broken pipe]
Reshi has joined #ocaml
leyyin has quit [Remote host closed the connection]
john51_ has joined #ocaml
kolko has joined #ocaml
dsheets has quit [Remote host closed the connection]
nicholasf has joined #ocaml
<struk|desk>
Algebr: I might be moving to SF anyhow, or bay area
<Algebr>
on nice
Reshi has quit [Ping timeout: 276 seconds]
adrien_z- has joined #ocaml
i0sys has joined #ocaml
rwmjones_ has joined #ocaml
cdidd has joined #ocaml
infinity0 has quit [*.net *.split]
copy` has quit [*.net *.split]
A1977494 has quit [*.net *.split]
toolslive has quit [*.net *.split]
jwatzman|work has quit [*.net *.split]
iosys has quit [*.net *.split]
Simn has quit [*.net *.split]
badon has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
jun__ has quit [*.net *.split]
kolko_ has quit [*.net *.split]
ggherdov has quit [*.net *.split]
yminsky has quit [*.net *.split]
cojy has quit [*.net *.split]
Guest33283 has quit [*.net *.split]
rwmjones has quit [*.net *.split]
M-Illandan has quit [*.net *.split]
kyo91 has quit [*.net *.split]
adrien_znc has quit [*.net *.split]
chris2 has quit [*.net *.split]
i0sys is now known as iosys
nicholasf has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
infinity0 has joined #ocaml
Simn has joined #ocaml
jwatzman|work has joined #ocaml
kyo91 has joined #ocaml
Reshi has joined #ocaml
A1977494 has joined #ocaml
toolslive has joined #ocaml
jun__ has joined #ocaml
M-Illandan has joined #ocaml
chris2 has joined #ocaml
badon has joined #ocaml
fraggle_ has joined #ocaml
cojy has joined #ocaml
Guest33283 has joined #ocaml
bbc_ has joined #ocaml
yminsky has joined #ocaml
regnat has quit [Ping timeout: 276 seconds]
regnat has joined #ocaml
copy` has joined #ocaml
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
ggherdov has joined #ocaml
sepp2k has joined #ocaml
Reshi has quit [Quit: WeeChat 1.4]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
<Leonidas>
hcarty: nice, installing.
<Leonidas>
flambda is *noticably* slower at compiling
mistermetaphor has joined #ocaml
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
slash^ has joined #ocaml
shinnya has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 250 seconds]
mistermetaphor has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
nicholasf has joined #ocaml
mistermetaphor has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
doecnt has joined #ocaml
toolslive has quit [Ping timeout: 250 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
ygrek has joined #ocaml
larhat has quit [Quit: Leaving.]
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
dsheets has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 250 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
nicholasf has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 250 seconds]
ismaelga has joined #ocaml
kakadu has quit [Quit: Page closed]
doecnt has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
<gasche>
11:16 < Leonidas> flambda is *noticably* slower at compiling
<gasche>
that's my reason for using the without-flambda version as my default 4.03 switch for now
<gasche>
note that for a given project, you can tune the inlining parameters to regain some compilation time
<Leonidas>
gasche: yes, I will most likely do the same. I can still have a switch for "release builds" in case I need them.
ismaelga has quit [Remote host closed the connection]
Algebr has joined #ocaml
<flux>
so I guess the flambda-branch is slow without the -Ox optimizations as well?
<Algebr>
oasis on opam doesn't work with 4.03, =/
amnn has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
<hcarty>
Algebr: It should now
<hcarty>
Algebr: I tried 0.4.6 today and it worked
<Drup>
companion_cube: a special list that can have indent in the middle
<companion_cube>
no I mean, how do you recognize it?
<Drup>
I .. don't understand the question
<companion_cube>
hmmm, the parser does t he magic, I guess
<companion_cube>
lexer*
<companion_cube>
gah
<Drup>
newlines, as long as you don't change indentations, are ignored
<Drup>
yes, the magic is in the lexer, to emit INDENT and DEDENT tokens
<companion_cube>
yeah but in this case, the indentation comes after `:`
<companion_cube>
do you just take the offset from the beginning of the line?
<Drup>
yes
<companion_cube>
ok, I do the same anyway ^^
<Drup>
obviously, that's the only sane way ..
<companion_cube>
also, small trick to do is that in such blocks, a line with just "." is to be replaced by ""
A19774941 has quit [Remote host closed the connection]
<companion_cube>
(because yay)
<companion_cube>
anyway
<Drup>
Seriously, next time you are going to give shitty reasons, give the correct one directly "I didn't looked at your implem passed the one dependency I didn't like and just went on reimplementing mine"
<Drup>
It will be more honest
<companion_cube>
the TWO dependencies
<companion_cube>
well, sorry, I thought that removing sedlex was going to be a lot of work
<companion_cube>
I didn't see the point of menhir
<companion_cube>
(in this case)
<companion_cube>
so, that left me nothing
<Drup>
menhir will be useful for error messages
<companion_cube>
the 1% of them that don't come from the lexer?
<companion_cube>
if the lexer does all the work, it will also have to handle errors
<Drup>
It doesn't do all the work
<Drup>
It emits INDENT
<Drup>
the placement of those indents is not checked by the lexer