lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csakatoku has joined #ocaml
sheijk_ has joined #ocaml
sheijk has quit [Ping timeout: 260 seconds]
mlh has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ontologiae has quit [Read error: Operation timed out]
NoNNaN has joined #ocaml
mreca has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
dant3 has joined #ocaml
dant3 has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
peterbb has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest95874
talzeus_ has joined #ocaml
zpe has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
dant3 has joined #ocaml
csakatoku has quit [Ping timeout: 272 seconds]
csakatoku has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
dant3 has quit [Ping timeout: 272 seconds]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
kyrylo has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
watermind has quit [Client Quit]
watermind has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
sheijk_ has quit [Quit: .]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
dant3 has joined #ocaml
dant3 has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 276 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
lostcuaz has joined #ocaml
arjunguha has joined #ocaml
rwmjones has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 252 seconds]
jbrown has quit [Ping timeout: 265 seconds]
rwmjones has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WraithM has quit [Quit: leaving]
WraithM has joined #ocaml
WraithM_ has joined #ocaml
zpe has joined #ocaml
introom has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
WraithM_ has quit [Ping timeout: 260 seconds]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
divyansr has joined #ocaml
shinnya has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 246 seconds]
watermind has quit [Quit: Konversation terminated!]
bjorkintosh has joined #ocaml
divyansr has quit [Remote host closed the connection]
divyansr has joined #ocaml
axiles has joined #ocaml
divyansr has quit [Remote host closed the connection]
divyansr has joined #ocaml
csakatoku has joined #ocaml
jbrown has joined #ocaml
nrlucaroni has quit [Quit: leaving]
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
Guest95874 has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 276 seconds]
nikki93 has joined #ocaml
dant3 has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
mcclurmc has joined #ocaml
dant3 has quit [Ping timeout: 245 seconds]
dant3 has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
arjunguha has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ccasin_ is now known as ccasin
wwilly has quit [Remote host closed the connection]
ygrek has joined #ocaml
zpe has joined #ocaml
_5kg has joined #ocaml
_5kg has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 272 seconds]
introom has quit [Ping timeout: 246 seconds]
introom has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 245 seconds]
introom has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 246 seconds]
<pippijn>
morning
talzeus_ has quit [Read error: Connection reset by peer]
zRecursive has left #ocaml []
talzeus_ has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 245 seconds]
jbrown has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Ping timeout: 245 seconds]
introom has joined #ocaml
hyperboreean has joined #ocaml
zpe has joined #ocaml
<orbitz>
pippijn: morning
zpe has quit [Ping timeout: 245 seconds]
<thorsten`>
how can is start the repl for a file? if i run "ocaml myfile.ml" it says: "Error: Reference to undefined global `Bla'" and there's a line 'module S = Bla' in myfile.ml
<orbitz>
#load "myfile.ml" maybe
<orbitz>
i never actually work in such a way though so i'm not sure
<thorsten`>
how do you test single functions?
<thorsten`>
it says "File CoAlgLogics.ml is not a bytecode object file."....
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kakadu has joined #ocaml
ontologiae has joined #ocaml
<orbitz>
thorsten`: i generally write tests for functions
<orbitz>
thorsten`: if I need to interact with a function via the repl for some reason, I have my project setup to work in ocamlfind so I just add the path to it to OCAMLPATH and use it like any other ocamlfind library.
<thorsten`>
is ocamlfind the same as ocaml-findlib?
<orbitz>
i don't know, ocaml install ocamlfind
<orbitz>
it is the ool almost ever ocaml project uses
<orbitz>
for compiling/linking against deps
<thorsten`>
ok.
martintrojer has joined #ocaml
<Kakadu>
thorsten`: yeah, ocamlfind is ocaml-findlib
cago has joined #ocaml
mika1 has joined #ocaml
dant3 has quit [Remote host closed the connection]
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
divyansr has quit [Remote host closed the connection]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
divyansr has joined #ocaml
csakatoku has joined #ocaml
nikki93 has quit [Remote host closed the connection]
dant3 has joined #ocaml
dant3 has quit [Read error: Connection reset by peer]
dant3_ has joined #ocaml
avsm has joined #ocaml
dant3_ has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
nikki93 has joined #ocaml
avsm has quit [Quit: Leaving.]
<gasche>
thorsten`: you should first (#load "foo.cmo";;) for all the compiled modules your file depends on, in dependency order
<gasche>
then you can (#use "myfile.ml";;), though in general we just send phrases from Emacs
<gasche>
(since the last version 4.01 you can also (#mod_use "foo.ml") which interprets foo.ml *and* puts it as a module, so is rouhgly equivalent to compile-then-#load)
<thorsten`>
okey, my problem with phrases is that there are normally custom datatypes
<gasche>
it's fine to add datatype definitions in the toplevel
<gasche>
(but you may have conflicts if you redefine datatypes but use old values evaluated against the previous definitions)
<companion_cube>
o/ gasche
<thorsten`>
and if i got it right, toplevel just is a ocaml-specific synonym for REPL, isn't it?
<gasche>
yep
<gasche>
I suppose the tradition of calling it "toplevel" goes back to older times
<thorsten`>
ok
<gasche>
if you think of it, ML was a metalanguage for an interactive assistant
<fds>
"Toplevel" is definitely used in the Scheme/Lisp world too.
<gasche>
where arguably it can do more than REP in a loop (eg., restartable exceptions)
<gasche>
the fact that it coincides with the language-design notion of "at the top level" is slightly awkward sometimes
* companion_cube
always disliked ;; in files
thomasga has joined #ocaml
<gasche>
thorsten`: if you need to repeat a given #load sequence too often, you can write it in a .ml file and #use it, or as a .ocamlinit (the .ocamlinit of the current directory will be automatically #use-d whenever the interactive toplevel is started)
<gasche>
(you can also package said modules in a library using ocamlfind, and then use topfind's #require directive which automates transitive dependency loading)
<thorsten`>
currently i still need to get it load..
<gasche>
the simplest way is just to compile the whole project (make, whatever), then #load the compiler .cmos
<gasche>
if they are in a different directory that the one you started your toplevel from, such as "_build/", use (#dir "_build";;) to add it to the include path
<gasche>
s/compiler .cmos/compiled .cmos/
thomasga has quit [Quit: Leaving.]
AltGr has joined #ocaml
dant3 has joined #ocaml
<thorsten`>
here, only cmo/cmi/cmx files are generated but no .cmos-files
_andre has joined #ocaml
dant3 has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
<thorsten`>
okey, with successive calls to #mod_use i might get the toplevel work...
wolfnn has joined #ocaml
jonludlam has joined #ocaml
thomasga has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
<gasche>
thorsten`: apologies, I meant .cmo
<gasche>
(but a plural of .cmo files may be described as .cmos...)
<thorsten`>
all right
ontologiae has joined #ocaml
<gasche>
you may of course bundle the files of interest in a .cma and load the .cma only
<gasche>
(ocamlbuild makes it easy to create cma files: just write mylib.mllib with one captialized module name per line, and `ocamlbuild mylib.cma` will do the job if your build system is already ocamlbuild-ready)
<thorsten`>
i don't think that it's ocamlbuild-ready because it's a custom makefile which also links some c-code in it..
dant3 has joined #ocaml
rwmjones has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
<gasche>
then a .ocamlinit with the boilerplate is your best short-term choice
NoNNaN has quit [Remote host closed the connection]
rwmjones has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
thomasga has joined #ocaml
<companion_cube>
gasche: do you think using github + forwarding every github mail to a separate mailing-list (archive/backup) would work?
<adrien_oww>
(in which context?)
<companion_cube>
adrien_oww: your context
<companion_cube>
making hacking on the compiler easier
<adrien_oww>
ah
<adrien_oww>
you want a CIA bot basically?
<companion_cube>
?
<companion_cube>
I suppose github can put the ML's address in cc/
dant3 has quit [Remote host closed the connection]
<companion_cube>
otherwise a bot may be the way to go, indeed
<adrien_oww>
(CIA.vc is now shut down, these are possible replacements; you can see http://cia.vc for more infos)
<companion_cube>
that's nice
<companion_cube>
friends of mine and myself have a bot that communicates with its plugins through dbus :]
<companion_cube>
socket + json is simpler, though
<adrien_oww>
and works over the Internet ;-)
<adrien_oww>
although I'd really like to be able to send a "power button pressed" message to your machine :P
<adrien_oww>
f00d!
<ygrek>
github has an irc bot
<adrien_oww>
ygrek: I believe it's listed on the cia.vc page (is it that one?)
<companion_cube>
nah adrien_oww
<companion_cube>
ygrek: are you thinking about hubot ?
<companion_cube>
oh, or the builtin service
dant3 has joined #ocaml
<companion_cube>
but anyway I was more thinking of forwarding /mails/ from github (issues, etc.) to a mailing list
<ygrek>
nope, there is one builtin
ygrek has quit [Ping timeout: 252 seconds]
<thorsten`>
is there a function on Arrays which checks whether an element is contained in an Array?
zpe has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
mcclurmc has joined #ocaml
csakatoku has quit [Ping timeout: 252 seconds]
<thorsten`>
(something like the elem-function in haskell)
<Sfiv>
pippijn, I am still verily confused, verdulleme, miljaar.
mcclurmc has quit [Ping timeout: 276 seconds]
<pippijn>
;)
<pippijn>
thorsten`: apparently not, but Batteries have one
<pippijn>
thorsten`: BatArray.mem
<thorsten`>
okey thanks
ygrek has joined #ocaml
dant3 has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 276 seconds]
divyansr has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
<gasche>
ygrek: have you played with ocaml-debug?
<gasche>
I was thinking of you as a potential reviewer for the recently-mentioned-on-the-list ocamldebug patches, but in fact I remembered you contributed on gdb+ocaml
<gasche>
companion_cube: why not? feel free to answer on caml-list
avsm has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
divyansr has joined #ocaml
dsheets has joined #ocaml
dant3 has joined #ocaml
watermind has joined #ocaml
rand000 has joined #ocaml
csakatoku has joined #ocaml
thomasga has quit [Quit: Leaving.]
arjunguha has joined #ocaml
ollehar has joined #ocaml
avsm has quit [Quit: Leaving.]
csakatoku has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
kyrylo has joined #ocaml
dant3 has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
dant3 has joined #ocaml
hyperboreean has quit [Ping timeout: 248 seconds]
mcclurmc has quit [Ping timeout: 265 seconds]
watermind has quit [Read error: Connection reset by peer]
watermind has joined #ocaml
divyansr has quit [Remote host closed the connection]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkf has quit [Quit: Leaving]
avsm has joined #ocaml
thomasga has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
dant3 has quit [Remote host closed the connection]
watermind has joined #ocaml
dant3_ has joined #ocaml
nlucaroni has joined #ocaml
metasyntax has quit [Quit: Leaving]
mchqwerty has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
mcclurmc has joined #ocaml
watermind has quit [Client Quit]
watermind has joined #ocaml
ggole has joined #ocaml
avsm has quit [Quit: Leaving.]
metasyntax has joined #ocaml
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 272 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
mcclurmc has joined #ocaml
kdk has joined #ocaml
Kakadu has quit [Ping timeout: 272 seconds]
saml has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
lostcuaz has joined #ocaml
avsm has quit [Quit: Leaving.]
Kdk_ has joined #ocaml
divyansr has joined #ocaml
kdk has quit [Ping timeout: 272 seconds]
<ygrek>
gasche, no, never touched that beast
ocp has joined #ocaml
adrien_o1w is now known as adrien_oww
WraithM has quit [Read error: Operation timed out]
divyansr has quit [Quit: Leaving...]
WraithM has joined #ocaml
<nlucaroni>
I have a question regarding linking c stubs with ocaml. I had followed the ocamlbuild plugin page, but linking another project to it failed. The cmxa was expanding the command line arguments with libphyloc.a and -lphyloc. Specifically the .a is unncessary and failed compilation. I removed the link dependency to libphyloc.a in the ocamlbuild plugin and things worked fine. I'm just curious if this is correct way to go.
mchqwerty has quit [Quit: Odcházím]
arjunguha has joined #ocaml
mchqwerty has joined #ocaml
introom has quit [Quit: WeeChat 0.4.2]
dant3_ has quit [Remote host closed the connection]
dant3 has joined #ocaml
Thooms has quit [Ping timeout: 260 seconds]
dant3 has quit [Ping timeout: 265 seconds]
talzeus_ has joined #ocaml
adrien_oww has quit [Ping timeout: 252 seconds]
DaniG2k has joined #ocaml
talzeus__ has joined #ocaml
kyrylo has quit [Quit: Hi, Rob!]
kyrylo has joined #ocaml
talzeus_ has quit [Ping timeout: 245 seconds]
<Kdk_>
camlcity.org seems to be down, and opam gets a lot of its packages from that location
<Kdk_>
nlucaroni: are you referring to the myocamlbuild.ml file?
<companion_cube>
thomasga: does opam.ocaml.org store copies/backups of packages?
ygrek has quit [Ping timeout: 265 seconds]
<thomasga>
companion_cube: yes it does
<thomasga>
if you use the default repository, it should use the cached packages
<thomasga>
(if you use directory the Git repo, it won't)
<companion_cube>
ah
<companion_cube>
that's good
Amanite has joined #ocaml
hyperboreean has joined #ocaml
<nlucaroni>
Kdk_ yes, the myocamlbuild.ml file.
<Kdk_>
that sound right then, you simply add specific link targets or other arguments in the myocamlbuild file for ml files that have certain tags set in the _tags file
<Kdk_>
if you don't need a specific library, it shouldn't be there
avsm has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nlucaroni>
okay, that's what I thought. Thanks Kdk_ . Looks like that was the solution and the correct one.
arjunguha has joined #ocaml
<nlucaroni>
Would the .a link would only be necessary if I were statically linking that library into the cmxa?
<nlucaroni>
opps sorry about the grammar there.
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
mchqwerty has quit [Ping timeout: 252 seconds]
jbrown has quit [Remote host closed the connection]
mchqwerty has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
mika1 has quit [Quit: Leaving.]
cago has left #ocaml []
mchqwerty has quit [Quit: Odcházím]
kyrylo has quit [Quit: Hi, Rob!]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pippijn>
is camlcity.org down?
cesar_ has joined #ocaml
cesar_ is now known as Guest72765
<ggole>
Resolves and times out here.
<nlucaroni>
same
<Kdk_>
indeed
thomasga has quit [Quit: Leaving.]
dant3 has joined #ocaml
thomasga has joined #ocaml
<Sfiv>
how can anyone live without a good module system with simple textual includes.
<Sfiv>
It puzzles me endlessly
<companion_cube>
well, this world is full of wonders
Guest72765 has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
<Sfiv>
companion_cube, do you get it?
osa1_ has quit []
<companion_cube>
nah, I don't like cpp
mreca has joined #ocaml
mreca has quit [Client Quit]
<Sfiv>
companion_cube, what about python?
<companion_cube>
I don't like dynamic typing :p
<adrien>
nlucaroni: cmxa files don't contain the same infos as .a files
<nlucaroni>
So i would never link the .a file into it. So, what I'm doing is fine in generating the package.
ocp has quit [Ping timeout: 276 seconds]
mreca has joined #ocaml
S11001001 has joined #ocaml
ontologiae has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
<Sfiv>
companion_cube, but what about its module system?
<companion_cube>
oh
<Drup>
Sfiv: each module is basically a big dictionnary
<Drup>
nothing very interesting about it
<companion_cube>
no opinion, it's decent
<Drup>
"""module"""
<companion_cube>
Drup is right, modules are dictionaries like everything else :)
<Drup>
it's even less good than the Haskell one
<nlucaroni>
is their any encapsulation in python modules?
<nlucaroni>
I haven't looked at Haskell Backpack. The paper is sitting in my printer. Any thoughts on that Drup?
<Drup>
I didn't really looked at it
<Drup>
but the very little I have read is quite scary
<Sfiv>
They are objects, not dictionaries, there is a difference.
<Drup>
I'm not sure to see the point they are trying to solve
<Sfiv>
But "module" is a stretch for it
<Sfiv>
it's not far removed from tactical include.
<Drup>
Sfiv: object == dictionnary, in python
talzeus__ has quit [Read error: Connection reset by peer]
<Drup>
aka "a big thingy that associate string to stuff"
jonludlam has quit [Remote host closed the connection]
<Sfiv>
Drup, you can't just extend objects can you?
<Drup>
(with the intended imprecision over "thingy" and "stuff")
<Sfiv>
dicts actually hash, objects are more like records.
<Sfiv>
Unlike javascript where foo.bar is actually sugar for foo['bar']
<Drup>
hum, it was not the case when I tasted python, but it may have changed
jwatzman|work has joined #ocaml
<Sfiv>
Python has no object literals has it?
<Sfiv>
Every object is an instance of a class right?
<Sfiv>
You can't just add properties to objects on the fly in python as far as I know.
nikki93 has quit [Remote host closed the connection]
<Drup>
you're starting to go outside of my knowledge about python :D
<Drup>
nlucaroni: about backpack .. i'm not sure to understand what they are trying to solve. they add tons of stuff that doesn't seem very useful and they don't solve the very basic usability issues
<Sfiv>
Well, anyway, I'm pretty sure objects in python do not hash their properties or at least, I see no reason why they should. They're more like recorsd, their properties are fixed in their class.
<companion_cube>
you can add properties to objects
<Sfiv>
Dicts actually do hash and you can easily extend them.
<Sfiv>
companion_cube, how?
<companion_cube>
to add methods it's a bit more difficult
<companion_cube>
well, foo.a = 42
<Sfiv>
That cmplains that whatever class foo belongs to has no property a
<Sfiv>
or attribute rather
<companion_cube>
no
<companion_cube>
in python it works (unless your specified __slots__)
<Sfiv>
a = "string";a.b="foo" fails for me with that error
<Sfiv>
Unless the string class has slots on its own, that could be
<companion_cube>
string is probably special
<Sfiv>
Hmm, well, that aside, you are right in that you can do import string ; string.a = "whatever" without error yeah
<mjf>
hi. camcity.org down? can't opam install or browse from various locations
<mjf>
sorry. camlcity.org
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AltGr has left #ocaml []
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nlucaroni>
yeah it seems to be down.
zpe has quit [Ping timeout: 276 seconds]
<mjf>
okay. wasn't certain if it was planned downtime. thx.
<nlucaroni>
oh, well neither are we.
mjf has quit [Quit: Leaving]
<dsheets>
Is there a cleaner way to convince ocaml not to drop unreferenced symbols in the static link? Right now, I am just putting an unused "external" decl.
avsm has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
nikki93 has joined #ocaml
arjunguha has joined #ocaml
mreca has joined #ocaml
Thooms has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Ping timeout: 276 seconds]
tnguyen has joined #ocaml
Thooms has quit [Ping timeout: 265 seconds]
Anarchos has joined #ocaml
WraithM has quit [Ping timeout: 265 seconds]
mfp_ is now known as mfp
avsm has joined #ocaml
pango has quit [Ping timeout: 246 seconds]
ericbmerritt has left #ocaml []
Thooms has joined #ocaml
zpe has joined #ocaml
pango has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
WraithM has joined #ocaml
Kakadu has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
lostcuaz has quit [Ping timeout: 248 seconds]
lostcuaz has joined #ocaml
NoNNaN has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsheets has quit [Ping timeout: 272 seconds]
mreca has joined #ocaml
Amanite has quit [Quit: Lost terminal]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arjunguha has joined #ocaml
kyrylo has joined #ocaml
manizzle has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arjunguha has joined #ocaml
<Kakadu>
o/
mcclurmc has quit [Remote host closed the connection]
<Kakadu>
or it says that there is no rule to apply to .qml file
<Kakadu>
ah
<Kakadu>
scientific random have given possible explanation
adrien_oww has joined #ocaml
<nlucaroni>
figured it out?
<Kakadu>
a little bit
nikki93 has quit [Remote host closed the connection]
thomasga has quit [Ping timeout: 276 seconds]
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
malo has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Sfiv>
companion_cube, tell me again how you are confused about how people can live with no modules.
<companion_cube>
hmmmmmmmmmmmm
<companion_cube>
about as much confused as about how they can live without strong static typing? :p
ocp has joined #ocaml
<Sfiv>
static typing is overrated
<Sfiv>
99% of the errors in my code aren't type errors any way but typos
<Drup>
the usage of static typing in industry tell me the opposite
<Sfiv>
C is also used a lot in industry.
<Sfiv>
And like, python is more common in industry than lany language with a hindly milner so there there you.
<Drup>
C is not strongly statically typed
<Sfiv>
there you go
<Sfiv>
And it is used a lot in industry
<Drup>
Sfiv: my point, it's not "overrated"
<Sfiv>
So it tells you that strong static typing is overrated.
<Drup>
since it's not used.
<Sfiv>
Ahh
<def-lkb>
(<mylife>66% of errors in the last ubuntu migration I did were python type errors, the 33% remaining were scoping issues in the same language)
<Sfiv>
I see
<Sfiv>
I get it totally
<Sfiv>
Python has no scoping.
<Sfiv>
Are you kidding me
<Drup>
Sfiv: overrated would mean that people praise it far more than it deserve it
<Kakadu>
Sfiv: have you read reports about rewriting 0install from python to OCaml?
nikki93 has joined #ocaml
<Sfiv>
Drup, yes, I agree, I misread your intentions.
<Sfiv>
Kakadu, not at all, anything good in it?
<Drup>
It's very interesting and it may be quite convincing for people not usually attracted by static typing.
<Sfiv>
Drup, well, one muist be wary of the fallacy that you perhaps are searching for replacing a bad type system with a good one.
<Sfiv>
Like ehhh, I'd take racket's dynamic type system over C's static one because the former is good and the latter is bad, you get?
<Sfiv>
Just as I take Ocaml's over Python's
mreca has joined #ocaml
<Drup>
Sfiv: My opinion is that strong static typing is, on the contrary, very underrated. Mostly because lot's of people think that Java is an example of it.
<adrien>
well, if you run GCC with -Wall -Wextra -Write-strings and a couple others, you get something fairly good at catching errors
<adrien>
(and you're code isn't something awful)
<Drup>
except you have zero abstraction, of course.
<Drup>
well, at least you have a nice decorated asm.
<adrien>
yeah, you're not going to type "List.map"
<Drup>
but except those minor issues, it's probably not awful :D
<adrien>
and an anonymous function that is
<adrien>
I believe C isn't bad overall
<adrien>
but mostly by pure luck
<Sfiv>
I like how C# is slower than python in that small sample size.
<adrien>
and limitations of the time
<Sfiv>
Drup, well, yeah
<Sfiv>
But like, Hindly-milner is a good static type system.
mort___ has quit [Quit: Leaving.]
<Sfiv>
Good static type system > bad dynamic type system
<Sfiv>
but surely, good dynamic type system > bad static type system?
<Drup>
do you know a good dynamic type system ?
<Anarchos>
Drup paper+pencil ?
<Drup>
(and also, no, I still prefer to detect at compile time)
<Sfiv>
Drup, well, how many errors is a static type system going to detect at compile time is the issue.
<Sfiv>
Technically, you can have a static type system with 2 types like C-- and you have static types.
<Sfiv>
The two types being bool and bitvector in C--
<Drup>
ok, to stop all your digression to C and stuff
<Sfiv>
Your own responsibility to ensure that you use float operations on bits you intend to be floats, the compiler doesn't help you with that
<Drup>
let's limit ourselft to *strong* type systems
<Sfiv>
C-- isn't C.
<Sfiv>
It is strong
<Sfiv>
it doesn't coerce for you
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Sfiv>
It's a bit vector.
<Sfiv>
You can interpret the bits as an int as you want, that's not part of the language.
<Drup>
C-- still allows null pointers, isn't it ?
<Sfiv>
What I'm saying is, that it flags at compile time doesn't mean it actually catches what are what you cosnider errors, it flags what the language considers errors.
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
<nlucaroni>
Sfiv, why even consider the comparison and just use a good static type system. I'm not even sure what a "good dynamic type system" is.
<Sfiv>
Good is one that helps you catch errors you consider to be errors.
<Drup>
To you have an example ?
<Drup>
Do*
<Sfiv>
human beings aren't machines, what's not an error to the machine may be one for a human being, a machine can't geuss your intentions.
<Drup>
because I don't
<Sfiv>
Well, racket's contract type system allows you to define dynamic types in an ada-esque way, as in their meaning rather than their internal structure
<Drup>
so you have run time checks ?
<Sfiv>
So say shoe sizes and years are both integers, if you call a function menat on one with the other it will fatal error out on you
<Sfiv>
Of course.
<Sfiv>
As soon as a function gets called with the wrong one
<Drup>
yeah, sure, not good.
<nlucaroni>
but why wait until that point?
<nlucaroni>
if code coverage isn't uniform over time then you might not catch potential errors.
<Sfiv>
You wait untiul that point to be able to do things you can't do in a statically typed language.
<Sfiv>
Static typing is pessimistic
<Sfiv>
That the compiler can't prove it won;'t go wrong doesn't mean it won't go wrong.
<Sfiv>
I mean, OCaml doesn't have type classes which further complicates this.
<Sfiv>
A function either works on one type, or all.
peterbb has quit [Ping timeout: 272 seconds]
<Sfiv>
Like ehh, let's put it like this, I am working with a command line parsing system in pretty much every language that basically translate ("-hello" "Johnny" "how" "--are" "you?) into ((h) (e) (l) (l) (o "Johnny" "how") (are "you"))
<Sfiv>
Note that (o "Johnny" "how") in scheme is a list of one symbol and 2 strings.
<Sfiv>
You're going to have to use an either type in Ocaml to get something like that, not to mention the difficulty of a list which contains some lists and some non lists. You can get it tow ork but your code will ultimately be less readable and as it stands it works without bugs.
<Drup>
(the important part being "as it stands")
<Sfiv>
Then there's the fact that my function which checks if a certain option is there just returns false if it isn't and a list of the option's arguments when it is.
<Sfiv>
Drup, well again, a static type system doesn't catch all your errors either.
* Kakadu
is sure that Perl is unreadable because Kakadu doesn't know this language
<Drup>
I never said it does
<Sfiv>
Type errors are a very minimal subset of errors you can make and a dynamic type system tends to catch them as well while you run your code fairly quicly.
<Drup>
and yet, I find syntax error in elips programs packages in my distribution
<Drup>
totally catched by running the code ... at the user level
<Drup>
totally good enough.
<Sfiv>
What is elips programs?
<Drup>
emacs lisp
<Sfiv>
Well, that has a bad type system.
<Sfiv>
The racket type system catches the same type errors that ocaml catches at compile time the first time the function is called basically.
<Sfiv>
That's good enough for me for the extra flexibility it offers.
<Drup>
doesn't change anything what I'm saying, in fact
<adrien>
how so is it a worse type system?
<Sfiv>
You know emacs lisps is dynamically scoped right?
<Sfiv>
You can't have a contract-based type system on it
<adrien>
I'm fairly sure there's a contract ocaml
<Sfiv>
Ocaml then again also is statically scoped.
bjorkintosh has quit [Remote host closed the connection]
<Sfiv>
Emacs lisp as a language goes is pretty garbage in every single way.
<Kakadu>
Sfiv: You sound very like 'Racket is my favourite language. Everything else sucks'
<Kakadu>
> The racket type system catches the same type errors that ocaml catches at compile time the first time the function is called basically.
_toordog has quit [Ping timeout: 252 seconds]
<Sfiv>
Well, I am half banned on #racket because I was overcritical on racket.
<Kakadu>
Sfiv: Do you have good article about it?
<Sfiv>
At least, I once called it a language with next to zero industry potential and they should stop lying to people who ask if it has it.
_toordog has joined #ocaml
mort___ has joined #ocaml
<Sfiv>
Also, Larceny is my scheme implementation of choice.
_toordog has quit [Client Quit]
<jdoles>
Sfiv: it's rather easy to get banned on any channel by doing that; humans are rather weak that way.
<Sfiv>
Yeah, I know.
<jdoles>
Sfiv: they don't like it when you crush their life's work with an analysis of 10 minutes.
<Sfiv>
but man, the guys at #racket pretty much lie to people asking about it.
<Sfiv>
Or they get angry when someone says "Man, I really like racket, but I sadly feel it has no real industry potential"
<jdoles>
Sfiv: what is real industry potential?
<Sfiv>
They basically get very annoyed with that poor soul who is basically right, but even if that poor soul isn't right, you really can't get angry at people for beirng misinformed
<Sfiv>
Companies use it
<jdoles>
Sfiv: Racket is used by a few companies.
<Sfiv>
Let's faceit, Ocaml also doesn't have it, if you want to get paid you best not invest your time in Ocaml unless you know for sure that a position you can get requires it.
<jdoles>
Sfiv: just not for billion dollar products, I think.
<Sfiv>
few being the keyword.
<Sfiv>
It's not like 'I'm going to learn racket because I know it will ladn me ajob for sure"
bjorkintosh has joined #ocaml
<jdoles>
Sfiv: the reason it's not being used for billion dollar products is that it's not as efficient as let's say C++.
<Sfiv>
It's more like 'I am a racket guru and by sheer random chance I managed to found a job doing racket' or 'I worked at a company and they switched to racket and I was like 'hey, I know this language'
<Sfiv>
Well, they use python more too
<Sfiv>
Which is a thousnad times slower
<Sfiv>
I think most people just hate S-expressions, let's be honest.
<Sfiv>
I love it, but I recognise it's not for everyone.
<jdoles>
Sfiv: no, the main problem with Scheme is that there are zero working tools.
<Sfiv>
What do you mean with that?
<jdoles>
Sfiv: look at Java: it has IntelliJ, look at C#: it has Visual Studio.
<Sfiv>
Ohh, IDE's.
<Sfiv>
Who uses IDE's anyway.
<jdoles>
Sfiv: I do when I use Java.
<Sfiv>
Java needs an IDE because it's terrible.
<ollehar>
snap :)
<jdoles>
Sfiv: I don't do it when I use Python, but I have been eying PyCharm.
<Drup>
(I can't disagree with this last sentence ...)
<Sfiv>
"I have no sensible module system, I need an IDE for something simple as renaming a function"
<Sfiv>
But if someone would ask me if OCaml had industry potential I would say the same thing "Solid language, but the harsh reality is that not a lot of companies use it."
* Sfiv
ducks
<jdoles>
Sfiv: and in the case of OCaml: most libraries in production operating systems just don't cut it.
<jdoles>
Sfiv: so, perhaps in 5 years when everything which is current now is packaged, it might stand a chance.
<Sfiv>
Well, some companies manage, I hear this Jane street does, whatever it is
<jdoles>
Sure, I also run some OCaml programs.
<Sfiv>
though truth be told, I sometimes feel Xavier Leroy via Les Illuminatés de France founded Jane Street behind the screens just to evangelize ocaml.
<jdoles>
It's just that larger companies always lag.
<Sfiv>
They talk a lot about how awesome Ocaml is and how they use it.
<Sfiv>
It almost seems tyhe company was founded with the purpose of using Ocaml.
<ollehar>
(perhaps the most important thing is not to get industrial usage, but to bring the field forward as a hole)
<jdoles>
Sfiv: I am pretty sure the purpose was to make money.
<jdoles>
ollehar: it certainly fails to do that.
<Sfiv>
Well, I'm sceptical, they do talk a looot about how they use OCaml and how awesome Ocaml is.
<jdoles>
ollehar: Coq, however, might be doing that.
<jdoles>
Sfiv: do you know why they do that?
<ollehar>
coq is made in OCaml, though, so :)
<jdoles>
Sfiv: they do that, because they need employees.
<Sfiv>
Because no one knows OCaml?
<ollehar>
but I guess it could be done in any language
<jdoles>
Sfiv: highly skilled employees, that is.
<companion_cube>
right
<jdoles>
Sfiv: most people hate employees.
<jdoles>
Sfiv: er Ocaml.
<jdoles>
(and that's just a fact)
<Sfiv>
Well, therein already lies the problem with OCam;'s industry potential.
<jdoles>
It requires a certain experience to appreciate OCaml.
<Sfiv>
How can you not hate a language with unneeded special syntax for mod hardcoded into the parser anyway?
<adrien>
ok, _that_ sucks
shinnya has joined #ocaml
<Sfiv>
Yeah, I know.
<ollehar>
because it has other good parts which weights it up?
<Sfiv>
Yeah but that's like a dealbreaker man
<jdoles>
The language per se isn't all that bad. It's just that everything around it sucks so badly on average.
<Sfiv>
That's why I like Haskell more, the only reason, that infix type constructors and infix operators aren't special.
<Sfiv>
I find some of the tools kind of good
<Sfiv>
But the syntax of OCaml is so extremely convoluted
<jdoles>
Try to find an OCaml IDE.
<jdoles>
*all* of them suck.
<Sfiv>
I have never found a need of an IDE ever
dant3 has quit [Remote host closed the connection]
<companion_cube>
jdoles: vim + merlin is pretty good now
<Sfiv>
besides, utop is the best terminal repl I have ever used.
<Anarchos>
Sfiv no ocaml is not convoluted at all
<jdoles>
If OCaml was such a great programming language, then how come there is nobody who hacked up one in a few months?
<Sfiv>
The syntax of OCaml has a looot of very specific things in its definition, ::, mod, printf
<jdoles>
utop is not the best; it's just OKish.
<Sfiv>
Know a better one for another language?
<jdoles>
Sfiv: bpython
<companion_cube>
much more effort is put into IDE for bad languages
<Sfiv>
Never tried that.
<companion_cube>
that's why java has so good IDEs :p
<jdoles>
Sure, but the end result is that even those bad languages work better in practice.
<Sfiv>
But OCaml's syntax falls into the domain of 'so convoluted that a typing error may result tino well formed syntax with a different meaning'
<def-lkb>
you should stick to them =]
<companion_cube>
jdoles: I stopped using popularity as a meaningful metric
Thooms has quit [Quit: WeeChat 0.3.8]
<companion_cube>
it would mean C, java and php are the best languages
<Sfiv>
the error message of acceidentially typing ; instead of ;; are especially beautiful.
<jdoles>
companion_cube: what I was saying has nothing to do with popularity.
<adrien>
ocaml's syntax is not very complicated
<Sfiv>
C is okay for what it wants to do, C is just used for things it's bad at.
<companion_cube>
jdoles: yes it has, if a language is popular it will eventually get a good IDE
<Sfiv>
I also am sceptical that C is still more performed than OCaml for "sufficiently large codebases"
<jdoles>
companion_cube: it has to do with that I don't want to be remembering every random API of every random programming language.
<Sfiv>
I'm pretty sure it's fast if you want to calculate N primes, but actual applications I feel more maintainable code might hust give you better performance
<jdoles>
companion_cube: I am a polyglot (like probably lots of people here).
<companion_cube>
jdoles: use merlin
arjunguha has joined #ocaml
<companion_cube>
it gives you type inference and completion
<Sfiv>
adrien, well, why isn'tit?
<companion_cube>
that's the most important
<jdoles>
companion_cube: I tried that, and it didn't work.
<Sfiv>
It has a lot of super special cases hardcoded into the syntax
<companion_cube>
jdoles: really?
<jdoles>
companion_cube: yes, really. Perhaps the author corrected all issues now.
<jdoles>
companion_cube: is the issue list at github empty now for merlin?
<jdoles>
If it's not, then there is no reason for me to even consider to look at it.
<adrien>
Sfiv: considering the number of default operators and items with special meaning to the parser, it cannot be very complicated
arjunguha has quit [Client Quit]
<jdoles>
(It just means it is abandonware.)
<companion_cube>
jdoles: wow.
<def-lkb>
<3
<companion_cube>
not many projects have an empty issue list
<companion_cube>
and merlin isn't an abandonware, it works pretty well (for me on my computers at least)
<Kakadu>
closing 10 issues and opening 11 is normal practice
arjunguha has joined #ocaml
<adrien>
jdoles: just letting you know
<Sfiv>
adrien, can't be easier than your average lisp
<adrien>
several merlin devs are reading you right now
<adrien>
Sfiv: of course but that's an extreme
<Sfiv>
Some things about OCaml's syntax are astounding though, why doesn't every language allow _ in numbers
<Sfiv>
That's like so easy yet brilliant
<jdoles>
companion_cube: not many projects are good enough to be used in the first place.
<Sfiv>
Why would you not do that, or it's escaping thing with spaces in strings
<jdoles>
Sfiv: _ in numbers?
<Sfiv>
Yeah
<jdoles>
Sfiv: what does 1_2 even mean?
<Sfiv>
1_000_000
<Sfiv>
12
<Sfiv>
It's ignored
<Sfiv>
So you can do 1_000_000_000_000
<adrien>
which is <3
<jdoles>
Sfiv: that's not a bad idea.
<Sfiv>
easier to read than 1000000000000
<companion_cube>
jdoles: but then, ocaml also has opened ticket, I believe
<Sfiv>
Well, Ocaml has it.
<companion_cube>
that means you shouldn't use it
<adrien>
22:09 Sfiv : Some things about OCaml's syntax are astounding though, why doesn't every language allow _ in numbers
<Sfiv>
And when I found out I was like 'Why doesn't every language have this?'
<adrien>
you can actually find that in the minutes of some caml consortium meeting iirc
<adrien>
was asked by some members several years ago
<jdoles>
companion_cube: exactly; if people are not capable of making a system which is free of error, why should I use their software? My software is free of error when I declare it to be done.
<companion_cube>
wow, declaring a project to "be done" is also quite unusual
<Sfiv>
jdoles, formally verified with coq?
<companion_cube>
usually they are maintained
<Sfiv>
Wouldn't it be wonderful if it turned out that the formal specification for compcert contained a minor subtle error
<Sfiv>
Ultimately you're always just displacing the problem with this stuff
<jdoles>
Sfiv: I disagree on that part.
<jdoles>
Sfiv: writing a specification is often much easier than writing a non-trivial implementation.
<jdoles>
That being said; C is a rather silly language.
<jdoles>
C has implementation defined behaviour.
kyrylo has quit [Read error: Connection reset by peer]
<Sfiv>
Well, yeah, you are displacing it to something easier to verify for a human I guess
<Sfiv>
So does Ocaml.
<jdoles>
I think that's incredibly old fashioned.
<Sfiv>
It's incrediblhy needed for whatC wants to do.
<jdoles>
Every valid program should have some formal meaning.
<Sfiv>
Why?
<jdoles>
Because then you have also eliminated most security issues.
<Sfiv>
The entire point in any case of different implementations is to allow them to make some choices.
kyrylo has joined #ocaml
<Sfiv>
Portable code should just not rely on using that
<jdoles>
It also makes programs easier to debug.
<Sfiv>
Well, that's not what C is all about.
<Sfiv>
C is supposed to be a 'portable assemlber in a better syntax'
<jdoles>
But it's really bad at doing that.
thomasga has joined #ocaml
<jdoles>
That's why there is C-- for example.
<jdoles>
I don't know how great C-- is myself.
<Sfiv>
C-- isn't "portable" assmbler.
<Sfiv>
IT's assembler in a better syntax.
<Sfiv>
It exposes too much to be called portable.
Kakadu has quit []
<jdoles>
I think all languages which cannot say about every structure (including those in arbitrary complex structures) what its size will be during any point of execution is not a language worth learning.
<jdoles>
/s/fix grammar
<Anarchos>
jdoles so you will stick to C language (without unions of course) derivatives ?
<Sfiv>
Well, an implementation can define that for itself.
<jdoles>
Because, if you can make such statements, you don't need a garbage collector anymore.
<Sfiv>
the point of a standard leaving that unspecified is to allow variety in implementation so you can pick the one that fits you.
<jdoles>
Anarchos: I think you didn't quite get it.
<companion_cube>
you still need a GC
<Sfiv>
Garbage collection is overrated, Stalin knows what's up.
<companion_cube>
because knowing the size doesn't mean you know the lifetime
<Sfiv>
Static lifetime analysis ftw.
<jdoles>
companion_cube: yes, it would.
<jdoles>
companion_cube: I said: during any point of execution.
<jdoles>
companion_cube: you can only know that if you also know it at the end.
<companion_cube>
yes, so ? how is the size related to the lifetime ?
<def-lkb>
companion_cube: informed arguments are not welcome
<jdoles>
If you know what it's going to be at the end, you can just preallocate that.
<companion_cube>
the problem is not allocation, it's de-allocation
<jdoles>
Hence, there is no need to 'collect garbage'.
<jdoles>
You would just overwrite that memory when it's no longer needed.
<companion_cube>
"when"
<def-lkb>
:DDDD
<companion_cube>
jdoles: well done, you just described a GC
<jdoles>
companion_cube: a compile time GC system, yes.
<jdoles>
companion_cube: one which doesn't need to chase pointers.
<companion_cube>
jdoles: assuming your compiler knows "when"
<jdoles>
I.e. instant, real-time GC.
<companion_cube>
for every path of execution and any point of the program
<jdoles>
Yes, that's what I said.
<companion_cube>
if x^3 + y^3 = z^3 then keep_x() else drop_x()
<companion_cube>
↑ what's the lifetime of x exactly?
<jdoles>
companion_cube: if you provide the proof, the compiler will know.
<companion_cube>
ah
<companion_cube>
ok, if you prove things that can work
<companion_cube>
the language is called ATS
<jdoles>
companion_cube: that's just one particular example of such a system.
<companion_cube>
the only point is that it makes programmers crazy :p
<Anarchos>
companion_cube ATS is the official replacment language for java if we want to switch at my work :)
<Anarchos>
companion_cube i told them that just looking the benchmark doesn't make the language easy to use ;)
<companion_cube>
good luck :D
<companion_cube>
the jump from java to ATS must be funny to observe
<Anarchos>
companion_cube in the same page they state that ocaml is not recommended, the gap to learn is too high