flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
cdidd has quit [Remote host closed the connection]
darkf has joined #ocaml
mcstar has quit [Quit: mcstar]
cdidd has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
tani has quit [Quit: Verlassend]
travisbrady has joined #ocaml
karswell` has quit [Remote host closed the connection]
karswell` has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
menace has quit [Quit: Leaving.]
Icarot has joined #ocaml
Icarot has quit [Max SendQ exceeded]
Icarot has joined #ocaml
q66 has quit [Remote host closed the connection]
ollehar has joined #ocaml
Icarot has quit [Ping timeout: 248 seconds]
ollehar has quit [Ping timeout: 245 seconds]
Icarot has joined #ocaml
amaloz has joined #ocaml
Icarot has quit [Ping timeout: 252 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
crm416 has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
z_- has joined #ocaml
<z_-> Using Filter in list will give you all elements true to that filter. How can I achieve the opposite (get a list that don't pass the filter) ?
<z_-> Scratch that... I hate myself ^^
<crm416> Anyone have experience developing on a Mac with OcaIDE and OPAM? Having trouble getting all my tools to play nice with one another.
z_- has quit [Quit: Page closed]
yacks has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Icarot has joined #ocaml
Icarot has quit [Ping timeout: 248 seconds]
paddymahoney has quit [Remote host closed the connection]
amaloz has left #ocaml []
crm416 has quit [Quit: Page closed]
cdidd has quit [Remote host closed the connection]
yacks has quit [Read error: Operation timed out]
Icarot has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
adotbrown has quit [Ping timeout: 246 seconds]
yacks has joined #ocaml
ttamttam has joined #ocaml
adotbrown has joined #ocaml
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]
djcoin has joined #ocaml
_habnabit has joined #ocaml
Snark has joined #ocaml
adotbrown has quit [Ping timeout: 252 seconds]
awm22 has quit [Quit: Leaving.]
thomasga has joined #ocaml
Kakadu has joined #ocaml
ontologiae has joined #ocaml
ollehar has joined #ocaml
hkBst has joined #ocaml
anderse has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
<Kakadu> adrien: You mentioned camlstartup*.s yesterday. Where should I look for it?
ollehar has quit [Ping timeout: 272 seconds]
<adrien_oww> it's generated
<adrien_oww> I don't remember how I had managed to keep it
<adrien_oww> maybe make link fail
<adrien_oww> and do all your operations with -verbose
anderse has quit [Quit: anderse]
ollehar has joined #ocaml
ottbot has quit [Read error: Operation timed out]
<mehdid> using ocamlopt's -dstartup?
<Kakadu> mehdid: with this option statup is not performed anyway. http://paste.in.ua/8085/raw/
<Kakadu> I don't understand something and I have not understanded yet what is that `something`
<Kakadu> 1. Why shuould I link again adrien's *.s file if it is already in library generated by `ocamlopt -output-obj`?
<Kakadu> 2. If I have stubs.o file inside cmxa Why should I link it again after performing `ocamlfind opt -output-obj filename.cmxa`?
ontologiae has joined #ocaml
<mehdid> what are the generated files you have?
<Kakadu> generated by commands above?
<mehdid> yes, only the first command (ocamlfind opt ...)
mcclurmc has quit [Quit: Leaving]
<Kakadu> camlcode.o camlcode.o.startup.s
<mehdid> so the .s you were asking for is generated
<mehdid> (and kept on disk)
<Kakadu> and It should be inside camlcode.o
<Kakadu> because > ld -r -o 'camlcode.o' '/tmp/camlstartupf195d3.o' ....
<Kakadu> oops
<Kakadu> no, All correct
<Kakadu> + as -o '/tmp/camlstartupf195d3.o' 'camlcode.o.startup.s'
<Kakadu> + ld -r -o 'camlcode.o' '/tmp/camlstartupf195d3.o' ....................
<mehdid> yeah, that part is as expected
ollehar has quit [Ping timeout: 246 seconds]
* Kakadu still doesn't understand where the problem is
* mehdid didn't do much c/c++ bindings
ollehar has joined #ocaml
Icarot has quit [Ping timeout: 260 seconds]
ollehar has quit [Ping timeout: 248 seconds]
anderse has joined #ocaml
<adrien_oww> Kakadu: but what are you trying to achieve?
ottbot has joined #ocaml
Yoric has joined #ocaml
<Kakadu> I have let () = Callback.register in my modules and this line is not being executed if I make startup from C++
<adrien_oww> well, sounds obvious :P
<Kakadu> I don't understand what are u smiling about (
<darkf> Kakadu: you're not calling register
<Kakadu> okay
<Kakadu> darkf: special for u
<Kakadu> $ cat ../QmlContext.ml | nl -ba | head -n 12 | tail -n 3
<Kakadu> 10 let () =
<Kakadu> 11 print_endline "registering add_view";
<Kakadu> 12 Callback.register "registerView" add_view
<adrien_oww> have you used caml_main()?
<Kakadu> yep
<adrien_oww> are you sure the module has been linked into the executable?
<mehdid> the strange thing is that it should not be a unit, if he is not calling it
mcstar has joined #ocaml
<mcstar> hi all
<Kakadu> adrien: Maybe it is not linked but it should be because It is in cmxa and I make .o from cmxa and link with this .o. http://paste.in.ua/8087/#19
mika1 has joined #ocaml
<mcstar> im gonna re-ask a question i asked yesterday
<mcstar> can you guys help me translate this code to ocaml?
<mcstar> what would be the mechanism to take over the role of typeclasses?
<mcstar> the validp function takesn a n-ary propositional formula and checks if the formula is true for every combination of input
<mcstar> Kakadu: oh, whats that? qt5 binding for ocaml?
<Kakadu> mcstar: please, don't run ahead of steam locomotive
* Kakadu don't know useful english analogue
<mcstar> then just tell me what you mean :)
<mcstar> is it too early to announce it?
<Kakadu> `ride before the hounds` !!
<Kakadu> mcstar: I'm not really sure that I will release or announce that
<Kakadu> brb
cago has joined #ocaml
cago has quit [Quit: Leaving.]
<mcstar> dont people read haskell here?
<mcstar> if something is not clear, just ask
<mcstar> but my basic qustion is, how to replace typeclasses with something that would provide similar effect
<mcstar> would it be modules?
<mcstar> or, to put it another way:
<mcstar> how to write a function that evaluates an arbitrary n-ary function over the bools
<mcstar> without using metaprogrammin, ofc
<mcstar> alright, if anyone has an idea, just nick me
cago has joined #ocaml
ollehar has joined #ocaml
cago has left #ocaml []
cago has joined #ocaml
cago has left #ocaml []
Icarot has joined #ocaml
cago has joined #ocaml
Icarot has quit [Ping timeout: 256 seconds]
cago has quit [Client Quit]
cago has joined #ocaml
cago has left #ocaml []
cago has joined #ocaml
<Kakadu> mcstar: Are u intersting in Qt too?
<mcstar> i used it before from c++, and would love to use it from a functional language
<mcstar> if it is comfortable
<mcstar> the language would be preferably be haskell or ocaml
<mcstar> -be
zbroyar has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
leoncamel has quit [Quit: WeeChat 0.3.9.2]
thelema_ has joined #ocaml
leoncamel has joined #ocaml
fds_ has joined #ocaml
hcarty_ has joined #ocaml
olasd_ has joined #ocaml
NaCl_ has joined #ocaml
NaCl_ has quit [Changing host]
NaCl_ has joined #ocaml
weie_ has joined #ocaml
<Kakadu> smart man said that my module could not being linked because it is `unused` and linker dropped it
pippijn_ has joined #ocaml
pippijn_ has quit [Changing host]
pippijn_ has joined #ocaml
awm22 has joined #ocaml
xaimus_ has joined #ocaml
ttm has joined #ocaml
thelema has quit [*.net *.split]
olasd has quit [*.net *.split]
hcarty has quit [*.net *.split]
weie has quit [*.net *.split]
The_third_man has quit [*.net *.split]
NaCl has quit [*.net *.split]
xaimus has quit [*.net *.split]
so has quit [*.net *.split]
pippijn has quit [*.net *.split]
fds has quit [*.net *.split]
so- is now known as so
mfp has joined #ocaml
<emias> p
PM has quit [Quit: WeeChat 0.3.9.2]
PM has joined #ocaml
notk0 has joined #ocaml
mcclurmc has joined #ocaml
<notk0> hello, is anyone here familiar with Lambda type of bytecomp in ocaml?
<notk0> I have no idea what consts and blocks mean in match_cases
<notk0> I assume consts is constructor list
<notk0> but blocks, what is it supposed to represent?
<rks_> notk0: wait
<rks_> ah ok not the same question :')
<rks_> well, ping def-lkb
<notk0> oh thank you
<notk0> I think that's it
<notk0> def-lkb: thank you,that makes sense
<notk0> in my testing that seems to be the case
<notk0> sw_consts just contains a number and the code
<def-lkb> np
<notk0> and you can differentiate between a constant constructor and a non-constant one?
olasd_ is now known as olasd
<def-lkb> … yes.
<notk0> oh ok :P
ttamttam has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
<def-lkb> syntactically, a constructor without "of <parameters>" is constant; at runtime, you can still distinguish between constants and non-constants using Obj.* tricks
<def-lkb> (note that this only applies to sum types, other constructions map to different representations)
<def-lkb> what do you want to know exactly ?
awm22 has quit [Quit: Leaving.]
<mcstar> im glad you asked, see my question and paste
<mcstar> (sry, i couldnt resist the hijacking XD)
<Kakadu> :)
<notk0> def-lkb: well It's part of my assignment, we are supposed to compile a subset of OCaml
<def-lkb> :)
* Kakadu succeeded to call startup code but know by some reason caml_named_value returns nullptr
* Kakadu hopes that he initialized correct runtime
ttamttam has joined #ocaml
<rks_> mcstar: is something like http://hpaste.org/83905 what you want ?
<mcstar> im looking
* Kakadu succeeded. Many thanks
<rks_> ... probably not
<mcstar> rks_: ill try that code, be back in a sec
<mcstar> rks_: ok, im in trouble, i cant get that to work
<rks_> :D
<mcstar> i should add that my ocaml knowledge is superficial
<rks_> what do you want to do?
<mcstar> i should parameterize Lol to work?
<rks_> yes
<mcstar> rks_: do you see my paste?
<mcstar> (probably you do, just saying take a look at it nevertheless)
<rks_> « module BoolLol = Lol (BoolPred) » for example
<rks_> yes I see your paste mcstar
<mcstar> validp is a function that takes a funtion of type (Bool ->)+ -> Bool
<mcstar> ^ thats a kind of regex syntax
<rks_> yes ok
<mcstar> wait, wrong
<mcstar> (Bool ->)+ Bool
<rks_> yeah well
<mcstar> ill try your code again
<rks_> you won't be able to do that in ocaml
<rks_> mcstar: no need
<mcstar> ok
<rks_> modules/functors are not the answer here
<mcstar> since validp must be come from another module for the base case?
<mcstar> -be
<notk0> what is the syntax for a function that matches without the match keyword?
<mcstar> or what else is the reason why it cant work?
<notk0> you can directly do | but I forgot how
<mcstar> fun ?
<rks_> notk0: « let x = function .. »
<Armael> notk0: let f = function | Foo -> ieie | Bar -> uiui
<notk0> thank you Armael , that's what I was looking for
mattrepl has joined #ocaml
jpdeplaix has quit [Ping timeout: 245 seconds]
<mcstar> rks_: is there another mechanism that lets you overload an identifier wrt its type?
beckerb has joined #ocaml
<mcstar> because, in the haskell version, thats what happens, sort of
<rks_> maybe you can have that with objects
<rks_> but I'm not sure
<rks_> (I never really used them)
<mcstar> i thought ocaml was expressive enough to do this
<mcstar> also, the TypeFamilies extension isnt really necessary in the haskell code
<rks_> (yeah, we figured so)
<notk0> err doesn't ocaml interpreter detect recursion ? as in infinite recursion?
<mcstar> thats haskell
<mcstar> let x = x in x
<mcstar> *** Exception: <<loop>>
<Kakadu> what means `don't detect recursion`?
<asmanur> well, let rec x = x in caml is not allowed
<rks_> mcstar: that's an easy case
<asmanur> and let rec x = lazy (Lazy.force x) in Lazy.force x does raise an exception as well
<mcstar> yes, but it detects these kinds of useless recursions
<asmanur> what do you mean detect ?
<mcstar> rks_: i plan to blog about this snippet of code, i find it interesting, and hoped i could put an ocaml equivalent side by side to it
<mcstar> i have a D and a python version (both using metaprogramming)
<Kakadu> mcstar: maybe it will be good idea to ask about this code somewhere where OCaml is related (#coq)
<Kakadu> mcstar: please, mention your blog post somewhere here when it will be ready
<rks_> Kakadu: coq won't allow that either
<rks_> ... or maybe it will
<rks_> it has tyeclasses as well
<mcstar> coq isnt just a theorem proving assistant?
<rks_> nah
<mcstar> so it is more like agda for haskell?
<mcstar> a whole language?
<rks_> I'm curious about the python version though mcstar
<rks_> yes mcstar, it's a "whole language"
<mcstar> thats too easy, but i can show you
<rks_> too easy because the language isn't typed?
<mcstar> rks_: and has built in introspection
<mcstar> it is typed though
<mcstar> but only values carry types, not identifiers
mcclurmc has joined #ocaml
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
zbroyar has quit [Quit: Leaving.]
zbroyar has joined #ocaml
awm22 has joined #ocaml
ollehar1 has joined #ocaml
q66 has joined #ocaml
tane has joined #ocaml
contempt has quit [Ping timeout: 252 seconds]
<mcstar> typerex's hilighter is awesome
contempt has joined #ocaml
mika1 has joined #ocaml
dwmw2_gone is now known as dwmw2
ollehar1 has quit [Ping timeout: 245 seconds]
<notk0> mcstar: definitely better than tuareg, so many colors!
<mcstar> :)
<notk0> it even uses colors I didn't know exist, like some sort of green that is brown or yellow
<notk0> and some orange yellow thing
<notk0> and some purple it's good
jpdeplaix has joined #ocaml
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
smondet has joined #ocaml
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
walter|r has quit [Quit: This computer has gone to sleep]
<Kakadu> Can I set bazaar repo instead of tarball url for opam's new package?
travisbrady has joined #ocaml
<Kakadu> I have seen git and darcs in tutorial, but not bazaar
zzz_` has quit [Read error: Operation timed out]
zzz_ has joined #ocaml
travisbrady has quit [Client Quit]
cdidd has joined #ocaml
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
ollehar1 has joined #ocaml
travisbrady has joined #ocaml
tac has joined #ocaml
darkf has quit [Quit: Leaving]
tianon has joined #ocaml
ollehar1 has quit [Ping timeout: 245 seconds]
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
notk0 has left #ocaml []
hkBst_ is now known as hkBst
cago has joined #ocaml
Mortchek_ has joined #ocaml
Mortchek_ has quit [Client Quit]
fasta_ has joined #ocaml
adrien_oww has quit [Ping timeout: 264 seconds]
adrien_oww has joined #ocaml
fasta has quit [Ping timeout: 264 seconds]
Mortchek has joined #ocaml
mika1 has quit [Ping timeout: 264 seconds]
z_- has joined #ocaml
<Mortchek> Why is it that if I evaluate (print_string "foo" ; input_line stdin) then the input happens first?
<tac> Mortchek: line buffering
<tac> I'm guessing
<Mortchek> That was my guess, but that doesn't seem consistent with the ordering issue there.
<Mortchek> It happens if I reverse the order as well.
<Mortchek> In any case, how would I change the buffering?
<tac> no idea :P
<Mortchek> Oh, my evidence against it being line buffering should have been that it does it in the same order regardless of whether I do "foo" or "foo\n".
<djcoin> mcstar: take a look at http://hpaste.org/83924
<mcstar> will do
<tac> Mortchek: it's unlikely, but it could be block-buffered
<Mortchek> Where would I look to find information about setting the buffering mode?
<Mortchek> I've tried searching the web to no avail.
hkBst has quit [Quit: Konversation terminated!]
<mcstar> djcoin: i see, thanks for the effort, but that is not equivalent to the problem i asked for, this can be done without modules...
<mcstar> just define valid[1-n] for possible propositional formulas
<mcstar> validp*
<djcoin> Oh ok
tac has left #ocaml []
<Mortchek> Ah, yep, it turned out to be a buffering problem after all. The newline was not causing a flush. But using print_newline, which explicitly flushes, resolved the issue.
asmanur has quit [Ping timeout: 250 seconds]
Kakadu has quit []
asmanur has joined #ocaml
zbroyar has left #ocaml []
ttamttam has quit [Quit: ttamttam]
<z_-> using printf, how do you print a list with 1 element per line, instead of all elements on same line ?
<companion_cube> Format.printf "@[<v>";
<companion_cube> Format.printf "my element@;";
<companion_cube> Format.printf "@]"
<companion_cube> where the second line is repeated for every elements
<z_-> Thanks a lot, will try that.
<companion_cube> this uses the Format module rather than Printf, but you get some basic horizontal/vertical boxes
<z_-> Ah great to know!
<companion_cube> the doc is a bit tough, but the point is that you can write formatting boxed in the format strings (with "%a", "@[", "@ ", "@]", etc.)
thomasga has quit [Quit: Leaving.]
z_- has quit [Quit: Page closed]
beckerb has quit [Quit: Konversation terminated!]
beckerb has joined #ocaml
osa1 has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
Kakadu has joined #ocaml
beckerb has quit [Ping timeout: 245 seconds]
<adrien> noooooooooooo
<adrien> Damien Doligez has commited reformatting changes
<adrien> I'm sure he has broken all patches :P
cago has left #ocaml []
ollehar has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
z_- has joined #ocaml
ollehar has joined #ocaml
Cyanure has joined #ocaml
Fullma has joined #ocaml
awm22 has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 245 seconds]
ttamttam has joined #ocaml
Yoric has joined #ocaml
<z_-> I have a list [a;b;c;d;e] and i want to transform it so each element becomes a couple with an other list : [a,[1;2;3];b,[1;2;3;];etc
<thelema_> z_-: List.map (fun x -> x, [1;2;3]) [a;b;c;d;e]
<z_-> Oh that's it ?
<thelema_> does [1;2;3] change?
<z_-> Yeah its actually 2 lists where list B becomes the 2nd part of the element
<z_-> of List A.
<thelema_> pretty easy, then.
<z_-> Seems like it, didn't see it that way -_-
<thelema_> let a = [a;b;c;d;e] in let b = [1;2;3] in List.map (fun x -> x,b) a
<z_-> Ah damn, i could have had it without asking -_-
<z_-> Thanks a lot
<thelema_> n/p
paddymahoney has joined #ocaml
Fullma has quit [Ping timeout: 260 seconds]
Fullma has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
ottbot has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
ttamttam has left #ocaml []
milosn_ has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
milosn has quit [Ping timeout: 248 seconds]
<Kakadu> guys, can opam pull package's sources from bazaar?
ontologiae has quit [Ping timeout: 264 seconds]
tac has joined #ocaml
<mcstar> "The URL can also contain a single git or darcs field instead of archive, which points to GIT or DARCS repository URL."
<Kakadu> okay....
<orbitz> Kakadu: at thispoint: I doubt it
ollehar has joined #ocaml
<travisbrady> avsm: I'm using https://github.com/avsm/ocaml-cohttp/blob/master/lib_test/test_net_async_server.ml as a base for a JSON api for a Postgres database and I have a question. Do things the callback calls need to return a Deferred.t?
ollehar has quit [Ping timeout: 255 seconds]
mcclurmc has joined #ocaml
<thomasga> Kakadu: no support for bazaar
<thomasga> but contributions are welcome :-)
<Kakadu> thomasga: can u point related source files?
<thomasga> opamGit.ml and opamDarcs.ml are very similar
<thomasga> I guess if you start writing an opamBazaar.ml trying to functorize few bits could be a good idea
<thomasga> (but I don't know how bazaar works, so that's maybe a very bad idea)
<Kakadu> I hope I'll try tomorrow
yacks has quit [Ping timeout: 248 seconds]
<avsm> travisbrady: yallop is busy refactoring the async/lwt interface before a 1.0 cohttp, as it's a bit of a mess right now
<avsm> travisbrady: so…not sure, but hoping to get a new release out by end of week with the interface-breaking changes
<travisbrady> avsm: ok. By the way, is there any reason to prefer async over let? I started there because I already use Core, but I can use either.
<travisbrady> s/let/lwt
<avsm> i generally prefer Async now, due to its stricter 'dont switch between bind points', the Monitor error checking, and Pipes vs Lwt_stream
<avsm> the latter is the most important. it's really hard to use Lwt_stream safely, but Pipes are very explicit
<avsm> but Lwt has many awesome aspects to it that Async doesnt yet have; more embeddable for a start. They're converging now, though, thanks to diml
<smondet> avsm: are there news on a potential Async-SSL binding?
<avsm> i'm doing some via stunnel
<avsm> and we're hopefully going to start on some pure OCaml ones in April, but I wouldn't hold my breath for those… more of a long-term project to get that stable, I suspect (but important!)
<orbitz> Async ftw !
<orbitz> I have been pretty happy with Async, I have only done a small project in Lwt though
so_ has joined #ocaml
pippijn_ is now known as pippijn
_andre has quit [Quit: leaving]
emmanuelux has joined #ocaml
z_- has quit [Quit: Page closed]
weie_ has quit [Quit: Leaving...]
ottbot has joined #ocaml
<orbitz> Swell, I can do almost complete get's!
smondet has quit [Ping timeout: 245 seconds]
mye_ has joined #ocaml
mye has quit [Ping timeout: 260 seconds]
mye_ is now known as mye
Snark has quit [Quit: Quitte]
Kakadu has quit []
adrien has quit [Ping timeout: 245 seconds]
adrien has joined #ocaml
ottbot has quit [Ping timeout: 260 seconds]
adotbrown has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Cyanure has quit [Remote host closed the connection]
osa1 has quit [Ping timeout: 240 seconds]
adotbrown has quit [Ping timeout: 255 seconds]
mcstar is now known as public`
public` is now known as mcstar
ottbot has joined #ocaml
thomasga has quit [Quit: Leaving.]
adotbrown has joined #ocaml
anderse has quit [Quit: anderse]
mye has left #ocaml []
awm22 has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.2]
tac has quit [Ping timeout: 245 seconds]
Yoric has quit [Ping timeout: 256 seconds]
brianmwaters has joined #ocaml
tane has quit [Quit: Verlassend]