flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
walter has quit [Ping timeout: 264 seconds]
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
q66 has quit [Remote host closed the connection]
derek_c has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
eikke has quit [Ping timeout: 264 seconds]
adotbrown has quit [Ping timeout: 246 seconds]
adotbrown has joined #ocaml
synod has joined #ocaml
travisbrady has joined #ocaml
<synod> is it possible to generalize concrete gadt type parameters? I have "float t" and "bool t" and I'd like to pass them to a function that accepts
<synod> 'a t
<synod> They came from a typed ast and I made a type tag type like "type k = F of float t | B of bool t"
<synod> I did this to construct a Map. Now, I'd like to deconstruct k and pass the constructor args to a polymorphic function.
<synod> The subtype relation does not appear to be available on gadts
<synod> Is there some theoretical reason why <float t> can't be coerced safely to <'a t>?
<synod> never mind, i'm clearly confused
synod has quit [Quit: Page closed]
cgaebel has joined #ocaml
cgaebel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
emmanuelux has quit [Remote host closed the connection]
cdidd has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
cgaebel has joined #ocaml
cgaebel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Mortchek has left #ocaml []
pkrnj has joined #ocaml
ggole has joined #ocaml
derek_c has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
IbnFirnas has quit [Ping timeout: 252 seconds]
IbnFirnas has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
Cyanure has joined #ocaml
lenstr has quit [Ping timeout: 255 seconds]
LeNsTR has joined #ocaml
derek_c has joined #ocaml
romerun has joined #ocaml
ggole has quit [Quit: Ex-Chat]
Cyanure has quit [Remote host closed the connection]
adotbrown has quit [Ping timeout: 245 seconds]
derek_c has quit [Quit: Lost terminal]
LeNsTR has quit [Changing host]
LeNsTR has joined #ocaml
<adrien> mornign
adotbrown has joined #ocaml
anderse has joined #ocaml
tane has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
hkBst has joined #ocaml
adotbrown has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
LeNsTR is now known as lenstr
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
chambart has joined #ocaml
<orbitz> adrien: morning
awm22 has joined #ocaml
awm22 has quit [Client Quit]
awm22 has joined #ocaml
tane has quit [Remote host closed the connection]
ottbot has joined #ocaml
awm22 has quit [Quit: Leaving.]
tane has joined #ocaml
ottbot has quit [Ping timeout: 272 seconds]
romerun has quit [Ping timeout: 245 seconds]
tani has joined #ocaml
Neros_ has quit [Ping timeout: 276 seconds]
beginner42 has joined #ocaml
tane has quit [Ping timeout: 248 seconds]
Neros has joined #ocaml
<beginner42> i am modifying one package of the opam packages, how can i tell opam to use my package and not the one from the opam github page?
mika1 has joined #ocaml
<beginner42> is it enough to add this folder as a remote folder to opam and give it a higher version number?
<orbitz> beginner42: pin it
<orbitz> beginner42: opam pin packagenaem /path/to/build/dir
<beginner42> orbitz: thank you. i will try it out
thomasga has joined #ocaml
<beginner42> orbitz: but before that, i have to do something like opam remote packagename /path/to/build/dir ?
Yoric has joined #ocaml
<orbitz> beginner42: no
<orbitz> beginner42: if the package is already in opam you just pin it to your build dir
<orbitz> if not, then you haveto add a remote for an opam repo that includes it AFAIK
hkBst has quit [Read error: Connection reset by peer]
<orbitz> thomasga can speak with more authority, but this is how I have been rolling
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
hkBst_ has quit [Excess Flood]
hkBst_ has joined #ocaml
<beginner42> orbitz: i tried it, but get this error
<beginner42> Cannot pin promela to a dev version as it is already installed. You must uninstall it first (or use --force). 'pathto/opam pin promela 0.4.3/' failed.
ggole has joined #ocaml
hkBst_ has quit [Ping timeout: 245 seconds]
hkBst__ has joined #ocaml
awm22 has joined #ocaml
<orbitz> beginner42: so do what the error emssage tells you to do...
eikke has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
<beginner42> orbitz: i am always little bit over cautious, when removing stuff from the work server...
<beginner42> orbitz: but i worked perfectly, thank you
<orbitz> opam does everything local so do it on your local user machine
<orbitz> err home directory
Neros has quit [Ping timeout: 264 seconds]
ggole_ has joined #ocaml
Kakadu has joined #ocaml
ggole has quit [Ping timeout: 252 seconds]
ottbot has joined #ocaml
hkBst__ has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
hkBst has joined #ocaml
beckerb has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Yoric has joined #ocaml
IbnFirnas has quit [Ping timeout: 252 seconds]
IbnFirnas has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
mcclurmc has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
jave has quit [Ping timeout: 255 seconds]
faheem has quit [Ping timeout: 255 seconds]
zzz_ has quit [Ping timeout: 260 seconds]
pippijn has quit [Ping timeout: 260 seconds]
smango has quit [Ping timeout: 260 seconds]
hcarty has quit [Ping timeout: 255 seconds]
bacam has quit [Ping timeout: 255 seconds]
cthuluh has quit [Ping timeout: 260 seconds]
companion_cube has quit [Ping timeout: 260 seconds]
Kakadu has quit [Remote host closed the connection]
bernardofpc has quit [Ping timeout: 260 seconds]
cow-orker has quit [Ping timeout: 260 seconds]
Ptival has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
zzz_` has joined #ocaml
smango_ has joined #ocaml
bacam has joined #ocaml
Ptival_ has joined #ocaml
gustav_ has quit [Excess Flood]
hcarty has joined #ocaml
cthuluh has joined #ocaml
companion_cube has joined #ocaml
bernardofpc has joined #ocaml
othiym23 has quit [Ping timeout: 260 seconds]
pippijn_ has joined #ocaml
cow-orke1 has joined #ocaml
pippijn_ has quit [Changing host]
pippijn_ has joined #ocaml
jave_ has joined #ocaml
jave_ has quit [Excess Flood]
jave has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
gustav_ has joined #ocaml
faheem has joined #ocaml
ollehar1 has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
adotbrown has joined #ocaml
mcclurmc has joined #ocaml
_andre has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
<ollehar1> what am I supposed to do with a function that returns unit Lwt.t?
hkBst has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ollehar has joined #ocaml
pippijn_ is now known as pippijn
hkBst has quit [Ping timeout: 272 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
adotbrown has quit [Ping timeout: 245 seconds]
anderse has quit [Quit: anderse]
othiym23 has joined #ocaml
chambart has joined #ocaml
<pippijn> othiym23: you are supposed to call it
<pippijn> I mean ollehar1
<pippijn> or ollehar
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<ollehar1> pippijn: I do. but within ignore(foo...)
<pippijn> that's not good
<ollehar1> what's the alternative?
<ollehar1> can't find a good tutorial about it
<pippijn> read about Lwt.bind
<ollehar1> ok
<ollehar1> and if I >>= function something, that function must return 'a Lwt.t?
hto has quit [Ping timeout: 264 seconds]
<pippijn> yes
<pippijn> and in the end, you need to run the whole thing in Lwt.exec or something like that
<eikke> Lwt_main.run
<pippijn> yeah, that
travisbrady has quit [Quit: travisbrady]
<ollehar1> a lot of ignore and return () in my code right now... :P
<eikke> ollehar1: you might like http://blog.incubaid.com/2012/04/02/tracking-asynchronous-io-using-type-systems/ (</selfPromotion kind="shameless">)
<ollehar1> eikke: thanks :)
awm221 has joined #ocaml
awm22 has quit [Ping timeout: 264 seconds]
jpdeplaix` has joined #ocaml
<bobry> Does anyone know if there's any OCaml-related GSoC project proposals this year?
mikurubeam has joined #ocaml
jpdeplaix has quit [Ping timeout: 245 seconds]
q66 has joined #ocaml
mikurubeam has quit [Quit: +1 (Good). -1 (Evil). i (WTF?).]
Neros has quit [Ping timeout: 245 seconds]
<hcarty> adrien: Were you aware of https://forge.ocamlcore.org/projects/ocaml-efl/
<hcarty> adrien: Since you've mentioned wanting OCaml EFL bindings often :-)
ontologiae has joined #ocaml
<adrien_oww> yes!
<adrien_oww> the author is a friend of mine from when we were 8 years old :D
<adrien_oww> had lost contact with him until the end of january though
* Kakadu have tried to compile efl binding but ocaml-efl dependecies are too new for Debian/unstable
<hcarty> So from this we can determine... clearly there is a link between the drinking water around where you grew up and interest in EFL! :-)
<adrien_oww> hahaha :P
<adrien_oww> Kakadu: yeah, that's a known issue: the EFLs in debian are old and can't be updated because of the freeze
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
<Kakadu> adrien_oww: WTF freeze? only testing is frozen, not unstable
<hcarty> The bindings look reasonably clean, at least on the surface
* Kakadu have found an article today about comparison of EFL and QML but have not read it
travisbrady has joined #ocaml
mikurubeam has joined #ocaml
travisbrady has quit [Quit: travisbrady]
awm221 has quit [Quit: Leaving.]
* Kakadu finished EFL article.
<adrien_oww> well, stuff takes time
<adrien_oww> for debian
<adrien_oww> autor is a Qt guy
<adrien_oww> so, yeah, says Qt is better :P
<adrien_oww> but the comparison, while not completely bad, is not perfect either
<adrien_oww> comparing linecount is bad
<adrien_oww> comparing linecount between C and JS/C++ will give bad results
<adrien_oww> the shootout's process is fairly interesting: size of gzip'ed code
<adrien_oww> also, I'm wondering if the author was not running KDE, i.e. already had Qt loaded
<adrien_oww> because Qt is *way* bigger than the EFLs and the memory usage is more than surprising
<Kakadu> I don't think that preloading is a problem of this comparison
<Kakadu> If I execute qtcreator it will start slowly but if I close it and open again it will start very fast. It is feature of Linux desktop IIRC
<adrien_oww> agreed but the article states it tests that
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<Kakadu> adrien_oww: > As before, a light IceWM was used with no background user tasks or costly services running to avoid interference with the test. So influence of a desktop such as E17 or KDE Plasma Workspaces has been reduced.
mikurubeam has joined #ocaml
<adrien_oww> ah, thanks; I had read it quickly this morning but hadn't seen that and was left wondering
<adrien_oww> still quite surprising
yacks has quit [Quit: Leaving]
awm22 has joined #ocaml
smondet has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
hto has joined #ocaml
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
mikurubeam has joined #ocaml
mikurubeam is now known as Guest40274
Guest40274 has quit [Client Quit]
Ptival_ is now known as Ptival
mikurubeam has joined #ocaml
mikurubeam has quit [Client Quit]
darkf has quit [Quit: Leaving]
mikurubeam has joined #ocaml
lopex_ has joined #ocaml
NaCl_ has joined #ocaml
mikurubeam has quit [Ping timeout: 276 seconds]
hkBst_ has joined #ocaml
hkBst has quit [Remote host closed the connection]
amaloz has joined #ocaml
lopex has quit [*.net *.split]
NaCl has quit [*.net *.split]
lopex_ is now known as lopex
lopex is now known as Guest20157
clintnewsom has joined #ocaml
Guest20157 has quit []
lopexx has joined #ocaml
lopexx is now known as lopex
Yoric has joined #ocaml
smondet has quit [Remote host closed the connection]
<ollehar1> a simple question: which hash method is best used with passwords? sha-1? sha-256? ripemd160?
<thelema_> ollehar1: none of the above.
awm22 has quit [Ping timeout: 272 seconds]
Neros has joined #ocaml
awm22 has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
smondet has joined #ocaml
clintnewsom has joined #ocaml
<clintnewsom> hi, n00b question
<clintnewsom> very simple
<clintnewsom> what is the syntax for loading a file?
<thelema_> clintnewsom: in the toplevel?
<thelema_> #use loads a .ml file, #load loads a .cmo file
<clintnewsom> i'm using utop as my top-level, but we're attempting to write some tests
<clintnewsom> yes works in the top-level
<clintnewsom> #use works for me
<clintnewsom> but it throws an error when attempting to load a file from within another file….i hope that makes sense
<ollehar1> thelema_: thanks, very usefull
<thelema_> clintnewsom: I don't think recursive #use is supported.
<clintnewsom> :thellema_: coming from an SML background, I'm basically looking for something like SML's "use 'my file.sml'"
<clintnewsom> i see
hkBst_ has quit [Ping timeout: 252 seconds]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
mikurubeam has joined #ocaml
hkBst_ has quit [Quit: Konversation terminated!]
mika1 has quit [Quit: Leaving.]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
asmanur_ has joined #ocaml
mikurubeam has joined #ocaml
asmanur has quit [Ping timeout: 256 seconds]
<ggole_> #use is not OCaml code, but a toplevel directive
<ggole_> So it doesn't make sense to have it in a source file (in your .ocamlinit, maybe)
<thelema_> ggole_: actually, toplevel directives are allowed in code that's being #used (see topinit)
<ggole_> Oh, really? O_o
* ggole_ didn't know that
<thelema_> err, topfind
lopex has quit [*.net *.split]
chambart has quit [*.net *.split]
belaid has quit [*.net *.split]
PM has quit [*.net *.split]
<ggole_> Oh wait, #use includes a file straight into the toplevel
chambart has joined #ocaml
<ggole_> So it isn't really source
alkabetz has left #ocaml []
ttamttam has quit [Quit: ttamttam]
Kakadu has quit []
<clintnewsom> ggole_: can you tell me how to include a file?
<clintnewsom> ggole_: open and include don't seem to work for me
<clintnewsom> ggole_: we're using ocamlbuild -use-ocamlfind to compile
<clintnewsom> ggole_: just figured it out
<clintnewsom> thanks all
<ggole_> clintnewsom, open should make the namespace available, but it isn't inclusion
<ggole_> Oh :)
<clintnewsom> namespace should be good, we are just trying to run tests
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Neros has quit [Ping timeout: 256 seconds]
SanderM has joined #ocaml
<ggole_> If you're just trying to cut down on typing, an alternative to open is module S = SomeStupidLongName
<ggole_> That helps to cut down on silly name conflicts
<companion_cube> it's also nice for replacing a module by another
<companion_cube> you just change the module S = Foo, and nothing else
<ggole_> Yeah
Yoric has quit [Ping timeout: 252 seconds]
mikurubeam has joined #ocaml
lopexx has joined #ocaml
PM has joined #ocaml
belaid has joined #ocaml
mikurubeam has quit [Client Quit]
adrien_o1w has joined #ocaml
lopexx is now known as lopex
notk0 has joined #ocaml
<notk0> hello, is anyone here Familiar with the lambda type? that is used by the ocaml compiler?
adrien_oww has quit [Read error: Operation timed out]
beckerb has quit [Ping timeout: 245 seconds]
SanderM has quit [Read error: Connection reset by peer]
ontologiae has quit [Ping timeout: 248 seconds]
_andre has quit [Quit: Lost terminal]
eikke has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
Kakadu has joined #ocaml
Neros has joined #ocaml
imalsogreg has quit [Quit: Leaving]
ttamttam has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
<hcarty> I wrote a small ocamlbuild plugin to include rpath information from a file. Any suggestions for improvements? https://gist.github.com/hcarty/5198467
awm22 has quit [Quit: Leaving.]
* thelema_ wishes ocamlbuild plugins were composable
<thelema_> looks good to me... I might move the "let rpath_file" outside the top let
<thelema_> so it's clearly a constant definition
<thelema_> also, I can imagine a different organization for the List.map/List.iter logic, but it's clear enough at the moment, so not much gain there
pkrnj has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
chambart has joined #ocaml
<hcarty> thelema_: I agree with both organizational suggestions, thanks.
<hcarty> The rpath definition is where it is because I originally tried to do this as a rule definition.
<thelema_> ah
thelema_ is now known as thelema
<hcarty> But I wasn't able to figure out how to convince ocamlbuild to process the rule without doing anything else with the .rpath file.
<hcarty> Not within the 20 minutes I gave myself to spend on it anyway.
<thelema> I think this is how it should be done.'
<hcarty> I wanted to see if it was reasonably easy to provide multiple .rpath files for multiple compilation targets (foo.rpath => foo.native; bar.rpath => bar.native)
<hcarty> But one is enough for everything I need at the moment.
beginner42 has quit [Remote host closed the connection]
<hcarty> thelema: Simplified per your suggestions, and a bit further after noticing the 'string_list_of_file' function provided by ocamlbuild.
ottbot has quit [Ping timeout: 264 seconds]
<thelema> hcarty ah, this looks nicer.
awm22 has joined #ocaml
<hcarty> It's still missing a way to say that things should be rebuilt if the link.rpath file changes.
<thelema> dep
<hcarty> thelema: Last time I tried that ocamlbuild tried to pass link.rpath to ocaml*
<hcarty> But that may have been when the custom rule was still in place... I'll try again
<thelema> hmmm
clintnewsom has joined #ocaml
<thelema> err, no.. not dep...
<hcarty> Yeah, it still sticks link.rpath in as an ocaml(opt|c) argument
<hcarty> Which kind of makes sense from the documentation.
<thelema> maybe the only way to have them rebuild without compiling against something is to modify the action being used, which seems ugly
Cyanure has joined #ocaml
bru` has joined #ocaml
<bru`> Hi! I'm currently experimenting with C++-bindings and omake
<bru`> I've built a sample and very simple project: https://github.com/Laug/ocaml-cpp-bindings
<bru`> I have, however, trouble using omake with this configuration
<bru`> I believe that part of the problem comes from the fact that I have to go further than what ocaml provides me, as described there: http://www.camlcity.org/knowledge/kb_001_omake_recipes.html#stublibs
<thelema> bru`: if your problems are on the C++ bindings side, I may be able to help; if they're on the omake side, I don't think I can help
<bru`> thelema: omake side :/
<bru`> I've tried 2 different ways and I'm not far away from my goal. The first one is https://github.com/Laug/ocaml-cpp-bindings/tree/omakeV1 the second is https://github.com/Laug/ocaml-cpp-bindings/tree/omakeV2
<bru`> (see root's OMakefile for the differences. the problem is detailed in the last commit message)
<bru`> Would someone be able to help me?
<bru`> Googling for the messages I get such as "Rule value discarded" returns me omake source code...
mikurubeam has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
amaloz has quit [Remote host closed the connection]
ggole_ has quit [Quit: Ex-Chat]
hto has quit [Ping timeout: 264 seconds]
|jbrown| has quit [Remote host closed the connection]
ottbot has joined #ocaml
eikke has joined #ocaml
yacks has quit [Quit: Leaving]
ttamttam has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Snark has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
<notk0> is there a limit of constructor types in Ocaml?
<notk0> on the number of constructors in a type
<notk0> say type t = A | B | C .....
<notk0> is the limit related to the value of max_int
<notk0> I can have as many constructors as the value of an int?
<companion_cube> good question
<companion_cube> do you plan to generate such big types?
<notk0> no, I am working on an interpreter to OCaml, but it doesn't interpret OCaml directly, it compiles it to an intermediate language
<notk0> long story short, I want to emulate the way Ocaml does, pointer tagging I think it's called to determine if a constructor is a constant one, or not
<notk0> and I was wondering if there is not a simpler way
<notk0> in Ocaml a pointer that ends in 1 is not a pointer but an int right?
<companion_cube> yes
<companion_cube> but the source of OCaml is the definitive reference
<companion_cube> it defines the language
<companion_cube> (so, it's more like if the lsb is 0, the value is a pointer to a block, otherwise it's an int/char/bool)
<notk0> well I am working with Lambda type, the one that ocaml compilers already generate
<notk0> in a case of a constructor
jpdeplaix` is now known as jpdeplaix
<notk0> ok in the case of a constant constructor
<orbitz> notk0: if you'remaking an ocaml interpeter i wouldn't worry about limits too much
<notk0> I get a Lambda.Const_pointer type
<orbitz> your interpreter will not be productio nquality so it's mostly out of interest
<notk0> ok so to understand correctly
<notk0> Lambda.Pmakeblock will return an address that has the last bit as 0 ?
<flux> I think there's a limit to number of constructors and it's a lot less than 32 bits
<notk0> it's not 31 bits?
<notk0> that's how much the Lambda AST structure seems to allow
<notk0> it looks to me that after the type system does it jobs there is no way in memory to make the difference between a constant constructor of one type and another, am I right?
<flux> I was wrong. I thought the limit was something 'small', but 15k constructors compiles just fine.
<notk0> flux: how did you manage to create 15k ?
<orbitz> a loop probbably
<flux> (echo 'type z='; for a in {A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,X,Y,Z}{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,X,Y,Z}{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,X,Y,Z}; do echo $a; done | sed 's/^/|/') > foo.ml
<flux> takes 11 seconds to compile, btw :)
<mfp> flux: constant constructors, right? IIRC there are only ~250 non-constant ones
<notk0> that combines all letter combinations or what?
<flux> notk0, yes
<notk0> oh ok I am not familiar with bash and sed and whatnot
<notk0> how do I do shift in ocaml?
<eikke> is there any documentation on the ocaml compiler internals, and how things work together?
<flux> mfp, ah, that's it!
<notk0> bit shift?
mikurubeam has joined #ocaml
<flux> Error: Too many non-constant constructors -- maximum is 246 non-constant constructors
<orbitz> notk0: lsl and lsr
<notk0> ok so non-constant max 246 but constant can be a lot?
<notk0> orbitz: thank you
<flux> notk0, looks that way
<notk0> lsl stand for?
<notk0> logical shift left?
<orbitz> yes
<flux> love shifts logic?
<pippijn> notk0: constant can be as many as int allows
<orbitz> googling for ocaml shift left brings up al lthe oeprators
<pippijn> theoretically :)
<notk0> ok so if somebody knows, in memory a constant constructor is just represented by an int, the index in the table?
<pippijn> eventually the compiler will run out of memory
<notk0> and in memory it is not typed, it's just an int?
<pippijn> correct
<pippijn> and you can assume that
<notk0> I am currently working with match and the ocaml compiler return a pointer to 0 for the first constructor etc
<pippijn> because everything and everyone does (and it is documented as such)
<notk0> but in case of a non-constant constructor it seems to return Lambda.Pmakeblock (tag, is_mutable) where the tag is the index of the non-constant constructor I think
<notk0> so the type system checks if match is applied on the correct type before the final compiling?
<orbitz> how would you compile code where the types don't match?
<flux> as a general rule, compiled code does not know about type
<notk0> oh, right
<notk0> that makes sense I guess
<notk0> I think the non-constant constructor limit is related to the fact that the tag is a byte I think
<notk0> it seems for a non-constant constructor, OCaml allocated a pointer to the value it hold, and it tags it on one byte, with the index of the constructor type (it seems)
<notk0> thank you guys, will try to make it work even more now
<notk0> if I emulate Ocaml to do that, since the interpreter is in OCaml I will lose another bit
<notk0> will have 62 bits on my machine for pointers :D
mikurubeam has quit [Ping timeout: 256 seconds]
<eikke> interesting. when trying to subscribe to the ocaml mailing list, it asks for INRIA LDAP creds
mikurubeam has joined #ocaml
<eikke> which I don't really have :P
<notk0> there is string_of_int, why is there no string_of_char?
<adrien> String.make
<notk0> adrien: it says this expression has type char but an expression of type int was expected
<adrien> String.make + Char.char
<notk0> why does String.make take an int and return a function?
<notk0> that is strange
<notk0> oh the number of type to repeat
<notk0> I see
<notk0> thank you adrien
<adrien> :-)
q66 is now known as \q66
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<pippijn> notk0: yes, the tag is 1 byte, and the upper tags are reserved for internal tags (like for string, closure, object, abstract, float, ...)
<notk0> pippijn: is it normal for char and int to have the same tag?
<pippijn> char and int are both int
<pippijn> Char.char is a no-op
<notk0> oh I didn't know that, cool
<notk0> no-op?
<notk0> what does no-op mean?
<pippijn> ok, it's not a no-op
<pippijn> Char.chr checks whether it is in range
<pippijn> and then performs a no-op :)
<pippijn> notk0: a simple re-typing of values
<notk0> oh I see
<pippijn> no conversion actually takes place
<pippijn> let chr n = if n < 0 ∨ n > 255 then invalid_arg "Char.chr" else unsafe_chr n
<pippijn> external unsafe_chr: int → char = "%identity"
<pippijn> %identity is like a reinterpreting cast
<notk0> oh you have the actual code?
<pippijn> Obj.magic is also %identity
hto has joined #ocaml
<companion_cube> that reminds me of the trick in BatList.map
<companion_cube> (oh dear)
cdidd has quit [Remote host closed the connection]
<pippijn> companion_cube: yeah
<adrien> if you put an int bigger than a char in a char
<adrien> ocaml will do all kind of funny things
<pippijn> adrien: oh?
<pippijn> like what?
<adrien> the char is stored on an int and it's assumed that the upper bits are 0
<adrien> pippijn: match ... with
<adrien> jump tables
<pippijn> oh
<pippijn> interesting
<adrien> which you can achieve with C too
<adrien> I need to open a bug on the ocaml bug tracker because it _needs_ Char_val
<adrien> (which casts to an unsigned int before storing in a value)
<adrien> (so you don't get integer promotion of signed values for the char)
mcclurmc has joined #ocaml
Yoric has joined #ocaml
notk0 has quit [Remote host closed the connection]
ollehar has joined #ocaml
<eikke> bleh, I'm stuck ::(
<orbitz> hrm, this is a new error for me
<orbitz> Core.Std._result, contains type variables that cannot be generalized
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
ottbot has quit [Ping timeout: 252 seconds]
_andre has quit [Quit: leaving]
mikurubeam has joined #ocaml
\q66 is now known as q69
<thelema> orbitz: you might be able to fix that with a type annotation
mikurubeam has quit [Read error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 276 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
Anarchos has joined #ocaml
smondet has quit [Ping timeout: 240 seconds]
ottbot has joined #ocaml
Kakadu has quit []
ottbot has quit [Ping timeout: 252 seconds]
ollehar1 has joined #ocaml
NaCl_ is now known as NaCl
adotbrown has joined #ocaml
Snark has quit [Quit: Quitte]
eikke has quit [Read error: Operation timed out]
Cyanure has quit [Remote host closed the connection]
eikke has joined #ocaml
adotbrown has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Ping timeout: 255 seconds]
adotbrown has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
tani has quit [Quit: Verlassend]
ollehar has quit [Quit: ollehar]
noam_ is now known as noam
Neros has quit [Remote host closed the connection]
noam has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
clintnewsom has quit [Quit: clintnewsom]
clintnewsom has joined #ocaml
clintnewsom has quit [Client Quit]
leoncamel has quit [Ping timeout: 248 seconds]