Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chris2 has joined #ocaml
BitPuffin|osx has joined #ocaml
tennix has joined #ocaml
rgrinberg1 has quit [Ping timeout: 250 seconds]
rgrinberg1 has joined #ocaml
reynir is now known as gyt
bendiken has quit []
browncodes has joined #ocaml
manizzle has quit [Ping timeout: 260 seconds]
BitPuffin|osx has quit [Ping timeout: 244 seconds]
rgrinberg1 has quit [Ping timeout: 265 seconds]
rgrinberg1 has joined #ocaml
tmtwd has joined #ocaml
<Algebr`>
Can fields of a record be made private?
darkf has joined #ocaml
SomeDamnBody has joined #ocaml
tmtwd has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 256 seconds]
keen___________3 has joined #ocaml
keen___________2 has quit [Ping timeout: 256 seconds]
claudiuc has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
MrScout has joined #ocaml
SomeDamnBody has quit [Ping timeout: 255 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
keen___________4 has joined #ocaml
keen___________3 has quit [Ping timeout: 250 seconds]
rgrinberg1 has quit [Ping timeout: 272 seconds]
MrScout has quit [Remote host closed the connection]
xificurC has joined #ocaml
<Maelan>
No.
<Maelan>
Unless by keeping the whole type abstract in the interface of its module.
<Maelan>
But Algebr`, what exactly do you mean by “private”?
ggole has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
rgrinberg1 has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
rgrinberg1 has quit [Ping timeout: 250 seconds]
Muzer has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
gyt is now known as reynir
ygrek has joined #ocaml
zpe has joined #ocaml
ely-se has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
mort___ has quit [Quit: Leaving.]
Anarchos has joined #ocaml
paradoja has joined #ocaml
ggole has quit [Ping timeout: 246 seconds]
ollehar has joined #ocaml
<ollehar>
any comments on how to best implement strings in a compiler?
yomimono has joined #ocaml
grouzen has joined #ocaml
mort___ has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
sh0t has joined #ocaml
Haudegen has joined #ocaml
demonimin_ has quit [Remote host closed the connection]
demonimin has joined #ocaml
nullcatxxx_ has joined #ocaml
<Anarchos>
ollehar what do you mean by implementing strings ?
<ollehar>
Anarchos: how strings are represented by the compiler
<ollehar>
char*, struct with length
<ollehar>
string interning
<Anarchos>
ollehar it depends on the kind of compiler, C or ocaml ??
<ollehar>
Anarchos: it's a PHP compiler :)
<ollehar>
made in ocaml, using LLVM
<Anarchos>
no idea.
<Anarchos>
if it is made with ocaml, i would say "string"
<Anarchos>
and internally ocaml strings store their length, and use padding at the end to always align on power of 4.
<ollehar>
Anarchos: OK ^^
<ollehar>
well, I have to run to the train. have a good one!
<ollehar>
ah ok, will check the ocaml implementation
ollehar has quit [Quit: ollehar]
<zozozo>
Anarchos: don't string align on multiple of 4 rather than powers ? because it would become quite impractical for large strings, :p
rgrinberg1 has joined #ocaml
<Anarchos>
zozozo yes. I wrote too fast
rgrinberg1 has quit [Ping timeout: 246 seconds]
ely-se has quit [Quit: leaving]
<sh0t>
HI guys...is there a standard way to implement "function definitions" of a programming language which i am trying to implement in ocaml...i know it's pretty vague as a question...i don't mind vague answer :)
<mrvn>
ocaml strings use a normal block with the GC tag and length (in multiples of values) at the start. The difference in length (values vs. string length) is encoded in the last byte to get byte granularity.
<mrvn>
and I believe there is an implicit 0 byte tagged on too for C compatibility.
ely-se has joined #ocaml
ely-se has quit [Client Quit]
ygrek has quit [Ping timeout: 272 seconds]
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
Algebr`` has joined #ocaml
abbe_ has joined #ocaml
c74d3 has joined #ocaml
<Anarchos>
sh0t you have to store the body of the function + the environment (values of the free variables used in the body of fucntion)
<sh0t>
ok Anarchos makes sense...when you say body i guess u mean the AST
damason_ has joined #ocaml
<sh0t>
and then u traverse it
<sh0t>
when the function is called
<sh0t>
?
swistak35_ has joined #ocaml
jyc has quit [Ping timeout: 241 seconds]
c74d has quit [Ping timeout: 241 seconds]
abbe has quit [Ping timeout: 240 seconds]
swistak35 has quit [Ping timeout: 240 seconds]
xet7 has quit [Ping timeout: 259 seconds]
damason has quit [Ping timeout: 240 seconds]
<Anarchos>
sh0t well the semantics of the AST
<Anarchos>
sh0t but yes, that's the idea
Algebr` has quit [Ping timeout: 240 seconds]
<sh0t>
the semantics of the AST: a bit more specific?
<sh0t>
please
<sh0t>
:)
jonludlam has joined #ocaml
jonludlam has quit [Changing host]
jonludlam has joined #ocaml
<Anarchos>
sh0t the AST is just the syntax of the source of your fucntion. If you want to evaluate the function on some arguments, you are in the semantics side.
mort___ has left #ocaml [#ocaml]
tennix has quit [Quit: WeeChat 1.2]
tennix has joined #ocaml
tennix has joined #ocaml
<sh0t>
well when I traverse
<sh0t>
the AST
<sh0t>
and do the operations for instance...updating stuff computing things...i am in the semantics...side...
nullcatxxx_ has quit [Quit: gone...]
jyc has joined #ocaml
Mandus_ is now known as Mandus
kakadu has joined #ocaml
<Anarchos>
you should transform your AST within another represantion, more semantics oriented. It is bad habit to evaluate while traversing AST
<sh0t>
oh
<sh0t>
even if the language is an intepreted one?
<sh0t>
for now i am not caring about efficiency issues
<sh0t>
i am reading modern language implmentation in ML
<Anarchos>
sh0t if interpreted, i think you can just keep the AST
<sh0t>
do u think there are other better sources of info?
<Anarchos>
sh0t "Le Langage Caml", if you can read french
<Anarchos>
A mini-ml is implemented in full details and explanations.
<sh0t>
mmmm i can'tread fench :( maybe i can try... u know being italian maybe i can get around but i doubt it
BhavyaM has joined #ocaml
<Anarchos>
i doubt it too.
<Anarchos>
since i am french and am unable to read italian.
<sh0t>
yeah...
octachron has joined #ocaml
yomimono has quit [Ping timeout: 244 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
struktured has quit [Ping timeout: 246 seconds]
yomimono has joined #ocaml
Simn has joined #ocaml
jonludlam has quit [Ping timeout: 265 seconds]
dsheets has quit [Ping timeout: 246 seconds]
rgrinberg1 has joined #ocaml
pyon has quit [Quit: fix config]
rgrinberg1 has quit [Ping timeout: 255 seconds]
ely-se has joined #ocaml
_andre has joined #ocaml
pyon has joined #ocaml
_andre has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
<schoppenhauer>
is there a difference between ocaml's @@ and haskell's $ ?
<flux>
probably a slight difference in precedence. @@ is at the same level as other @xxx-operators
<flux>
btw, now that camlp4 seems to be falling out of grace, maybe we can start using the $ operator?-)
jao has joined #ocaml
Denommus has joined #ocaml
<ely-se>
<|
<octachron>
flux, unfortunately ($) is left associative, i.e. f $ g $ x ≡ ((f g) x)
<Denommus>
hm, OCaml has (@@), which is effectively the same thing as Haskell's ($)
rbocquet has quit [K-Lined]
jao has quit [Ping timeout: 265 seconds]
blAckEn3d has joined #ocaml
rgrinberg1 has joined #ocaml
rbocquet has joined #ocaml
rgrinberg1 has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
blAckEn3d has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
tennix has quit [Ping timeout: 252 seconds]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
ely-se has quit [Quit: leaving]
dsheets has joined #ocaml
jonludlam has joined #ocaml
ely-se has joined #ocaml
rgrinberg1 has joined #ocaml
moei has quit [Quit: Leaving...]
rgrinberg1 has quit [Ping timeout: 244 seconds]
blAckEn3d has joined #ocaml
ryanartecona has joined #ocaml
ggole has joined #ocaml
ely-se has quit [Quit: leaving]
paradoja has quit [Ping timeout: 252 seconds]
tennix has joined #ocaml
ely-se has joined #ocaml
troydm has quit [Ping timeout: 264 seconds]
rgrinberg1 has joined #ocaml
igoroliveira has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
troydm has joined #ocaml
jonludlam has quit [Quit: Leaving]
ryanartecona has quit [Quit: ryanartecona]
pyon has quit [Quit: Screw you, Emacs.]
pyon has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
jonludlam has joined #ocaml
pyon has quit [Quit: fix config]
pyon has joined #ocaml
Sorella has joined #ocaml
ely-se has quit [Quit: leaving]
ryanartecona has joined #ocaml
BhavyaM has quit [Quit: Quit the channel]
tennix has joined #ocaml
contempt has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 245 seconds]
pyon has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
pyon has joined #ocaml
contempt has joined #ocaml
sh0t has quit [Ping timeout: 265 seconds]
ely-se has joined #ocaml
zpe has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
thomasga has joined #ocaml
jonludlam has quit [Ping timeout: 256 seconds]
rgrinberg1 has quit [Ping timeout: 246 seconds]
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
MercurialAlchemi has joined #ocaml
jonludlam has joined #ocaml
paradoja has joined #ocaml
rgrinberg1 has joined #ocaml
bendiken has joined #ocaml
slash^ has joined #ocaml
ely-se has quit [Quit: leaving]
rgrinberg1 has quit [Ping timeout: 265 seconds]
sh0t has joined #ocaml
<Leonidas>
schoppenhauer: $ works with constructors, @@ does not, because Constructors are not like functions in ML.
<Drup>
Leonidas: that's a difference between constructors in the two languages, not between $ and @@
rand000 has joined #ocaml
<dmbaturin>
Leonidas: It's not universal either, SML and CAML Light did have first class constructors. :)
jonludlam has quit [Ping timeout: 260 seconds]
<schoppenhauer>
Leonidas: hm. what's different with constructors?
<ggole>
You can only use them by fully applying them
dongcarl has joined #ocaml
blAckEn3d has quit [Remote host closed the connection]
<dmbaturin>
schoppenhauer: In OCaml, constructors are not first class, so something like "List.map Some xs" wouldn't work and requires eta-expansion ("List.map (fun x -> Some x) xs" will work).
<Leonidas>
Drup: that is true, but it is something at least I tended to run into mostly when using @@, so I just wanted to warn.
jonludlam has joined #ocaml
cthuluh has quit [Ping timeout: 264 seconds]
cthuluh has joined #ocaml
<ggole>
Anything that takes a function argument, really
cthuluh has quit [Ping timeout: 250 seconds]
cthuluh has joined #ocaml
shinnya has joined #ocaml
demonimin has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
demonimin has joined #ocaml
ygrek has joined #ocaml
paradoja has quit [Ping timeout: 250 seconds]
native_killer has joined #ocaml
john has joined #ocaml
john is now known as Guest95407
zpe has quit [Read error: Connection reset by peer]
JuggleTux has joined #ocaml
zpe has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
rand000 has quit [Ping timeout: 250 seconds]
zpe has quit [Remote host closed the connection]
Guest95407 is now known as johnf_
blAckEn3d has joined #ocaml
blAckEn3d has quit [Ping timeout: 240 seconds]
<Leonidas>
dmbaturin: do you know the rationale why it was removed?
ygrek has quit [Ping timeout: 245 seconds]
yomimono has quit [Ping timeout: 245 seconds]
mort___ has joined #ocaml
<MercurialAlchemi>
on the other hand you have to look at the bright side
<MercurialAlchemi>
record fields are NOT functions and you avoid the ridiculous, pathetic namespacing issues of Haskell
ggole has quit []
<Denommus>
also, records can be variants with no problems
<Denommus>
while `data Foo = Foo { a :: Int } | Bar` makes Haskell panic when you do `let bar = Bar in a bar`
MrScout has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
Guest38 has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
<Algebr``>
Maelan: I meant like having two fields of the record be visible to outside users outside the module but three fields visisble in the module
slash^ has quit [Read error: Connection reset by peer]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
mort___ has quit [Quit: Leaving.]
ryanartecona has joined #ocaml
xet7_ has joined #ocaml
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bendiken has joined #ocaml
abbe_ is now known as abbe
native_killer has quit [Quit: Leaving]
rand000 has joined #ocaml
darkf has quit [Quit: Leaving]
ygrek has joined #ocaml
<Algebr``>
Wondering why since the option type is part of the stdlib why there aren't convience macros defined for it in the caml/*.h files
kakadu has quit [Quit: Page closed]
dsheets has joined #ocaml
<zozozo>
Algebr``: the option type is used for optional arguments
<zozozo>
so it is needed by the compiler I'd say
BitPuffin has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
kolko has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
Algebr`` has quit [Remote host closed the connection]
Algebr`` has joined #ocaml
tennix has joined #ocaml
<Algebr``>
right, that's not what I mean though. I was wondering why Val_none isn't a standard macro
Simn has quit [Quit: Leaving]
tennix has quit [Ping timeout: 246 seconds]
ryanartecona has quit [Quit: ryanartecona]
bendiken has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ollehar1 has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ollehar has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
yomimono has quit [Client Quit]
Anarchos has joined #ocaml
ollehar has joined #ocaml
cball has quit [Ping timeout: 246 seconds]
rand000_ has joined #ocaml
ollehar1 has quit [Ping timeout: 252 seconds]
rand000 has quit [Ping timeout: 250 seconds]
jtfmumm has joined #ocaml
kolko has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
weeirc8089 has joined #ocaml
weeirc8089 has left #ocaml [#ocaml]
ryanartecona has joined #ocaml
sh0t has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
cball has joined #ocaml
kakadu has joined #ocaml
QuanticPotato has joined #ocaml
QuanticPotato has quit [Client Quit]
mort___ has quit [Quit: Leaving.]
QuanticPotato has joined #ocaml
pyon has quit [Quit: fix config]
pyon has joined #ocaml
<flux>
oversight I'd say. I think the C interface could use some love :)
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dongcarl has quit [Quit: Leaving...]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
QuanticPotato has quit [Quit: Leaving]
QuanticPotato has joined #ocaml
jtfmumm has joined #ocaml
QuanticPotato has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
QuanticPotato has joined #ocaml
thomasga1 has joined #ocaml
thomasga1 has quit [Client Quit]
thomasga has quit [Ping timeout: 246 seconds]
AlBar has joined #ocaml
<AlBar>
hi, i have this error message while i'm trying to install an application written in ocaml: File "src/batPrintf.ml", line 524, characters 24-45: