nivek has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benwbooth has quit [Ping timeout: 250 seconds]
<Algebr`>
aantron: ping
Orion3k has joined #ocaml
<ygrek_>
copy`, Obj.is_block @@ Obj.repr 0l
<copy`>
Oh, huh
<copy`>
Well, that's good to know. Cheers
pyon has quit [Ping timeout: 252 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
nivek has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
rgrinberg has joined #ocaml
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
pyon has joined #ocaml
d0nn1e has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
d0nn1e has joined #ocaml
FreeBirdLjj has joined #ocaml
kushal has joined #ocaml
kushal has quit [Changing host]
kushal has joined #ocaml
tmtwd has joined #ocaml
rgrinberg has joined #ocaml
pierpa has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ygrek_ has quit [Ping timeout: 264 seconds]
nivek has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
struk|desk has joined #ocaml
M-pesterhazy has quit [Remote host closed the connection]
M-Illandan has quit [Read error: Connection reset by peer]
M-martinklepsch has quit [Remote host closed the connection]
M-jimt has quit [Remote host closed the connection]
regnat[m] has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
<Algebr`>
Any advantage for using one of these over the other? type system = <exit : 'a. ?code:int -> string -> 'a> type 'a system_ = <exit : ?code:int -> string -> 'a>
<Algebr`>
<Algebr`>
And is the first one then a locally abstract type?
FreeBirdLjj has quit [Remote host closed the connection]
regnat[m] has joined #ocaml
travula has joined #ocaml
fluter has quit [Ping timeout: 250 seconds]
larhat has quit [Quit: Leaving.]
jonasen has joined #ocaml
M-martinklepsch has joined #ocaml
M-jimt has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
fluter has joined #ocaml
sz0 has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
jonasen has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
<bruce_r>
Is there a way to make 'sudo' use my opam setup?
<bruce_r>
when I run an opam command (like ocsigenserver) as sudo, it doesn't find it
<Algebr`>
make try like: sudo $(which ocsigenserver)
<bruce_r>
I added my opam path to the sudo path, but now it cannot find some packages to run
<Algebr`>
maybe
<bruce_r>
that would solve the first part yes
<bruce_r>
except for the fact that the command I actually type is just 'make' :)
<flux>
algebr`, the latter has the benefit of perhaps being more easily inferred by the compiler
<flux>
though I guess the optional argument already destroys that, so maybe not that great a benefit :)
<flux>
bruce_r, did you do eval $(opam config env) as root?
Simn has joined #ocaml
<bruce_r>
flux: I can't, opam is not installed as root
<bruce_r>
opam is installed for me
<bruce_r>
the opam root is in my home directory
<bruce_r>
in ~/.opam
<struk|desk>
vbmithr: ping
<bruce_r>
you guys know if #opam is an actual irc room?
<struk|desk>
vbmithr: do I need to downgrade to 4.02.3 to test your stuff out?
AlexRussia has quit [Ping timeout: 260 seconds]
<struk|desk>
bruce_r: sudo -E ?
rand__ has joined #ocaml
<bruce_r>
very cool struk
<bruce_r>
thanks!
<bruce_r>
that worked
<bruce_r>
but now, can I have this same trick as root?
<bruce_r>
can I tell root to use my env?
<bruce_r>
(going to bed, will check for answers tomorrow). But thanks, that helped a lot already.
<struk|desk>
np, good night. not sure how to do that as root...why do you even need to though?
<struk|desk>
just guessing here, but maybe something like sudo -u your_ocaml_user
<struk|desk>
(as root)
kushal has quit [Quit: Leaving]
Algebr` has quit [Ping timeout: 250 seconds]
wolfcore has quit [Ping timeout: 276 seconds]
wolfcore has joined #ocaml
AlexRussia has joined #ocaml
<pitastrudl>
hello
<pitastrudl>
if anyone might know, in pattern matching, is it possible to have more conditions in one "when" guard
<pitastrudl>
for example "Kralj when o2!=Kralj && Kralj!=5 -> true"
<struk|desk>
of course, when expects a boolean expression, so you can compose as you wish
<pitastrudl>
oh, so the AND can be only used with bools?
<pitastrudl>
okay
<pitastrudl>
thank you :)
<vbmithr>
struk|desk: hi
<vbmithr>
struk|desk: yeah,
travula has quit [Ping timeout: 244 seconds]
<struk|desk>
argh, I may have to try it tomm then. pushing my east coast luck right now :)
<vbmithr>
np
<vbmithr>
:)
<companion_cube>
pitastrudl: careful with !=, it's generally <> that you want
<pitastrudl>
oh ok
<struk|desk>
pitastrudl: this would compile for instance: let f o2 = function kralj when o2!=kralj && kralj!=5 -> true | _ -> false
<pitastrudl>
i used != so far and it worked fine, didnt do much with <> yet
AlexRussia has quit [Ping timeout: 260 seconds]
<pitastrudl>
I tried reading about it but didnt really understand, one is for deeper equality and the other set for "shallow" equality
jackweirdy has joined #ocaml
<Leonidas>
pitastrudl: no, the one is structural inequality (<>) and (!=) is "physical inequality" which I suppose means referential inequality in other languages
<pitastrudl>
and im trying to write a function that will tell me if o1 has greater power than o2 figurativly speaking
<pitastrudl>
but yeah, that's what im trying to do and im not sure why it's not working
<pitastrudl>
Im not sure how i would split that condition in two seperate matches
<Leonidas>
pitastrudl: then in any case, you could say | (Papez _, Kralj _) | (Papez _, Papez _) -> false or something like that
infinity0 has quit [Ping timeout: 264 seconds]
<pitastrudl>
oh, you can do that?
<Leonidas>
the great thing is that you already match o1 and o2, so you don't need guards at all, you can just use the pattern syntax
<pitastrudl>
but if i use guards i can make the code smaller?
<Leonidas>
yeah. in that case this could work. sometimes there are issues when you bind submatches to values then you can't share branches.
<Leonidas>
pitastrudl: not really, no.
<pitastrudl>
ohh
<Leonidas>
especially since Constructors are not really in the "value" domain
larhat has joined #ocaml
fold4 has quit [Ping timeout: 246 seconds]
<Leonidas>
there is no value 'Kmet' that you could pass around, so you also can't compare Kmet to Vitez for example.
<Leonidas>
sorry, that sounds a bit confusing and coming from OOP languages it seems very foreign
infinity0 has joined #ocaml
SIGILL has joined #ocaml
<pitastrudl>
yep
<pitastrudl>
i mean i do grasp some concepts of ocaml, but it's still hard, and im not that deep into programming yet, first year CS atm
<Leonidas>
using OCaml @ university?
ia0 has quit [Quit: reboot]
<pitastrudl>
yes
<Leonidas>
I can attest it does get easier with more practice, as with most things :)
<pitastrudl>
yeah i did quite some practice already
<Leonidas>
So did I. Ended up writing both my bachelor and masters thesis with ocaml
<pitastrudl>
nice
sz0 has quit [Quit: Connection closed for inactivity]
ia0 has joined #ocaml
<pitastrudl>
at the start i didnt have a clue why stuff didnt work and how certain stuff works
<pitastrudl>
now im just less clueless, but the code works somehow :D
fluter has quit [Ping timeout: 258 seconds]
<Leonidas>
yeah, sometimes it takes time to understand why things work and why they don't.
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
fluter has joined #ocaml
fold4 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackweirdy has joined #ocaml
infinity0 has joined #ocaml
A1977494 has joined #ocaml
fold4 has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
infinity0 has quit [Ping timeout: 276 seconds]
infinity0 has joined #ocaml
fold4 has joined #ocaml
struk|desk is now known as struk|desk|away
struk|desk|away is now known as struk|desk
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
infinity0 has quit [Remote host closed the connection]
kdas_ has joined #ocaml
travula has joined #ocaml
infinity0 has joined #ocaml
sz0 has joined #ocaml
kdas_ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
StatelessCat has quit [Quit: WeeChat 1.5]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 276 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
kdas_ has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
kdas_ has quit [Read error: Connection reset by peer]
silver has joined #ocaml
tane has joined #ocaml
beginner has joined #ocaml
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fedjo has quit [Read error: Connection reset by peer]
fedjo has joined #ocaml
StatelessCat has joined #ocaml
jackweirdy has joined #ocaml
jonasen has joined #ocaml
kdas_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
dario2 has joined #ocaml
kdas_ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
StatelessCat has quit [Quit: WeeChat 1.5]
StatelessCat has joined #ocaml
StatelessCat has quit [Client Quit]
FreeBirdLjj has joined #ocaml
StatelessCat has joined #ocaml
StatelessCat has joined #ocaml
StatelessCat has quit [Changing host]
Kakadu has joined #ocaml
sdothum has joined #ocaml
A19774941 has quit [Ping timeout: 276 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonasen has joined #ocaml
kushal has quit [Quit: Leaving]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rossberg_ has quit [Ping timeout: 264 seconds]
jonasen has joined #ocaml
regnat has joined #ocaml
rossberg_ has joined #ocaml
kushal has joined #ocaml
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
jackweirdy has joined #ocaml
dhil has joined #ocaml
nivek has joined #ocaml
agarwal1975 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<beginner>
is someone here using the ocaml bindings for llvm
Algebr` has joined #ocaml
<Drup>
beginner: what's your question ?
<beginner>
the opt tool from llvm allows to set the optimization pass nvtpx sched4reg and other nvtpx specific optimizations. I was wondering if it would be possible to set them from the OCaml bindings as well
<Drup>
you can call passes manually in the ocaml bindings
Algebr` has quit [Ping timeout: 250 seconds]
<beginner>
Drup: do you know which api call to use_
<hcarty>
I need to add benchmarks and proper tests, do a writeup and then it'll be ready to release
<hcarty>
There's an outer layer that maps the precise msgpack representation type to a more usable user-focused type
<seliopou>
cool! I see a few opportunities for performance improvement.
<seliopou>
YMMV, benchmark, IANAL, etc etc, but in general minimizing choices is a good heuristic for making efficient parsers
<seliopou>
looks like you could consume the tag immediately for all these types and then "dispatch" to the appropriate parser for the type the tag represents
<seliopou>
that'll reduce backtracking and also ensure that you don't accumulate a huge failure continuation on a successful parse
<seliopou>
when are you looking to release? angstrom's getting pretty mature so I was thinking of releasing sometime this week or next
kushal has quit [Read error: Connection reset by peer]
<companion_cube>
if there is a `try` and `<|>` it should be doable to minimize backtrack
<seliopou>
`<|>` is backtracking by default
<seliopou>
so as of now there is no way to do non-backtracking choice
<seliopou>
the closest thing is the `commit` combinator, which will commit to the given parse, allowing the caller to free up memory in the input buffer
<seliopou>
unfortunately it does not free failure continuations at this time
<companion_cube>
hmmm
<seliopou>
for network/serialization stuff, this should not be a problem
<companion_cube>
I experimented a bit with backtracking by default (in oasis-parser)
<companion_cube>
but then I found it easier and simpler to have nonbacktracking <|>, and backtracking `try`
<seliopou>
it may be a bit more of a burden for full-blown languages
<seliopou>
companion_cube: for the implementation or for the user?
<companion_cube>
the implementation was along the parser
nivek has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nivek has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
<AllanDaemon>
how can I declare a function with explicit Unit type? this gives syntax error: `let f (a:int) : () = () ;;`, but this don't: `let f (a:int) : int = a+10;;`
<AllanDaemon>
*explicit return type Unit
<Algebr`>
let foo (a:int): unit = ()
<Algebr`>
simple way to think it: type unit = ()
dwillems has joined #ocaml
<bruce_r>
struck: you're right, I don't think I need to do it as root.
<bruce_r>
Allan: () is a value of the type ()
<bruce_r>
no
<bruce_r>
() is a value of the type 'unit'
<bruce_r>
() is not a type, it's a value, like 3 or 4
<bruce_r>
it's like if you type let f (a:int) : 4 = a + 10
dhil has quit [Ping timeout: 240 seconds]
<AllanDaemon>
thanks
tizoc has quit [Changing host]
tizoc has joined #ocaml
<hcarty>
seliopou: Thanks for taking a look and for the suggestions! I'll make those changes before release.
<hcarty>
seliopou: I'm hoping to be able to make a release in the next few weeks - depends on work time availability mainly
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<seliopou>
hcarty: glad to help!
<seliopou>
I'll keep you updated about my plans for release. I'm on an optimization binge right now so i figure once that dries up I'll be ready.
dwillems has quit [Ping timeout: 260 seconds]
nivek has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gasche>
(I would try to "opam install why3" then "opam remove why3" again)
<gasche>
there is a chance that the "remove" instructions are faulty in the package
<gasche>
oh wait
<gasche>
did you also remove why3-base?
<rgrinberg>
seliopou: I like how it's cohttp agnostic, i'm playing around with some curl bindings now and would like to see how well that would work with your lib
<gpietro>
ahhh
<gpietro>
gasche, why3-base...
<gpietro>
wait let me try
<gpietro>
mm nah it's noth there it says
<seliopou>
rgrinberg: yeah a design principle is like to adhere to is to keep the data repr as separate from the systems stuff as is reasonably possible
<gpietro>
ok gasche i try to install it again and remove it
<seliopou>
gasche: i duno about crowdfunding the opam docs, but perhaps there is a financial institution that could cover it :P
<gpietro>
gasche, is it possible that even in 4.02.1 why3 has a problem if iremove it the binary is still there the only way seems to remove it by hand
<gpietro>
?
<gasche>
yes, sounds possible
<gasche>
(I mean people usually test the installation instructions well, not so well removal)
<gasche>
you should report your issue to why3 maintainers
<gasche>
hm wait
silver has quit [Quit: rakede]
<gasche>
I just looked at the package, there seems to be no "remove" action
swistak35 has joined #ocaml
<hcarty>
gasche: Maybe funding for such a project should go through something like OCaml Labs? If it's not going to be handled/implemented by the core OCaml team
<gasche>
I think that adding remove: ["make uninstall"] to the opam description should be enough
<gasche>
hcarty: the OCaml maintainers are responsible for the compiler distribution, not opam
<gasche>
opam is maintained by Louis Gesbert, an OcamlPro employee
<gasche>
(well maintained and actively developed)
<gasche>
(which means that OCamlPro has been funding OPAM's development for years with no monetary reward)
<gasche>
I would of course be happy if Ocaml Labs decided to fund opam documentation out of the blue, but I don't feel legitimate in requesting it from them
<gasche>
on the other hand, I would be glad to pay €50/€100 out of my pocket to make this happen, and I was wondering whether others would
<gpietro>
mmm i see
sepp2k has quit [Quit: Leaving.]
nivek has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup>
well, it would certainly be good to have someone like steve labnik for OCaml
<Algebr`>
who is that
<hcarty>
Algebr`: A member of the Rust community (and team maybe?)
<Drup>
AFAIU, he's basically payed by mozilla to work on documentations and community-stuff in rust
<Algebr`>
dope
<gasche>
but who would apply for such a position?
<Drup>
gasche: if there is no position, it's certain that nobody is going to apply
<hcarty>
gasche: I suspect someone would if there were a paycheck attached
<gasche>
it seems hard to me to motivate someone to do that full-time; on the other hand, a time-limited effort could work
<gasche>
(as in: three months on OPAM documentation)
<gasche>
well Drup it's hard to convince someone to open a position when nobody knows whether there are candidates
<gasche>
I mean can you name someone that would be interested in such a position?
<gpietro>
gasche, for this project i am trying to compile i need why3-base 0.86 so i donwgraded but then it gives me problem with mehir: do you know how i can fix this "hygiene problems"? http://pastebin.com/icLYCP5r
<gasche>
I, for example, am happy doing ocaml-community stuff in small doses, but I would not take this as a full-time job
<hcarty>
gasche: That's part of the challenge of growing a programming language community, and part of why a position like that can be so effective
<gasche>
gpietro: I know this bug, it has been fixed in recent menhir versions
<gasche>
again, you should contact why3 maintainers to ask if the menhir dependency could be relaxed to use the fixed version
<gasche>
(do mention the missing "remove" as well)
<gasche>
hcarty: sure, I'm just saying it's not necessarily easy to find someone interested
<gasche>
(because we all have other valuable/important stuff to do as well)
<gasche>
(afk now)
<Drup>
of course I can't name you anyone out of the blue, there are however several people who took a lot of their time to write stuff about OCaml, like technical documentations and books.
<gasche>
hm
<gasche>
maybe John Whitington
<gasche>
I don't see Anil or Yaron doing that
<Drup>
yes, that's one of the people I had in mind
<hcarty>
gasche: Anil and Yaron have jobs already
<hcarty>
This doesn't need to be someone who has 10+ years of experience with the langauge and community
<seliopou>
gasche if i didn't have so many libraries to write i'd do it :/
gpietro has quit [Ping timeout: 250 seconds]
agarwal1975 has quit [Ping timeout: 260 seconds]
<Drup>
hcarty: on the contrary, I would tend to think it's better if it's not done by a complete expert
<Algebr`>
I'm unemployed at the moment, could do it part time.
<Algebr`>
maybe
<seliopou>
really, people just need to blog more
<seliopou>
i have about 5 ocaml-related blog posts that have been on the back burner for months
<Drup>
seliopou: that's a completely different kind of job
<seliopou>
Drup: it's very much a requirement of the job
<seliopou>
steve's job is not just to engage with the community, it's to get the community's message out to a broader audience
<seliopou>
Hence talks at places such as the NY Linux User's Group.
<seliopou>
I was there for his talk, and have since started to help organize NYLUG, which enabled me to get Amir up on a stage in front of a bunch of linux folks to talk about Mirage and containers.
<Algebr`>
that's a good group, ny linux
<Algebr`>
great talks hosted
<seliopou>
the holiday party's not bad either
<Algebr`>
indeed
<seliopou>
:P
<seliopou>
the point is, there's doing stuff and talking about stuff. both are necessary.
sh0t has joined #ocaml
<sh0t>
sorry gasche i had some connectivity problem