cjeris changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
david_koontz_ has quit [Client Quit]
david_koontz has quit [Connection timed out]
mikeX has quit ["leaving"]
pantsd has joined #ocaml
pedro__ has joined #ocaml
pedro_soc has quit [Read error: 110 (Connection timed out)]
malc_ has joined #ocaml
malc_ has quit ["leaving"]
benny_ has joined #ocaml
benny has quit [Read error: 110 (Connection timed out)]
postalchris has quit [Read error: 113 (No route to host)]
_blackdog has quit [Remote closed the connection]
danly has quit [Remote closed the connection]
the_dormant has joined #ocaml
sseefried has joined #ocaml
<sseefried> Hi people. I was wondering if I might ask a question about the module system. I have noticed something that I find a little annoying. Say I'm writing a signature for a given module and I decide _not_ to make a type, t, abstract. That is, I write something like "type t = A of int". It's a little annoying that I have to write exactly the same thing inside the module definition. It would be nice if there were some way to just write "type t"
<Smerdyakov> I don't know of such a way.
<Smerdyakov> But, then, it is usually a bad sign if you are including transparent type definitions in a module type.
<Smerdyakov> I only do it when they're extremely brief.
<Smerdyakov> Otherwise, define your types in modules without explicit types.
<sseefried> Smerdyakov: Yeah, I had been thinking like that. Except I want to restrict the functions that I export, but not the type.
<Smerdyakov> That is, "...without explicit module types."
<Smerdyakov> That explanation doesn't mean anything to me.
Mr_Awesome has quit ["...and the Awesome level drops"]
<Smerdyakov> Complicated type definitions deserve to be in their own modules.
<Smerdyakov> With no associated functions.
<sseefried> Smerdyakov: Oh really? That's good style is it?
<Smerdyakov> I consider it to be good style. It has clear productivity advantages.
<sseefried> I'd love to hear your point of view on this :)
<Smerdyakov> You've already ehard it.
<Smerdyakov> heard
<sseefried> Can we clarify?
<Smerdyakov> This isn't enough?
<sseefried> What's the productivity advantage.
<Smerdyakov> <Smerdyakov> Complicated type definitions deserve to be in their own modules.
<Smerdyakov> You aren't duplicating code....
<sseefried> Okay, I thought there might be something apart from that.
<sseefried> Cool, thanks for that.
<sseefried> You've been enlightening as always.
<Smerdyakov> I say, am I missing some sarcasm? :D
<sseefried> No, you're not actually.
<sseefried> I always find your advice very useful.
<sseefried> But, don't worry, I'm not sarcasm free. I do use it sometimes. ;)
sseefried has quit []
<mrvn> I guess you aren't ment to put the type specifics into the mli file so there is no mechanism to avoid duplication in such a case.
<mrvn> If you type is so simple then why make it a module specific type at all? Why not just return an int?
Smerdyakov has quit ["Leaving"]
the_dormant has quit []
love-pingoo has joined #ocaml
pantsd has quit ["Leaving."]
bluestorm_ has joined #ocaml
ygrek has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
zeroslug has joined #ocaml
zeroslug has left #ocaml []
ikaros has joined #ocaml
ikaros has quit [Client Quit]
pattern has quit [zelazny.freenode.net irc.freenode.net]
pattern has joined #ocaml
Submarine has quit ["Leaving"]
jlouis has quit [Remote closed the connection]
Sparkles has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
love-pingoo has joined #ocaml
ita|away is now known as ita
<ita> boing
<love-pingoo> ni
Sparkles has quit []
<ygrek> Hello. I have a problem with ocaml on cygwin..
<ygrek> After compiling it from sources - I get cannot open pervasives.cmi
<ygrek> how does ocaml find pervasives.cmi?
<love-pingoo> it should be installed in the standard lib's dir
<ygrek> it is there!
<love-pingoo> /usr/lib/ocaml/<version> on unix
<love-pingoo> ocaml -where should say where it expects it to be
<love-pingoo> ocamlc -where, sorry
<ygrek> thanks
<ygrek> got it - it searches in previous location whre msvc port was installed
<ygrek> some syystem variable I suppose
<ygrek> let me find it
<ygrek> OCAMLLIB
<ygrek> it works now. thanks
<ygrek> though make botostrap couldnt reach fixpoint after two phases...
beschmi has joined #ocaml
dark_ has quit [Remote closed the connection]
beschmi has quit [Read error: 104 (Connection reset by peer)]
screwt8 has quit [Read error: 104 (Connection reset by peer)]
beschmi has joined #ocaml
<ita> ocamlc -whore
<ita> sets the compiler to "biatch" mode :-)
<ygrek> again. gsl doesnt work... Looks like the best choice would be to setup linux in VMWare and use native linux ocaml
<mrvn> or vice versa
<ita> who codes on win32 anyway
<mrvn> I don't even own one
<ygrek> the problem is I should show this program in Win32 :)
<ita> ygrek: do it in java
<mrvn> vmware player?
* ita runs
<flux> I would like to port some of my (ocaml-)programs native (non-cygwin) win32 applications.. but apparently it has its problem, especially if the individual in question (me) hasn't familiarized himself with the platform
<ygrek> workstation (cracked..)
<mrvn> Isn't the Unix module severily limited under windows?
<ygrek> flux, did you use ocamlgsl on windows native port?
<mrvn> ygrek: That wouldn't be legal.
<vorago> Fast question: Are there problems with Unix module inder w32?
<vorago> Heh. Like mrvn asked.
<flux> ygrek, no
<flux> I don't know, but I understand it is implemented
<mrvn> file:///usr/share/doc/ocaml/docs/ocaml.html/manual035.html
<mrvn> Windows:
<mrvn> A fairly complete emulation of the Unix system calls is provided in the Windows version of Objective Caml. The end of this chapter gives more information on the functions that are not supported under Windows.
<mrvn> cygwin has it all but native win32 not.
<flux> I personally wouldn't miss those functions
<ygrek> mrvn, I understand. Thats not a problem, I will do it as a last resort
<flux> maybe someone else would
<ita> compiling on win32 is also very slow
<flux> I think it's very understandable that there are such limitations
<mrvn> flux: select?
<flux> infact it's quite cool if everything else works out-of-the-box :)
<flux> mrvn, works with sockets
<flux> which is where I most often use it
<mrvn> I wonder how select does not work on other kind of descriptors? It is not like they "work" under unix.
ikaros has joined #ocaml
<mrvn> Only thing you can select on are sockets and pipes and win32 has no mkfifo.
<flux> hm, pipe is apparently supported
<flux> so select doesn't work on pipes?
<mrvn> Under win32
<flux> but most of the times (when not?) pipes can be emulated with sockets
<flux> I wonder if PF_UNIX sockets are supported..
ita is now known as ita|lunch
<mrvn> flux: you want to pass pipes through the tcp/ip layer?
<mrvn> flux: nope
<flux> and the Unix-module provides socketpair, which should easily (?) replace pipe
<mrvn> type socket_domain the domain PF_UNIX is not supported; PF_INET is fully supported
<flux> so does socketpair not work in win32? it's not listed there
<flux> I suppose you could use PF_INET with socketpair
<flux> I'm not sure what that means..
<mrvn> I'm not sure that works.
Sparkles has joined #ocaml
<flux> I've got some in-house applications too, which I would like to run on win32, but cygwin should be sufficient there..
<flux> (but then again, a really native version wouldn't hurt)
<mrvn> I don't want to run win32 period.
<flux> also I wouldn't a win32-port of goba, http://modeemi.cs.tut.fi/~flux/goba :)
<flux> +mind
<mrvn> I wouldn't mind some new book to read.
<flux> and exactly now I wouldn't mind having some food ->
<mrvn> What do you use for the gfx?
<flux> sdl
<flux> or how do you mean 'use'?
<mrvn> so plain FB?
<flux> essentially yes
<flux> (most of) the graphics are rendered with blender
<flux> it can consume tons of memory..
slipstream-- has joined #ocaml
<flux> tile-graphic blending is done runtime, but all tiles on the screen are calculated only once, and stored thereafter - hence the memory consumption goes up, up, up when you view different regions, with the grass in different state of wear
<mrvn> Do you have an AI?
<flux> no :(
<flux> I'm thinking it might be one of the the next big advances for it
<flux> but AI can be difficult
<mrvn> I would think you need a LRU algorithm for the tile cache.
<mrvn> Or Move-To-Front. That is trivial to do.
<flux> actually I already have a simple algorithm for purging old bitmaps from the memory, but it isn't released.. and it doesn't really save much memory.
<flux> it's move-to-front
<flux> I would need to determine good limits
<flux> and also perhaps tiles that take long to generate should be kept around longer
<mrvn> Then you need a priority queue.
<flux> actually now that I think of it, it's due to another reason why it doesn't save much space
<flux> each coordinate is lazily attached to its bitmap
<flux> and those attachments are never harvested
<flux> (it's sort of two-level memoization)
<flux> because the lookups in the bitmap-description-hashtable took some time also..
<mrvn> I while ago I was thinking of implementing a lazy type with expire function. It would go back to lazy after some time without use.
<flux> fun idea
<mrvn> A cache module.
<flux> but as I said, in my case some things should be taken into consideration too: such as how much time does it take to regenerate the bitmap
<mrvn> I need it for a filesystem.
<flux> but now I'm really off to eat :-)
ikaros has quit ["segfault"]
ikaros has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
_blackdog has joined #ocaml
rillig has joined #ocaml
rillig has quit [Client Quit]
tree_ is now known as tree
Demitar- has quit ["Ex-Chat"]
ikaros has quit ["segfault"]
ita|lunch is now known as ita
ramki has quit [Read error: 104 (Connection reset by peer)]
Demitar has quit [Read error: 113 (No route to host)]
Demitar has joined #ocaml
tree has quit [Nick collision from services.]
tree has joined #ocaml
tree has quit [Nick collision from services.]
Demitar has quit [Read error: 113 (No route to host)]
Demitar has joined #ocaml
tree_ has joined #ocaml
Sparkles has quit []
malc_ has joined #ocaml
descender has joined #ocaml
cjeris has joined #ocaml
LeCamarade has joined #ocaml
<LeCamarade> So, if I open Unix;; in some package and I use a function in another that doesn't want to open Unix, it doesn't compile?
<flux> 'open' is purely a per-module syntactic feature. you may always use Unix.somesome instead.
<flux> and if you're getting "Unbound value xxx", it's because you're not linking in unix.cma (and unix.cma must be in the list before the module that requires is)
<flux> it, even
<LeCamarade> flux: Yeah, but I keep getting `undefined global Unix' and yet I haven't used it. Error stops when I remove the imported Unix-aware func.
<LeCamarade> Okay, lemme try the order.
<flux> if getting the right order is griefsome, ocamldep and ocamldsort can help with that
<flux> (actually ocamlfind in this case)
<flux> ocamlfind is btw something you want to check out
<LeCamarade> flux: Thanks. The order healed it.
<LeCamarade> You know, all these ocaml* ... they give to many choices. And, I am afraid, that thing about too many choices being bad is quite true with me.
<LeCamarade> ocamldep is good, I see.
<LeCamarade> flux: I don't have ocamldsort.
screwt8 has joined #ocaml
<LeCamarade> Just curious, did OCaml keep the function composition feature of ML? func1 o func2 ?
<flux> nope
<flux> you could define let (@.) a b c = a (b c)
<LeCamarade> :o(
* LeCamarade had come to depend on it (in Haskell).
<flux> or use the preprocessor
Amorphous has quit [Read error: 104 (Connection reset by peer)]
<LeCamarade> flux: You've got a hand in #haskell too? :oD
<flux> it's a language I might some day use, nowadays I use ocaml ;)
<LeCamarade> flux: It's a language I use a bit, nowadays I use both.
postalchris has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
LeCamarade has quit [""ExitStatus 20""]
Smerdyakov has joined #ocaml
z__z has quit [Read error: 104 (Connection reset by peer)]
z__z has joined #ocaml
love-pingoo has quit ["Leaving"]
slipstream has joined #ocaml
jlouis has joined #ocaml
LeCamarade has joined #ocaml
slipstream-- has quit [Connection timed out]
the_dormant has joined #ocaml
bluestorm_ has joined #ocaml
malc_ has quit ["leaving"]
gunark has quit [Remote closed the connection]
Submarine has joined #ocaml
the_dormant has quit []
the_dormant has joined #ocaml
ygrek has quit []
LeCamarade has quit ["ExitFailure 27"]
Amorphous has joined #ocaml
Smerdyakov has quit ["Leaving"]
asdsacsa has joined #ocaml
<asdsacsa> i've searched but i could not find. does anyone know a microelectronics project that ocaml was used?
love-pingoo has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
asdsacsa has left #ocaml []
<kelaouchi> sorry i am nb and i get :
<kelaouchi> ocamlc.opt -g -c -I analyze.mli
<kelaouchi> make: don't know how to make analyze.ml. Stop
<kelaouchi> in fact there is no analyze.ml file in tree
<kelaouchi> juste analyze.p4
<pango_> make depend && make => works
<kelaouchi> doesn't work for me :/
<pango_> do you have camlp4 installed ?
<kelaouchi> make: don't know how to make analyze.ml. Stop
<kelaouchi> yes i do
<kelaouchi> but path is not the same as default one specified in .depend
<kelaouchi> i use NetBSD : so path is /usr/pkg/bin/camlp4
<pango_> here's what I get: http://nopaste.tshw.de/11787434663a82b/
<kelaouchi> :/
<kelaouchi> i change nothing in files
<kelaouchi> i uncompressed the archive
<pango_> same here
<kelaouchi> why have i got a .depend file just after uncompression
<kelaouchi> shouldn't `make depend` generate it ?
<pango_> there's one in the archive
<pango_> make depend fails if there's no .depend
<kelaouchi> yes it does
<kelaouchi> but even adjusting path : http://pastebin.ca/479684 i get error message
<kelaouchi> make: don't know how to make analyze.ml. Stop
<kelaouchi> why is it looking for analyze.ml ?
<pango_> because it needs analyze.cmx or analyze.cmo to compile bmktrans
<kelaouchi> but i haven't got this analyze.ml file !
<pango_> it creates it from analyze.p4 using camlp4, see above
love-pingoo has quit ["Connection reset by pear"]
<kelaouchi> ach
<kelaouchi> mein gott
<kelaouchi> what would be the camlp4 command to create analyze.ml ?
<pango_> see the output of make depend in first paste
<kelaouchi> ok worked
<kelaouchi> why didn't i get it runing `make depend` ?
<kelaouchi> why did i have to generate analyse.ml by hand ?
<pango_> I can't guess from the info you gave
<pango_> but the Makefile doesn't look top notch
<kelaouchi> but i did the same as you :
<kelaouchi> uncompress
<kelaouchi> cd to dir
<kelaouchi> and run `make depend`
<pango_> tried gmake depend && gmake ?
<kelaouchi> oups you 're wright pango_
* kelaouchi need some sleep
<kelaouchi> lol
<kelaouchi> sorry for noising
the_dormant has quit []
bluestorm_ has quit ["Konversation terminated!"]
smimou has quit ["bli"]
cjeris has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
malc_ has joined #ocaml
mnemonic has joined #ocaml