dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Revision17 has joined #ocaml
chessguy has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
<piggybox> what's the shortcut to create a sequence like 1..20 in ocaml?
pango_ has joined #ocaml
pango has quit [Remote closed the connection]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
fab_ has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
chessguy2 has joined #ocaml
chessguy has quit [Connection timed out]
chessguy2 is now known as chessguy
Snark has joined #ocaml
chessguy has quit [Client Quit]
<Fly_101> yo
<Fly_101> pango: you up ?
b00t has joined #ocaml
<Fly_101> how can i have XML that is multi line
Fly_101 has quit ["Konversation terminated!"]
Snark has quit ["Leaving"]
jewel has joined #ocaml
Carillon has joined #ocaml
Carillon_ has quit [Read error: 60 (Operation timed out)]
Carillon is now known as Carillon_
ramkrsna has quit [Remote closed the connection]
ramkrsna has joined #ocaml
ayrnieu has joined #ocaml
<flux__> piggybox, there is none
<flux__> piggybox, but you could write a function seq n m
smimou has joined #ocaml
_velco has joined #ocaml
youknow365 has joined #ocaml
<youknow365> anyone up ?
<flux__> maybe
<youknow365> i am gettign a syntax error or something here
<flux__> maybe you have an extra ';' at the end of an earlier function definition
<flux__> or maybe you're missing an 'in'-keyword
<flux__> or maybe you've written a keyword incorrectly ;)
<youknow365> line 25 33
<youknow365> im trying to put the xml in there
<youknow365> flux__: you know what the problem is ?
<smimou> you should escape " in strings
<youknow365> what do you mean
<ayrnieu> indeed.
<youknow365> what do i have to do to use this ?
<smimou> "a\"b"
<smimou> if you want to represent the string a"b
<ayrnieu> youknow - you have a string "<iq type=" and then the erroneously placed syntax --> set <-- and then another string " id=" and then yet more errors.
<youknow365> isnt there any way i can just put plan XML in there ????
<flux__> maybe there's a language extension :)
<smimou> it's almost plain xml
<smimou> just replace " by \"
<youknow365> << i still dont understand
<ayrnieu> youknow - O'Caml doesn't have HERE docs, so no: you can't just drop arbitrary data into your O'Caml program.
<ayrnieu> youknow - here, your simplest option is to replace the "" strings within the XML with '' strings.
<youknow365> can someone show me ;)
<ayrnieu> youknow - a *better* option would have you generating the XML.
<youknow365> casue im not following
<youknow365> ayrnieu: can yolu explain ?
<ayrnieu> youknow - no. This is too simple for me to put time into. Figure it out yourself.
<youknow365> :(
<youknow365> is there any way i can just leave it plain text xml
<ayrnieu> youknow - sure: you have a build system that fixes it into a literal string, escaping as necessary, and then puts /that/ into your program before compilation. You can also put it in a data file and load that at runtime.
<flux__> maybe some of these could help: http://caml.inria.fr/cgi-bin/hump.en.cgi?sort=0&browse=92
<ayrnieu> youknow - HereDoc on that page, if its purpose fits its name, will perfectly solve this problem :-)
<youknow365> so i cant display plan xml in a string can i ?
<ayrnieu> youknow - no, you can; you only have a problem with the syntax of a string literal.
<youknow365> can i fix it without making a language extension
<ayrnieu> yes: you can use a build system.
<smimou> hint: sed is your friend
<ayrnieu> a 'build system' is just the wad of software that you have construct your programs. autoconf, makefiles, the java 'ant', and other programs. Besides simply calling ocamlc as directed, your build system can modify your programs at build-time -- as smimou hints.
<youknow365> oh man
<ayrnieu> if all you do now is 'ocamlc foo.ml', turning this into a makefile where you just type 'make foo' in the directory is as simple as:
<ayrnieu> foo: foo.ml
<ayrnieu> ocamlc foo.ml
<ayrnieu> but if you don't want to read more about all of this, just get the HereDoc extension -- or stop trying to put raw XML in your O'Caml programs and instead fit the XML into a string literal.
<youknow365> what does the Here doc evtension do again ?
<ayrnieu> it should have documentation.
<youknow365> does it sllow me to put XML in strings or something
<youknow365> hmmmm
<ayrnieu> it gives you a new, less problematic syntax for strings.
<ayrnieu> or should, if it gives you HERE docs. I haven't used the extension -- read its documentation.
<youknow365> i am just trying ot maake it so that sends ;)
<youknow365> what is the folder that modules are located .........i have XML LIGHT installed here but i need to find the docs on it
<youknow365> will it matter if i just use single quote
<smimou> s/"/\\"/
<smimou> you should read what people have said on this chan
<youknow365> smimou: sorry i wasnt really paying attention .......but i think i fixed it
<youknow365> i dont think its a good ide to use double quotes in XML anyways
<youknow365> whats wrogn here though ........its not the XML its with naming the function
<youknow365> i am trying to see the response it sends back
b00t has quit [Remote closed the connection]
<youknow365> grrrrr ........im not connecting right
<flux__> youknow365, btw, tcpick or ethereal are excellent tools for debugging such protocol problems
<flux__> in case the programs diagnostics is still lacking
<youknow365> flux__: <stream:error><invalid-namespace
<youknow365> thats my response back from jabber
<flux__> I know nothing of jabber, just giving a pointer to a generally useful tool..
<youknow365> yea
<flux__> another idea might be to use such a tool to an existing jabber client
<flux__> to see if you misunderstood some part of the protocol documentation
<youknow365> flux__: got it :P
<youknow365> but i need to find a sexier way to do this thats for sure
smimou has quit ["bli"]
<DRMacIver> Hm. Can I define a polymorphic function (a' list -> a') * a' -> a' which uses the a' list -> a' as a constructor for type a'?
<DRMacIver> Well, the list part is irrelevant. I want to know if I can pass constructors in as arguments and still use them to pattern match on the type.
<flux__> no
<DRMacIver> Yeah, that's what I thought. Oh well.
<DRMacIver> Let's throw the general problem out to the channel then. Maybe there's a way of doing it that I'm missing. :)
<DRMacIver> I have an algebraic data type with a number of constructors. Among them are Max and Min, which take lists as arguments.
<DRMacIver> I want to define a reduction function which only depends on Max and Min. It seems silly to explicitly define this as acting on this type, as it's a generally useful function.
<DRMacIver> So I was hoping to make it take as arguments anything which has an appropriate pair of constructors.
<DRMacIver> No way to do that?
<youknow365> anyone here use jabber ?
<DRMacIver> Well, I use google talk which is jabber based.
<youknow365> not good enough :(
<youknow365> i need someone to tyr and connect to my jabber server
<ayrnieu> youknow - why 'someone'? Why not you?
<youknow365> i have a guy who is trying but he said not working
<youknow365> i try'd and it worked
<youknow365> ayrnieu: do you have a jabber client near by ?
<youknow365> Por Favor :) 30 seconds is all i ask ;)
<ayrnieu> youknow - sorry, no. Have you traced what the client of 'a guy' did, versus yours?
<youknow365> he says its not connecting
pango has quit ["brb"]
<youknow365> but i odnt see anything on my jabber server console
Wild_Cat has joined #ocaml
<DRMacIver> Sounds like he's either got the address wrong or there's a firewall sitting in the way
<youknow365> thats what im worred about but i dont think its a firewall 99.9 percent sure
<DRMacIver> Well, I run GAIM, so I can trivially connect to a jabber server if you need me to
<youknow365> hes running gaim as well
<DRMacIver> Yeah, but what I mean is that I'm able to test if you want. :)
<youknow365> DRMacIver: can i pm you the server and test user name ?
<DRMacIver> Sure
pango has joined #ocaml
<youknow365> DRMacIver: now i know the server is setup and working ok
<DRMacIver> Good good. :)
<youknow365> the guy was scaring me
f78 has quit [Remote closed the connection]
<youknow365> wjhew almost got my Ocaml Jabber library Done
<youknow365> only thing i gotta do now is Buddy List stuff add remove and fetch
<DRMacIver> Neat
<youknow365> DRMacIver: i hope :P then i jsut have to make my gui and tie it all in
<DRMacIver> What? GUI? Clearly everything should be a web 2.0 enabled ajax powered web application!
* pango is waiting for security breaches 2.0
<youknow365> DRMacIver: there still is no way to make a stbale connection with a server via ajax ........jus polls
<DRMacIver> youknow365: Well, my suggestion wasn't actually serious. :)
<DRMacIver> But long timeout polls will essentially do the job of a stable connection
<youknow365> DRMacIver: and also kill the server if you have a good amount of users ;)
<DRMacIver> youknow365: Pssht. That's a hardware problem. ;)
<youknow365> DRMacIver: llol
<DRMacIver> Any problem which can be solved by throwing servers at it isn't a problem, it's an expense!
<DRMacIver> I write enterprise applications. Can you tell?
<youknow365> lol
<youknow365> DRMacIver: using something for its made for is one thing .........abusing something for what its made for is another ;)
<DRMacIver> youknow365: I do actually agree. :) I'm not really very keen of the new wave of exciting dynamic HTML and XHR based sites.
<DRMacIver> (Although I do like gmail, which is an example of fairly sane use of the technology)
<youknow365> are you talking about their Gtalk thingy ?
<youknow365> or their search thing
<youknow365> google does tons of cache 'ing
<DRMacIver> No, I just mean the basic gmail interface. The talk thing on top of that is annoying and I turn it off.
<DRMacIver> (The gmail interface is much more clever than it looks at first glance)
<youknow365> hehehehe
ayrnieu has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
<youknow365> pango: you up ?
<pango> yes
<youknow365> when sending XML - some XML stuff my have something like xml version="1.0"?><stream:
<youknow365> well theres those " << that cause problems becasue its inside of a string
<youknow365> now i can fix this by replacing " with ' but is there any other solutions ?
<flux__> uh
<flux__> have you tried writing a program that simply outputs "?
<youknow365> pango: also GLIB has some cool stuff for socket stuff ........a better way then using Select but i am going ot leave it as select for now until i get it done
<youknow365> flux__: huh ?
<pango> I think that question has already been answered, nothing to add
<youknow365> i closed out of Irc
<youknow365> and people were saying use build software and this n that that didnt relate one bit
<pango> half of using irc is writing question, the other is reading answers
<pango> that has totally related
<youknow365> i looked in logs
<youknow365> ok well the fix is basically what i was doing
<youknow365> .......one guy says the best way to do it is the generate the XML
<pango> that's another possibility, yes
<youknow365> isnt that kinds stupid / take more time if the XML structure will remain the same 100 percent of the time ?
<flux__> well, maybe, if all you need is one xml
<youknow365> 3 different XML
<youknow365> log in .......authenticate .......
<flux__> for a fixed xml, why don't you simply quote the "-characters as \" and be done with it? why does it need to be literal?
<DRMacIver> pango: I dispute that claim. About 10% of IRC is apportioned to each of those. The rest is filled with inane chatter and flamewars. :)
<flux__> you are aware that the \" will appear as " in the actual output?-o
<youknow365> no i did not know that
<flux__> uh
<flux__> something everyone here thought obvious
<pango> DRMacIver: you're probably right :/
<youknow365> flux__: i mean yea thats the way i did it in php as well buuut i didnt know same rules apply for ocaml
<flux__> ..
<flux__> didn't consider trying it?
<DRMacIver> (Also explaining to people why you have already considered the answer that they have given and have determined that it is wrong. Repeated fifty times. </bitter>)
<pango> youknow365: logic applies everywhere
<youknow365> flux__: almost but i thought it was to far of a long shot
<youknow365> i thought the two languages would carry things very differently
<flux__> didn't think that there was a reason why everyone thought that replacing " with \" is a perfectly good solution?
<pango> youknow365: like ?
<youknow365> i dont know ..... ok stupid me ........is that what you guys wanted to hear :(
<pango> compiler needs a way to distinguish between the ending double quote and an embedded double quote...
<pango> other conventions could be used, like doubling the embedded quote (as is Pascal), etc. But that doesn't fundamentally changes the problem
<pango> another could be to prefix strings with their length, but that's not very practical ;)
<youknow365> i seeee
<youknow365> anyone here ever use FreeBasic
<youknow365> i heard about it on News Today
<pango> yet another is the possibility to choose an arbitrary complex end delimiter (as in Perl), but that's not available in OCaml (beside maybe using some preprocessing extension)
<youknow365> pango: the \" will work :P
<youknow365> that FreeBasic is fast
<pango> somehow I don't feel like writing Basic anymore
* DRMacIver is strongly considering writing an ocaml preprocessor of sorts. :)
<youknow365> yea .......is just the new fast revival of basic
<DRMacIver> I find that there's a lot of stuff which I basically want to attach a chunk of standard methods for. Things like ORM, accessor methods, etc.
<DRMacIver> And it would be nice if I could just add some sort of metadata which basically says 'do this for me'
<DRMacIver> (Critics might say that this would end up being more work than it would actually save me, but I dispute that. :) )
<pango> free is not enough. I'd have to get paid to write Basic :)
LUCAS has quit [Read error: 110 (Connection timed out)]
<DRMacIver> Heh
<DRMacIver> Well VisualBasic.NET has its advocates (e.g. Joel). Apparently it has some nice functional features coming up soon.
<DRMacIver> (I say this having never used it)
<pango> well, if you modify it enough, you can reinvent C++ or Haskell, but can that still be called BasicSomething
<DRMacIver> Heh
<DRMacIver> Well there's still basic derived syntax
<DRMacIver> I suspect you're right though
<datrus> is there anything like perl's Dumper in ocaml? to print some value of any type for debugging
<flux__> yes, check out caml humps
luca83 has joined #ocaml
<youknow365> pango: http://phpfi.com/152662 do you see any syntax error there ......it keeps having one at the end of the file but i dont see anything
<Snark> arf, a jabber client in ocaml :-)
<youknow365> Snark: wheres my jabber client
<Snark> I began writing one some time ago
<Snark> worked pretty well
<Snark> but I was dissatisfied with its design
<flux__> youknow365, right there: nect1 = "<?xml version="1.0\
<flux__> second "
<youknow365> no
<youknow365> i dont understnad why it copied wrong
<youknow365> but i have it there
<flux__> oh, right
<flux__> there's another problem
<flux__> are those top level definitions?
<flux__> in that case, remove the ; from the end
<flux__> (or replace it with ;;)
<youknow365> all fixed
<youknow365> forgot about that
<youknow365> val connect1 : string =
<youknow365> "<?xml version=\"1.0\"?>\n<stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" xmlns=\"jabber:client\" to=\"71.65.49.221\">"
<youknow365> pango: you said the output would not show the \ <<
<youknow365> thats terminal output
<flux__> not really
<flux__> that's ocaml output
<youknow365> lets rpint one out :P
<youknow365> ok good printed out fine
velco has joined #ocaml
<youknow365> how can i insert variables in strings ?
<youknow365> string " dsfdsf> I need variable here dsfds<"
<Snark> user Print.format, if I remember well
<youknow365> but if i put the variable there it will just put it in plan text
<Snark> Format.sprintf in fact
rcbarnes has joined #ocaml
Demitar has quit [Read error: 113 (No route to host)]
Demitar_ has joined #ocaml
Demitar_ is now known as Demitar
rcbarnes has left #ocaml []
<youknow365> does doing this slow anything down ?
<youknow365> i mean i am going to need to use variables in strings quite a bit
<pango> compare to doing nothing, yes
<flux__> youknow365, it hardly matters for a chat client
<Snark> it doesn't matter for a chat client, indeed
<Snark> and if your variables are strings, you may use "this=" ^ this ^ "!\n"
<pango> which may prove actually slower
<Snark> really !?
<pango> it all depends on implementation of both
g6 has joined #ocaml
Carillon has joined #ocaml
<Snark> well... I would certainly hope that ^ received quite some love performance-wise
<pango> but ^ isn't actually very clever, as it creates temporary strings
Brennus has joined #ocaml
<Brennus> Hello.
<Brennus> Is there anyone here from Canberra, Australia, who might be interested in a job as a developer working with functional programming languages?
<pango> Snark: each s1 ^ s2 creates a string of length String.length s1 + String.length s2 then blits contents from source strings to result string
<Brennus> Full-time position, some experience with C++ required, and experience with any functional language.
<Snark> pango: so you think it's better to use Format.sprintf ? Won't it do mostly the same ?
<g6> hi all, I have an ocamlyacc question
<g6> i'm defining a grammar for (higher-order) logic, and i'm struggling with operator precedence
<pango> Snark: well, if you use more than 2 strings at once, you can compute the result size and do just one allocation, and one copy of each source
<Snark> ah, yes
<pango> Snark: on the other hand, there's probably the cost of parsing the format, if it's not done at compile time
<g6> a term can be of the form [unary_connective term] or [term binary_connective term], among others
<Snark> Brennus: I'm not in Australia...
<Brennus> Well I'm looking for someone who is, in the ACT region.
<g6> the unary_connective is essentially the negation (tilde), which should bind more strongly than any binary_connective
<g6> so I inserted a precedence declaration into my .mly file
<g6> but it seems the parser doesn't take it into account
<youknow365> pango: so what way is better ........using ^ or format etc ?
<Snark> youknow365: doesn't matter in a jabber client
<g6> do I have to do anything special to make the parser reduce according to the defined precedences?
<Snark> you don't have that strict performance requirements
<youknow365> Snark: but still .......i dont want to make it bad performance just casuse i can
<youknow365> let phrase = "I have " ^ (string_of_int (n+1)) ^ " guanacos.";;
<youknow365> let prhase = sprintf "I have %d guanacos." (n+1);;
<youknow365> which way is better? / faster ?
<Snark> youknow365: I would focus on readability for easier maintainability if I were you...
<youknow365> Snark: you can do both
<youknow365> willsprintf print out every single time ?
<pango> only benchmarking will tell, but the winning instruction will have to be used many many times before you recover the time spent on benchmarking...
<youknow365> well i dont want it to print to the terminal everytime ?
<youknow365> will sprintf casue that ?
<pango> because if you win around 1000 cycles, that's still 0.001ms gain
<youknow365> will it print out to the terminal everytime ?
<Snark> youknow365: sprintf won't print on the terminal
<Snark> it prints in a string
<pango> everytime what ?
<pango> first sprintf does not print anything
<youknow365> Snark: i seeee so its main purpose is for what i need to do with it ?
<Snark> yes
<youknow365> i seee
<youknow365> i will go with that ..... looks better to
<youknow365> things are moving along much more swift;y getting alot more accomplishsed
<youknow365> anyone here ever used Erlang before ?
<youknow365> it looks kinda interesting to
<Brennus> I have used Erlang a bit.
Carillon_ has quit [Connection timed out]
Carillon is now known as Carillon_
jewel has quit [Read error: 110 (Connection timed out)]
mikeX has joined #ocaml
rillig has joined #ocaml
Brennus has quit []
Snark has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
g6 has quit [Remote closed the connection]
slipstream-- has joined #ocaml
Leonidas has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
crack_head has joined #ocaml
lilboy has joined #ocaml
chessguy has joined #ocaml
postalchris has joined #ocaml
lilboy has left #ocaml []
smimou has joined #ocaml
f78 has joined #ocaml
Wild_Cat has quit ["Leaving"]
velco has quit ["Ex-Chat"]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Go on, try it!"]
_velco is now known as velco
<jeremy_c> When I attempt to compile, it states Syntax error on (last line in paste) chars 51-53, which is "xt" of read_next
<jeremy_c> Any thoughts?
<Smerdyakov> You have used ';' where you meant 'in'.
<Smerdyakov> Or, it looks more likely that you forgot 'in' altogether.
Carillon has joined #ocaml
<jeremy_c> Oh!
<jeremy_c> duh. thanks.
<pango> lacks in read_next input, I guess
<pango> probably followed by a Buffer.contents buf
<pango> mmmh but that's only guessing ;)
<jeremy_c> Can I match multiple chars? Combinding where I am matching \r and \n chars?
<Smerdyakov> Yes, and the manual tells you how. :P
<pango> | '\r' | '\n' ->
<jeremy_c> actually, the function is not done, I was writing, testing, etc...
Carillon_ has quit [Connection timed out]
Carillon is now known as Carillon_
pango has quit ["Leaving"]
pango has joined #ocaml
joshcryer has quit [Client Quit]
chessguy has joined #ocaml
<jeremy_c> I'm trying to read/parse and use information from an EDI file SEG*MOD*DATA~SEG2*MOD*DATA*DATA2~ etc... Would you create a lexer for this or just use something like string split? I plan on reading each segment into a hash, then each hash having an array of *MOD*DATA*DATA2, etc...
<pango> there's more than one way to do it, like using the Scanf module...
Carillon has joined #ocaml
<jeremy_c> pango: there are 100's of segments, each with different numbers of elements. Segments are separated by ~ and elements by * ... will Scanf work in a situation like that?
<jeremy_c> er, I guess you would just use scanf multiple times, scanf for anything but ~. would get you the file broken by segments.
mnemonic has joined #ocaml
<mnemonic> hi
Carillon_ has quit [Connection timed out]
Carillon is now known as Carillon_
pango has quit [Remote closed the connection]
pango has joined #ocaml
<pango> or Str (regexps), if scanf can't stop on your separators...
<jeremy_c> last line, characters 40-42: This expression has type unit but is here used with type 'a -> 'b
<jeremy_c> things like this are confusing to me. I am new, but I have read the OCaml manual core, module, objects sections and refer to API for specs.
<pango> read_next _ ? that will make it a function of a single polymorphic argument...
rillig is now known as rillig|Go
<pango> why it thinks return value will also be polymorphic at that point, I'm not sure...
<jeremy_c> pango: moving _ to f made things work just fine. I can certainly tell that it's going to take me a while to catch onto ocaml.
<pango> just use read_next () everywhere
<pango> function need arguments (they're evaluated when they're fully applied), so to write "a function that takes no argument", just let it take the unit argument
<jeremy_c> pango: so use of _ was OK, but I needed to supply () as the params.
<pango> _ was ok because let does pattern matching, too
<pango> so you were defining a function that would take an argument of any type, and immediately discard it
<jeremy_c> pango: that's what I thought it did.
<jeremy_c> pango: I would have never related that to my problem though.
<jeremy_c> pango: as you did.
<pango> but the problem is that you called without argument... read_next without argument is a functional value, not a function call
<jeremy_c> pango: ah. now that does make sense and I know better than that.
<pango> # print_newline ;;
<pango> - : unit -> unit = <fun>
<pango> # print_newline () ;;
<pango> - : unit = ()
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
<pango> (ah, irc filtered out the empty line :/ bad example ;) )
f78 has quit [Read error: 104 (Connection reset by peer)]
f78 has joined #ocaml
f78 has quit [Client Quit]
f78 has joined #ocaml
f78 has quit [Client Quit]
Demitar has quit ["Ex-Chat"]
rillig|Go is now known as rillig
Demitar has joined #ocaml
Snark has quit ["Leaving"]
Smerdyakov has quit [Read error: 60 (Operation timed out)]
Smerdyakov has joined #ocaml
mnemonic has quit ["leaving"]
Daimun has joined #ocaml
velco has quit ["I'm outta here ..."]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC has never been so good"]
postalchris has quit ["Download Gaim: http://gaim.sourceforge.net/"]
postalchris has joined #ocaml
<jeremy_c> How do I implicitly cast a function parameter as a list?
<jeremy_c> method add_transaction tr = DynArray.add transactions tr
<jeremy_c> tr = a list, but OCaml is not figuring it out.
<postalchris> method add_transaction (tr: 'a list) ?
<jeremy_c> I'll be glad when I have some working knowledge behind me w/ocaml instead of just tutorial knowledge. I was trying (tr : list) ... gotta spec the type.
<jeremy_c> Are you better to spec a generic type or if you know it's always going to be yyy then spec that type?
<pango> without OO, I never had to hint anything. Maybe sometimes prevent some functions from being too generic for performance sake, but that's it...
<jeremy_c> pango: prior to typing it, I got: The method add_transaction has type 'a -> unit where 'a is unbound
<jeremy_c> pango: add_transaction is obviously OO though
<pango> that's why I always avoided it
<pango> if you want to keep it generic, I think you must make the class parametric vs. that type class ['a] classname = ...
<pango> s/generic/polymorphic/
<youknow365> pango: im getting alot of stuff completed :P
smimou has quit ["bli"]
<youknow365> lets say i have xmlstuff.ml how do i include that so i cna use those functions in my mian.ml ?
gim_ has joined #ocaml
gim_ has quit []
DRMacIve1 has joined #ocaml
DRMacIver has quit [Read error: 60 (Operation timed out)]
khaladan_ has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]