<pippijn>
and according to your strace output, this happened
<pippijn>
I can see "*** omake: reading OMakefiles" in that
<pippijn>
if you don't see that, I don't know where it went
<pippijn>
it was written to fd 1, stdout
<wmeyer>
OK, let me check tomorrow
<wmeyer>
not now
<wmeyer>
I;ll be building a lambda evaluator
<pippijn>
sure
<wmeyer>
in treematch
<pippijn>
nice
palomer has quit [Quit: Leaving]
<wmeyer>
this is the first serious task
<pippijn>
I'm looking forward to writing a C evaluator in it
<wmeyer>
so there is iter strategy which will allow you to embed the caml code
zpe has joined #ocaml
<pippijn>
I hope I can specify C without ocaml code
<wmeyer>
well you need in the bottom something :)
<wmeyer>
that implements the primitives
<pippijn>
like what?
<wmeyer>
like Plus x t -> `x + y`
<pippijn>
ok, sure
<pippijn>
I'm not sure how to do that yet
<pippijn>
because x+y has ocaml int semantics
<pippijn>
but we need C int semantics
<pippijn>
and those are different
<pippijn>
besides, they should be parametrised
<wmeyer>
sure
<pippijn>
I want to be able to say "emulate a 128 bit machine with 32 bit chars"
<wmeyer>
like Plus x t -> `Arithmetic.plus x y`
<pippijn>
yes
<pippijn>
man that would be so cool
<pippijn>
I really want this to happen
<pippijn>
imagine the kind of portability problems you could detect
<wmeyer>
me too, but don't hold your breath yet, I have lot of stuff to do
<pippijn>
sure
<pippijn>
I have time
<pippijn>
because I have many things to do
<pippijn>
so I can keep myself busy
<wmeyer>
I have not much time, because somebody might be faster :-)
<pippijn>
yes
<pippijn>
first, you need to be as good as K
<wmeyer>
that's why I licensed even the scrap paper
<pippijn>
and then you need to be better
<wmeyer>
K is awesome
<pippijn>
ok, maybe not K
<wmeyer>
but just for building single language evaluators
<pippijn>
be as good as maude
<wmeyer>
and not transformers
<pippijn>
maude is nice for that
<pippijn>
it's just rewrite logic
<pippijn>
plus some tools
<pippijn>
like solution searching tools
Drup has quit [Quit: Leaving.]
<pippijn>
I don't actually know how I would implement efficient rewriting
<pippijn>
I have a rewriter in my regex engine
<pippijn>
but that's ocaml pattern matching with recursion and then a "rewrite" function that keeps calling the transformer function until it stabilises
<pippijn>
and it decides "stable" by comparing x_n with x_{n-1}
<pippijn>
that's about the least efficient you can get
<pippijn>
wmeyer: how do you imagine rewriting?
<pippijn>
why does the cparseparse build keep failing?
<pippijn>
oh, monad-custom is missing
<wmeyer>
pippijn: maybe it will be BURS
<pippijn>
good
<wmeyer>
but at the moment I am not planing to do anything with efficiency
<pippijn>
I implemented BURS in C++ many years ago
<wmeyer>
(BURS without weights)
<wmeyer>
probably somethibg similar to what is in Caml
<pippijn>
what is in caml?
<wmeyer>
something similar probably, it looks for tree prefixes and then matches these prefixes instead of nodes
<wmeyer>
but burs does it in a different way, bottom up where OCaml just top-down
<wmeyer>
to find a fixpoint you compare the reference so it's not to bad
zpe has quit [Remote host closed the connection]
<wmeyer>
I don't want efficiency at all at the moment
<wmeyer>
and let's keep it like this for time being
<pippijn>
sure
<pippijn>
make it powerful
<pippijn>
then make it fast
<pippijn>
but do keep efficiency in the back of your head
<pippijn>
it doesn't have to be needlessly slow
<pippijn>
as a blunt example: if you find yourself copying hashtables all over the place, you're doing something wrong
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<wmeyer>
time for me I think
<wmeyer>
see you tomorrow morning
<pippijn>
good night
<wmeyer>
night
chrisdotcode has quit [Ping timeout: 256 seconds]
n06rin has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
n06rin has quit [Quit: Leaving.]
talzeus has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
q66 has quit [Quit: Leaving]
boogie has joined #ocaml
pango_ has joined #ocaml
n06rin has joined #ocaml
pango has quit [Ping timeout: 260 seconds]
thieusoai has joined #ocaml
tvn has joined #ocaml
oriba has quit [Quit: oriba]
tvn is now known as Guest80630
chrisdotcode has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
thieusoai has quit [Quit: Leaving]
Guest80630 has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
ygrek has joined #ocaml
watermind has quit [Read error: Connection reset by peer]
ben_zen has quit [Ping timeout: 240 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
boogie has joined #ocaml
yacks has quit [Ping timeout: 246 seconds]
walter has quit [Quit: This computer has gone to sleep]
n06rin has quit [Quit: Leaving.]
ihm1 has joined #ocaml
kaka22 has joined #ocaml
<kaka22>
hi guys
<kaka22>
i am trying to create ocaml wrapper for a C code
<kaka22>
Kelet: then from C wrapper, return all union field in a structure?
<kaka22>
that is certainly a solution yes, but is there a better solution?
<kaka22>
that saves more memory?
yacks has joined #ocaml
<Kelet>
Sorry, I don't know the subject well, so I can't make any other recommendations. GL
derek_c has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
chrisdotcode has quit [Ping timeout: 256 seconds]
chrisdotcode has joined #ocaml
gour has joined #ocaml
derek_c has quit [Quit: Lost terminal]
boogie has joined #ocaml
<adrien>
I don't remember very well but maybe something like an ocaml value of size 2, first field gets the type (i.e. Int or Double) and second field gets the value in the proper format
boogie has quit [Ping timeout: 256 seconds]
zxqdms has quit [Quit: leaving]
<kaka22>
adrien: do you know where i can get more doc on that feature?
<gour>
i did: sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev according to http://qt-project.org/wiki/Building_Qt_5_from_Git but still had problems...now trying to build wxocaml
<adrien>
you had all the *-proto packages too?
<gour>
no, but i assumed everything required would be pulled
<adrien>
I find that dependencies between packages in distributions are crap
<adrien>
or, let's put it differently
<adrien>
I find that I can never understand why some packages depend on others and some don't
<gour>
i agree...one more reason to move to pc-bsd and use PBIs for end-user pkgs, jail for development etc.
boogie has joined #ocaml
<gour>
otoh, i was going through the RWO 'toor' of the book yesterday and that aspect of ocaml is much more pleasant than gui :-)
chrisdotcode has quit [Ping timeout: 264 seconds]
<adrien>
I don't bother with weird dependency relationships, on Linux; Slackware
<gour>
adrien: you're Slack user?
<adrien>
yes
<gour>
i admit i never used it, but there is one thing i highly appreciate in it, same as in other apsects of life...it's called 'simplicity'
<gour>
now i'm e.g. quite happy with i3 wm and find no need for bloat like KDE, GNOME...
Simn has joined #ocaml
<adrien>
it definitely does what you ask it to do; including removing glibc if you feel like it :P
<gour>
sure, why not ;)
<gour>
wxocaml also does not build :-/
<gour>
with such progression i may end up with lablgtk :-)
<gour>
even ocp-build fails :-(
Snark has joined #ocaml
boogie has quit [Remote host closed the connection]
<kaka22>
how can i print a variable of enum type in Ocaml? printf "%d" only accept int type, so ocaml complains that my variable is not int
<kaka22>
i suppose that i must typecast it to int? is it possible, and how?
<adrien>
no, you must test for it
<adrien>
let string_of_your_enum = function | Foo -> "foo" | Bar -> "bar"
<adrien>
I hope runtime types get merged soon; that will make that unnecessary
<kaka22>
oh i see. this is pretty annoying
Kakadu has joined #ocaml
<whitequark>
runtime types?
<adrien>
some boiler-plate involved, yeah
<adrien>
if you need to do that on a large scale, there are syntax extensions like "deriving" and "type-conv" (although I'm not sure type-conv doesn't do much more than you need)
<adrien>
whitequark: stores the type in the executable, making them available for later inspection
<adrien>
for instance you can list the fields and types of a structure
<whitequark>
adrien: interesting
ulfdoz has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
n06rin has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
n06rin has left #ocaml []
cdidd has quit [Read error: Connection reset by peer]
<gour>
Kakadu: i'm also not sure whether Qml is fit-enough for more complex desktop apps
<Kakadu>
gour: we should discuss it in #kde :)
Anarchos has joined #ocaml
<gour>
Kakadu: qml stuff?
<Kakadu>
yep
<gour>
i didn't touch KDE since 0.9.x :-)
<pippijn>
adrien: I never liked the idea of root certs
<gour>
you're not there?
<pippijn>
I quite like the PGP web of trust idea
<pippijn>
the NSA didn't like PGP at all
<pippijn>
"this can't be good" was their response
<adrien>
shouldn't digia/qt bring more desktop widgets to qml?
<Kakadu>
gour: Are going to start trolling?
<adrien>
also, there's something with the EFL and maybe there's an equivalent for qml
<adrien>
it's a part that is a "swallow"
<adrien>
you declare it in your theme and then, from the C side, you look up the swallow by name and you can put any graphical object that you want in it
<adrien>
it actually works well
boogie has joined #ocaml
<gour>
adrien: you like look of EFL? to me it seems a bit strange, although i installed some EFL-17beta for a very brief period of time
<Kakadu>
gour: QtQuick guys have tested speed and get that QtQuick is faster
<gour>
Kakadu: i'm not concerned with the speed, but features
<Kakadu>
gour: Have you tried to install Qt with official installer?
<gour>
Kakadu: i did, but also encountered some problem...btw, asked question in #kde
<Kakadu>
I see
<Kakadu>
but maybe we should joing 'more development' channel
<adrien>
gour: they suck at making (coherent) themes but that's really a theme issue; you can very easily theme everything
<adrien>
(we have that at work)
ygrek has quit [Ping timeout: 264 seconds]
<Kakadu>
gour: Also we can discuss it in #qt-quick but it seems this channel is not very active on weekend
<adrien>
actually, win32 and cocoa themes should look better than linux ones since they won't have to make them themselves
<gour>
which DE you use?
<adrien>
Kakadu: whether Qt, QtQuick, EFLs, edje, ... is faster is really something debatable
<gour>
now have to re-dl qt, 'cause i rm-ed tarball :-/
<adrien>
each side will find flaws in the other side's benchmarks
<gour>
for ocaml gui bindings i'm not so concerned with the speed, but expect thick bindings hiding low-level stuff from me
<gour>
Kakadu: that's why i don't like presence of C++ in lablqt
<gasche>
Kakadu: the QOCamlBrowser project you linked on the mailing-list looks interesting, but it is unclear to me whether some of the code in the repository is auto-generated
<gasche>
are all the foo_c.{cpp,h} written by hand?
<Kakadu>
gour: It's difficult to deaclare some classes in OCaml side because exposing to QtQuick engine needs some RTTI like moc tool does.
<gasche>
Kakadu: why are the auto-generated files in the version-control repository?
<gasche>
I would like the git repo to contain only the stuff that was written by hand
<Kakadu>
gasche: somebody have recommended me to do it and I did
<gasche>
and I think this is especially important for exemple/showcases, so that people can have an idea of what they'd have to write when looking at the sources
<adrien>
are they difficult to regenerate?
<gour>
+1 for gasche's proposal
<gour>
+1 for gasche's proposal
<Kakadu>
adrien: mocml tool does it
<adrien>
well, if they're easy to recreate and everyone will be able to, then it's probably better to leave them out
tane has joined #ocaml
morolin has quit [Ping timeout: 260 seconds]
<Kakadu>
files are removed
<gour>
in any case, considering that haskell is getting binding generator for c++, ocaml deserves one too
morolin has joined #ocaml
<pippijn>
so I should hurry with my C++ frontend ;)
<adrien>
bindings generator are almost useless without an additional layer
<gasche>
isn't CamlIDL already a binding generator?
<adrien>
(and even more to C++)
<adrien>
gasche: you need to have the IDL; it's inconvenient for bigger libraries
<adrien>
and camlidl only provides the bare binding, nothing higher-level
q66 has joined #ocaml
Drup has joined #ocaml
<gasche>
I'm not saying that binding generators solve all problems, but I think we already have some OCaml-land
<gour>
haskell, at least, has 2 workable bindings: gtk & wx with good prospect for qt
mfp has joined #ocaml
<gasche>
the feedback I hear from Haskell practictioners is that using the GUIs is painful
<gasche>
"Want to write a small GUI thing but forgot to sacrifice to the giant rubber duck in the sky before trying to install wxHaskell or Gtk2Hs? Then this library is for you!"
<gour>
i was recently looking at IUP and their devs told me that their experience is that GTK is not suitable for multi-platform projects...too bad, IUP is missing some stuff like unicode, i18n etc.
Yoric has joined #ocaml
<Kakadu>
IUP?
<adrien>
gasche: ok, thanks
<adrien>
tried to read the website but argh
<adrien>
gasche: btw, you know what HTML cannot display? icons that are laid-out like in a file manager
<Drup>
I laugh every time I read "static typing" associated with C/C++/Java
* gour
nods
<Kakadu>
gour: > lemines comes out of the box with that feature. The QML version of it, doesn't.
<Kakadu>
gour: No idea why author thinks like that
Neros has joined #ocaml
<adrien>
pippijn: I just noticed that dypgen builds with -p...
<adrien>
pippijn: ah, no: it builds .p.cmx files with -p
malo has joined #ocaml
<pippijn>
adrien: oh
talzeus has quit [Read error: Connection reset by peer]
Yoric has quit [Ping timeout: 260 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
cdidd has quit [Remote host closed the connection]
<Drup>
adrien http://jsbin.com/OTIYiyo/1. you may need the overflow thingy to integrate it in a web page with other element (like a top and bottom bar, and so on)
<gasche>
I just pushed a large batch of changes in ocamlbuild (I merged most of my internal development branch)
<adrien>
black screen :D
<adrien>
I hate websites which can handle user-defined color schemes
<adrien>
looking at it, thanks
<Drup>
adrien : I'm not sure if you can do the same with variable sized boxed without experimental features, I will ask more competent people :D
<adrien>
gasche: one more thing against html UIs: they suck at accessibility
<gasche>
(1) the testsuite should be better-organized (2) there are warnings when tags are unused (3) there is a free-form documentation field on rules (I plan to add one for flag declarations as well)
<adrien>
Drup: when I chose "edit in jsbin" and add text, the divs move...
* adrien
is scared; this might have broken all his patches
<adrien>
and html UIs hijack your keyboard shorcuts: jsbin stole my C-t!
<Drup>
adrien : solved.
<adrien>
Drup: the link has changed?
<Drup>
I don't thing so
<Drup>
hum, it's /4 now
<adrien>
I still have the same issue then
<adrien>
ok, going to try that
<adrien>
and now it's 7, thanks
shinnya has joined #ocaml
tane has quit [Remote host closed the connection]
<Drup>
It's far from perfect, and the complexity of your css will increase quite insanely in a real world example, but it's *possible* :D
<adrien>
going to try in a real-world example right now, thanks :)
<gour>
Kakadu: it looks as QT is going to be built this time..
ontologiae has joined #ocaml
Kelet has quit [Read error: Connection reset by peer]
<gasche>
adrien: I think you should not fear any breakage from that
<gasche>
because those are extremely non-invasive buildsystem-wise
<Kakadu>
gour: good
<gasche>
(I mostly added code in existing .ml)
<adrien>
we'll see :D
<gour>
Kakadu: built finished, but there is no Qt5Qml.pc :-/ giving up for now
<pippijn>
both are good documents, if you want to know much, start with the latter
<CissWit>
why not using functions "getter" and "setter" of type "int -> unit" and "char -> unit" which set or get the value of the specified type ?
<pippijn>
there are various reasons why that may not be a good idea
<pippijn>
one reason is memory management
<pippijn>
and he said he doesn't need to pass to C from ocaml
<pippijn>
so it's neater to produce ocaml values
lenstr|away is now known as lenstr
dsheets has joined #ocaml
<mrvn>
also type safety. With a abstract type and get/set functions you could set an int and get a string.
talzeus has quit [Remote host closed the connection]
Kakadu has joined #ocaml
chrisdotcode has joined #ocaml
tobiasBora has joined #ocaml
<kaka22>
pippijn: in your guide above, i understand "tag 0" indicates the first type, and "tag 1" indicate 2nd type. is that correct?
<pippijn>
yes
<pippijn>
they are integers
<kaka22>
so that is handled automatically in Ocaml, and on Ocaml side i dont need to do anything else?
<pippijn>
used as tags
<mrvn>
kaka22: That is how variant types are represented in memory
<pippijn>
right
<kaka22>
ok, i will try now ...
<adrien>
thelema_: when are you migrating camlzip to oasis? :D
Yoric has joined #ocaml
boogie has joined #ocaml
<adrien>
thelema_: what is the proper findlib name? camlzip or zip?
<adrien>
thelema_: patoline looks for "camlzip" and godi installed "camlzip"
<adrien>
thelema_: I remember there was a discussion about dropping the "caml" and "ocaml" from the library names but I don't know if that impacted (caml)zip
<adrien>
thelema_: depending on what you tell me, I'll send patches (at least to patoline's authors)
<adrien>
thelema_: ah, I've just noticed that patoline tries zip and then camlzip; I probably skipped running ./configure again
<adrien>
(still, I'm wondering what to do in such cases)
ygrek has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
<kaka22>
in ocaml, i am trying to have a constant variable. so i write this:
<kaka22>
let A = 9;;
<pippijn>
no
<kaka22>
then ocaml complains. what is wrong?
<pippijn>
identifiers start with lowercase letter
<pippijn>
or _
<kaka22>
oh
<pippijn>
Uppercase Words Are Constructors
boogie has quit [Remote host closed the connection]
<kaka22>
pippijn: what a trap, thanks
<pippijn>
Error: Unbound constructor A
<kaka22>
pippijn: how about type mytype = |A | B
<kaka22>
is that OK?
<pippijn>
yes
<pippijn>
that's correct
<pippijn>
type mytype = a | b doesn't work
<gnuvince>
Is there a function to do a deep copy of a lexbuf?
<pippijn>
gnuvince: how deep?
walter has joined #ocaml
<gasche>
you can write it by hand otherwise
<pippijn>
gasche: difficult
<gnuvince>
pippijn: enough that I can look at the content in the copy and not affect the original.
<pippijn>
unless you use Marshal
<gnuvince>
(I have a lexing problem where I need to do unbounded look ahead)
<pippijn>
gnuvince: what content?
Yoric has quit [Ping timeout: 260 seconds]
<gnuvince>
pippijn: the input string.
<pippijn>
hm
<pippijn>
gnuvince: will your lookahead function call the refill function?
<kaka22>
ok, compiled well, and now when i run my ocaml app, i got this:
<kaka22>
Ilegal instruction
<kaka22>
funny!
<kaka22>
only 2 words. what does that mean?
<pippijn>
it means your C code is bad
<ggole>
A lexbuf contains a function to refill the internal buffer, which you won't be able to copy.
<pippijn>
correct
<pippijn>
so as long as you don't call that function, it's fine
<pippijn>
but if you do, it will mutate some captured environment you can't access
<gnuvince>
I'm not sure to be honest.
<ggole>
...which can happen whenever you read more characters.
<gnuvince>
I'm working on a toy problem, lexing a FORTRAN example as shown in the Coursera compiler class.
<ggole>
It's hard to see how that would work with "unbounded lookahead".
<pippijn>
...if you use the Lexing function to read more characters
<pippijn>
yes, it doesn't work with unbounded lookahead
<pippijn>
but you can make it work
<pippijn>
by reading the complete input, first
<pippijn>
and doing Lexing.of_string
<ggole>
Ugh
<pippijn>
because then the string = lexbuf
<ggole>
Yeah, I guess taht would work :/
<gnuvince>
they explain that in old FORTRAN, white space is ignored. And the example they give is DO 5 I=1,25 vs. DO 5 I=1.25. In the first case, it's a for-loop (indicated by the comma between the bounds) and in the second case it's an assignment (DO5I = 1.25).
<pippijn>
and refill does nothing but set the eof flag
<gnuvince>
So I'm trying to figure out how to go look for the comma
<pippijn>
uhm
<pippijn>
that doesn't sound like a lexing problem
<pippijn>
you need a parser
<pippijn>
LR or something
<gnuvince>
pippijn: according to the professor it is.
<gnuvince>
One yields (DO, 5, I, =, 1, ',', 25) and the other (DO5I, =, 1.25)
<pippijn>
oh!
<pippijn>
yes, it is
<pippijn>
that's terrible
Yoric has joined #ocaml
<pippijn>
I didn't know fortran was that ugly
tane has joined #ocaml
<gnuvince>
No argument from me :)
<adrien>
gasche: you probably didn't expect to improve patoline!
<adrien>
gasche:
<adrien>
File "lablgtk_oups_intro.txp", line 125, characters 248-251:
<adrien>
Error: Unbound value ver
<adrien>
Did you mean vec or verb?
<gnuvince>
(although, to be fair, I don't know if lexing and parsing theory was even started when they wrote the first compiler)
<adrien>
gasche: patoline has a \verb{} command which I had typoed into \ver{} :D
<pippijn>
hm
<Kakadu>
gnuvince: It seems like yo need scannerless parser
<pippijn>
a scannerless parser would serve well here
<pippijn>
it would need your unbounded lookahead
<pippijn>
which you can achieve by backtracking or forking
<gasche>
adrien: nice :]
<gnuvince>
pippijn: thanks for you help!
<pippijn>
I suppose you're not going to use a scannerless parser?
<pippijn>
but still want to use ocamllex?
<gnuvince>
pippijn: I'm doing the toy example because I know that one assignment this semester will include a grammar that has such unbounded lookahead.
<gnuvince>
I wanted to check out my options with OCaml.
<pippijn>
ok
<gnuvince>
Since it's for school, reading the entire file in a string and doing a copy of lexbuf is probably gonna be good enough.
<pippijn>
yes
<pippijn>
I'd probably do that for school
testcocoon has quit [Quit: Coyote finally caught me]
<pippijn>
you don't need to copy the lexbuf, do you?
tane has quit [Write error: Connection reset by peer]
tani has joined #ocaml
<gnuvince>
I guess not.
<pippijn>
ok, maybe you do, so you can use a sub-lexer
tani is now known as tane
<gnuvince>
The nice, general solution be to use a sub-lexer as you say.
<pippijn>
yes
<pippijn>
well, in that case
<dsheets>
If I have a module signature with a type with an object row variable, why can't I make a module that satisfies the signature that has a wider object?
<gnuvince>
But for a single case, I think it may be more pragmatic to just search the string for what I'm looking for.
<pippijn>
no, there is no function you can use :)
<pippijn>
for school, I would probably use Marshal
<pippijn>
just for fun, to see if it works
<pippijn>
and if it doesn't work, write my own deep copy routine
<kaka22>
my code works well finally, thank guys
<kaka22>
thanks, pippijn !
<kaka22>
bed time, bye all
<pippijn>
Marshal.to_string, then Marshal.from_string
<adrien>
seriously, I'm pretty sure it's being discussed on mantis and that there are patches flying
<pippijn>
except the last one, because ocamlopt already does that
<pippijn>
that was just for illustration, because someone asked about it
<ggole>
This stuff has been studied for ages
<pippijn>
ocamlopt barely optimises
<ggole>
Yeah, guess so
<pippijn>
it's about time someone implemented a few simple transforms
<pippijn>
the one I mention here can be done very simply
<pippijn>
conservatively
<pippijn>
but even a conservative optimisation like that could help a *lot*
<pippijn>
in inner loops
<pippijn>
it would let you write pretty code with closures and it would still be fast
<pippijn>
most of my uses of closures are loops
<pippijn>
map, fold, iter
<ggole>
Yeah
<ggole>
I sometimes wonder how much polymorphism is a speed hit, too
<pippijn>
in what cases?
<ggole>
In every case, really
darkf has joined #ocaml
<ggole>
Every value has to be a single word in case it is treated polymorphically
<pippijn>
I think it's mostly a speed hit in mutation
<pippijn>
and floats
<ggole>
So you can't use nice calling conventions like returning variants in registers
<pippijn>
and well.. it prevents unboxed things
ollehar has joined #ocaml
<pippijn>
ggole: hm?
<pippijn>
returning variants?
<ggole>
Instead of allocating some memory and stuffing it in there, you could return the tag in one register, and the args in others
<pippijn>
ah, yes
<pippijn>
you would have to allocate it if you want to store it anywhere, though
<ggole>
Or if its huge. Yep.
<pippijn>
yes
Yoric has quit [Ping timeout: 256 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
<fds>
Can anyone tell me what this error means: Error: This expression has type in_channel but an expression was expected of type [ `Deprecated_use_in_channel ] ?
<fds>
Sorry for asking silly questions without reading more. :-)
<fds>
Kelet: This is why I'm not a real programmer!
<companion_cube>
don't feel silly for asking questions :)
boogie has quit [Ping timeout: 264 seconds]
<wmeyer>
hello.
<companion_cube>
world
ihm1 has quit [Quit: ihm1]
<adrien>
\o
yezariaely has quit [Quit: Leaving.]
<pippijn>
hi wmeyer
<fds>
Okay, I sort of have something working, using the semi-magical line: List.map ~f:print_string (In_channel.input_lines file) Can anyone tell me what the ~f is doing?
<fds>
And, thank you for being so nice. :-)
Yoric has joined #ocaml
<pippijn>
fds: ~f is "named argument"
<pippijn>
fds: ~argname:value
<fds>
Oh, I see, that's funny. I wasn't expecting that from List.map. Why is it needed? I was expecting List.map print_string (In_channel.input_lines file) to work. Am I just messing up the syntax?
<Qrntz>
it's a Core convention to use named arguments where possible
<fds>
Oh, okay. Thanks.
boogie has joined #ocaml
<fds>
Is it a bad idea to be learning Core first? Should I go back to normal OCaml?
walter has joined #ocaml
<Qrntz>
it really depends on your personal preferences
<Qrntz>
there is no «normal» OCaml
<fds>
Hm, this may explain why I'm so confused. :-)
<fds>
But, I'm open to confusing ecosystems. I've come from the Scheme world.
malo has quit [Quit: Leaving]
<rgrinberg>
fds: core has it's own conventions that are much less common outside the core world
<rgrinberg>
if you're coming from the scheme world an analogy might be that ocaml's stdlib is like r5rs
<rgrinberg>
while core is racket :D
* fds
nods.
zpe has quit [Remote host closed the connection]
mrpantoufle has joined #ocaml
ihm1 has joined #ocaml
tane has quit [Quit: Verlassend]
<wmeyer>
hi pippijn
boogie has quit [Remote host closed the connection]
Snark has quit [Quit: leaving]
ggole has quit []
boogie has joined #ocaml
adrien has quit [Quit: leaving]
adrien has joined #ocaml
boogie has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Ping timeout: 256 seconds]
Drup has quit [Ping timeout: 264 seconds]
Yoric1 has joined #ocaml
Yoric has quit [Write error: Broken pipe]
Drup has joined #ocaml
boogie has joined #ocaml
gour has quit [Quit: WeeChat 0.4.1]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
chrisdotcode has joined #ocaml
Drup has quit [Ping timeout: 264 seconds]
ihm1 has quit [Quit: ihm1]
Simn has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
Drup has joined #ocaml
<adrien>
night
<rgrinberg>
Kakadu: what's with the ocamlnet dependency for mocml?
<Kakadu>
mem?
<Kakadu>
rgrinberg: maybe it is required by core or yojson. I don't use ocamlnet directly
<Kakadu>
catch me tomorrow, I'm going to sleep
<rgrinberg>
Kakadu: Ok, but neither core or yojson depend on ocamlnet
Kakadu has quit []
Yoric1 has quit [Ping timeout: 256 seconds]
boogie has joined #ocaml
boogie has quit [Ping timeout: 264 seconds]
palomer has joined #ocaml
<palomer>
hey guys
<palomer>
is it possible to get lwt to poll for when a file is modified ?