<totom>
the usefulness of many of these is quite limited :-)
<totom>
cocktail sort ? does anyone really need that ?
ygrek has quit [Remote closed the connection]
<shortc|desk>
Dunno. The idea behind Rosetta Code is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one language in learning another. The usefulness of a particular task in a particular language is debatable.
<shortc|desk>
The bot that created that page is indiscriminate; There will be items on that list that OCaml probably can't satisfy, and items on that list which are merely irrelevant.
<totom>
such as varargs :-)
<shortc|desk>
Yeah.
<shortc|desk>
Anyway...I need sleep. That URL is provided in case folks in here are looking for a challenge. :-)
<shortc|desk>
btw...if there's an analogous concept in OCaml to varrargs, it may be possible to expand the scope of the task so that OCaml can show its idiomatic approach to the probelm.
<shortc|desk>
*problem.
<shortc|desk>
Leave a note on the talk page, if you feel like it. :-)
<totom>
ocaml would use a list argument, I think
<shortc|desk>
totom: That's how the Perl example does it. "varargs" is probably a bad name for the tasks.
rwmjones_ has quit [Read error: 110 (Connection timed out)]
ikaros has quit [".quit"]
ikaros has joined #ocaml
rwmjones_ has joined #ocaml
OChameau has joined #ocaml
ikaros has quit [".quit"]
ikaros has joined #ocaml
ikaros has quit [".quit"]
Axioplase is now known as Axioplase_
Alpounet has joined #ocaml
hkBst has joined #ocaml
Alpounet has quit [Read error: 110 (Connection timed out)]
mikeX_ has joined #ocaml
Ariens_Hyperion has joined #ocaml
ygrek has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
Alpounet has joined #ocaml
_zack has quit ["Leaving."]
_zack has joined #ocaml
seafood has joined #ocaml
mikeX_ has quit [Read error: 104 (Connection reset by peer)]
seafood has quit [Client Quit]
Ariens_Hyperion has quit []
mikeX has joined #ocaml
jah has joined #ocaml
ched has joined #ocaml
ygrek has quit [Remote closed the connection]
munga has joined #ocaml
mads- has joined #ocaml
lintrippz has joined #ocaml
ygrek has joined #ocaml
<flux>
well, there's a difference: c doesn't require the arguments in varargs to be of the same type (or be of any particular type at all..)
<flux>
I suppose one alternative solution to that would be the one outlines in the functional unparsing white paper
sporkmonger has joined #ocaml
jah has quit ["Quitte"]
sporkmonger has quit []
sporkmonger has joined #ocaml
<tsuyoshi>
you could use a list of polymorphic variants
sporkmonger has quit [Client Quit]
<tsuyoshi>
but.. aside from printf, does anyone really use such a thing?
ikaros has joined #ocaml
ikaros has quit [Client Quit]
ikaros has joined #ocaml
<flux>
I've used it for constructing sql response parsing
sporkmonger has joined #ocaml
<kaustuv>
strictly speaking, C does not require anything to be of any type.
sporkmonger has quit []
ygrek has quit [Remote closed the connection]
QNux has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit []
Alp_ has joined #ocaml
Alpounet has quit [Read error: 60 (Operation timed out)]
QNux_ has joined #ocaml
sporkmonger has joined #ocaml
mytoz has joined #ocaml
QNux has quit [Read error: 110 (Connection timed out)]
vuln has joined #ocaml
xevz has quit [Read error: 60 (Operation timed out)]
xevz has joined #ocaml
kaustuv has left #ocaml []
ygrek has joined #ocaml
sporkmonger has quit []
vuln has quit ["leaving"]
sporkmonger has joined #ocaml
sporkmonger_ has joined #ocaml
sporkmonger has quit [Read error: 60 (Operation timed out)]
sporkmonger_ has quit []
Yoric[DT] has joined #ocaml
willb has joined #ocaml
<hcarty>
Yoric[DT]: Does the Batteries "module Foo = Foo open Bar" syntax have the same ambiguity problem as the previous "include" form?
* Yoric[DT]
needs to think this over.
sporkmonger has joined #ocaml
<hcarty>
That's why I thought "with" would work well, as it reads appropriately and I think it should avoid ambiguities
Cheshire has joined #ocaml
<Yoric[DT]>
Actually, I believe I was just too tired the other day and wrote "open" where I wanted to write "with".
<oleg|log>
flux: regarding tuntime dynamic binding fun, dlopen from cdt works well with minor modifications, and it's actually rather cool. i may release an updated version (mainly the build system should be changed). here's a version of my 'dlsh' using Dlopen: http://codepad.org/oClPeEZM
<oleg|log>
(it's a bit hackish with typeless storing of format arguments, but that's because I'm doing exactly the opposite of the typing work done in the library which also uses magic)
mellissandre has joined #ocaml
<mellissandre>
---
<mellissandre>
helle
mellissandre has left #ocaml []
ygrek has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
<mfp>
oleg|log: do you have all the typing magic working too? 64-bit ints and all? (CDK predates AMD64 IIRC)
<oleg|log>
I can't check that on ia 32, can I?
<mfp>
hmm maybe with GCC's long long int and Int64.t?
pango has joined #ocaml
<mfp>
does anyone here remember seeing >101 ppl on #ocaml or is this an all-time high?
<Cheshire>
I think we hit 100 before...
<Cheshire>
but that was the peak
<oleg|log>
we aren't >101 though. :-)
<oleg|log>
mfp: it knows nothing about Int64.t
<oleg|log>
but that seems rather trivial to add
<oleg|log>
there are many ways in which it can be modernized even on surface level, e.g. use those fashionable polymorphic variants instead of just a list of constructors
_102 has joined #ocaml
<_102>
> 101 :)
<Yoric[DT]>
:)
<oleg|log>
Camarade_Tux: that's cheating.
<oleg|log>
hm, I wonder why the author had to impement independent types for tuples with up to 6 arity?
<Camarade_Tux>
oleg|log, I guess my hostname betrayed me ;p
<oleg|log>
hrm, I speak too much here to still be "|log".
oleg|log has left #ocaml []
olegfink has joined #ocaml
<ski__>
(.. why not just `/nick olegfink' ?)
dabd has joined #ocaml
<Camarade_Tux>
102 :)
<olegfink>
ski__: because they are two different connections that freenode forced me to do so that I can participate in more than 20 channels at once
<ski__>
ah, i see
<ski__>
(that doesn't explain the channel-swapping, though)
<ski__>
(.. or maybe it does, if you log both, but want to minimize overlap)
<olegfink>
connecting to the same channel more then once makes zero sense, and both connections log to the same facility
jah has joined #ocaml
<olegfink>
mfp: seems I fail at ocamlbuild, I can upload the library as is (plus small fixes plus 'build' transcripts extracted from original make run) so that someone more experienced might reowrk the build system
<mfp>
I'm not good at ocamlbuild either... hard to, w/ the current docs :-|
<mfp>
olegfink: do you have a forge.ocamlcore.org account? at least, by putting it there, even if incomplete, it'd be easy to find & remain available
<olegfink>
no, I don't. the forge frightens me with its 'enterprise' layout.
<olegfink>
mfp: what is the 'official' ocaml VCS? I can upload it to some vcs hosting, so the interested parties can clone it wherever they find appropriate
ikaros_ has joined #ocaml
ikaros has quit [".quit"]
<mfp>
olegfink: git seems to be becoming dominant as of late (that's what batteries uses), so you could put it on github
Snark has joined #ocaml
<mfp>
speaking of which... dlopen could become a part of batteries, someday?
<Snark>
plop
<gildor>
olegfink: what means "frightens me with its 'enterprise'" ?
<olegfink>
gildor: I don't know. :-( its pages have too many links and stuff, I always get lost there whenever I come after some information about a project.
<olegfink>
er, not that it's the number of links that matters, it's that all this is too 'generic'
<gildor>
olegfink: you can reduce the number of links for a project by removing useless tab (forum...)
s4tan has quit []
<gildor>
olegfink: and you can set up a simple web pages for your project that just ship the good link
<Snark>
speaking of batteries -- with the debian package :
<Snark>
val ulines_of : input -> Data.Text.Rope.t Data.Mutable.Enum.t
<Snark>
0.20081112+gitBB342A7-1 <- debian unstable only has alpha2... let me see if I can compile better...
jganetsk has joined #ocaml
<olegfink>
dlopen makes some clever use of [format], and its use of Obj.magic is real magic when it turns to typing absolutely dynamic function pointers.
<olegfink>
however, I need none of this smart functionality, just the dlopen interface itself
QNux_ has quit [Connection reset by peer]
QNux has joined #ocaml
Cheshire has quit [Read error: 113 (No route to host)]
Cheshire has joined #ocaml
willb has quit ["Leaving"]
Snark has quit ["Ex-Chat"]
willb has joined #ocaml
Cheshire has quit [Read error: 113 (No route to host)]
Cheshire has joined #ocaml
QNux_ has joined #ocaml
QNux has quit [Read error: 104 (Connection reset by peer)]
<mfp>
Yoric[DT]: Xah Lee, a sort of trolling celebrity
QNux_ has quit [Connection timed out]
<Camarade_Tux>
every google link mentions him trolling :p
<Anarchos>
Camarade_Tux like MYOB ?
QNux_ has joined #ocaml
QNux__ has quit [Read error: 54 (Connection reset by peer)]
abattisti has joined #ocaml
<Yoric[DT]>
mfp: gasp
<abattisti>
hi, anybody here having some knowledge of the xml-light library?
QNux has quit [Read error: 110 (Connection timed out)]
Ariens_Hyperion has quit [Connection timed out]
ikaros has joined #ocaml
QNux_ has quit [Connection reset by peer]
QNux has joined #ocaml
<Camarade_Tux>
abattisti, ask and see if we can answer :)
<abattisti>
ok, thx ... my problem is that when parsing an rss feed xml-light throws the "IdentExpected" exception, when encountering something like <![CDATA[Foo]]>
<abattisti>
if I remove all CDATA "tags" the document parses fine
<abattisti>
or to be more exact the Xml.parse_file function throws an Xml.Error of the Type Xml.IdentExpected
<Camarade_Tux>
btw, if anybody has, would he care to comment ?
seafood has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
<abattisti>
yes i looked into xmlm but documentation seems to be really weak
rogo has left #ocaml []
QNux has quit [Read error: 104 (Connection reset by peer)]
ikaros has quit [".quit"]
QNux has joined #ocaml
thelema_ has quit [Read error: 104 (Connection reset by peer)]
QNux has quit [Connection reset by peer]
QNux has joined #ocaml
vuln has joined #ocaml
alexyk has joined #ocaml
QNux has quit [Connection reset by peer]
jonasb has joined #ocaml
QNux has joined #ocaml
sporkmonger has quit [Read error: 60 (Operation timed out)]
AxleLonghorn has joined #ocaml
QNux has quit [Connection reset by peer]
QNux has joined #ocaml
adrian_2002ca has joined #ocaml
<adrian_2002ca>
help! how do I add two of this type float->float ???
<Cheshire>
omg!?
<ttamttam>
olegfink: ping
<adrian_2002ca>
so i want float-> float + float->float = float->float
<adrian_2002ca>
help
<adrian_2002ca>
:'( im sooo lost ....pls i need some wisdom,
QNux has quit [Read error: 104 (Connection reset by peer)]
QNux has joined #ocaml
<AxleLonghorn>
you need to be a little more clear adrian_2002ca
<jonasb>
adrian_2002ca: I don't relly understand what you're asking, because I guess it's not let sum = 1.2 +. 5.3;; you're looking for?
<olegfink>
ttamttam: pong
<Yoric[DT]>
adrian_2002ca: that wouldn't be homework, would it?
<adrian_2002ca>
Yoric[DT]: yes, it is, but it's atiny part that I didnt unbderstand...i do now, thanks...its not like I was asking you to write a whole class for me :P
<adrian_2002ca>
im good, thanks ppl
<ttamttam>
olegfink: thanks for the dlopen link !
<ttamttam>
Was very intersting. I have had the test.ml working and find this very interesting.
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
<olegfink>
ttamttam: I should post to the ML eventually, I the think authors are still around (?). Would be cool if you could contribute a build system.
<ttamttam>
I have added some files that allow to do : ocamlbuild dlopen.oocamlfind
<ttamttam>
in order to compile and install it as a findlib package
QNux has quit [Read error: 104 (Connection reset by peer)]
<ttamttam>
How can I have you get them?
QNux has joined #ocaml
<Yoric[DT]>
adrian_2002ca: well, the short answer is: there is no short answer to your question.
Ariens_Hyperion_ has quit []
<olegfink>
ttamttam: something usual like git send-email (I'm no git expert) probably
OChameau has joined #ocaml
Waleee has quit [Connection timed out]
<ttamttam>
I will try. Ask me tomorrow if it did not work. (you'll find my email on caml-list: ttamttam=dubuget)
<adrian_2002ca>
Yoric[DT]: the answer is a wrapper that applies both functions to a float and returns the resulting addition of the results of the two functions
<olegfink>
ttamttam: seems doing either send-email or format-patch and sending to /me @breds.ru should work.
<ttamttam>
ok
<olegfink>
(or just a plain diff, but then the commit won't have your name :-)
sporkmonger has joined #ocaml
adrian_2002ca has left #ocaml []
<abattisti>
bye and thx for the help
abattisti has quit []
QNux has quit [Read error: 104 (Connection reset by peer)]
QNux has joined #ocaml
alexyk has quit []
<olegfink>
ttamttam: thanks for the help, going to take a nap. if you like, i can add you as a developer
QNux has quit [Read error: 104 (Connection reset by peer)]
QNux has joined #ocaml
ygrek has quit [Remote closed the connection]
alexyk has joined #ocaml
QNux has quit [Read error: 104 (Connection reset by peer)]
QNux has joined #ocaml
<ttamttam>
olegfink: I just sent something. But I'm not sure what you expect because I joined the IRC just before you gave the link.
hkBst has quit [Read error: 104 (Connection reset by peer)]
<ttamttam>
Good night
OChameau has quit [Remote closed the connection]
ttamttam has left #ocaml []
Yoric[DT] has quit ["Ex-Chat"]
alexyk has quit []
QNux has quit [Read error: 104 (Connection reset by peer)]