<segphault>
I changed "e1 = expr" to LIDENT and it still didnt work. It just occured to me that I need to change $e1$ to $lid:e1$ to make it consistent
<segphault>
spiffy. that works. =} thanks! LIDENT is indeed the correct type there.
<vincenz>
woo :)
<vincenz>
it's lid:
<vincenz>
not str:
* vincenz
made
<vincenz>
{x : expr} becmoe
<vincenz>
(fun x -> expr)
<vincenz>
could you explain me the difference between $e1$ and $lid:e1$?
<segphault>
yeah, by default camlp4 assumes that an anti-quotation without a specified type is an expression. $e1$ is a default anti-quotation. $lid:e1$ is an anti-quotation with the explicit type LIDENT.
<vincenz>
thxn :)
<vincenz>
How do you know which LEVEL to work at?
<segphault>
the LEVELs are particular grammer rules, I think. I've only ever used simple and expr
<segphault>
supposedly, you can do some neat associativity tricks if you use levels like LEFTA and RIGHTA.
* vincenz
made { expr} become
<vincenz>
Thread.create (fun () -> expr) ()
<vincenz>
:)
<segphault>
hehehe
<vincenz>
easy way to spawwn things
* vincenz
got the idea from jocaml
<segphault>
I just put together a quick one that lets me do python-like list comprehensions like: { x * 2 for x in [1;2;3] }
<malte>
that's really nice
<segphault>
thx. =}
<segphault>
I'm going to try to add support for 'if'
<vincenz>
segphault: you're not much of a marketing guy, are you?
<TheDracle>
Yeah, I really want to look at making functional languages.
<vincenz>
TheDracle: revive jocam
<vincenz>
jocaml
<TheDracle>
I have a nice compiler book with a section on functional languages.
<vincenz>
TheDracle: appel?
<TheDracle>
Ugh. Jocaml..
<vincenz>
TheDracle: WHAT? It's great, completely mobile code
<segphault>
whats jocaml? Is it like an ocaml to java bytecode kind of thing?
<vincenz>
I ran accross it yesterday
<TheDracle>
Lol, I know, I just don't know crap about join calculus or any of that.
<vincenz>
segphault: no syntax and byterun extensions for easy distributed/concurrent/mobile code
<TheDracle>
segphault: Thankfully not :)
<vincenz>
TheDracle: no need to
<segphault>
lol
<vincenz>
imagine writing somtehing like
<vincenz>
let loc {}
<vincenz>
compiling it
<vincenz>
running it
<vincenz>
and then on another computer writing something like
<vincenz>
code code
<vincenz>
go loc
<vincenz>
and having the code run on the first machine
<TheDracle>
Yeah.
<vincenz>
transparently
<TheDracle>
It's pretty nifty, I know :0
<segphault>
ruby has something like that built-in too, I think
<TheDracle>
Really?
<vincenz>
not only that, if the moved code calls functions it knows where to call thm
<TheDracle>
Ruby is awesome :)
<vincenz>
segphault: doubtedly at this level, many languages have RPC but you need to compile the code on all computers
<vincenz>
TheDracle: yes an dno
<vincenz>
I used to use ruby, great syntax but sadly .... support is limited
<vincenz>
so I switched to python
<TheDracle>
vincenz: I know, it's good for a dynamic typeless object oriented language :p
<vincenz>
TheDracle: same as python
<TheDracle>
Hm.. Python is okay :p
<vincenz>
just that certain things are first class in ruby which are not in python
<segphault>
I do a lot of python and ruby coding. I really want a good functional alternative that integrates the best syntax of both of them
<vincenz>
like you can do "aab".method
<vincenz>
segphault: what's wrong with ocaml?
<TheDracle>
segphault: You can really do a lot of similar things with Ocaml.
<segphault>
vincenz: its not dynamic.
<vincenz>
touche, though you need that for?
<malte>
lisp?
* vincenz
slaps malte with scheme
<segphault>
I cant stand lisp. not enough syntactic sugar
<vincenz>
scheme is cleaner imho
<TheDracle>
Ocaml doesn't need to be dynamic though :p
<vincenz>
and if you get drscheme you've got a GREAT lib
<vincenz>
I once coded a gui last year for ICFP
<vincenz>
never done it before
<vincenz>
in 3 hours I had a crisp gui
<vincenz>
(at 3 am)
<TheDracle>
With scheme?
<vincenz>
yeah, drscheme
<TheDracle>
O.o
<TheDracle>
Hm.
<vincenz>
they have classes for their gui
<TheDracle>
Ocaml needs a better windowing toolkit.
<vincenz>
lablgtk2
<vincenz>
I'm getting into that now
<TheDracle>
Yeah, I've used gtk.
<segphault>
my biggest complaint with ocaml is the lack of polymorphic operators, which is something that will supposedly be fixed eventually (when the gcaml guy gets off his lazy ass and gives us some code)
<vincenz>
?
<vincenz>
you mean
<vincenz>
1 + 1
<vincenz>
and 1.0 + 1.0 ?
<TheDracle>
.. I really don't care about that.
<segphault>
and [1;2;3;] + [1;2;3;]
<vincenz>
syntactic sugar
<TheDracle>
It's better to think about the difference between ints and floats and different types when you operate on them anyways.
<TheDracle>
Keeps you from making stupid mistakes.
<vincenz>
otherwise you get to the point of perl/python where you don't know if your program is going to work
<vincenz>
what TheDracle said
<vincenz>
I ha dthis python script, took 50 minute
<segphault>
I want the option of extra dynamicism
<vincenz>
then suddenly I realized that in the end part something was wrong (wrong type)
<TheDracle>
segphault: Ocaml is a pure paradigm, I wouldn't corrupt it with dynamicism :)
<vincenz>
it'd be nice if typinc was stored tho
<vincenz>
that way you could load code dynamically
<TheDracle>
If you want a dynamic language, use a dynamic language.
<vincenz>
(and possibly get an exception of typing at loadtime only)
<mrvn_>
The problem with 1. + 1. is that "let f a x = a + x" would be int -> int -> int or float -> float -> float. What should the type system choose?
<vincenz>
jocaml did that
<TheDracle>
mrvn_: Maybe restricted polymorphic that could be int or float?
<vincenz>
a la haskell?
<vincenz>
with type-classes
<pango>
mrvn_: with gcaml, the type becomes something like int -> int -> int | float -> float -> float
<mrvn_>
TheDracle: And if its exported in the mli file? Generate code for both cases? Make a variant type out of it and box ints?
<TheDracle>
mrvn_: Hm, could get expensive if it can take a large number of types.
<pango>
mrvn_: I think modules aren't supported in gcaml yet
<mrvn_>
TheDracle: exponentially.
<vincenz>
is the GC in ocaml in another thread?
<TheDracle>
mrvn_: Yeah, I see your point.
<pango>
vincenz: no
<mrvn_>
TheDracle: I think it is called on every malloc.
<vincenz>
ok
<mrvn_>
^^vincenz
<vincenz>
is there a boundcost?
<mrvn_>
boundcost?
<vincenz>
aka you know that it'll never cost you more than x operations/flop/instructions/ms
<vincenz>
they should work on that, cause then you could use ocaml for hard-real-time systems
<mrvn_>
I think there is. The GC does do its major GC cycles in little increments.
<mrvn_>
Lets rewite linux in ocaml :)
* vincenz
tried looking briefly at jocaml
<vincenz>
but sadly....ti's a full ocaml distro, it's not a set of patches
<vincenz>
so it's hard to update it to 3.08
<vincenz>
unless you know the ocaml sources inside out
<vincenz>
(it's for 1.07)
<mrvn_>
vincenz: Some time ago I was thinking of writing an ocaml variant that works without GC for low level programming.
<vincenz>
I mean it's awesome... just imagine. ... have some code, put it on many pcs that say "hey I'm a worker"...then whenever you watn to do some heavy computation, just move the coe to those workers
<vincenz>
mrvn_: how would you accomplish that?
<mrvn_>
Basically a mixture of ocamls type strictness and Cs lowlevel access.
* vincenz
imagines silently distributing the worker-code to all pcs at his company *evil grin*
<mrvn_>
One thing you imediatly see is that a function can't return an object ever. That would require a malloc and return the pointer. So instead the caller cas to allocate space for the object and pass it as argument.
<vincenz>
mrvn_: how would that ever work with closures?
<mrvn_>
A closure is fixed sizes. The caller mallocs it on the stack and passes it into the function.
<vincenz>
so what if you do
<mrvn_>
More intresting is how does it work with lists?
<vincenz>
closures can't be placed on the stack
<mrvn_>
vincenz: Why not?
<vincenz>
besides, if you can malloc on the st ack, you can also malloc on the heap, same thing
<vincenz>
mrvn_: let a base function call a function that returns a function (with some parameter saved in it's closure) twice
<mrvn_>
It's not realy the malloc thats bad, it's the lifetime of the objects. Malloced on the stack every object dies when the function returns.
<vincenz>
no, but it seriously limits closure-usage
<vincenz>
anyawys, I'm out of my depth, I'm an ee, not a cs :/
<mrvn_>
It limits a lot.
<mrvn_>
What I was lloking at was if I can make it not limit so much as to be useless.
<vincenz>
mrvn_: what's your background?
<mrvn_>
hmm, student. :)
<mrvn_>
By now I did everything but databases and webdesign.
<vincenz>
cs student?
<mrvn_>
yep.
* segphault
is an english major. (hence the syntax fixation)
* vincenz
sniffs sniffs
malte has quit ["Lämnar"]
<vincenz>
anyone know a GOOD book on UML?
<vincenz>
but I mean indepth, to the point, complete
<TheDracle>
That's less than a hundred bucks?
<vincenz>
why?
Smerdyakov has quit [Read error: 238 (Connection timed out)]
Smerdyakov has joined #ocaml
<TheDracle>
Hm, they're pretty expensive :p
<TheDracle>
UML books.
<TheDracle>
And the ones that aren't usually suck.
<TheDracle>
There is this set by Grady Booch I've had my eyes on.
<TheDracle>
But, alas, it's too expensive :P
<Smerdyakov>
UML? Tehe.
<TheDracle>
Uh oh, here comes the expert opinion :)
<vincenz>
tsk
<Smerdyakov>
A whole book on drawing lines between boxes simply must be a waste of money, time, and anything else.
<TheDracle>
Nah, there are programs like together.
<segphault>
supposedly, its about development idioms
<TheDracle>
You design your program layout, and it generates the interior for you.
<Smerdyakov>
Gosh, too bad you're working in a programming language that's awkward enough that such an approach saves you time!
<TheDracle>
Software Designers often look over entire teams of software engineers, and use these tools to produce a program's layout :p
<TheDracle>
It saves time in Ocaml as well :)
<Smerdyakov>
Nuh uh! Visual formats are too awkward to express the sorts of relationships you can with an ML module system.
* vincenz
goes on an amazon shopping spree
<TheDracle>
Even if it doesn't help with Ocaml, are you ever going to have to design a database?
<segphault>
I would rather build a DML to generate code, personally
<vincenz>
Smerdyakov: well the fact of the matter is that for most big systems (note how I say MOST not ALL) people use languages like C++/Java, and for most big systems you need design for which UML was intended
<Smerdyakov>
vincenz, I don't believe you.
<TheDracle>
Smerdyakov: We're not talking about small programs here, these are gigantic programs. UML isn't just a bunch of hoodoo :)
<Smerdyakov>
Systems in C++/Java need to be larger than functionally equivalent ML systems.
<Smerdyakov>
So perhaps the fact that you find UML useful is just a hint that you're using poor languages.
* vincenz
uses ocaml
<TheDracle>
I think it's well known that purely functional designs aren't practical for a great deal of things.
* vincenz
uses ocaml to analyze programs written in c++ to be more exact
<Smerdyakov>
Who said "purely functional"? I was talking about ML.
<TheDracle>
And, by their very nature slower.
<vincenz>
Smerdyakov: imho I think your view is limited
<vincenz>
it's a given fact that most large systems (especially in the multimedia/wireless embedded world) are written in c and c++
<TheDracle>
Smerdyakov: Alright, so, if you're using imperitive features of ML, they're not very much different at all from those in C/C++/Java/C#.
<Smerdyakov>
vincenz, so..?
<vincenz>
so you need uml for those
<Smerdyakov>
TheDracle, ridiculous.
<TheDracle>
And, neither are modules.
* vincenz
considers
<vincenz>
125 pounds of books at amazon
<Smerdyakov>
TheDracle, there are many ML features that together create a very different development approach.
* mrvn_
wonders how a book about user mode linux will help you programm better?
<vincenz>
ok
<vincenz>
here is my booklist
<mrvn_>
Or how 3D designs in unified modelling language would help?
<vincenz>
you may comment on the good/badness of them
<mrvn_>
oh wait, 3d was vrml.
<vincenz>
"The formal Semantics of Programming Languages: An Introduction" Glynn Winskell
<TheDracle>
Heh.
<vincenz>
Types and Programming Languages by Benjamin C. Pierce
<Smerdyakov>
vincenz, are you going to flood the channel with a million book titles??
<vincenz>
Communicating and Mobile Systems by Robin Milner
<vincenz>
Smerdyakov: it's just 4
<vincenz>
Concepts, Techniques, and Models of Computer Programming by Peter Van Roy
<vincenz>
any comments?
<Smerdyakov>
vincenz, don't you have access to these books in a library?
* vincenz
likes to own his own copies
<Smerdyakov>
vincenz, why?
<vincenz>
personal prefernce?
<Smerdyakov>
I don't accept that as a valid reason.
<vincenz>
I do
<vincenz>
anyways, any of these books that are good/bad?
<TheDracle>
Because you can use them in the restroom without feeling like a dick ;)
<segphault>
if you check a book out of the library, its hard to reference it at 2 am three years later. ;-)
<Smerdyakov>
OK, but that doesn't mean that it's not in my best interests to attempt to stop you from owning your own copies, if you can't provide better reasons.
<vincenz>
I was merely asking as to your opinions on the books, not me purchasing them
<Smerdyakov>
And I provided Extra Bonus Opinions.
<Smerdyakov>
See, if you check them out of the library, there's no need to worry about if they're any good.
<Smerdyakov>
If they're not, you can return them right away.
<segphault>
or you can leave them in the darkness under your bed until the library sends goons to your house to break your knee-caps.
<segphault>
always entertaining.
<vincenz>
no cause it implies me taking the time to read them, another investment, so I'd still have to ask for an opinion
<Smerdyakov>
No, because all you need (generally) is to read the first small chunk of pages to know if they're worthwhile.
<vincenz>
if you're into the field, yes
<vincenz>
not if you're new to it
<vincenz>
otherwise books like "C++ in 24 hours "would never sell
<segphault>
vincenz: read the reviews of the books at amazon. thats a good way to find out what people think of them
<vincenz>
segphault: usually feedback from irc is quite good
<vincenz>
:)
<TheDracle>
Most people don't absorb all of the information in a book in its entirety.
<vincenz>
especially when review are lacking
<TheDracle>
When 'I' find a good book, I usually like to have it on a shelf for future reference-- in case I remember something useful was in it and I'd like to refresh my mind of it.
<vincenz>
TheDracle: likewise
<segphault>
same here
<TheDracle>
And, I also take an exceptionally long time to read a book in its entirety.
<TheDracle>
I often move from one book to another.
<TheDracle>
Especially technical books, it's hard to focus on one single topic at a time.
<vincenz>
mrvn_: seeing you're a CS major, any comments by any chance?
<vincenz>
TheDracle: especially if you also have work to do
<segphault>
recently i've been trying to force myself to stick with computer books I can download for free, because I already spend way too much money on literature.
<TheDracle>
Smedy: The actual application of programming to a wide variety of things requires you keep your mind open to new things and new techniques.
<Smerdyakov>
segphault, another one without an understanding of libraries!
<TheDracle>
Frankly, I simply couldn't solve a wide variety of what you'd refer to as "niche" programming tasks purely with Ocaml.
<Smerdyakov>
TheDracle, I'm under no obligation to "keep my mind open" for discredited techniques.
<vincenz>
but seriously, Smerdyakov have you by any chance read any of these books?
<TheDracle>
Smerdyakov: They're far from discredited.
<segphault>
Smerdyakov: my local public library is awful. not a single text by sartre, kant, or wittengenstein. ={
<Smerdyakov>
vincenz, yes. Winskel is pretty good. That's all I have experience with.
<vincenz>
thnx
<Smerdyakov>
TheDracle, the community I belong to considers C++ discredited.
<TheDracle>
Smerdyakov: I highly doubt you apply your knowledge very often in anything other than a purely academic fashion if that is your perspective.
<Smerdyakov>
segphault, I thought we were talking about computer books!
<vincenz>
Smerdyakov: any other suggestions in this field?
<segphault>
Smerdyakov: my library has books about excel and c++, thats really the extent of it
<vincenz>
segphault: get the excel one!!!!
<Smerdyakov>
vincenz, nope. I've never really learned from textbooks in this area.
<Smerdyakov>
segphault, where are you?
<vincenz>
where from then?
<TheDracle>
C++ in its entirety isn't discredited. Keep in mind it is a culmination of a bunch of differing programming paradigms.
<segphault>
Smerdyakov: a place called oak park, in the boondocks of southern california
<Smerdyakov>
vincenz, notes by professors, and their lectures.
cmeme has quit [No route to host]
<vincenz>
TheDracle: add to that that c++ had to keep backward compatibility to c
<segphault>
c++ is an anachronism.
<Smerdyakov>
vincenz, you can try Bob Harper's notes online on PL semantics.
<vincenz>
alright, thank you
<Smerdyakov>
segphault, you should move.
<segphault>
Smerdyakov: I would love to. unfortunately, I cant afford to.
<Smerdyakov>
segphault, nothing is more important in choosing a home than proximity of a decent library.
<segphault>
I totally agree
<TheDracle>
I think Smerdy has replaced the general religious section of his brain with belief in ML-- he's a ML thumper :)
<Smerdyakov>
segphault, why can't you "afford" to move?
cmeme has joined #ocaml
<segphault>
Smerdyakov: the meager $10 an hour I make isnt enough, and no, getting a better job isnt an option, I havent finished college yet.
<Smerdyakov>
There are such things as college scholarships.
<segphault>
Smerdyakov: my parents are paying for my college, thats not the issue
<Smerdyakov>
OK, so you live with your parents.
<segphault>
Smerdyakov: correct
<TheDracle>
segphault: Why not get another job? Why not change your name to "Patrick"?! I want a fully rational explanation!!
<segphault>
LOL
<TheDracle>
Just leave the guy alone, why do you care what he does with his life?
<Smerdyakov>
I made $20/hr in software dev in high school, though.
<segphault>
I'm lucky to have the job that I've got. there arent a lot of business opportunities around here.
<TheDracle>
Smerdyakov: Some people may prefer things differently than you do.. Some people like different types of food even! They don't have to give a rational explanation for personal preferences.. They generally haven't any.
<segphault>
I was working at starbucks before this, for $7 an hour.
<Smerdyakov>
TheDracle, thank you for reminding us of the America Way, otherwise known as the Look the Other Way.
<TheDracle>
Smerdyakov: That's not the American way, that's the human way. Why do people prefer chocolate ice cream over vanilla?
<TheDracle>
It's just stupid to require a rational explanation for every single personal preference.
<Smerdyakov>
segphault, I'm guessing you're not at a major research university, since you could probably get a research assistant job there.
<vincenz>
damn
<vincenz>
I just realized I can't order them now
<vincenz>
I'll be in madrid next week :/
<segphault>
Smerdyakov: unfortunately, i'm at a junior college, with absolutely no resources.
GreyLensman has joined #ocaml
malc_ has joined #ocaml
<vincenz>
g;night
<Smerdyakov>
I'm going to continue talking with segphault in private messages, since this conversation is probably starting to annoy some people. :>
<Nutssh>
Research assistanceships assume that they have money to pay you.
<Nutssh>
Smerdyakov, you used common lisp much?
<Smerdyakov>
No
* Nutssh
is thinking of migrating from ml back to common lisp.
<Smerdyakov>
What have you used ML for?
<Nutssh>
Some AST manipulation with CIL, analyzing a hundred million network RTT times, probabilistic analysis of social networks.
<Smerdyakov>
And what did you find lacking, in particular?
<Smerdyakov>
(There ain't nothing as cool as CIL for CL, you know. :-D)
<Nutssh>
Verbosity in places where the right couple of macros would have helped.
<Nutssh>
:) I wish CMUCL had the sort of bidirectional FFI that ocaml has.
<Smerdyakov>
Examples?
<Nutssh>
I'd probably get about twice the performance on the social network analysis program.
<Nutssh>
Nothing I can describe concisely.
<Smerdyakov>
How suspect. ;)
<Nutssh>
:)
<Smerdyakov>
There is absolutely no excuse for not giving a good description of why a certain language feature is significantly useful, if you are claiming that it is.
<Nutssh>
For this one, I could convert a half-dozen higher order function calls (with boxing overhead for floats) into straightline code and double the performance.
<Nutssh>
You were asking for an example, not a description of the benefits.
<Smerdyakov>
What kind of higher-order functions are these?
<Smerdyakov>
Do they have some properties such that you would expect macros to lead to "better" code than MLton would produce?
<Nutssh>
I drop a few (trivial, usually \x \y x, or \x \y x.(y) closures into a struct which then get invoked in the inner loop. With a macro, I could have it drop the source code in. GC'ing the boxed floats is already 30% of the runtime.
<Smerdyakov>
You're talking about MLton here
<Smerdyakov>
?
<Nutssh>
I wrote it in ocaml, doing it in lisp would let me build the right idiom.
<Smerdyakov>
No, since MLton's optimizer would do all of this for you, with the existing code (translated to SML).
<Nutssh>
There's also CLOS.
* Nutssh
sighs, "I think it comes down to, I want both of em, and I can't have both."
<Smerdyakov>
OK, but don't pretend that the example you just gave is a valid reason.
<Smerdyakov>
...which still leaves you to justify why your "want" of both is rational. :-)
<Nutssh>
CLOS and macro's.
<Smerdyakov>
You've just reduced the problem to justifying why one or both of those would bring critical benefits to one of the projects you mentioned above.
<Nutssh>
Stop being such a died in the wool skeptic. Its not like I'm not professing the advantages of C++. :)
<Smerdyakov>
I'm just asking you to explain one reason. I don't see how that is extreme, in any sense.
<Nutssh>
I have explained.
<Smerdyakov>
You mean the case with the boxing overhead from floats?
<Nutssh>
The combination of what was going on in that function.
<Nutssh>
Though I appreciate the reminder of mlton.
<Smerdyakov>
And are you asserting that you think that example shows any reason to prefer CL to SML?
<Nutssh>
Yes, though I conceed that its not an earthshaking reason.
<Smerdyakov>
What is the reason?
<Nutssh>
The structure of trivial closures.
<Smerdyakov>
What does that mean as a "reason"?
<Smerdyakov>
You do understand that MLton will inline all such closure uses, right?
<Nutssh>
Never having used mlton, I cannot say. ANd if it can't, I am stuck. With macro's, this worry would not exist.
<kinners>
is it something you can't do with camlp4?
<drz>
why is this giving me an error: let foo lst = foo lst;;
<drz>
It says: Unbound value foo
<drz>
(pointing at the second foo)
<kinners>
let rec foo lst = foo lst;;
<drz>
kinners: OK, thanks.
<Smerdyakov>
Nutssh, with good inlining, none of this class of worries exists.
<drz>
kinners: Interesting that I didn't need that in the recursive function in a class, I suppose because I explicitly refer to it as class#foo
<Smerdyakov>
Nutssh, and it's likely simpler for you to write the code when you can rely on the inliner to do the down 'n' dirty work, instead of doing it yourself in custom macro definitions.
<Smerdyakov>
drz, that's a method, not a function. There is a distinction.
<drz>
smerd: IC
<Smerdyakov>
Nutssh, if you're considering moving away from ML, I think it's appropriate for you to know the basic summary of MLton, which is that it uses whole program optimization to do pretty much everything "obvious" enough that you might in CL rely on tractably sized custom macros to optimize.
<Nutssh>
Yes, once someone invents the perfect inliner. :) And 'simpler' depends. ML has less syntatic cruft than, eg, c++, but it can still have redundancy that the right macro can eliminate.
* Nutssh
leaves it up to the compiler 99% of the time, but some features, you don't need them often, but when you do, nothing else can replace them.
<Smerdyakov>
I urge you to present a concrete example.
<Smerdyakov>
You can take my word for it that I just shot down your last try at one.
<Smerdyakov>
I find this situation odd: In the past, you have complained about how OCaml is not an optimizing compiler. Yet you are using it as a benchmark in determining that you don't want to use ML because of performance reasons.
<Nutssh>
That was just something I noted. This program will probably only get 200-400 hours of CPU time in its entire life.
<Smerdyakov>
OK, then why did you bring it up to support the inadequacy of ML?
<Nutssh>
My remark was that I couldn't do different semantics, which would be a bit cleaner, and would definitely be several times faster.
<Smerdyakov>
What do you mean by "do different semantics"?
<Nutssh>
Another more recent thing was writing a database-access program in ocaml. :) That was fun. I did it in a relatively clean way, but still a fair amount of cruft.
<Nutssh>
With macro's (or metaocamlopt) I would have rearranged the code and not had a structure of closures, but one big closure.
<Nutssh>
What do you do in the ML's?
<Smerdyakov>
Why wouldn't that work with higher-order functions?
<avlondono>
Smerdyakov: Could you recommend some literature on the usage of modules and functors in software architecture? seems like my brain is switching finally and would like to read about it.
<Smerdyakov>
avlondono, I don't know anything offhand.
<Smerdyakov>
avlondono, I'd like to write a book on that some day, though. :-)
<avlondono>
hehehe, that would be nice then. in any case I'll search for it. :-)
* Smerdyakov
leaves.
<Nutssh>
Smerdyakov, What do you do in the ML's?
<Nutssh>
It could be done, with syntatic cruft, which is what I'd want the macro for --- to hide that.
<kinners>
Nutssh: he does work on proof carrying code I think
<Nutssh>
AST analysis?
* kinners
shrugs his shoulders
mlh has quit [Client Quit]
kinners has quit ["leaving"]
budjet has joined #ocaml
cmeme has quit [Broken pipe]
cmeme has joined #ocaml
budjet has quit [Remote closed the connection]
skylan has quit [Read error: 104 (Connection reset by peer)]
themus has joined #ocaml
skylan has joined #ocaml
solarwind has joined #ocaml
Submarine has joined #ocaml
nym has joined #ocaml
pango has quit ["Client exiting"]
pango has joined #ocaml
<nym>
has anyone here used GwML (the ocaml window manager)?
m3ga has joined #ocaml
mlh has joined #ocaml
async has joined #ocaml
nym has quit ["Gone..."]
async has quit [Read error: 238 (Connection timed out)]
mrsolo_ has joined #ocaml
async has joined #ocaml
mrsolo has quit [Read error: 113 (No route to host)]
vezenchio has quit ["None of you understand. I'm not locked up in here with you. YOU are locked up in here with ME!"]
m3ga has quit ["Client exiting"]
mlh has quit [Client Quit]
Submarine has quit ["using sirc version 2.211+KSIRC/1.2.4"]
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
cpapaz has joined #ocaml
<cpapaz>
can somebody help me to compile ocamlsdl on mac-OS-X ?
eugos has joined #ocaml
cpapaz has quit ["Leaving"]
Submarine has joined #ocaml
<Submarine>
What would you suggest as an algorithm to solve 2SAT-CNF?
<vincenz>
what's "2SAT-CNF"
<Submarine>
satisfiability of propositional formulas in conjunctive normal form where each disjunction has two atomic propositions
* vincenz
blinks
<vincenz>
in english?
<solarwind>
I must save that somewhere..
<Submarine>
oh, see the boolean satisfiability problem on wikipedia :-)
<solarwind>
Link?
<solarwind>
(not to wikipedia, of course)
menace has joined #ocaml
ianxek has joined #ocaml
* Submarine
coded a silly algorithm
<Submarine>
exhaustive search with pruning by propagation
<avlondono>
I did it long ago, but programming resolution isn't hard afair
<Submarine>
oh, I'm just doing resolution, sort of
<Submarine>
every time I decide a variable, I do a depth-first propagation of what this choice entails
det_ has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
dobrek has joined #ocaml
mrsolo_ has quit [Read error: 110 (Connection timed out)]
<mellum>
Submarine: funny, we gave that as a homework question last week in a course :)
<mellum>
(that is, to show that is in P only.)
<Submarine>
mellum: mind, "polynomial" won't cut the mustard in that case, I want "efficient" :-)
* Submarine
has bugged something.
<mellum>
Submarine: Well, P means it's easy. We're only concerned with hard problems :)
eugos has quit ["Leaving"]
menace has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
<Submarine>
ok, my thing works for large systems
<avlondono>
your _thing_ ?
<Submarine>
just some expensive algorithm :-)
<Submarine>
I was fine-tuning it.
<avlondono>
:-)
<Submarine>
see, when you code some exploration scheme... like you know, exhaustive search, but with some pruning, propagation of data etc...
<Submarine>
when you have the choice between several locations where to choose
<Submarine>
you can have a heuristic like "does it look it will reduce the search space much"