flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
fraggle_ has joined #ocaml
bnoordhuis has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Client Quit]
Drup has quit [Ping timeout: 245 seconds]
Drup has joined #ocaml
Dulles has joined #ocaml
Dulles has quit [Ping timeout: 240 seconds]
manizzle has quit [Ping timeout: 245 seconds]
q66 has quit [Quit: Leaving]
mcclurmc has joined #ocaml
bnoordhuis has joined #ocaml
bnoordhuis has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 272 seconds]
ollehar has quit [Ping timeout: 246 seconds]
talzeus has joined #ocaml
w0rm_x has quit [Quit: if Φ Σ e : φ then Φ Σ τ' → σ' :: ∃]
ollehar has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
manud_ has joined #ocaml
manud_ has quit [Ping timeout: 272 seconds]
ggole has joined #ocaml
<ggole> Is there a way to create an out_channel such that printing to it contributes to the contents of a string (or Buffer.t)?
Drup has quit [Ping timeout: 268 seconds]
ollehar has quit [Ping timeout: 246 seconds]
gour has joined #ocaml
<ggole> Seems not. :(
<ggole> However, I could change my code to collect the text in a Buffer.t, and then I'll have the choice of outputting or stringifying it
<ggole> Any opinions on whether that's a reasonable path forward?
<whitequark> ggole: personally, I'd do either that or abstract over a channel or a buffer
<whitequark> (basically, C++ ostream... :)
<ggole> There's such an abstraction for lexing, but not output
<whitequark> yeah, I'm surprised there isn't
<ggole> I'll just use a Buffer.
<ggole> Thankfully bprintf is a thing.
Drup has joined #ocaml
manud_ has joined #ocaml
manud_ has quit [Ping timeout: 272 seconds]
manud_ has joined #ocaml
madroach has quit [Quit: leaving]
madroach has joined #ocaml
<adrien> morning
Simn has joined #ocaml
manud_ has quit [Quit: Leaving]
skchrko has joined #ocaml
<ggole> Tedious refactoring finished :/
strmpnk has quit [Ping timeout: 272 seconds]
strmpnk has joined #ocaml
Neros has joined #ocaml
Kakadu has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
fantasticsid has joined #ocaml
fantasticsid has quit [Client Quit]
bnoordhuis has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
Drup has quit [Remote host closed the connection]
wolfnn has joined #ocaml
ulfdoz has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
<pippijn> morning
<pippijn> ggole: I'd use buffer
<ggole> I did
<ggole> It is quite ugly, but works ok
tobiasBora has joined #ocaml
<ggole> It's annoying that the additional, useless layer of buffering is there
<ggole> But it doesn't really matter much.
<Kakadu> flux: how your ocsigen + ocamlbuild is going?
iZsh has quit [Ping timeout: 245 seconds]
darkf has quit [Quit: Leaving]
q66 has joined #ocaml
szacun has joined #ocaml
<szacun> Hi! I am writing function to add a number to appropriate list depending whether the number is odd or even. I try do it with as few characters as possible and i would like to ask if there is a way to do it like this: http://pastebin.com/LLxTwc6M and maybe i have only some syntax error, or if this has completly no sense
<szacun> actually i wrote this code to only show idea how i want to resolve a problem of choosing a list to add an element, i know that adding to list basing on parity may be done easier, but if there would be more lists and more complicated predicate it would require more if's
<companion_cube> ggole: I had the same concern, now I have wrapped sprintf/printf/fprintf to use Buffer.t everwhere, and all my printing functions take a Buffer.t
gour has quit [Disconnected by services]
<companion_cube> this way I can use the same code to output to a channel or to a string
gour_ has joined #ocaml
gour_ is now known as gour
<gasche> szacun:
<gasche> let test n (evens,odds) = let (e,o) = if n mod 2 = 0 then [n],[] else [],[n] in (e@evens,o@odds);;
<gasche> if you allow to change the type, you may also use
<gasche> let test n lists = let i = n mod 2 in lists.(i) <- n::lists.(i);;
<gasche> (removing the "let i" binding is even faster)
<gasche> s/faster/shorter/
bnoordhuis has quit [Ping timeout: 245 seconds]
<ggole> companion_cube: hmm, why would you need to wrap printf and fprintf?
<companion_cube> ggole: so that I can use printf "foo %a %a" pp1 x1 pp2 x2
<companion_cube> even though pp1 and pp2 print into buffers
<ggole> Ah
<companion_cube> to be more precise, I can use printf, fprintf and sprintf with the same type printers
<ggole> Hmm, doesn't bprintf already do taht?
<companion_cube> of course, but it's more convenient to have shortcuts to print on stdout, out_channels and strings
<ggole> I see.
<companion_cube> that's why I said I "wrapped" them
<ggole> Right, makes sense now.
<companion_cube> they are basically kbprintf
<companion_cube> + a callback that outputs a string/prints it
* adrien simple does "let sp = Printf.sprintf" or "let ep = Printf.eprintf"
<companion_cube> adrien: this is not the problem, the problem is to write only one function for all the "%a" of one type
<gasche> def-lkb: I just tried Melpa, which is cool (yeah, I don't often do sysadminy-things)
<gasche> Merlin should be in the standard Melpa repository
<gasche> (they can use git repos as packages, it seems)
<gasche> (Melpa is a package manager for Emacs)
<gasche> (included in Emacs 24)
<def-lkb> gasche: you mean… distributing emacs mode separately from merlin ?
<rks`> gasche: no it shouldn't
<rks`> you wan't the emacs mode synchronized with the binary
<rks`> (so they speak the same protocol)
<rks`> you can't enforce that with the package system of emacs
<rks`> (nor with vundle)
<rks`> (want* btw)
strobegen has quit [Quit: Leaving.]
peterbb has quit [Ping timeout: 272 seconds]
zxqdms has quit [Quit: leaving]
Neros has quit [Ping timeout: 240 seconds]
bnoordhuis has joined #ocaml
bnoordhuis has quit [Ping timeout: 272 seconds]
Kakadu has quit []
Snark has quit [Quit: leaving]
ontologiae has joined #ocaml
strobegen has joined #ocaml
skchrko has quit [Quit: Leaving]
Neros has joined #ocaml
strobegen has quit [Ping timeout: 245 seconds]
<rks`> kerneis: ping github/merlin :)
strobegen has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
bnoordhuis has joined #ocaml
peterbb has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
bnoordhuis has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
bnoordhuis has joined #ocaml
Neros has joined #ocaml
Arsenik has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
q66 has quit [Ping timeout: 246 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest62634
<bnoordhuis> this is probably well known and i understand why it happens but (abs min_int) = min_int
<bnoordhuis> is it reasonable to expect the runtime to raise an exception in that case?
mcclurmc has joined #ocaml
zpe has joined #ocaml
<bnoordhuis> "Note that this may be negative if the argument is min_int." - okay, at least it's documented :)
q66 has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
bnoordhuis has quit [Quit: leaving]
tobiasBora has quit [Ping timeout: 245 seconds]
<ggole> That's the expected behaviour of two's complement, really
Guest62634 has quit [Remote host closed the connection]
dsheets has joined #ocaml
strobegen has quit [Ping timeout: 246 seconds]
<whitequark> integer overflow in division <3
talzeus has quit [Read error: Connection reset by peer]
talzeus has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
tobiasBora has joined #ocaml
<ggole> Exception on div by zero is ok, but exception on min_int / -1 is annoying -_-
<ggole> Although OCaml doesn't have that because of tagging
zpe has joined #ocaml
<whitequark> I think that if you have two's complement, you gotta have it.
<whitequark> no exceptions (slow), no wacky undefined behavior either.
ollehar has quit [Ping timeout: 272 seconds]
<ggole> Gotta have what?
<ggole> abs min_int = min_int?
<whitequark> yeah, and so on.
<whitequark> perhaps you would have a distinct smallint and bigint types, but leave two's complement as it is.
<ggole> Well, min_int / -1 could just give the same result as -min_int or min_int - 1
<ggole> (It's often a DoS bug because people forget to check for it.)
<whitequark> um, it does ?
<whitequark> give the same result as -min_int
<ggole> In OCaml, because of tagging
<whitequark> hm
<ggole> SIGFPE in C
<whitequark> no
<whitequark> UB in C
<ggole> Sure: but that's the usual effect
strobegen has joined #ocaml
<whitequark> actually, I don't think so
strobegen has quit [Remote host closed the connection]
<ggole> Although it probably varies over platforms
talzeus has quit [Remote host closed the connection]
<ggole> Which is worse
<whitequark> gcc gives me INT_MIN with -O0-O3
<ggole> With constant operands?
<whitequark> clang gives me SIGFPE on -O0 and garbage on -O3
<ggole> Try passing them on the command line so it can't be folded
<adrien> build with -S -O0 and check the assembly
<whitequark> uh
<whitequark> neither of those even includes division
<whitequark> clang -O0 translates it to hlt
<adrien> :D
<whitequark> actually
<adrien> btw, are you build with -Wall -Wextra ?
<whitequark> clang -O0 -S *does* emit udiv
<whitequark> but clang -O0 -o foo *does not*
<whitequark> what
<whitequark> (wall wextra) no, would that matter?
<ggole> Might get a warning
<whitequark> well, I did get one when I wrote INT_MIN / -1 as a constexpr
<whitequark> but, frontends of both don't fold expressions with variables, and backends of both can, but don't emit warnings
<whitequark> (hlt/no idiv) sorry, misread the assembly. clang -O0 emits idiv in both cases.
<whitequark> and gcc folds it to INT_MIN even at -O0
<ggole> Gcc folds constants in the parser iirc
<whitequark> well, that means it will fold less constants, since if it optimizes away a variable reference so it becomes constant, it's not available for folding anymore
<whitequark> I believe it does that both in FE & BE
<whitequark> still folded
<whitequark> hilarious, since the other code it emits is absolutely horrendous
<whitequark> but hey, constants.
<ggole> Yeah
<whitequark> I'm going to use this as a counterexample for "I write code with UB, it will always work as I want at -O0"
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<pippijn> adrien!
<pippijn> adrien: guess what
<pippijn> adrien: you have exactly 1 guess
<adrien> I'm going to have to buy you at least one beer?
<pippijn> yes :D
<adrien> haha, that's awesome :)
shinnya has quit [Ping timeout: 245 seconds]
<adrien> when do you start?
<pippijn> in january
<pippijn> quite soon.. I don't really know what I have to do for it, I mean when and where and how to move
<pippijn> but I'll figure that out
<pippijn> insurance, taxes, ...
<adrien> you need to find a place to sleep
<pippijn> I'm getting some paperwork to fill in next week
zpe has quit [Ping timeout: 272 seconds]
<pippijn> I'm so happy, this is the *perfect* job for me right now
<pippijn> like, it just could not be better
<pippijn> I'm going to work on a clang <-> ocaml interface for program analysis
peterbb has quit [Ping timeout: 272 seconds]
<pippijn> whitequark: tomorrow I'm going to integrate codegen in dreml (re2ml)
<whitequark> !!
<whitequark> when you get re2ml working
<whitequark> I'll buy you a case of beer.
<pippijn> oh, it's not that special
<pippijn> but I'll be happy when it works, because I've spent half a year on the theory
<pippijn> or.. 4 months
<whitequark> I'm just really unhappy with various lexers which all not quite work as I need
<pippijn> what do you need?
<pippijn> because my first version was going to be an ocamllex drop-in
<whitequark> unicode, lexeme_start/lexeme_end, []()+*, () as foo
<gasche> pippijn: where are you going to work?
<pippijn> gasche: near you
<pippijn> gasche: inria
<pippijn> whitequark: everything except unicode is in ocamllex, right?
<whitequark> yes
<pippijn> and everything except () as foo is in ulex
<whitequark> I'm currently using a combination of ulex and ocamllex because... I don't quite remember why
<whitequark> yes
<pippijn> ok
fraggle_ has quit [Ping timeout: 251 seconds]
<pippijn> yes, my plan is to support unicode
shinnya has joined #ocaml
<pippijn> there is some theory for that
<pippijn> which I am planning to implement
<whitequark> character classes would be nice, but I can live without that for a while
<pippijn> it's quite a nice theory
<pippijn> unicode character classes require this theory
<pippijn> there are basically 2 ways to do it
<pippijn> the more elegant way classifies transitions
<pippijn> the less elegant way turns unicode matching into byte-wise utf8/16{le,be}/32{le,be} matching
<pippijn> john reppy et al. wrote about the elegant way
<pippijn> whitequark: ascii character classes are just [a-c] -> (a|b|c)
<pippijn> whitequark: for unicode, that's unfeasible
<gasche> pippijn: I'd be interested in more details: what kind of position, in which team?
<whitequark> pippijn: interesting, how would the proper way work ?
<pippijn> so you need direct support, and ml-ulex (by reppy) supports this
<pippijn> whitequark: there is a relatively good approximation for transition classes
<whitequark> classifying characters, then transitioning either on particular characters or groups ?
<pippijn> right
Anarchos has joined #ocaml
<pippijn> let me find the example from their paper
ollehar has joined #ocaml
<pippijn> whitequark: https://paste.xinu.at/eCor4p/
<whitequark> yeah I see
<gasche> ollehar: did you get my object-syntax answer?
<pippijn> 5 is better than 256
<pippijn> and much better than 2^21
<ollehar> gasche: hm, on SO?
<gasche> nope, here
<gasche> I experimented with the syntax-extension you pointed out
<gasche> the problem is fundamental: the lid->lid syntax used by the extension is ambiguous
szacun has quit [Quit: Lost terminal]
<gasche> consider "match .. with ... when p->q"
<gasche> you can trivially fix the code by using --> instead for the object syntax
<gasche> (note that the extension will still assert false instead of printing an error in case of misuse, as it is implemented in a rather fragile way)
<adrien> what is this extension btw?
<gasche> something Fabrice wrote to use object-like syntax with module for ocaml-wxwidgets
<ollehar> gasche: I see
<gasche> (I don't think anyone should use such an extension, but ollehar was still interested)
<ollehar> gasche: I'll give that a try
fraggle_ has joined #ocaml
<ollehar> well, all Lua API calls use the lua state as first arg
<adrien> gasche: huh, ok; do you have a link to it? (just curious, don't worry ;-) )
<adrien> or is it simply "Module.func obj arg" which becomes "obj->func arg"?
<adrien> thanks
<ollehar> adrien: yes, that's it
<gasche> yes, it is this, provided you used something like "module obj->Module in" before
fraggle_ has quit [Ping timeout: 252 seconds]
peterbb has joined #ocaml
<ollehar> gasche: no way to instead of `assert false` tell camlp4 to use `usual syntax`. Or if I define new behaviour for a operator, must I redefine the old behaviour too?
Drup has joined #ocaml
<gasche> there is no general backtracking facility, but some cleverness in describing the grammar may help a bit with the "when" conflict
<gasche> however, I think this is ultimately going to break down to the fact that the grammar is now (locally) ambiguous in a really bad way
<gasche> you should just avoid that
<gasche> (if you read "foo->bar" after a "when", there is no finite amount of lookahead you can make to decide how to interpret the arrow)
fraggle_ has joined #ocaml
wmeyer has joined #ocaml
<wmeyer> hello.
<whitequark> wmeyer: hi!
<adrien> o/
<wmeyer> whitequark: hi.
<wmeyer> adrien: :D \o
* adrien leaving very soon but back to ocaml patches on tomorrow
<wmeyer> chilling out =)
<wmeyer> great
<wmeyer> ping me
<whitequark> btw
<whitequark> windows cross compiling? :)
<wmeyer> please, I will commit them
<wmeyer> yes whitequark :-)
<whitequark> neat!
<ollehar> gasche: ok, thanks for taking your time :)
<adrien> well, first, fixing some things
<wmeyer> gasche: hello, ollehar hello.
<ollehar> wmeyer: yo yo
<wmeyer> yo ollehar
<Drup> oh, a wild wmeyer :D
<gasche> :p
fraggle_ has quit [Ping timeout: 252 seconds]
<wmeyer> Drup: :D
<ollehar> (btw, if anyone is interested in my ocaml project, it's a web page where you can program your own card game using lua: http://tonesoftales.com/programming_cardgame.php)
<wmeyer> ollehar: the URL is broken ollehar
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
ahill-89 has joined #ocaml
<Drup> it's not for me
wwilly has joined #ocaml
<ollehar> works for me too :P
<wmeyer> apologises, trailing )
<wmeyer> in ERC
<Drup> ollehar: but the page is a php one and it's done in lua, So I'm snobing it !
<wmeyer> interesting ollehar, have you heard about VASSAL engine?
<wmeyer> or possibly we want something similar but the project had no move for long time: Indigo
<ollehar> Drup: ;) the actual cgi script running the page is in ocaml
<ollehar> wmeyer: wow, vassal seems awesome :)
<wmeyer> ollehar: it is good, and have plenty of modules, the problem is that it's written in Java, and some of the assumptions are clunky
zpe has joined #ocaml
<ollehar> hm
zpe has quit [Ping timeout: 265 seconds]
fraggle_ has joined #ocaml
Anarchos has quit [Ping timeout: 272 seconds]
* wmeyer thinking about getting back to espresso
<wmeyer> currently it's not possible in VASSAL to define a module in a different way than XML file
<wmeyer> well, but that's not a biggest chalenge
<wmeyer> the biggest chalenge is that VASSAL was desgined for board games, not nesercaily card games
<wmeyer> it works most of the time, but might surprise you from time to time
<ollehar> they should adapt it to the web, so you can run it from a browser
<Drup> js_of_java ? :]
<ollehar> java runs still in browser, doesn't it?
<ollehar> perhaps not as hip as in the 90
<ahill-89> Yeah, Java runs in the browser if you let it.
<Drup> I hope you don't really want to do that, do you ?
<ahill-89> This has caused all manner of problems and is now widely regarded as a bad move.
<ollehar> hm, google has a webkit that translates java to js, I think :P
<wmeyer> ollehar: as an applet, yes, but it's a web browser plugin
<wmeyer> not properly integrated with the browser
<wmeyer> you can easily convert Java applet to standalone Java application and vice versa
<pippijn> wmeyer: I'm going to london between 13 and 19 november
<ollehar> well, how much difference could it be between java and JAVAscript...? ;)
<wmeyer> pippijn: cool
<pippijn> wmeyer: and I'm going to move to paris
<wmeyer> let's meet there or in Cambridge then
<wmeyer> :D
<pippijn> yeah, I'll talk about it with my girlfriend
<wmeyer> pippijn: so you have been accepted?
<pippijn> we can meet then
<pippijn> yes, I have
<wmeyer> or in paris
<wmeyer> great, congratulations
<pippijn> :)
<pippijn> so I'm going to see adrien \o/
<wmeyer> and me <( o )>
<pippijn> and when you're in paris, we're 3
<pippijn> when are you going to paris, though?
<wmeyer> anytime
<wmeyer> there is a very convenient connection
<pippijn> 2:37 from king's cross
* pippijn checked :)
<wmeyer> yes
<Drup> pippijn: by curiosity, what is your new job ? :)
<pippijn> Drup: ocaml programmer
<Drup> that's not very precise :D
<ollehar> 3 people.. that's like a crowd in the ocaml community?
fraggle_ has quit [Ping timeout: 252 seconds]
manizzle has joined #ocaml
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 252 seconds]
yacks has quit [Ping timeout: 260 seconds]
<ollehar> did anyone check out the video about hack, the new programming language from facebook made in ocaml? seemed cool.
shinnya has quit [Read error: Operation timed out]
fraggle_ has joined #ocaml
tobiasBora has quit [Ping timeout: 248 seconds]
fraggle_ has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
<gasche> (I never watch videos.)
<ahill-89> I have probably not seen the video you are referring to, but I was at the CUFP talk about Hack.
<ahill-89> Honestly I didn't understand why they were doing it.
<Drup> ahill-89: make php developer use a statically typed language without them noticing it (and be afraid by it) ?
mcclurmc has quit [Ping timeout: 245 seconds]
<ollehar> speed, I think
<ollehar> even 1% difference make a huge inpact
<ollehar> *impact
<ollehar> ?
<Drup> that what they said, I'm not really convinced
<ahill-89> They're still more-or-less married to PHP's semantics, though.
<Drup> ollehar: if you want speed, you just don't use php
<Drup> the real reason is legacy and mindset of programmers
<ollehar> too late for facebook not to use php
<Drup> yes, exactly my point :)
<ollehar> browser-based ide seems kind of cool, to (thanks to js_of_ocaml, I understand)
<ollehar> *too
Neros has joined #ocaml
bobzhang1988 has joined #ocaml
ahill-89 has quit [Quit: leaving]
<kerneis> rks`: pong
yacks has joined #ocaml
eikke has joined #ocaml
<gasche> kerneis: he wanted information on some Merlin issue
<eikke> has there ever some work been done wrt encoding (open) type families & associated types in ocaml?
<gasche> hah, you did that
<gasche> eikke: associated types are directly encoded by first-class modules
<eikke> hmh, true
<gasche> re. open type families, currently you should use GADTs explicitly
<gasche> hm
<gasche> that would be closed type families, I guess
<eikke> yup :)
<gasche> but you get them open with Leo White's extensible sum types
<eikke> let me check that out
<gasche> (I think open type families are a rather terrible idea if you ask me; do you have a specific requirement for the 'open' part?)
Neros has quit [Read error: Operation timed out]
Neros has joined #ocaml
<eikke> thanks
<eikke> we had a design discussion some time ago at work, and at a certain point I knew how to solve something we hit against using (open) TFs, but I wouldnt know how to do it using ocaml
<mrvn> cool. Now we only need open types for records too
<gasche> I am hesitant to encourage people to use GADTs to represent type-level mappings, because conceptually I feel that is rather ugly
<gasche> on the other hand, the way Haskell does type family is in fact just as "ugly"
<eikke> well, it seems like the most obvious way to pass evidence?
<gasche> yeah, but shouldn't we use proper F_omega-style type-level reduction?
<gasche> GADTs (or type families) correspond to defining function set-theoretically by passing a set of (input, output) pairs
<gasche> which is rather yucky
ggole has quit []
srcerer_ has joined #ocaml
Neros_ has joined #ocaml
srcerer has quit [Ping timeout: 268 seconds]
Neros has quit [Ping timeout: 260 seconds]
Neros_ has quit [Read error: Connection reset by peer]
bobzhang1988 has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
tane has joined #ocaml
eikke has quit [Ping timeout: 266 seconds]
darkf has joined #ocaml
gour has quit [Quit: WeeChat 0.4.1]
Anarchos has joined #ocaml
cthuluh has quit [Ping timeout: 248 seconds]
cthuluh has joined #ocaml
<Anarchos> cthuluh je t'ai pas appelé...
zpe has joined #ocaml
wwilly has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
Arsenik has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
mcclurmc has joined #ocaml
Neros has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
peterbb has quit [Ping timeout: 272 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
<tobiasBora> Hello,
Kakadu has quit [Quit: Konversation terminated!]
<tobiasBora> I'd like to get my IP adresse on the local network, but when I do this :
<tobiasBora> Unix.string_of_inet_addr ((Unix.gethostbyname (Unix.gethostname ())).Unix.h_addr_list.(0));;
<tobiasBora> I have "127.0.1.1" which isn't what I want...
<tobiasBora> (I want something like 192.168.1.xxx)
zpe has joined #ocaml
<mrvn> then keep looking.
<mrvn> a host can have multiple IPs
shinnya has joined #ocaml
<tobiasBora> mrvn: Yes but h_addr_list has only one element...
<mrvn> are you sure the hostname resolves to more than 127.0.0.1?
<mrvn> you probably need to do something other than dns to find the ip.
<adrien> Drup: sin!
<adrien> good night :)
<Drup> oh, yeah, that x)
<adrien> *now*
<adrien> (for people wondering what's going on: no, I'm not telling Drup to sin right now)
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
<mrvn> we didn't wonder
<tobiasBora> mrvn: DNS ? It's not to make a link between name and ip ?
tobiasBora has quit [Read error: Connection reset by peer]
peterbb has joined #ocaml
tane has quit [Quit: Verlassend]
Simn has quit [Quit: Leaving]
Patchou has joined #ocaml
Tamae has quit [Ping timeout: 256 seconds]
ohama has quit [Read error: Operation timed out]