<octachron>
M-martinklepsch, it is easier to define a module "String_map=Map.M(String)", then the empty map would be simply "String_map.empty"
<M-martinklepsch>
octachron: I'm at a stage where I haven't really touched on modules yet, just putting that code into utop didn't work — do I have to do something specific to define it as a module?
<def`>
module String_map = Map.Make(String)
<hooman>
what does CAML stand for
<hooman>
Map.M or Map.Make ?
<hooman>
^
<def`>
Whatever is in module Map. The one from standard library is Map.Make.
<hooman>
figured
<def`>
Categorical Abstract Machine Language ?
* hooman
learning modules right now - i dont have to look at objects/classes any more i hope
<Drup>
def`: ah, the current verison, yeah probably
andreas___ has quit [Quit: Connection closed for inactivity]
ygrek_ has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 264 seconds]
nahra has quit [Remote host closed the connection]
bloodycock has joined #ocaml
mk9_ has joined #ocaml
<orbifx[m]>
Should this be seg-faulting in utop? `Obj.size @@ Obj.repr 10;;`
<octachron>
Yes
nicootje has joined #ocaml
nicoo has quit [Remote host closed the connection]
<octachron>
The Obj module will segfault if used in the wrong way
<orbifx[m]>
That returns a an Obj.t of 10, and then I want the size of that. Why it that wrong?
nicootje has quit [Remote host closed the connection]
nicootje has joined #ocaml
<octachron>
10 is an integer aka a immediate value for which the notion of size does not make any sense
<octachron>
In other words, one is expected to understand the memory representation of values in OCaml before using Obj
mengu has quit [Remote host closed the connection]
_andre has quit [Ping timeout: 248 seconds]
nomicflux has joined #ocaml
<orbifx[m]>
But an immediate value has size too. I simply wanted to verify the internal representation size of int.
silver has joined #ocaml
_andre has joined #ocaml
mengu has joined #ocaml
<octachron>
An immediate value is not associated to a block; thus asking for the size of the block that the value points does not really make sense
spew has joined #ocaml
<octachron>
It would be possible to check if a value is an integer/immediate returns 1 in this case, and otherwise returns the block size otherwise
<octachron>
but Obj is not really supposed to be used by non-expert user and thus does not pull any punch
<adrien>
anyone has an example code to handle redirects in cohttp?
<adrien>
I mean, something I can read to learn
nicootje is now known as nicoo
spew has quit [Read error: Connection reset by peer]
freyr has joined #ocaml
ygrek_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
<adrien>
if Code.is_redirection code then match Header.get_location (Response.headers resp) with
<adrien>
(roughly)
Jesin has quit [Quit: Leaving]
igarnier has joined #ocaml
sapristi has quit [Ping timeout: 255 seconds]
jbrown has joined #ocaml
<orbifx[m]>
octachron: ok
<octachron>
orbifx[m], if what you want is to inspect memory representation of ocaml values, there is an inspect package in opam
davidmd has joined #ocaml
<orbifx[m]>
Notes, thanks :)
<davidmd>
hi all, I'm having some trouble building a project, using "ppx_deriving", whenever I try to build the project it just falls over at the first [@@deriving show] block with the error message "Unbound value pp_hash". pp_hash is not mentioned anywhere in my project. Thanks
<davidmd>
has anyone come across a similar problem, I'm fairly new so this may be a touch obvious
<octachron>
davidmd, do you happen to have a hash type?
kakadu has joined #ocaml
<davidmd>
octachron, yes "type hash = Hash of string"
<davidmd>
octachron, and changing the name of it to hashh changes the error message to pp_hashh
freyr has quit [Remote host closed the connection]
<davidmd>
ahh OK, so it's complaining about the missing derived methods that it requires to derive new methods
<orbifx[m]>
Is there a general preference to put comments after a definition?
<orbifx[m]>
(when it's a description of that definition)
spew has joined #ocaml
mbuf has quit [Quit: Leaving]
sh0t has joined #ocaml
<spew>
out of sheer curiosity, what does the "opt" stand for in the ocamlopt native compiler?
sapristi has joined #ocaml
davidmd has left #ocaml ["ERC (IRC client for Emacs 25.3.1)"]
<spew>
"optimal"?
<zozozo>
maybe optimizing
<spew>
good enough
Jesin has joined #ocaml
FreeBirdLjj has joined #ocaml
BitPuffin|osx has joined #ocaml
jnavila has joined #ocaml
igarnier has quit [Quit: Page closed]
BitPuffin|osx has quit [Ping timeout: 258 seconds]
sepp2k has joined #ocaml
aubian has joined #ocaml
Anarchos has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
barcabuona has joined #ocaml
emliunix has quit [Quit: No Ping reply in 180 seconds.]
mengu has quit [Ping timeout: 250 seconds]
emliunix has joined #ocaml
mk9_ has quit [Quit: mk9_]
govg has quit [Ping timeout: 255 seconds]
govg has joined #ocaml
govg has quit [Ping timeout: 276 seconds]
ziyourenxiang has quit [Ping timeout: 276 seconds]
ziyourenxiang has joined #ocaml
jrslepak has joined #ocaml
barcabuona has quit [Quit: WeeChat 1.9.1]
zmt00 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
malina has quit [Ping timeout: 250 seconds]
malina has joined #ocaml
sapristi has quit [Ping timeout: 255 seconds]
shiyaz has quit [Ping timeout: 250 seconds]
zolk3ri has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
jnavila has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 248 seconds]
aciniglio has joined #ocaml
BitPuffin|osx has joined #ocaml
davs has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
sapristi has joined #ocaml
bloodycock has quit []
tane has joined #ocaml
zolk3ri has joined #ocaml
slash^ has joined #ocaml
PatrickBateman has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
raphaelss has quit [Remote host closed the connection]
averell has quit [Quit: .]
nahra has joined #ocaml
kakadu_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 276 seconds]
jnavila has joined #ocaml
raphaelss has joined #ocaml
mengu has joined #ocaml
cbot has joined #ocaml
raphaelss has quit [Remote host closed the connection]
PatrickBateman has quit [Ping timeout: 276 seconds]
davs has quit [Ping timeout: 260 seconds]
moei has quit [Quit: Leaving...]
<sapristi>
hey
<sapristi>
is it possible to specify that an abstract type (e.g 'a )must have a specific field ?
<sapristi>
or do we have to use functors for that ?
<companion_cube>
functor, you can't constraint much on 'a parameters
<sapristi>
ok thanks companion_cube
<companion_cube>
and you can't specify a field, but yoiu can ask for functions
<companion_cube>
(e.g. a getter for the field)
<companion_cube>
(val foo : t -> int)
<sapristi>
yup
slash^ has quit [Read error: Connection reset by peer]
kerrhau has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
tane has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
nicoo has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 250 seconds]
nicoo has joined #ocaml
pierpa has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
lambda_foo has joined #ocaml
sz0 has joined #ocaml
jimt_ is now known as jimt
jnavila has quit [Remote host closed the connection]
cbot has quit [Ping timeout: 276 seconds]
moei has joined #ocaml
aciniglio has quit [Ping timeout: 255 seconds]
malc_ has joined #ocaml
raphaelss has joined #ocaml
sapristi has quit [Quit: Leaving]
zolk3ri has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
superherointj has joined #ocaml
AltGr has left #ocaml [#ocaml]
argent_smith1 has quit [Quit: Leaving.]
silver_ has joined #ocaml
shinnya has joined #ocaml
silver has quit [Ping timeout: 276 seconds]
JeanMax` has joined #ocaml
JeanMax has quit [Ping timeout: 248 seconds]
Jesin has quit [Quit: Leaving]
andrejbauer has joined #ocaml
spew has joined #ocaml
<andrejbauer>
I have a case of OCaml -> C interface (the mlgmpidl library) in which, as far as I can tell, the tags of an OCaml type are incorrectly translated to the corresponding C enum type. What is the correct way (OCaml 4.02.1 or 4.04.1) to translate them? The mlgmpidl library is using Int_val, to do this.
john51 has quit [Remote host closed the connection]
john51 has joined #ocaml
JazzyEagle has quit [Ping timeout: 240 seconds]
spew has quit [Ping timeout: 255 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
ygrek_ has quit [Ping timeout: 240 seconds]
superherointj has quit [Quit: Leaving]
kakadu_ has quit [Remote host closed the connection]