<pippijn>
Drup: that's the opposite of what I'm doing in C++
<ousado>
pippijn: your performance requirements suggest a build server
<pippijn>
ousado: no
<pippijn>
absolutely not
<pippijn>
I didn't make my requirements clear
<pippijn>
I don't care about the initial build
<pippijn>
building all my software takes about an hour
<pippijn>
I'm fine with that
<pippijn>
what I do care about is incremental build time
keen__________33 has joined #ocaml
<ousado>
yes
<pippijn>
with my build system, that works pretty well, because it has working filesystem notification
<pippijn>
(omake doesn't have a working one, only a semi-working one)
<pippijn>
incremental builds with my build system are instant
<pippijn>
some milliseconds after I change a file, it's getting rebuilt
<pippijn>
I need that
<ousado>
yes
<pippijn>
and I have it
<pippijn>
so my build system does scale, but I don't like waiting 30 seconds for the initial build rule generation
keen__________32 has quit [Ping timeout: 245 seconds]
<pippijn>
if omake could cache that, it would be great
<pippijn>
I cache a bunch of things already, that's why it's 30 seconds instead of 1 minute or more
<pippijn>
but I want to cache the generated rules, as well
<ousado>
I see
<ousado>
that's very good to hear
<pippijn>
it should be easily possible
<pippijn>
but I found omake's code a bit untransparent
<pippijn>
it seems they reimplemented everything
<pippijn>
their own hash table, their own marshalling, everything..
<pippijn>
so it takes more time to get into the codebase than I was willing to spend
<pippijn>
I even failed at figuring out where to fix the filesystem notification
<pippijn>
inotify breaks down at symlinks
<pippijn>
omake breaks down at symlinks
<pippijn>
so I hacked something that monitors the symlink targets and updates the symlink's mtime whenever the target changes
<ousado>
OK :)
<pippijn>
ousado: where my build system performance becomes a problem is when I add a file
<pippijn>
it will have to recompute many many rules (not all, but a lot of them)
<pippijn>
because who knows, maybe one of them suddenly matches that new file
<pippijn>
and then its dependent rules need to be updated yada yada
<pippijn>
and this happens by interpreting omake DSL
<pippijn>
which is slow :)
<ousado>
I see
<pippijn>
so I'm hoping that jenga is much faster at this, given that it's written in a compiled language
<pippijn>
so the rule computation should theoretically be much faster
deavid has joined #ocaml
rock_neurotiko has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ousado>
pippijn: where is the notification part implemented?
<pippijn>
ousado: in remake or something
<pippijn>
I think there is a general conceptual problem
<pippijn>
in order to find out what dependencies something has, you need to look at the thing
<pippijn>
and you start looking at the thing when you process its build description
<pippijn>
at that point, you didn't yet process all other build descriptions, so you don't know whether something that this one depends on exists in the source tree
<pippijn>
so you need to process the descriptions twice
<pippijn>
once to find out what dependencies it has, and what build products you have, and another time to actually generate the rules with the dependencies
<ousado>
yes
<pippijn>
e.g. cooltool depends on libuseful, and libuseful may be found in the system (pkg-config libuseful, or ocamlfind libuseful), or it might be in the source tree
<pippijn>
if it is in the source tree, you need to set up a dependency from all the build rules in cooltool on the build product(s) of libuseful
<pippijn>
if it's not, you don't
<pippijn>
the way this is solved in obuild (if I remember correctly) is that there is a simple program that scans the entire source tree and generates a global database that can later be queried by rule generators
<pippijn>
for things like "is this binary built by us?"
<pippijn>
"is this ocaml library built by us?"
<pippijn>
"give me all the ocaml libraries built by us"
<pippijn>
since I didn't want to replicate the omake parser (and the original is hard to understand), I wrote a simple scanner that skips most of the stuff in the omake files
<pippijn>
I don't know if jenga can do this better
<ousado>
that's a very interesting problem
enquora has quit [Quit: enquora]
<pippijn>
I imagine it would be even harder with jenga
<ousado>
and it sounds like it would be a ood job for haxe
<ousado>
*good
<pippijn>
seeing as it's a pure monadic way of describing it
<pippijn>
ousado: why?
<pippijn>
what does haxe do that enables this?
jwatzman|work has quit [Quit: jwatzman|work]
<ousado>
I mean the system as a whole
<pippijn>
the build system?
<ousado>
haxe is good for DSLs that end up as compiled code
NSA360 has quit [Quit: Leaving]
<pippijn>
do you think haxe would be a good language to write software with high security requirements?
<ousado>
hmm haxe as a languae, yes
<pippijn>
C++ isn't necessarily the right tool, but if you use the type system in a clever way, you can make extremely safe code
<pippijn>
with compile time proven properties of your system
<ousado>
well, in that regard there are superior alternatives, I'm afraid
<ousado>
but I'd never touch it again for these things
<ousado>
in haxe you have a nice AST with types, generate new types and code as you need them, have the typed AST of everything that's already typed and compile after you're done generating whatever you need
rock_neurotiko has joined #ocaml
<ousado>
errg, the fist AST is the untyped one, not one "with types" :/
<ousado>
*first
<ousado>
whatever, it's great for generating code, but the security requirements certainly extend to the runtimes as well, I'm not sure there is one that meets your requirements
<ousado>
you can target many languages, so you get what the respective runtime offers. The std networking API is not that good (mostly in terms of error reporting), but platform-native APIs are easy to use
<pippijn>
okay
<pippijn>
well, given that I've implemented this C++ wrapper for libev
<pippijn>
I can do the same for haxe
<pippijn>
how's haxe and functional programming?
<pippijn>
monads?
<pippijn>
how about error handling?
<pippijn>
exceptions? partial functions?
<pippijn>
I don't use exceptions in this C++ code
<pippijn>
only partial functions
<ousado>
exceptions, partial functions, ADTs, yes
<pippijn>
can I get away with not using exceptions?
<pippijn>
or do a lot of standard library things throw?
<pippijn>
maybe I don't need to use standard library things, though
<ousado>
yes, the std lib does
<pippijn>
my library requirements are pretty simple
<ousado>
riht
<pippijn>
I need an array
<pippijn>
that's basically it
<pippijn>
array is the only data structure I need
<ousado>
well, haxe has that :)
<pippijn>
what does array index operator return?
<pippijn>
how does haxe do with optimisation? does it do cross-module inlining?
<pippijn>
what if I go out of bounds on an array?
<pippijn>
exception?
<ousado>
yes
<pippijn>
ok, so I need to prevent that and return partial
<ousado>
haxe as mostly a source-to-source compiler doesn't optimize everything itself
<pippijn>
I'll need an array wrapper
<pippijn>
okay
<pippijn>
that's kind of nice
<pippijn>
java can do cross-module inlining
<pippijn>
C++ can kind of
<pippijn>
alright
<pippijn>
I'm convinced to give it a try
<ousado>
inlining is supported anyway
<ousado>
as long as the sources are available
<pippijn>
that's not a problem
<pippijn>
it's good that haxe is in flux
<pippijn>
so is rust
rgrinberg has joined #ocaml
<pippijn>
it means people care about it
<ousado>
and macros make all kinds of explicit inlining very easy and flexible
<pippijn>
it's alive, and if I find bugs, people will fix it
<pippijn>
well, let's not talk about people's ineptness behind their backs :)
<pippijn>
he thinks he's linus torvalds
<pippijn>
ousado: does Int have a minimum range?
<ousado>
it's 43bit on all targets now
<pippijn>
like, can it at least represent 32 bits without loss of precision?
<ousado>
32
<pippijn>
good
<pippijn>
ah
<pippijn>
good
<ousado>
neko had 31bit ints before
<ousado>
fortunately that changed
<ousado>
hm, yeah, TCP_server could use some abstraction here and there
<pippijn>
that's not the bad part
<pippijn>
there is one piece of code that encrypts some stuff and then throws it away
<pippijn>
it doesn't send it, it doesn't do anything with it
<pippijn>
just encrypts something and then nothing
<pippijn>
no explanation
<pippijn>
when I saw that, I decided this is bullshit code
<pippijn>
another thing is that message ids can, under some circumstances, be equal for two different subsequent messages
<pippijn>
which would mess up every client
<pippijn>
oh yeah, tcp server
<pippijn>
tcp server is trivial to murder
<ousado>
all in all that's not some smallish code base
<pippijn>
if you finish the tox crypto handshake in tcp mode, and then leave
<pippijn>
do this a couple of times, and you'll get the node running a busy loop trying to accept new connections
<pippijn>
ousado: it's reasonably small
<pippijn>
the core part is a couple thousand lines
<pippijn>
26445 total
<pippijn>
that's something I've written in 2 weeks or so
<pippijn>
but it's pointlessly bloated
<pippijn>
there is a lot of code in core that doesn't belong there
<pippijn>
file transfers, text chats, group chats
<pippijn>
all of that should be implemented on top of a small, correct core library
<ousado>
the networking code look pretty raw
<ousado>
all over the place
<pippijn>
yes
<pippijn>
it is
<ousado>
and doesn't use libevent, or libev or libuv or whatever
<pippijn>
irungentoo
<pippijn>
suffers from NIH
<pippijn>
my C++ reimplementation uses libev
jcloud has joined #ocaml
enitiz has quit [Ping timeout: 255 seconds]
<pippijn>
ousado: he doesn't want any unnecessary dependencies
<pippijn>
and apparently deems event loops unnecessary
<ousado>
that un-word is very debatable in some cases :)
<pippijn>
I'm not afraid of dependencies
enitiz has joined #ocaml
<pippijn>
tox4j uses protobufs, boost, libev where appropriate
<pippijn>
I guess he'd make the point that you would need to audit those completely if you want to do a security audit
<pippijn>
a proper audit of toxcore would lead nowhere
<pippijn>
auditors would just go "oh my god" and bail
<ousado>
nowhere as in /dev/null ?
<pippijn>
it would yield no useful result
<ousado>
yes
<ousado>
at least he's using third party crypto
<ousado>
heh
<pippijn>
yes
<pippijn>
nacl
<pippijn>
which is peer-reviewed
<pippijn>
it's a good library
<pippijn>
the function tox uses has a sound mathematical underpinning
<pippijn>
the way tox uses it, not so sure yet :)
<pippijn>
once every so often, someone with a bit of knowledge in the field comes and looks at the protocol and goes
<pippijn>
"this is vulnerable, this is vulnerable, this is vulnerable"
<pippijn>
then leaves disappointed
<pippijn>
then the tox devs run around with their hair on fire for a while
<pippijn>
and then decide to fix the problem in the easiest way possible
<pippijn>
generally leading to not a very good solution
<pippijn>
such as "oh, we can track users across IPs very easily"
<pippijn>
=> ephemeral keys
<pippijn>
refreshed how often? once per client restart
<ousado>
I see
<pippijn>
nice for people on mobile phones who tend to never turn it off
<ousado>
yeah
<pippijn>
or people on desktops
<pippijn>
who tend to do the same
<pippijn>
it's a no-solution
<pippijn>
but it makes people feel good
<pippijn>
"look at how secure we are"
<pippijn>
we've got EPHEMERAL KEYS
<pippijn>
sounds fancy
<pippijn>
must be good
<ousado>
maybe that explains why I haven't heard about it
<pippijn>
DHT traffic follows the pattern: [small 8 bit integer: 0|1|2|4][32 bytes that are always the same][24 byte monotonically increasing number][garbage]
<pippijn>
super easy to filter
<pippijn>
super easy to track
<pippijn>
also, the increasing number sometimes skips numbers
<ousado>
32 bytes that are always the same??
<pippijn>
ousado: that's the ephemeral key
<ousado>
oh
<pippijn>
it's stable across client restarts
<ousado>
yeah
<pippijn>
so you can identify a user with it
<ousado>
what?
<pippijn>
well, not directly
<pippijn>
but you can track that one for the time the client is running
<pippijn>
which may be weeks
<pippijn>
that's enough to establish a pattern
<ousado>
sure
<pippijn>
IPs and approximate geolocations
<pippijn>
the 24 byte number that is increasing..
<pippijn>
it's the nonce
<ousado>
lol, 42 byte number
<ousado>
err 24
<ousado>
that's a long way to go
<pippijn>
you can see how often someone sends a packet somewhere else by subtracting the last nonce from the current one
<pippijn>
so you can see how active a user currently is
<ousado>
yeah
<pippijn>
even without sitting in between the user and its target
<pippijn>
just because that user sometimes sends pings to you
<pippijn>
or node requests
<pippijn>
because you happen to be on the tox network
<ousado>
OK then, where's the good part about Tox?
<pippijn>
well
<pippijn>
all I was saying so far is: it's not anonymous
<pippijn>
the good part is: it's secure
<pippijn>
I can find out a lot about tox users
<pippijn>
I can know who they talk to
<pippijn>
and where they are
<pippijn>
what they do
<pippijn>
but not what they are talking about
<pippijn>
because that part is done by NaCl
<pippijn>
so basically it's a load of crap built around one sound primitive
<ousado>
does it have perfect forward secrecy?
<pippijn>
yes
<pippijn>
not sure about perfect
<pippijn>
but it does have forward secrecy to some extent at least
<pippijn>
probably perfect, I haven't looked into it in detail
tnguyen has quit [Quit: tnguyen]
<ousado>
did he document that protocol?
<pippijn>
yes
<pippijn>
poorly
<pippijn>
sometimes incorrectl
<pippijn>
y
<ousado>
I see
<pippijn>
I reverse engineered some from wireshark
<pippijn>
because I don't want to look at the code
<ousado>
heh
<pippijn>
for two reasons
<pippijn>
1) it hurts
<pippijn>
2) I want to rewrite it, and I don't want anybody to claim it's a derived work
<ousado>
ah right, GPL
<pippijn>
yes
<ousado>
nice
<pippijn>
I support the EFF to get apple to calm its tits
<pippijn>
but if they fail, I do want an iOS app at some point
<ousado>
I see, interesting
<pippijn>
impossible with GPL
<pippijn>
because apple hates freedom
<ousado>
maybe they've just not heard of it :D
<ousado>
alright
<ousado>
I have to sleep
<pippijn>
good night
<pippijn>
me too
<pippijn>
it's 4:27
<ousado>
I hope you fall in love with haxe
<ousado>
see you later
araujo has quit [Ping timeout: 252 seconds]
badkins has quit [Remote host closed the connection]
araujo has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
chinglish has joined #ocaml
WraithM has quit [Ping timeout: 244 seconds]
WraithM has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
struktured has quit [Read error: Connection reset by peer]
zomg has joined #ocaml
<zomg>
Hi there, I needed to install a more recent version of ocaml that's available in ubuntu, so I'm attempting to compile it from source
<zomg>
However I'm getting strange errors from gcc in the `make world` step
<zomg>
First, bng_amd64.c: Assembler messages:, and then it throws out a whole bunch of errors from it regarding different assembly commands being invalid
<zomg>
Any suggestions?
<rgrinberg>
zomg: why don't you use opam
<zomg>
it gives the same errors
chinglish has joined #ocaml
<zomg>
I tried it first thinking "oh nice, they've got a convenient tool" but not quite =)
<rgrinberg>
i'm pretty sure there are some rpm's out there as well
<zomg>
ubuntu 12 LTS
<zomg>
hmm I'll give those a spin, thanks
<rgrinberg>
zomg: NP if you don't get it to work definitely keep complaining
<rgrinberg>
it's the only way anything gets improved ;D
araujo has quit [Ping timeout: 245 seconds]
<zomg>
rgrinberg: cheers got it working from the ppa. Actually already had it set up, but wasn't able to get it working through it, but doing it manually with `dpkg -i ocaml...deb` worked
araujo has joined #ocaml
<zomg>
too many bad memories from attempting to sidestep the main apt channels on debian so I always tend to just compile sources :p
marynate has joined #ocaml
lambdahands has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
samrat has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
bugabinga has quit [Ping timeout: 264 seconds]
bugabinga has joined #ocaml
alkoma has joined #ocaml
enitiz has quit [Ping timeout: 255 seconds]
badkins has joined #ocaml
myyst has quit [Read error: Connection reset by peer]
hekmek has joined #ocaml
badkins has quit [Ping timeout: 252 seconds]
enitiz has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
vanila has joined #ocaml
MrScout_ has joined #ocaml
lambdahands has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
MrScout_ has quit [Remote host closed the connection]
lambdahands has quit [Ping timeout: 245 seconds]
Arsenik has joined #ocaml
ebzzry has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
ygrek has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
Arsenik has quit [Remote host closed the connection]
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
enitiz has quit [Ping timeout: 276 seconds]
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
kdef has quit [Remote host closed the connection]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
zwer_f has joined #ocaml
Arahael has quit [Remote host closed the connection]
alkoma` has quit [Remote host closed the connection]
liweijian has quit [Remote host closed the connection]
Grayswandir has joined #ocaml
rock_neurotiko has quit [Ping timeout: 276 seconds]
<Grayswandir>
Hi everyone. I have a project using Menhir. My build system relies on Oasis and Ocamlbuild. I am trying to split the Menhir .mly file in many files but then Ocamlbuild can't compile the project anymore. Searching the web, I found that I could create an .mlypack file, which I did, but Ocamlbuild doesn't work this way either. Should I modify the myocamlbuild.ml file? Or the _tags file? Is it possible to just modify the _oasis file? A
tautologico has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Quit: Leaving.]
lambdahands has joined #ocaml
rgrinberg has joined #ocaml
Kakadu has joined #ocaml
rock_neurotiko has joined #ocaml
lambdahands has quit [Ping timeout: 264 seconds]
jbalint has joined #ocaml
wwilly has joined #ocaml
rock_neurotiko has quit [Remote host closed the connection]
marynate has quit [Ping timeout: 252 seconds]
rock_neurotiko has joined #ocaml
ollehar has joined #ocaml
Grayswandir has quit [Quit: Page closed]
contempt has quit [Ping timeout: 245 seconds]
contempt has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
lordkryss has joined #ocaml
jave has quit [Ping timeout: 245 seconds]
mort___ has joined #ocaml
dsheets has joined #ocaml
Simn has joined #ocaml
davine has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
_andre has joined #ocaml
Haudegen has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
lambdahands has joined #ocaml
lambdahands has quit [Ping timeout: 264 seconds]
rock_neurotiko has quit [Ping timeout: 245 seconds]
jonludlam has joined #ocaml
myyst has joined #ocaml
pyon has quit [Ping timeout: 246 seconds]
araujo has quit [Ping timeout: 246 seconds]
Thooms has joined #ocaml
marynate has joined #ocaml
araujo has joined #ocaml
araujo has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
Thooms has joined #ocaml
hnrgrgr has quit [Ping timeout: 244 seconds]
ingsoc has joined #ocaml
bezirg has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
hnrgrgr has joined #ocaml
jcloud has quit [Quit: Connection closed for inactivity]
govg has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
unix_beard has quit [Quit: Konversation terminated!]
enitiz has joined #ocaml
lambdahands has joined #ocaml
lambdahands has quit [Ping timeout: 255 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
<Leonidas>
A?
<ollehar>
B!
_5kg has quit [Ping timeout: 255 seconds]
_5kg has joined #ocaml
frawgie_ has joined #ocaml
psy_ has quit [Ping timeout: 256 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
<cmtptr>
7
<cmtptr>
oops
dsheets has joined #ocaml
_5kg has quit [Ping timeout: 245 seconds]
lambdahands has joined #ocaml
<nicoo>
ingsoc: What do you think about OCaml, coming from Erlang ? :3 (I'm asking because I hate the Erlang runtime, but love the concurrency model the language provides)
<ingsoc>
nicoo: re. Ocaml, much too early to tell but the main plus point I see atm is the static typing without the usual hurdles when from static typing in things like java/c#
Haudegen has quit [Ping timeout: 252 seconds]
<ingsoc>
regarding the erlang runtime, well, operationally, the erlang VM is awesome
<ingsoc>
I am not sure what it is about the runtime you don't like
<frawgie_>
the tracing capabilities in erlang are amazing :)
<ingsoc>
concurrency is like falling downhill
lambdahands has quit [Ping timeout: 240 seconds]
<frawgie_>
hands down the most pleasent language to debug
<ingsoc>
just awesome
<ingsoc>
reliability
<ingsoc>
awesome
<ingsoc>
The sequential language of erlang is easy to grok, getting your head around the libraries and how to create production apps and OTP etc. is not so easy
psy_ has joined #ocaml
<ingsoc>
and the tooling is not as advanced as more mainstream stuff but I guess its the same with Ocaml
Haudegen has joined #ocaml
<frawgie_>
ingsoc: what's your experience with erlang btw? (i joined in the middle of the discussion)
<ingsoc>
Ocaml still looks pretty foreign to me atm but it seems to be less foreign and easier on the eyes than erlang was when I first started using it
<ingsoc>
frawgie_: """nicoo: ingsoc: What do you think about OCaml, coming from Erlang ? :3 (I'm asking because I hate the Erlang runtime, but love the concurrency model the language provides)"""
<ingsoc>
it was just in response to that
<ingsoc>
and erlang is my main server side language
<frawgie_>
ah :)
<ingsoc>
Ocaml seems like the core language is more elegant and it is obviously faster
<frawgie_>
indeed, and a much better module system
<ingsoc>
I would intend to drive it from erlang though
govg has quit [Ping timeout: 264 seconds]
<ingsoc>
(erlang handles concurrency) and uses ocaml as a kind of driver for more spu intensive stuff
<ingsoc>
cpu*
<ingsoc>
frawgie_: you an erlanger too then ?
<frawgie_>
yep, on and off for years since i'm @ Ericsson
<ingsoc>
ah ok cool
<ingsoc>
so Ocaml is used too then internally
<ingsoc>
do you use it out of choice or just cos you have to
<ingsoc>
:)
<ingsoc>
(Ocaml)
<frawgie_>
probably somewhere, but in my case I'm more interested in it off-work :)
<def`>
out of choice :)
<frawgie_>
people would probably throw bricks after me if i introduced another language in the code base :)
<ingsoc>
ha
oscar_toro has joined #ocaml
<def`>
(c for lowlevel stuff, ocaml for everything the size of a unix process… I don't have to deal with distributed and concurrent stuff at the moment, but I would consider something else than OCaml (… Erlang probably)).
<frawgie_>
how is the multi core support coming along in ocaml? i read something about it a few weeks ago that they agreed on how to do it?
<frawgie_>
(maybe it was an old article, can't remember)
<def`>
"agreed" is maybe a bit strong, it looks nice and is going well, but you shouldn't expect a release in 6 month :'
<flux>
cool, so a release has been promised at 2015-07-17! oh am I reading too much into that :)
badkins has joined #ocaml
<def`>
:D
<frawgie_>
:P
<flux>
but I wish there were some updates. for external people it does look like the project has folded, just like the previous atttempts ;-).
<ingsoc>
Is part of the reason why ocaml is so fast sequentially because of this "thread lock" and so going multicore will mean a performance loss for certain thigns
<Drup>
ousado: you mean that a macro can output typed ast ?
<frawgie_>
ingsoc: doesnt python have the same type of lock?
<ingsoc>
yeah I had kind of thought from an outsider looking in that ocaml won;t have multicore any time soon
<ingsoc>
yes it does
<ingsoc>
the GIL
<frawgie_>
and python ain't fast so that can't be it ^^
<ingsoc>
(Global Interpreted Lock) it was put in place to simplify a lot of the execution internals
<Drup>
actually, that's one of the reason
<flux>
afaiu the first problem is that ocaml allocates a lot. so that needs to perform good in threaded environment.
<flux>
the second problem, actually collecting garbage, I wonder if the goal was to not stop the world?
<ingsoc>
I read Ocaml has incremental GC
<Drup>
the main reason for the GIL is that implementing a concurent generational garbage collector is a nightmare and nobody wants to do it.
<ingsoc>
to avoid potentially long pauses (relatively long) like say on teh JVM
<flux>
I wonder if you could get working ocaml for multicore 'almost now' by just stopping the world for GC
<Drup>
flux: and completely trash the sequential performances :D
<flux>
or what other unsolved problems there are.. standard libraries were made re-entrant already, weren't they?
<flux>
drup, yes :)
<whitequark>
flux: C API is not reentrant
<ousado>
Drup: not directly, but you can access the typed AST of previously generated types/expressions
<frawgie_>
flux: I read something about that there is a lot of global state that needs to be resolved
<flux>
so that would indeed waste a lot of performance
<frawgie_>
flux: let me see if i can find the article :)
<Drup>
ousado: and modify it ?
<flux>
but were oc4mc folks doing better than that?
<flux>
it sort of sounds too good to be true if each thread can semi-autonomously do gc ;-)
<flux>
'practical' solution would be stop the world but then have a multithreaded gc
<ousado>
Drup: you can also generate new types/expressions based on that result, but everything you generate still has to be processed by the typer (again)
<Drup>
ok
<Drup>
that's reasonable.
<ousado>
you can get an untyped representation from a typed AST
<Drup>
I would like to have that for ocaml but the typechecker has some much state in it ...
<Drup>
you can't simply "call the typer on an expression and get the typed expression back"
<ousado>
well, you get the type
<Drup>
I meant, you can't in ocaml :)
<ousado>
yeah
<ousado>
that's very unfortunate
<Drup>
ousado: are names resolved in the ast ?
<ousado>
in the untyped AST?
<Drup>
yes
<ousado>
not yet
<Drup>
ok
<Drup>
so it's mostly the same as OCaml
<ousado>
there are easy ways to resolve all names that are valid in some context, though
<ousado>
s/all/specific
<Drup>
?
<Drup>
define "easy ways"
<ousado>
e.g. if you want to resolve some not fully qualified type, you can type the expression and get the fully qualified type, which you can convert back into untyped representation
<Drup>
so yes, by typing
<Drup>
not my definition of "easy" ;)
<ousado>
well, it's calling a function
<Drup>
sure, but the function is doing complicated things
<ousado>
yes
<ousado>
fortunately it's all pretty fast
<ousado>
and there are many tools in the macro std API to help with such things
<abel_>
hi all ,i have just finish my very first "program" in caml, it's juste something who try to create a directory in the home directory of a user if it don't already exist. As i'm very new to this language, it will be very kind of any of you can spend a few min on it and tell me if there is a better way to do the thgin the prog is there :http://pastebin.com/t56FynQM
<ollehar>
abel_: have `exit` command in "top" instead of in different places
<ollehar>
let error propagate up in the stack, and at top level make decision if to exit
<ollehar>
*call stack
<ollehar>
maybe?
AlexRussia has quit [Ping timeout: 264 seconds]
<ollehar>
why not use exceptions?
<ollehar>
also, comment code according to ocamldoc
NSA360 has joined #ocaml
<Leonidas>
mahem1_: will need to test it, because it seems a bit broken
<Leonidas>
or maybe pining with patches is broken
<abel_>
ok i have juste test it a few min ago but by pasting it in utop i'm gona compile it right know to see what is the trouble and i'm back ... and <ollehar> how can i exit in "top" ?
shinnya_ has joined #ocaml
<Drup>
ollehar: stylistic points : you don't need parentheses in applications "f x", not "f(x)". Remove all the ";;" and add "let _ = dir_exist ..." at the end.
anemator has joined #ocaml
<Drup>
not ollehar, abel_, sorry
araujo has joined #ocaml
slash^ has joined #ocaml
anemator has quit [Client Quit]
araujo has quit [Changing host]
araujo has joined #ocaml
NSA360 has quit [Quit: Leaving]
govg has joined #ocaml
frankjeager has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
ollehar has quit [Ping timeout: 276 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
lambdahands has joined #ocaml
samrat has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
struk has quit [Ping timeout: 245 seconds]
struktured has quit [Ping timeout: 245 seconds]
pyon has joined #ocaml
struk has joined #ocaml
struk has quit [Read error: Connection reset by peer]
<tobiasBora>
Hello !
<tobiasBora>
I would like to know if it's possible with Lwt to wait for a givent number of second AND THEN GAVE BACK A UNIT RESULT
<tobiasBora>
I tried something like Lwt_main.run (fun () -> Js_lwt.sleep 1.)
<tobiasBora>
however Lwt_main doesn't exists in js_of_ocaml, so I can't use it...
<tobiasBora>
(I want to run it with js_of_ocaml=
<tobiasBora>
*)
enitiz has quit [Ping timeout: 272 seconds]
<MercurialAlchemi>
you want a timeout?
<tobiasBora>
MercurialAlchemi: Hum... The problem is that using timeout is that I need to run another function after and my code isn't really nice to deal with with this method.
<tobiasBora>
I would like to create a function "update_view" that is called by the main code several times.
<tobiasBora>
However if I don't wait the view is updated to fast and I can't see anything. That's why I would like that when the update_view function is called the program waits for 1 second
<tobiasBora>
I tried to find an idea to write a js_sleep : unit -> unit function, but I don't see how to do that only with timeout and/or Lwt.
marynate has joined #ocaml
<MercurialAlchemi>
I'm not familiar with js_of_ocaml, but aren't you always in Lwt anyway?
<MercurialAlchemi>
why can't you just use Lwt_js.sleep ?
marynate has quit [Ping timeout: 244 seconds]
marynate has joined #ocaml
darkf has quit [Quit: Leaving]
<tobiasBora>
MercurialAlchemi: This function is of type val sleep : float -> unit Lwt.t, and if I use it I need to change my whole code by using >>= to deal with a Lwt code
<tobiasBora>
That's why I'd like to create a function val js_sleep : float -> unit
psy_ has quit [Remote host closed the connection]
<flux>
I would hypothesize that it's not possible :-o
<flux>
well, other than calling the direct javascript sleep function
<tobiasBora>
Too bad...
<flux>
and halting everything in the tab
<MercurialAlchemi>
all js_of_ocaml examples that I can see use standard Lwt constructs (eg, Lwt.return)
<tobiasBora>
flux: Well their isn't any javascript sleep function ^^
<flux>
oh, right
<flux>
well when they do neet do it, they just busyloop until the time is enough ;-)
<tobiasBora>
Then I'll do that..
<tobiasBora>
Thank you !
<flux>
why do you need that one second sleep anyway? for debugging?
<MercurialAlchemi>
flux: well, there is Lwt_js.sleep :)
<flux>
mercurialalchemi, but it's not -> unit and it's pointless to create a new thread for running the sleep ;)
<tobiasBora>
No, my code solve a labyrinthe and it sleep 1s between each solve.
<flux>
well, using Lwt_js.sleep would be much nicer
<flux>
is it too much work to make it work with lwt?
<MercurialAlchemi>
flux: yes, of course
<flux>
doesn't seem like the part where it sleeps between the solves shouldn't be too deep in the app
<flux>
s/shouldn't/should/
<tobiasBora>
Well I can (my code isn't huge), but it's a bit annoying to rewrite a whole code for that ^^ But anyway I will know that for the next time !
<tobiasBora>
A question :
<tobiasBora>
is the syntax lwt myvar = ...DDD"
<tobiasBora>
*is the syntax "lwt myvar = ..." is going to be kept or removed with the arrival of ppx ?
<MercurialAlchemi>
tobiasBora: ppx is already here
<flux>
I believe it must be removed
<MercurialAlchemi>
let%lwt
<tobiasBora>
Ok thank you
<tobiasBora>
And do you know if there is anything to add to accept the let%lwt syntax ?
<MercurialAlchemi>
(you'll want the latest merlin if you use the ppx extension)
slash^ has quit [Read error: Connection reset by peer]
<tobiasBora>
step:React.step -> case -> unit is not compatible with type case -> unit
<tobiasBora>
Bad copy sorry :
<tobiasBora>
Type ?step:React.step -> case -> unit is not compatible with type case -> unit
<tobiasBora>
?step is optionnal no ?
contempt has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
<companion_cube>
it is if you apply the function
<companion_cube>
but the type isn't equivalent to case -> unit
<companion_cube>
here, "f" isn't the same as "fun c -> f c"
clrnd has left #ocaml [#ocaml]
<tobiasBora>
Hum indeed you are right.
<tobiasBora>
Thank you !
MrScout has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
lambdahands has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
AlexRussia has joined #ocaml
psy_ has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
samrat has joined #ocaml
Haudegen has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
Snark has quit [Quit: leaving]
<tobiasBora>
Is there a way to force an update of an a react signal
<tobiasBora>
?
<tobiasBora>
Because my signals come from a record with an array in it, and when I modify this array s isn't updated
<tobiasBora>
I tried to do "let v = let v = S.value signal in
<tobiasBora>
*
<Drup>
I advise you to read the tutorial in the documentation of React
<tobiasBora>
let v = S.value signal in v.border.(0) <- true; set v" but it doesn't update the signal
<Drup>
ugh, you are mutating inside the signal
<Drup>
don't do that.
<tobiasBora>
What do you mean ?
<Drup>
you are taking the value of the signal
<Drup>
and mutating it
<tobiasBora>
Well I don't see how to use another way when I deal with array
<Drup>
here, you would need to copy it
<tobiasBora>
I could make a copy of the array but it's ugly...
<Drup>
the right answer is not to put arrays into signals :D
<tobiasBora>
What ???
<tobiasBora>
Uhm... But I need an array, I can't put a list it has nonsense in my problem.
<Drup>
the signals are not going to work as expected if you mutate things behind React's back.
<Drup>
so, reformulate your program differently.
<def`>
tobiasBora: use fake equality always returning wrong :' (bad idea, will break)
<def`>
false*
<Drup>
don't give him bad ideas :<
<tobiasBora>
I tried :P
<tobiasBora>
set {v with visited = v.visited};
rgrinberg has quit [Quit: Leaving.]
<tobiasBora>
But it's not enough...
<tobiasBora>
sometimes he see it's the same one
<tobiasBora>
Is it the trace function that is supposed to do so ? I'm not sure to understand it's goal
slash^ has quit [Read error: Connection reset by peer]
NSA360 has joined #ocaml
moei has quit [Quit: Leaving...]
<tobiasBora>
changes ?
<tobiasBora>
ohhh
<tobiasBora>
I didn't saw that create take an eq function !
<tobiasBora>
So one good point : it works under chronomium (like the version without React), but under firefox (like with the version without react) it's less functionnal, sometimes some borders of the table change their shape, like that...
jonludlam has joined #ocaml
<tobiasBora>
But the problem comes from the css " /* border-collapse:collapse; */
<tobiasBora>
seems to have some problems when the two borders aren't equal
NSA360 has quit [Quit: Leaving]
<adrien>
CSS troubles? you can ask Drup about that too!
hhugo has joined #ocaml
<MercurialAlchemi>
I suggest a bonefire, personally
<Drup>
adrien: ಠ_ಠ
<seliopou>
think i found a bug in the ocaml compiler
<seliopou>
ok so both in my instance of the bug and the one report in that mailing list post, we're both doing `type 'a t = a`
Haudegen has quit [Ping timeout: 246 seconds]
MrScout has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
MrScout_ has quit [Ping timeout: 245 seconds]
MrScout has joined #ocaml
Arsenik has quit [Remote host closed the connection]
Arsenik has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
Thooms has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
oscar_toro has quit [Ping timeout: 276 seconds]
lordkryss has joined #ocaml
vanila has quit [Remote host closed the connection]
olauzon_ has joined #ocaml
davine has quit [Ping timeout: 252 seconds]
moei has joined #ocaml
olauzon has quit [Ping timeout: 244 seconds]
olauzon_ is now known as olauzon
ygrek has quit [Ping timeout: 245 seconds]
arj has joined #ocaml
pyon has joined #ocaml
Submarine has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
davine has joined #ocaml
mengu has quit [Remote host closed the connection]
enitiz has joined #ocaml
<j0sh>
with a clean and fully updated 4.02.1 opam switch, is there a reason why lwt.2.4.7 isn't being selected? it keeps trying to install 2.4.5 by default, won't recognize 2.4.7
<companion_cube>
do you have aspcud?
<j0sh>
companion_cube: dont think so... but i figured it out, looks like the base-no-ppx dependency is only good for ocaml < 4.02.0
<companion_cube>
well it works with ppx too
<companion_cube>
but it's probably because constraints are too complicated for the default solver