ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
jwatzman|work has quit [Quit: jwatzman|work]
oriba_ has quit [Quit: oriba_]
shinnya has quit [Ping timeout: 256 seconds]
jfeser has joined #ocaml
travisbrady has joined #ocaml
rand000 has quit [Quit: leaving]
shinnya has joined #ocaml
fold has quit [Ping timeout: 255 seconds]
eikke__ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
thomasga has quit [Quit: Leaving.]
BitPuffin has quit [Ping timeout: 264 seconds]
travisbrady has joined #ocaml
eikke__ has quit [Ping timeout: 260 seconds]
agarwal1975 has quit [Quit: agarwal1975]
maattdd has joined #ocaml
travisbrady has quit [Quit: travisbrady]
maattdd has quit [Ping timeout: 256 seconds]
flazz is now known as zz_flazz
lordkryss has quit [Quit: Connection closed for inactivity]
fold has joined #ocaml
huza has joined #ocaml
boogie has joined #ocaml
philtor has quit [Ping timeout: 250 seconds]
jfeser has quit [Quit: jfeser]
claudiuc has quit [Remote host closed the connection]
travisbrady has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
huza has quit [Ping timeout: 244 seconds]
huza has joined #ocaml
_twx_ has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 255 seconds]
<whitequark> anyone familiar with Typedtree here?
<whitequark> I don't understand how recursive types are represented in Types.signature
<whitequark> oh, nevermind, I read the comment for Types.rec_status.
\q has quit [Ping timeout: 250 seconds]
<Drup> whitequark: what are you hacking ?
<whitequark> ppx_import
<Drup> ok
<whitequark> I'm trying to make it work based on .cmi and not .cmti
<whitequark> not sure if it's a good idea actually
\q has joined #ocaml
<whitequark> wth is Partial_interface?!
<Drup> whitequark: you could use ocp-index's lib to ease the work
<Drup> I think it contains everything you need already
<whitequark> except I can't even install it
<Drup> even your oasis fork ?
<whitequark> okay. only I can install it on 4.02
<Drup> why is that an issue ?
<whitequark> because I'm interested in actually having useful software?
<Drup> did you meant "can't" ?
<whitequark> no, I mean "can"
<whitequark> I can install ppx_import, anyone else couldn't
<whitequark> → no point in distributing it or having smth else depend on it
<Drup> but you patched ocp-index and did a PR, which will be merged when 4.02 goes out and distributed
<Drup> nobody is going to use your ppx before 4.02 is officially out anyway ...
travisbrady has quit [Quit: travisbrady]
<whitequark> assuming anyone updates typerex...
<whitequark> anyway, it's beside the point, ocp-index translates cmi/cmt into Outcometree
<whitequark> and I need Parsetree
travisbrady has joined #ocaml
<Drup> hum, I wonder why it's done that way
ygrek has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<whitequark> wow wth
<whitequark> type Variance.f = May_pos | May_neg | May_weak | Inj | Pos | Neg | Inv
fold has quit [Ping timeout: 245 seconds]
<whitequark> why do record labels have arguments? O_o
ygrek has quit [Ping timeout: 240 seconds]
q66 has quit [Quit: Leaving]
ygrek has joined #ocaml
bjorkintosh has quit [Ping timeout: 260 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
maattdd has joined #ocaml
huza has quit [Ping timeout: 250 seconds]
<whitequark> how come `constraint`s are not in .cmi? O_o
bjorkintosh has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
huza has joined #ocaml
darkf has quit [Quit: Leaving]
darkf has joined #ocaml
boogie has quit [Ping timeout: 245 seconds]
uggwar has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
rishabhjain has joined #ocaml
boogie has quit [Client Quit]
ygrek has quit [Ping timeout: 264 seconds]
hausdorff has joined #ocaml
manizzle has joined #ocaml
artagnon has left #ocaml [#ocaml]
travisbrady has quit [Quit: travisbrady]
<whitequark> cmi format is a mess.
<whitequark> how is Types.row_field even supposed to work
maattdd has joined #ocaml
<whitequark> I now intensely regret starting this at all
maattdd has quit [Ping timeout: 240 seconds]
<whitequark> | Otyp_stuff of string
<whitequark> `Otyp_stuff' ?
axiles has joined #ocaml
ygrek has joined #ocaml
lusory has quit [Ping timeout: 256 seconds]
lusory has joined #ocaml
slash^ has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
rishabhjain has quit []
shinnya has quit [Ping timeout: 255 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 240 seconds]
_5kg has quit [Ping timeout: 245 seconds]
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
fraggle_laptop has joined #ocaml
ygrek has joined #ocaml
tac has quit [Quit: Leaving]
tac has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Ping timeout: 250 seconds]
maattdd has joined #ocaml
hausdorff has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Hannibal_Smith has joined #ocaml
_0xAX has joined #ocaml
Simn has joined #ocaml
maattdd has joined #ocaml
Gonzih has joined #ocaml
parcs has quit [Read error: Connection reset by peer]
parcs has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
yacks has quit [Ping timeout: 264 seconds]
Kakadu has joined #ocaml
_0xAX has quit [Remote host closed the connection]
samrat has joined #ocaml
dant3 has quit [Ping timeout: 272 seconds]
dant3 has joined #ocaml
yacks has joined #ocaml
maattdd has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
typedlambda has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
leowzukw has joined #ocaml
lifeng has joined #ocaml
pango has joined #ocaml
Sim_n has joined #ocaml
wwilly has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
leowzukw has quit [Quit: leaving]
leowzukw has joined #ocaml
leowzukw has quit [Quit: leaving]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
Sim_n is now known as Simn
demonimin_ has joined #ocaml
demonimin has quit [Ping timeout: 256 seconds]
Nahra has joined #ocaml
hausdorff has quit [Remote host closed the connection]
rand000 has joined #ocaml
ollehar has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
tac has quit [Quit: Leaving]
tane has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
ollehar has quit [Ping timeout: 240 seconds]
lifeng has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 255 seconds]
rand000 has joined #ocaml
thomasga has joined #ocaml
lifeng has joined #ocaml
BitPuffin has joined #ocaml
Gonzih has quit [Ping timeout: 240 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
fraggle_laptop has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 244 seconds]
dsheets_ has joined #ocaml
hausdorff has joined #ocaml
shinnya has joined #ocaml
rand000 has quit [Quit: leaving]
hausdorff has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
wwilly has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
englishm_ has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
ollehar has joined #ocaml
lifeng has quit [Quit: Ex-Chat]
samrat has quit [Quit: Computer has gone to sleep.]
maattdd has joined #ocaml
englishm_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
oriba has joined #ocaml
samrat has joined #ocaml
bjorkintosh has quit [Ping timeout: 250 seconds]
Submarine has joined #ocaml
bjorkintosh has joined #ocaml
zpe has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
BitPuffin has joined #ocaml
parcs has quit [Read error: Connection reset by peer]
Denommus has joined #ocaml
parcs has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
sad0ur_ has quit [Quit: leaving]
slash^ has joined #ocaml
jbrown has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
lordkryss has joined #ocaml
pjdelport has quit [Quit: Connection closed for inactivity]
fold has joined #ocaml
englishm_ has joined #ocaml
jbrown has quit [Read error: Connection timed out]
jbrown has joined #ocaml
travisbrady has joined #ocaml
jbrown has quit [Read error: Connection timed out]
jbrown has joined #ocaml
agarwal1975 has joined #ocaml
samrat has joined #ocaml
nojb has joined #ocaml
<nojb> I get
<nojb> >> Fatal error: cannot open implicit module "Pervasives"
<nojb> Fatal error: exception Misc.Fatal_error
<nojb> when calling Runcode.run in a program compiled using metaocamlc ... any ideas ?
<ygrek> show the code?
<nojb> it is part of a long program - let me see if I can make a small example
maattdd has joined #ocaml
<nojb> ygrek: never mind - now it works; apparently metaocaml doesn't like .cma's...
zpe has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
dsheets_ has quit [Quit: Leaving]
<ygrek> %)
zpe has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Ping timeout: 255 seconds]
hhugo has joined #ocaml
ollehar has joined #ocaml
dsheets has quit [Quit: Leaving]
slash^ has quit [Read error: Connection reset by peer]
nojb has quit [Read error: Connection reset by peer]
_twx_ has joined #ocaml
slash^ has joined #ocaml
hhugo has quit [Quit: Leaving.]
pjdelport has joined #ocaml
hhugo has joined #ocaml
pminten has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
manizzle has quit [Ping timeout: 244 seconds]
pminten has quit [Remote host closed the connection]
isBEKaml_mobile has joined #ocaml
isBEKaml_mobile has left #ocaml [#ocaml]
ollehar has joined #ocaml
ollehar has quit [Client Quit]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
BitPuffin has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 256 seconds]
mcclurmc has joined #ocaml
hhugo has quit [Quit: Leaving.]
jbrown has joined #ocaml
travisbrady has joined #ocaml
_0xAX has joined #ocaml
hausdorff has joined #ocaml
ollehar has joined #ocaml
hhugo has joined #ocaml
_0xAX has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
rishabhjain has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 256 seconds]
philtor has joined #ocaml
isomorphismes has quit [Ping timeout: 260 seconds]
travisbrady has quit [Quit: travisbrady]
philtor_ has joined #ocaml
isomorphismes has joined #ocaml
tac has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
tane has quit [Quit: Verlassend]
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
fraggle_laptop has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
ygrek has joined #ocaml
hausdorff has quit [Remote host closed the connection]
fold has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
waneck has joined #ocaml
hausdorff has joined #ocaml
hhugo has quit [Quit: Leaving.]
hausdorf_ has joined #ocaml
rishabhjain has quit [Ping timeout: 260 seconds]
philtor_ has quit [Ping timeout: 255 seconds]
divyanshu has joined #ocaml
tane has joined #ocaml
oriba_ has joined #ocaml
jbrown has quit [Ping timeout: 256 seconds]
oriba has quit [Ping timeout: 250 seconds]
hhugo has joined #ocaml
maattdd has joined #ocaml
hausdorf_ has quit [Remote host closed the connection]
hausdorf_ has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
hhugo has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 255 seconds]
jbrown has joined #ocaml
hausdorf_ has quit [Ping timeout: 244 seconds]
Kakadu has quit [Quit: Konversation terminated!]
vincom2 has quit [Remote host closed the connection]
Kakadu has joined #ocaml
vincom2 has joined #ocaml
vincom2 has quit [Remote host closed the connection]
vincom2 has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Client Quit]
travisbrady has joined #ocaml
divyanshu has quit [Ping timeout: 240 seconds]
vincom2 has quit [Remote host closed the connection]
vincom2 has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
divyanshu has joined #ocaml
tac has quit [Ping timeout: 255 seconds]
fold has joined #ocaml
hausdorff has quit [Ping timeout: 250 seconds]
manizzle has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
manizzle has quit [Max SendQ exceeded]
travisbrady has quit [Quit: travisbrady]
pjdelport has quit [Quit: Connection closed for inactivity]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ontologiae has joined #ocaml
divyanshu has quit [Ping timeout: 244 seconds]
mcclurmc has quit [Ping timeout: 255 seconds]
hausdorff has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
dotfelix has joined #ocaml
maattdd has joined #ocaml
samrat has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
dotfelix has quit [Quit: Leaving]
Anarchos has joined #ocaml
j__ has joined #ocaml
ggole has quit []
hausdorff has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
paddymahoney has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
hausdorff has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
pyon has quit [Read error: Connection reset by peer]
<j__> #j rust-gamedev
Hannibal_Smith has quit [Quit: Sto andando via]
pyon has joined #ocaml
artagnon has joined #ocaml
artagnon has left #ocaml [#ocaml]
artagnon has joined #ocaml
<artagnon> (OCaml LLVM bindings) How do I create a vector of size specified by llvalue?
axiles has quit [Remote host closed the connection]
dsheets has quit [Read error: Connection reset by peer]
<whitequark> artagnon: you can't
<whitequark> that's not how vectors work
<artagnon> I see.
<artagnon> Do you have any ideas on how to store and retrieve a vector from a struct with an element pointer?
joncfoo has joined #ocaml
<whitequark> cast it to a vector
<artagnon> Of what size?
<whitequark> if you need to handle several different vector sizes, use a switch statement
<artagnon> What do you mean?
<whitequark> it only makes sense to use the few vector widths supported by your hardware, anyway
<whitequark> vectors aren't like arrays, they're only for SIMD operations
<artagnon> I got that. I have a vector of integers.
<artagnon> But I need to box and unbox it because my language is dynamically typed.
<artagnon> http://pastebin.com/m3Yn7kyM -- code to box and unbox.
<artagnon> Note that I'm using the constant "3" on the vector_size for unboxing.
<whitequark> as I've said, use a switch
<artagnon> Can you elaborate on that?
<whitequark> well, actually, scratch that
<whitequark> you aren't going to use vectors with a language like that
<artagnon> Damn.
<whitequark> (use a switch) generate several code paths for every possible vector size
<artagnon> But how do I know the vector size?
<whitequark> uh?
<artagnon> While unboxing.
<whitequark> your language is dynamically typed, you must keep that information somewhere
<artagnon> Okay, so I keep it in a field in my struct.
<artagnon> It's an llvalue.
<artagnon> Now what?
<whitequark> now you compare it with 2, if it is, you unpack into a vector of size 2
<whitequark> repeat for 3, 4, ...
<artagnon> Oh my!
<whitequark> but this is useless, because you can't push the result on stack or basically do anything useful whatsoever with it
<whitequark> since for every vector operation you need to know the vector size as well
<artagnon> Yeah, that happens while unboxing.
<whitequark> ah, so you codegen unbox+op+box?
<artagnon> So, if I add two vectors, they're boxed into value_t and then unboxed.
<artagnon> Yes!
<whitequark> that would work, but the problem is that this pattern will be simply very inefficient
<artagnon> That's how a dynamically typed language works.
<whitequark> so? it doesn't change the fact that it is useless
<whitequark> since you will only have marginal, if any, speedup
<artagnon> What do you propose I do?
<artagnon> Scrap vectors?
<whitequark> or dynamic typing
<whitequark> either works :)
<artagnon> I can't scrap dynamic typing. The language is a Lisp.
<whitequark> well, you can also add a specializing JIT
<whitequark> which would use type information
<whitequark> to unbox values over a much wider scope
<whitequark> but that's pretty hard to do
<artagnon> :|
<whitequark> also, LLVM kinda sucks at JITing
<artagnon> I know.
<artagnon> Wait, even array_type requires an int; can't take an llvalue.
<artagnon> Wait, can I keep track of the sizes of vectors in OCaml?
<artagnon> The problem turns into identifying vectors while unboxing.
travisbrady has joined #ocaml
sad0ur has joined #ocaml
maattdd has joined #ocaml
pjdelport has joined #ocaml
Simn has quit [Quit: Leaving]
travisbrady has quit [Quit: travisbrady]
maattdd has quit [Ping timeout: 240 seconds]
<whitequark> huh?
<whitequark> you need to store the vector size together with its value
<artagnon> I've done that.
<whitequark> okay, so what's the problem?
<artagnon> The switch statement.
<artagnon> I can compare the size llvalue to the constant llvalue N, and I get another llvalue.
<dmbaturin> Do type constructors have to be capitalized?
<artagnon> Yes.
<dmbaturin> Ah, this explains where the syntax error is.
<whitequark> switch i32 %vector_size, label %wtf [ i32 2, label %two, i32 3, label %three, ... ]
<whitequark> then at two: codegen the code for <2 x i32>, etc
<artagnon> Oh, my bad. I thought you meant in OCaml.
<artagnon> The switch statement is quite a hack.
<artagnon> How many sizes can I handle?
<artagnon> 10?
rgrinberg has quit [Quit: Leaving.]
<whitequark> I could answer that question, but I wouldn't, because I believe you are misunderstanding what vectors are useful for
<Anarchos> whitequark the margin is too thin ?
<whitequark> SIMD gives you a lot of benefit when you have large contiguous areas of unboxed data without branches
<whitequark> you have the direct opposite of that configuration
rgrinberg has joined #ocaml
<artagnon> I'll change it into arrays then.
<joncfoo> is there a mirror of the default opam.ocaml.org repository?
<artagnon> Just s/vector/array/ -- same code, right?
<whitequark> um, no?
<whitequark> you can't add arrays
<whitequark> like add [i32 x 4] %a, %b
<artagnon> I meant the boxing/ unboxing stuff.
<whitequark> do you want to unbox the entire array? O_o
<whitequark> and anyway, that's even more pointless, since array sizes are effectively unbounded
<artagnon> Then what composite type can I have in my language? :|
<whitequark> anything you want, but you have to lower it into instructions that LLVM supports (gep in this case) yourself
tac has joined #ocaml
<artagnon> Sounds like a huge pain :/
<artagnon> I'll try to implement a linked list though.
<artagnon> Just that I'll be left with very basic LLVM instructions to operate on my data.
<joncfoo> can someone try the following & see if it was successful? `curl https://opam.ocaml.org/archives/menhir.20130912+opam.tar.gz > /dev/null`
<joncfoo> I keep getting timed out
<artagnon> Thanks though.
<whitequark> writing your own compiler is a huge pain, duh
<artagnon> :)
joncfoo has quit [Quit: Leaving]
<dmbaturin> What is the motivation behind requirement to have type constructors capitalized?
<whitequark> disambiguation with values, I suppose?
<dmbaturin> Ah, so values _cannot_ be capitalized. Now it makes sense.
fold has quit [Ping timeout: 260 seconds]
<dmbaturin> Manuals I've found don't emphasize it for some reason.
shinnya has quit [Ping timeout: 250 seconds]
tane has quit [Quit: Verlassend]
jave has quit [Quit: ZNC - http://znc.in]
shinnya has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 244 seconds]
<artagnon> whitequark: Can you quickly run me through the basics of blocks? This is my code: http://pastebin.com/ft0f9sMf
<whitequark> please read the LLVM LangRef.
jave has joined #ocaml
<artagnon> I think I'm using block_of_value incorrectly.
<whitequark> you are. what do you even expect that to do?
<artagnon> I did read it.
<artagnon> Create a block with that value?
<artagnon> add_case takes llbasicblock destinations.
<artagnon> So, I tried creating an llbasicblock out of an llvalue.
philtor_ has joined #ocaml
<whitequark> block_of_value is a conversion function
<whitequark> it takes an llvalue, which must already refer to a basic block, and returns llbasicblock
<whitequark> it doesn't create anything
<whitequark> basically, llvalue input and llbasicblock output refer to the exact same thing
philtor_ has quit [Remote host closed the connection]
<artagnon> Oh.
<artagnon> So, how do I create a basicblock containing an llvalue?
<whitequark> using llbuilder.
j__ has quit [Ping timeout: 244 seconds]
<artagnon> insertion_block then.
darkf has joined #ocaml
<artagnon> How do I insert an llvalue into the llbasicblock?
<whitequark> insert_into_builder
<artagnon> I was thinking add_destination.
<whitequark> "add_destination br bb adds the basic block bb as a possible branch location for the indirectbr instruction br. See the method llvm::IndirectBrInst::addDestination. *"
<whitequark> I'm not sure why you consider add_destination relevant at all
<artagnon> From the signature.
<artagnon> Never mind.
rgrinberg has quit [Quit: Leaving.]
<whitequark> I do think you should read the documentation before trying to use a function.
<artagnon> :P
<artagnon> I tried insert_into_builder (vec n) "vecN" builder; insertion_block builder
<artagnon> ... but that returns an error.
jave has quit [Read error: No route to host]
<whitequark> I'm not going to answer any more questions until you read documentation for all the functions you use.
jave has joined #ocaml
<artagnon> Okay :\
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<artagnon> So, I tried calling insertion_block first and then insert_into_builder, returning the llbasicblock.
<whitequark> No, really, read the documentation.
<artagnon> I read and re-read the docstrings. I don't know what I'm missing.
<artagnon> insertion_block returns the basic block that the builder is positioned to insert into.
<artagnon> And insert_into_builder inserts the instruction at the position specified by llbuilder.
<whitequark> okay, good
<whitequark> the problem you have is that you're still inserting into the same basic block as before, because none of the functions you invoked create a new basic block
<whitequark> you need to append_block and then position_at_end
<artagnon> Ah!
* artagnon tries that
rgrinberg has joined #ocaml
<artagnon> So this is what I have now: http://pastebin.com/UJUSarqu
<artagnon> I get a very unhelpful V->getParent() == 0 && "Value already in a container!!"
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
jave has quit [Read error: No route to host]
jave has joined #ocaml
thomasga has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
q66 has quit [Remote host closed the connection]
bbarker has joined #ocaml
rgrinberg has joined #ocaml
<dmbaturin> How do I define a type constructor that takes a list of lists of something?
philtor_ has joined #ocaml
tac has quit [Quit: Leaving]
<Drup> you want an heterogeneous list or just a polymorphic datatype ?
BitPuffin has quit [Ping timeout: 263 seconds]
<Drup> let me reformulate : do you want a list where you can put anything, or a list of all the same something, but you don't know which something yet ?
<whitequark> artagnon: you already put that instruction somewhere, then...
<dmbaturin> Drup: I want a type to represent context-free grammar production rules. Every rule may include multiple terminals and non-terminals on the right side.
<whitequark> artagnon: if (vec n) builds the llvalue, then it has just inserted it into this very basic block
<Drup> dmbaturin: and what is the representation of your terminal/non-termintals ?
<dmbaturin> Drup: That's what I'm trying to come up with. :)
<Drup> well, let's assume you have made up your mind about that, and you have a type "terminal" and "nonterminal" ready
<dmbaturin> The current idea is to make symbol type that can be terminal (string) or nonterminal, and non-terminal can be a list of terminals and non-terminals.
<Drup> right
<dmbaturin> Or symbols, that is.
<artagnon> whitequark: Yeah, (vec n) builds an an llvalue.
<whitequark> so it's already inserted then
<artagnon> No need to insert_into_builder?
<Drup> type terminal = string
<Drup> and nonterminal = symbol list
<Drup> and symbol = Term of terminal | NonTerm of nonterminal ;;
<Drup> dmbaturin: something like that.
<artagnon> whitequark: I'm getting errors about missing basic block terminators.
<Drup> dmbaturin: note that two of these "definitions" are not really defining anything, they are simply giving new names to something that already exists
<whitequark> again, please, read the relevant LangRef parts
jao has quit [Ping timeout: 240 seconds]