adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<python476> ocamlopt -verbose list.ml -o li...
<python476> oh no
<python476> name collision ?
tmtwd has quit [Ping timeout: 250 seconds]
<Drup> yep ..
jabesed has quit [Quit: Konversation terminated!]
<python476> the makefile rule made it invisible .. I had to type it here to realize
<python476> ironically, happens to me every month in python too
<python476> haa newbery at its best
sigjuice_ has quit [Ping timeout: 265 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
sigjuice has joined #ocaml
BitPuffin has quit [Ping timeout: 256 seconds]
<Drup> yeah. Redefining the modules in the stdlib is not a good idea :p
struktured has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
rand000 has quit [Quit: leaving]
jeffmo_ has quit [Quit: jeffmo_]
tmtwd has joined #ocaml
AltGr has joined #ocaml
tmtwd has quit [Read error: Connection reset by peer]
<python476> So what do you guys use Ocaml for ?
freedrull has left #ocaml [#ocaml]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bmk1st has joined #ocaml
bmk1st has left #ocaml [#ocaml]
jeffmo has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
<struktured> for starters, I wrote a python compiler and interpreter in pure ocaml
<struktured> just kidding, but I bet someone already did
<python476> mython, the objectless subset of python
toomuchtvrotsurb has quit [Remote host closed the connection]
tennix has joined #ocaml
<struktured> nice
<struktured> people use ocaml for anything really
<struktured> perhaps it's traditionally use for parsers, code generators, theorem provers, etc.
swgillespie has joined #ocaml
mea-culp` has joined #ocaml
mea-culpa has quit [Ping timeout: 250 seconds]
jeffmo has quit [Quit: jeffmo]
<python476> yeah, anything with recursive types / algebras will fit ml , they were born together
<python476> but I was curious about you all there, not academics
<python476> unless you're all PhD students and researchers :)
sailorswift has joined #ocaml
sailorswift has quit [Client Quit]
sailorswift has joined #ocaml
<Algebr> python476: I use ocaml for everything
<python476> Pizza and coffee
<python476> ** subtle proglang humor
<struktured> well I use it professionally for some performance testing data analysis, as a hobby I am trying to do some reinforcement learning stuff
<Algebr> I just did a hackathon, everything was ocaml. I used tyxml (OCaml to HTML) js_of_ocaml (OCaml to javascript)
<Algebr> cohttp (for the server)
mcclurmc has joined #ocaml
sailorswift has quit [Max SendQ exceeded]
<python476> pretty cool
MrScout has quit [Ping timeout: 244 seconds]
<python476> and do you use other ml languages ? smlnj ? f# ?
tennix has quit [Quit: WeeChat 1.2]
mcclurmc_ has quit [Ping timeout: 260 seconds]
<Algebr> no
sailorswift has joined #ocaml
<python476> I can't say why but I felt smlnj easier to write with.. that's an interesting syntax issue, at least for me
<Algebr> Is a pattern match on a string slower than say a match on a variant?
python476 has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 244 seconds]
MrScout has joined #ocaml
mea-culp` has quit [Remote host closed the connection]
tmtwd has joined #ocaml
darkf has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
samrat has joined #ocaml
Algebr` has joined #ocaml
sailorswift has quit [Read error: Connection reset by peer]
sailorswift has joined #ocaml
ygrek_ has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Ping timeout: 252 seconds]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bhavya has joined #ocaml
psy_ has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
Algebr` has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 246 seconds]
ygrek_ has joined #ocaml
grouzen has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
siddharthv_away is now known as siddharthv
manizzle has joined #ocaml
psy_ has joined #ocaml
sh0t has joined #ocaml
GeorgeHahn has quit [Read error: Connection reset by peer]
<zozozo> I'd say yes
<zozozo> a variant is juste an int underneath
<zozozo> and comparing int(s) is faster than strings normally (or else there is something really wrong happening)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
sh0t has quit [Ping timeout: 252 seconds]
ely-se has joined #ocaml
AlexRussia has joined #ocaml
cschneid has quit [Ping timeout: 265 seconds]
tizoc has quit [Ping timeout: 265 seconds]
tizoc has joined #ocaml
cschneid has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
Bhavya has quit [Ping timeout: 244 seconds]
meteo__ has joined #ocaml
<companion_cube> Drup: of course there is, CCString.of_list
dwoos has quit [Ping timeout: 265 seconds]
dwoos has joined #ocaml
Bhavya has joined #ocaml
samrat has quit [Ping timeout: 272 seconds]
sailorswift has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
jonludlam has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
jonludlam has quit [Ping timeout: 244 seconds]
antegallya has joined #ocaml
whirm has joined #ocaml
ely-se has quit [Quit: leaving]
tizoc has quit [*.net *.split]
obadz has quit [*.net *.split]
The_third_man has quit [*.net *.split]
SHODAN has quit [*.net *.split]
taion809 has quit [*.net *.split]
siddharthv has quit [*.net *.split]
tobiasBo1 has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
tokik has quit [*.net *.split]
iZsh has quit [*.net *.split]
Cypi has quit [*.net *.split]
maurer has quit [*.net *.split]
pleiosaur has quit [*.net *.split]
LnL has quit [*.net *.split]
cow-orker has quit [*.net *.split]
tizoc has joined #ocaml
obadz has joined #ocaml
The_third_man has joined #ocaml
taion809 has joined #ocaml
tobiasBo1 has joined #ocaml
LnL has joined #ocaml
tokik has joined #ocaml
maurer has joined #ocaml
Cypi has joined #ocaml
siddharthv has joined #ocaml
dmbaturin has joined #ocaml
SHODAN has joined #ocaml
iZsh has joined #ocaml
cow-orker has joined #ocaml
pleiosaur has joined #ocaml
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
yomimono has joined #ocaml
antegallya has quit [Ping timeout: 244 seconds]
pyon has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
zpe has joined #ocaml
siddharthv is now known as siddharthv_away
dsheets has quit [Ping timeout: 244 seconds]
rand000 has joined #ocaml
kakadu has joined #ocaml
samrat has joined #ocaml
psy_ has quit [Ping timeout: 246 seconds]
psy_ has joined #ocaml
psy_ has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
psy_ has joined #ocaml
meteo__ has quit [Ping timeout: 256 seconds]
meteo__ has joined #ocaml
octachron has quit [Ping timeout: 246 seconds]
rossberg has quit [Ping timeout: 244 seconds]
AltGr has left #ocaml [#ocaml]
xificurC has joined #ocaml
octachron has joined #ocaml
rossberg has joined #ocaml
seliopou has quit [Ping timeout: 252 seconds]
_ether_ has quit [Remote host closed the connection]
_andre has joined #ocaml
ely-se has joined #ocaml
GeorgeHahn has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<Drup> companion_cube: oh, indeed
<Drup> and the name, while less cool, is more descriptive =')
<Drup> Algebr: yes *but* pattern matching on string is quite fast
<companion_cube> well yes, it sounds normal to call it 'of_list' :)
jonludlam has joined #ocaml
tane has joined #ocaml
kolko has quit [Ping timeout: 252 seconds]
sepp2k has joined #ocaml
zpe has joined #ocaml
kolko has joined #ocaml
pippijn has quit [Quit: Reconnecting]
pippijn has joined #ocaml
ollehar has joined #ocaml
lordkryss has joined #ocaml
grouzen has quit [Ping timeout: 244 seconds]
ericsmithvt has joined #ocaml
ceryo has joined #ocaml
tane has quit [Quit: Verlassend]
ceryo has quit [Client Quit]
ceryo has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
Haudegen has quit [Ping timeout: 244 seconds]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonludlam has quit [Ping timeout: 260 seconds]
kushal has quit [Ping timeout: 255 seconds]
badkins has joined #ocaml
<ely-se> Is js_of_ocaml any good?
Haudegen has joined #ocaml
<adrien_znc> yes
<adrien_znc> now
<adrien_znc> if you ask Drup
<adrien_znc> he'll tell you it's incredibly good (and he won't be wrong)
<mrvn> good as opposed to bad or to evil? :)
<ely-se> mrvn: "bad" can mean evil too!
jhaberku has joined #ocaml
<jhaberku> I never appreciated before yesterday that Lwt is essentially the IO monad from Haskell, especially with the utop integration. Pretty neat stuff.
grouzen has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
<jhaberku> I'd be tempted to wrap everything impure in Lwt.t, but I'm not exactly sure how I could write unit tests in oUnit against a Lwt function without invoking Lwt_main in multiple places. With a custom `IO.t` type that I wrote, there's the `IO.unsafe_perform` function that allows me to escape when necessary in tests.
<ollehar> can I make ounit NOT test in parallell?
jonludlam has joined #ocaml
<companion_cube> use OUnit instead of OUnit2
kushal has joined #ocaml
<ely-se> run your tests on a single-core machine
<ely-se> or a global mutex!
<zozozo> ollehar: do something like ./test -runner sequential
<zozozo> i had the smae problem
<ollehar> zozozo: thanks, will look at that
jhaberku has quit [Remote host closed the connection]
jhaberku has joined #ocaml
tmtwd has joined #ocaml
tane has joined #ocaml
<Drup> jhaberku: running multiple Lwt_main.run is fine, it's running *nested* Lwt_main.run that is a bit fishy
<Drup> ely-se: It's very good. :D
* Drup happily fulfill adrien's expectations.
<adrien_znc> thanks
<adrien_znc> although you took some time to do so
<adrien_znc> I'm slightly sad
<ely-se> Drup: I will try it maybe!
<Drup> adrien: I was eating then attending a talk.
ely-se has quit [Quit: leaving]
igoroliveira has joined #ocaml
samrat has joined #ocaml
struktured has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
<jhaberku> Drup: Ah, good to know. Thanks! I might keep my `IO.t` around as a "this is a impure computation running synchronously always" and use `Lwt.t` as a superset that allows for concurrency.
<mrvn> Does Core/Batteries have a heap / priority queue module that allows increasing the priority of an item or removing items *fast*?
<mrvn> Actually make that changing the pririty (up or down)
<companion_cube> I'm not sure it's possible unless you have a pointer on the item
<companion_cube> (i.e. in an array-based heap)
<mrvn> even an array based heap would need O(log n) correcting the priority
kerneis has quit [Quit: leaving]
<mrvn> A wheel or bucket approach like Linuxes network code has would be nice.
<companion_cube> I'm not sure, you can bubble up or down
<companion_cube> if you have the index of the element
<companion_cube> well yeah, ln(n)
<companion_cube> it's pretty efficient
paddymahoney has joined #ocaml
<mrvn> if you have 100000 items that change priority 1000 times a second that adds up.
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube> well, that's how SAT solvers manage their heuristics
<companion_cube> I suppose it works well enough
<ollehar> damn, no doc for ocaml llvm bindings?
NingaLeaf has joined #ocaml
<ollehar> Drup: thank you!!
<companion_cube> why do I suspect this site to belong to whitequark
<Drup> companion_cube: :D
<Drup> It's the right intersection of anime, llvm and ocaml.
<companion_cube> exact
ceryo has joined #ocaml
samrat has quit [Ping timeout: 256 seconds]
slash^ has joined #ocaml
jao has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
<Drup> def`: I need your ocamlyacc/menhir expertise
<Drup> can't manage to get rid of the shift/reduce conflicts, and obviously it doesn't work
marsam has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
rand000 has quit [Quit: leaving]
ygrek_ has joined #ocaml
octachron has quit [Quit: Leaving]
whirm has quit [Ping timeout: 244 seconds]
AlexRussia has quit [Ping timeout: 246 seconds]
whirm has joined #ocaml
jhaberku has quit [Ping timeout: 252 seconds]
jonludlam has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Ping timeout: 250 seconds]
jhaberku has joined #ocaml
ely-se has joined #ocaml
blandflakes has joined #ocaml
whirm has quit [Ping timeout: 255 seconds]
jhaberku has quit [Ping timeout: 246 seconds]
pyx has joined #ocaml
pyx is now known as Guest50802
Guest50802 has quit [Client Quit]
<ely-se> Is there a recommended high-level library for spawning processes? Sys only has command which takes a shell command, but I want to pass arguments without shell injection vulnerabilities.
kakadu has quit [Ping timeout: 246 seconds]
<adrien_znc> ely-se: Unix has more stuff
<adrien_znc> you can also look at Lwt
<adrien_znc> if you want to do it without blocking that is
<adrien_znc> (although you could run an lwt specifically for that task)
<ely-se> Ok, I'll use fork/exec. Thanks!
dsheets has quit [Ping timeout: 260 seconds]
meteo__ has quit [Ping timeout: 264 seconds]
grouzen has quit [Ping timeout: 255 seconds]
MrScout has joined #ocaml
<adrien> ely-se: no, I meant open_process*
<ely-se> takes no argument list
<adrien_znc> right, I got it wrong again, I was thinking of create_process
swgillespie has joined #ocaml
ygrek_ has joined #ocaml
toomuchtvrotsurb has joined #ocaml
manizzle has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 264 seconds]
jhaberku has joined #ocaml
psy_ has quit [Quit: Leaving]
psy_ has joined #ocaml
jeffmo has joined #ocaml
<adrien_znc> ahhhh
<adrien_znc> Core
jhaberku has quit [Ping timeout: 244 seconds]
ollehar has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
ely-se has quit [Quit: Leaving...]
mehdid has left #ocaml [#ocaml]
jhaberku has joined #ocaml
jhaberku has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
ely-se has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Client Quit]
whirm has joined #ocaml
whirm has quit [Client Quit]
kushal has quit [Quit: Leaving]
sh0t has quit [Ping timeout: 260 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
toomuchtvrotsurb has joined #ocaml
pyon has joined #ocaml
MrScout_ has joined #ocaml
manizzle has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
meteo__ has joined #ocaml
marsam has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
lobo has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
swgillespie has quit [Client Quit]
sh0t has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
marsam has joined #ocaml
ollehar has joined #ocaml
<ollehar> anyone used llvm? I get this error:
<ollehar> Stored value type does not match pointer operand type!
<ollehar> store i8* getelementptr inbounds ([4 x i8]* @asd, i32 0, i32 0), i8* %"$a"
<ely-se> I have used LLVM!
slash^ has quit [Read error: Connection reset by peer]
<ollehar> ely-se: nice :) github of that?
<ely-se> Nope, don't have it anymore. :p
<ely-se> wait, maybe I do
xificurC has quit [Ping timeout: 244 seconds]
<ely-se> the project doesn't use LLVM anymore; the new JIT compiler generates an Erlang AST instead
* jrslepak is a little fuzzy on the IR's text syntax
<ely-se> jrslepak: it's well-documented here: http://llvm.org/docs/LangRef.html
<jrslepak> already got it open :-P
<jrslepak> is %"$a" the index?
<ely-se> In retrospect I'd have written my compiler in OCaml, but I didn't know the language back then. I chose Elixir because I could easily add arbitrary data to the AST, but I figured that with OCaml's module system and structural type system this would be easy as well *and* _statically_ typed
<jrslepak> I've had some trouble getting that to be as flexible as I would like, actually
<ely-se> What trouble?
<ely-se> Maybe I'll rewrite it.
<jrslepak> I want to have, say, a typechecking pass that takes an AST where nodes are annotated with I-don't-care-what-data and produces an AST where nodes have all that old info *and* a `typ option'
<ely-se> yes, I want that too.
<ollehar> jrslepak: %"$a" is a local variable called $a
<ollehar> % for local, @ for global
<jrslepak> and later, I want to consume ASTs where annotations have I-don't-care-what as long as it includes a `typ option'
<ely-se> a name resolution step and type checking step
<jrslepak> row polymorphism seems like the obvious solution to that problem
<jrslepak> ollehar: and you're selecting out of a struct with that? or is ([4 x i8]* @asd, i32 0, i32 0) an array type?
<ollehar> jrslepak: [4 x i8]* is a global string, with content "asd", called asd.
<ollehar> I want to let my local variable point to this string.
<ollehar> string = array type, yes.
<jrslepak> ely-se: but in order to use row polymorphism in OCaml, you have to be working with objects, which AFAICT means you can only get that "all-methods-from-this-row AND this additional one" by declaring a new class
lordkryss has joined #ocaml
<jrslepak> ollehar: what about the `, i32 0, i32 0'?
<ollehar> jrslepak: you can write object type directly in function signature too, like < a : int, b : string, ... >
<ely-se> yeah, you can say "let tree = object method sym = 1 end;;" and "let tree = object method typ = 2 end;;" but I don't see a way to merge them
<ely-se> prototypical inheritance would be great but I don't know any statically typed language that has that
<jrslepak> first-class classes would do it too
<ollehar> jrslepak: about i32 0, I don't know...
claudiuc has quit [Ping timeout: 246 seconds]
<jrslepak> ollehar: are you sure that bit `(thing)' isn't a struct type?
<ollehar> first-class classes is possible if you wrap them in modules?
<jrslepak> *bug
<jrslepak> **big
<ollehar> jrslepak: nope, not sure, but wait...
<ollehar> wait, pretty sure.
<ollehar> this C-program:
<ollehar> int main() {
<ollehar> char* str = "hello";
<ollehar> puts(str);
<ollehar> }
<ollehar> compiles into:
<ollehar> @.str = private unnamed_addr constant [14 x i8] c"Hello, world!\00", align 1
<ollehar> ; Function Attrs: nounwind uwtable
<ollehar> define i32 @main() #0 {
<ollehar> %1 = alloca i32, align 4
<ollehar> %str = alloca i8*, align 8
<ollehar> store i32 0, i32* %1
<ely-se> it's be really nice if this problem could be solved unobtrusively
<ollehar> ely-se: relevant? http://lambda-the-ultimate.org/node/4170
<ely-se> yes ollehar
<jrslepak> it's a start, but I don't remember there being anything about how to make the annotations themselves polymorphic in that way
<jrslepak> (neelk even mentions that row polymorphism would be nice to have)
<ely-se> what about depth subtyping?
<ely-se> I dunno.
<ely-se> it's an awful problem
* jrslepak can't find anything in LangRef explaining what `([4 x i8]* @asd, i32 0, i32 0)' means as a type
<ollehar> jrslepak: well, thanks for your effort. :) I'm gonna read that tutorial about mutable variables again.
<ollehar> but, the problem at hand is i8** vs i8*\
<jrslepak> are you generating that with `build_gep'?
<ollehar> oops, mean i8** vs i8*
<maurer> Does anyone have a good guide on exposing OCaml functions in a way callable from C?
<ely-se> Also, some information applies only to certain kinds of AST nodes. For example, only Var_exprs contain resolved symbols
<maurer> Every time I try to search I just get tons of guides on how to call C from OCaml, which is not what I need to do
meteo__ has quit [Ping timeout: 246 seconds]
<jrslepak> ely-se: that I don't really worry about... can just use an `option'
<ollehar> jrslepak: yes, I use build_in_bounds_gep
<jrslepak> (maybe it's about [4 x i8]* vs [4 x i8] ?)
<ollehar> maybe.
<jrslepak> see what happens if you add a const 0 into your index array
sp0on has quit [Ping timeout: 246 seconds]
<ollehar> jrslepak: index array = string?
<jrslepak> build_gep takes an `llvalue array' to use as indices
<jrslepak> instead of just giving the position of the character you want, give a const 0 and *then* the desired position
BitPuffin has joined #ocaml
<jrslepak> and maybe print (to stdout) the type of the llvalue @asd before you call build_gep because I'm still confused about that `(extra, stuff)'
dsheets has joined #ocaml
<ely-se> jrslepak: what I've done before was putting IDs in the AST nodes and keeping maps from IDs to types and IDs to symbols
<ely-se> but that quickly becomes tiring and a mess
<ollehar> maurer: check manual manually?
<jrslepak> ely-se: does a pass that uses some of those maps just have to have the maps passed in as arguments?
<ely-se> yes
<maurer> ollehar: I'm reading through http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html and can't seem to find anything
<maurer> ollehar: the closest I can find is callbacks
MrScout_ has quit [Remote host closed the connection]
<ely-se> lemme make an example jrslepak
<maurer> ollehar: but my goal is not callbacks, it is to actually build a .so out of an ocaml library so a regular C program can link against it
<jrslepak> ely-se: I think I get the idea
<maurer> ollehar: nvm, it appears I missed something, trying it
MrScout has joined #ocaml
<jrslepak> ely-se: `use_types : (node_id, typ) Map.t -> node_id ast -> something' ?
<jrslepak> (where 'a ast is an AST annotated with an 'a at each node)
<ely-se> like that
<jrslepak> yeah, makes sense
<jrslepak> (lunch time here)
<ollehar> jrslepak: I do this, maybe not correct/enough. https://github.com/olleharstedt/subsetphp/blob/llvm_test/llvm_test.ml#L165
tmtwd has quit [Ping timeout: 260 seconds]
MrScout has quit [Ping timeout: 246 seconds]
tmtwd has joined #ocaml
sp0on has joined #ocaml
ericsmithvt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ely-se> I'm also not entirely sure on how to organise name resolution so that the type checker can easily track the types of variables.
<ely-se> I guess the type checker could record the type of the variable in a "(Id.t, typ) map" where the ID refers to the variable declaration, and the symbol refers to the same ID
ericsmithvt has joined #ocaml
claudiuc has joined #ocaml
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ceryo has quit [Quit: Textual IRC Client: www.textualapp.com]
sepp2k has quit [Quit: Leaving.]
<ely-se> Is it possible to make A a submodule of B if B resides in b.ml and A in b/a.ml?
<def`> Drup: still in need of help?
<ely-se> Such that you must write B.A instead of just A
<ely-se> If not, how do you prevent name collisions between different libraries?
<Drup> def`: yep
<Drup> def`: the situation didn't changed :)
_andre has quit [Quit: leaving]
shinnya has joined #ocaml
xificurC has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
<mrvn> ely-se: module B = struct include B end in a.ml. But that doesn't help the name conflict. You have to name b.ml unique or make a pack with a.ml and b.ml.
sh0t has quit [Ping timeout: 250 seconds]
<mrvn> sorry, s/A/B/ s/B/A
<mrvn> ely-se: It's common to have a <LIB>.ml that includes <LIB>A, <LIB>B, ... as submodules and nothing else.
<mrvn> (or something else next to the submodules come to think of it)
<jrslepak> ollehar: yeah, first thing I'd try for debugging this is to check the lltype of value_expr_code
<ollehar> jrslepak: ok, thanks for taking your time, I will check.
<ely-se> mrvn: ok
<ollehar> jrslepak: the type is i8*
Haudegen has quit [Ping timeout: 250 seconds]
<jrslepak> strange... seems like that should work
<jrslepak> (although it also seems like that shouldn't put [4 x i8]* in the generated code)
dejanr has joined #ocaml
<ollehar> jrslepak: yeah, but if you look at the code generated from the C source:
<ollehar> %str = alloca i8*
<ollehar> store i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0), i8** %str
<ollehar> the target of store is a pointer to i8*, that is i8**
<ollehar> so I need to get the pointer to `variable` in my case. possibly.
<ollehar> just speculating here.
jonludlam has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MrScout has joined #ocaml
Haudegen has joined #ocaml
dejanr has quit [Quit: Textual IRC Client: www.textualapp.com]
MrScout has quit [Remote host closed the connection]
<ely-se> I'm getting tired of writing compilers though. I want to do something else that's interesting and doesn't involve UIs/web.
<ollehar> ely-se: robots?
<mrvn> One compiler is all you need
<ely-se> ollehar: I've never been interested in robotics (nor hardware in general).
<mrvn> ely-se: I'm building a Tetris game with a 10x22 LED matrix.
<ely-se> I know absolutely nothing about the topic.
<ely-se> Don't ask me to assemble a computer. I will fail.
<ollehar> AI?
<ely-se> What kind of AI? AI is broad.
<ely-se> and quite ill-defined IYAm
thorsten` has quit [Ping timeout: 244 seconds]
<mrvn> I want to build a self steering zepelin.
thorsten` has joined #ocaml
meteo__ has joined #ocaml
<ollehar> ely-se: read up on watson? I'd want that for some time, never got to it.
<ollehar> watson = the computer who one jeaporday
<ollehar> jeapordy
<ollehar> wone
<ollehar> won
<ollehar> crap ^^
<ely-se> I liked the Milk answer.
<ollehar> ely-se: ?
<ely-se> in the jeopardy show there was a question and Watson came up with a totally unrelated answer "Milk"
<ollehar> haha ok
<ollehar> didn't see it
<ely-se> it made no sense at all
<ollehar> shouldn't it be "milk?????" if it's uncertain?
<ollehar> or "what is milk??????"
ygrek has joined #ocaml
ericsmithvt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tane has quit [Quit: Verlassend]
<ely-se> delicious, what else?
tianon has quit [Quit: Irssi uptime: 83d 1h 4m 26s; time for an update...]
moei has quit [Quit: Leaving...]
MrScout has joined #ocaml
<mrvn> It is white and makes moo. -- What is milk?
tianon has joined #ocaml
foocraft has joined #ocaml
<ollehar> jrslepak: fyi, fixed, allocated wrong type of storage. had i8, should be i8*, so `pointer_type i8_t` returns what I needed. :)
<jrslepak> ah
<ollehar> I debugged by editing the generated IR directly and using llc to compile it.
BitPuffin|osx has joined #ocaml
ely-se has quit [Quit: Leaving...]
yomimono has joined #ocaml
ely-se has joined #ocaml
ely-se has quit [Client Quit]
zpe has quit [Remote host closed the connection]
foocraft has quit [Ping timeout: 244 seconds]
foocraft has joined #ocaml
lobo has quit [Quit: leaving]
foocraft has quit [Read error: Connection reset by peer]
foocraft has joined #ocaml
ousado has quit [Ping timeout: 272 seconds]
marsam has quit [Read error: Connection reset by peer]
ousado has joined #ocaml
<Algebr> When ignore is compiled, is it actually a function call or does it end up just as if one wrote let _ = f ...
ousado has quit [Changing host]
ousado has joined #ocaml
foocraft has quit [Remote host closed the connection]
meiji11 has joined #ocaml
MrScout has quit [Remote host closed the connection]
swgillespie has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
<Algebr> Anyone from opam around?
tmtwd has quit [Quit: Leaving]
grouzen has joined #ocaml
toomuchtvrotsurb has joined #ocaml
zpe has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 260 seconds]
<bernardofpc> there's no binary search tree for floats in OCaml ?
<Drup> Set ?
<bernardofpc> meaning BFST.find 3.14 will return 3.15 if it's not in there
<ollehar> Algebr: about ignore, maybe inspect bytecode?
<bernardofpc> say I have [1.;2.;3.;4.] in it, find 3.14 should return 3.
<bernardofpc> (don't really care if it rounds up or down for 3.5, even if "round to even" is more IEEE-like)
<Algebr> ollehar: I don't really use ocamlc and from what I understand it doesn't optimize all that much
<Drup> Algebr: check clambda then ;)
<bernardofpc> Drup: probably I'll just hack set.ml again :p
<Algebr> not a single hit for ocaml on the latest HN who's hiring
destrius has quit [Read error: Connection reset by peer]
destrius_ has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
madroach has quit [Ping timeout: 264 seconds]
jao has joined #ocaml
madroach has joined #ocaml
blandflakes has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ericsmithvt has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]