ita has quit [Read error: 104 (Connection reset by peer)]
hsuh has quit ["rcirc on GNU Emacs 23.0.60.1"]
mwc has joined #ocaml
hsuh has joined #ocaml
psnively has joined #ocaml
yminsky has joined #ocaml
hsuh has quit ["adoro emacs"]
psnively has quit []
buluca has quit [No route to host]
<thermoplyae>
are the routines in the Marshal module supposed to work across versions of ocaml?
<thermoplyae>
i imagine the answer to be no, which is disappointing, but
<thermoplyae>
fwiw, i'm just marshalling a list of records of ints, nothing terribly complicated by my standards
seafood_ has joined #ocaml
<yminsky>
The answer is basically yes.
<yminsky>
The marshal format hasn't changed in years, and various members of the core team (Jacques Garrigue in paritcular) have indicated on the list that they wouldn't expect the format to change without lots of warning.
<yminsky>
I think they've even avoided making changes to module like Hashtbl in order to prevent breaks to the marshal format.
<thermoplyae>
that's good news
middayc has quit []
Associat0r has quit []
cygnus_ has joined #ocaml
<cygnus_>
hi what is $ in ocaml?
<mwc>
From what I remember reading, marshall was supposed to be used only between "identical" copies of the program
<mwc>
ie: the same build using the same compiler
<mwc>
I've used it for pumping data around an MPI cluster, but I wouldn't use it for a long-term filesystem
<mwc>
*file format
<flux>
isn't that required only when you want to marshal functions?
<mwc>
flux, possibly, maybe they were speaking in the most general sense
<flux>
I don't think marshal format is the same for 32- and 64-bit architectures, though, so that can be a problem
<flux>
I wouldn't use it for long term storage either
<mwc>
if I had to design a file format today, I'd probably look to use something like SQLite
<mwc>
the ACID gives you a lot of fancy stuff for free
<mwc>
start a transaction when you load a file, commit it when you save
<flux>
Vesa Karvonen has written a Generic library for sml, I think that library would be nice to have ported to Ocaml; AFAIU it does type-safe picking and unpickling too
<flux>
but there are other options too, such as sexplib
<flux>
(btw, is sexplib available for 3.10.x?)
<mwc>
hmm, last version is 2007-10-11
<mwc>
5 months after 3.10
<mwc>
so I'd think it would be
<flux>
yeah, now that I think again I think an upgrade became available some time ago.. so perhaps I too would be able to make the switch :).
<mwc>
I've just come back to ocaml
<flux>
from?
<thermoplyae>
i'm just using Marshal to store some state data in between runs of a program
<mwc>
not been doing much programming my first semester as a masters student
<thermoplyae>
and the Marshal documentation claims that the format is compatible across all builds of ocaml with the same version number
<mwc>
have a numerical PDE course I'm looking forward to using ocaml fo
<mwc>
though I should probably go practice by bigarray foo
<mwc>
last project I did in Ocaml was a simulated annealing and simulation project for a weekend modelling competition
<mwc>
Had it running on the PC in 1.5 days, and then with 50 lines of code and OcamlMPI, had it running on the aforementioned MPI cluster
<flux>
not too bad.
<mwc>
indeed. Ocaml is why our team placed 7th internationally
<mwc>
I'd used C++ the year prior, and we didn't finish
<mwc>
s/placed/tied for/
mwc has quit ["Leaving"]
thermoplyae has quit ["daddy's in space"]
buluca has joined #ocaml
Reichel has joined #ocaml
Reichel has quit []
orbitz has quit [Read error: 104 (Connection reset by peer)]
ttamttam has joined #ocaml
olleolleolle has joined #ocaml
middayc has joined #ocaml
filp has joined #ocaml
olleolleolle has quit []
olleolleolle has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
mrsolo has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
seafood_ has quit []
Yoric[DT] has quit ["Ex-Chat"]
olleolleolle has quit []
hkBst has joined #ocaml
Yoric[DT] has joined #ocaml
Yoric_ has joined #ocaml
Tetsuo has joined #ocaml
Yoric[DT] has quit [Read error: 113 (No route to host)]
averma has joined #ocaml
Associat0r has joined #ocaml
averma has left #ocaml []
Demitar has quit [Read error: 110 (Connection timed out)]
<kirkt>
its F#, supposed to be pretty compatible with ocaml
<Yoric[DT]>
Different syntax for parametric polymorphism.
<Yoric[DT]>
You actually don't need the match here
<Yoric[DT]>
You're only doing an "if s=e then ... else...", aren't you ?
<kirkt>
well its a newtonlagrange interpolation, first time i see this fold2 method, which i guessed would suite Horner multiplication and im surprised it worked
<kirkt>
Yoric[DT]: yes. i guessed pattern matching would be like prolog's, which suits recursion. so you're saying ocaml usually uses pattern matching as a switch statement ?
<Yoric[DT]>
No, it suits recursion.
<Yoric[DT]>
It's just a bit overkill in that case :)
<kirkt>
what about the usage or not usage of parens
<kirkt>
for functions?
<kirkt>
im having a hard time looking at functions with no commas between arguments
<kirkt>
((divdif (s+1) e) - (divdif s (e-1)) ) ---> (divdif s+1 e - divdif s e-1)
seafood_ has quit []
<Yoric[DT]>
divdif ( s + 1 ) e - ( divdif s (e - 1) )
Yoric[DT] has quit ["Ex-Chat"]
<kirkt>
yes i just understand this brings alot of additional work for the programmer
RobertFischer has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
buluca has quit [Read error: 113 (No route to host)]
asmanur has joined #ocaml
<RobertFischer>
Anyone here looking for an ocaml subcontractor? I'm rolling off a gig and onto another one...
<flux>
robertfischer, which country?
<RobertFischer>
I'm based out of the US, but willing to relocate anywhere for 3~6 mos and travel up to 25%. I've got previous work experience in Cologne/Koeln, Germany.
dramsay has left #ocaml []
dramsay has joined #ocaml
* RobertFischer
needs a keyboard with umlauts.
olleolleolle has quit []
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
leo037 has joined #ocaml
filp has quit ["Bye"]
RobertFischer has left #ocaml []
middayc has joined #ocaml
bluestorm has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi again
ttamttam has left #ocaml []
<middayc>
( hi )
<Yoric[DT]>
^^
<Yoric[DT]>
Unbound identifier.
<middayc>
you confused me for a moment :D .. I was looking how did I get ^^
<Yoric[DT]>
:)
<Yoric[DT]>
My OCaml tutorial is reaching the 25 pages...
<middayc>
wow .. who is it made for (newbies at programming, imperativos :) )?
<Yoric[DT]>
I tried to target it towards imperativos, but it's leaning towards mathematicians for the moment.
<bluestorm>
hm
<middayc>
:) cool , will you publisg it on net someday?
<Yoric[DT]>
It's on the net, in French.
<Yoric[DT]>
But there's only the first chapter so far.
<Yoric[DT]>
Well, the introduction and 3/4 of the first chapter.
<Yoric[DT]>
I'm currently explaining why the type of functions with several arguments looks like a -> b -> c and not (a,b) -> c .
Demitar has joined #ocaml
<mbishop>
I always did wonder about that heh
<Yoric[DT]>
Well, I'm trying to find a convincing explanation.
<middayc>
aha , french. I don't know french besides aurevoir
<Yoric[DT]>
I mean, mathematically, a * b -> c looks more evident.
<Yoric[DT]>
Well, I'll try and translate it at a later stage.
<Yoric[DT]>
But I need to write it down first :)
<middayc>
because of currying isn't it?
<Yoric[DT]>
I'm not sure currying is the cause.
<Yoric[DT]>
I mean, currying is a very nice application of that property.
<Yoric[DT]>
But I can
<Yoric[DT]>
But I can't manage to explain a -> b -> c "because of" currying.
<middayc>
:) yes you can't ... I imagined it's because of that but have no real knowledge on that
<middayc>
that simon peyton was explaining this a little on that video in haskell but I didn't listen too good .. or he didn't really explain
<zmdkrbou>
boarf, a function of several arguments is just a function which takes a single argument and returns another function, what are you trying to explain besides this ?
<bluestorm>
Yoric[DT]: i'd take a -> b -> c look as granted
<bluestorm>
you know, only a syntaxic thing
<Yoric[DT]>
That's a possibility.
<zmdkrbou>
it's just a property of the lambda calculus which has nice consequences
<bluestorm>
and then later, explain "partial application", and thus come back to the main reason
netx has quit [Remote closed the connection]
nashdj has quit [Read error: 110 (Connection timed out)]
thermoplyae has joined #ocaml
<middayc>
it's funny how in FP there is so much of talk about mathematics... before at python php c++.. (mainly web-dev) I never thought much abouth math while programming .. you work more with strings or use some "apis" (like DOM, myslq, sax..) to work on some data structures
<middayc>
ok this is web-dev .. which is not algoritmica .. if I make games in any lang .. math is greatly in focus
<middayc>
algoritmica = algoritmical
RobertFischer has joined #ocaml
ita has joined #ocaml
RobertFischer has left #ocaml []
Morphous has joined #ocaml
kelaouchi has joined #ocaml
buluca has joined #ocaml
buluca has quit [Remote closed the connection]
kelaouch1 has quit [Read error: 110 (Connection timed out)]
Morphous_ has quit [Read error: 110 (Connection timed out)]
olleolleolle has joined #ocaml
love-pingoo has joined #ocaml
ecc has joined #ocaml
ygrek has joined #ocaml
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
netx has joined #ocaml
olleolleolle has quit []
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
buluca has joined #ocaml
thermoplyae has quit ["daddy's in space"]
bluestorm has quit [Remote closed the connection]
asmanur has quit [Remote closed the connection]
middayc has quit [Read error: 104 (Connection reset by peer)]
buluca has quit [Read error: 113 (No route to host)]
middayc has joined #ocaml
olleolleolle has joined #ocaml
olleolleolle has quit []
marmottine has joined #ocaml
<Yoric[DT]>
I'm forgetting something about a mathematical notation.
<Yoric[DT]>
The set of functions from A to B.
<Yoric[DT]>
Is that A^B or B^A ?
<Yoric[DT]>
B^A
<love-pingoo>
A^2 is pairs of elements of A, i.e. functions from 2=bool to A, so A^B is functions from B to A, right ?
<Yoric[DT]>
yep
rwmjones has quit ["Closed connection"]
love-pingoo has quit ["Connection reset by pear"]
Snrrrub has joined #ocaml
<Snrrrub>
Is there a way I can enforce constraints on a type at instantiation time? I'm building a rectangle type - {x:int; y:int; width:int; height:int } - but I want width and height to be positive while still allowing access to its properties
ygrek has quit [Remote closed the connection]
<Snrrrub>
I know that I could call a function that returns a rectangle with the constraints enforced but I'd have to be disciplined to call that function every time I need a rectangle instead of just creating my own, right?
dramsay has quit ["Leaving"]
marmottine has quit ["Quitte"]
<Yoric[DT]>
Snrrrub: for this kind of thing, you tend to hide stuff in a module.
<pango_>
Snrrrub: check private types
<pango_>
I know that for sum types at least, you can declare them private to a module. You're free to use/deconstruct values of that type anywhere, but can only create new values of that type from within that module
<Snrrrub>
Yoric[DT], but then other functions wouldn't be able to access the properties of the rectangle if the type is exposed from the module as opaque. Would the standard approach be to create a module, make the rectangle opaque, and provide functions to manipulate the type?
<Yoric[DT]>
yep
<Yoric[DT]>
pango_: is that in OCaml 3.10 ?
<Yoric[DT]>
I thought that was for 3.11 ?
<Yoric[DT]>
Oh, it's actually 3.09 or such.
* Yoric[DT]
wonders what they're adding in 3.11 that looks like private types.