ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
jwatzman|work has quit [Quit: jwatzman|work]
AltGr has joined #ocaml
copycat has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
swgillespie has joined #ocaml
sh0t has joined #ocaml
enquora has quit [Quit: enquora]
yomimono has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chicoenslips has quit []
struktured has quit [Ping timeout: 256 seconds]
sh0t has left #ocaml ["Leaving"]
jonludlam has quit [Ping timeout: 240 seconds]
manizzle has quit [Ping timeout: 264 seconds]
emanuelz has quit [Ping timeout: 276 seconds]
emanuelz has joined #ocaml
emanuelz has quit [Client Quit]
<Drup> AltGr: Is it possible that the behavior of "preinstalled" is broken in master opam ?
<Drup> I got a weird error of install with ocamlfind on a brand new alias switch
<AltGr> might be
<AltGr> what's the error ?
<Drup> it tries to do "cp topfind "/usr/lib/ocaml""
<AltGr> (maybe on #opam or PM ?)
<Drup> probably due to the fact that -no-topfind is not passed
<AltGr> can you check <switch>/config/global-config.config ?
<AltGr> It's the part that changed recently, and may have caused this
<Drup> nothing fishy in that
<Drup> all pathes are starting with ~/.opam/...
<Drup> I have to go, will come back later on
copycat has left #ocaml [#ocaml]
SomeDamnBody has quit [Ping timeout: 255 seconds]
<johnf> I'm trying to get ocamlbuild and menhir to work where my menhir implementation uses multiple files, I get a "Error: p.mly: No such file or directory" when I run make if I move p.mly into _build and run make again it works. Any idea how to get ocamlbuild to pick up multiple mly files from Makefile. It seems p.mly was never put in _build
<johnf> found an example in menhir demos should shed some light on it.
<johnf> just had to RTFM.
struktured has joined #ocaml
darkf has joined #ocaml
struktured has quit [Ping timeout: 256 seconds]
psy_ has quit [Quit: Leaving]
psy_ has joined #ocaml
lptm has quit [Quit: fix config]
pyon has joined #ocaml
robink has quit [Ping timeout: 248 seconds]
idegen has quit [Quit: Leaving.]
copycat has joined #ocaml
robink_ has joined #ocaml
manizzle has joined #ocaml
pyon is now known as lptm
manizzle has quit [Ping timeout: 255 seconds]
sdothum has quit [Ping timeout: 256 seconds]
struktured has joined #ocaml
kushal has joined #ocaml
Submarine has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
<struktured> opam depext...very cool
sepp2k has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
<AltGr> struktured, thanks
<AltGr> most of the work is filling in the depext fields for the different distributions though
MercurialAlchemi has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
tmtwd has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
siddharthv_away is now known as siddharthv
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
MercurialAlchemi has joined #ocaml
Submarine has quit [Ping timeout: 250 seconds]
tmtwd has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
Submarine has joined #ocaml
MercurialAlchemi has joined #ocaml
Submarine has quit [Read error: Connection reset by peer]
kushal has quit [Ping timeout: 265 seconds]
robink_ is now known as robink
MercurialAlchemi has quit [Ping timeout: 276 seconds]
BitPuffin|osx has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
tmtwd has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
gottas has joined #ocaml
gottas has left #ocaml ["Leaving"]
gottas has joined #ocaml
<dmbaturin> http://pyret.org Racket authors made an AlmostML for teaching.
<Drup> that's very old :D
<Drup> (and not very actively worked on, afaik)
swgillespie has joined #ocaml
<dmbaturin> Drup: What I'm wondering about is why they wrote it in JS rather than using e.g. js_of_ocaml. :)
<Drup> did they really wrote it in js, or some racket2js thingy ?
<dmbaturin> I'd have to look deeper to find out how much of it is written in itself an how much is JS, but the JS parts look handwritten.
<dmbaturin> (On a side note, I find github displaying stats only about known languages and ignoring everything else quite strange. It would be better if it showed how much of the whole thing is JS and how much is something else)
<struktured> AltGr: I really like it, does it ever take on a non-root approach by building a package from source?
<AltGr> well, it's designed to interact with system packages ; this is actually an itchy area since there also exist "source scripts", ie scripts hosted somewhere that need to be fetched and executed locally. This is used for llvm, for example, but we really need to replace it with a better (and more secure) design
psy_ has quit [Ping timeout: 265 seconds]
keen__________ has joined #ocaml
Simn has joined #ocaml
keen_________ has quit [Read error: Connection reset by peer]
wwilly has joined #ocaml
psy_ has joined #ocaml
emanuelz has joined #ocaml
tmtwd has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 265 seconds]
srenatus has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
Cyanure has joined #ocaml
Haudegen has joined #ocaml
nullcat_ has joined #ocaml
wwilly has left #ocaml ["Leaving"]
Gama11 has joined #ocaml
SIGILL has quit [Quit: WeeChat 1.1.1]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
SIGILL has joined #ocaml
AlexRussia has joined #ocaml
<destrius> hi, is there any documentation anywhere on compiling a toplevel with Core? Specifically, using corebuild
matason has joined #ocaml
jonludlam has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
ggole has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
freling has joined #ocaml
thomasga has joined #ocaml
Gama11 has quit [Read error: Connection reset by peer]
dsheets has quit [Ping timeout: 265 seconds]
<cml> I am using Lwt_io.establish_server to create a tcp server: Lwt_io.establish_server socket fun. Is there any way to extract ip address of the input connection?
siddharthv is now known as siddharthv_away
hay207 has joined #ocaml
dsheets has joined #ocaml
cdidd has quit [Quit: Leaving]
<cml> does ocaml support something similar to c preprocessors like #ifdef?
amnn has joined #ocaml
<Pepe_> cml: why not use the C preprocessor
<Pepe_> It doesn't, iirc (but I haven't used OCaml in a while)
<cml> how to use it in ocaml code?
<Pepe_> like you would in C code
<dmbaturin> cml: There's an external tool for it, cppo.
<cml> great! thanks both
hay207 has quit [Quit: Leaving]
hay207 has joined #ocaml
<dmbaturin> cml: As of the source address, accept returns a tuple of file descriptor and peer socket address.
octachron has joined #ocaml
bezirg has joined #ocaml
yomimono has joined #ocaml
thomasga has quit [Quit: Leaving.]
AltGr has left #ocaml [#ocaml]
rand000 has joined #ocaml
<cml> dmbaturin: funtion fun in "Lwt_io.establish_server socket fun" is of the form: let fun (ic, oc) = Lwt.ignore_result ( lwt read = Lwt.io.read_line ic in ... )
<cml> I think if I write the code to use the usual socket programming, capturing IP from accept is possible. But not sure how to use it when channel is abstract like in Lwt_io
<dmbaturin> Ah, wait, establish_server. Then, I'm not sure, probably not.
<dmbaturin> I wonder why it doesn't pass the sockaddr to the fun though.
copycat has quit [Quit: copycat]
zpe has joined #ocaml
thomasga has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
milosn has joined #ocaml
kakadu has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
<flux> now if they only had passed an object containing the channel and possible other auxiliary information.. !
<flux> truthfully not many ocaml interfaces are designed for maintenance. though happily many are still ok, because you most often can just add new functions.
<Simn> http://paste2.org/IBBh05FC <-- What is it trying to tell me?
mort___ has left #ocaml [#ocaml]
<flux> well, the types aren't compatible.. ;)
<flux> not sure what the context you're having, but basic_block doesn't have to_expr
<Simn> basic_block is the only class I have so it's basically telling me that it's not compatible with itself...
<Simn> In fact the error only shows up after changing something in basic_block#to_texpr
<flux> are you sure you haven't written #to_expr instead of #to_texpr
<Simn> !
<flux> pro tip: when passing big objects to functions, add types
<Simn> You're right, thanks a lot!
<flux> let foo (bar : basic_block) = ..
<flux> this brings the errors closer to the home
siddharthv_away is now known as siddharthv
<Simn> That doesn't really change much in my case, but I'll do that.
BitPuffin|osx has joined #ocaml
<Simn> Thanks, I stared at this for 10 minutes and couldn't see the typo.
<flux> when you're hunting the bug you can use the type annotations elsewhere as well
<flux> foo bar -> foo (bar : basic_block)
<flux> or let baz : basic_block = ...
<flux> or even (bar : basic_block)#fooz :)
<flux> doesn't really matter where the type is indicated
<Simn> Ah, so that's how you guys do it too? I always thought that was kind of ghetto debugging but I'm glad it's not. ;)
<flux> I'm sure most do it ;-), though type indocator feature helps a lot as well
<flux> I hope you use an editor that has it
<Simn> I'm using Sublime Text which doesn't do much other than make the syntax look pretty. I got used to OCaml error hunting for the most part, this is just the first time I'm using a class.
<flux> simn, try this then (disclaimer: no idea if it works/has ever worked): https://github.com/cynddl/sublime-text-merlin
<flux> of course, you need to install merlin as well ;)
<flux> but that should be an opam install away..
<Simn> I guess this is the point where I have to shamefully admit that I'm a Windows user and use OCaml 3.11... :)
<flux> hargnhngn
<flux> no wonder your error messages sucked.. maybe ;-)
<flux> but, more power to you, for studying ocaml even on a platform that may not be fully embraced by the ocaml community ;)
<Simn> I should try getting OCaml 4 running again. In the past that would always lead to an afternoon of frustration though.
Haudegen has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
xificurC has quit [Ping timeout: 250 seconds]
Hannibal_Smith has joined #ocaml
__yeah has joined #ocaml
<__yeah> hi, anyone knows how to differentiate 0 from -0?
<__yeah> I need to separate the 2 cases
<__yeah> short: can you retrieve the sign somehow?
<__yeah> anyone?
<def`> 0 is the same as -0 for integers
sdothum has joined #ocaml
<__yeah> is there somehow a way to detect the difference?
xificurC has joined #ocaml
<cml> possible suggestion: use logical right shift. Then for -0 will not become a number > 0, while 0 remains 0
<dmbaturin> __yeah: Even if there is a difference in underlying representation of +0 and -0 for floats, it won't help you really. Why do you want it?
<cml> sorry: will become
<__yeah> the problem is it's passed as an argument
<__yeah> does it remain -0 once it's passed?
<__yeah> well ill try
<__yeah> but I have a hunch something might change it to 0
xificurC has quit [Ping timeout: 264 seconds]
xificurC_ has joined #ocaml
<__yeah> @cml -0 lsr 0 ?
<__yeah> "The result is unspecified if m < 0" << are you talking about this?
<flux> __yeah, no, once you have -0 as an integer value there's no way distinguish it from 0
<flux> the bit sequence in the memory is exactly the same, so it's not possible to tell them apart
<__yeah> damn
<__yeah> do you have a source for that statement
<__yeah> some kind of spec or whatever
<__yeah> Ill have to justify myself
kakadu has quit [Ping timeout: 246 seconds]
<__yeah> @flux I see nothing about that there http://caml.inria.fr/pub/docs/manual-ocaml-400/manual010.html
<cml> -0 lsr 1, but if -0 means 0 with the leftmost bit to be 1. But flux says they are the same from the point of bits
<__yeah> is there a better source for the inner behaviour of ocaml?
jonludlam has joined #ocaml
emanuelz has quit [Quit: emanuelz]
<cml> In general, -0 is interpreted as -2^30
<flux> cml, in general? where for eaxmple?
ollehar has quit [Remote host closed the connection]
<cml> I mean, we don't have -0 for signed ints, and it has no meaning
<flux> well, it has a meaning, namely the same as 0
ollehar has joined #ocaml
<flux> this is what computer's use for representing decimal numbers: https://en.wikipedia.org/wiki/Two%27s_complement
<flux> maybe there are special systems that use one's complement, but I am unable to name one. in one's complement there would be distinct 0 and -0.
<flux> and why to prefer two's complement versus one's complement? because in general 'negative zero' is nonsense :)
<flux> in floating point values it makes sense, because they are approximations to begin with, and it's useful to know if a value has been approached from the negative or the positive side when it reaches zero
<cml> it is what I am looking for. The range of signed ints in ocaml is between -2^30 and 2^30 -1. That means the number of negative ints are one more than positives
<cml> But you are right
<cml> Agreed
<flux> so ocaml is able to distinguish between -0.0 and 0.0, but not between -0 and 0
<flux> and even in that case you need to use tricks like: 1.0 /. 0.0 = infinity, and 1.0 /. -0.0 = neg_infinity
<flux> and then use classify_float on that..
_andre has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hay207 has quit [Ping timeout: 245 seconds]
<ggole> flux: copysign is probably a cleaner way to do that
<flux> right
sdothum has joined #ocaml
<__yeah> is there an objects that holds the number of arguments of a function in ocaml
<__yeah> or something similar?
<__yeah> the arity
<flux> let arity = 1 ;-)
<flux> no
<__yeah> okay Oo
<__yeah> I wonder how you manage without it
<flux> I wonder where do you need it?
<__yeah> right
<flux> logically all functions are functions from one argument to its result. let three_arg_function = fun arg1 -> fun arg2 -> fun arg3 -> arg1 + arg2 + arg3
<flux> this is how currying works: (three_arg_function 1) results in a two-argument function
<__yeah> yeah but hum Id need a global to keep count of the number of times it's been called then?
<flux> well, it depends where you need it. two alternatives: simply a global counter. another alternatve: a counter local to the function
<__yeah> so if it's local it's not reset everytime
<flux> first option: let counter = ref 0 let foo () = incr counter; Printf.printf "Foo's been called %d times\n%!" (!counter)
<__yeah> weird
<flux> another option: let foo = let counter = ref 0 in fun () -> incr counter; Printf.printf..
<flux> or if you have a bunch of functions that need access to the same counter, you can put the related functions into their own module
<flux> with modules you can choose what values will be visible outside and which aren't.
<__yeah> right now I just need to know if an optional argument was used or not
<__yeah> pretty basic :)
<flux> well, it's None if it's not filled in
<__yeah> must be akin to undefined
xificurC_ has quit [Quit: WeeChat 1.2]
<flux> well, a bit, but the main benefit is that not everything can be 'undefined', only certain values
xificurC has joined #ocaml
<__yeah> thx
<flux> you may want to use pattern matching to deal with the optional argument.
hay207 has joined #ocaml
Haudegen has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
Gama11 has joined #ocaml
shum has joined #ocaml
sdothum has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
Remyzorg has quit [Quit: WeeChat 1.1.1]
siddharthv is now known as siddharthv_away
lptm has quit [Ping timeout: 264 seconds]
ygrek has quit [Ping timeout: 276 seconds]
idegen has joined #ocaml
noplamodo has quit [Ping timeout: 252 seconds]
noplamodo has joined #ocaml
rbocquet has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 255 seconds]
<tobiasBora> Hum... I think I understand why my compilation with Ocamlbuild doesn't work.
<tobiasBora> Does anyone knows if it's possible to add a folder to include (like with the -I option) within the file myocamlbuild.ml ?
rbocquet has joined #ocaml
<flux> I _think_ anything is possible with myocamlbuild.ml; it's literally code that's evaluated in ocamlbuild
<tobiasBora> include_dirs
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dhil has quit [Quit: Leaving]
<tobiasBora> YEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHH !!!!!!
<tobiasBora> It works, it works, it works !!! :-D :-D :-D
<tobiasBora> I won't annoy you with this problem anymore !
Haudegen has quit [Ping timeout: 264 seconds]
noplamodo has quit [Ping timeout: 252 seconds]
darkf_ has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
Haudegen has joined #ocaml
noplamodo has joined #ocaml
zpe has joined #ocaml
noplamodo has quit [Ping timeout: 256 seconds]
spip has joined #ocaml
noplamodo has joined #ocaml
kakadu has joined #ocaml
spip has left #ocaml ["Konversation terminated!"]
sdothum has joined #ocaml
sdothum has left #ocaml [#ocaml]
noplamodo has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
noplamodo has joined #ocaml
lordkryss has joined #ocaml
kushal has joined #ocaml
kushal has quit [Changing host]
kushal has joined #ocaml
shinnya has joined #ocaml
pii4 has quit [Quit: [-.-]...]
sepp2k has joined #ocaml
noplamodo has quit [Ping timeout: 272 seconds]
bezirg has quit [Ping timeout: 276 seconds]
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
pii4 has joined #ocaml
<flux> I wonder if not the right name for the OCaml that has modular implicits, multicore and flambda would be OCaml 5.0 instead of 4.xsomething. a chance to drop camlp4 as well maybe ;-)
<flux> actually 4.00.1 is already almost 3 years old. how time flies when you're having fun.
<flux> but I don't even know how old ocaml 3.0 is :-)
<flux> Apr 2000 maybe
<fds> Noob question: What's the story with camlp4? It seems the new version hasn't really taken hold, but is there a replacement? Or is the general feeling that a tool like that shouldn't even exist? :-s
<flux> well, it has an interesting history
<flux> first of all, campl4 has its own ocaml parser
<flux> so it takes an ocaml program in, applies transformations (with the help of plugins) and then outputs a new ocaml program
<flux> so if you add a new language feature to the compiler, you need matching support in camlp4
<fds> Ah, I see.
<flux> sometimes these changes could affect the plugins as well
tmtwd has joined #ocaml
<flux> so somewhere along the campl4 series it was decided that camlp4 would get a major overhaul
<flux> I suppose to enbetter it somehow, reduce the workload that is needed to write plugins for it and to maintain it
<flux> but it was completely incompatible with the previous campl4
<flux> so as there were some big projects (Coq) depending on the old camlp4 and not very happy to rewrite the code, it was not short after the original camlp4 was forked into camlp5
octachron has quit [Ping timeout: 246 seconds]
<flux> so now we have the original campl4 + many enhancements as campl5 and we have the new campl4
<fds> Hmm
<flux> so three parsers for one language.. not maybe a happy place to be.
<flux> when new changes to the language came along, those two would need to be updated to even parse the new programs properly
<flux> ..or not use the new features when using camlp4/5
<flux> to solve this issue a new extension mechanism was proposed
<flux> one that didn't require having an additional parser for the ocaml language
<flux> that mechanism is called the "extension point" mechanism. ppx. not sure how the initialism goes there. someone can chime in ;-).
<flux> ppx works by annotations over expressions or statements
<flux> so you can type stuff like type t = A [@id 1] and the AST of that code is then fed to the 'id' plugin
<flux> for this last part I'm just glancing through http://whitequark.org/blog/2014/04/16/a-guide-to-extension-points-in-ocaml/ , I haven't actually written ppx ;-)
<flux> so basically AST in, AST out
<fds> Okay, sounds better.
<flux> this means you cannot add any syntax extensions that aren't syntactically correct (semantically they can be)
<flux> but on the other hand, it reduces the maintenance load significantly
<flux> in addition to AST stuff you can also have quoted strings
<flux> so the whole string as-is goes to the plugin and it replaces it with an AST
<fds> I was going to ask, because my only experience of camlp4 is with <<>> quoted expressions.
<flux> it can look pretty much like an embeedded SDL. not sure if there are many examples of this around. maybe some macaque has
<flux> but for those I think you need to implement a parser of your own choice
<flux> maybe one can reuse the ocaml compiler functions for that, no idea
<flux> ppx is also easier for editors, because the programs can be understood better without knowing about the annotations
<flux> there are some special syntaxes as well, such as: let%extension a=b in.. ie: let%lwt foo = return 42 in ..
<flux> the url I gave seems like a short'n'sweet read about the ppx indeed, I should read it through some day ;)
<fds> I'll try and read it in a bit. :-)
<flux> I guess it is telling that even though the PPX system is relatively new, everyone is championing it to become the standard syntax extension mechanism
<flux> there was some of the same flair in the air with the new campl4, but I think overall the sad state of documentation resulted in it not being used by too many people.. though some of them were very effective in using it :)
<flux> the nice thing about ppx may be that it doesn't need huge bodies of documentation. it's probably enough to look at the AST type in the compiler and go from there.
<flux> indeed the PPX system was released almost a year ago and already very many modules make use of it
<fds> Regarding what you said about syntax extensions being syntactically correct with PPX, are there any well-known projects using camlp4 that would get bitten by that?
slash^ has joined #ocaml
<flux> well, for example there was this 'perform' syntax extension, which provided monadic binding in the form (not sure of the syntax): perform a <- return 42; b <- printf "hello%d" a
<flux> cool, I almost guessed it right
<flux> for example ppx_lwt uses the let%lwt syntax for that
<tobiasBora> Documentation is always the bad point...
<flux> and lwt used to have a pa_-extension for that as well
<flux> with a similar problem
<flux> I guess that would be syntactically correct for ocaml as well, but you would need some pay to indicate that the AST would need to be processed, not to mention the AST would have the wrong structure
<flux> s/pay/way/
<fds> Hmmm
<flux> and you would need to process the whole program's AST with ppx, not sure if that's possible
<flux> with pa_ you could add hooks to the tree processor
<fds> Well, I've got a lot of reading to do, but thanks for your answer, flux. It cleared up several things in my mind.
kdef has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
octachron has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
thomasga has joined #ocaml
noplamodo has joined #ocaml
<companion_cube> flux: ppx provides a ast_mapper that traverses the whole AST
nullcat__ has joined #ocaml
<_obad_> I can't find the UTC version of Unix.mktime; how does one go from a Unix time struct given in UTC/GMT to a timestamp?
nullcat_ has quit [Ping timeout: 265 seconds]
<haesbaert> _obad_: won't mktime convert whatever date into the offset from 1970 ?
<_obad_> "The [tm] argument is interpreted in the local time zone.
<_obad_> according to the .mli
nullcat_ has joined #ocaml
<_obad_> maybe I can get the offset to GMT by calling gmtime and localtime
<haesbaert> if you got the tm via gmtime I'd expect mktime to do the exact reverse
<_obad_> I'm trying to convert a timestamp given as a string in UTC (e.g. 2015-06-17) to a unix epoch timestamp (e.g. seconds)
<_obad_> I think let offset = fst (mktime (gmtime t)) -. fst (mktime (localtime t)) should do the trick
nullcat__ has quit [Ping timeout: 250 seconds]
<haesbaert> ack
thomasga has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
amnn has joined #ocaml
amnn has quit [Client Quit]
noplamodo has quit [Ping timeout: 265 seconds]
keen__________ has quit [Read error: Connection timed out]
noplamodo has joined #ocaml
keen__________ has joined #ocaml
kaustuv has joined #ocaml
amnn has joined #ocaml
<kaustuv> In opam, is it possible to use a .install file to copy an entire directory?
darkf has quit [Quit: Leaving]
amnn has quit [Client Quit]
<tokenrove> _obad_: you could use the ffi to call out to timegm(3) if your platform has it :-/
MrScout has joined #ocaml
whirm has joined #ocaml
enquora has joined #ocaml
MercurialAlchemi has joined #ocaml
Simn has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
jyc has quit [Quit: ZNC - http://znc.in]
nullca___ has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
nullcat_ has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
amnn has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
wwilly has joined #ocaml
jyc has joined #ocaml
ollehar1 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
nullcat has joined #ocaml
nullca___ has quit [Read error: Connection reset by peer]
nullc____ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
yomimono has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
nullcat__ has joined #ocaml
nullcat has quit [Ping timeout: 246 seconds]
__yeah has quit [Quit: Page closed]
nullc____ has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
destrius_ has joined #ocaml
_andre_ has joined #ocaml
tmtwd_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
mcclurmc_ has quit [Remote host closed the connection]
whirm has quit [Quit: WeeChat 1.2]
tmtwd has quit [*.net *.split]
_andre has quit [*.net *.split]
destrius has quit [*.net *.split]
Intensity has quit [*.net *.split]
MercurialAlchemi has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
nullcat has joined #ocaml
nullca___ has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ollehar1 has quit [Ping timeout: 252 seconds]
nullcat__ has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
amnn has joined #ocaml
nullcat has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
amnn has quit [Client Quit]
<_obad_> tokenrove: thanks I didn't know about that call. but it's not worth ffi'ing this puppy in my case.
emanuelz has joined #ocaml
gabemc has joined #ocaml
jeffmo has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
robink has quit [Ping timeout: 244 seconds]
jwatzman|work has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
wwilly has quit [Quit: This computer has gone to sleep]
robink_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<tokenrove> _obad_: I think your offset expression gives the wrong value around DST changes, but that may not matter for your application.
MercurialAlchemi has joined #ocaml
yomimono has joined #ocaml
Bhavya has joined #ocaml
xpad has joined #ocaml
<xpad> I want to use Unix sockets (Unix.accept for instance) How I can run it as lwt thread?
MercurialAlchemi has quit [Ping timeout: 244 seconds]
nullca___ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
ygrek has joined #ocaml
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
MercurialAlchemi has joined #ocaml
ollehar1 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
MercurialAlchemi has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
srenatus has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<c-c> xpad opening sockets has nothing to do with threading?
<ollehar1> this tokenizer in sedlex, should it be recursive from more of the match-cases?
<ollehar1> only EOF should return None, or?
<ollehar1> here is the complete file: https://gist.github.com/takscape/df9925d0f18b2942feb2
octachron has quit [Quit: Leaving]
<ollehar1> or maybe it's called repeatedly, and the buffer is eaten as side-effect
<xpad> I don't think they are threads of type lwt/async
<c-c> I'm a very noob ocamler, but unix sockets, pipes, can be shared even between threads
ggole has quit [Ping timeout: 256 seconds]
Hannibal_Smith has quit [Quit: Leaving]
waneck has joined #ocaml
Intensity has joined #ocaml
cdidd has joined #ocaml
Hannibal_Smith has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 264 seconds]
Submarine has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 264 seconds]
Submarine has joined #ocaml
tmtwd_ has quit [Ping timeout: 272 seconds]
kakadu has quit [Quit: Page closed]
ygrek has joined #ocaml
MercurialAlchemi has joined #ocaml
jcloud has quit [Quit: Connection closed for inactivity]
swgillespie has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
kushal has quit [Ping timeout: 252 seconds]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 255 seconds]
MercurialAlchemi has joined #ocaml
thomasga has joined #ocaml
tmtwd_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
Haudegen has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
SHODAN has quit [Quit: No Ping reply in 180 seconds.]
MercurialAlchemi has joined #ocaml
SHODAN has joined #ocaml
swgillespie has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Haudegen has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Ping timeout: 245 seconds]
MercurialAlchemi has joined #ocaml
Anarchos has joined #ocaml
emanuelz has quit [Quit: emanuelz]
Anarchos has quit [Client Quit]
Haudegen has joined #ocaml
robink_ is now known as robink
MercurialAlchemi has quit [Ping timeout: 252 seconds]
manizzle has joined #ocaml
kakadu has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
MercurialAlchemi has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
Submarine has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
mcclurmc has joined #ocaml
matason has quit []
ollehar1 has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
jave has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
matason has joined #ocaml
kdef has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 265 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
jave has joined #ocaml
MercurialAlchemi has joined #ocaml
yomimono has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
zpe has joined #ocaml
psy_ has quit [Quit: Leaving]
psy_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
psy_ has quit [Client Quit]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
larhat has quit [Ping timeout: 265 seconds]
larhat has joined #ocaml
matason has quit []
MercurialAlchemi has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
_andre_ has quit [Quit: leaving]
MercurialAlchemi has joined #ocaml
enquora has quit [Quit: enquora]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
lobo__ has joined #ocaml
lobo__ is now known as lobo
MercurialAlchemi has quit [Ping timeout: 264 seconds]
tane has quit [Quit: Verlassend]
MercurialAlchemi has joined #ocaml
<_obad_> xpad: use lwt_unix
<_obad_> lwt wraps all the unix calls that need to be wrapped.
<_obad_> Lwt_unix.socket gives you ab FD, then you can use Lwt_io.of_fd to get a channel
Hannibal_Smith has quit [Quit: Leaving]
<_obad_> but you can use the fd directly if you want to.
MercurialAlchemi has quit [Ping timeout: 272 seconds]
srcerer_ has joined #ocaml
MercurialAlchemi has joined #ocaml
waneck has quit [Ping timeout: 250 seconds]
freling has quit [Quit: Leaving.]
srcerer has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
srcerer_ is now known as srcerer
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
jabesed has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
bezirg has joined #ocaml
hay207 has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
Simn has quit [Quit: Leaving]
sepp2k has quit [Quit: Leaving.]
tmtwd_ has quit [Ping timeout: 276 seconds]
zpe has quit [Remote host closed the connection]
gottas has quit [Read error: Connection reset by peer]
Submarine has joined #ocaml
Submarine has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<tobiasBora> Bonsoir !
<tobiasBora> *Hello !
s1n4 has quit [Quit: leaving]
lobo has quit [Quit: leaving]
amnn has joined #ocaml
badon has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
kakadu has quit [Remote host closed the connection]
Denommus has quit [Quit: going home]
badon has quit [Disconnected by services]
rand000 has quit [Quit: leaving]
rbocquet has quit [Ping timeout: 265 seconds]
badon has joined #ocaml
bezirg has left #ocaml [#ocaml]
s1n4 has joined #ocaml
badon has quit [Ping timeout: 264 seconds]
jonludlam has joined #ocaml
rbocquet has joined #ocaml
Gama11 has quit [Read error: Connection reset by peer]
yomimono has quit [Ping timeout: 255 seconds]
<j0sh> is there any way to use a camlp4 syntax extension alongside a ppx syntax extension in the same compile unit?
<rgrinberg> j0sh: i don't think so
<j0sh> rgrinberg: bummer, alright
Submarine has quit [Remote host closed the connection]
<j0sh> is there a ppx-ified version of fieldslib somewhere?
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgrinberg> j0sh: no but i believe diml is working on it at jsc currently
<rgrinberg> i heard it was 6 months away a month ago or so
<rgrinberg> i'd take that with a grain of salt though
<j0sh> hmm all i'd like is the ability to iterate over record fields... just found ppx_deriving, does it support that?
yomimono has joined #ocaml
<j0sh> doesn't seem like it, oh well
waneck has joined #ocaml
<rgrinberg> j0sh: yeah there's no good solution while we're still in this camlp4 limbo b/c of type_conv :/
<rgrinberg> and jsoo as well until today (Drup <3)
ygrek has joined #ocaml
swgillespie has joined #ocaml
sh0t has joined #ocaml
<Drup> :D
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Algebr has joined #ocaml
gabemc has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
swgillespie has joined #ocaml
thomasga has joined #ocaml
<Algebr> why is this a downgrade? ↘ downgrade camlp4 4.02.1+2 to 4.02+6
<Algebr> it looks like an upgrade, especially considering i did opam update
<Drup> 4.02.1 > 4.02
<Algebr> so I did opam update and then opam upgrade and it wants to do a downgrade...which means what, there was a regression in camlp4?
<Drup> or a bug in opam-repository, no idea
<Algebr> I read through last's years long running "One Build System to Rule Them All" thread. Without being cynical, who cares if stuff doesn't build on windows. Why does windows matter. Its not like ocaml is used for GUI apps
<cmtptr> that's pretty much how I live my life
dubosec has quit [Ping timeout: 272 seconds]
<Drup> Algebr: some people care, and some people would like to build GUI apps. That's a rather bad argument
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
thomasga has quit [Quit: Leaving.]
<Algebr> Drup: do you develop for windows?
<Algebr> I don't think windows developers care if their stuff works on POSIX
<Drup> I don't
ceryo has joined #ocaml
<cmtptr> Algebr, but that's what makes us the better men or something
<Algebr> When using lwt, should I avoid using code from Unix? I just wanted a plain exec and lwt_unix doesn't have it nor does it have posix_spawn...but does have something called execute_job
waneck has quit [Ping timeout: 265 seconds]
ceryo has quit [Ping timeout: 265 seconds]
copycat has joined #ocaml
copycat has quit [Client Quit]
copycat has joined #ocaml