<Nazral>
I'll figure out how to do the contenteditable thingy thing :D
<j0sh>
huh, do Lwt.async/ignore_result do a deep copy of their closures? I have a Lwt_stream.next that is returning the same result across multiple Lwt.async calls
<aantron>
Algebr: how did parsing github-flavored markdown with omd work out for you?
<Algebr>
aantron: inconclusive yet
Prostetnic has joined #ocaml
<Algebr>
will get answer soon
<aantron>
thinking about markdown.. wonder how good a fit it would be for doc comments, too
<j0sh>
Drup: ah that looks like the problem. yeah, i knew something was weird there, a deep copy was the only thing i could think of that explains the behavior
Prostetnic has quit [Quit: Leaving]
<Algebr>
aantron: yea, would be decent
<Algebr>
stackoverflow does that
<j0sh>
welp, that's the first time i've had to use lwt mutexes. multi consumer streams working here now...
<j0sh>
i think effects might be nice for this too. wonder if effects make sense in a non-threaded context
<Drup>
j0sh: do you really need the stream ?
<companion_cube>
j0sh: no, it's a limitation of sequence
<companion_cube>
you can't iterate on two sequences in lockstep
<Drup>
companion_cube: well, he can :)
<companion_cube>
conversion to Lwt_stream? that's got to be slow
<companion_cube>
I'll take a look tomorrow
<companion_cube>
anyway I don't remember if the structure underlying Sequence.persistent is public, might help
<Drup>
j0sh: Pretty sure you are not using constant space, though
des has joined #ocaml
des is now known as Guest12410
<j0sh>
Drup: well it definitely does more allocations compared to just using a list for intermediate storage, but the storage doesn't need to accumulate after the stream element is consumed
<Drup>
Yes, if I'm not mistaken, it's going to dump the sequence into the stream
<Guest12410>
kind peeps: i want to "stub-out" some functions with their type signatures but without implementations, roughly like [Python's "pass"] or [Elm's Debug.crash]. Is there built-in with signature roughly (string -> 'a)? Thanks!
<Drup>
so you have a stream of len = len b
<Drup>
Guest12410: assert false
<j0sh>
Drup: i guess it depends on how lwt thread scheduling works in the push function. maybe i could wait on a condvar after pushing to make sure the element is consumed
<Nazral>
Error: This expression has type Dom_html.keyboardEvent Js.t Lwt.t but an expression was expected of type unit
<aantron>
line number?
seangrove has joined #ocaml
<Nazral>
15
<aantron>
well
<aantron>
you are binding key css_el to ()
<aantron>
or rather () to "key css_el"
<aantron>
you "let () =" means "the result of this whole expression has to be unit"
<Nazral>
ah right
<aantron>
if you want to force it to be unit, do |> ignore
<Nazral>
thanks
<aantron>
but i am not sure if it will actually run then, given this is inside Lwt :) been a while since i used js_of_ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
<asdf12z__>
is a unit type to be thought of as like 'null' ? a type that has not value?
<asdf12z__>
no*
<aantron>
its "sort of" like null. its a type that has exactly one value though
<aantron>
you can think of it as a dummy value that is otherwise meaningless
<asdf12z__>
ok
seangrove has quit [Ping timeout: 276 seconds]
<aantron>
well, 'unit' is used kind of like 'void' in some other languages, rather than 'null', sorry
<aantron>
how 'null' is used corresponds to how the value None is used in OCaml
<aantron>
roughly
<ggole_>
Rather than having no value, you can think of it having no information.
struk|desk is now known as struk|desk|away
<asdf12z__>
in this example let create () = { sum = 0.; sum_sq = 0.; samples = 0 } , why is () needed? for creating a record type, is it because this particular record type is mutable?
<Algebr`>
because you want to make a new one each time create is called
<Algebr`>
without () then it would be a constant
<aantron>
yes, if the goal is to create multiple separate records. you turn create into a function, so that the record expression is evaluated each time the function is called
<aantron>
instead of being evaluated once when create is defined
<Nazral>
wooh it works \o/
<aantron>
:)
<Nazral>
I can edit the css of my page by editing a <pre contenteditable>
seangrove has joined #ocaml
pierpa has quit [Ping timeout: 252 seconds]
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 240 seconds]
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 276 seconds]
copy` has quit [Quit: Connection closed for inactivity]
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 252 seconds]
<asdf12z__>
:o i just compiled a ocaml program for the first time, it's just a small example, the binary is 17MB?
ggole_ has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
ggole__ has quit [Ping timeout: 244 seconds]
<Algebr`>
did you use core
<asdf12z__>
yea, i'm guessing as my source grows it'll probably stay the same in size and most of the size comes from core
deavidsedice has quit [Ping timeout: 240 seconds]
larhat has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
snhmib has quit [Quit: WeeChat 1.3]
aantron has quit [Remote host closed the connection]
malc_ has joined #ocaml
tane has joined #ocaml
snhmib has joined #ocaml
mettekou has joined #ocaml
julien__ has joined #ocaml
Algebr` has quit [Ping timeout: 240 seconds]
julien__ has quit [Ping timeout: 244 seconds]
rand__ has joined #ocaml
MercurialAlchemi has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
arquebus has joined #ocaml
pgiarrusso has quit [Quit: pgiarrusso]
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mettekou has joined #ocaml
mettekou has quit [Client Quit]
* Maxdamantus
came to an awesome realisation earlier.
<Maxdamantus>
When defining the identity monad in a system without implicit monad resolution (like Haskell (the implicit bit)), everything actually is the identity function!
<Maxdamantus>
module IdentityM = struct type 't f = 't let return = id let map = id let join = id end
<Maxdamantus>
even that type definition is just the identity function.
<Drup>
You probably have something not uptodate somewhere, and the constraints are not precise enough
<Nazral>
running that
<Nazral>
Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).
<Nazral>
- camlp4.4.03 is not available because your system doesn't comply with ocaml-version >= "4.03".
<Nazral>
- ocamlbuild.0.9.0 is not available because your system doesn't comply with ocaml-version >= "4.03".
<Nazral>
oh
<Nazral>
when running with verbose
<Drup>
that's unimportant
hxegon has joined #ocaml
<Drup>
I'm not sure, sorry
Pepe_ has joined #ocaml
<Nazral>
thanks anyway
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<Nazral>
any idea what the dsfo package is ?
lokien has quit [Ping timeout: 240 seconds]
rand__ has quit [Quit: leaving]
lokien has joined #ocaml
hcarty has quit [Quit: WeeChat 1.4]
Algebr` has joined #ocaml
larhat has quit [Quit: Leaving.]
Algebr` has quit [Ping timeout: 260 seconds]
lokien has quit [Ping timeout: 260 seconds]
lokien has joined #ocaml
xavierm02 has joined #ocaml
<xavierm02>
Hi. If I have a type "type t = {x: int}" in a module M, and if I don't open M, I get an error "Unbound record field x". Adding "open M" fixes it but I'd like to only import the type and leave the rest in the module. How do I do that? Thansk in advance for your answers.
atsampson has quit [Ping timeout: 268 seconds]
<xavierm02>
In a way, "open M" is Python's "import * from M". How do I do "import thing from M"?
<Drup>
You can rebind things, type t' = M.t = { x : int}
<Drup>
but that's not a fabulous idea, In this case, you can simply use a type hint. let f (foo : M.t) = foo.x + 3
Kakadu has quit [Quit: Page closed]
malc_ has joined #ocaml
seangrove has joined #ocaml
<ggole_>
Or qualify the field reference
<ggole_>
r.M.field
<zozozo>
xavierm02: if foo is of type M.t, then foo.M.x works
seangrove has quit [Ping timeout: 244 seconds]
<xavierm02>
Alright so no magical solution. I'll just use a local open. Thanks :)
atsampson has joined #ocaml
<flux>
so nice that merlin works with ppx extensions.. 2.2 didn't seem to work with ppx_monadic but 2.3.1 now seems to do just fine.
xavierm02 has quit [Ping timeout: 252 seconds]
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 246 seconds]
struk|desk|away is now known as struk|desk
Denommus has joined #ocaml
mettekou has quit [Ping timeout: 244 seconds]
<flux>
is there some library that comes with let rec iter f xs = match xs with | [] -> M.return () | x::xs -> M.bind (f x) (fun () -> iter f xs) and friends?
FreeBirdLjj has joined #ocaml
<please_help>
Core's Monad module and >>|/monad map?
Denommus has quit [Remote host closed the connection]
<flux>
basically a list module that works on regular lists but invokes the operations inside the monad. I must've seen this library somehwere..
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
myst|fon has joined #ocaml
<please_help>
Core's list module (all collections, really) are monadic. You can do some_list >>| (fun x -> do_something x) which will be the same as some_list >>= (fun x -> return (do_something x)) which is to say List.bind some_list (fun x -> return (do_something x)) and will give you the empty list correctly if the input is the empty list.
mxv has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
elfring has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
cnu- has joined #ocaml
<Nazral>
Drup: so I got an answer to my oml problem, lacaml changed its API and oml isn't up to date yet, so downgrading lacaml made it work
<Drup>
Are the constraint in the opam repository getting updated ?
<Nazral>
no, but they are working on fixing oml
<Drup>
you still the constraint in the repository regardless ...
<Drup>
+need
<Nazral>
well, I can't do much about that :p
<aantron>
i think PR opam-repository
<Drup>
Actually, you can, everyone can fix them, but the maintaner should do it
<Nazral>
(they also have a makefile with opam install dsfo and opam doesn't list dsfo so you need to manually install the package from github and that seems like bad form
<Drup>
(But you can certainly yell at the maintaner :D)
<Nazral>
)
<Nazral>
Well, I can try to fix that then, where should I go ? :D
<aantron>
Nazral: do you know what is the maximum version of lacaml that current oml works with?
<Nazral>
I just closed the issue about it not installing properly
<Nazral>
damnit
seangrove has joined #ocaml
<Nazral>
oh someone commented
<aantron>
ah see, @dsheets is saying it too :)
<aantron>
:)
<Nazral>
Well, I reopened the issue
<aantron>
okay, so hopefully it will be taken care of in some hours or days, since they know about it
<Nazral>
I'm really excited about rewriting my code in ocaml :D
<aantron>
it seems given that lacaml is using semantic versioning, the right constraint is "lacaml" {< "8.0.0"}
<Nazral>
my advisor won't be happy but whateeeeveeeer
copy` has joined #ocaml
<aantron>
hah. what language is it in now?
<Drup>
matlab ? :]
<Nazral>
most of it in python
<Nazral>
no
<aantron>
Nazral: what field are you in?
<Drup>
Oh, it's not *that* awful :D
<Nazral>
it was in matlab, then I tried julia for a while, and it was working fairly well but then I started having to write too many things and my boss wanted to go fast so python
<Drup>
and ocaml has them ? I'm midly surprised, to be honest
butts_butts has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
leowzukw has joined #ocaml
<Nazral>
Drup: well, I'm not entirely sure, but I've been wanted to learn ocaml again so there is this motivation, and it seems that there are more complete libs
<Nazral>
and also I absolutely hated the way julia was handling images
<Nazral>
probably is
<aantron>
how does one create a custom META file fragment while using OASIS?
<Nazral>
In particular, the image type has a spatialorder component which is fairly confusing if you ask me. And they didn't have at the time any proper image transformation library so I wrote a very basic one and what I had to do is access the underlying array that was representing the pixels of the image in the image type
<Nazral>
then do my operations, then reconvert it to an image
rand__ has joined #ocaml
Kakadu has joined #ocaml
<Drup>
aantron: XMETARequires
<Nazral>
what is the equivalent of pcdata for a string that actually contains html elements ?
<aantron>
what i mean is getting OASIS to use a META template with # OASIS START # OASIS STOP # custom lines
<Drup>
aantron: ah. I'm not sure, I think there is something similar
darkf has quit [Quit: Leaving]
<aantron>
ill try just creating it and see what happens :)
<aantron>
Nazral: what exactly do you want to achieve?
<Nazral>
basically the el##.innerHTML = Js.string mystring but with tyxml syntax
<aantron>
which requires maintaining the version number, which cstruct hasnt done..
<aantron>
it seems like oasis wont both do substitution and allow you to use the oasis meta template simultaneously
monod is now known as monod2
monod2 is now known as monod
<aantron>
the other way of course is to build that library, either because its needed or as a dummy. lwt builds a library
leowzukw has quit [Quit: leaving]
Algebr` has joined #ocaml
axiles has quit [Ping timeout: 240 seconds]
hxegon has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
butts_butts has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
MercurialAlchemi has joined #ocaml
aantron has quit [Remote host closed the connection]
<copy`>
When trying to install conduit, opam wants to downgrade many packages (http://hastebin.com/zoseqezaqa.pas). Anybody know why that is?
<copy`>
Looks like a version constraint on async by conduit
Haudegen has joined #ocaml
rand__ has quit [Quit: leaving]
hxegon has quit [Quit: PEACE OUT]
max3 has quit [Ping timeout: 248 seconds]
aantron has joined #ocaml
<aantron>
Drup: is it reasonable to make tyxml 4.0 require ocaml 4.02?
<Drup>
I haven't decided yet
<Drup>
It's a non issue for the ppx, though
nicoo has quit [Remote host closed the connection]
<aantron>
well its an issue for the build system, so ill hold on off on dealing with it for now
<Drup>
Don't worry, I'll deal with it
nicoo has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
struktured has quit [Ping timeout: 268 seconds]
<aantron>
much appreciated
Algebr` has quit [Remote host closed the connection]
Algebr` has joined #ocaml
max3 has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
lordf has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
mxv has quit [Ping timeout: 246 seconds]
alexst has joined #ocaml
chindy has joined #ocaml
<haesbaert>
lordf has quit [Quit: leaving]
seangrove has quit [Ping timeout: 255 seconds]
axiles has joined #ocaml
segmond has quit [Ping timeout: 250 seconds]
monod has quit [Remote host closed the connection]
struk|desk|away is now known as struk|desk
ygrek_ has joined #ocaml
alexst has quit [Ping timeout: 240 seconds]
alexst has joined #ocaml
Algebr` has joined #ocaml
<asdf12z__>
i'm having trouble getting merlin setup i have a test.ml file and my .merlin is PKG core , my editor is sublime using the merlin plugin I can see when i add the .merlin file it no longer highlights core library definitions, so i assume its working but i get no popup autocompletio
<asdf12z__>
for the core library at least, i get autocompletion for standard ocaml keywords
<Algebr`>
is the merlin you're using also on the same switch as the merlin that has core installed?
<Algebr`>
as the switch that has core installed *
ggole_ has quit []
arquebus has joined #ocaml
<asdf12z__>
yea i removed the other switch i had to be sure just now
struk|desk is now known as struk|desk|away
arquebus has quit [Client Quit]
malc_ has joined #ocaml
max3 has quit [Ping timeout: 244 seconds]
yunxing has joined #ocaml
maverous has joined #ocaml
chindy has quit [Remote host closed the connection]
aantron has quit [Remote host closed the connection]
max3 has joined #ocaml
Denommus has quit [Ping timeout: 255 seconds]
nojb has joined #ocaml
nojb has quit [Client Quit]
Algebr` has quit [Ping timeout: 255 seconds]
struk|desk|away is now known as struk|desk
aantron has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
<ollehar>
hi! in my type system I want types to be promotable, e.g. int can be promoted to float if used with division, or string promoted to string buffer is used with concatination. types are represented with ADT. can I express a hierarchy with that technique?
<ollehar>
type ty = Int | String | Promotable of ty <--- but with certain restrictions.
<ollehar>
or
<ollehar>
type ty = Int | Float | String | StrintBuffer | Promotable of ref ty
<ollehar>
*StringBuffer
x77686d has joined #ocaml
wiredsister has joined #ocaml
<mrvn>
ollehar: objects
<mrvn>
(class Float = object inherit int ... end)
<ollehar>
yeah, maybe.
<mrvn>
or maybe other way around
vodkaInf1rno has joined #ocaml
al-maisan has joined #ocaml
<mrvn>
ollehar: you should divide types into classes first, arithmetic or text for example. Then int and float as members of arithmetic.
i0sys has joined #ocaml
<ollehar>
but it's a bit weird, isn't it?
Reventlov has quit [Ping timeout: 250 seconds]
<ollehar>
I mean, the objects wouldn't contain anything.
<ollehar>
well, worth a shot.
Haudegen has quit [Ping timeout: 268 seconds]
john51_ has quit [Remote host closed the connection]
companion_square has joined #ocaml
john51 has joined #ocaml
<mrvn>
you could have type 'a arithmetic and `Int arithmetic. Then divide is [< `Int | `Float ] aithemtic -> [< `Int | `Float ] aithemtic -> [`Float] arithmetic
Khady_ has joined #ocaml
tianon has joined #ocaml
<ollehar>
ah right
srcerer has quit [Ping timeout: 250 seconds]
srcerer_ has joined #ocaml
wagle has joined #ocaml
sigjuice has joined #ocaml
<mrvn>
But that's just another way of mapping your idea into ocamls type system. if you make your own you can do things differently.
Nahra has quit [Ping timeout: 264 seconds]
xaimus_ has joined #ocaml
struk|desk2 has joined #ocaml
struk|desk2 is now known as struk|desk|away
Nazral has quit [Ping timeout: 250 seconds]
bacam_ has joined #ocaml
patronus_ has joined #ocaml
boegel has quit [Ping timeout: 250 seconds]
luigy has joined #ocaml
<ollehar>
mrvn: my own what?
adrien_znc has quit [Ping timeout: 250 seconds]
edwin2 has joined #ocaml
adrien has quit [Ping timeout: 268 seconds]
martintrojer_ has joined #ocaml
Nazral has joined #ocaml
adrien_ has joined #ocaml
fantasticsid has joined #ocaml
<ollehar>
type system?
fds has joined #ocaml
Haudegen has joined #ocaml
vpm_ has joined #ocaml
<ollehar>
what are [< `Int] types called again?
<ollehar>
sum types?
<flux>
polymorphic variants
igitoor_ has joined #ocaml
ahf_ has joined #ocaml
aantron has quit [*.net *.split]
max3 has quit [*.net *.split]
al-maisan_ has quit [*.net *.split]
Khady has quit [*.net *.split]
gustav___ has quit [*.net *.split]
wolfcore has quit [*.net *.split]
ldg has quit [*.net *.split]
tg has quit [*.net *.split]
fold3 has quit [*.net *.split]
cthuluh has quit [*.net *.split]
ahf has quit [*.net *.split]
gbarboza has quit [*.net *.split]
struk|desk has quit [*.net *.split]
iosys has quit [*.net *.split]
cdidd has quit [*.net *.split]
cross has quit [*.net *.split]
xaimus has quit [*.net *.split]
bacam has quit [*.net *.split]
martintrojer has quit [*.net *.split]
mfp has quit [*.net *.split]
polaron has quit [*.net *.split]
mahem1 has quit [*.net *.split]
tokik has quit [*.net *.split]
tokenrove has quit [*.net *.split]
djellemah has quit [*.net *.split]
asmanur has quit [*.net *.split]
swistak35_ has quit [*.net *.split]
nullcatxxy_ has quit [*.net *.split]
teiresias has quit [*.net *.split]
hnrgrgr_ has quit [*.net *.split]
eagleflo_ has quit [*.net *.split]
j_king_ has quit [*.net *.split]
inr_ has quit [*.net *.split]
j0sh has quit [*.net *.split]
damason has quit [*.net *.split]
dinosaure has quit [*.net *.split]
low-profile has quit [*.net *.split]
vbmithr has quit [*.net *.split]
artart78 has quit [*.net *.split]
darius93 has quit [*.net *.split]
luzie has quit [*.net *.split]
MasseR has quit [*.net *.split]
pdewacht has quit [*.net *.split]
stux|RC has quit [*.net *.split]
tennix has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
mehdi_ has quit [*.net *.split]
julienXX has quit [*.net *.split]
tobiasBora has quit [*.net *.split]
sheijk has quit [*.net *.split]
hannes has quit [*.net *.split]
thegameg has quit [*.net *.split]
_2can has quit [*.net *.split]
Intensity has quit [*.net *.split]
jbrown has quit [*.net *.split]
clog has quit [*.net *.split]
ohama has quit [*.net *.split]
SHODAN has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
profan has quit [*.net *.split]
smondet has quit [*.net *.split]
orbitz has quit [*.net *.split]
i0sys is now known as iosys
SimonJF_ has joined #ocaml
<mrvn>
also phantom types in this case
ski has joined #ocaml
<ollehar>
flux: thanks
<ollehar>
mrvn: really...? I thought that was signature type stuff only.
wolfcore has joined #ocaml
gustav___ has joined #ocaml
tokenrove has joined #ocaml
igitoor_ has quit [Changing host]
igitoor_ has joined #ocaml
def` has joined #ocaml
cross has joined #ocaml
foolishmonkey has quit [Ping timeout: 268 seconds]
x77686d_ has joined #ocaml
adrien_znc has joined #ocaml
tg has joined #ocaml
ahf_ is now known as ahf
Mandus_ has joined #ocaml
tumdum has joined #ocaml
tumdum has joined #ocaml
[BNC]lokien has joined #ocaml
<ollehar>
isn't it possible to "tag" certain types in a ADT? so I can tag Int and Float as "arithmetic".
haelix_ has joined #ocaml
MightyJoe has joined #ocaml
tokik has joined #ocaml
alexst has quit [Quit: Lost terminal]
yunxing has quit [*.net *.split]
x77686d has quit [*.net *.split]
myst|fon has quit [*.net *.split]
lokien has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
cyraxjoe has quit [*.net *.split]
SimonJF has quit [*.net *.split]
tumdum_ has quit [*.net *.split]
zoobab_ has quit [*.net *.split]
ski_ has quit [*.net *.split]
reynir has quit [*.net *.split]
rossberg has quit [*.net *.split]
sz0 has quit [*.net *.split]
johnelse has quit [*.net *.split]
igitoor has quit [*.net *.split]
tvaalen has quit [*.net *.split]
theblatte has quit [*.net *.split]
jeroud has quit [*.net *.split]
ggherdov has quit [*.net *.split]
sspi has quit [*.net *.split]
mal`` has quit [*.net *.split]
Muzer has quit [*.net *.split]
tizoc has quit [*.net *.split]
jmasseo has quit [*.net *.split]
oskarth has quit [*.net *.split]
pootler_ has quit [*.net *.split]
l1x has quit [*.net *.split]
msch has quit [*.net *.split]
Mandus has quit [*.net *.split]
edwin has quit [*.net *.split]
riveter has quit [*.net *.split]
jun has quit [*.net *.split]
haelix has quit [*.net *.split]
mankyKitty has quit [*.net *.split]
x77686d_ is now known as x77686d
lukky513 has quit [Ping timeout: 276 seconds]
edwin2 is now known as edwin
igitoor_ is now known as igitoor
Algebr has quit [*.net *.split]
mietek has quit [*.net *.split]
vpm has quit [*.net *.split]
mattg has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
companion_cube has quit [*.net *.split]
rks` has quit [*.net *.split]
patronus has quit [*.net *.split]
phrst has quit [*.net *.split]
c-c has quit [*.net *.split]
johnelse has joined #ocaml
theblatt1 has joined #ocaml
tizoc` has joined #ocaml
MasseR has joined #ocaml
pdewacht has joined #ocaml
hannes has joined #ocaml
profan has joined #ocaml
jbrown has joined #ocaml
julienXX has joined #ocaml
dmbaturin has joined #ocaml
sheijk has joined #ocaml
ohama has joined #ocaml
_2can has joined #ocaml
SHODAN has joined #ocaml
clog has joined #ocaml
thegameg has joined #ocaml
orbitz has joined #ocaml
tobiasBora has joined #ocaml
tennix has joined #ocaml
stux|RC has joined #ocaml
smondet has joined #ocaml
mehdi_ has joined #ocaml
AlexRussia has joined #ocaml
Intensity has joined #ocaml
zoobab has joined #ocaml
cthuluh_ has joined #ocaml
mahem1_ has joined #ocaml
djellemah has joined #ocaml
asmanur has joined #ocaml
hnrgrgr_ has joined #ocaml
nullcatxxy_ has joined #ocaml
j_king_ has joined #ocaml
j0sh has joined #ocaml
swistak35_ has joined #ocaml
eagleflo_ has joined #ocaml
teiresias has joined #ocaml
inr_ has joined #ocaml
damason has joined #ocaml
vbmithr has joined #ocaml
artart78 has joined #ocaml
darius93 has joined #ocaml
luzie has joined #ocaml
dinosaure has joined #ocaml
low-profile has joined #ocaml
Muzer has joined #ocaml
johnelse has quit [Client Quit]
martintrojer_ has quit [Ping timeout: 268 seconds]
<ollehar>
mrvn: ok, I get what you mean with phantom types, from your example.
johnelse has joined #ocaml
cdidd has joined #ocaml
polaron has joined #ocaml
fold3 has joined #ocaml
riveter has joined #ocaml
tvaalen has joined #ocaml
jeffmo has joined #ocaml
jmasseo has joined #ocaml
Cypi_ has joined #ocaml
max3 has joined #ocaml
lukky513 has joined #ocaml
mattg has joined #ocaml
maverous has quit [Quit: WeeChat 1.3]
jlouis has joined #ocaml
martintrojer has joined #ocaml
SimonJF_ is now known as SimonJF
Algebr` has joined #ocaml
Reventlov has joined #ocaml
<mrvn>
ollehar: you can use the polymorphic variants as tag in an GADT
fantasticsid has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
<ollehar>
mrvn: I was thinking about GADT... Never used those.
<ollehar>
it's getting advanced here :)
oskarth has joined #ocaml
<mrvn>
but if you have one GADT for all your types you need the phantom types to limit ( / ) to int and float.
<ollehar>
why? (unless the explanation is too long for you)
<mrvn>
so (Text "foo") / (Text "bla") gives a type error
<ollehar>
what I'm looking for is type errors in the _compiler_, not the program being compiled.
<mrvn>
exactly
<mrvn>
If you have "type t = Int : int -> t | Text : string -> t" then you can't limit a function to just one of them. With phantom types you can.
<ollehar>
what about this example from the docs?
<ollehar>
type _ typ =
<ollehar>
| Int : int typ
<ollehar>
| String : string typ
<ollehar>
| Pair : 'a typ * 'b typ -> ('a * 'b) typ
<ollehar>
and using `arith typ` and `text typ` instead of int and string typ.
apache2_ has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
wiredsister has quit [Ping timeout: 244 seconds]
<ollehar>
so
<ollehar>
type _ typ =
<ollehar>
| Int : arith typ
<ollehar>
| Float : arith typ
jeffmo has joined #ocaml
<ollehar>
and
<ollehar>
| Promotable : typ typ??
<ollehar>
gah
vodkaInferno has joined #ocaml
zapu has joined #ocaml
mj12`_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
seliopou_ has joined #ocaml
badon_ is now known as badon
<ollehar>
| Promotable of typ : ... ?
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
mj12` has quit [Ping timeout: 276 seconds]
seliopou has quit [Ping timeout: 276 seconds]
polaron has quit [Ping timeout: 276 seconds]
fds has quit [Ping timeout: 276 seconds]
vodkaInf1rno has quit [Ping timeout: 276 seconds]
Maxdamantus has quit [Ping timeout: 276 seconds]
kakadu_ has joined #ocaml
DanielRi1hman has joined #ocaml
polaron has joined #ocaml
vpm_ has quit [Ping timeout: 276 seconds]
ygrek_ has quit [Ping timeout: 276 seconds]
Kakadu has quit [Ping timeout: 276 seconds]
stomp_ has quit [Ping timeout: 276 seconds]
Maxdamantus has joined #ocaml
nzyuzin has joined #ocaml
mrvn_ has joined #ocaml
stomp has joined #ocaml
vpm has joined #ocaml
tg has quit [Quit: Leaving]
fds has joined #ocaml
demonimin has joined #ocaml
tg has joined #ocaml
dmiller has joined #ocaml
<ollehar>
where arith is a type "family" (kind)?
ygrek_ has joined #ocaml
Madars has joined #ocaml
<ollehar>
| Promotable of ref typ : ...
<mrvn_>
type class other languages would say
<ollehar>
haskell?
zapu has quit [Ping timeout: 268 seconds]
ollehar has quit [Remote host closed the connection]
StatelessCat has joined #ocaml
stomp has quit [Ping timeout: 252 seconds]
cthuluh_ has quit [Ping timeout: 252 seconds]
asmanur has quit [Ping timeout: 252 seconds]
nullcatxxy_ has quit [Ping timeout: 252 seconds]
teiresias has quit [Ping timeout: 252 seconds]
hnrgrgr_ has quit [Ping timeout: 252 seconds]
artart78 has quit [Ping timeout: 252 seconds]
truncate has joined #ocaml
fds has quit [Ping timeout: 252 seconds]
vodkaInferno has quit [Ping timeout: 252 seconds]
riveter has quit [Ping timeout: 252 seconds]
zoobab has quit [Ping timeout: 252 seconds]
eagleflo_ has quit [Ping timeout: 252 seconds]
j0sh has quit [Ping timeout: 252 seconds]
dinosaure has quit [Ping timeout: 252 seconds]
vbmithr has quit [Ping timeout: 252 seconds]
darius93 has quit [Ping timeout: 252 seconds]
luzie has quit [Ping timeout: 252 seconds]
j0sh has joined #ocaml
demonimin has quit [Ping timeout: 252 seconds]
badon has quit [Ping timeout: 252 seconds]
mahem1_ has quit [Ping timeout: 252 seconds]
djellemah has quit [Ping timeout: 252 seconds]
swistak35_ has quit [Ping timeout: 252 seconds]
j_king_ has quit [Ping timeout: 252 seconds]
inr_ has quit [Ping timeout: 252 seconds]
damason has quit [Ping timeout: 252 seconds]
low-profile has quit [Ping timeout: 252 seconds]
j0sh is now known as Guest62553
damason has joined #ocaml
stomp has joined #ocaml
cow-orke1 has joined #ocaml
teiresias has joined #ocaml
eagleflo has joined #ocaml
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
zoobab has joined #ocaml
nullcatxxx_ has joined #ocaml
fds has joined #ocaml
wiredsister has joined #ocaml
inr_ has joined #ocaml
mahem1 has joined #ocaml
Algebr has joined #ocaml
mietek has joined #ocaml
jpdeplaix has joined #ocaml
phrst has joined #ocaml
c-c has joined #ocaml
rks` has joined #ocaml
edwin has quit [Ping timeout: 268 seconds]
edwin2 has joined #ocaml
wagle_ has joined #ocaml
edwin2 is now known as edwin
ollehar has joined #ocaml
<ollehar>
(sorry, was disconnected)
asmanur has joined #ocaml
<wiredsister>
Question: why do I need to provide a dummy arg of () when all my arguments are labeled? I get why I need to do this for all optional arguments, but labels 'feels' like it shouldn't do that. I love labels and want to label ALL the things.
Pepe__ has joined #ocaml
maker has quit [Ping timeout: 244 seconds]
yunxing has joined #ocaml
swistak35 has joined #ocaml
cthuluh has joined #ocaml
hnrgrgr has joined #ocaml
gbarboza has joined #ocaml
luzie has joined #ocaml
tg has quit [*.net *.split]
tokik has quit [*.net *.split]
ahf has quit [*.net *.split]
Nazral has quit [*.net *.split]
wagle has quit [*.net *.split]
iosys has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
__rlp_ has quit [*.net *.split]
jerith has quit [*.net *.split]
ia0 has quit [*.net *.split]
vishesh has quit [*.net *.split]
systmkor has quit [*.net *.split]
cow-orker has quit [*.net *.split]
please_help has quit [*.net *.split]
maufred has quit [*.net *.split]
vbmithr has joined #ocaml
badon has joined #ocaml
jerith has joined #ocaml
riveter has joined #ocaml
__rlp has joined #ocaml
artart78 has joined #ocaml
artart78 has joined #ocaml
thegameg has quit [Ping timeout: 240 seconds]
clog has quit [Ping timeout: 240 seconds]
mrvn_ has quit [Ping timeout: 270 seconds]
theblatt1 has quit [Ping timeout: 240 seconds]
tizoc` has quit [Ping timeout: 240 seconds]
MasseR has quit [Ping timeout: 240 seconds]
pdewacht has quit [Ping timeout: 240 seconds]
julienXX has quit [Ping timeout: 240 seconds]
hannes has quit [Ping timeout: 240 seconds]
dmbaturin has quit [Ping timeout: 240 seconds]
profan has quit [Ping timeout: 240 seconds]
hannes has joined #ocaml
teiresias has quit [Ping timeout: 240 seconds]
lukky513 has quit [Ping timeout: 240 seconds]
stux|RC has quit [Ping timeout: 240 seconds]
tennix has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
mehdi_ has quit [Ping timeout: 240 seconds]
tobiasBora has quit [Ping timeout: 240 seconds]
sheijk has quit [Ping timeout: 240 seconds]
_2can has quit [Ping timeout: 240 seconds]
Intensity has quit [Ping timeout: 240 seconds]
jbrown has quit [Ping timeout: 240 seconds]
ohama has quit [Ping timeout: 240 seconds]
SHODAN has quit [Ping timeout: 240 seconds]
smondet has quit [Ping timeout: 240 seconds]
orbitz has quit [Ping timeout: 240 seconds]
ski_ has joined #ocaml
foolishmonkey has joined #ocaml
sz0 has joined #ocaml
rossberg has joined #ocaml
mankyKitty has joined #ocaml
ggherdov has joined #ocaml
jun has joined #ocaml
sspi has joined #ocaml
jeroud has joined #ocaml
msch has joined #ocaml
myst|fon has joined #ocaml
reynir has joined #ocaml
boegel has joined #ocaml
groovy2shoes has joined #ocaml
l1x has joined #ocaml
mal`` has joined #ocaml
pootler_ has joined #ocaml
ia0 has joined #ocaml
TheLemonMan has joined #ocaml
tennix has joined #ocaml
l1x has quit [Max SendQ exceeded]
reynir has quit [Max SendQ exceeded]
sz0 has quit [Max SendQ exceeded]
ggherdov has quit [Max SendQ exceeded]
orbitz has joined #ocaml
vodkaInferno has joined #ocaml
dexterph has quit [Ping timeout: 268 seconds]
dmbaturin has joined #ocaml
reynir has joined #ocaml
theblatte has joined #ocaml
profan has joined #ocaml
ski has quit [Remote host closed the connection]
darius93 has joined #ocaml
_2can has joined #ocaml
teiresias has joined #ocaml
mrvn has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
<mrvn>
and we're back
SHODAN has joined #ocaml
bitemyapp has quit [Read error: Connection reset by peer]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
martintrojer has quit [Ping timeout: 271 seconds]
infinity0 has quit [Ping timeout: 276 seconds]
nopf has quit [Ping timeout: 276 seconds]
tizoc has joined #ocaml
j_king has joined #ocaml
martintrojer_ has joined #ocaml
mehdi__ has joined #ocaml
l1x has joined #ocaml
tokik has joined #ocaml
please_help has joined #ocaml
julienXX has joined #ocaml
pdewacht has joined #ocaml
ohama has joined #ocaml
boegel|quassel has joined #ocaml
deko-pyon has joined #ocaml
lukky513 has joined #ocaml
j_king has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
j_king has joined #ocaml
max3 has quit [Ping timeout: 402 seconds]
fold3 has quit [Ping timeout: 402 seconds]
oskarth has quit [Ping timeout: 268 seconds]
<Anarchos>
Ocaml 4.03.0 is not tagged on git ?
thegameg has joined #ocaml
reynir is now known as Guest28225
boegel has quit [*.net *.split]
foolishmonkey has quit [*.net *.split]
myst|fon has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
rossberg has quit [*.net *.split]
jeroud has quit [*.net *.split]
sspi has quit [*.net *.split]
mal`` has quit [*.net *.split]
pootler_ has quit [*.net *.split]
msch has quit [*.net *.split]
jun has quit [*.net *.split]
mankyKitty has quit [*.net *.split]
iosys has joined #ocaml
MorTal1ty has joined #ocaml
stux|RC-only has joined #ocaml
sz0 has joined #ocaml
yunxing has quit [Remote host closed the connection]
MasseR has joined #ocaml
zapu has joined #ocaml
yunxing has joined #ocaml
mankyKitty has joined #ocaml
jbrown has joined #ocaml
Anarchos has quit [Client Quit]
tobiasBora has joined #ocaml
pootler_ has joined #ocaml
sheijk has joined #ocaml
AlexRussia has joined #ocaml
Guest28225 has quit [Ping timeout: 268 seconds]
yunxing has quit [Ping timeout: 264 seconds]
regnat has quit [Ping timeout: 276 seconds]
mal`` has joined #ocaml
lpaste has joined #ocaml
smondet has joined #ocaml
Guest28225 has joined #ocaml
rossberg has joined #ocaml
fold4 has joined #ocaml
ahf has joined #ocaml
igitoor has quit [Ping timeout: 268 seconds]
jeroud has joined #ocaml
tg has joined #ocaml
infinity0 has joined #ocaml
foolishmonkey has joined #ocaml
infinity0 has joined #ocaml
tobiasBora has quit [Ping timeout: 276 seconds]
infinity0 has quit [Changing host]
groovy2shoes has joined #ocaml
igitoor has joined #ocaml
Guest62553 has quit [Ping timeout: 276 seconds]
sspi has joined #ocaml
yminsky has joined #ocaml
x77686d_ has joined #ocaml
kakadu_ has quit [Write error: Broken pipe]
msch has joined #ocaml
kakadu_ has joined #ocaml
myst|fon has joined #ocaml
Haudegen has quit [Write error: Broken pipe]
igitoor has joined #ocaml
igitoor has quit [Changing host]
martintrojer_ has quit [Ping timeout: 268 seconds]
stephe has joined #ocaml
oskarth has joined #ocaml
mcc has joined #ocaml
tane has quit [Quit: Verlassend]
Haudegen has joined #ocaml
ousado_ has quit [Ping timeout: 244 seconds]
x77686d has quit [Ping timeout: 366 seconds]
x77686d_ is now known as x77686d
pdewacht has quit [Ping timeout: 268 seconds]
pdewacht has joined #ocaml
strmpnk has joined #ocaml
ousado_ has joined #ocaml
sheijk has quit [Ping timeout: 268 seconds]
ohama has quit [Remote host closed the connection]
ggherdov has joined #ocaml
emmanueloga has joined #ocaml
Riviera has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
Algebr has quit [*.net *.split]
mietek has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
rks` has quit [*.net *.split]
phrst has quit [*.net *.split]
c-c has quit [*.net *.split]
foolishmonkey has quit [Quit: Leaving]
wiredsister has quit [Ping timeout: 260 seconds]
lopex has joined #ocaml
tobiasBora has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
regnat has joined #ocaml
sheijk has joined #ocaml
MasseR has quit [Ping timeout: 268 seconds]
martintrojer has joined #ocaml
j0sh has joined #ocaml
j0sh is now known as Guest75952
jun has joined #ocaml
dinosaure has joined #ocaml
ohama has joined #ocaml
acieroid` has joined #ocaml
tumdum has quit [Ping timeout: 244 seconds]
tumdum has joined #ocaml
tumdum has quit [Changing host]
tumdum has joined #ocaml
MasseR has joined #ocaml
seako has joined #ocaml
mietek has joined #ocaml
max3 has joined #ocaml
max3 has quit [Remote host closed the connection]
teknozulu has joined #ocaml
clockish has quit [Ping timeout: 264 seconds]
Guest75952 has quit [Ping timeout: 244 seconds]
j0sh__ has joined #ocaml
clockish has joined #ocaml
kakadu_ has quit [Remote host closed the connection]