<greenbagels>
im reading the ocaml manual and it says writing .ml and .mli files is basically equivalent to writing `module foo: sig <insert mli here> end = struct <insert ml here> end
<greenbagels>
so then how does writing interfaces for nested modules work? do i have to write out the module type and module definitions out explicitly?
<greenbagels>
both in the .mli, i mean?
<greenbagels>
like say i have files foo.ml and foo.mli with a submodule Foo.Bar; how should i write the interface for Bar?
raskol has joined #ocaml
<williewillus>
greenbagels: `module Bar : sig <signature> end`
<williewillus>
in foo.mli
<williewillus>
doesn't have to be an inline signature either can be a reference to a `module type X` located elsewhere
mro has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
raskol has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
yewscion has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
bobo_ has quit [Ping timeout: 246 seconds]
spip has joined #ocaml
<greenbagels>
gotcha
wilfred has quit [Quit: Connection closed for inactivity]
mro has quit [Remote host closed the connection]
gravicappa has joined #ocaml
mro has joined #ocaml
aspe has joined #ocaml
aspe has quit [Quit: aspe]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
olle has joined #ocaml
bartholin has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
hello
<olle>
\o
wonko has joined #ocaml
hyphen has quit [Ping timeout: 258 seconds]
Haudegen has quit [Quit: Bin weg.]
perrierjouet has quit [Quit: WeeChat 3.5]
noonien has quit [Ping timeout: 240 seconds]
mro has quit [Ping timeout: 255 seconds]
noonien has joined #ocaml
mro has joined #ocaml
noonien has quit [Quit: Ping timeout (120 seconds)]
noonien has joined #ocaml
Sankalp- has joined #ocaml
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp- is now known as Sankalp
Haudegen has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
gravicappa has quit [Ping timeout: 258 seconds]
<d_bot>
<Patate> Hi, how can one bind to a C struct with bit fields using **ctypes**? I saw people just write wrapping functions in C, but is there a ctypes/cstubs only trick?
<d_bot>
<Patate> It's when you have something like
<d_bot>
<Patate> struct s { int a:1 /* 1 bit */; int b:2; ... };
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
mro has joined #ocaml
gravicappa has joined #ocaml
mro has quit [Quit: Leaving...]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anarchos has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
waleee has joined #ocaml
yewscion has joined #ocaml
mro has joined #ocaml
motherfsck has joined #ocaml
mro has quit [Ping timeout: 272 seconds]
mro has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has quit [Quit: Leaving...]
bartholin has quit [Quit: Leaving]
gravicappa has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
waleee has quit [Ping timeout: 272 seconds]
neitsch[m] has quit [Quit: You have been kicked for being idle]
<olle>
There's no OCaml operator to unpack an option to its value, given a default?
<olle>
I know of the Option.value function
<olle>
Something like
<olle>
let opt = Some "moo"
<olle>
let val = opt OR "default moo"
<olle>
Where "OR" is the unpacking operator
<sim642>
You can define your own operator, e.g. |?
<d_bot>
<NULL> There are few operators defined in the Stdlib, so ^
<olle>
sim642: sure, but is it idiomatic?
<sim642>
That's the operator in Batteries at least, not sure about other stdlib extensions
<olle>
Oh!
yewscion7 has joined #ocaml
<olle>
Thanks :)
olle has quit [Ping timeout: 246 seconds]
<companion_cube>
is the opam-ci pipeline clogged?
mbuf has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Haudegen has joined #ocaml
Anarchos has joined #ocaml
waleee has joined #ocaml
wonko has quit [Ping timeout: 260 seconds]
mro has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olle has joined #ocaml
raskol has joined #ocaml
rgrinberg has joined #ocaml
raskol has quit [Ping timeout: 246 seconds]
Tuplanolla has joined #ocaml
spip has quit [Ping timeout: 246 seconds]
bobo_ has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<d_bot>
<Faun> Hi guys,
<d_bot>
<Faun> _I'm apologies if I'm in the wrong channel._
<d_bot>
<Faun> I looking for someone who's have a good known about open-source licenses. In terms of enforcement law. I don't know how to find the one that should fit with my mind, project or even on my political side.
<d_bot>
<Faun>
<d_bot>
<Faun> Someone could give me some tips, information or just a beginner's journey to know everything on this topic ?
<d_bot>
<Faun> Thanks 🙂
<grobe0ba>
ask google.
<grobe0ba>
its a very, very large topic.
<grobe0ba>
also talk to a lawyer if its that big of a deal.
<grobe0ba>
if all you want is a general purpose license that allows your code to be used basically everywhere, the ISC or BSD licenses will work perfectly for that.
<d_bot>
<octachron> More constructively, you can start with the GPL or MIT licenses, and see on which points you disagree to refine your search.
<grobe0ba>
otherwise, your choice of (IMO) not actually open-source licenses like the GPL, or Apache license, which are really corporate viral contracts in disguise abound everywhere.
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
<d_bot>
<Faun> Thanks for that, I've some fear about some licenses.
<d_bot>
<Faun>
<d_bot>
<Faun> An old teacher told me that some licenses was dangerous. If I've a good memory, he said that with MIT licenses some peoples could pay royalties just because they opened some PR on these projects...
<d_bot>
<Faun> I'm not really attract about enforcement law. But if it could provide me some troubles I want to do something correct at the begin
<Corbin>
grobe0ba: GPL and Apache 2 are accepted by OSI; don't worry about it.
<companion_cube>
who has ever had to pay royalties because of MIT licensed stuff??
<d_bot>
<Faun> I don't know, but my old teacher told me that.... :x
<grobe0ba>
Corbin: couldn't care less what OSI says.
<grobe0ba>
i read the license. GPL and apache are viral contracts, not licenses for open-source, _in my opinion_, which is what was asked for. not actually interested in arguing about it. i use the ISC license for my stuff.
<grobe0ba>
Faun, then your teacher is a dumbshit who can't actually read.
<d_bot>
<Faun> It could be my english skill that are bad too :x
<d_bot>
<Faun> but I found this topics about someone who's ask about the ability to collect patents royalties
<grobe0ba>
they are very distinctly different things
* Anarchos
finds it funny he just wrote his own licence (in french though)
<grobe0ba>
a copyright != patent
<grobe0ba>
the MIT/ISC/BSD license has nothing to do with patents.
<grobe0ba>
if you're patenting something, you probably aren't releasing it under an open source license. if you end up in that situation, you need a lawyer, not IRC.
<d_bot>
<hockletock> it's not like the copyright holder and patent holder need to be the same entity
<d_bot>
<Faun> Hmm I should describe what I want :
<d_bot>
<Faun> * Share with community
<d_bot>
<Faun> * Just my name linked to the project (There is a French law about that)
<d_bot>
<Faun> * No troubles
<d_bot>
<Faun> * Just wanna code with no loudly thinking about law :c
<d_bot>
<Faun>
<d_bot>
<Faun> That's it :x
<grobe0ba>
yeah, and even you release the reference implementation of a patent as open-source, the license can grant a royalty-free distribution of the source but not allow modification without paying the royalty
<grobe0ba>
so people can see how, and distribute that how, but still pay fees for modifications or new implementations.
<grobe0ba>
faun: ISC license then
<grobe0ba>
minimal footprint, easy to understand, can be upheld in any reasonable country (anywhere not russia, north korea, etc. shit like that)
<d_bot>
<Faun> Really thank you
<Corbin>
grobe0ba: It sounds like you're offering legal advice on IRC. Are you sure?
<grobe0ba>
its what OpenBSD uses for OpenBSD, OpenSSH, OpenSMTPd, OpenBGPd, etc.
<grobe0ba>
Corbin: no, i'm offering opinions
<grobe0ba>
if he wants legal advice, he should talk to a lawyer
<d_bot>
<Faun> That just an entire world to understand about these licenses and their meaningful
<Corbin>
grobe0ba: We should destroy copyright.
<grobe0ba>
faun: yeah, there is. seriously, if you need help understanding, there are websites out there, but lawyers are you best bet.
<grobe0ba>
and i could be wrong anything and everything.
<grobe0ba>
Corbin: go ahead, change the world. i'll wait for you to make a meaningful contribution, just like you have here.
<grobe0ba>
oh, wait. you haven't. nm.
<d_bot>
<Faun> I will talk about that with my lawers friend so :x
<grobe0ba>
in particular, you mentioned France. i am not even vaguely familiar with french law, or french law in regard to E.U. law.
<Corbin>
grobe0ba: Another opinion: You should get up from the keyboard and take a walk. Maybe get a snack.
<d_bot>
<Faun> Don't fight cause of me guys that could make me blushing 🤭
<grobe0ba>
the ISC license is meant to be basically universal and enforceable anywhere that isn't a dictatorship, but.... *shrug*
<grobe0ba>
Faun: oh, i just like feeding trolls. it gives me something to do.
<grobe0ba>
or maybe i'm the troll. not really sure at this point.
* grobe0ba
shrugs
mro_ has quit [Quit: Leaving...]
<d_bot>
<Faun> you make me laughing :p
<grobe0ba>
:)
<Anarchos>
Faun did you look at my licence ?
<d_bot>
<Faun> It give me a 404 not found :x
<d_bot>
<RegularSpatula> Sometimes I think I'm trying to push the type system too hard...what I mean is trying to encode too much "stuff" in the types...I'm in the middle of a project where I figured I would try and jam as many tricky previous bugs into type errors as possible...it's cool, but it can quickly get really tedious
<d_bot>
<RegularSpatula> Might end up just reverting most of the changes, we will see
<sleepydog>
RegularSpatula: I feel like that is an easy trap to fall into. But there are worse vices :)
<d_bot>
<Faun> lmao, it is valuable in terms of law ? 😮 I find it really funny 😮
<d_bot>
<Faun> (My question should be could I write my own license like that ?)
<d_bot>
<octachron> Note that if you are the author, you are the one being protected (maybe too much) by copyright (and the French law on authorship). At worse, you can just end up not giving enough rights to the users of your code.
<d_bot>
<Faun> So I should find a license that provide more rights on my users
<d_bot>
<RegularSpatula> sleepydog: yeah i feel like the balancing of it is the trick
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has joined #ocaml
gravicappa has quit [Ping timeout: 244 seconds]
sparogy has quit [Remote host closed the connection]
sparogy has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has joined #ocaml
<dh`>
do not write your own license
<dh`>
that is not legal advice, that's practical advice
<dh`>
otherwise, please take this rubbish to gnu.misc.discuss
* dh`
hides
olle has quit [Ping timeout: 255 seconds]
szkl has joined #ocaml
perrierjouet has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xgqt has quit [Ping timeout: 246 seconds]
xgqt has joined #ocaml
bastienleonard has quit [Quit: WeeChat 3.5]
Haudegen has quit [Ping timeout: 272 seconds]
raskol has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
raskol has quit [Ping timeout: 255 seconds]
motherfsck has quit [Quit: quit]
motherfsck has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]