<orbitz>
ousado: you want inheritence? Why not just have a collection of functions?
ttamttam has joined #ocaml
Submarine_ has quit [Ping timeout: 248 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ontologiae has joined #ocaml
myx has quit [Ping timeout: 252 seconds]
djcoin has joined #ocaml
fusillia has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
gour has joined #ocaml
ocp has joined #ocaml
mika1 has joined #ocaml
adrien_o1w is now known as adrien_oww
thomasga has joined #ocaml
ontologiae has joined #ocaml
RagingDave has joined #ocaml
weie has quit [Ping timeout: 252 seconds]
Yoric has quit [Ping timeout: 252 seconds]
weie has joined #ocaml
jbrown has joined #ocaml
gour has quit [Disconnected by services]
gour_ has joined #ocaml
_andre has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
chambart has joined #ocaml
ttamttam1 has joined #ocaml
ttamttam has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
gour has joined #ocaml
Yoric has joined #ocaml
gour_ has quit [Ping timeout: 245 seconds]
gour has quit [Disconnected by services]
gour_ has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
chambart has quit [Ping timeout: 246 seconds]
gour_ is now known as gour
adotbrown has joined #ocaml
Demitar_ has quit [Ping timeout: 255 seconds]
mcclurmc has joined #ocaml
leoncamel has joined #ocaml
myx has joined #ocaml
invariant has joined #ocaml
Reventlov has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
<invariant>
opam 0.9.something has been announced, but following their quick install results in some 0.8.2 version.
invariant has left #ocaml []
<orbitz>
hah
ftrvxmtrx has quit [Ping timeout: 248 seconds]
Demitar has joined #ocaml
ftrvxmtrx has joined #ocaml
adotbrown has quit [Ping timeout: 255 seconds]
chambart has joined #ocaml
tac has joined #ocaml
jamii has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
q66 has joined #ocaml
ontologiae has joined #ocaml
Yoric has joined #ocaml
<ousado>
wmeyer, orbitz: this is for a haxe target. I'd like to omit it, but the language wouldn't be complete without support for OOP-style inheritance
<ousado>
implementation language will be be ATS/C
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
<ousado>
hml, that's misleading, target language will be ATS/C, code generation will be done in ocaml
<ousado>
and I'd like to have some kind of fast-path for everything that doesn't require dynamic dispatch. basically the disctinction between non-virtual vs virtual methods in C++.
<companion_cube>
compiling to ATS? sounds interesting
<ousado>
yes, haxe lacks a nice native target currently
<pippijn>
compiling to ATS?
<ousado>
the c++ target suffers from "Dynamic" which basically forces the runtime to expect boxed, untyped values everywhere
<ousado>
pippijn: yes, I want to add a ATS/C backend to haxe
<ousado>
the plan is to only support the non-"Dynamic" subset first
mcclurmc has quit [Ping timeout: 252 seconds]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
mcclurmc has joined #ocaml
dwmw2_gone is now known as dwmw2
Yoric has quit [Ping timeout: 252 seconds]
tac has quit [Ping timeout: 245 seconds]
deavidsedice has joined #ocaml
bitbckt_ has joined #ocaml
sad0ur_ has joined #ocaml
jknick_ has joined #ocaml
Qrntz_ has joined #ocaml
mk270_ has joined #ocaml
Yoric has joined #ocaml
NaCl_ has joined #ocaml
NaCl has quit [Disconnected by services]
NaCl_ is now known as NaCl
Demitar has quit [Ping timeout: 248 seconds]
djcoin_ has joined #ocaml
djcoin has quit [*.net *.split]
cdidd has quit [*.net *.split]
PM has quit [*.net *.split]
sad0ur has quit [*.net *.split]
mk270 has quit [*.net *.split]
jknick has quit [*.net *.split]
Qrntz has quit [*.net *.split]
bitbckt has quit [*.net *.split]
deavid has quit [*.net *.split]
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
cdidd has joined #ocaml
PM has joined #ocaml
PM has quit [*.net *.split]
PM has joined #ocaml
eikke has joined #ocaml
<f[x]>
mfp, hello, I am thinking about generating lazy extprot unserialize code, because currently I've got large structures that some readers don't need in full
<f[x]>
one trick is partial structure when the needed fields are at beginning
<f[x]>
unfortunately it is not always the case
<f[x]>
and full unserialize puts a big pressure on gc
<mfp>
sounds doable, albeit very tricky
<f[x]>
do you think it is worthwhile to try?
<f[x]>
yes, no fixed offsets
<f[x]>
but probably I can run once and save all offsets for toplevel record items
<mfp>
it's doable because the format allows to skip fields, since it always prefixes with the size (or the latter is fixed given the type)
<f[x]>
then when accessing field just start unserializing it from given offset
<mfp>
in fact, the generated code always does so (skip until the end of the message) when it finds an error
<mfp>
but the code generation will be a PITA
<f[x]>
we all love camlp4 :)
<f[x]>
code generation is always pita if the generated code has to be clever...
<f[x]>
more generally - generating anything clever is pita :)
<f[x]>
but I have to do something about it or the gc will kill me
<mfp>
it's not only camlp4 :), it's also that it's a fair amount of work: you have to define new types with lazy fields (recursively ?), then instead of deserializing you keep the strings around until needed and stuff
smondet has joined #ocaml
<f[x]>
only toplevel fields will be lazy
<f[x]>
or accessors
<f[x]>
keep one string and needed offsets
<mfp>
hmm what about this -> restructuring the readers so that each field is read in a separate function and the outermost one essentially does let field1 = read_field1 r in let field2 = read_field2 r in .... { field1; field2; ... }
<mfp>
and then exposing them all, along with some lower-level interface that knows about the format and allows you to get the nth field using one of the generated read_fieldN
<mfp>
but it still sounds like a nontrivial amount of work
<f[x]>
that's the way to go
<f[x]>
to avoid code duplication
<mfp>
hmm this would be easier if we had a bottom value; then you could create a message that mirrors the original one, replacing unneeded fields with it (and skipping as needed on deserialization)
<mfp>
with it = with the bottom value
<avsm>
dont you want lenses for that?
<avsm>
a view into the underlying buffer, with get/put functions
<f[x]>
mfp, but different readers may want different subsets of fields
<mfp>
f[x]: you'd need one message def per wanted subset
<f[x]>
yes, not very cool, but easier, yes
<mfp>
avsm: would that work with straightforward type definitions for the messages?
<avsm>
your parser would turn into a scanner that records offsets in the buffer and creates the lens, which would provide a lazy get
<avsm>
for small messages, this would be slower but still more memory efficient in most cases
<avsm>
for large message, it's a win
Demitar has joined #ocaml
<mfp>
ic, so that'd allow me to reuse the code for both the eager and the lazy message defs
<mfp>
f[x]: are the required fields messages themselves? if so, what about skipping unwanted ones with some low-level code and then deserializing using their readers?
<f[x]>
no, usually not
<mfp>
f[x]: that is, using Extprot.Reader.IO_reader/String_reader functions directly to skip, then reading
<mfp>
well, even if they're simple types, you could read them directly with Reader.S.read_xxx
<f[x]>
true, but that will likely stop me from implementing nice and shiny general solution :)
<mfp>
the downside of course being that you are deserializing everything by hand with no support from the generated code (if none of the wanted fields is actually a message itself)
<mfp>
well yes, the general solution sounds great but... it's a lot of work :/ which I cannot do atm.
<f[x]>
talking about hacks - is there a way to write a definition - copy of existing ones but without some inner fields - so that those inner fields don't get unserialized but rather replaced with some sentinel value?
<f[x]>
I could probably easily tweak error-handling code to continue unparsing instead of error out
<mfp>
I think so
<mfp>
it could be done by defining some hardcoded bottom type in the extprot message def lang
<mfp>
and the corresponding deserialization code would just skip the field with Reader.S.skip_value and return e.g. Obj.magic 0
<mfp>
oh wait
RagingDave has joined #ocaml
<mfp>
if you can use a separate message definition, you can as well change the type of those fields to type dummy = Dummy
<mfp>
just needs a special hardcoded deserializer for it that skips the actual value
<f[x]>
nice
<mfp>
easy to do, and still (mostly) keeps type safety, you just have to make sure the message definition is the same as the original one modulo the type of the unwanted fields
<mfp>
which could even be checked by extprotc given some new construction like message foo = partial original_message { foo : int; unwanted : dummy; this_one_wanted : whatever }
<mfp>
and to wrap it up, unwanted can be removed from the generated type definition
tac has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
<f[x]>
imagining better syntax: message new = original without x,y,z :)
<f[x]>
ok, dreaming
<f[x]>
back to work
Kakadu has quit []
ftrvxmtrx_ has quit [Quit: Leaving]
Qrntz_ is now known as Qrntz
Qrntz has quit [Changing host]
Qrntz has joined #ocaml
mcsquiggedy has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
fusillia has quit [Ping timeout: 248 seconds]
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 252 seconds]
ttamttam1 has quit [Quit: ttamttam1]
tane has joined #ocaml
eikke has quit [Ping timeout: 276 seconds]
mika1 has quit [Quit: Leaving.]
ocp has quit [Ping timeout: 248 seconds]
cdidd has quit [Quit: Leaving]
eikke has joined #ocaml
weie has quit [Quit: Leaving...]
adrien_o1w has quit [Ping timeout: 240 seconds]
eikke has quit [Ping timeout: 246 seconds]
Demitar_ has joined #ocaml
Demitar has quit [Ping timeout: 248 seconds]
adrien_oww has joined #ocaml
djcoin_ has quit [Quit: WeeChat 0.3.9.2]
Demitar_ has quit [Quit: No Ping reply in 180 seconds.]
Demitar has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
pygmalion has joined #ocaml
pygmalion has left #ocaml []
Yoric has joined #ocaml
fayden has quit [Ping timeout: 276 seconds]
fayden has joined #ocaml
tac_ has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 260 seconds]
thomasga has quit [Ping timeout: 255 seconds]
_andre has quit [Quit: leaving]
jbrown has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
dezzy_ has joined #ocaml
tac_ is now known as tac
tac is now known as tac-tics
olasd_ has joined #ocaml
olasd_ has quit [Changing host]
olasd_ has joined #ocaml
olasd has quit [Ping timeout: 245 seconds]
olasd_ has quit [Read error: Operation timed out]
f[x] has quit [Ping timeout: 260 seconds]
dezzy has quit [Ping timeout: 260 seconds]
f[x] has joined #ocaml
dezzy_ is now known as dezzy
dezzy has quit [Changing host]
dezzy has joined #ocaml
olasd has joined #ocaml
olasd has quit [Changing host]
olasd has joined #ocaml
myx has quit [Quit: ушёл]
tac-tics has quit [Ping timeout: 245 seconds]
jbrown has joined #ocaml
tac-tics has joined #ocaml
TDJACR_ has quit [Read error: Connection reset by peer]
Reventlov has quit [Quit: leaving]
Demitar has quit [Ping timeout: 244 seconds]
chambart has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
Playground has joined #ocaml
Demitar has joined #ocaml
ontologiae has joined #ocaml
thomm4 has joined #ocaml
<thomm4>
hi. can someone give a rough estimate of the size of the complete ocaml platform, in mbs?
adrien_oww has quit [Ping timeout: 240 seconds]
<orbitz>
thomm4: AFAIK the ocaml paltform isn't complete
<thelema>
orbitz: I don't think thomm4 is referring to the ocaml labs project, but instead to a complete install of ocaml
<orbitz>
oh
* adrien
abhors platforms and SDKs, these anger me
<thelema>
which of course depends on your platform
<thelema>
err, architecture
<orbitz>
what do you consider 'complete'?
<adrien>
I had a prefix which was 1.5GB and I think that included several source tarballs
<thelema>
orbitz: I'd probably only count the standard distribution; what you get from 'make world' in the compiler dir
<thelema>
maybe 'make world opt'
<thomm4>
ah, i was hoping for it to be much smaller.
<adrien>
1.5GB was with *many* things installed
<thomm4>
I'm on a quota here and the sys admin isn't budging on space.
<adrien>
my current prefix is 900MB, probably with some tarballs and still many libraries
<orbitz>
thomm4: what is your quota?
<thomm4>
i think i could get by with just the compiler, a profiler, some basic libraries.
<adrien>
if you want to build ocaml, use /tmp, install to your HOME, it won't take a lot of space
<thomm4>
i have about 300 mb free.
<thelema>
I have a full install of batteries and ocaml 3.12 in <200M under a 64-bit linux system
<thomm4>
thelema, really?
<thelema>
old batteries
<adrien>
ocaml 3.12.1: 170MB uncompressed
<adrien>
that's around the biggest you'll get
<thomm4>
ok, i'll give that a shot.
<thelema>
thomm4: yes, it's not really that large
<thomm4>
thanks.
<thelema>
which reminds me that I should install a newer version on the cluster.
<thelema>
and about 85MB of that is camlp4
<thelema>
9 MB for labltk
<thelema>
62 MB of binaries
<thelema>
hmm, ocaml binaries aren't too slim.
<thomm4>
so.. the packages labltk, camlp4 and the emacs package should be enough for a minimal setup?
<adrien>
thomm4: unstripped? .opt binaries too?
<thomm4>
adrien, I'm not sure what you mean.
<adrien>
erf, that was for thelema, sorry
<thelema>
thomm4: I'm indicating which packages could be removed without impacting major functionality
<adrien>
labltk can be skipped fairly safely
<thelema>
adrien: yes, unstripped and opt
<adrien>
camlp4, it depends
ftrvxmtrx has quit [Quit: Leaving]
<thelema>
36MB of the executables are camlp4 and its variants
<thomm4>
ok.
<thelema>
new batteries needs no camlp4
<thomm4>
i'm a haskell refugee, i don't otherwise know much about ocaml. or its setup.
<tac-tics>
thomm4: heh, a refugee, you say?
<thelema>
thomm4: it may be interesting building ocaml from scratch with a low quota
<thelema>
I'm just listing the installed file size
<thelema>
the build directory fpr 3.12.1 is 323MB
<thelema>
although again 191M of that is camlp4. You'd probably have to hack the makefile to disable camlp4
<adrien>
it's not really doable
<thelema>
I dunno
<adrien>
but /tmp has no quota usually
<thelema>
:)
<adrien>
thelema: no, you don't need to do anything to disable camlp4
<thomm4>
tac-tics: yeah, haskell's a nice language, but it has some features I don't entirely like, that ocaml lacks.
<adrien>
it's a simple matter of -no-camlp4
<thelema>
adrien: ah, nice.
<adrien>
or -nocamlp4
<thelema>
adrien: never tried it.
<adrien>
it became available with 4 I think
<thelema>
adrien: ah, ok.
ftrvxmtrx has joined #ocaml
<thelema>
I don't think I've ever build 4.00 myself; ocamlbrew has always taken care of it for me.
<adrien>
as far as I'm concerned, I had to add -no-ocamldoc, -no-ocamlbuild, -no-I-can't-remember-what
mcsquiggedy has quit [Quit: Leaving]
<thomm4>
dang, ocamlbrew went over the quota.
<thomm4>
now is the time for stupid puns about straw breaking the caml's back.
<thelema>
yes, you'd have to tweak it to use /tmp or to disable camlp4
<thomm4>
is Batteries especially large?
<thomm4>
the source file looked quite small.
<thelema>
no
<thomm4>
of course, it's installed ocaml 4.00 and not 3.12
<thomm4>
installing*
<thelema>
batteries is about 40MB to build, and about 15MB installed
<thomm4>
ok, camlp4 is the main thing to avoid.
<thelema>
yes
<thomm4>
it's not asking me if i want to install it.
<thelema>
thomm4: yes, you'll have to build this by hand to disable camlp4
<thelema>
it's rarely disabled
<thelema>
but also not necessary for most packages.
<thelema>
(although it is quite necessary for core)
thomasga has joined #ocaml
<adrien>
core is pretty huge however iirc
adotbrown has joined #ocaml
<thelema>
true.
<orbitz>
big cajones
Yoric has quit [Ping timeout: 246 seconds]
thomasga1 has joined #ocaml
Yoric has joined #ocaml
thomasga has quit [Read error: No route to host]
adotbrown has quit [Ping timeout: 252 seconds]
thomasga1 has quit [Client Quit]
thomasga has joined #ocaml
emmanuelux has joined #ocaml
Simn has joined #ocaml
thomasga has quit [Client Quit]
thomasga1 has joined #ocaml
thomasga1 has quit [Read error: No route to host]
adotbrown has joined #ocaml
gour has quit [Quit: WeeChat 0.3.8]
adotbrown has quit [Ping timeout: 255 seconds]
mcsquiggedy has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
RagingDave has quit [Quit: Ex-Chat]
leoncamel has quit [Ping timeout: 252 seconds]
tani has joined #ocaml
smondet has quit [Ping timeout: 276 seconds]
tane has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Read error: Operation timed out]
tani has quit [Quit: Verlassend]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ontologiae has quit [Ping timeout: 248 seconds]
adotbrown has joined #ocaml
ftrvxmtrx has joined #ocaml
tac-tics has quit [Ping timeout: 245 seconds]
eikke has joined #ocaml
Playground has joined #ocaml
q66 has quit [Quit: Quit]
bitbckt has quit [Ping timeout: 256 seconds]
bitbckt has joined #ocaml
Playground has quit [Read error: Connection reset by peer]