<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?
<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
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".
<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."
<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]