S11001001 has quit [Read error: Connection reset by peer]
igitoor has joined #ocaml
regnat has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
mawuli has quit [Ping timeout: 244 seconds]
eventualbuddha has quit [Read error: Connection reset by peer]
dch has quit [Ping timeout: 244 seconds]
dch has joined #ocaml
mawuli has joined #ocaml
_whitelogger_ has joined #ocaml
regnat has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Quit: Leaving.]
regnat has joined #ocaml
S11001001 has joined #ocaml
eventualbuddha has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
shinnya_ has joined #ocaml
jao has joined #ocaml
c74d has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
rgrinberg has joined #ocaml
NoNNaN has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
endiruna1 has quit [Ping timeout: 244 seconds]
Riviera_ has joined #ocaml
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
Submarine has quit [Remote host closed the connection]
c74d has quit [Remote host closed the connection]
__marius______ has quit [Ping timeout: 244 seconds]
shinnya_ has quit [Ping timeout: 256 seconds]
__marius______ has joined #ocaml
c74d has joined #ocaml
darkf has joined #ocaml
regnat has quit [Ping timeout: 244 seconds]
AltGr has quit [Ping timeout: 244 seconds]
regnat has joined #ocaml
icicled has quit [Ping timeout: 265 seconds]
regnat has quit [Ping timeout: 244 seconds]
regnat has joined #ocaml
mehdi_ has quit [Ping timeout: 265 seconds]
ddosia has quit [Ping timeout: 265 seconds]
ente has quit [Ping timeout: 265 seconds]
flxx has quit [Ping timeout: 265 seconds]
rom1504 has quit [Ping timeout: 265 seconds]
bitbckt has quit [Ping timeout: 265 seconds]
segmond has quit [Ping timeout: 265 seconds]
bitbckt has joined #ocaml
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
icicled has joined #ocaml
mehdi_ has joined #ocaml
rfv has quit [Ping timeout: 244 seconds]
mort___ has quit [Read error: Connection reset by peer]
ddosia has joined #ocaml
mort___ has joined #ocaml
bobpoekert has quit [Ping timeout: 244 seconds]
strmpnk has quit [Ping timeout: 244 seconds]
igitoor has quit [Ping timeout: 244 seconds]
flxx has joined #ocaml
rfv has joined #ocaml
cojy has quit [Ping timeout: 244 seconds]
bobpoekert has joined #ocaml
q66 has quit [Quit: Leaving]
strmpnk has joined #ocaml
Simn has quit [Quit: Leaving]
cojy has joined #ocaml
__marius______ has quit [Read error: Connection reset by peer]
__marius______ has joined #ocaml
Leonidas has quit [Ping timeout: 244 seconds]
Leonidas has joined #ocaml
ubbersith has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
BitPuffin has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
mawuli has quit [Ping timeout: 245 seconds]
segmond has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
msch has quit [Read error: Connection reset by peer]
c74d has joined #ocaml
strmpnk has quit [Ping timeout: 244 seconds]
msch has joined #ocaml
bitbckt has joined #ocaml
strmpnk has joined #ocaml
igitoor has joined #ocaml
Leonidas has quit [Ping timeout: 244 seconds]
rom1504 has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
thomasga has quit [Quit: Leaving.]
bitbckt has quit [Ping timeout: 244 seconds]
bitbckt has joined #ocaml
_whitelogger_ has joined #ocaml
<mcc>
update: by "forever" i mean "15 minutes"
<struk>
close enough
_whitelogger_ has quit [Excess Flood]
_whitelogger_ has joined #ocaml
andreypopp__ has quit [Ping timeout: 244 seconds]
flux has quit [Remote host closed the connection]
flux has joined #ocaml
andreypopp__ has joined #ocaml
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
samrat has joined #ocaml
n1ftyn8 has quit [Read error: Connection reset by peer]
n1ftyn8 has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
ubbersith has quit [Ping timeout: 252 seconds]
asakim has joined #ocaml
mawuli has joined #ocaml
govg has quit [Ping timeout: 255 seconds]
Leonidas_ has joined #ocaml
enitiz has quit [Remote host closed the connection]
asakim has quit [Remote host closed the connection]
regnat has quit [Ping timeout: 244 seconds]
regnat has joined #ocaml
marynate has joined #ocaml
c74d has quit [Remote host closed the connection]
mawuli has quit [Ping timeout: 244 seconds]
c74d has joined #ocaml
badkins has quit []
dch has quit [Ping timeout: 244 seconds]
dch has joined #ocaml
mawuli has joined #ocaml
regnat has quit [Ping timeout: 244 seconds]
regnat has joined #ocaml
fraggle_ has quit [Ping timeout: 244 seconds]
fraggle_ has joined #ocaml
regnat has quit [Ping timeout: 244 seconds]
MisaMisa has joined #ocaml
regnat has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
moei has joined #ocaml
c74d has joined #ocaml
enitiz has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
psy has joined #ocaml
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
regnat has quit [Ping timeout: 244 seconds]
marynate has joined #ocaml
regnat has joined #ocaml
_whitelogger_ has joined #ocaml
Arahael_Twin has joined #ocaml
Arahael has quit [Ping timeout: 256 seconds]
mawuli has quit [Ping timeout: 244 seconds]
rossberg has quit [Ping timeout: 244 seconds]
rossberg has joined #ocaml
rock_neurotiko has quit [Ping timeout: 244 seconds]
mawuli has joined #ocaml
<mcc>
Style question-- something I've caught myself doing in my ocaml code a lot is, in a tagged union declaration, saying "Rutabega of rutabega" (assuming a type named 'rutabega' exists)
<mcc>
...is this, like... weird? i suddenly realized i can't remember where I picked it up. do other people do this?
ebzzry has quit [Remote host closed the connection]
c74d has quit [Read error: Connection reset by peer]
matason has joined #ocaml
ente has joined #ocaml
ente has quit [Changing host]
ente has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
c74d has joined #ocaml
erikwr has quit [Quit: erikwr]
samrat has joined #ocaml
regnat has quit [Ping timeout: 244 seconds]
regnat has joined #ocaml
vanila has joined #ocaml
c74d has quit [Remote host closed the connection]
struk has quit [Ping timeout: 245 seconds]
c74d has joined #ocaml
pyon has quit [Read error: Connection reset by peer]
pyon has joined #ocaml
<rgrinberg>
mcc: i've seen it before in code
<rgrinberg>
there was a proposal for "inline" record declarations to mitigate the need for this
<rgrinberg>
anyhow, it's definitely common
<mcc>
ok
struktured has quit [Read error: Connection reset by peer]
struktured has joined #ocaml
enitiz has quit [Ping timeout: 244 seconds]
tnguyen has quit [Ping timeout: 264 seconds]
tnguyen has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
ygrek_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
bitbckt has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
struktured has joined #ocaml
Guest74383 has quit [Changing host]
Guest74383 has joined #ocaml
Guest74383 is now known as reynir
c74d has quit [Read error: Connection reset by peer]
mekaj has joined #ocaml
c74d has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
matason has quit [Quit: leaving]
bitbckt has joined #ocaml
Leonidas_ is now known as Leonidas
<Leonidas>
rgrinberg: I believe this proposal has been merged for 4.03
<mcc>
One thing I have been wondering... it seems like I'm allowed to say `let x = Token.{a=3; b=4}` as a shortcut for `{Token.a=4; Token.b=4}`... but I don't seem to be able to say `match x with Token.{a;b}`... is this surprising?
Tekk_` has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
igitoor has quit [Ping timeout: 244 seconds]
igitoor has joined #ocaml
psy has quit [Ping timeout: 255 seconds]
MercurialAlchemi has joined #ocaml
Tekk_ has quit [Ping timeout: 256 seconds]
c74d has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
psy has joined #ocaml
mekaj has joined #ocaml
<rgrinberg>
mcc: I think it's fine. let is for unpacking products and match is for unpacking sums
MercurialAlchemi has quit [Remote host closed the connection]
<mcc>
*thinks* i'm not sure i understand
MercurialAlchemi has joined #ocaml
<mcc>
i mean, i wish it were not this way, simply becuase in both cases i have the same problem (i do not want to type Packagename. over and over)
<rgrinberg>
oh..
<rgrinberg>
shouldn't this work? match x with {Token.a; b}
<rgrinberg>
also {Token.a=3; b=4}
ygrek has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
marynate has quit [Ping timeout: 244 seconds]
marynate has joined #ocaml
<Drup>
mcc: "Rutabega of rutabega" <- is rutabega the only member of the union ?
<flux>
I didn't actually know - or at least remember - about the first shorthand. I suppose that on the other hand is a shorthand for Token.({a=3; b=4}), there Token.() is a local open. patterns don't do local opens. but I think adding that has been discussed, maybe it'll come some day..
<Drup>
and, as rgrinberg said, {Token. a ; b } is better (because it will only use the fields a and b, not really open the module.
<flux>
the {Token.a; b} has been there for as long as I can remember
<flux>
hmm, actually maybe not!
<flux>
I seem to having been very excited when they came 8-)
<flux>
+remember
<flux>
(so they were probably introduced somewhere along the 3 version)
zwer_r has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
zwer has quit [Ping timeout: 250 seconds]
mekaj has quit [Ping timeout: 244 seconds]
nullcat has joined #ocaml
mekaj has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
mawuli has quit [Ping timeout: 244 seconds]
c74d has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
Averell is now known as Averell
mawuli has joined #ocaml
Averell has quit [Changing host]
Averell has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
mcc has quit [Quit: This computer has gone to sleep]
Haudegen has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
regnat has quit [Ping timeout: 244 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
MotorMe has joined #ocaml
regnat has joined #ocaml
MisaMisa has joined #ocaml
thomasga has joined #ocaml
govg has joined #ocaml
ygrek has joined #ocaml
manizzle has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
dsheets is now known as dsheets__
dsheets__ is now known as dsheets
Intensity has quit [Remote host closed the connection]
dsheets has quit [Quit: Leaving]
manizzle has joined #ocaml
marynate has quit [Quit: Leaving]
AlexRussia has quit [Ping timeout: 255 seconds]
Simn has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 255 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mekaj has joined #ocaml
Haudegen has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
huza has joined #ocaml
rock_neurotiko has joined #ocaml
ollehar has joined #ocaml
matason has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
bitbckt has joined #ocaml
manizzle has quit [Read error: Connection timed out]
manizzle has joined #ocaml
larhat has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
c74d has quit [Remote host closed the connection]
c74d has joined #ocaml
Kakadu has joined #ocaml
thomasga has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
ivan\ has quit [Ping timeout: 252 seconds]
fraggle-boate has quit [Ping timeout: 255 seconds]
dsheets has joined #ocaml
regnat has quit [Ping timeout: 245 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
regnat has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
vanila has quit [Ping timeout: 240 seconds]
vanila has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
mekaj has joined #ocaml
thomasga has joined #ocaml
bitbckt has joined #ocaml
ivan\ has joined #ocaml
c74d has quit [Read error: Connection reset by peer]
vanila has quit [Ping timeout: 245 seconds]
c74d has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
_andre has joined #ocaml
thomasga has quit [Quit: Leaving.]
<chris2>
is there any reason why opam doesnt expose the current ocaml via a symlink?
mekaj has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
huza has quit [Ping timeout: 245 seconds]
mengu has quit [Remote host closed the connection]
bitbckt has joined #ocaml
ingsoc has joined #ocaml
thomasga has joined #ocaml
mekaj has quit [Ping timeout: 244 seconds]
mekaj has joined #ocaml
thomasga has quit [Client Quit]
bitbckt has quit [Ping timeout: 244 seconds]
<companion_cube>
chris2: no idea, but I'd like it
micrypt has left #ocaml ["."]
bitbckt has joined #ocaml
<Drup>
its*
<Drup>
basically, you can't change it's place.
<chris2>
:)
<Drup>
hum, retargetable is not the right term
<Drup>
the compiler is not retargetable, there are issues to find pervasive and weird stuff
abel has quit [Ping timeout: 246 seconds]
dario_ has joined #ocaml
thomasga has joined #ocaml
<dsheets>
"relocatable" but i think a symlink would be ok? (would make it harder to understand which compiler binary is in use, though)
thomasga has quit [Client Quit]
ygrek has quit [Ping timeout: 264 seconds]
nonuby has joined #ocaml
nonuby has joined #ocaml
bitbckt has quit [Ping timeout: 244 seconds]
<nonuby>
page 19 of rwo, it defines a type scene_element, a few lines down, a fn with 2 args point and scene_element, is it just style that they choosen the same parameter name as the type name for scene_element?
ubbersith has joined #ocaml
thomasga has joined #ocaml
ingsoc has quit [Quit: Leaving.]
<dsheets>
nonuby, yes, they have different namespaces
ingsoc has joined #ocaml
<nonuby>
okay, cool, that seems to make sense, thanks
bitbckt has joined #ocaml
thomasga has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
Haudegen has joined #ocaml
thomasga has joined #ocaml
mawuli has quit [Ping timeout: 244 seconds]
mawuli has joined #ocaml
vanila has joined #ocaml
oscar_toro has joined #ocaml
mengu__ has joined #ocaml
huza has joined #ocaml
hekmek has joined #ocaml
hekmek has quit [Read error: Connection reset by peer]
hekmek has joined #ocaml
ubbersith has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
clrnd has joined #ocaml
ggole has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
govg has quit [Ping timeout: 245 seconds]
huza has quit [Quit: WeeChat 0.3.8]
MotorMe has quit [Ping timeout: 245 seconds]
<Leonidas>
so, ocaml is a lisp-2? ;-)
<def`>
:D why?
_5kg has quit [Ping timeout: 244 seconds]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_5kg has joined #ocaml
<ollehar>
aren't all languages a lisp?
<ollehar>
according to some law
<mrvn>
No. html is definetly not lisp
<pippijn>
html is very much lisp
<pippijn>
*especially* html is lisp
<pippijn>
it's even in similar syntax
<mrvn>
pippijn: lisp is turing complete. html is not.
<pippijn>
okay
<pippijn>
html is a data structure
<pippijn>
for lisp :)
<mrvn>
and I think you mean lambda calculus
<def`>
wait for html6, with <lam /> <app /> and <var />
<def`>
no but why a lisp-2 ?
<mrvn>
The theoretically basis for all programming languages is the lambda calculus. Even if many languages don't even know it.
samrat has quit [Quit: Computer has gone to sleep.]
jcloud has quit [Quit: Connection closed for inactivity]
<acieroid>
Leonidas: a lisp-2 has a different namespace for variable and functions, ocaml doesn't
<mrvn>
what's a variable?
<pippijn>
acieroid: that's a bit odd
<pippijn>
acieroid: ocaml doesn't have variables
<acieroid>
variable in the sense, a let-bound value
<pippijn>
ok
<def`>
yep
<pippijn>
ocaml has those
<pippijn>
but in ocaml, there are no functions
<pippijn>
there are only functional values that can happen to be bound to a name
<def`>
so it's not a lisp-2.
<acieroid>
indeed.
<mrvn>
except "x 1" gets different error messages depending on wether x is a function or not.
<def`>
that's the just the typechecker trying to be friendly, nothing to do with namespaces
<mrvn>
yeah. But it should just say: This vallue is applied to many arguments.
<pippijn>
mrvn: but whether x is a name or not doesn't matter
<mrvn>
pippijn: x is always a name.
<pippijn>
why?
<pippijn>
(fun () -> ()) 1
<mrvn>
pippijn: because it can't be anything else. [a-z...]* is an ident, a name.
<mrvn>
pippijn: ahh, that's isn't x. :)
<def`>
is x a meta-variable ranging over variables or terms :P
<pippijn>
ok, you actually meant the code written as "x 1"
rand000 has joined #ocaml
<pippijn>
then yes
<mrvn>
pippijn: no, you win.
<mrvn>
# 1 1;;
<mrvn>
This is not a function; it cannot be applied.
<mrvn>
# (fun () -> ()) () ();;
<mrvn>
It is applied to too many arguments; maybe you forgot a `;'.
<mrvn>
That reminds me. I wanted to activate travis for my git repositories.
<Leonidas>
acieroid: a lisp-2 also lacks types
<MercurialAlchemi>
pippijn: is this travis' fault?
<pippijn>
MercurialAlchemi: yes, because it's using 2-4 year old software
<Leonidas>
i was just joking because it has different namespaces for types and bindings
<pippijn>
yeah, and that makes a lot of sense
fraggle-boate has joined #ocaml
<MercurialAlchemi>
looks like a classpath issue to me...
<pippijn>
MercurialAlchemi: are you looking at the line I linked to?
<MercurialAlchemi>
ah, probably not
<pippijn>
oh, I see
<pippijn>
that's broken
<pippijn>
it doesn't jump to the line
<pippijn>
[error] /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named 'max_align_t' in the global namespace
<pippijn>
gcc 4.8 has a bug that breaks on my code
<Leonidas>
there's a neat script in github.com/ocaml for building
<pippijn>
clang 3.4 is fine
<MercurialAlchemi>
(unless the idea is to stress test the travis console)
<pippijn>
haha
<MercurialAlchemi>
Travis could be better
<MercurialAlchemi>
but on the other hand, free CI for OSS projects? that's invaluable
<pippijn>
yes
<pippijn>
it's great :)
<pippijn>
but I do wish they upgraded to ubuntu stable at some point
<pippijn>
it's soon out a year
<mrvn>
can't you say which gcc version you require?
<mrvn>
worst case check out gcc, build it and use it in-place.
<whitequark>
50 minute limit
<mrvn>
gcc doesn't take that long to build.
<mrvn>
And doesn't ci cache builds?
nonuby has quit [Ping timeout: 256 seconds]
<whitequark>
it does not
<MercurialAlchemi>
wget a binary :)
<whitequark>
yes, installing a package is what you should be doing
<mrvn>
anyway. I just wanted to say there are ways around it.
<mrvn>
whitequark: That's what I ment.
<pippijn>
travis-ci will in the future be able to cache partial build products
<pippijn>
such as dependencies
<pippijn>
when that comes out, I will be using it
<pippijn>
it's already out in a limited form, I can't remember why I couldn't use it
<mrvn>
pippijn: I would hope it would do that automatically.
<pippijn>
mrvn: it can't really
dsheets has quit [Ping timeout: 256 seconds]
<pippijn>
how would it figure out that a piece of cache is no longer required?
<mrvn>
pippijn: unused the longest and disk gets full deletes it
<whitequark>
disk doesn't get full
<pippijn>
does linux save atime?
<whitequark>
i mean, unless you can fill the entirety of AWS...
<mrvn>
pippijn: 1) who cares, 2) unless you disable it
<pippijn>
1 is required for "unused the longest"
<mrvn>
whitequark: space costs money. so you set some limit
<whitequark>
anyway that's a terrible idea, because you can't just cache random build products
<mrvn>
pippijn: no. the ci build checks the depends and sees what gets used on a much higher level than file basis.
<mrvn>
whitequark: 'sha of the commit + sha of the command line / script to build it ==>> result' cache
<mrvn>
whitequark: + recursive dpeneds if it has any
hekmek has quit [Quit: Verlassend]
<pippijn>
mrvn: how would it do that for custom-built dependencies (for which the caching provides the biggest impact)?
jao has joined #ocaml
<mrvn>
pippijn: that's where the sha of the command line / script to build it comes from
<pippijn>
I see
<pippijn>
yeah, it could do that
<mrvn>
pippijn: The part that says: checkout foo, run configure --whatever, run make
<pippijn>
but you would need more semantics in the yml file
<mrvn>
maybe
<pippijn>
e.g. I build toxcore, which depends on opus+vpx+sodium
<pippijn>
if any one of these 3 changes, toxcore needs to be rebuilt
rock_neurotiko has quit [Ping timeout: 264 seconds]
<mrvn>
On the other side I would like for a library to export a set of prebuild packages. Like for every stable release. Then if some user of the lib wants to test build against multiple versions he doesn't have to rebuild the lib every time.
<pippijn>
this dependency information needs to go in the yml file
<mrvn>
pippijn: or at least into the cache.
<pippijn>
and where does it come from, if not from the yml file?
<mrvn>
pippijn: cached during build, where it checks out and build opus+vpx+sodium
<pippijn>
if opus changes, vpx doesn't need to be rebuilt
<mrvn>
pippijn: building toxcore has some line somewhere that tells ci to build against opus+vpx+sodium
<pippijn>
14:02 < pippijn> this dependency information needs to go in the yml file
<mrvn>
pippijn: in toxcore, not in the yml file for users of toxcore
<pippijn>
you want the dependency itself to communicate information to ci?
<pippijn>
I don't control toxcore or any other dependency
<pippijn>
I don't control google-glog
<pippijn>
or gcc, if I depended on compiling it
enitiz has joined #ocaml
<mrvn>
pippijn: Having an override file for projects that don't provide dependency infos would be possible. But generally every project should have all the infos to be cacheable itself. Otherwise most users won't be able to use caching.
<mrvn>
or do it wrong.
<pippijn>
hm
<pippijn>
mrvn: nice idea
<pippijn>
won't happen
<pippijn>
I'd like it to be that way, though
Hannibal_Smith has joined #ocaml
<pippijn>
it would make building my ocaml projects (which have some 3-4 levels deep dependencies on my own projects) much faster
<pippijn>
currently I use a launchpad ppa for that
<mrvn>
pippijn: for your own project you could cache yourself. Check a git repository for a pre-build tag and if not build and push the result back
<pippijn>
I'd like to automatically rebuild dependent things when a dependency changes
dsheets has joined #ocaml
<mrvn>
pippijn: I hacked that together for debian packages once and then, just for fun, pushed a new glibc into it. ==> rebuild everything.
<mrvn>
I think that would be a nice addition to ci within limits.
<mrvn>
How do you use ci with ocaml? Use opam?
<pippijn>
no, I haven't touched ocaml in half a year
<pippijn>
and I haven't touched my own projects in 1.5 years
<mrvn>
dario_: I'm missing something like "open Foo"
<dario_>
Using "-open", as described in the manual
<dario_>
mrvn: Check out that section of the manual. All your doubts will be resolved... :-)
<mrvn>
dario_: ok. That was my question.
marynate has joined #ocaml
<mrvn>
my ocaml is too old :(
<dario_>
mrvn: Probably...
<mrvn>
dario_: I think you just have to add a tag that foo.ml has no depends.
<dario_>
mrvn: that should do the trick!
psy has quit [Quit: Leaving]
marynate has quit [Max SendQ exceeded]
<dario_>
My OCamlbuild-fu is not great though. Does OCamlbuild support that out-of-the-box, or do I have to write a plugin?
marynate has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
<mrvn>
dario_: sorry, can't find an example but I think it works out-of-the-box
<mrvn>
dario_: I think there was an example on the ML recently in the thread where ocamldep picks the wrong module.
jonludlam has joined #ocaml
<dario_>
mrvn: Ah, thanks. I'll check it out...
dsheets has joined #ocaml
adrien_znc has joined #ocaml
badkins has joined #ocaml
<ingsoc>
is unit testing common practice in ocaml community ?
<companion_cube>
not as much as in dynamic languages, but yeah, OUnit is pretty popular
<mrvn>
ingsoc: it should be
<ingsoc>
Just wondering because I have found unit testing to be not so critical in how I find I write code in functional language compared to imperative. I have been doing more functional, end to end testing rather than unit testing of late. I guess it is a case of where is your/my time best spent on the grand scheme of developing a product
<mrvn>
ingsoc: 90% of bugs are type errors that other languages need unit tests for.
<ingsoc>
I guess if developing something like a json parser/encoder library to be used by the wider community then unit tests maybe more applicable
<ingsoc>
ok
<companion_cube>
if you design your types properly, it filters a lot of bugs by encoding invariants in types
<ingsoc>
I was just curious on the thoughts of a different community that was all
<mrvn>
Apropo unit testing. I'm wrote a lexer/parser module where the new cool feature is that it uses GADTs for type safety. How do I test that it actually fails when wrong types are used?
<companion_cube>
open utop, type wrong types, profit ;)
<mrvn>
unit testing seems to be for testing that something works for correct input but not to test that it fails (to compile) for wrong input.
<MercurialAlchemi>
FP and strong typing are not a silver bullet
Hannibal_Smith has quit [Quit: Leaving]
<mrvn>
companion_cube: automatically obviously.
<ingsoc>
companion_cube: thanks for the article, will read when I get back
<MercurialAlchemi>
but if you design your types well, you filter out uninteresting bugs
<companion_cube>
mrvn: I think the simplest is the ocamlc way: a small .ml file for each test
<companion_cube>
and a script/makefile that runs them all and checks that they fail
samrat has joined #ocaml
struk has joined #ocaml
<ingsoc>
I guess I have been falling back on erlangs error recovery and detection system to identify problems with code that has not been thoroughly tested. Erlang allows the code to be built in a way that errors like that do not kill the system but they are logged so that later you can check the log file to identify programming errors then retrospectively fix the problem without incurring downtime
<companion_cube>
so you're writing server-side code?
<ingsoc>
erlang is dynamically typed though, and from my brief use of ocaml aI can see where ocaml is definitely an improvement, you get the type safety without thee hassle like in java
<companion_cube>
indeed, the types are much more useful
<companion_cube>
starting with: no NullPointerException
<def`>
Not_found
<companion_cube>
I didn't say "no exceptions"
<pippijn>
ingsoc: I don't do unit testing in ocaml
<pippijn>
ingsoc: I do it a lot in java and C++
<flux>
type bool = true | false | FileNotFound
<pippijn>
ingsoc: in ocaml, I write programs that do a big thing, and I just test that big thing exhaustively
<Gertm>
Erlang can be 'sort of' typed with the dialyzer type checker.
<Gertm>
But it's not an enforcing thing.
<Gertm>
Works well though.
<mrvn>
python is the worst
<ingsoc>
I find unit testing slows me down and also when I did have a fair sized test suite I tended to live with a design rather than change to something better I couldn't be bothered to change all the tests, this forced me to stick with a less than optimal solution/architecture but ti was supposedly less buggy due to the tests
<ingsoc>
i guess it is a tradeoff
<pippijn>
if I'm writing a library, I do use unit testing
<ingsoc>
pippijn: yeah this is deffo a place where unit testing is more of a must
<pippijn>
I test every public API function
<mrvn>
pippijn: the app that uses the library is a nice unit test :)
<pippijn>
but none of the private ones
<pippijn>
mrvn: so, most of my apps are actually implemented as library, with a small frontend
<pippijn>
mrvn: in that case, I don't unit test the library
<companion_cube>
I agree with pippijn for big programs and global tests
<companion_cube>
but maybe that's because programs usually written in Ocaml tend to that well
<mrvn>
I should write unit tests but I usualy rather spend my time using it than adding unit tests.
<pippijn>
I don't think unit tests are useful if you have an exhaustive use case for your library
<pippijn>
which is usually the case for me
<pippijn>
if you're writing a library for the sake of writing a library, then you need unit tests
<pippijn>
because you're not using it :)
<pippijn>
I don't usually do such a thing
<mrvn>
but then why write a library?
<pippijn>
for others
<pippijn>
I don't know :)
<companion_cube>
well sometimes you write quite general a library, and want bugs to show before the library is used
<pippijn>
yeah, but my general library is used exhaustively in my programs
<companion_cube>
for libraries, qtest is pretty nice
<mrvn>
I write a library with a use case in mind. So I write the use case too and test.
<pippijn>
yes
<companion_cube>
also, something else that works well in OCaml is debugging with Printf
<companion_cube>
I never really needed a debugguer
<mrvn>
I've never gone and though: Hey, we could write a library to do foo. Maybe someone will find that usefull in a hundred years.
<mrvn>
+t
<ingsoc>
companion_cube: a repl is also very helpful for developing code
<ingsoc>
i refuse to use a language without one now
<pippijn>
mrvn: I'm writing a library right now for something that I will use someday in the future
<pippijn>
mrvn: but that future is quite far away
<pippijn>
mrvn: so I have unit tests
<pippijn>
mrvn: but this library is written in java/scala/c++
<pippijn>
I might not do that when I'm using ocaml
<mrvn>
pippijn: well, that is your first mistake
<pippijn>
because writing programs in ocaml is so much easier
<pippijn>
and writing correct ones is so much easier
<pippijn>
mrvn: it's a well-informed choice
<pippijn>
I have a goal, and these are the tools best fit for that goal
<mrvn>
pippijn: it's your choice to make mistakes. :)
<pippijn>
using ocaml would be a mistake
<pippijn>
I am writing this for an android application
<pippijn>
the UI is written in scala
<pippijn>
writing the backend in ocaml would cause a lot of pain in the bridge implementation
marynate has joined #ocaml
<mrvn>
Anyone used ocaml on android?
<whitequark>
me
<pippijn>
it might be interesting to run the service as pure ocaml code and communicate via RPC
<ingsoc>
yeah but it is still a way for processes to communicate
<ingsoc>
there is also a inter thread mecahnism in zmq
<whitequark>
pippijn: zmq doesn't have to use network, you can use inproc:// sockets
<whitequark>
zero copy communication within one address space
<whitequark>
well, arguably zmq is overkill for that, you could use *just* two C calls or one unix pipe, actually.
<whitequark>
could be handy if you already have a zmq interface, though
<pippijn>
whitequark: ah, nice
<pippijn>
mrvn: actually I might change to ocaml
<pippijn>
I'm going through a bit of pain trying to get something like Lwt in C++
<ingsoc>
you can use zmq to round robin req/resp to multiple backend processes and they could be in process thread, OS processes or on a different machine and written in different languages
<adrien>
"a bit"
<adrien>
(of pain)
<pippijn>
:)
<ingsoc>
anyone looked at f#, how does it compare to ocaml ?
<whitequark>
ingsoc: assuming you actually need that and willing to add a sizable library to your projec
unix_beard has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
<ingsoc>
well, yeah, I was just clarifying capabilities as pippijn: seemed confused as to what it actually does
<mrvn>
What bugs me most in zmq is that sometimes after a server restart clients can't reconnect and need to be restarted too.
<mrvn>
The client closing the socket and opening a new oen doesn't help. SOmething internal in zmq breaks.
<mrvn>
s/oen/one/
<pippijn>
=== 36 to install ===
<pippijn>
installing jenga
<whitequark>
yes, these things in zmq make me doubt its practicality
<pippijn>
alright then
<mrvn>
I'm also missing an inline monitoring interface.
<pippijn>
[ERROR] The compilation of conf-libpcre.1 failed.
<pippijn>
I'm glad to be back to ocaml's awesome infrastructure
rock_neurotiko has joined #ocaml
thomasga has quit [Quit: Leaving.]
<whitequark>
simply don't touch anything related to core
<whitequark>
:]
shinnya_ has joined #ocaml
<pippijn>
whitequark: libpcre?
<pippijn>
I'm going to try jenga
<vanila>
core is bad??
<pippijn>
whitequark: I don't think zero copy communication between ocaml and java is feasible
<mrvn>
pippijn: only with Bigarray on the ocaml side
<pippijn>
mrvn: how do you get a mutable reference to java memory?
<pippijn>
pointer
<mrvn>
pippijn: mmaping shared memory?
<pippijn>
whitequark: alternatively, touch *only* things related to core
<pippijn>
mrvn: hm, yes
hbar has quit [Quit: WeeChat 0.4.2]
<pippijn>
but that doesn't exist on android, I think
<pippijn>
MappedByteBuffer is NIO
<mrvn>
don't share data structures. Use message passing.
<companion_cube>
nanomsg seems more reasonable than zmq
<chris2>
how can i run corebuild with ocamlcp?
<pippijn>
mrvn: sure, but if you can get safe zero-copy message passing, that's nice :)
<mrvn>
pippijn: marshal into a Bigarray and then zero-copy send it.
BitPuffin has joined #ocaml
<pippijn>
mrvn: and how does java read it without copying?
<mrvn>
pippijn: not my problem. I don't use java
<pippijn>
right
<MercurialAlchemi>
companion_cube: are there bindings for it?
<pippijn>
ocaml protobuf uses Core
<whitequark>
pippijn: well, zero copy protobuf decoding will probably be possible
<whitequark>
after than you copy data
<pippijn>
whitequark: you have a deriving protobuf, right?
<whitequark>
companion_cube: nanomsg doesn't have authentication
<pippijn>
does it use ocaml-protobuf?
<whitequark>
pippijn: yes
<whitequark>
no
<pippijn>
what does it do?
<whitequark>
it has its own protobuf codec implementation (which is about 200 lines)
<pippijn>
nice
<pippijn>
does it support bigarray?
<whitequark>
in fact the next version of ocaml-protobuf will use that codec
<whitequark>
no, but there is a feature request and iirc someone is working at it
<whitequark>
adding support would be trivial
<whitequark>
don't even need to touch any of the ppx code
<toolslive>
I'm having some problems with opam: I have lwt not installed and 2.4.7 available and yet, if I install fe lambda-term, opam wants to install lwt.2.4.5, while the dependency states: lwt >= 2.4.0
leowzukw has quit [Ping timeout: 246 seconds]
<toolslive>
why doesn't it go for lwt.2.4.7 ?
<whitequark>
which opam version?
<whitequark>
is aspcud installed?
leowzukw has joined #ocaml
<toolslive>
1.2.0
<MercurialAlchemi>
pippijn: do you have libpcre installed?
<pippijn>
MercurialAlchemi: no :)
<pippijn>
now I do
<MercurialAlchemi>
probably didn't help
<pippijn>
it did
<dario_>
toolslive: There were some problems with opam and some versions of aspcud
<pippijn>
but the error message didn't say that
<toolslive>
I don't have that lib installed
<pippijn>
it just failed and said nothing to do
<dario_>
toolslive: which OS are you running?
<MercurialAlchemi>
pippijn: well, that's just to keep you on your toes
<toolslive>
linux.
<dario_>
toolslive: could you be more specific?
<vbmithr>
toolslive: do you have aspcud installed ?
<dario_>
I think the problems were with the aspcud shipped in Ubuntu 14.04
<toolslive>
3.13.0-44-generic #73-Ubuntu
<dario_>
(can someone confirm this?)
<dario_>
toolslive: what version of Ubuntu is that kernel?
<vbmithr>
toolslive: if for some reason aspcud is not installed/working, forget about using opam.
samrat_ has joined #ocaml
ygrek has joined #ocaml
rock_neurotiko has quit [Ping timeout: 255 seconds]
<toolslive>
it's an ubuntu on x86 and I don't have aspcud installed.
<dario_>
I suspect toolslive is running Ubuntu 14.04 (Trusty), though they won't say
<pippijn>
what's the current hotness for ocaml editing in vim?
<leowzukw>
Installation of ojs-base is in progress
<leowzukw>
Thanks everybody!
manizzle has quit [Ping timeout: 252 seconds]
<vbmithr>
no worries
<MercurialAlchemi>
we need an aspcud bot
leowzukw has quit [Quit: leaving]
thomasga has joined #ocaml
amirmc has quit [Quit: Leaving.]
axiles has joined #ocaml
<toolslive>
or a big fat opam warning.....
girrig has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
vpm_ is now known as vpm
samrat_ has quit [Ping timeout: 264 seconds]
larhat has joined #ocaml
<pippijn>
whitequark: does opam-android support platform 10?
<acieroid>
r
psy_ has joined #ocaml
Arsenik has joined #ocaml
samrat has joined #ocaml
axiles has quit [Ping timeout: 265 seconds]
<whitequark>
pippijn: I don't understand the question
<whitequark>
what is "platform 10"?
<companion_cube>
almost the same as platform 9 3/4
<pippijn>
whitequark: android 2.3.3
<whitequark>
pippijn: so API level 10?
<pippijn>
yes
<tobiasBora>
Hello,
<whitequark>
yes, it supports any API level as far as I understand
<whitequark>
but you need to use ndk r10c (or later, though there are no newer ones so far)
<whitequark>
(it's included in the distribution)
chinglish has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
<tobiasBora>
I would like to know, is it possible to convert a personal type object defined like let direction = Up | Down | Left | Right; into number ? (for example to select a random direction without a need to define it's own int_of_direction function ?
<thizanne>
tobiasBora: let direction_to_int : direction -> int = Obj.magic
<thizanne>
Up will be 0, Down 1, and so on
<tobiasBora>
Ok great, thank you !
<thizanne>
but usually you should not use this function
<tobiasBora>
I understand, Obj.magic has bad reputation ^^
<tobiasBora>
(And in my dream I would like to be able to define a type like an objet (for example type user = {name: BddString of string; password: BddString of string; age: BddInt of int}... and autogenerate function like "add_user_in_bdd", "remove_user_in_bdd", "get_user_from_name"...
<tobiasBora>
)
jwatzman|work has joined #ocaml
demonimin has joined #ocaml
dsheets has quit [Ping timeout: 272 seconds]
<mrvn>
tobiasBora: Add a constructor name before it and get a recent ocaml
<mrvn>
tobiasBora: and learn ppx
demonimin_ has quit [Ping timeout: 264 seconds]
<tobiasBora>
mrvn: I'll do it later !
<tobiasBora>
(I first finish other important project, and then I must give it a try !)
mort___ has joined #ocaml
Hannibal_Smith has quit [Remote host closed the connection]
<pippijn>
can merlin show the type of the expression under the cursor in vim?
<smondet>
pippijn: yes <leader>t or alike
<MercurialAlchemi>
:TypeOf
<pippijn>
ah
<pippijn>
great
<pippijn>
thanks
<pippijn>
\t works
<MercurialAlchemi>
it also does omni-completion
mort___ has quit [Client Quit]
<MercurialAlchemi>
and you have to try :Destruct
<mrvn>
I want a bitfield enum type that I can match. Something like type flags = Read | Write | Exec [@@bitfield] match flags with Read @ Write -> ...
MisaMisa has joined #ocaml
<pippijn>
oh wow, jenga is terrible at error messages
ygrek has joined #ocaml
mort___ has joined #ocaml
<pippijn>
I think these new ocaml annotations are so ugly :(
nullcat has joined #ocaml
<whitequark>
mrvn: that's easy to implement, actually
<mrvn>
even the matching?
jonludlam has quit [Quit: Coyote finally caught me]
<whitequark>
yes
<whitequark>
well, with some restrictions
<whitequark>
I want general-purpose match extensions but...
MercurialAlchemi has quit [Remote host closed the connection]
<pippijn>
unapply :)
<mrvn>
creating constructors for all possible combinations or convert to int and constants?
<pippijn>
mrvn: the latter
<pippijn>
the former doesn't scale
MercurialAlchemi has joined #ocaml
<pippijn>
I'm pretty sure the ocaml compiler will choke if you feed it 268435455 constructors
<mrvn>
pippijn: if you have enough ram
nullcat has quit [Client Quit]
<pippijn>
mrvn: I do
<pippijn>
want to try?
<whitequark>
with 0-ary constructors you can create max_int of them
<pippijn>
you can
<mrvn>
{ echo "type t ="; for i in $(seq 999999); do echo " | C$i"; done; echo " let x = C0"; } | ocamlc -o foo
mort___ has quit [Quit: Leaving.]
<whitequark>
you can't drive ocamlc like that
larhat has quit [Ping timeout: 246 seconds]
<whitequark>
haha, stack overflow
larhat has joined #ocaml
<pippijn>
yep
<pippijn>
ulimit -s unlimited
<pippijn>
still stack overflow
<pippijn>
ocamlc.opt
mort___ has joined #ocaml
<whitequark>
OCAMLRUNPARAM=l=50M
<pippijn>
it only took 16 seconds
<pippijn>
that's kind of impressive
<pippijn>
mrvn: C0 is not defined :)
<whitequark>
... ocamlc took 1:20 and ate 1.2G
<pippijn>
when it is, it takes 24 seconds
<pippijn>
ocamlc.opt test.ml 23.79s user 0.71s system 99% cpu 24.537 total
<pippijn>
let's drive it up
<mrvn>
is it linear?
<pippijn>
don't know, I'm still writing 9999999 lines
<pippijn>
could be faster if it weren't zsh
<pippijn>
let's use perl instead
<pippijn>
oh it's done
<mrvn>
try 10, 100, 1000
<pippijn>
running ocamlc
<pippijn>
if it's linear, it should take less than 5 minutes
lambdahands has joined #ocaml
mort___ has quit [Quit: Leaving.]
<pippijn>
mrvn: I guess not
<pippijn>
it's still running
<pippijn>
8G memory now
<mrvn>
20 more minutes for quadratic
<pippijn>
I'll run a second one on smaller numbers
arj has joined #ocaml
<pippijn>
ocamlc.opt test.ml 1.22s user 0.06s system 99% cpu 1.281 total
<pippijn>
yeah
<pippijn>
so that's 100K
<pippijn>
ocamlc.opt test.ml 2.86s user 0.28s system 99% cpu 3.138 total
<MercurialAlchemi>
my daughter is asking me the maximum size of a string in OCaml
<pippijn>
ocamlc.opt test.ml 4.89s user 0.35s system 99% cpu 5.244 total
<pippijn>
300K
<pippijn>
ocamlc.opt test.ml 6.89s user 0.31s system 99% cpu 7.201 total
samrat has quit [Quit: Computer has gone to sleep.]
<pippijn>
mrvn: quadratic
q66 has joined #ocaml
<MercurialAlchemi>
thanks
<pippijn>
the other one is now at 11G
endiruna has joined #ocaml
<pippijn>
the second largest process is zsh at 1.2G
<pippijn>
zsh might have a memory leak :)
arj has quit [Quit: Leaving.]
<pippijn>
0.012t for ocamlc.opt
<endiruna>
hi i would like to make a function which swaps two functions in a list. I know one can do it in functional programming but I would like to convert the list to an array and then do what I would have done in C and then convert the array back to a list. i am trying to do it but I am not clear on the syntax that i should follow. here is a sample perhaps someone could tell me how the functions should proceed
<endiruna>
mrvn: so you mean every line should have in?
<mrvn>
no.
<pippijn>
endiruna: every line with let except the first one should have in
<mrvn>
only those with let
<pippijn>
endiruna: every other line with an expression except those starting with let and the last one should have a semicolon
<mrvn>
That error is verry odd though.
<struk|work>
hcarty: hey, do you have any particular plans for https://github.com/hcarty/ocaml-plplot ? I found it much easier to work with than the main plplot repo
<endiruna>
i see! :)
<mrvn>
How does the parser manage to get the () mismatched in that code?
<endiruna>
thanks mrvn and pippijn !
<pippijn>
ocamlc.opt test.ml 1351.14s user 15.55s system 99% cpu 22:52.58 total
MrScout has joined #ocaml
<pippijn>
mrvn: it's done
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<endiruna>
so to summarize in the body of the function each time there is a definition of a variable i should put a let followed by a in. if I want to make imperative changes i just put them followed by a semicolon ;
<endiruna>
is that right?
<mrvn>
no. there are no variables
<pippijn>
mrvn: that's 10M constructors
<pippijn>
so you can have 23 bits
<pippijn>
24 bits might still be ok
<pippijn>
you only need 16 million
<mrvn>
pippijn: int_max is ok
<pippijn>
25 will become problematic, with 33 million
<pippijn>
mrvn: int_max is not going to finish on this machine
<pippijn>
it will terminate, but not successfully
ygrek has quit [Ping timeout: 272 seconds]
<pippijn>
-rw------- 1 pippijn eng 247M Jan 14 18:20 test.cmi
<mrvn>
pippijn: try 33bit on a 64bit system :)
<pippijn>
this is a 64 bit system
<pippijn>
but I don't think 33 bits will finish in my lifetime
<mrvn>
I wonder if you exhaust the hash function domain before you run out of bits
pyon has quit [Read error: Connection reset by peer]
<mrvn>
or is the hash function 63bit on 64bit systems?
<pippijn>
it probably is
* pippijn
tries
<whitequark>
mrvn: hash function is only for polymorphic variants
<mrvn>
whitequark: ahh, I forgot
<pippijn>
nope
<whitequark>
regular variants are directly mapped to ints
<pippijn>
seems to be 32 bit
<ingsoc>
how can i get a range of integers, like [1 .. X ], or is there a builtin function
<mrvn>
so try to build a polymorphic variant type with 2-4 billion constructors.
<mrvn>
ingsoc: no such function, make one yourself
<pippijn>
given that normal ones took 22 minutes for 10 million constructors
<whitequark>
are you seriously discussing this or what?
<pippijn>
I don't think 2-4 billion polymorphic ones are going to finish
<pippijn>
whitequark: curiosity
samrat has joined #ocaml
flx has joined #ocaml
<pippijn>
whitequark: it took 13GB and 22 minutes for 10 million constructors
<whitequark>
right
<mrvn>
pippijn: try polymorphic ones
<pippijn>
I have enough ram for 2 billion constructors
<pippijn>
but not enough time
<ggole>
Faster to patch the compiler.
<pippijn>
ggole: to do what?
<ggole>
To not take that long.
flux has quit [Ping timeout: 244 seconds]
<pippijn>
yes
<pippijn>
faster
flx is now known as flux
pyon has joined #ocaml
<ingsoc>
what about list comprehensions
<mrvn>
what about it?
<ingsoc>
wikipedia references batteries included lib for list comprehensions
<ingsoc>
does this mean I need to install that to use them
<mrvn>
no
<ingsoc>
oh it just means it extends list comprehensions syntax for other collections ?
olauzon has joined #ocaml
jprakash has joined #ocaml
chinglish has quit []
toolslive has quit [Quit: Leaving]
vanila has quit [Quit: Leaving]
enitiz has quit [Ping timeout: 255 seconds]
<badkins>
Does OCaml have a compare_and_swap primitive ?
<badkins>
If not, I suppose using the FFI may suffice?
<pippijn>
badkins: ocaml doesn't have parallel execution of ocaml code
<badkins>
so the gil is enough?
<badkins>
I'm hoping the OCaml multi-core comes to fruition though, so I'm not sure I want to depend on that for the long term.
enitiz has joined #ocaml
<pippijn>
"presents an interesting set of challenges"
MrScout has quit [Ping timeout: 245 seconds]
<pippijn>
this seems to be part of the first sentence of 50% of all papers
<Leonidas>
kinda annoyed by reinventing the wheel dozens of times
<Leonidas>
n stdlibs, 2 async libraries, now how many do syntaxes?
enitiz has joined #ocaml
<MercurialAlchemi>
well, different wheel shapes can coexist for a little while until adoption shows which one is the better one
<MercurialAlchemi>
after that, it's a good idea to standardize
<Drup>
omonad has historic significance but I don't understand why yallop adopted it.
<Leonidas>
Drup: because it was historically the first?
<mrvn>
The triangular wheel is clearly superior to the square wheel. One less *clack* per revolution.
<Drup>
Leonidas: yes, and because it was done with ppx without ppx (sort of)
<Drup>
it was in 4.01 when you could register an ast rewriter but you had no ppx syntax
<Leonidas>
well, it's a port of pa_monad I think
<Drup>
and it was probably one of the first ast rewriter
<Drup>
it was useful as an example of "how to do one"
<MercurialAlchemi>
mrvn: clearly
<Drup>
I'm personally fairly fond of penrose wheels.
<Leonidas>
I'm not even sure the do notation is that useful without polymorphic bind operators. Maybe with modular implicits?
<Drup>
Leonidas: that's precisely why I don't care at all about the profusion of do notations :D
mearnsh has quit [Ping timeout: 272 seconds]
ingsoc has quit [Quit: Leaving.]
mearnsh has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
NSA360 has joined #ocaml
<hcarty>
struk|work: I'm glad to hear it! I do intend to keep that repository up to date.
<struk|work>
hcarty: excellent. I intend to keep using it then. What are you thoughts on also publishing it to opam?
<hcarty>
struk|work: opam is planned of course, both an 'opam' file in the repository for pinning and a properly submitted package. Knowing someone else is using it motivates that effort a bit :-)
<struk|work>
hcarty: great! ok I will double down on plplot given this new information. thanks
<hcarty>
I haven't done much to test the build process beyond confirming that it works on the systems I need/use it on. There is a bit of wrangling required I expect to make the build play nice with opam-repository's travis builds. Shouldn't be too bad though.
<hcarty>
struk|work: Suggestions and contributions are welcome. Which version of PLplot are you working with?
jonludlam has joined #ocaml
bezirg has joined #ocaml
clrnd has quit [Quit: leaving]
Arahael_Twin is now known as Arahael
lambdaha1ds has joined #ocaml
bezirg has quit [Quit: Leaving.]
lambdahands has quit [Ping timeout: 256 seconds]
<struk|work>
hcarty: libplplot12 5.10.0-0ubuntu5 . It built really easily for me on (k)ubuntu. also worked without fail in utop etc.
tautologico has joined #ocaml
<pippijn>
as ugly as C++ syntax is..
<pippijn>
metaprogramming is kind of nice in it
<pippijn>
using templates to generate efficient specialised code
mort___ has quit [Quit: Leaving.]
<tautologico>
you can do a lot with it, but it's so crude
<Arahael>
pippijn: Ugh, it's the worst syntax! But yeah, there is an elegance to it if you can see past the syntax.
<pippijn>
and it automatically gives me an encoding and decoding function
<pippijn>
right now, those functions are not terribly efficient, but they can be made very very efficient
<endiruna>
is there a book where the algorithms are written in ocaml?
<endiruna>
i am looking for an algorithm book
<pippijn>
but most importantly, the code is all there, operating on types
<pippijn>
tautologico: I find operating on syntax trees much more crude than writing functions operating on types
<pippijn>
you can do more with the syntax trees, but having these things in the type system is beautiful
<pippijn>
if only the syntax were nicer
<pippijn>
whitequark: how does ocaml do with type-level programming?
<pippijn>
Drup: introduce type classes in ocaml
<pippijn>
Drup: call them hamburgers
<companion_cube>
yes please
<pippijn>
Drup: just because everybody seems to feel the need to call them something else
<Drup>
pippijn: functors > templates.
<dmbaturin>
Drup: Someone expressed regrets that monads weren't named "warm, fluffy things" (because it could prevent category theory terminology abuse).
<pippijn>
Drup: alright, how would you do something like I did with templates using functors?
<Drup>
pippijn: probably with a functorized combinator library
<pippijn>
now if only ocaml had better optimisers
<pippijn>
it takes microseconds to parse a packet in C++
<fds>
endiruna: http://ocaml-book.com/ has a link to the "More OCaml" book, and then there's the classic Purely Functional Data Structures, which has its examples in SML.
<pippijn>
Drup: in fact, I'm going to write that right now
<pippijn>
in ocaml
<pippijn>
but I think not with functors
<Drup>
pippijn: other solution being obviously ppx
<pippijn>
I am not at all happy with this recent trend to make everything a ppx
<companion_cube>
typeclasses would clearly be better than ppx for many usages
<pippijn>
instead of investing in better in-language tools
<fds>
enitiz: Sorry, meant for endiruna, who left.
MisaMisa has joined #ocaml
<def`>
but ppx is maybe the cheapest way to have specific optimization
<MercurialAlchemi>
well, you can't replace every ppx with typeclasses, but I'd really like implicits to be merged sooner rather than later
<tobiasBora>
Hello ! I'm looking for a strucutre that can add an element, remove an element, and search an element, to deal with "lists" of element that can be something like 100 to much more (10^6), what is the best one to use ? Is there a better tool than hash tables ?
thomasga has joined #ocaml
<pippijn>
I want pluggable optimisers
<def`>
MercurialAlchemi: better optimization is more-or-less required before
<tobiasBora>
Is it possible to pick in a random element in an hashtbl ?
<Drup>
it will be.
<pippijn>
what will be good about it?
<Drup>
(I think)
<Drup>
exactly what you said, customisation in OCaml
<companion_cube>
tobiasBora: there's nothing built int for this
<Drup>
and plugin system
<Drup>
why I think it will be good : because the ideas behind it are sound and the two author do good work.
<Drup>
(imho, at least)
<tobiasBora>
companion_cube: Ok thank you. It's funny because it's possible to apply a function to a every elemement of the table, it would be nice to do that but only with the first element ^^
mahem1_ has joined #ocaml
mahem1__ has quit [Read error: Connection reset by peer]
<pippijn>
Drup: I don't think this is good
<pippijn>
from a first look, I see something bad already
<Drup>
good thing it's in alpha then :)
<companion_cube>
well, fun h -> Sequence.of_hashtbl h |> Sequence.head;;
<pippijn>
the base library contains pkg-config stuff
<companion_cube>
if you only need one element
<pippijn>
but the base library should not contain anything
<pippijn>
it should *only* provide build system primitives
<pippijn>
everything else should be a module
<pippijn>
or library you link in
<pippijn>
I think this is something jenga gets right
<pippijn>
and omake
<ousado>
pippijn: the more specific your ideas about how something should be, the more likely you have to write it yourself :)
<pippijn>
they are completely empty
<pippijn>
omake provides a huge amount of tooling for making build systems
<tobiasBora>
companion_cube: The problem is that it's quite dirty to parse every single element to get only the first one. Do you know if the Map module is as efficient as hashtbl ? I can see that their is a choose function.
<pippijn>
Drup: so, tell me about the sound ideas
<companion_cube>
tobiasBora: "parse"? as in, traverse, you mean?
<tobiasBora>
companion_cube: yes sorry
<companion_cube>
well, Sequence.head doesn't traverse the whole table
<tobiasBora>
companion_cube: and it's lazy ?
<Drup>
pippijn: not really I want to do that myself, since I'm pretty sure it's going to be badly represented (and I don't know it that well)
<Drup>
ask thomasga himself, he's here :D
<pippijn>
thomasga: can you tell me about assemblage?
<thomasga>
pippijn: I can just tell it's on hold :p
<pippijn>
that's ok
<pippijn>
so was omake when I started using it
<pippijn>
maybe I can tell you my use case
<pippijn>
and my requirements
gdsfh has quit [Ping timeout: 265 seconds]
gdsfh1 has joined #ocaml
<pippijn>
so, I have a medium number of projects (maybe 45), written in ocaml, C++, C, aldor, java, scala, and any combination of these
<pippijn>
I want to write a build description for each project and put that in the project root directory
<thomasga>
description in ocaml?
<pippijn>
don't care
<pippijn>
that build description should suffice to find all dependencies (ocamlfind, pkg-config, maven, some custom finder thing, ...)
<pippijn>
and build the package
<pippijn>
and install it
<pippijn>
also generate a debian/ directory with everything required to build a debian package
<pippijn>
I want it to generate pkg-config files and ocamlfind files
<pippijn>
that's my first use case
<tobiasBora>
companion_cube: Because in the source code the iter function (that is used in Sequence) first convert the table in array... (so it's not lazy)
<pippijn>
my second use case is: compose these projects
<thomasga>
that seems fair. Assemblage cannot do that right now, but that certainly a goal we want to achieve.
<companion_cube>
tobiasBora: meh :(
<pippijn>
meaning, I put 2 or more of these projects in a directory
<pippijn>
with interdependencies
<companion_cube>
no, wait
<companion_cube>
it uses the array that already exists in the Hashtbl
<pippijn>
and it will automatically determine that instead of looking in global ocamlfind/pkg-config, that dependency is built in the current tree
<pippijn>
and it will set up the dependency in the build system correctly
<pippijn>
finally, I want to not just put 2 projects together, but *all* my 45 projects
<pippijn>
I want to build them in parallel, as long as they are independent
<pippijn>
I have a build system that can do all of this
<pippijn>
but it's slow, it takes 10 seconds to do an empty build where it just does up-to-date checking
<pippijn>
for 500K lines of code
<pippijn>
I don't know how many files, maybe 60K
<thomasga>
pippijn: the idea is that we have basic build rules which work well for ocaml (c code with pkg-config, compilation units, libraries with ocamlfind, binaries, doc, test, …) and then we (actually Daniel Bunzli) spend a lot of time to design a small DSL to describe more generic build rules which integrates nicely with the rest.
<thomasga>
and then we "compile" the DSL to a concrete build system (currently, a bit Makefile)
<pippijn>
big*?
<thomasga>
hum yes
<pippijn>
thomasga: make doesn't scale to my size
<thomasga>
big sorry
<thomasga>
indeed
<Drup>
do a ninja backend ? :D
<thomasga>
but anyway, the project is on hold til we find someone to work on it (could be Daniel next summer, or someone else, or me if I get bored)
endiruna has joined #ocaml
<thomasga>
we experimented with some tup-like build system as well
<thomasga>
but it is fare for being ready to use so it's all very hypothetic
<thomasga>
far
<thomasga>
but it will happen at one point :p
<ousado>
pippijn: is performance the only issue of your build system?