silver has quit [Read error: Connection reset by peer]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
zoobab has quit [Ping timeout: 260 seconds]
spacekitteh has joined #ocaml
zoobab has joined #ocaml
please_help has joined #ocaml
spacekitteh has quit [Ping timeout: 248 seconds]
spacekitteh has joined #ocaml
mxv has quit [Ping timeout: 246 seconds]
struk|desk|away is now known as struk|desk
mysiticity has joined #ocaml
vpm has quit [Quit: co'o]
vpm has joined #ocaml
natrium1970 has joined #ocaml
vpm has quit [Quit: co'o]
vpm has joined #ocaml
GeorgeHahn has joined #ocaml
lokien_ has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
seangrove has joined #ocaml
butts_butts has joined #ocaml
zRecursive has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
sh0t has quit [Ping timeout: 240 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
johnf has joined #ocaml
spacekitteh has quit [Ping timeout: 240 seconds]
<seangrove>
Algebr`: "call objc from within a C function" -> this isn't a great explanation of how to find a cocoa api and know intuitively how to call it from OCaml
struk|desk is now known as struk|desk|away
sh0t has joined #ocaml
spacekitteh has joined #ocaml
<j0sh>
seangrove: check out some of the sample apps from psellos
butts_butts has quit [Read error: Connection reset by peer]
Sorella has joined #ocaml
struk|desk|away is now known as struk|desk
Algebr has quit [Ping timeout: 240 seconds]
aantron has quit [Remote host closed the connection]
jeffmo has quit [Quit: jeffmo]
darkf has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
keep_learning has joined #ocaml
aantron has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
natrium1970 has quit [Quit: natrium1970]
average has joined #ocaml
average has left #ocaml [#ocaml]
zRecursive has quit [Remote host closed the connection]
natrium1970 has joined #ocaml
struk|desk is now known as struk|desk|away
natrium1970 has quit [Quit: natrium1970]
antkong has joined #ocaml
struk|desk|away is now known as struk|desk
johnelse has quit [Ping timeout: 260 seconds]
lokien_ has quit [Quit: Connection closed for inactivity]
aantron has quit [Remote host closed the connection]
struktured has joined #ocaml
struk|desk is now known as struk|desk|away
johnelse has joined #ocaml
antkong has quit [Quit: antkong]
aantron has joined #ocaml
aantron has quit [Remote host closed the connection]
snhmib has quit [Quit: WeeChat 1.3]
seangrove has joined #ocaml
aantron has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 246 seconds]
arquebus has joined #ocaml
srcerer_ has quit [Ping timeout: 244 seconds]
arquebus has quit [Client Quit]
antkong has joined #ocaml
struk|desk|away is now known as struk|desk
zRecursive has joined #ocaml
struk|desk is now known as struk|desk|away
seangrove has quit [Ping timeout: 268 seconds]
seangrove has joined #ocaml
slash^ has joined #ocaml
struk|desk|away is now known as struk|desk
srcerer has joined #ocaml
GeorgeHahn has quit [Read error: Connection reset by peer]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
Sorella has quit [Quit: Connection closed for inactivity]
struk|desk is now known as struk|desk|away
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
malc_ has joined #ocaml
<zRecursive>
`opam init` reports "wget.exe: unrecognized option `--content-disposition'" ? `wget --help` => GNU Wget 1.10+devel, a non-interactive network retriever.
<pierpa>
1.10 is very old
Emmanuel` has quit [Quit: Konversation terminated!]
<pierpa>
I have 1.11, which is from 2008
Emmanuel` has joined #ocaml
<zRecursive>
thanks, i will try to find a new one
<pierpa>
current version is 1.17 it seems
<pierpa>
for the record, 1.10 is from 2005 :)
<zRecursive>
ok
antkong has quit [Quit: antkong]
antkong has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
icicled has quit [Read error: Connection reset by peer]
antkong has quit [Quit: antkong]
Reshi has joined #ocaml
mysiticity has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
ggole has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
srcerer has quit [Ping timeout: 240 seconds]
srcerer has joined #ocaml
hunteriam has joined #ocaml
seangrove has joined #ocaml
srcerer_ has joined #ocaml
ygrek_ has quit [Ping timeout: 276 seconds]
srcerer has quit [Ping timeout: 244 seconds]
srcerer_ is now known as srcerer
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
lokien_ has joined #ocaml
Simn has joined #ocaml
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 268 seconds]
srcerer_ is now known as srcerer
silver has joined #ocaml
zRecursive has quit [Remote host closed the connection]
seangrove has quit [Ping timeout: 248 seconds]
axiles has quit [Ping timeout: 250 seconds]
axiles has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
rand__ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
wolfcore has quit [Ping timeout: 260 seconds]
wolfcore has joined #ocaml
<lyxia>
In jsoo I find it odd that Dom_svg.animatedLength is [length] animated and not [length Js.t] animated. Once you access the baseVal of animated, you get a length, rather than a length Js.t, and from there I can't see how to change length. Or am I not supposed to?
jgjl has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
t4nk858 has joined #ocaml
kayceesrk has joined #ocaml
hunteriam has quit [Quit: Connection closed for inactivity]
t4nk858 has quit [Ping timeout: 252 seconds]
antkong_ has joined #ocaml
Reshi has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Reshi has joined #ocaml
kayceesrk has left #ocaml [#ocaml]
<flux>
how do I type this properly? let list_of_map (type key) (type map) (map_module : (module Map.S with type key = key and type t = map)) (m : map) = assert false
<flux>
the issue being type t = .. doesn't match type 'a t, but I can't really write type 'a t there either, can I..
antkong_ has quit [Quit: antkong_]
cdidd_ has joined #ocaml
cdidd has quit [Ping timeout: 248 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
<flux>
so I tried a different formulation, but I get the "..would escape its scope" error: let list_of_map (type key) (type value) (map_module : (module Map.S with type key = key)) = let module Map = (val map_module) in fun (m : key Map.t) -> assert false
d0nn1e has joined #ocaml
<mrvn>
flux: you can't change the number of parameters to a type in a functor. You have to write a new one accepting 'a t
<flux>
so I solved my problem: let list_of_map (type key) map (map_module : (module Map.S with type key = key)) = ..
<flux>
the difference: the parameter map is before the module
<flux>
is there a way to make that work vice-versa?-) the complete code is: let list_of_map (type key) map (map_module : (module Map.S with type key = key)) = Map.foldi (fun (key : key) value xs -> (key, value)::xs) map [] |> List.rev
<lyxia>
flux: it doesn't use map_module anymore?
<flux>
hmm, excellent point
<flux>
what does it do?-)
<flux>
I'm guessint Map is the Batteries' polymorphic map :-)
<lyxia>
heh
<flux>
ok so I'm back into square one, THANKS A LOT lyxia ;-)
<flux>
so the code is let list_of_map (type key) map (map_module : (module Map.S with type key = key)) = let module Map = (val map_module) in Map.fold (fun (key : key) value xs -> (key, value)::xs) map [] |> List.rev
<flux>
how do I make that work?-(
<mrvn>
What exactly do you want to do? A function that takes a key module, a map module and a map and produces a list of the maps keys for any kind of map?
<flux>
yep
<flux>
previously I've done that with a module, but I feel this should be possible with first-class modules as well, yes?
<lyxia>
the map type should also be an argument to avoid this escaping stuff but I don't see a construct to allow this either
<mrvn>
flux: just be happy you aren't dealing with objects as well. I've run into a problem with "type 'a t = 'a foo bla" where later a type of 'a foo bla works but 'a t does not.
Reshi has quit [Ping timeout: 268 seconds]
snhmib has joined #ocaml
Reshi has joined #ocaml
j0sh has quit [Read error: Connection reset by peer]
<beginner>
does obuild not support ppx as preprocessor_
<beginner>
?
<beginner>
is nobody using obuild and ppx?
<ggole>
flux: this doesn't solve your problem, but you can write that more pleasantly as let list_of_map (type k) map (module M : Map.S with type key = k) =
seangrove has joined #ocaml
data_hope has joined #ocaml
<flux>
nice. I suppose I should read the particular chapter from the manual..
<beginner>
nobody?
data_hope has quit [Client Quit]
data_hope has joined #ocaml
data_hope has quit [Client Quit]
<ggole>
flux: and as for your problem itself, I think you need a functor
seangrove has quit [Ping timeout: 244 seconds]
<flux>
ggole, yes, that's what I do usually, but I wanted to use first class modules :(
<flux>
but apparently they are not yet quite as expressive then
data_hope has joined #ocaml
data_hope has quit [Client Quit]
jackweirdy has joined #ocaml
jackweirdy has quit [Read error: Connection reset by peer]
data_hope has joined #ocaml
data_hope has quit [Client Quit]
data_hope has joined #ocaml
<ggole>
flux: yeah. You want to be able to express a type something like (module Map.S with type t = 'm) -> 'm -> ...
data_hope has quit [Client Quit]
<ggole>
But you can't, since type variables don't range over arities
data_hope has joined #ocaml
data_hope has quit [Client Quit]
data_hope has joined #ocaml
<flux>
and we cannot "specialize" a module and rewrite its type 'a t with type t = u
<flux>
maybe that wouldn't be generally possible operation anyway
data_hope has quit [Client Quit]
inr_ is now known as inr
data_hope has joined #ocaml
data_hope has quit [Client Quit]
data_hope has joined #ocaml
data_hope has quit [Client Quit]
data_hope has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
data_hope has quit [Client Quit]
Emmanuel` has joined #ocaml
data_hope has joined #ocaml
spacekitteh has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
spacekitteh has joined #ocaml
FreeBirdLjj has joined #ocaml
<spacekitteh>
how can i set a breakpoint in a dynamically loaded library which hasn't been loaded yet?
lokien_ has joined #ocaml
data_hope has quit [Quit: leaving]
data_hope has joined #ocaml
data_hope has quit [Client Quit]
data_hope has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
data_hope has quit [Client Quit]
data_hope has joined #ocaml
data_hope has quit [Client Quit]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deko-pyon has quit [Ping timeout: 276 seconds]
Reshi has quit [Ping timeout: 268 seconds]
Reshi has joined #ocaml
data_hope has joined #ocaml
Reshi has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
Reshi has quit [Ping timeout: 246 seconds]
DanielRi1hman is now known as DanielRichman
rand__ has quit [Quit: leaving]
data_hope has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
Sorella has joined #ocaml
data_hope has joined #ocaml
dhil has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
jackweirdy has joined #ocaml
hnagamin has joined #ocaml
jgjl has joined #ocaml
tobiasBora has joined #ocaml
<tobiasBora>
Hello !
<tobiasBora>
Is there a "positive" modulo function in Ocaml such that (-5 mod 32 = 27) ?
<zozozo>
don't think so, there was a thread on the mailing list about that recently
<tobiasBora>
(I could do "let new_mod a b = let t = a mod b in if t >= 0 then t else t + b"
<tobiasBora>
)
<tobiasBora>
zozozo: Hum ok...
<ggole>
If the number is a power of two you can do use a mask
<zozozo>
another solution is : let pmod a b = ((a mod b) + b) mod b
<ggole>
eg let mod32 n = n land (32 - 1);;
<tobiasBora>
Ok thank you !
<Drup>
zozozo: you don't need the extra mod b
<zozozo>
Drup: if a is negative, its not needed, but if a is positive, I think it's useful
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<Drup>
ah, right
<tobiasBora>
In term of efficiency, if it's not a power of two, is the double mod more efficient ?
<ggole>
Than the branch? Doubtful
data_hope has quit [Ping timeout: 276 seconds]
<zozozo>
since both are juste cpu instructions, they should be significantly faster than memory access I'd think, so probably not the bottleneck in most programs
<ggole>
mod isn't a particularly fast instruction, considerably slower than a (cached) memory access
struk|desk|away is now known as struk|desk
<tobiasBora>
Ok thank you !
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 276 seconds]
<mattg>
Anyone here familiar with the llvm 3.7 bindings ?
<mattg>
but an expression was expected of type 'a Ctypes.typ = 'a Static.typ
<mattg>
ah maybe i need to put the whole thing inside funptr
<Drup>
Ah, you probably need that yes
data_hope has joined #ocaml
data_hope has quit [Ping timeout: 260 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<mattg>
that was it Drup
mems has joined #ocaml
mems has quit [Client Quit]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<mattg>
if you have an LLVM function of void -> double, you need to pass something like (Foreign.funptr Ctypes.(void @-> returning double)) as the second arg to Llvm_executionengine.get_function_address
<Drup>
Yes, the tutorial should be rewritten, it's a bit of work :/
seangrove has joined #ocaml
sz0 has joined #ocaml
data_hope has joined #ocaml
mxv has joined #ocaml
sh0t has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
data_hope has quit [Ping timeout: 248 seconds]
Emmanuel` has joined #ocaml
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
struk|desk|away is now known as struk|desk
jackweirdy has joined #ocaml
aantron has quit [Remote host closed the connection]
foolishmonkey has joined #ocaml
data_hope has joined #ocaml
jackweirdy has quit [Max SendQ exceeded]
darkf has quit [Quit: Leaving]
aantron has joined #ocaml
jgjl has quit [Ping timeout: 240 seconds]
struk|desk is now known as struk|desk|away
data_hope has quit [Ping timeout: 264 seconds]
julien_t has quit [Ping timeout: 246 seconds]
jgjl has joined #ocaml
kalzz has quit [Ping timeout: 248 seconds]
deko-pyon has joined #ocaml
julien_t has joined #ocaml
kalzz has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
kalzz has quit [Ping timeout: 260 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
k1000 has quit [Ping timeout: 246 seconds]
k1000 has joined #ocaml
struk|desk|away is now known as struk|desk
<please_help>
when I try to build a site with ocsigen using the eliom-distillery makefile and using core, I get "Error: Error while linking .../core/core.cma(Core): Reference to undefined global `Thread'", what could be causing that?
<mfp>
please_help: are you trying to use Core for the client-side stuff? Core depends on Unix + the threads libs which is obviously not available on JS. (You can use Core_kernel though)
<please_help>
mfp: I tried replacing Core by Core_kernel but list functions like List.map and String.concat no longer work the same/are taken from the base ocaml stdlib instead?
<please_help>
modules like Core_kernel.List and Core.List are both unbound, too.
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<please_help>
oh, I forgot it lies in Std. This fixed the problem. Thanks.
<please_help>
the make complains about invalid primitives and integer overflows though. It then goes out of memory (on 16GB)...
Anarchos has joined #ocaml
<please_help>
that's at js_of_ocaml, and errors are of the type: Warning: integer overflow: integer 0xffffffff (4294967295) truncated to 0xffffffff (-1); the generated code might be incorrect. ... js_of_ocaml: Error: Out of memory
julien_t has quit [Ping timeout: 260 seconds]
<Drup>
Don't use core with js_of_ocaml
struk|desk is now known as struk|desk|away
j0sh has joined #ocaml
shinnya has joined #ocaml
<sspi>
Where can I find information on multicore primitives?
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
spacekitteh has joined #ocaml
<Algebr>
no easy example of current date from calendarlib? Not even a mention in readme...?
<Algebr>
ah, just CalendarLib.Date has a make function
Anarchos has quit [Ping timeout: 268 seconds]
seangrove has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
antkong has quit [Quit: antkong]
ggole has quit []
<please_help>
With ocsigen, I'm trying to generate a table which row elements include links, but it looks to me like td only accepts pcdata and nothing else, is that the case? No way to drop a "a ~a:[a_href ..." in there without causing a type conflict?
<please_help>
(I'm using eliom 5 and tyxml 3.6)
<aantron>
td should accept more than pcdata. can you show the expression?
Algebr has quit [Ping timeout: 248 seconds]
<please_help>
[tr [td [a ~a:[a_href (Xml.uri_of_string "http://ocaml.org")] [pcdata "OCaml"]]]] (a is a valid flow element which is a valid child for a td element in html5). Result: Error: This expression has type service:('a, unit, [< Eliom_service.get_service_kind ] (etc.) but an expression was expected of type ([< Html5_types.td_content_fun ] as 'c) Eliom_content.Html5.D.elt
<mfp>
please_help: try with Raw.a (a is for links to typed services)
sh0t has quit [Ping timeout: 268 seconds]
spacekit1eh has joined #ocaml
sh0t has joined #ocaml
fantasticsid has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
fantasticsid has joined #ocaml
fantasticsid has quit [Read error: Connection reset by peer]
spacekitteh has quit [Ping timeout: 248 seconds]
Algebr has joined #ocaml
Algebr` has quit [Read error: Connection reset by peer]