<mutew>
Is there a quick way to reset the ocaml toplevel when running it in the shell?
Drk-Sd has quit [Quit: {'EXIT', Drk-Sd, "bye"}]
mutew has quit [Ping timeout: 276 seconds]
joewilliams_away is now known as joewilliams
ski_ has quit [Quit: Lost terminal]
tmaedaZ is now known as tmaeda
Associat0r has quit [Quit: Associat0r]
pad has joined #ocaml
mutew has joined #ocaml
Mr_Awesome has joined #ocaml
djanderson has joined #ocaml
derdon has quit [Quit: derdon]
elehack has joined #ocaml
bzzbzz has joined #ocaml
yakischloba has quit [Quit: Leaving.]
thrasibule has joined #ocaml
Yoric has quit [Quit: Yoric]
joewilliams is now known as joewilliams_away
bzzbzz has quit [Quit: leaving]
<travisbrady>
is there an ocaml library for date and time calculations? I've found the Jane Street one but I'm already using batteries and would prefer something in the stdlib
<Camarade_Tux>
then, maybe gtksourceview in lablgtk too
<derdon>
yes, I want to combine it with lablgtk
<thelema>
I wrote the syntax highlighting for gtksourceview
<thelema>
for ocaml - it should be pretty good.
<derdon>
wow, amazing!
<thelema>
There's some decisions about matching taht were made by the main developers, so it's not as rainbow as some might like it, but it should be correct + complete.
<thelema>
let me know if it's not. (or fix it yourself, of course)
<derdon>
ok, gtksourceview is what I was looking for
pimmhogeling has joined #ocaml
<derdon>
thanks a lot mates!
<thelema>
you're welcome. enjoy
<derdon>
not yet, homework :(
<derdon>
15 pages about the new passport in Germany
yakischloba has joined #ocaml
f[x] has quit [Ping timeout: 248 seconds]
slash_ has joined #ocaml
yziquel has joined #ocaml
<yziquel>
hi. why is mlsize_t not simply size_t?
<yziquel>
does it happen that one is unsigned long int while the other is unsigned int?
<thelema>
pass in a list of lists, with each list indicating what terms to 'or' together, negative numbers indicating the complement of a term, positive numbers indicating a term.
<thelema>
This code assumes batteries, btw.
Drk-Sd has joined #ocaml
<bouzukist>
:(
<thelema>
oc is the output channel to write the data to. let print_to_file clauses = File.with_file_out ~mode:[`create|`trunc] "dimacs.cnf" print_cnf clauses
<thelema>
This will wrap print_cnf to print to the file "dimacs.cnf"
<bouzukist>
where i put my file sudomu.ml .
<bouzukist>
? in the comande
<thelema>
Add the given code to your project and call it to write a dimacs.cnf file
<bouzukist>
yes . but where is the file ocaml parameter in the command
<thelema>
bouzukist: the 'oc' parameter should be the output channel to the file you want to write to.
<olegfink>
bouzukist: what exactly are you trying to do?
<thelema>
the wrapper [print_to_file] takes care of that part.
<bouzukist>
olegfink: making .cnf file from .ml
<thelema>
I think he wants to programmatically generate CNF files per the URL above
<bouzukist>
thelema i will re'explain the probleme maybé i talk not corectly
<thelema>
go ahead.
<bouzukist>
i have Ocaml programe sudoku.ml (caré_magic.ml too)
<bouzukist>
i'm usine Ocaml Interpret
<bouzukist>
im not compiling i juste loadind the sudoku.ml into ocaml (file>open)
mutew has joined #ocaml
<bouzukist>
so my programe is loaded in ocaml (no file created in hard disk) so i can do some teste with using the function sudoku(...);;
<bouzukist>
So from the source file .ml i want to make .cnf file (.)
<bouzukist>
:) The end
<Alpounet>
you want to transform your OCaml code (of the .ml file) to .cnf for the SAT-solver ?
<bouzukist>
§YES
<bouzukist>
correct
<thelema>
bouzukist: can you pastebin your sudoku.ml?
<bouzukist>
the file its on my university seession not at home
<bouzukist>
sorry i can
<bouzukist>
but we can consider a XXXX.ml file
<bouzukist>
i just to know using the tools to make me .cnf file
<thelema>
any example file you want to convert will help us understand.
<bouzukist>
consider the function x,y->x&y;;
<bouzukist>
i want the cnf of (its easy this i can do it manualy)
mutew has quit [Quit: leaving]
<bouzukist>
there is'nt any manual to .ml or to java or to C to make .cnf file ?
<bouzukist>
maybe ill understand more alone
<thelema>
the cnf format doesn't describe programming languages (except in very esoteric ways)
<thelema>
In general you can't turn a .ml file into a .cnf file.
<bouzukist>
ok
<thelema>
s/programming languages/programs/
<bouzukist>
with java and c there is possibility to turn to .cnf ?
<thelema>
no
<bouzukist>
ok
<thelema>
what output would you want for the program "print 14 / 7"
<thelema>
there's no way to represent this program as .cnf
<bouzukist>
the cnf is boolean variable
<bouzukist>
so .cnf is coding manualy?
<thelema>
.cnf is conjunctive normal form - it's possible to describe turing machine computations with it if you're insane, but it's not useful for programming.
<bouzukist>
hmm
<bouzukist>
anyway thank you
<thelema>
good luck in whatever you're doing
<bouzukist>
:)
bouzukist has left #ocaml []
pad has joined #ocaml
bouzukist has joined #ocaml
yziquel has quit [Ping timeout: 248 seconds]
bouzukist has left #ocaml []
<flux>
thelema, I think that most of the things that are said to be 'leaky abstractions' infact are not. for example some say that sockets are a leaky abstraction because there are things like abrupt disconnections and latency issues. (I think they are part of the package, abstraction, even if the coder doesn't think of them always.)
Snark has quit [Quit: Ex-Chat]
derdon has quit [Quit: derdon]
Drk-Sd has quit [Quit: aw]
jcaose has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
mutew has joined #ocaml
<thelema>
treating sockets as files for IO is an abstraction, and sockets aren't really files and behave differently
pimmhogeling has quit [Ping timeout: 245 seconds]
<orbitz>
what if you think of files as sockets?
<thelema>
the abstraction doesn't go that way
_unK has joined #ocaml
<orbitz>
why not?
<thelema>
sockets are more complex than files
<orbitz>
So? You can consider thsoe other operatiosn NOOP's with files
<thelema>
But with files, you can seek, which you can't do with sockets
<thelema>
neither is a subset of the other
<orbitz>
fair
mutew has quit [Ping timeout: 265 seconds]
Yoric has quit [Quit: Yoric]
yziquel has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
Yoric has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
yziquel has quit [Quit: Page closed]
Yoric has quit [Quit: Yoric]
pad has quit [Read error: Connection reset by peer]