<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]
<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?
<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`>
(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!]