lordkryss has quit [Quit: Connection closed for inactivity]
q66 has quit [Quit: Leaving]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
venk has joined #ocaml
tlockney is now known as tlockney_away
ygrek has joined #ocaml
studybot has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
boogie has quit [Remote host closed the connection]
racycle has quit [Quit: ZZZzzz…]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
penglingbo has joined #ocaml
seanmcl has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
SethTisue has quit [Quit: SethTisue]
tristero has joined #ocaml
mfp has joined #ocaml
ygrek has joined #ocaml
pyon has quit [Remote host closed the connection]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
pyon has joined #ocaml
seanmcl has quit [Max SendQ exceeded]
studybot has joined #ocaml
pyon has quit [Remote host closed the connection]
michael_lee has joined #ocaml
tlockney_away is now known as tlockney
pyon has joined #ocaml
claudiuc has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
bcuccioli has joined #ocaml
<BitPuffin>
is there any conditional compilation in ocaml?
<BitPuffin>
so that I can compile out certain areas for different platforms etc
racycle has joined #ocaml
ivan\_ has joined #ocaml
ivan\_ has quit [Changing host]
ivan\_ has joined #ocaml
ivan\ has quit [Ping timeout: 276 seconds]
ivan\_ is now known as ivan\
__JokerDoom has quit [Quit: Leaving]
BitPuffin has quit [Ping timeout: 252 seconds]
jao has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 276 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
maattdd_ has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
siddharthv_away is now known as siddharthv
axiles has joined #ocaml
boogie has joined #ocaml
maattdd_ has quit [Ping timeout: 245 seconds]
arj has joined #ocaml
struktured has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
philtor has joined #ocaml
BitPuffin has joined #ocaml
ggole has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
tlockney is now known as tlockney_away
mcclurmc has quit [Remote host closed the connection]
camel_ has joined #ocaml
<camel_>
can you create new objects in runtime with ocaml?
<BitPuffin>
camel_: yes?
<camel_>
Uh, How you can, with macros?
<BitPuffin>
well what do you mean
<BitPuffin>
create new types or instances?
<camel_>
new classes
<BitPuffin>
ah, thought you meant class instances
<camel_>
I dont know if its sound true but it called meta object protocol
<camel_>
in cl
mcclurmc has joined #ocaml
<BitPuffin>
well I'm no ocaml wizard so I can't really give a good answer. But cl is dynamically typed etc and can compile itself while running and stuff. Don't know if ocaml can do that. It might be able to, I'm not sure. I guess what you could do is call the interpreter or something from your application
<BitPuffin>
or something like that
ygrek has quit [Ping timeout: 252 seconds]
Lutin` has quit [Ping timeout: 240 seconds]
<ggole>
No, OCaml is very static and doesn't provide that.
mcclurmc has quit [Ping timeout: 265 seconds]
<BitPuffin>
yeah it doesn't sound like a particularly great idea
<ggole>
No redefinition, etc
<BitPuffin>
you could probably hack something together though
<BitPuffin>
with lots of sweat
<BitPuffin>
and tears
<BitPuffin>
like implementing your own typesystem in ocaml or something lol
<camel_>
why new type system?
<BitPuffin>
because if you are not happy with the one that exists you'd probably have to create your own little mini language in ocaml
<camel_>
no i mean, cant i do with new extension points feature?
<flux>
extension points are 'evaluated' before the program is
<BitPuffin>
camel_: why do you want to do this anyway
<flux>
so your program is unable to affect the compilation process. because it is executed after it :)
<flux>
what you could do is generate .ml code, compile it with ocamlc and then use Dynlink to load it in
<flux>
of course you would not be able to use the new types declared in the compiled code, because your code using those types would need to be compiled before the other code even exists
<BitPuffin>
yeah flux that's also a thing I was thinking other than executing the interpreter from the program
boogie has quit [Remote host closed the connection]
Guest52496 has quit [Remote host closed the connection]
WraithM has quit [Quit: leaving]
WraithM has joined #ocaml
<camel_>
thank you both, flux you idea is so practical but i wish this could be in language itself
<camel_>
one last question, is call/cc posible in ocaml?
<BitPuffin>
again ocaml is a very static language
<BitPuffin>
we want as much guarantee as possible that if our code compiles it works, kinda
<BitPuffin>
creating new classes etc at runtime is scary
<camel_>
yeah, i think first class macros would be real problem for that
<mrvn>
camel_: no
philtor has quit [Ping timeout: 252 seconds]
<BitPuffin>
no, they would still be processed at compile time right?
<mrvn>
camel_: There are some truely horrible hacks with fork to make call/cc work but that isn't realy support for call/cc. Better use continuations.
<whitequark>
there's delimited continuations and they work
philtor has joined #ocaml
<whitequark>
work well, even
sgnb has joined #ocaml
claudiuc has joined #ocaml
<camel_>
work well? i think it would be performance problem
<adrien>
ygrek_: yeah, ocamlcore.org is dead it seems
<adrien>
no git, no forge, no http ='(
<adrien>
no ssh
<ygrek_>
nice
<ygrek_>
now need to tell opam to use mirrors
<ygrek_>
what is that magic command-line option?
<adrien>
jsut had to put up mirror for 4 sources
<BitPuffin>
mrvn, ygrek_ thanks!
alpounet has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
<ygrek_>
btw how does opam decide when to download from upstream url and when from opam.ocaml.org ?
venk has quit [Remote host closed the connection]
<orbitz>
ygrek_: for actually isntalling packages? It's the URL in the pacakge isn't it?
<ygrek_>
yes
<ygrek_>
that's a rhetorical sarcasm
<ygrek_>
err
<ygrek_>
last question is serious
<ygrek_>
:)
<ygrek_>
I think opam get's that information when it does update - whether the package has local +opam.tar.gz on the server
<ygrek_>
the url in the package point to upstream
pyon has quit [Remote host closed the connection]
pyon has joined #ocaml
Puffin has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
typedlambda has quit [Ping timeout: 252 seconds]
typedlambda has joined #ocaml
<orbitz>
oh ok, i'm not sure
bbarker has quit [Quit: Connection closed for inactivity]
yacks has quit [Ping timeout: 260 seconds]
Hannibal_Smith has joined #ocaml
yacks has joined #ocaml
Puffin is now known as BitPuffin
mcclurmc has joined #ocaml
Kakadu has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
ollehar has joined #ocaml
cago has joined #ocaml
Thooms has joined #ocaml
Simn has joined #ocaml
camel_ has quit [Ping timeout: 246 seconds]
eikke__ has joined #ocaml
<BitPuffin>
wat
<BitPuffin>
that doesn't look right
<BitPuffin>
in real world ocaml in the variants chapter it starts talking about adding an explicit type annotation and prefixing with # etc and it only shows the same code as previously
<BitPuffin>
or actually not even that
<BitPuffin>
less code
<BitPuffin>
bug in the book?
poindontcare has joined #ocaml
Lutin` has joined #ocaml
<Kakadu>
you probably need to reformulate question
<BitPuffin>
well the last code samples in that chapter don't seem to match the text
<BitPuffin>
they don't show what the text is talking about
<BitPuffin>
Kakadu: yeah, after "If we add an explicit type annotation to the code itself (rather than just in the mli), then the compiler has enough information to warn us:"
<BitPuffin>
and "Once we have type definitions at our disposal, we can revisit the question of how we write the pattern match that narrows the type. In particular, we can explicitly use the type name as part of the pattern match, by prefixing it with a #:"
<Kakadu>
BitPuffin: bugreport it!
<BitPuffin>
ah, it's got a github or what? :)
<BitPuffin>
lol yeah
<BitPuffin>
kinda says so on the side xD
<BitPuffin>
should I just put it as a comment in the book or try and find a github page
<BitPuffin>
oh it does create an issue
<BitPuffin>
done
alpounet has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
Guest48214 is now known as nitbix
alpounet has joined #ocaml
nitbix is now known as Guest22043
Guest22043 has quit [Quit: leaving]
mcclurmc has quit [Ping timeout: 276 seconds]
manizzle has quit [Ping timeout: 240 seconds]
Thooms has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
eikke__ has quit [Ping timeout: 265 seconds]
mk270 has quit [Ping timeout: 276 seconds]
mk270 has joined #ocaml
eikke__ has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
rand000 has joined #ocaml
Kakadu has joined #ocaml
ollehar1 has joined #ocaml
<def`>
willb1: 15
<def`>
oops, sorry
axiles has quit [Remote host closed the connection]
axiles has joined #ocaml
ontologiae has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
dsheets has joined #ocaml
amirmc has joined #ocaml
pminten has quit [Remote host closed the connection]
<adrien_oww>
BitPuffin: and you have 3 weeks to do everything?
<ggole>
adrien_oww: not really: see the allocation code emitted by ocamlopt, which contains exactly that kind of forward jump
<mrvn>
adrien_oww: they did tests with and without bounds check and found ways that make them not so expensive
<BitPuffin>
adrien_oww: end of july
<BitPuffin>
adrien_oww: so ~6
<ggole>
It's just work, not some brain-melting thing.
<adrien_oww>
ggole: it optimizes out bound checks inside for loops?
pyon`` has joined #ocaml
<BitPuffin>
adrien_oww: it's either this or something like C..
<adrien_oww>
BitPuffin: yeah, still, that's a lot to do
<ggole>
I was talking about making sure that rarely-taken conditional jumps are cheap
<mrvn>
And anyway, missing a single bounds check that was needed to catch an error is critical. Doing a few bounds checks that are irelevant is, well, who cares.
<ggole>
(For the overflow checking.)
<adrien_oww>
main issue is probably getting everything running on each platform
<adrien_oww>
no matter the language
<mrvn>
If you allow not checking people will use that even when it isn't safe.
<adrien_oww>
-fomg-optimize
<ggole>
-Obroken
ollehar1 has quit [Ping timeout: 272 seconds]
pyon` has quit [Ping timeout: 265 seconds]
leifw has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
<BitPuffin>
adrien_oww: yeah
<BitPuffin>
adrien_oww: I think the most painful part will be wrapping all the reachability stuff
leifw has joined #ocaml
toolslive has quit [Ping timeout: 265 seconds]
<BitPuffin>
adrien_oww: ie I need to be able to get a callback when a device goes from wifi to roaming etc
<BitPuffin>
so I'm gonna have to write an abstraction lib for that
<BitPuffin>
either in C or ocaml
<BitPuffin>
in ocaml I could call it roaml
<BitPuffin>
lol
<mrvn>
BitPuffin: have you looked at mirage?
<BitPuffin>
is the bytecode interpreter well tested on all these platforms? I don't wanna end up picking ocaml and getting fucked
<BitPuffin>
mrvn: what's that
toolslive has joined #ocaml
<BitPuffin>
ah
<BitPuffin>
think I've seen this yeah
<mrvn>
BitPuffin: Mirage is a unikernel for constructing secure, high-performance network applications across a variety of cloud computing and mobile platforms. Code can be developed on a normal OS such as Linux or MacOS X, and then compiled into a fully-standalone, specialised kernel that runs under the Xen hypervisor.
<BitPuffin>
mrvn: yeah, I don't think that's what I need though
<mrvn>
basically a nice ocaml runtime that runs directly on the hardware
<BitPuffin>
kind of overkill
<BitPuffin>
this is for writing a library that communicates with our backend stuff
<BitPuffin>
ie downloads a json file and parses that and stores metadata in sqlite and downloads files etc
<mrvn>
is the on-wire protocol fixed?
mcclurmc has quit [Ping timeout: 240 seconds]
<BitPuffin>
mrvn: hmm?
<BitPuffin>
it's just http stuff if that's what you mean
<adrien_oww>
mrvn: this is about ios/android/winrt applications...
<adrien_oww>
BitPuffin: yeah, that's what you need to start with, no matter how you do the other bits so...
<mrvn>
We are using ZeroMQ at work for the network stuff. Not sure if that works on ios/winrt but android would work.
<BitPuffin>
adrien_oww: which part?
<mrvn>
But if you are decided on http then zmq isn't an option.
<adrien_oww>
BitPuffin: abstraction lib, re-expose everything needed from the OS in C
<mrvn>
(and I hope you mean https)
<BitPuffin>
well I mean we already have the backend
<BitPuffin>
and yes I mean https
<BitPuffin>
adrien_oww: yeah, at least for the reachability download cancelling etc. However to just load things into sqlite etc shouldn't need that immediately
<BitPuffin>
but everything is quite tight
<BitPuffin>
so it's stressful
<BitPuffin>
do you think that stuff like Core.Async would work on ios/android etc?
* adrien_oww
doesn't know
<BitPuffin>
I mean that's just leveraging things in the runtime isn't it?
toolslive has quit [Ping timeout: 265 seconds]
toolslive has joined #ocaml
squiggnet has quit [Ping timeout: 265 seconds]
<BitPuffin>
ocaml feels like a perfect language for how I want to design the lib internally but I don't know if the implementation well run everywhere
<BitPuffin>
frustrating :(
squiggnet has joined #ocaml
<mrvn>
BitPuffin: you can compile to java script. Surely that runs everywhere.
<adrien_oww>
it runs well everywhere; and then you have crap platforms which do their best to break everything on a regular basis
<BitPuffin>
blazing fast like a snail :P
<BitPuffin>
adrien_oww: yeah, well no language will save me from that
<BitPuffin>
but the important thing is that ocaml will run and not be a lot of overhead
<BitPuffin>
which it probably won't be with native or bytecode
<BitPuffin>
js though.. :p
<BitPuffin>
I don't know if Async relies on that much platform specific stuff though. I have a feeling I'll need async
racycle has joined #ocaml
andreypopp has quit [Ping timeout: 260 seconds]
<adrien_oww>
Async/Lwt might cause issues if you want to get on the MS app store
<BitPuffin>
we don't
<adrien_oww>
ah, fine
<Drup>
BitPuffin: you can do conditionnal compilation with cppo
<BitPuffin>
we will be distributing as a windows 8 thingy
<adrien_oww>
I was going to say that even the ocaml runtime itself could be an issue on the MS app store
<BitPuffin>
luckily the tablets use windows 8 and winrt
<BitPuffin>
cuz apparently you can't release anything on winrt outside the windows store
andreypopp has joined #ocaml
<adrien_oww>
you can put your own "store"
<adrien_oww>
but you need to buy keys and they're fairly expensive
<BitPuffin>
ah
<BitPuffin>
well anyways
<BitPuffin>
it's thankfully not winrt :P
<BitPuffin>
I guess what I'll have to do is to blaze through RWO and then write a test and try running it on all the platforms or something
<def`>
I have heard of actual ocaml code running on iOS and android, but not of a windows 8 port (targeting arm)
racycle has quit [Quit: ZZZzzz…]
<BitPuffin>
I don't know if surface and lenovo tablet uses arm even
<adrien_oww>
there's no gcc for windows rt, especially on ram
<adrien_oww>
arm*
<adrien_oww>
(yet)
<BitPuffin>
apparently surface pro uses x86
<BitPuffin>
intel ivy bridge
<adrien_oww>
.*Pro, yeah
<BitPuffin>
yeah it is pro we're targeting
<BitPuffin>
and lenovo tablet 2
<BitPuffin>
intel atom
<BitPuffin>
that's also x86 isn't it?
lordkryss has joined #ocaml
<adrien_oww>
atom, yes
<BitPuffin>
hmm
<BitPuffin>
then it might be possible to pull this off..
<mrvn>
Iluvatar594: just removed the extra tuppels and then the bug in modi showed up
ontologiae has joined #ocaml
<Iluvatar594>
i did something like
<Iluvatar594>
let rec modi x n l = match l with
<Iluvatar594>
[] -> []
<Iluvatar594>
|(a,b)::ls -> if (a=x) then (x,n)::ls else (a,b)::(modi x n ls)
<mrvn>
that works too
<mrvn>
or | ((a,_) as h)::ls -> if (a=x) then (x,n)::ls else h::(modi x n ls)
BitPuffin has joined #ocaml
<Iluvatar594>
ok
<mrvn>
if you match (a,b) and on the other side use (a,b) then ocaml will allocate a new tuple and assign a and b to it. With 'as h' it will reuse the existing tuple.
studybot has quit [Remote host closed the connection]
thomasga has joined #ocaml
metasyntax has joined #ocaml
<Iluvatar594>
uhm
<Iluvatar594>
now
<Iluvatar594>
how can i print the content
xitology_ has quit [Quit: Ex-Chat]
<Iluvatar594>
since the type is abstract?
<mrvn>
you can't. add a print function to the module
olauzon has quit [Quit: olauzon]
<mrvn>
(which itself needs to take a print function as argument for the 'a)
<Iluvatar594>
yeah that's the issue
<Iluvatar594>
adding the prinf function
<Iluvatar594>
i don't know how to print a generic 'a
olauzon has joined #ocaml
SethTisue has joined #ocaml
<mrvn>
let print t printer = List.iter (fun (a,b) -> printer a; print_int b) t
divyanshu has joined #ocaml
<mrvn>
The user has to tell you how to print it
<mrvn>
google for ocaml pretty printer for some better examples
avsm has quit [Quit: Leaving.]
BitPuffin has quit [Ping timeout: 264 seconds]
lordkryss has quit [Ping timeout: 240 seconds]
tnguyen1 has quit [Quit: tnguyen1]
maattdd_ has quit [Ping timeout: 240 seconds]
maattdd_ has joined #ocaml
<def`>
Iluvatar594: my suggestion was just that a lot of function you wrote were already in the standard library
<def`>
and in particular, your List.fold_right (||) is much less efficient than List.exists or List.mem_assoc
tirom13 has joined #ocaml
avsm has joined #ocaml
<tirom13>
I have two ref on 2 place of a main list
<tirom13>
How to get a subset of this main list between the two ref ?
<Drup>
linear scan
<Drup>
if you want better, don't use a list.
<tirom13>
Should I use Array instead ?
sagotch has quit [Ping timeout: 240 seconds]
<Drup>
depends what you want to do
<Drup>
Map may be a good solution too
maattdd_ has quit [Ping timeout: 240 seconds]
<def`>
linear scan is fine :)
<mrvn>
recurse till you hit the first ref, recours and build a list of elements till you hit the seconed ref, reverse accumulated list
<mrvn>
s/recours/recurse/
<Drup>
(aka "linear scan")
eikke__ has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
tirom13 has quit [Ping timeout: 245 seconds]
Lutin` has quit [Ping timeout: 260 seconds]
tirom13 has joined #ocaml
ee has joined #ocaml
ee has quit [Client Quit]
<tirom13>
ok
<tirom13>
I think i will keep the linear scan
shinnya has quit [Ping timeout: 260 seconds]
studybot has joined #ocaml
maattdd_ has joined #ocaml
<tirom13>
ok, I just found an article about internal representation of ocaml
<Drup>
I'm not sure it's going to help you :)
<tirom13>
it's help me, I understand now why linear scan is the only solution
<tirom13>
List are juste linear structure, we cannot change them to create subset without changing the main list
<ggole>
You can't change lists at all, really
cago has quit [Quit: Leaving.]
racycle has joined #ocaml
dinosaure has quit [Remote host closed the connection]
tane has joined #ocaml
dinosaure has joined #ocaml
<tirom13>
ok, thanks for all !
<tirom13>
Good day !
tirom13 has quit [Quit: leaving]
Arsenik has joined #ocaml
manizzle has joined #ocaml
sagotch has joined #ocaml
philtor_ has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
sagotch has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
slash^ has joined #ocaml
eikke__ has joined #ocaml
boogie has joined #ocaml
ontologiae has joined #ocaml
tlockney_away is now known as tlockney
philtor_ has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ocaml
toolslive has quit [Ping timeout: 265 seconds]
rgrinberg1 has joined #ocaml
bbarker has joined #ocaml
avsm has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 276 seconds]
AltGr has left #ocaml [#ocaml]
toolslive has joined #ocaml
manizzle has quit [Ping timeout: 245 seconds]
q66 has joined #ocaml
rgrinberg1 has quit [Quit: Leaving.]
_5kg has quit [Ping timeout: 240 seconds]
maattdd_ has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 240 seconds]
philtor_ has joined #ocaml
olauzon has quit [Quit: olauzon]
toolslive has quit [Quit: Leaving]
tnguyen1 has joined #ocaml
slash^ has quit [Ping timeout: 245 seconds]
olauzon has joined #ocaml
Kakadu has quit [Quit: Page closed]
olauzon has quit [Client Quit]
lordkryss has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
<Drup>
whitequark: how good is llvm on loop fusion, polyhedral model and this sort of stuff ?
slash^ has joined #ocaml
maattdd_ has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
maattdd_ has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
olauzon has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
maattdd_ has joined #ocaml
_5kg has joined #ocaml
eikke__ has quit [Ping timeout: 245 seconds]
maattdd_ has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: Leaving.]
eikke__ has joined #ocaml
tane has joined #ocaml
yastero has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 276 seconds]
rs0 has quit [Ping timeout: 264 seconds]
rs0 has joined #ocaml
olauzon has quit [Quit: olauzon]
manizzle has joined #ocaml
yastero has joined #ocaml
manizzle has quit [Client Quit]
manizzle has joined #ocaml
tane has quit [Quit: Verlassend]
thomasga has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
lordkryss has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
rand000 has joined #ocaml
Kakadu has joined #ocaml
<bjorkintosh>
".. Didier Rémy, later joined by Jérôme Vouillon, designed an elegant and highly expressive type system for objects and classes. This design was integrated and implemented within Caml Special Light, leading to the Objective Caml language and implementation"
slash^ has quit [Read error: Connection reset by peer]
fraggle_laptop has joined #ocaml
olauzon has quit [Quit: olauzon]
ontologiae has joined #ocaml
rz has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
<orbitz>
D'oh, i hate it when i hit a typing error that I have solved before and can't remember how
shinnya has joined #ocaml
<rgrinberg>
orbitz: playing around with gadt's?
ontologiae has quit [Ping timeout: 245 seconds]
claudiuc has quit [Remote host closed the connection]
<orbitz>
no
<orbitz>
herei s testcase
<orbitz>
type 'a foo = int -> int -> 'a
<orbitz>
Error: A type variable is unbound in this type declaration.
<orbitz>
In type (int -> ([> `Bar ] as 'a)) foo the variable 'a is unbound
<orbitz>
# type zoom = (int -> [> `Bar ]) foo;;
<orbitz>
sorry for lines
maattdd_ has joined #ocaml
<orbitz>
It's the > that is the problem
<mrvn>
because that allows [`Bar] and [`Bar | `Baz] and both can't be zoom
<Drup>
orbitz: just turn it into 'a zoom
<mrvn>
you need an 'a zoom with constraint type `a = [> `Bar ]
<Drup>
with ([> `Bar ] as 'a)
bbarker has quit [Quit: Connection closed for inactivity]
<Drup>
(and if you want to make it abstract, don't forget to make it covariant)
<mrvn>
although I don't get why you can't have such an open type. Would be nice sometimes.
<Drup>
because if you make it abstract, you can have quite unsafe stuff.
<mrvn>
how so?
maattdd_ has quit [Ping timeout: 252 seconds]
<mrvn>
only thing you could with a zoom would be: match zoom 1 2 3 with `Bar -> true | _ -> false
<mrvn>
+do
<orbitz>
thanks
axiles_ has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
strobegen1 has quit [Quit: Leaving.]
fraggle_laptop has quit [Ping timeout: 240 seconds]
olauzon has joined #ocaml
thomasga has joined #ocaml
iZsh has quit [*.net *.split]
hto_ has quit [*.net *.split]
Valdo has quit [*.net *.split]
maufred has quit [*.net *.split]
samebchase has quit [*.net *.split]
passiveobserver has quit [*.net *.split]
contempt has quit [*.net *.split]
bcuccioli has quit [*.net *.split]
xenocons has quit [*.net *.split]
engil has quit [*.net *.split]
tianon has quit [*.net *.split]
clog has quit [*.net *.split]
yroeht has quit [*.net *.split]
tianon has joined #ocaml
bcuccioli has joined #ocaml
clog has joined #ocaml
maufred has joined #ocaml
samebchase has joined #ocaml
yroeht has joined #ocaml
hto has joined #ocaml
engil has joined #ocaml
engil has quit [Changing host]
engil has joined #ocaml
xenocons has joined #ocaml
iZsh has joined #ocaml
contempt has joined #ocaml
Valdo has joined #ocaml
passiveobserver has joined #ocaml
maattdd_ has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
rand000 has quit [Quit: leaving]
ontologiae has joined #ocaml
thomasga has quit [Quit: Leaving.]
claudiuc has quit [Ping timeout: 264 seconds]
maattdd_ has quit [Ping timeout: 264 seconds]
zebr has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
struktured has joined #ocaml
yomimono has joined #ocaml
ggole has quit []
Lutin` has joined #ocaml
kclancy has joined #ocaml
<kclancy>
In the ocaml standard library, there are no functions for checking whether a certain key is contained in a map. I'm guessing that the recommended way of doing this is to use the find function?
IbnFirnas has quit [*.net *.split]
__marius____ has quit [*.net *.split]
n0v has quit [*.net *.split]
<kclancy>
No exception is thrown iff the key is contained.
Arsenik has quit [Remote host closed the connection]
__marius____ has joined #ocaml
olauzon has quit [Quit: olauzon]
<companion_cube>
kclancy: Map.S.mem ?
olauzon has joined #ocaml
<kclancy>
that has the signature I want. I'll look it up in the docs. Thanks.
<kclancy>
companion_cube: yep. that's what I want. thanks. mem seems like a weird name for it. Why not contains?
<def`>
mem for 'member'
<kclancy>
okay. that makes sense.
kclancy has quit [Quit: Leaving]
zebr has joined #ocaml
n0v has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
IbnFirnas has joined #ocaml
Thooms has joined #ocaml
tomsthumb has joined #ocaml
zebr has quit [Remote host closed the connection]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
maattdd_ has joined #ocaml
zebr has joined #ocaml
rgrinberg has joined #ocaml
maattdd_ has quit [Ping timeout: 245 seconds]
jao has quit [Ping timeout: 240 seconds]
philtor_ has joined #ocaml
Simn has quit [Quit: Leaving]
lordkryss_ has joined #ocaml
philtor_ has quit [Ping timeout: 264 seconds]
lordkryss has quit [Ping timeout: 252 seconds]
lordkryss__ has joined #ocaml
lordkryss has joined #ocaml
lordkryss_ has quit [Ping timeout: 272 seconds]
lordkryss__ has quit [Ping timeout: 252 seconds]
lordkryss_ has joined #ocaml
Nahra has joined #ocaml
lordkryss has quit [Ping timeout: 272 seconds]
Thooms has quit [Quit: WeeChat 0.3.8]
olauzon has quit [Quit: olauzon]
struktured has quit [Ping timeout: 240 seconds]
tnguyen1 has quit [Quit: tnguyen1]
maattdd_ has joined #ocaml
lordkryss has joined #ocaml
maattdd_ has quit [Ping timeout: 272 seconds]
lordkryss_ has quit [Ping timeout: 272 seconds]
yomimono has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 240 seconds]
Kakadu has quit [Quit: Konversation terminated!]
Hannibal_Smith has quit [Quit: Sto andando via]
tnguyen has joined #ocaml
SethTisue has quit [Quit: SethTisue]
alpounet has quit [Remote host closed the connection]
tobiasBora has quit [Quit: Konversation terminated!]
ontologiae has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 252 seconds]
darkf has joined #ocaml
madroach has joined #ocaml
<whitequark>
Drup: afaik, pretty good
lordkryss has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
penglingbo has quit [Ping timeout: 272 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maattdd_ has joined #ocaml
Nahra has quit [Ping timeout: 245 seconds]
SethTisue has joined #ocaml
maattdd_ has quit [Ping timeout: 264 seconds]
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]