<rgrinberg>
tautologico: there are other lens libraries in haskell that require less cognitive strain
tidren has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
studybot has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
nikki93 has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
Kakadu has quit [Read error: Connection reset by peer]
kakadu_ has joined #ocaml
dnm has joined #ocaml
gasche has joined #ocaml
divyanshu has joined #ocaml
dnm has quit [Ping timeout: 252 seconds]
WraithM has joined #ocaml
tlockney is now known as tlockney_away
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
ebzzry has quit [Ping timeout: 252 seconds]
tautologico has quit [Quit: Connection closed for inactivity]
WraithM has joined #ocaml
tidren has quit [Remote host closed the connection]
racycle__ has quit [Quit: ZZZzzz…]
rgrinberg has quit [Quit: Leaving.]
Derander has quit [Ping timeout: 252 seconds]
michael_lee has quit [Quit: Ex-Chat]
Derander has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
skchrko_ has quit [Quit: Leaving]
pdewacht has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
pdewacht has joined #ocaml
Nuki has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
WraithM has quit [Quit: leaving]
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
<wwilly>
bonjour
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
studybot has joined #ocaml
Pupnik has left #ocaml ["Leaving"]
avsm has joined #ocaml
ustunozgur has joined #ocaml
yacks has joined #ocaml
yacks has quit [Max SendQ exceeded]
tane has joined #ocaml
Simn has joined #ocaml
<gasche>
whitequark, did you contact Gerd? I'm playing with an external bytes package right now
rand000 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
zpe has joined #ocaml
punrye has joined #ocaml
averell has quit [Ping timeout: 255 seconds]
penryu has quit [Ping timeout: 255 seconds]
zebr has quit [Ping timeout: 255 seconds]
Averell- has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
ggole has joined #ocaml
zebr has joined #ocaml
nikki93 has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
nikki93 has joined #ocaml
eizo has joined #ocaml
* whitequark
woke up
<whitequark>
Drup: responded on github
<whitequark>
gasche: nope, not yet. I was going to start poking Bytes now.
<whitequark>
what's your status?
Nuki has quit [Ping timeout: 250 seconds]
<gasche>
I have packaged an external bytes module, which I'm about to test
nikki93 has quit [Ping timeout: 240 seconds]
<gasche>
turns out bytes.ml is not just "include String" because there are a few extra functions to export
<gasche>
this work will be useful whether the "external" or "in ocamlfind" route is chosen
<companion_cube>
a bytes package for migrating away from mutable strings?
<companion_cube>
(for older versions of OCaml)
<gasche>
yes
<companion_cube>
sounds like a great idea.
<companion_cube>
(I assume you'd use some preprocessing magic depending on the version)
<gasche>
no need, that's the good part
<gasche>
just use version constraints
<whitequark>
gasche: ok. ping me when you have something published
<companion_cube>
oh.
<whitequark>
I'll try to migrate my stuff over to it and write a blog post
<gasche>
(or, if it is embedded into ocamlfind, that's configure-time)
<gasche>
whitequark, then I will probably mail Gerd and cc: you, I've interacted with him (pleasantly) before
<whitequark>
gasche: or should we talk with Gerd first?
<gasche>
I think it's better to get his opinion before communicating widely, although the distribution form is not the most important point
<whitequark>
agreed
<gasche>
a small gotcha is that in 4.02, "bytes" is a predefined type (it helps the type-checker do its magic)
<gasche>
thankfully, Damien defined Bytes.t as an alias for "bytes"
<gasche>
of course in the compatibility module "bytes" won't be available, so people must use Bytes.t for backward-compat
nikki93 has joined #ocaml
pminten has joined #ocaml
<companion_cube>
you can't add type bytes = t in the pre-4.02 version of your package?
<whitequark>
it won't be global
<companion_cube>
right
<whitequark>
(why aren't string, int, ... in Pervasives?)
<companion_cube>
(why is pervasives so big?)
<whitequark>
hysterical raisins!
<adrien>
gasche: wouldn't it be better not to have "bytes" at all? is it really useful or needed?
maattdd has joined #ocaml
<adrien>
or is it for coherency with other types, i.e. all builtin types get such an abbreviation
<adrien>
?
<companion_cube>
for the type-checker apparently, but if people use Bytes.t instead...
<adrien>
whitequark: the index looks good except for something with naming
<gasche>
the doctrine is that types that are handled by the type-checker in a special way are predefined
<gasche>
while the others are in the library
<whitequark>
adrien: oh?
Nuki has joined #ocaml
<gasche>
this explains why bytes
<gasche>
(or float, for that purpose)
<adrien>
basically, tools will look at 'http://irclog.whitequark.org/ocaml/' and try to get 'index' from there but upon loading the first element they get a redirection to the current day
<companion_cube>
then don't define type bytes, but type bytes_don_t_use_directly_use_Bytes_t
<companion_cube>
:D
<whitequark>
companion_cube: yeah, and that is going to show in error messages. no thanks
<companion_cube>
how so, if people use Bytes.t ? :)
<whitequark>
won't -short-paths mean the errors will contain bytes instead of Bytes.t?
<gasche>
you never know what shows in error messages
<whitequark>
that too
<adrien>
whitequark: awesome :)
chambart has joined #ocaml
nikki93 has joined #ocaml
lordkryss_ has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
nikki93 has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
ustunozgur has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
avsm has joined #ocaml
<gasche>
I just tested the bytes package, and it works
avsm1 has joined #ocaml
<whitequark>
great
dnm_ has joined #ocaml
nikki93 has quit [Ping timeout: 245 seconds]
<adrien>
whitequark: finished getting everything, worked well :)
nikki93 has joined #ocaml
<adrien>
whitequark: minor thing though, there is no link to that index on http://irclog.whitequark.org/ocaml ; could you add something like "<a href=index>Full Index</a>" next to the calendar?
<whitequark>
I constantly encounter useful variables not mentioned there
<whitequark>
yeah, findlib_meta.xml last updated 8 years ago
<whitequark>
gasche: a request: can we have a mirror at github.com/ocaml/findlib?
<whitequark>
then at least I wouldn't have to use svnweb
<adrien>
findlib isn't moving very quickly usually so a local clone should be just as efficient
<adrien>
what do you find lacking from findlib's META doc? (I'm geniously curious)
nikki93 has quit [Ping timeout: 250 seconds]
<whitequark>
for example, browse_interfaces that gasche just used
<gasche>
I copied it from somewhere else
<gasche>
:-'
<gasche>
no idea if it's really necessary
<gasche>
but that's second-order details
<whitequark>
gasche: also, can you add ccopt="-safe-string" ?
<whitequark>
oh! not for the compatibility package.
<whitequark>
I mean that seems logical; you can't pass -safe-string yourself either if you want to remain compatible, so it's better to let findlib do the job for you
<whitequark>
gasche: and: why not base-bytes?
<whitequark>
gasche: also, I believe your semantics is incorrect. in upstream, (Bytes.to_string "foo").[0] <- 'a' won't change "foo" to "aoo".
<adrien>
had never heard of browse_interfaces
avsm1 has quit [Quit: Leaving.]
<whitequark>
gasche: so, of_string should have been String.copy.
gasche has quit [Ping timeout: 276 seconds]
ivan\ has quit [Ping timeout: 276 seconds]
nikki93 has joined #ocaml
ivan\ has joined #ocaml
Nuki has quit [Remote host closed the connection]
nikki93 has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
ollehar has joined #ocaml
mort___ has joined #ocaml
ivan\ has quit [Ping timeout: 276 seconds]
avsm has joined #ocaml
avsm has quit [Client Quit]
ivan\ has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mort___ has quit [Quit: Leaving.]
ivan\ has quit [Ping timeout: 276 seconds]
gasche has joined #ocaml
mort___ has joined #ocaml
<gasche>
I lost some content (last message was from 12:55, then looked up the logs)
<gasche>
but I think I use copy for of_string/to_string
<whitequark>
gasche: if the goal is only to provide the compatibility layer and strictly nothing else, then sure.
<whitequark>
gasche: but if the goal is to ease adoption of -safe-string, then what I suggest is preferable.
<gasche>
you mean, make the dummy >= 4.02 package enforce -safe-string
<whitequark>
yes
<gasche>
so that people that want to compile code using Bytes under older versions are *forced* to change their code to have only immutable strings
<whitequark>
yes
<gasche>
we could add a findlib subpackage that adds the option
<whitequark>
if they do not want to make the change, they can keep compiling it exactly as it was before
<whitequark>
and (correctly!) get the deprecation warning on the mutation operations.
<gasche>
but then if they want an incremental transition, they can't
<gasche>
I don't think that's good
* whitequark
brb
AltGr has joined #ocaml
zpe has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
<whitequark>
gasche: ok. in principle, I agree with the incremental transition argument.
<whitequark>
but, consider this: the change is not significantly invasive. all it amounts to is changing some 'string's to 'bytes' and inserting conversion functions.
AltGr has left #ocaml [#ocaml]
<whitequark>
I do not think there is a case where it would truly be problematic to convert the entirety of a single file
<whitequark>
and, for multiple files, you can easily do incremental transition--just include the package only for a subset of files.
<mrvn>
whitequark: "all it amounts to is changing" <<- invasive
<mrvn>
whitequark: and the problem is the ripple effect. because all the reverse dependencies need to change too
<whitequark>
mrvn: no.
<whitequark>
if they do not use -safe-string, they will be able to use the string and bytes signatures alike
<whitequark>
oh, "reverse"
<mrvn>
also now basically every function taking a string needs to be duplicated to also have a bytes flavour.
<whitequark>
well, that's actually how it must be. why do you claim that you observe an invariant if you know your dependencies, whose API you reexport, don't?
<whitequark>
mrvn: that's an odd claim
<mrvn>
whitequark: The problem is that you MUST change things for it to even keep working
<whitequark>
mrvn: no, you're not! with the way it's currently implemented, you can blissfully ignore it and your stuff will keep working
<mrvn>
whitequark: it breaks with --safe-strings#
<whitequark>
then don't enable -safe-string in your code?
<mrvn>
whitequark: and if you don't then safe strings never get adopted
<mrvn>
Can you even mix modules compiles with and without safe-strings?
<whitequark>
yes
<mrvn>
whitequark: Why doesn't string remain mutable and you add a new module for immutable strings?
<whitequark>
because string literals must become immutable
<whitequark>
otherwise you spend time in loops in pointless copying. we've seen that in Ruby, it's not a solution.
nikki93 has joined #ocaml
<mrvn>
whitequark: so they become the new type. It would still be less invasive
<whitequark>
and size(code that mutates strings) <<< size(code that uses string literals)
<mrvn>
whitequark: I would say: size(code that mutates strings) >>> size(code that cares about string literals being immutable)
<whitequark>
I would start with the fact that mutable literals are just horrible design that should have never been implemented
<mrvn>
or size(number of lines with mutable strings) >>> size(lines with string literals)
q66_ has joined #ocaml
q66_ has quit [Changing host]
q66_ has joined #ocaml
<whitequark>
and this is probably just not true
q66 has quit [Disconnected by services]
q66_ is now known as q66
<whitequark>
(fortunately, it's easy enough to verify even with grep)
<mrvn>
every bit of IO has mutable strings
<ggole>
If by IO you mean Unix
nikki93 has quit [Ping timeout: 252 seconds]
<mrvn>
ggole: yes
<whitequark>
directly using Unix, eve
<whitequark>
even*.
<mrvn>
or sprintf
<whitequark>
sprintf?
<mrvn>
ok, sprintf is internal
<gasche>
sprintf will be fixed
<whitequark>
if you use, say, Buffer, you're safe
<mrvn>
Will printf.sprintf write to bytes but then return a string?
<gasche>
mrvn, it probably uses Buffer anyway
<ggole>
User code doesn't have to care.
<gasche>
but yes
<gasche>
there is a Bytes.unsafe_to_string function that you can use if you promise never to mutate a byte sequence again
<ggole>
You have to copy the final string out anyway (unless there's a truncation hack, I suppose)
<mrvn>
sprintf gives string, bprintf gives buffer. how to I print to bytes?
<gasche>
you can use String.blit that writes to a byte sequence
<mrvn>
gasche: useless copy
<whitequark>
yes, that's a good point
<gasche>
do you have an example of the kind of writing you have in mind?
<ggole>
Does Buffer allow extraction to bytes?
<whitequark>
Buffer clearly should.
<mrvn>
ggole: write data to a block of bytes and then add a checksum before writing it to disk.
<gasche>
yes, Buffer.to_bytes
<gasche>
(bytes_content would probably be a better name but well)
<mrvn>
is there Buffer.unsafe_to_bytes?
<whitequark>
gasche: or aliasing content as to_string :)
<whitequark>
mrvn: what for?
<ggole>
mrvn: Buffer would seem to allow that?
<mrvn>
whitequark: for when the buffer only has one bytes member and you never use the buffer again.
<whitequark>
a member? Buffer has members?
<whitequark>
what do you mean?
<mrvn>
whitequark: isn't a buffer a rope of bytes or something internally?
<gasche>
looks like Digest doesn't take bytes yet, we could fix that
<whitequark>
I think it's bytes which are reallocated exponentially larger
<gasche>
in any case
<ggole>
It's a block, which might not be of the right size.
<mrvn>
gasche: please first add my patch for Digest to tabe bigarray
<gasche>
I feel we're diverging
<ggole>
Unless there's a truncation hack you can't reuse that storage.
<mrvn>
ggole: you can't truncate. The GC needs the correct length of the block
<ggole>
You update the block header and make a fake object to put at the end.
<mrvn>
ggole: that wouldn't be string compatible.
<whitequark>
mrvn: I wonder if Digest should be improved at all
<ggole>
...the block is a string, so yes it would.
<ggole>
But there isn't such machinery, so this is all irrelevant.
<mrvn>
whitequark: why not?
<whitequark>
mrvn: it only offers md5, isn't it?
<whitequark>
"The digests are of cryptographic quality: it is very hard, given a digest, to forge a string having that digest."
<whitequark>
is not true anymore.
<mrvn>
whitequark: true. should be sha now
<whitequark>
it is trivial to forge an md5 digest given very modest resources (a laptop, say) and modest ime.
<ggole>
Actually there's caml_obj_truncate, but I wouldn't want to fiddle with that.
<whitequark>
improving it would suggest that one should use it, whereas it is clearly not true
<gasche>
mrvn, the patch is less uncontroversial than just adding bigarray support to digest
<gasche>
it creates a depency from Bigarray to Digest (maybe that's unavoidable), and add a whole new interface to Digest (that is a probably good idea in the long run but won't be mergeable in a few days)
nikki93 has joined #ocaml
<gasche>
that's not a criticism but I can't just include it right away
<gasche>
hm
<gasche>
I'd like to go back (temporarily) to the -safe-string point of whitequark
<gasche>
I still think we shouldn't enforce it in a >= 4.02 bytes package
<whitequark>
gasche: why?
<mrvn>
I think it's a bad design overall. mutability should be a phantom type.
<gasche>
in my opinion it's like new warnings: they are here because we think they can improve code, but we don't forcefully -warn-error them to users
<gasche>
we're offering a possibility to improve their code if they want to, not forcing them to
<gasche>
I understand the idea of making political decisions in some situations
<whitequark>
gasche: I disagree, unless all code uses -safe-string, there is practically no benefit, as there is no real invariant
<whitequark>
gasche: if they do not want to improve the code, they may not use the package (and Bytes module) at all!
<gasche>
but I don't think forcing strings to be immutable sooner is worthy of pissing people off
<gasche>
well
<whitequark>
I mean, I'm not forcing everyone to make strings immutable, I'm trying to eradicate a certain transitional state
<whitequark>
where the code appears to conserve the immutability invariant but in reality does not
<gasche>
but I don't see the benefits of that
<gasche>
note that unsafe coercions allow people to lie about immutability anyway, even in the -safe-string mode
nikki93 has quit [Ping timeout: 240 seconds]
<whitequark>
Obj.magic exists too, that doesn't remove the need for OCaml's type system :]
<gasche>
I don't see the problem with other people keeping using mutable strings, except maybe that it would delay the time at which a few more optimizations in the compiler would become acceptable
<gasche>
OCaml users tend to be educated
<gasche>
they can decide whether they want to activate safe-string or not
<whitequark>
I think the situation where you have a type with a declared invariant (immutable) and at the same time *invite* usage of the type which violates that invariant, by knowingly disabling the check that verifies it, is problematic.
<def-lkb>
gasche: coercions from immutable to mutable without Obj are allowed ?
<gasche>
yes
<gasche>
currently there is both, but I think I only recommended mutable->immutable to Damien
<whitequark>
gasche: although you may be right, because: 1) code that only supports OCaml >=4.02 doesn't have to depend on bytes; 2) if a package which uses -safe-string depends on one that does not and doesn't know about bytes, the problem is still here.
<gasche>
a phantom type system would be easier to use, but we couldn't make it backward-compatible
<whitequark>
gasche: ok, I have to agree that we do not include -safe-string in -package bytes. not because I think there is no need, but because that won't really help achieve the goal I want.
<whitequark>
mrvn: functors.
<whitequark>
the arity thing.
<gasche>
it's not directly related to arity
<whitequark>
gasche: oh? what else?
<mrvn>
whitequark: iirc works fine with the phantom type being declared.
<gasche>
you could just use _mutable _string or _immutable _string to get the right arity
<ggole>
mrvn: that type needs a type variable
<gasche>
there are problems with the value restriction for example
<whitequark>
mrvn: it does not, check it.
<whitequark>
oh, being declared. hmm.
<mrvn>
whitequark: we did that a few days ago and came to the conclusion that `a foo doesn't work but int foo does.
<whitequark>
right.
<mrvn>
string would be strictly mutable.
<mrvn>
no type variable involved
<gasche>
if you add polymorphism to the String API you quickly get in situations where modules fail because of undetermined type variables
<whitequark>
mrvn: [> ...] is sugar for [> ...] as 'a, isn't it?
<mrvn>
gasche: string wouldn't be. only the new phatnom types module.
<mrvn>
whitequark: type string = [ `Mutable ] bytes
<gasche>
mrvn, but string literals would still be of type string, and using immutable strings require everyone to change their code
<gasche>
not just the people using mutations
<mrvn>
gasche: yes. that's the drawback of backward compatibility
<whitequark>
would still be immutable*, rather
<whitequark>
or you have to copy them everywhere, which is really bad
<gasche>
Batteries has had immutable strings and arrays for age, and as far as I can tell nobody uses them
<ggole>
Mmm, it really needs to be the default string type to catch on
<gasche>
with the current -safe-string solution, most programs can switch to immutable strings with almost no change to the source code
ikaros has quit [Quit: Ex-Chat]
<gasche>
(because in practice they use them immutably anyway)
ustunozgur has quit [Remote host closed the connection]
<mrvn>
gasche: you get the same effect by making string = [ `Immutable ] bytes
<gasche>
<gasche> if you add polymorphism to the String API you quickly get in situations where modules fail because of undetermined type variables
troydm has joined #ocaml
lordkryss_ has quit [Quit: Connection closed for inactivity]
<mrvn>
gasche: you aren't adding anything to string
ustunozgur has joined #ocaml
<mrvn>
gasche: The only thing that changes is that String.t gets aliased to something new
<gasche>
Damien spent a few days trying various ways to do the change
<gasche>
I would be very happy if you had a better solution, but I suggest you try it first (for example bootstrapping the compiler with the new code variant would give you feedback of what breaks and how comfortable converting code is)
ontologiae has joined #ocaml
<mrvn>
gasche: I would love that too
darkf has quit [Quit: Leaving]
Yami_ has joined #ocaml
nikki93 has joined #ocaml
Yami_ has quit [Ping timeout: 240 seconds]
tianon has quit [Ping timeout: 252 seconds]
tianon has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 258 seconds]
ollehar has joined #ocaml
divyanshu has joined #ocaml
nikki93 has joined #ocaml
Cyanure has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
<gasche>
mrvn, nicoo had a patch recently on a new hash implementation
<gasche>
one question that was raised during the discussion, and which also raised a discussion a few months ago among Batteries contributor
nikki93 has joined #ocaml
<gasche>
is whether we could provide a better (shared) interface to *several* hashes, not too far from the "context" version you show in your patch
<gasche>
(which is also essentially what nicoo used for his implementation)
<gasche>
I think there is room for useful contributions in this space, outside the standard library
<gasche>
eg. a small "hashes" module that proposes various hashes with a convenient API could be very nice
<gasche>
(hashes and digests)
ollehar has quit [Ping timeout: 252 seconds]
Averell- is now known as Averell
<adrien>
gasche: really completely btw, I'll probably try to move ocaml to use -O2 (maybe with additional options) when a recent gcc is found
<adrien>
the idea being that -O0 or -O1 are too conservative with recent GCC versions
* adrien
one bug left, days of testing, win-builds 1.4 soon
<gasche>
I think Mark Shinwell discussed doing that recently
<gasche>
it may be the case that the work has already been done by the time you look at it (good!)
racycle__ has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
<adrien>
that would be awesome
<adrien>
it'll be a few weeks before such a change anyway
<adrien>
I expect 4.02 this summer (simply because it seems all release happen in the middle of summer)
<adrien>
and I'd be happier with things changed after that
nikki93 has quit [Ping timeout: 276 seconds]
ohama has joined #ocaml
contempt has quit [Remote host closed the connection]
tane has quit [Ping timeout: 276 seconds]
contempt has joined #ocaml
ontologiae has joined #ocaml
<Drup>
AeroNotix: use ocp-indent, and you can configure that to your preferences
<Drup>
whitequark: can't you ask for commit right to the original repository ?
rand000 has quit [Quit: leaving]
<Drup>
or whatever github fork spagetti you want to do. I think having a "main" repository as a github fork is confusing for everyone.
tane has joined #ocaml
studybot has joined #ocaml
studybot has quit [Read error: Connection reset by peer]
studybot has joined #ocaml
studybot_ has joined #ocaml
studybot has quit [Ping timeout: 240 seconds]
<whitequark>
Drup: it's quite common
<whitequark>
I don't think any action is needed here
Thooms has joined #ocaml
<Drup>
ok
nikki93 has joined #ocaml
<Drup>
(It may be common, it doesn't make it less confusing, but, well)
<whitequark>
(if it's common, it means that eventually one has to adjust the mental model anyway.)
nikki93 has quit [Ping timeout: 250 seconds]
ustunozgur has quit [Remote host closed the connection]
q66 has quit [Ping timeout: 252 seconds]
tidren has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
<Drup>
whitequark: I don't count the time we had to redirect someone to the new deriving repository to someone who was looking to the main one (according to github)
ustunozgur has joined #ocaml
<whitequark>
I'm not saying it can't be confusing, I'm saying this is an unavoidable side effect of DVCS-driven development model
<whitequark>
i.e. the right solution is to educate users, not to try go back to SVN
<Drup>
I never said to go back to svn =)
<whitequark>
ok :p
<whitequark>
by the way, I wanna let%lwt
<whitequark>
merge it already! :D
<Drup>
:)
<Drup>
whitequark: you can look at it/use it already
<Drup>
that would be nice to have someone writing code with it, so that you can tell me if the error reporting is correct
michael_lee has joined #ocaml
<Drup>
aah, no, I have no instalation mechanism yet beause oasis is not fixed >_<
<whitequark>
I think you do install it into global /bin ?
<whitequark>
well, opam bin in this case
<Drup>
I need to fix the opam for that, I didn't do it yet
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
<whitequark>
hm? I believe it will just work
<whitequark>
we'll see soon enough
<whitequark>
wtf, the build is broken
<Drup>
oh ?
ebzzry has joined #ocaml
<whitequark>
well... yes, I'm using trunk ppx_metaquot
<whitequark>
without the .exe part
<Drup>
:D
<whitequark>
would you kindly remove it from the invocation?
<Drup>
will do, fix it locally for now :)
tnguyen has joined #ocaml
<whitequark>
$ ls -d ocaml-* | wc -l
<whitequark>
16
<whitequark>
and most of that is external projects I've been fixing -_-'
topher has joined #ocaml
<whitequark>
Drup: uhhh, yes, it attempts to install it into /usr/local/bin
<whitequark>
but my homegrown ppx_protobuf extension correctly installs it into opam's bin, and I didn't do anything for that
<whitequark>
weir
<whitequark>
*weird
jao has quit [Ping timeout: 250 seconds]
<ggole>
Hmm, I half expected Module.{...} to work
<whitequark>
there's been some discussion of making it work
racycle__ has quit [Quit: ZZZzzz…]
<ggole>
Not crushingly important, but it would be nice
<Drup>
ggole: it's in
<Drup>
4.02*
<ggole>
Oh, nice
<whitequark>
Drup: oh, that's because OASIS tries to install .byte file as an arch-independent
tautologico has joined #ocaml
<whitequark>
mrvn: I just noticed: lwt (which is basically built around IO) there are five deprecation warnings about Bytes
<whitequark>
I cannot share your sentiment that transition would be complex and invasive.
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<Drup>
"Fatal error: Not_found" when compiling the trunk :(
<whitequark>
Drup: trunk of what?
<Drup>
ocaml
<whitequark>
whoa.
<whitequark>
try 2014-04-29
<Drup>
grmbl, can't give precise date to opam
<whitequark>
and it doesn't record the commit hash, sadly
<whitequark>
oh, I used my own lwt fork, nevermind
<whitequark>
no, still doesn't work
<Drup>
what did I do wrong ? :D
<whitequark>
no, opam still used my own fork because I didn't do opam update
<whitequark>
(╯°□°)╯︵ ┻━┻
<whitequark>
let's reinstall lambda-term and utop for fourth time...
<whitequark>
yay it worked.
<whitequark>
Drup: now another thing does not: let%lwt foo = bar in let%lwt...
<whitequark>
the second %lwt is flagged as an error
<whitequark>
I can see why it's not merged.
<Drup>
I did tell it was not ready nor tested
milosn has quit [Ping timeout: 240 seconds]
<whitequark>
just stating a fact
milosn has joined #ocaml
<whitequark>
Drup: oh, hm, I think the issue is in my usage of try%lwt
<whitequark>
you don't seem to handle it
<Drup>
indeed, try is not implemented
rgrinberg has joined #ocaml
<whitequark>
would you do it? or should I?
<Drup>
the issue is that I'm not sure how to handle the finally
<Drup>
so I postponned it
<whitequark>
let's omit it for now
<Drup>
yes
<whitequark>
finally, I mean.
<whitequark>
not try%lwt :D
<Drup>
if you are in a hurry, go on, but I will do it :)
<whitequark>
well, I converted my code to ppx_lwt, and now it's broken
<whitequark>
and I can't go on.
maattdd has joined #ocaml
* whitequark
sighs
rgrinberg has quit [Client Quit]
<whitequark>
ok, I'll rollback to camlp4 for now, I guess
<Drup>
you like your edges very very bleeding, don't you ?
<whitequark>
story of my life.
zpe has joined #ocaml
<whitequark>
I even moved in a practically empty neighborhood a few years back. it was nice for a while, now it's full of people.
zpe has quit [Ping timeout: 240 seconds]
racycle__ has joined #ocaml
rgrinberg has joined #ocaml
<gasche>
whitequark, why don't you write the ppx-mode yourself?
<gasche>
if you want to use it, it's better for you to fix it than force synchronization with poor Drup
<gasche>
my pain point with -ppx is that it isn't obviously merlin-compatible
<gasche>
I expect it will change after it sees some usage to become more merlin-friendly, but that will be painful to early-adopters during the 4.02 cycle
<whitequark>
gasche: well, I did offer to write it myself...
<whitequark>
merlin doesn't work on 4.02 anyway, so doesn't ocp-index
<def-lkb>
… I hope to have a beta version soon.
<Drup>
gasche: what is the relation between me and merlin ?
<gasche>
none?
<gasche>
(I don't know)
<Drup>
ok, you put two non related sentences close together :p
<gasche>
def-lkb, don't stress out, it's not feature-freezed yet
<gasche>
(but you didn't answer about whether you had a .merlin file for the ocaml distribution, which I would be interested in)
<gasche>
I could write one myself but that involves reading doc, yawn
<mrvn>
In ocaml are signal handlers allowed to Printf.printf?
<def-lkb>
sure, anyway I am on syntax recovery atm :'
<def-lkb>
(I think I missed your question, I don't have a proper .merlin for ocaml distribution, but it shouldn't be hard to do)
<gasche>
"syntax recovery"? sounds like an interesting context
<gasche>
*concept
<def-lkb>
:D, syntax error* ? :)
maattdd has quit [Ping timeout: 258 seconds]
<whitequark>
mrvn: I think in ocaml signal handlers can do anything
<mrvn>
whitequark: odd. The signal handler is called with the output channel mutex held so it deadlocks when it tries to take it again.
<mrvn>
(the signal comes in the middle of a print)
<mrvn>
Has anyone used signals without threads and printed a lot?
<Drup>
whitequark: no but really, if you are in such a hurry, you can finish the ppx
ontologiae has joined #ocaml
michael_lee has quit [Remote host closed the connection]
rom1504 has left #ocaml [#ocaml]
<whitequark>
I'm fine with camlp4 so far, it doesn't make a difference right now
ollehar has joined #ocaml
eizo has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
topher has left #ocaml [#ocaml]
gasche has quit [Ping timeout: 265 seconds]
tidren has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
Thooms has quit [Quit: WeeChat 0.3.8]
<Drup>
whitequark: ppx option for utop doesn't seem to work
<Drup>
I just checked to be sure, nested let%lwt works fine.
<Drup>
and I added an opam file at the root of my branch of lwt
ollehar1 has quit [Quit: ollehar1]
tidren has joined #ocaml
<Drup>
whitequark: did you solve the issue to compile an executable for tests with a ppx defined in the same oasis file ?
Hannibal_Smith has quit [Quit: Sto andando via]
gasche has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
zpe has joined #ocaml
testcocoon has joined #ocaml
tobiasBora has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
tnguyen has quit [Ping timeout: 264 seconds]
ontologiae has quit [Ping timeout: 250 seconds]
swsch has joined #ocaml
<whitequark>
Drup: yes, the ppx option seems to not handle extension nodes
<Drup>
that's weird.
<whitequark>
i.e. something inside utop raises on them before the extension has a chance to replace them. I didn't catch that, because ppx_protobuf doesn't use extension nodes
<whitequark>
I'll figure it out a bit later (in a bus right now, so you could say I'm bus-y)
<whitequark>
Drup: an opam file?
<whitequark>
what would that do?
<Drup>
whitequark: when you pin a project with an opam file at the root, it uses this one instead
<whitequark>
Drup: I did solve it, or rather Sylvain explained it to me
<swsch>
I'm trying to install freetds, and opam (using aspcud wants to downgrade packages that seem to be totally unrelated. Am I doing something wrong?
<whitequark>
long story short, take a look at ppx_protobuf or ppx_getenv (my example extension)
<Drup>
ok
<gasche>
swsch, it may be related to changes in upstream packaging information about those packages
<gasche>
very recent (possibly trunk) versions of OPAM have a feature to explain version changes
<swsch>
I've just tried with --no-aspcud and the built-in solver installs only freetds
<swsch>
my opam is 1.1.1 installed via ocamlbrew
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<gasche>
swsch, if you can export your current state and your request, to send to the aspcud/opam maintainers, they may be interested
<swsch>
I'll try to get back to the state before (now that it has been installed).
<swsch>
If the problem shows up again, I'll open an issue in opam's tracker
zpe has quit [Ping timeout: 240 seconds]
<gasche>
swsch, to export the state, it looks like it suffices to add --cudf=foo to your command
<gasche>
eg. I suppose "opam install ... --cudf=foo"
<gasche>
this will produce a file "foo", in the CUDF dependency-solving-description-format, that should tell enough to the developpers
<swsch>
gasche: strangely enough, specifying solver preferences had no effect ... but that could also be due to the aspcud-proxy script
<Drup>
oh, you're using the proxy
<Drup>
are you sure it's actually interrogating the server, the mass downgrade can also result from "I didn't succeed at using my solver, so I do something nonsensical"
<swsch>
it works much better for "opam upgrade" than the built-in solver
tidren has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 252 seconds]
<swsch>
it's not a "mass" downgrade, it's about 10 packages or so
<Drup>
that qualifies at mass downgrade, yes :)
ollehar has joined #ocaml
<swsch>
00:01.880 018776 CUDF graph_of_actions root_actions={ - downgrade lambda-term.216 to 186, - downgrade react.104 to 103, - downgrade utop.246 to 210, - install ocamldbi.114 }
<AeroNotix>
I keep hearing references to "The Solver", like it's some religious relic which solves mighty computational problems. What is "The Solver" ?
<swsch>
I see that installing ocamldbi has the same effect.
<AeroNotix>
Drup: checking out ocp-ident now, cheers.
zpe has joined #ocaml
<Drup>
AeroNotix: opam includes a built in solver
<Drup>
for packaging constraint and all this stuff
<swsch>
it resolves package dependencies such that you have a consistent system.
<Drup>
and can also use an external one
<AeroNotix>
Aha, nice
<Drup>
and the built in one is .. not really good
<AeroNotix>
But.. is this really something specific to OCaml?
<AeroNotix>
like
<Drup>
no
<AeroNotix>
I imagine it to be X depends on Y,J,K with versions N,P,R
<AeroNotix>
and the thing just "solves" this
<AeroNotix>
interesting
<Drup>
well, it's basically an SMT formula
* AeroNotix
googles
<Drup>
come one, bachelor lvl in CS !
<Drup>
on*
<Drup>
:)
<AeroNotix>
I left school at 15
<AeroNotix>
so...
tidren has joined #ocaml
<swsch>
I just checked, the proxy script passes the criteria along to the server
tidren has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
ustunozgur has quit [Remote host closed the connection]
tobiasBora has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
tobiasBora has joined #ocaml
ustunozgur has joined #ocaml
tlockney_away is now known as tlockney
<whitequark>
utop also breaks if the ppx rewriter throws. that's pretty unhelpful
<swsch>
Thanks for listening and advice, time to call it a night.
<whitequark>
Drup: no, it's a definitive solution.
<Drup>
whitequark: you're not doing the same thing in getenv
<whitequark>
Drup: whoops, I updated the blog post but didn't push the repo
ustunozgur has quit [Remote host closed the connection]
<Drup>
whitequark: did you had an explanation on the why ?
<whitequark>
anyway, Sylvain told me that this is how OASIS is supposed to work
<whitequark>
and that this won't be changed
<jpdeplaix>
whitequark: if nobody reply to my proposal on llvm-commits, I guess it's not a good sign :/
<Drup>
I don't use oasis in order to have to invoke ocamlbuild manually
ustunozgur has joined #ocaml
<jpdeplaix>
what should I do ?
<whitequark>
Drup: the rationale appears to be "the compilation itself is a test", and he has a point
rz has joined #ocaml
<whitequark>
Drup: I can forward the conversation to you and you can discuss it further, if you want.
<Drup>
whitequark: and what if I want to write a ppx and use it in a library defined in the same _oasis ?
<Drup>
it's possible in camlp4 syntax packages.
<jpdeplaix>
Drup: what do you need in oasis ?
<whitequark>
for *that*, OASIS should have a feature but does not currently have one. he said he'll implement it sometimes.
<Drup>
oh, ok
maattdd has joined #ocaml
<Drup>
then it will be possible without manual ocamlbuild invocation, fine.
<whitequark>
jpdeplaix: it can be quite common. can you give me the links to patches again?
tobiasBora has quit [Quit: Konversation terminated!]
Submarine has quit [Quit: Leaving]
<Drup>
whitequark: I actually prefer the previous solution you used in getenv
<whitequark>
Drup: it doesn't work with CompiledObject: best
<Drup>
I know
<whitequark>
and generated code can be enormous, e.g. menhir or something
swsch has left #ocaml [#ocaml]
<whitequark>
jpdeplaix: I'll ping the right people in the following days
<Drup>
I was going to do "if flag (tests) then best else bytes
<Drup>
but it doesn't work
<whitequark>
yes, OASIS' language is quite limited
<Drup>
no, that's no the issue
<Drup>
it doesn't find the "tests" flag ...
<whitequark>
odd
<Drup>
yes
gasche has quit [Ping timeout: 250 seconds]
<Drup>
CompiledObject field can not be conditional anyway
ustunozg_ has joined #ocaml
ustunozgur has quit [Ping timeout: 240 seconds]
racycle__ has quit [Quit: ZZZzzz…]
<jpdeplaix>
whitequark: thanks a lot
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
zpe has quit [Ping timeout: 276 seconds]
kakadu_ has quit [Quit: Konversation terminated!]
ggole has quit []
<AeroNotix>
Drup: ocp-indent is pretty cool!
<AeroNotix>
love tooling like this
<AeroNotix>
simple things like formatting code and such stuff seems trivial but if you don't have to think about it, it speeds up development so much.
alex_nx has quit [Ping timeout: 240 seconds]
alex_nx has joined #ocaml
tlockney is now known as tlockney_away
maattdd has quit [Ping timeout: 252 seconds]
tlockney_away is now known as tlockney
alex_nx has quit [Ping timeout: 245 seconds]
amiller- has quit [Ping timeout: 240 seconds]
Guest93974 has joined #ocaml
alex_nx has joined #ocaml
chambart has joined #ocaml
racycle__ has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
maattdd has joined #ocaml
punrye is now known as penryu
penryu has quit [Changing host]
penryu has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
eizo has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
rgrinberg has joined #ocaml
eizo has quit [Ping timeout: 240 seconds]
Simn has quit [Quit: Leaving]
dnm has joined #ocaml
philtor has joined #ocaml
ustunozg_ has quit [Remote host closed the connection]
maattdd has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
maattdd has quit [Ping timeout: 240 seconds]
<mrvn>
*grummel* Somehing is off with my thread module. When I only yield manually everything works fine but when I yield in the signal handler for the tick the GC goes wild.
Nahra has quit [Remote host closed the connection]
<whitequark>
threads are tricky.
<whitequark>
crap, it's almost four in the morning
<AeroNotix>
whitequark: happened to me yesterday
<whitequark>
it happens to me every day -_-
<AeroNotix>
are you in .jp or something?
<whitequark>
.ru. UTC+4
<AeroNotix>
ah ok
<AeroNotix>
.pl here
<AeroNotix>
plz don't invade
<AeroNotix>
k thx
<whitequark>
.jp is waaaaaay further
<whitequark>
like about twelve hours further
<AeroNotix>
Dammit Jim I'm a programmer not a geographer
<whitequark>
uh... you ever looked at a globe?
<AeroNotix>
whitequark: it's 1:21am
<AeroNotix>
I'm not thinking straight
<whitequark>
(don't invade) sane people in .ru consider our government criminal. alas, not too many sane people left
<AeroNotix>
whitequark: I assumed this would be the case.
<AeroNotix>
Kinda scary times
<whitequark>
so let's hope NATO will respond to a .pl invasion with a full-scale nuclear war
<whitequark>
because nothing else will deter them
<AeroNotix>
Ok, *very* scary thought
<tautologico>
Putin is crazy
<whitequark>
sadly, I mean that seriously too
<whitequark>
it really is the only thing that will keep Putin at bay
<whitequark>
MAD *is* scary.
<AeroNotix>
Then you'll break out all the secret allegiences .ru has with various arab nations
<Drup>
Don't take it badly but I'm really curious : why are you staying there ?
<AeroNotix>
Drup: me or whitequark ?
<Drup>
whitequark:
<whitequark>
Drup: so far, the only option I have is relocating and being at a whim of some big tech company
<AeroNotix>
whitequark: do you know Erlang?
<whitequark>
it is not exactly exciting to know that if someone doesn't like my face tomorrow, I'll have to return in whatever state RU will then be
rgrinberg has quit [Quit: Leaving.]
<whitequark>
within a month or so, if I don't find someone else who wants to employ me.
<Drup>
whitequark: right :/
<whitequark>
AeroNotix: well, I have read Joe Armstrong's thesis and appreciated the design. I could probably write decent Erlang code in two weeks to a month, if needed.
<AeroNotix>
whitequark: I'll pm you my e-mail address.
darkf has joined #ocaml
<tautologico>
I know a lot of people working overseas
<tautologico>
developers
<whitequark>
most of our team does
<tautologico>
some are almost getting canadian citizenship
<whitequark>
Thailand and Bali are in fashion lately
<tautologico>
most are in Canada, Germany and the US
<tautologico>
good programmers can get good jobs almost anywhere, and the jobs people can get here rarely pay as well as a job in a developed country
madroach has quit [Ping timeout: 252 seconds]
<AeroNotix>
Weirdly, I'm from the UK originally, but I moved to .pl
<whitequark>
tautologico: for me the issue is not worrying about the (lack of defined) future I have somewhere overseas.
madroach has joined #ocaml
<whitequark>
some people I know are OK with working on Bali where they are basically in a legal grey area and have almost 0 rights if something goes wrong.
<whitequark>
I'm not.
<tautologico>
so why not other countries?
<AeroNotix>
The UK is not far away and has great opportunities at the moment for certain functional programming languages
<whitequark>
I mean, that's the rationale for not relocating under the umbrella of some big tech company.
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tautologico>
the US can be complicated, but there are plenty of other places with good jobs where you can relocate permanently if you want
<whitequark>
perhaps I'm too paranoid about it.
<whitequark>
I don't really want to live in US for the rest of my life :p
<Drup>
europe as a russian should be pretty easy, shouldn't it ?
struktured has joined #ocaml
<AeroNotix>
Drup: not really
<Drup>
oh ?
<tautologico>
you don't need to go to the US
<whitequark>
Drup: it depends on what do you mean by "europe"
<AeroNotix>
Drup: afaict, no. It's outisde the EU
<AeroNotix>
so it's the same as for any non-EU citizen
<AeroNotix>
easier if you have a company batting on your side :)
<AeroNotix>
but it's definitely not as bad as the US
<Drup>
AeroNotix: sure, but I though it has some agreement.
<AeroNotix>
Drup: perhaps it does? I'm not 100%
<whitequark>
Drup: of course not
NoNNaN has quit [Remote host closed the connection]
<nicoo>
Drup: Where I was in Graz, it was fairly difficult for Russian PhD students to get through all the red tape to get their residence permit renewed
<Drup>
:/
NoNNaN has joined #ocaml
<Drup>
national borders and stuff are such a mess X_x
<nicoo>
in the end, a local PhD student came with the Russian one and read the relevant law text to the person had the desk to get Ayrat's papers :(
<nicoo>
Drup: They sure are.
<whitequark>
EU would have imposed an economic blockade on RU if it could, much less have a (bilateral, supposedly) agreement