Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ollehar has quit [Read error: Connection reset by peer]
justgage has quit [Quit: Page closed]
ollehar has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
kdef has quit [Quit: Leaving]
nojb has quit [Quit: nojb]
nojb has joined #ocaml
MrScout has quit [Remote host closed the connection]
nojb has quit [Quit: nojb]
keen________ has joined #ocaml
keen_______ has quit [Ping timeout: 244 seconds]
pyon is now known as ex-pyon-ential
ex-pyon-ential is now known as pyon
<ilia>
How to declare a member of type Heap inside another type. I tried: module PT type t = point let compare e1 e2 = compare e1#dot_product e2#dot_product end
ollehar has quit [Ping timeout: 240 seconds]
<Drup>
type Heap ?
<ilia>
then use it inside another type: type other_point = { id : int; x : int; y:int; z:int; cluster :(PT) Heap;);;
<ilia>
yes, I think I need Heap of points inside other type
<Drup>
1) Heap is a module, not a type. Heap.t is a type
<Drup>
2) please give more information, a lot of what you typed is undefined ...
<ilia>
I see
<ilia>
I have a type point and another type other_point
<ilia>
inside other_point I want to use heap of points
<ilia>
and compare points using some field named dot_product
<ilia>
thanks
<Drup>
a heap of point would be "point Heap.t"
<Drup>
and fiels are accessed with a dot, not a #
<Drup>
fields*
<ilia>
thanks, now it works
<ilia>
well, it compiles
ygrek has joined #ocaml
<ilia>
how to provide my comparison function?
<ilia>
cluster : point Heap.t; <--- this compiles
<Drup>
you provide it through the Heap.create function
<Drup>
when creating the Heap
<ilia>
oh, that's right!
<ilia>
thanks!
jwatzman|work has quit [Quit: jwatzman|work]
<javamonn>
What is the significance of the underscore in this type declaration? https://github.com/mirage/mirage/blob/master/lib/mirage.ml#L67 Is it needed because it's circular and how the cases are annotated/don't care about the polymorphic part?
<Drup>
the underscore means "there is a type parameter but I don't care about the name", it's quite common for this kind of declarations
<Drup>
If you are really not familiar with caml, I'm not sure reading mirage's sources is the most gentle introduction :p
<javamonn>
I'm on the last section of real world ocaml, any recommendations on where to go from here? I can grok unikernel sources themselves but some of the higher level stuff is still beyond me
<Drup>
I would tend to say "just write something" ;)
<javamonn>
the thing is if I just write something I feel like I would naively hack my around, I wouldn't know to use e.g. types parameterized by other types
<javamonn>
hack my way*
<Drup>
the fact that you know it means that you can try to avoid it ;)
maurer has quit [Ping timeout: 256 seconds]
s1n4 has joined #ocaml
maurer has joined #ocaml
Nijikokun_ has quit [Ping timeout: 245 seconds]
<dmbaturin>
javamonn: It's not like you have to use every language feature in order to make a useful program. :)
darkf has joined #ocaml
<dmbaturin>
Also, what exactly do you mean by types parameterized by other types?
mengu has joined #ocaml
rbocquet has quit [Quit: WeeChat 1.0.1]
mengu has quit [Ping timeout: 250 seconds]
<ilia>
I am trying to check number of args: if Array.length Sys.argv < 2 then
<dmbaturin>
It's perfectly normal to pass a function as an argument in ML, so it parses correctly, but doesn't typecheck because printf type doesn't match the argument types and count.
<ilia>
when I just compiled w/o linking it was ok, now it gives an error
<dmbaturin>
ilia: I think you need to use corebuild. Reading RWO?
<ilia>
no, RW0 is the only paper book I have on hands
<dmbaturin>
Try with -linkpgk
claudiuc has quit [Ping timeout: 245 seconds]
<dmbaturin>
* -linkpkg
<ilia>
now it works
<dmbaturin>
If this is your first program, I should recite my obligatory note. :)
<ilia>
please, what is the note?
<dmbaturin>
Core is not a part of the language, you don't have to use it. If you want to use it and know why you want it, it's fine of course.
<ilia>
I am using Map.Poly.t
<ilia>
it is not a part of core, right?
<dmbaturin>
Not sure where it's from, I don't use core myself.
<yminsky>
It's a simple shell wrapper around ocamlbuild
<yminsky>
And it has a reasonable set of default flags that you can steal and use elsewhere if you so choose
<dmbaturin>
RWO made core popular among beginners too, so I've seen people linking it even if they don't really use it. :)
<ilia>
I use this: ocamlfind ocamlc -thread -linkpkg -package core myfile.ml
<yminsky>
Just do "corebuild myfile.byte"
<yminsky>
You may need to blow away the build artifacts you have scattered around from previous attempts...
<ilia>
well, I just want a dictionary int -> int
<yminsky>
Core has lots of useful data structures, including dictionaries
<yminsky>
But there's also a map in the stdlib if you prefer
<yminsky>
If you're following two, core is the most natural choice. But there are other books that focus on the stdlib
<ilia>
file size is very different
<ilia>
corebuild vs ocamlc
<ilia>
I have RWO printed, so I am doing it RWO way
<yminsky>
Indeed. Linking in core brings in a lot of code. This will get better in future releases, but right now, the big downside to core is executable size
Submarine has quit [Remote host closed the connection]
<ilia>
I mean in paper
<dmbaturin>
Core is quite extensive, and thus quite big.
<ilia>
ok, I am not embedder, so size is not an issue
<dmbaturin>
Also, native code is usually a better choice than bytecode.
<yminsky>
Indeed. "corebuild myfile.native" gives you native code.
<dmbaturin>
ocamlopt is the native compiler, not sure how to make corebuild use it, ask yminsky. :)
<yminsky>
Really, corebuild is just ocamlbuild with a few default flags on it. It's super boring.
<n3ss3s>
The authorization header I'm using is freshly generated by twitter, and the generated curl requests works (this particular one has probably expired by now) but the ocaml one won't
xificurC_ has joined #ocaml
xificurC has quit [Ping timeout: 264 seconds]
matason has quit []
matason has joined #ocaml
matason has quit [Client Quit]
javamonn has joined #ocaml
<n3ss3s>
oh, i think i have a hunch
xificurC_ has quit [Remote host closed the connection]
milosn has quit [Read error: Connection reset by peer]
badkins has quit []
xificurC_ has joined #ocaml
milosn has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Algebr` has joined #ocaml
Algebr has quit [Ping timeout: 245 seconds]
struktured has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
osa1 has joined #ocaml
osa1 has quit [Ping timeout: 245 seconds]
<n3ss3s>
if I have a long function call (e.g. multiple labeled arguments), what's the recommended way of using line breaks?
MercurialAlchemi has joined #ocaml
javamonn has quit []
<struktured>
I don't know what's recommended, but I 've seen each arg on it's own line (especially if the assignment to the label is long). I personally just keep enumerating with spaces in between, stop at 80 chars, then indent on the next line and all future lines use same indention level.
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
psy_ has quit [Ping timeout: 250 seconds]
kdef has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
struktured has joined #ocaml
Algebr` has quit [Ping timeout: 252 seconds]
Algebr` has joined #ocaml
Denommus has joined #ocaml
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
freling has joined #ocaml
robink_ has joined #ocaml
djellemah has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
ericwa has quit [Quit: Leaving...]
olibjerd has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
<n3ss3s>
I keep getting a syntax error for whatever I write after line 4. Not sure what's up, http://pastebin.com/kT1T07Qs
<n3ss3s>
ugh, pasted the stuff into a new file and it compiles
kdef has quit [Quit: Leaving]
<n3ss3s>
NOOOO
<n3ss3s>
it was all because of a semicolon at the end of a let earlier in the code
<n3ss3s>
not sure how the syntax error made it that far downstream but damn.
freling has quit [Quit: Leaving.]
n3ss3s has quit [Ping timeout: 256 seconds]
Nahra has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
octachron has joined #ocaml
Haudegen has joined #ocaml
michael_lee has joined #ocaml
rbocquet has joined #ocaml
teiresias has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
teiresias has joined #ocaml
teiresias has quit [Changing host]
teiresias has joined #ocaml
ygrek has joined #ocaml
Simn has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
dsheets_ is now known as dsheets
contempt has quit [Ping timeout: 245 seconds]
contempt has joined #ocaml
Remyzorg has joined #ocaml
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
rand000 has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
oscar_toro has quit [Ping timeout: 252 seconds]
vpm_ has joined #ocaml
vpm has quit [Quit: leaving]
ggole has joined #ocaml
<reynir>
heh
<companion_cube>
does anyone else have a bug with oasis/ocamlbuild, where "make clean" seems to block forever?
mort___ has joined #ocaml
Denommus has quit [Read error: Connection reset by peer]
oscar_toro has joined #ocaml
<Leonidas>
I haven't encountered such a bug yet
milosn has quit [Ping timeout: 244 seconds]
<flux>
leonidas, is it fixed yet? is it fixed yet? ;-)
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
<Leonidas>
flux: actually, I'm on it. Internet ist just really slow, I can type faster into ssh than it takes to appear
mengu has quit [Ping timeout: 255 seconds]
<dmbaturin>
Leonidas: You are an oasis developer?
psy_ has joined #ocaml
<flux>
if he is, it's not relevant to these two messages, as it was about Slacko :)
matason has joined #ocaml
<Leonidas>
dmbaturin: no. I think only gildor is. I just have an oasis fork on my github, waiting to be edited once days start having 36h :)
<flux>
you can have 36-hour days right now.. the catch: weeks shall have 4 2/3 days
* Leonidas
:)
<dmbaturin>
Leonidas: Let's stick something into the ground and pull it back (with respect to the earth rotation direction). Together we can do it! ;)
<dmbaturin>
octachron: Or use a directed asteroid impact to make the Moon rotate faster again. Crowdfund it as a project to make the far side of the Moon visible again.
mengu has joined #ocaml
<dmbaturin>
"Pledge $10^8 or more: we will name the impact crater after you"
<octachron>
dmbaturin: fighting against the tyranny of tidal locking surely is a noble (and long-term) cause
<dmbaturin>
People who would like to have a radio telescope on the far side will be upset though.
ygrek has quit [Remote host closed the connection]
mort___ has joined #ocaml
robink_ has quit [Ping timeout: 245 seconds]
robink_ has joined #ocaml
<struk|work>
mich: did you add rpclib.syntax to your ocamlfind libs?
pyon has quit [Quit: Sie ist der hellste Stern von allen, und wird nie vom Himmel fallen.]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
<mich>
struck: adding rpclib.syntax to ocamlfind libs fixes parse problem, but now I get this error: Failure "pa_type_conv: \" rpc\" is not a supported signature generator. (supported generators: )"
ollehar1 has joined #ocaml
ontologiae_ has joined #ocaml
jwatzman|work has joined #ocaml
<struk|work>
something to do with your build sys I guess. I can require "rpc.syntax" in utop and get it to work easily
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout_ has joined #ocaml
manizzle has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
ollehar1 has quit [Remote host closed the connection]
Hannibal_Smith has joined #ocaml
mich has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 255 seconds]
dsheets has quit [Ping timeout: 264 seconds]
hugomg has joined #ocaml
hbar has quit [Ping timeout: 256 seconds]
pyon has joined #ocaml
Nahra has quit [Remote host closed the connection]