<jdoles>
orbitz: it's essentially invisible to Google for me.
<jdoles>
orbitz: instead of core they could better have called it OPYQ library.
<orbitz>
jdoles: good thin I jsut gave you the URL
<jdoles>
orbitz: yes, thank you.
<orbitz>
jdoles: i suspect once you get it into Date.t you can do add_days t (-1)
<whitequark>
hm. suppose I have tuple literals of form [1, "a", var]
ulfdoz has quit [Ping timeout: 246 seconds]
<jdoles>
orbitz: if you look at the documentation for the Ruby library, then everything is obvious, and documented. This library doesn't even have everything documented.
<whitequark>
and I want to have pattern matching syntax of form [foo, bar] = tuple. or [foo : Integer, bar] = tuple.
<whitequark>
this is quite certainly not LR(1). so I see three variants here:
<jdoles>
orbitz: it's not the language (OCaml) that's the problem; I'd prefer to use it, but in the end the libraries are of low quality.
<orbitz>
jdoles: Hrm, this library seem sobvious to me
ulfdoz has joined #ocaml
<jdoles>
orbitz: take for example this: val of_string_iso8601_basic : string -> pos:int -> t
<whitequark>
1) use something with unlimited lookahead, 2) add a sigil, e.g. *[foo, bar] = tuple, 3) construct identical ASTs and verify the syntax of "=" lhs in the reduction rule for "=".
<jdoles>
orbitz: what is the pos:int for?
<whitequark>
am I missing something here?
<orbitz>
jdoles: for where in the string to start parsing from
<jdoles>
orbitz: and how am I supposed to know that?
<jdoles>
orbitz: read the source code?
<orbitz>
jdoles: Standard convnetion in Core
<jdoles>
orbitz: conventions are silly.
<orbitz>
Ok
<jdoles>
orbitz: or more precisely: they add costs when not repeated everywhere.
<orbitz>
jdoles: So you want more convention or less?
<jdoles>
orbitz: conventions are good, sorry for being unclear.
<orbitz>
jdoles: So what is the problem again?
<jdoles>
orbitz: but having things dependent on context is a problem.
<jdoles>
orbitz: I shouldn't need to read tons of references to understand a trivial function.
<orbitz>
You didn't need to...
<ggole>
whitequark: prefix pattern matching with a recognisable keyword
<jdoles>
orbitz: it's not like Core is the only library in the world.
<jdoles>
orbitz: apparently I had to ask you, which is even more expensive.
<jdoles>
orbitz: I don't see that you don't see there is a problem when I need to ask a question.
<orbitz>
jdoles: I'm not sure what prbolem you have. Everythign in a library shoudl be self-evident? I doubt that is ture of even ruby...
<jdoles>
orbitz: I didn't need to do this in the Ruby case.
<whitequark>
ggole: that's 2), yes
<ggole>
(Or sigil: same thing, really)
<jdoles>
orbitz: yes, everything should be self-evident.
<orbitz>
jdoles: Well, the ~pos parameter is self-evident for me. Given the parameters of the function there is only 1 thing pos could accomplish
<whitequark>
jdoles: you're simply less familiar with ocaml than with ruby
<orbitz>
jdoles: What would yo uprefer the type of of_string_iso8601_basic to be?
<jdoles>
orbitz: it's not about the type.
<ggole>
More explicit documentation is probably a reasonable thing to want...
<orbitz>
so more documentation or things should be self-evident?!
<ggole>
Both are good?
<ggole>
Why choose?
<jdoles>
orbitz: it should just say in the documentation "The parameter pos defines the first character index starting from 0 that's included in the parsing of the string."
<jdoles>
orbitz: and arguable, the whole API is broken.
<ggole>
If I was figuring out a library I'd want as much as possible of both
<jdoles>
arguably*
<orbitz>
jdoles: why is teh API broken?
<jdoles>
orbitz: there is no reason to accept that extra parameter in the first place.
<jdoles>
orbitz: other than perhaps a broken optimization model.
<orbitz>
jdoles: yes there is, to avoid memory cpying
<jdoles>
orbitz: see?
<jdoles>
In Haskell there is no need for that.
<orbitz>
Yes, haskell, with it's 40 flavors of Strigns
<jdoles>
It's premature optimization.
<orbitz>
No it isn't
<jdoles>
Are you saying it is impossible to build a whole program optimizer for OCaml which would make this API obsolete?
<ggole>
In Haskell, strings are linked lists of 32-bit numbers: but at least the "optimisation model" is good?
<orbitz>
Yes, Strings are mutable in Ocaml
<jdoles>
ggole: you also have other strings, and strings are overloaded.
<ggole>
Yes, that is unfortunate.
<orbitz>
ggole: Haskell has, I think at least, 4 'string' types
<jdoles>
orbitz: that's irrelevant.
<ggole>
I would like immutable strings and mutable byte buffers. But the problem isn't enormous.
<orbitz>
jdoles: Even if building such an optimizer is impossible, it'snot going to happen any day soon.
<jdoles>
orbitz: the end result is that the software is harder to understand.
<whitequark>
voila
<jdoles>
orbitz: i.e. less high-level.
<orbitz>
jdoles: All languages have there pros and cons
<orbitz>
jdoles: If you're trying to say ocaml isn' perfect, yes, I agree.
tww has joined #ocaml
<jdoles>
orbitz: I was saying that in my particular case where I didn't need ultra high performance there is no point in complicating APIs.
tww has quit [Remote host closed the connection]
<jdoles>
For Jane Street this is likely different, but then I still don't get why they don't just use ATS for their core stuff.
<orbitz>
jdoles: the pos should probably be an optional parameter
<jdoles>
Or build something similar.
<jdoles>
orbitz: yes, that would be a better solution.
<osa1>
what is ATS ?
<orbitz>
A ridiculsly painful language to write that is very fast
<jdoles>
Good description modulo spelling.
<ggole>
The designer of an API doesn't necessarily know whether their users care about performance.
<jdoles>
It's more that it isn't slow.
<jdoles>
If you do nothing to make things slow, it's fast.
<orbitz>
when dealing with strings in ocaml, the common convention is to provide pos and len parameters
<jdoles>
ggole: there are solutions for that too; for example the UI of the library documentation could have a button to hide the high-performance API by default.
<osa1>
why is it ridiculous?
<ggole>
Yes, that's one approach
<orbitz>
jdoles: feel free to contribute such a thing
csakatoku has quit [Remote host closed the connection]
<jdoles>
osa1: try it.
<orbitz>
osa1: it is complicated, doesn't make writign sequential code particularly easy
<jdoles>
osa1: I don't think it is completely ridiculous, though.
<orbitz>
lots of type modifiers depending on what you plan on doing
<jdoles>
I think throwing away an interactive theorem prover like Coq has, is a bad idea.
<orbitz>
read doublec's blog (bluish coder, I think) to see some really cool stuff you can do with it.
<jdoles>
Coq is a lot more higher-level.
<ggole>
You can imagine adding a Substring module, but the problem is that nothing takes a Substring.t as an argument
<orbitz>
ggole: how would you enforce your Substring value never changes?
<jdoles>
What's true about the Mirage performance claims?
<orbitz>
I haven't looked at any of them
<ggole>
You wouldn't (unless you also changed ocaml to use immutable strings)
<jdoles>
They compare to bind9 for example, but bind9 wasn't written by professional software people.
<ggole>
You would use aliasing semantics
q66 has joined #ocaml
<jdoles>
It's nice that they are faster and I guess it means something that they were able to replace an entire stack by something faster.
<jdoles>
(with less people)
ttamttam has joined #ocaml
<ggole>
Other languages attack the problem with interfaces
<jdoles>
But that has little to do with the semantics of the language; that's more related to using Xen and eliminating indirections.
<jdoles>
Doing the same in C++/Rust would be less reliable, but likely faster.
<ggole>
OCaml code tends to be more concrete: which has advantages, but also disadvantages
<jdoles>
Is there an OCaml graphical debugger or integration with Emacs, etc.?
<orbitz>
Not that I'm aware of
<ggole>
There's typerex
<jdoles>
ggole: have you ever seen it work for more than 10 minutes?
<ggole>
I use it all the time: but not the fancy bits
<ggole>
It needs work.
<ggole>
Excuse me, I have to get dinner started.
ulfdoz has quit [Quit: kernel update]
ulfdoz has joined #ocaml
malo has joined #ocaml
mcclurmc has joined #ocaml
MarcWeber has quit [Ping timeout: 256 seconds]
MarcWeber has joined #ocaml
mcclurmc has quit [Ping timeout: 268 seconds]
tane has quit [Remote host closed the connection]
tane has joined #ocaml
ttamttam has quit [Quit: ttamttam]
osnr has quit [Quit: Leaving.]
Drup has joined #ocaml
emmanuelux has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
Zeev has quit [Read error: Connection reset by peer]
trystero has quit [Ping timeout: 260 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 246 seconds]
yacks has quit [Ping timeout: 246 seconds]
osa1 has quit [Ping timeout: 246 seconds]
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
yacks has joined #ocaml
Kakadu has joined #ocaml
trystero has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
yacks has quit [Quit: Leaving]
gautamc has quit [Read error: Connection reset by peer]
osnr has quit [Ping timeout: 256 seconds]
gautamc has joined #ocaml
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
ontologiae_ has joined #ocaml
beckerb has joined #ocaml
mcclurmc has joined #ocaml
introom has joined #ocaml
<introom>
hi. I want to learn ocaml. I am under os x and I want to use sublime text 2 write ocaml. Is there any plugin for st2 ?
ontologiae_ has quit [Ping timeout: 268 seconds]
ontologiae_ has joined #ocaml
<whitequark>
introom: ocaml{,lex,yacc} syntax is provided in the standard installation.
<introom>
whitequark: standard installation of st2? are you saying syntax highlighting? what about code completion
<whitequark>
introom: yes, highlighting
<whitequark>
no idea about code completion, never was interested in it.
<introom>
whitequark: are you using st2?
<whitequark>
introom: st3
<whitequark>
but I think highlighting was in st2, too
<introom>
whitequark: as to ocaml development, you just write code without 3rd plugin, right?
<whitequark>
introom: yes. in ocaml, or in any language I use, for that matter.
<introom>
whitequark: one more question, a little off topic. how st3 is different from st2?
<whitequark>
introom: lots of plugins are broken; the Goto Symbol in Project works much much better; that's all.
<Drup>
whitequark: you're missing a great feature with .annot / .cmt if you program in ocaml without any plugins.
<whitequark>
Drup: hm? what's it?
nixfreak has quit [Ping timeout: 256 seconds]
<whitequark>
don't think I ever liked editor plugins, but maybe ocaml is different.
<Drup>
the compiler can dump type informations gather during compilation (even if the compilation fail) as an .annot (plain text) or .cmt (binnary format, with more informations) and you can use small tools to tell you the type of any point in your code using those files
<Drup>
this is quite useful, to say the least
thelema_ has joined #ocaml
<Drup>
I don't know how to implement plugins in st, but it's quite easy to integrate something like this.
thelema has quit [Ping timeout: 252 seconds]
<whitequark>
Drup: oh, neat
<whitequark>
I may just implement it
<Drup>
whitequark: look at ocamlspot to explore .cmt files
<Drup>
there is also one already done for .annot, but I don't remember the name
<Drup>
there is also ocp-index that may interest you
<whitequark>
thanks
<Drup>
introom: if you're going to learn ocaml, I highly recommend you to try to have at least one of those tools in your text editor, it really helps when you're beginning.
<introom>
Drup: ocp-index ocamlspot hm am I missing something?
<introom>
also, is real world ocaml suitable for beginners?
<Drup>
introom: no, you should have those integrated in your text editor, it's not very useful to have them alone.
ontologiae_ has quit [Ping timeout: 268 seconds]
<introom>
yeah. and any good reference to learn ocaml for a beginner?
<whitequark>
a beginner in ocaml or beginner in general?
<MarcWeber>
Which is the recommended way to add "configuration flags" to a project? So that some files and lines of other files are compiled conditionally?
<MarcWeber>
I've learned about cppo being the best way to proprocess the code.
osa1 has quit [Ping timeout: 276 seconds]
osa1 has joined #ocaml
iZsh has quit [Quit: Coyote finally caught me]
Tekk_ has joined #ocaml
zpe has joined #ocaml
Tekk_ has left #ocaml []
zpe has quit [Ping timeout: 255 seconds]
<amiller_>
what's a good way to install ocaml-trunk in a user folder
<amiller_>
like a virtualenv (python) for ocaml?
<ousado>
amiller_: I just use make --prefix /some/custom/usr
<amiller_>
ousado, hm that's reasonable
<ousado>
you can also install a custom opam repo at some location of your choice
<amiller_>
what paths do i need to set to keep it from auto searching the wrong directories
<ousado>
and then have all the ocamls you ever wanted in one place
<amiller_>
i nkow of CAML_LD_LIBRARY_PATH
<ousado>
hm LD_LIBRARY_PATH and that caml one should be enough
<ousado>
maybe opam will handle that for you
<ousado>
I chose to have no system-wide ocaml, so nothing interferes with local installs
<ousado>
which seems to just work
<amiller_>
OCAMLLIB
justdit has quit [Read error: Connection reset by peer]
justdit_ has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
justdit_ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ollehar has joined #ocaml
eni has joined #ocaml
eni has quit [Ping timeout: 240 seconds]
f[x] has quit [Quit: f[x]]
tani has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
<bernardofpc>
Error: Reference to undefined global `Toploop' -> :(
ggole has quit [Ping timeout: 240 seconds]
<bernardofpc>
Welcome to utop version 1.2 (using OCaml version 4.00.1)!
darkf has quit [Quit: Leaving]
zpe has quit [Ping timeout: 276 seconds]
tani has quit [Quit: Verlassend]
<ollehar>
bernardofpc: ocaml --version -> ?
osnr has quit [Quit: Leaving.]
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
<bernardofpc>
The OCaml toplevel, version 4.00.1
<bernardofpc>
but my problem is with utop1.2
<bernardofpc>
ocaml itself is pretty much ok
<Drup>
bernardofpc: can't you upgrade ?
<bernardofpc>
no
<bernardofpc>
I mean, I have just installed utop from my distribution, along with its deps
<bernardofpc>
and it does not work
<bernardofpc>
could be a packaging issue
<bernardofpc>
but I'm clueless of what's happenning
<Drup>
bernardofpc: you have a recent version of ocaml, an old version of utop, boum.
<bernardofpc>
oh
<bernardofpc>
strange, but why not
<Drup>
(at least, that's my diagnostic ;))
<bernardofpc>
#utop_help;; does work, but 1 + 2 ;; does not
tane has joined #ocaml
<bernardofpc>
hum, indeed, it's 1.5 now
<bernardofpc>
but the page says it needs OCaml >= 3.12
<bernardofpc>
maybe 1.2 was before 4.00.1 and the compiler has introduced incompatibilities ?
<bernardofpc>
the makefile looks strange, it has setup.exe, and builds with ocaml(opt(.opt)?)?
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
osnr has quit [Quit: Leaving.]
Watcher7 is now known as Watcher7|off
zpe has quit [Ping timeout: 268 seconds]
<bernardofpc>
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /usr/lib64/ocaml/compiler-libs, /usr/lib64/ocaml -> is this normal ?
<bernardofpc>
(the file looks identical)
speredenn has joined #ocaml
pootler_ has joined #ocaml
pootler__ has joined #ocaml
<bernardofpc>
Drup: compiled 1.5, works so far
<bernardofpc>
really strage though
<bernardofpc>
(the compilation needs some more help or the docs, but that's another issue)
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
beginner42 has quit [Quit: irc2go]
skchrko has quit [Ping timeout: 255 seconds]
pootler__ has quit [Ping timeout: 268 seconds]
pootler_ has quit [Ping timeout: 268 seconds]
zpe has joined #ocaml
Anarchos has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
Kakadu has quit []
q66 has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu_ has quit [Ping timeout: 256 seconds]
watermind has joined #ocaml
Snark has quit [Ping timeout: 256 seconds]
pootler_ has joined #ocaml
ocaml_newbie has joined #ocaml
<ocaml_newbie>
Hello, how to add an external library to an ocaml project?
pootler__ has joined #ocaml
zpe has joined #ocaml
<Anarchos>
ocaml_newbie ocaml -I path_to_lib ?
speredenn has quit [Quit: Leaving]
zpe has quit [Ping timeout: 255 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
chrisdotcode has quit [Ping timeout: 256 seconds]
watermind has quit [Quit: Konversation terminated!]
ollehar has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
osa1 has quit [Ping timeout: 268 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
alang_ has joined #ocaml
<orbitz>
can one depend on a char always being 8 bits?
<troydm>
yes if you don't work with soem obscure architecture i guess
<troydm>
x86 and x86-64 and arm are 8 bits
<troydm>
most others are too
<troydm>
but ofcourse there are some architectures that have 7-bit long chars i think
<troydm>
i'm not sure how ocaml handles that
ocaml_newbie has left #ocaml []
<orbitz>
C doesn't support 8 bit chars
<orbitz>
7*
SanderM has quit [Remote host closed the connection]
<troydm>
orbitz: depends on what do you call a support?
<orbitz>
The C standard requires at least 8 bits per char
lusory has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 256 seconds]
cdidd has quit [Read error: Connection reset by peer]
malo has quit [Quit: Leaving]
<whitequark>
orbitz: you can count on char being 8, 16, or 32-bit
<whitequark>
rarely, 24-bit
<whitequark>
I don't really think you will find non-8-divisible char bit sizes these days.
<whitequark>
oh and yes, there are architectures without uint8_t at all
<orbitz>
whitequark: in ocaml or in general?
<orbitz>
Specifically, I'm asking if ocaml makes any guarantess
ollehar has joined #ocaml
<whitequark>
orbitz: I'm talking about char/uint8_t in C. however.
<whitequark>
it's non-8bit because it is not possible to perform efficient 8bit arithmetics on that architecture.
<whitequark>
ocaml probably is not going to run on these archs.
<orbitz>
I know the C guarantees :)
<whitequark>
orbitz: well, I know when it's non-8bit in practice :)
<whitequark>
almost entirely, weird DSP architectures.
<whitequark>
TI C54x has 16-bit char
<whitequark>
for example
<whitequark>
does ocaml provide good Qt bindings?
<orbitz>
someone here is wroking on it
<orbitz>
i believ they have posted to caml-list about it
<whitequark>
qtcaml from 2008... incomplete
<whitequark>
if it works, then it would be really, really, really good. because currently, nothing I know except C++ can actually *deliver* apps
<whitequark>
both qtruby and qtpython are utter shit
<orbitz>
the current one is much more recent, but in its infancy
<whitequark>
I may even want to work on it. I mean, if it allows me to write less C++, I'll do everything.
<orbitz>
it's Kukanda or something, I can't rmemebr his name
<ousado>
whitequark: what is 'delivering apps' ?
<whitequark>
ousado: packaging.
<orbitz>
what does the language have to do with that?
<whitequark>
orbitz: environment, mainly
<whitequark>
it's near to impossible to reliably package something which uses ruby gems with native extensions
<orbitz>
ruby gems are pure crap unforutnately
<orbitz>
I don't know how the ruby community puts up with it
<whitequark>
I can't even statically link them with the whole qt, because there's nothing to link with.
<whitequark>
orbitz: well, they're not crap
<whitequark>
but the extensions are a joke, yes.
<orbitz>
The system is crap I mean
<orbitz>
I don't know about the gems themsevles
<whitequark>
yeah, talking about system
<orbitz>
you basically can't dpeend on installing a gem from day to do for it to work at all
<orbitz>
no decent versioning
<whitequark>
orbitz: oh, you missed recent development