Kakadu has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
damason has left #ocaml ["I must go; My people need me."]
sh0t has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
antkong_ has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
spacekitteh has quit [Ping timeout: 246 seconds]
spacekitteh has joined #ocaml
aantron_ has joined #ocaml
spacekitteh has quit [Ping timeout: 260 seconds]
aantron has quit [Ping timeout: 244 seconds]
aantron_ has quit [Client Quit]
snhmib has quit [Ping timeout: 244 seconds]
butts_butts has joined #ocaml
struk|desk|away is now known as struk|desk
nicoo has quit [Ping timeout: 248 seconds]
spacekitteh has joined #ocaml
nicoo has joined #ocaml
antkong_ has quit [Quit: antkong_]
sh0t has joined #ocaml
FreeBirdLjj has joined #ocaml
spacekitteh has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 244 seconds]
hxegon has quit [Quit: BRB]
spacekitteh has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
butts_butts has quit [Ping timeout: 240 seconds]
Algebr has quit [Ping timeout: 264 seconds]
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
ztennix has quit [Ping timeout: 268 seconds]
bbarker has joined #ocaml
spacekitteh has quit [Ping timeout: 246 seconds]
struk|desk is now known as struk|desk|away
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
spacekitteh has joined #ocaml
antkong has joined #ocaml
darkf has joined #ocaml
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
sfri has quit [Ping timeout: 260 seconds]
ztennix has joined #ocaml
sfri has joined #ocaml
spacekitteh has quit [Ping timeout: 250 seconds]
spacekitteh has joined #ocaml
sh0t has quit [Remote host closed the connection]
<nullcatxxx_>
what's the quickest way to determine if a floating point number is -0.0 in OCaml?
<nullcatxxx_>
I am thinking to use Int64.bits_of_float
<nullcatxxx_>
of string_of_float...
<copy`>
1.0 /. x = -.infinity
<copy`>
Just an idea
<nullcatxxx_>
cool !
kansi has joined #ocaml
AltGr has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
jeffmo has quit [Quit: jeffmo]
struk|desk|away is now known as struk|desk
Reshi has joined #ocaml
struk|desk has quit [Read error: Connection reset by peer]
clog has quit [Ping timeout: 250 seconds]
truncate has quit [Ping timeout: 250 seconds]
bbarker has quit [Quit: Connection closed for inactivity]
dmiller has quit [Ping timeout: 240 seconds]
struk|desk has joined #ocaml
nuuit has quit [Ping timeout: 250 seconds]
nuuit has joined #ocaml
spacekitteh has quit [Ping timeout: 244 seconds]
foolishmonkey has quit [Ping timeout: 250 seconds]
foolishmonkey has joined #ocaml
truncate has joined #ocaml
maufred_ has quit [Ping timeout: 268 seconds]
maufred has joined #ocaml
douglascorrea has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
douglascorrea has quit [Ping timeout: 260 seconds]
keep_learning has joined #ocaml
MercurialAlchemi has joined #ocaml
Emmanuel` has joined #ocaml
Emmanuel` has quit [Client Quit]
Emmanuel` has joined #ocaml
<Emmanuel`>
Hello
<Emmanuel`>
is there something similar to Async.Pipe with Lwt?
<Emmanuel`>
ie: some kind of pipe with a reader and a writer, where the reader waits for something to be written
<struk|desk>
Emmanuel`: I'm more familiar with async pipes but I think Lwt_io.pipe is a good starting point.
<Emmanuel`>
ah
<Emmanuel`>
afaIk, this creates a Unix pipe
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<Emmanuel`>
I'm basically looking for something like Lwt_stream, with a function like "listen", that get fulfilled when a value has been pushed to the stream
AlexRussia has quit [Ping timeout: 244 seconds]
nicholasf has quit []
douglascorrea has joined #ocaml
douglascorrea has quit [Ping timeout: 246 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<Enjolras>
Emmanuel`: isn't what Lwt_stream does ?
struk|desk is now known as struk|desk|away
<Enjolras>
reading a stream blocks until there is something to read
kushal has joined #ocaml
Mercuria1Alchemi has joined #ocaml
clog has joined #ocaml
dmiller has joined #ocaml
pierpa has quit [Ping timeout: 252 seconds]
pierpa has joined #ocaml
kansi has left #ocaml ["undefined"]
malc_ has joined #ocaml
<Emmanuel`>
Enjolras: really? I can only find the .get function, that return None is the Stream is empty
<Emmanuel`>
(or Some 'a Lwt.t otherwise)
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
<Enjolras>
Emmanuel`: so, for instance, you can use iter or fold. But there is a single function to block, the name is just really weird. Let me find it
<Enjolras>
Emmanuel`: ah, yes, i think it's get :)
<Emmanuel`>
hm
<Emmanuel`>
val get : 'a t -> 'a option Lwt.t
<Enjolras>
iirc, get returns an option not because of try_get, but because the stream can be closed
<Enjolras>
and it will return None when the stream has been closed
<Emmanuel`>
get st remove and returns the first element of the stream, if any.
<Enjolras>
the not blocking version is last_new
<Emmanuel`>
hm, let me try
<Enjolras>
(i got really confused by this api the first time i tried, and i have to look it up each time i want to use it)
<Emmanuel`>
I got even more confused by Async APi
<Enjolras>
to push a function to a stream, you have a push function which takes an option. When you push None, it will close the stream
<Emmanuel`>
I'm just converting all my half broken Async code to Lwt, it's a million time simpler
<Emmanuel`>
oh really?
<Enjolras>
and the reader will be returned None, or fail with Empty in case you used next instead of get
<Enjolras>
this is handy to terminate the stream and notify the reader
antkong has quit [Quit: antkong]
<Enjolras>
i've never used Async honestly, i don't know :)
<Emmanuel`>
ok let me try that
<Emmanuel`>
thanks for the clarification!
<Emmanuel`>
Enjolras: Yes! You're right. Thank you so much
<flux>
probably an oversight. package-specific configuratoin commands are quite rare.
silver has joined #ocaml
warp has joined #ocaml
<Anarchos>
flux: it is not annoying per-se, but on my platform, the ncurses package is compiled without support of pkg-config to generate the .pc files.
Kakadu has joined #ocaml
<flux>
anarchos, nevertheles, if ncurses-config works just as well, it seems it should be preferred
<flux>
personally if I were to write nucrses-bindings, I wouldn't probably even notice there is ncurses-config given I would have used pkg-config :)
<flux>
at the very least it should call back to ncurses-config I suppose
<flux>
s/call/fall/
Anarchos_ has joined #ocaml
<Anarchos_>
flux: not sure : i have ncurses5-config and ncurses6-config, depending on the version installed. The pkg-config solution seems nevertheless more portable.
antkong_ has joined #ocaml
antkong_ has quit [Client Quit]
Anarchos has quit [Ping timeout: 252 seconds]
antkong has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
hexhaxtron has joined #ocaml
snhmib has joined #ocaml
AlexRussia has joined #ocaml
jgjl has quit [Ping timeout: 244 seconds]
orbifx has joined #ocaml
<orbifx>
hey
dhil has joined #ocaml
<Kakadu>
hello
<orbifx>
hey Kakadu, how are things?
<Kakadu>
Folks, can you predict any difficulties in creqating PPX deriving-based extension which will generate ImplicitModules : SHOW ?
<Kakadu>
orbifx: too much procrastination
<companion_cube>
you mean when implicits are merged?
<Kakadu>
I already have 4.02.3+implicits compiler
<orbifx>
happens Kakadu :P
<companion_cube>
then it should be easy, I guess, you just have to patch ppx_deriving.show
<Kakadu>
Yeah, I think that it should be kind of straightforward
<Kakadu>
So, it seems I can't use two ocamlbuild plugins at the same time. The straightforward solutions seems to copy-paste right lines to my ocamlbuild.ml. Any other ideas?
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
<flux>
merge them with some thought?-)
<Kakadu>
It's just not really obvious why Ocamlbuild_plugin.dispatch should be called only once
<flux>
is it not?
<flux>
I think doing something like 'dispatch' twice intead of once could cause great trouble.
<Kakadu>
Why do you think so?
<Kakadu>
Maybe you know some OCamlbuild internals?
<Drup>
flux: Except that's a huge and very annoying API problem that should really be solved
jgjl has joined #ocaml
<flux>
kakadu, well, if I were to pick any program that has a "dispatch", ie. pass in an event to be dealt with, if I did it twice, curious things would happen
<Kakadu>
flux: even if you pass different event in the second time?
<flux>
oh, I understood the same event was passed in both times
freehck has joined #ocaml
<freehck>
Hello people. I've just thought that it would be perfect if opam provided me with an information about what package contains a specific module.
<freehck>
I've just thought maybe it already exists?
<freehck>
I mean when I use linux distros like Debian or Centos (etc.) I have such instruments like "yum whatprovides" or "apt-file search" to find a specific program. But I don't see the same thing for modules in opam.
<freehck>
Opam's just looking for packages with similar names, but not for modules... :(
<Kakadu>
ubuntu packages are tarballs with specific files in it. Opam installs everything from sources. Does Gentoo has something like apt-file ?
<Drup>
ocp-browser --no-opam -I `opam config var containers:lib`
<Drup>
(replace "containers" by the package of your choice)
<freehck>
Kakadu: Gentoo does have such things.
<freehck>
ocp-browser? what is it?
<Drup>
It goes with ocp-index
<freehck>
Drup: Thank you.
<freehck>
Drup: hm... It looks for modules only in installed packages, right?
<Drup>
Yes, you need to have it instlaled
<freehck>
Drup: hm... well I usually need vice versa - to find the package by a module name...
<Drup>
Ah, that's another issue
<zozozo>
with the new beta, when building my project with ocamlbuild, I now get a lot of warning 58 (no cmx file), is there an ocamlbuild (or maybe ocamlfind) patch for that ?
<seangrove>
Algebr`: Ah ok, that was simple enough. I was calling "make_string" from obj-c, but hadn't defined the function in OCaml-land
spion_ is now known as spion
shinnya has quit [Ping timeout: 260 seconds]
dhil has joined #ocaml
<seangrove>
I'm trying to pass a number from OCaml to C (obj-c, but think it's the same in this case). Passing 0 from OCaml gives me 1 in C, 1 gives me 3, and so on. I suspect this is the 1-bit tag that OCaml uses. How do I convert it, and where is the appropriate place to do so?
<ggole>
There's a macro, see the "interfacing with C" segment of the manual
<mrvn>
seangrove: e.g. Int_val, Val_int, ...
<mrvn>
seangrove: you might want to look into using the CTypes module
<seangrove>
mrvn: Ok, so that looks like I should probably write my OCaml code as normal, and then maybe create a module to expose to C that wraps the OCaml code
<seangrove>
Oh, Int_val is in C-land. Blah.
<seangrove>
Yup, that worked! I'll look into the CTypes module as well, thanks!
kaustuv has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
Mercuria1Alchemi has quit [Ping timeout: 276 seconds]
julien_t has joined #ocaml
johnf has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Kakadu has quit [Quit: Page closed]
sh0t has quit [Ping timeout: 268 seconds]
<Algebr`>
yay!!! It works!
uris77 has joined #ocaml
uris77_ has quit [Ping timeout: 252 seconds]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
lobo has joined #ocaml
antkong has joined #ocaml
Kakadu has joined #ocaml
larhat has joined #ocaml
butts_butts_ has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
dhil has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
ygrek has joined #ocaml
ggole has quit []
hxegon has joined #ocaml
<seangrove>
Algebr`: Getting the simulator to work would definitely be a big boon for people. Signing the code in Xcode turned out to be trivial, but I could see people fumbling around with it.
<seangrove>
Algebr`: Also, another big ask: If you can try to figure out a hello-world of ocaml/ios/reactnative (given how familiar you are with the js stack, which is terrifying to me), that would be a huge leap for me.
<seangrove>
I'd like to try to figure out a way to use e.g. tyxml as a frontend for ReactJS and ReactNative, and start sharing code between them.
hxegon has quit [Ping timeout: 252 seconds]
hxegon has joined #ocaml
julien_t has quit [Ping timeout: 240 seconds]
hxegon is now known as hxegon_AFK
antkong has quit [Quit: antkong]
hxegon_AFK is now known as hxegon
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
<Drup>
seangrove: don't hesitate to ask questions
<seangrove>
Drup: Haven't so far ;)
<j0sh>
seangrove: i've thought about this, and i think i'd prefer having native ocaml bindings to UIKit (and getting reactivity with React/ReactiveData) rather than going through FB react native. abstractions on top of abstractions on top of abstractions is what makes software slow :(
<Algebr`>
Getting the simulator to work will have to wait a few days, I just dropped off my macbook for a stuck . and / keys, once I get the macbook back then I could get it done in an evening. Okay, will get an reactnative example out the door as well.
<Algebr`>
and doing that code sharing is totally doable, even easier if reactnative exposes some headers to me
<Algebr`>
native ocaml bindings to UIkit is not practical
<Algebr`>
UIkit is too huge and the style of uikit is awkward in ocaml
<Drup>
j0sh: tyxml is mostly free abstraction
<Algebr`>
probably, i think. So easier to pick and choose what parts of UIkit to rip out, and in any case UIKit is just the gui, so best to do the gui in objective c and business logic in OCaml, if any
<j0sh>
i've done bindings for a few components in UIKit, it's tedious but doable. taking advantage of reactnative does give you all that for free
<seangrove>
j0sh: The state model of RN is worth it, and if you take a look at Om, you can see how abstractions can speed things up (through immutability, etc.)
<seangrove>
Managing state in UI apps is incredibly difficult, RN allows you to use much saner alternatives
<Algebr`>
+1
<j0sh>
seangrove: you can still get reactivity in a similar way with ocaml, it's just an architecture
<Drup>
seangrove: j0sh was talking about tyxml+(ocaml)react, which is a similar model
<seangrove>
j0sh: Sure, I'm familiar with the potential (coming from the Clojure/Script world), but prefer to place bets differently
<j0sh>
i'm confused though. are we talking about taking tyxml and outputting reactnative and using that directly, or taking reactnative and running that through jsoo, then on iOS?
<seangrove>
j0sh: I'm not sure :) I suspect the most straightforwad way is through jsoo, but would be amazing to side-step that
<seangrove>
Still, interacting with the RN world from ocaml (instead of jsoo) is probably an uphill battle
<seangrove>
Algebr`: I can provide all the Mountain Dew you desire ;)
<seangrove>
Can't help with time quite as much...
<seangrove>
Algebr`: But that link doesn't address using community RN pckages like ReactMotion, does it?
<seangrove>
(have to step away, back in a bit)
<Algebr`>
not directly, but does let me move data between ocaml and reactnative
<Algebr`>
kl
<j0sh>
i figure if you just wanted tyxml to output react native JS, you wouldn't need a cross-compiler at all
<seangrove>
(asking before I leave so I don't forget) Does it make sense to provide an iOS backend for cohttp and ocaml-websocket so that they can be used on the devices?
snhmib has joined #ocaml
<j0sh>
would the current (lwt? JS?) backends not be enough? but i'm not exactly sure what ocaml is being used for here, whether as a cross-compiler or just a JS emitter
<Algebr`>
It will be hard to recompile cohttp because it has many dependencies and those would need to be recompiled as well
<Algebr`>
websocket will be easier, but if it uses lwt then again that needs to be recompiled.
<Algebr`>
I haven't looked into that but clearly a big need
<j0sh>
does opam work with a cross-compiled ocaml? would be interesting to see if lwt, etc could be built
hxegon has quit [Quit: BRB]
sh0t has joined #ocaml
<j0sh>
iOS is basically unix, so it should be straightforward to support lwt along with everything else (a few tweaks might be necessary for the C parts, but I'd be surprised if it were much)
tane has quit [Quit: Verlassend]
tane has joined #ocaml
hxegon has joined #ocaml
turbopape has joined #ocaml
<Drup>
Algebr`: don't your opam switch take of those things easily ? I though that was the point
<Algebr`>
j0sh: yes, I expect for lwt to work would need small changes to C code, if any
<Algebr`>
Drup: yes, that's the point, but need to add stuff to it
<Kakadu>
What could be wrong in line xml##_open(Js.string "GET", url, Js._false); ?
* Kakadu
is trying to rewrite jsoo toplevel from Camlp4-based syntax extension to new PPX one and also to add some ocamlbuild instead of Makefile
fredlhsu has quit [Client Quit]
seangrove has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
jackweirdy has joined #ocaml
antkong has joined #ocaml
jackweirdy has quit [Read error: Connection reset by peer]
struk|desk|away is now known as struk|desk
<Drup>
kakadu: use camlp4toppx, or look at the documentation, this should be explained
hcarty has quit [Quit: WeeChat 1.4]
fredlhsu has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
<Kakadu>
aaaaaaaaaaaaaaaaaaaaaah
<Kakadu>
I don't need a tuple any more
<Kakadu>
good!
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
uris77 has quit [Quit: leaving]
tennix has joined #ocaml
ztennix has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
keep_learning has quit [Quit: This computer has gone to sleep]
bbarker has joined #ocaml
struk|desk is now known as struk|desk|away
lokien_ has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
<aantron>
trying to set up vim with merlin, added :set rtp+=<SHARE_DIR>/ocamlmerlin/vim, where <SHARE_DIR> is `opam config var share` to ~/.vimrc, typing Ctrl+X Ctrl+O in insertion mode in vim, get Omni completion (^O^N^P) Pattern not found. what am i missing?
<aantron>
opam list merlin shows merlin 2.3.1 installed
<aantron>
vim is 7.3 distributed by apple
pierpa has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Reshi has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
tane has quit [Quit: Verlassend]
<smondet_>
aantron: I would test the merlin setup with <localleader>t instead of completion because it's more reliable (also at the vim level)
<def`>
aantron: share the ouput of :scriptnames if it is still not working (and :set omnifunc? )
dhil has joined #ocaml
pierpa has quit [Ping timeout: 264 seconds]
<Algebr`>
kakadu: yes, white space now
<aantron>
thanks smondet_, def`, it seems to be working. the problem was the instructions use a path component "ocamlmerlin" while current merlin uses "merlin" for that directory
antkong has quit [Quit: antkong]
t4nk354 has left #ocaml [#ocaml]
pierpa has joined #ocaml
turbopape has quit [Ping timeout: 268 seconds]
sh0t has quit [Ping timeout: 250 seconds]
<aantron>
def`: you work on merlin, yes?
turbopape has joined #ocaml
<Algebr`>
def is a young merlin
<Algebr`>
I can include that fix for tomorrow as well if you don't feel like hassle of PR aantron
silver has quit [Read error: Connection reset by peer]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<aantron>
whats happening tomorrow?
Kakadu has quit [Remote host closed the connection]