<struktured>
the association on apply operator is not the same as named function application
<struktured>
(it the forces the entire thing on the left of @@ to be the function and the entire thing on the right to be the argument to it in this case)
sdothum- has quit [Quit: ZNC - 1.6.0 - http://znc.in]
contempt has quit [Ping timeout: 256 seconds]
badkins has quit []
olibjerd_ has joined #ocaml
contempt has joined #ocaml
palomer has quit [Quit: palomer]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yaewa has joined #ocaml
moei has quit [Ping timeout: 240 seconds]
mal``` has quit [Ping timeout: 248 seconds]
mal`` has joined #ocaml
MercurialAlchemi has joined #ocaml
nullcat has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slash^ has joined #ocaml
<flux>
companion_square, why is CCList.find_map called CCList.find?-( or is there some function for turning ('a -> bool) into ('a -> 'a option)?
palomer has joined #ocaml
<ilia>
I have a question for compound types pattern matching. Suppose there is a type type_1 and type_2 = {t:type_1;i:int;} and type_3 = {t:type_1;d:float;}. how to implement a function which returns type_1 value for both values of both type_2 and type_3?
<adrien>
cannot
<adrien>
for your example however, 'a type_n = { t : type_1; v : 'a }; would work
<ilia>
toplevel thinks that let type_1_v = function |{type_1;} -> type_1 works only for type_2 and not type_3
<ilia>
thanks, I'll try it
matason has quit []
ygrek has joined #ocaml
Gama11 has joined #ocaml
ontologiae has joined #ocaml
enitiz_ has quit [Ping timeout: 272 seconds]
hilquias has joined #ocaml
Cyanure has joined #ocaml
matason has joined #ocaml
Simn has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
<nullcat>
if I use Lwt_unix, will my code still be able to compiled to run on mirage?
<nullcat>
seems i can
ontologiae has quit [Ping timeout: 256 seconds]
oscar_toro has quit [Ping timeout: 264 seconds]
cdidd has quit [Ping timeout: 256 seconds]
freling has joined #ocaml
manizzle has joined #ocaml
cdidd has joined #ocaml
kushal has joined #ocaml
<reynir>
struktured: let me know if you have any luck with opam on solaris! :)
olibjerd_ has quit [Ping timeout: 265 seconds]
TheLemonMan has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
nojb has joined #ocaml
oscar_toro has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slash^ has quit [Read error: Connection reset by peer]
<flux>
reynir, apparently not quite perfect then
slash^ has joined #ocaml
AltGr has left #ocaml [#ocaml]
thomasga has joined #ocaml
Kakadu has joined #ocaml
psy_ has joined #ocaml
axiles has joined #ocaml
jonludlam has joined #ocaml
rand000 has quit [Ping timeout: 245 seconds]
oscar_toro has quit [Ping timeout: 272 seconds]
oscar_toro has joined #ocaml
yomimono has joined #ocaml
Intensity has joined #ocaml
Anarchos has joined #ocaml
mort___1 has joined #ocaml
psy_ has quit [Read error: No route to host]
mort___ has quit [Ping timeout: 265 seconds]
oscar_toro has quit [Ping timeout: 258 seconds]
mk270_ is now known as mk270
mort___ has joined #ocaml
mort___1 has quit [Read error: Connection reset by peer]
JuggleTux has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
avsm has joined #ocaml
milosn has quit [Quit: leaving]
freling has quit [Quit: Leaving.]
olibjerd_ has joined #ocaml
sdothum has joined #ocaml
_andre has joined #ocaml
thomasga has quit [Quit: Leaving.]
logzet has joined #ocaml
mort___ has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 255 seconds]
mort___ has joined #ocaml
thomasga has joined #ocaml
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
clog has quit [Ping timeout: 265 seconds]
mort___ has left #ocaml [#ocaml]
Haudegen has joined #ocaml
olibjerd_ has quit [Ping timeout: 265 seconds]
thomasga has quit [Quit: Leaving.]
olibjerd_ has joined #ocaml
osa1 has joined #ocaml
b0mbastus has quit [Ping timeout: 256 seconds]
oscar_toro has joined #ocaml
Hannibal_Smith has joined #ocaml
hay207 has joined #ocaml
larhat1 has joined #ocaml
b0mbastus has joined #ocaml
avsm has quit [Quit: Leaving.]
larhat1 has quit [Client Quit]
axiles has quit [Ping timeout: 244 seconds]
jabesed has joined #ocaml
ingsoc has joined #ocaml
hay207 has quit [Quit: Leaving]
avsm has joined #ocaml
JuggleTux has quit [Ping timeout: 258 seconds]
yetone has joined #ocaml
yetone has quit [Remote host closed the connection]
axiles has joined #ocaml
<xificurC>
I guess ocaml isn't much used on windows right. The support seems to be there but not quite enough - ocaml.org links to 4 versions and opam doesn't run under windows
avsm has quit [Quit: Leaving.]
<adrien_znc>
what are you after?
<xificurC>
develop ocaml on windows with ease?
<adrien_znc>
use it from cygwin's shell
<pippijn>
I thought the very reason for opam's existence was to support windows
<adrien_znc>
?
<xificurC>
cygwin-free native code that can use the packages that opam has
<adrien_znc>
you got me by surprise there
<adrien_znc>
ocaml from cygwin is typically not linked to cygwin
b0mbastus has quit [Ping timeout: 265 seconds]
osa1 has quit [Ping timeout: 256 seconds]
<xificurC>
adrien_znc: it's ok to work under cygwin if the final compiled file doesn't depend on it
<Drup>
pippijn: why would you think that ? Isn't a package manager useful enough ?
<pippijn>
Drup: there are so many package managers
olibjerd_ has quit [Quit: Ex-Chat]
<pippijn>
when opam started happening, I discussed this with people
<pippijn>
and their argument was "windows doesn't have one"
<xificurC>
adrien_znc: are you saying you can buid ocaml and opam under cygwin and create win32/64 builds that don't rely on/link cygwin?
<flux>
well, as opam doesn't work on Windows, it seems that it has then failed completely :-)
<Drup>
that would be weird, because it was wrong
<pippijn>
why does every language need their own package manager?
<flux>
but opam seems to be very useful on other platforms.
<adrien_znc>
xificurC: I didn't mention opam
<pippijn>
notably one that doesn't integrate with any other package manager
<Drup>
there was WODI at the time
<pippijn>
I still don't know of a good way to build debian packages from opam packages
<flux>
what kind of package manager would really do what opam does?
<pippijn>
flux: what does it do?
<dmbaturin>
xificurC: Yes, the compiler needs cygwin to work, but executables it produces don't. One of the reasons is that it uses the assembler from cygwin.
<flux>
opam switch, opam pin?
<MercurialAlchemi>
opam lets you install ocaml stuff non-system-wide
<pippijn>
flux: nix?
<MercurialAlchemi>
and can sandbox your installations
<flux>
nix might be an option but I haven't used it
<pippijn>
MercurialAlchemi: nix?
<dmbaturin>
Technically it can be made to use the mingw assembler I guess.
<flux>
so nix works on Windows?
<pippijn>
flux: does opam?
<adrien_znc>
there's no such thing as a "mingw" or "cygwin" assembler
<adrien_znc>
it's binutils
<Drup>
pippijn: was nix even usable when opam started ? (I'm not convinced it is currently ...)
<flux>
I don't know, but why nix instead of opam? it's not like almost anyone uses nix either.
<pippijn>
Drup: why start a new one when there is a conceptually good one that just needs some more work?
<pippijn>
flux: nobody used opam when opam didn't exist
<flux>
and there is certain elegance in having an ocaml package manager written in ocaml ;-)
<Drup>
that's another question, I don't have an answer, I don't know nix much
<pippijn>
see
<pippijn>
flux: that's exactly my point
<MercurialAlchemi>
pippijn: nix could work, I suppose, but I don't know if it can deal gracefully with system-wide dependencies which are not in Nix
<dmbaturin>
If I said "binutils shipped with cygwin" and "binutils shipped with mingw", it would be way longer. :)
<pippijn>
flux: NIH
<pippijn>
every language needs its own package manager written in it
<adrien_znc>
dmbaturin: but much more precise :)
<flux>
for example interacting with other ocaml packages becomes simpler
<MercurialAlchemi>
we are the knights who say NIH
<adrien_znc>
you might think I'm nitpicking but there are too many small misunderstandings around these topics and in the end you arrive at something that's quite far from the reality
<flux>
for example how opam uses cmdliner to producing an usage that's similar to other ocaml apps using cmdliner
<dmbaturin>
adrien_znc: Well, good point.
<Drup>
pippijn: I would tend to agree with you on that one, assuming nix does (or could be easily modify to) fulfill the ocaml constraints
<pippijn>
Drup: I don't know, it would require some research
<pippijn>
but surely nobody did their research and just masturbated to the idea of having an ocaml package manager in ocaml
<Drup>
err
<xificurC>
when I tried installing nix it took me 1 full day :) I might just be very stupid, but the installation was quite non-trivial
<Drup>
sorry pippijn, but you are very wrong on that one, and you clearly never looked at the discussions about opam if you think that
<dmbaturin>
Nix works best with its own distro (NixOS).
<pippijn>
Drup: I don't think that
idegen has joined #ocaml
jonludlam has quit [Quit: Leaving]
<pippijn>
Drup: I'm just being cynical with the intention to get people to tell me I'm wrong
<Drup>
you just claimed it.
freling has joined #ocaml
<Drup>
proof that this is certainly not the mindset of opam people: the constraint solver that most people use is not written in OCaml.
<pippijn>
yes, I actually like that a lot
<pippijn>
that's the best part of opam
<flux>
though I wouldn't mind if it was a hard dependency, or that the builtin solver would be better :)
<xificurC>
so ocaml can run under cygwin and produce executables that don't require it. But if one wants to use a package one has to take care of it manually as opam is not present
<pippijn>
flux: I would prefer the former
<pippijn>
just get rid of the broken internal one
<flux>
actually it should just incorporate the same solver (ie. bundle sources) and keep the ability to use an external one
<Drup>
the issue is that opam is used on plateforms where aspcud is not available
<pippijn>
not available?
<pippijn>
as in, it doesn't work?
<pippijn>
which platforms are those?
<Drup>
or not ported, or not packaged, whatever
<Drup>
some BSD
<adrien_znc>
xificurC: roughly that, yes
<Drup>
(probably windows too)
<flux>
I would imagine it would be simple regarding system dependencies..
<adrien_znc>
xificurC: but for most cases, it's easy to do
<adrien_znc>
I have to say I don't understand either how a constraint solver can have system-specific dependencies
<flux>
magic of C!
<Drup>
^
<adrien_znc>
seriously
jonludlam has joined #ocaml
<Drup>
the author mostly didn't make the effort of making it portable, and that's all
<xificurC>
I wish every pc ran at least something that is compatible with each other
<adrien_znc>
I do enough C on both Linux and Windows to believe that's still wrong
<Drup>
authors*
<adrien_znc>
Drup: ok, I just wanted to be sure I could freely blame the authors
<adrien_znc>
xificurC: you have the C standards for that
<adrien_znc>
it already provides quite a lot of stuff
matason_ has joined #ocaml
<Drup>
adrien_znc: you certainly can
<adrien_znc>
wooo \o/
<xificurC>
no standards please, people have to follow them to make that work. Just *be* compatible
<adrien_znc>
well
<Drup>
as much as aspcud is theoretically and technically very impressive, the packaging and engineering side is a bit sub-par.
<adrien_znc>
you at least need to get the same words :)
<adrien_znc>
Drup: are they at least _actually_ willing to incorporate patches and take care not to break these
<Drup>
(typical research software :D)
matason has quit [Ping timeout: 272 seconds]
<Drup>
adrien: integrate, yes. Not breaking, I'm not sure they are actively testing for it.
<xificurC>
windows/linux/bsd/osx , that's already 4 targets, mind you even those have incompatible siblings
<pippijn>
Drup: I like opam, it's great, and it can become a lot greater, and there are a lot of resources being put into making it better
<pippijn>
but every time someone reinvents a thing that was invented hundreds of times, I feel a little bad
<adrien_znc>
Drup: ok, I won't even think about spending time on that then
<Drup>
pippijn: yeah, I agree
<adrien_znc>
so... companion_square has made the whole channel bad hundreds of times already?
<flux>
let's talk about build systems next?
<pippijn>
flux: yeah
<pippijn>
that's the same thing
<Drup>
pippijn: there was an article about the "invented there" syndrom :D
<flux>
they should have never build ocambuild, instead enhanced gnu make
<pippijn>
I'm not sure about gnu make
<pippijn>
but omake, yes
<Drup>
ahah
<Drup>
aaaand we're gone.
<pippijn>
omake gets a lot of things right
<pippijn>
that no other build system gets right
<adrien_znc>
including the ability to bind GTK+
<pippijn>
but omake has issues, as well
<adrien_znc>
from its own language
<pippijn>
taking omake as a basis might be good
<pippijn>
I didn't spend a lot of time with jenga, but it might be good, too
<dmbaturin>
Is omake still alive and used by people?
<pippijn>
yes
<pippijn>
also, I think there shouldn't be a difference between build system and package manager
<adrien_znc>
I definitely disagree
<pippijn>
but that would require an ideal world
<mk270>
phew
<adrien_znc>
unless your definition of package manager stops at "ocamlfind"
<pippijn>
so it's not realistic in the open source world
<dmbaturin>
Only if by ideal world you mean a world with just one OS. :)
<pippijn>
dmbaturin: no
<pippijn>
a world in which every piece of software is actually being maintained
<pippijn>
if I had half a year of full time availability, I'd make a build system that works on linux, freebsd, netbsd, openbsd, mac os x, and windows, and a linux distribution based on it
<adrien_znc>
year?
<pippijn>
6 months
<adrien_znc>
a build system that works on all these already exist
<adrien_znc>
but it's not enough
<pippijn>
a good build system
<adrien_znc>
in 6 months?
osa1 has joined #ocaml
<flux>
pippijn, surely you're not saying you would make a new build system?
<pippijn>
yes
<pippijn>
flux: no
<flux>
you would pick one and port packages to it?
<pippijn>
yes
hay207 has joined #ocaml
<pippijn>
I would need about 2-4 weeks to properly evaluate jenga
<pippijn>
I think jenga can be used as a basis for what I would build
ingsoc has quit [Quit: Leaving.]
<pippijn>
if that is true, then I'd need the 5 remaining months to actually do it
<xificurC>
go open a kickstarter :)
<pippijn>
xificurC: I like my job
<pippijn>
maybe someday
<pippijn>
I don't see anybody even coming close to getting this right, so I have time
<xificurC>
a quite high opinion of yourself you have, me say
<pippijn>
no
JuggleTux has joined #ocaml
<pippijn>
people just don't really care about build systems
<pippijn>
everybody settles for good-enough or good-for-my-use-case
<pippijn>
because nobody really wants to deal with infrastructure
jabesed has quit [Ping timeout: 252 seconds]
matason_ has quit []
<pippijn>
xificurC: jenga *seems* to be getting a very important part (almost) right, but I didn't have enough time to really evaluate it, yet
<mk270>
pippijn: some of us DO care about build systems and would love to fix this
<mk270>
i am maybe one notch below the level of tech skill needed write one of these really well, but certainly up for trying
<pippijn>
Drup: interesting
<mk270>
it really alarms me that new features are being added to ocaml's syntax and compiler and so on, whilst the toolchain (broadly conceived) is in an unusable state
matason has joined #ocaml
<Drup>
pippijn: tell me when you read and digested everything
<pippijn>
Drup: I think the idea itself is not bad
<Drup>
that is rather worrying.
<pippijn>
whether opam is the right platform to build it on, I don't know
<pippijn>
src2opam is probably a bad idea
<pippijn>
shipping bytecode is probably a bad idea
<pippijn>
Drup: the base of the idea is good, the entire execution is ridiculous
<Drup>
except the main problem in build system was never the base idea
<pippijn>
I still have some jenga tabs open on my laptop at home
<pippijn>
I didn't entirely drop the idea
Algebr has joined #ocaml
BitPuffin|osx has joined #ocaml
hay207 has quit [Ping timeout: 256 seconds]
<apache2>
this might be a silly question, but if I have a type like (type 'a bar = 'a * int) and a (type foo = str and crowded = int32), can I write a "polymorphic" function that only operates on the int?
<apache2>
and pass it both "foo bar" and "crowded bar"s?
<flux>
so you have types str bar and int32 bar?
<apache2>
yes
<flux>
ah yes :)
<flux>
yes you can
<flux>
example of such a function: snd
<apache2>
and I want to write a function that only deals with the int
<apache2>
ah, perfect. /me looks up the source of snd
<flux>
well, I'll make it a bit easier and given you one possible implementation: let snd (_, a) = a
<ia0>
let on_snd : ('a -> 'b) -> 'a bar -> 'b bar = fun f (x, y) -> (x, f y)
<ia0>
some example of polymorphic function
<apache2>
thank you!
<apache2>
say I have three types of bar, int, int32 and str. is it possible to do the same, but only for int and int32? or should I make a second type for the latter?
<apache2>
right now I'm using [< `A | `B] in the function definition
<apache2>
but that requires matching to get rid of the `A and `B inside the function
<apache2>
(I'd like to return the snd int, but only if the fst value is either int or int32)
jeffmo has joined #ocaml
<flux>
well, any time you are limiting a function to two on a limited number of types >1, you probably need to use sum types or separate functions
<dkreuter>
considering it's drawing pixels in a tight loop
<flux>
well, the Graphivs module is reaaaaly slow
<flux>
at least that's what I imagine
<dkreuter>
okay
<adrien_znc>
it's not that slow
<flux>
Graphics module is perhaps suitable for learning and some debug visualizations
<dkreuter>
takes multiple seconds to iterate from 0 to 600
avsm has joined #ocaml
<adrien_znc>
the code itself looks quite slow
<adrien_znc>
and it draws only one point with each call
<flux>
Graphics can draw multiple points per call?
<adrien_znc>
I think so
<flux>
but rule of thumb: libraries that actually draw one pixel at a time to the screen are going to be slow :-)
<adrien_znc>
at least two :P
<dkreuter>
oh great, the gtkdemo segfaults
<dkreuter>
>the type system will catch these mistakes
<flux>
I believe that would be the missing GtkInit.init () ?
<adrien_znc>
val draw_poly_line : (int * int) array -> unit
<adrien_znc>
(** [draw_poly_line points] draws the line that joins the points given by the array argument.
<adrien_znc>
flux: yes
<adrien_znc>
it would be really good to have it added to ocaml.org
<adrien_znc>
(I'm at work, I don't have my emails nor my keys)
<flux>
dkreuter, well, the type system doesn't help when you call C :-). though I think lablgtk2 would be quite safe after that particular init call is made
<dkreuter>
what's the difference between a val mutable and a reference?
larhat has joined #ocaml
<dkreuter>
one gets assigned to with <-
<dkreuter>
the other one with :=
larhat has quit [Client Quit]
larhat has joined #ocaml
<ggole>
A reference is basically a record with a mutable field
jeffmo has quit [Quit: jeffmo]
<ggole>
:= is simply a function which does that: <- is the underlying operation
<dkreuter>
ggole, thanks
<ggole>
dkreuter: you can mutate references with <-, if you like: the field is called 'contents'
<ggole>
let test r x = r.contents <- x
Haudegen has quit [Ping timeout: 255 seconds]
axiles has quit [Quit: Quitte]
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
A1977494 has joined #ocaml
wraithm has joined #ocaml
Denommus has joined #ocaml
A1977494 has left #ocaml [#ocaml]
badkins has quit []
<dkreuter>
is there a good comparison betwee rust and ocaml somewhere?
<adrien_znc>
probably not
<adrien_znc>
too new
<adrien_znc>
and rust's exact goals have changed over time
jabesed has joined #ocaml
<Denommus>
dkreuter: I think Rust is more comparable to C++ than to OCaml
<Drup>
adrien_znc is quite right, but you can still give a useful distinction: GC and not GC :)
<Denommus>
there are no functors (though you may emulate them with traits with associated types)
jeffmo has joined #ocaml
<Drup>
yeah, traits and associated types are quite equivalent to functors both in usage and expressivity
<dkreuter>
functor as in callable value?
<adrien_znc>
C++ with features actually backed by theory and with strong compile-time guarantees?
<Drup>
no, functors as in "function over modules"
nojb has joined #ocaml
<Denommus>
adrien_znc: also, no templates. Generics and macros instead
<dkreuter>
well what are modules?
<dkreuter>
mappings from string → value?
<Drup>
not really. :D
<ggole>
O_o
<Drup>
strings as variables, huhu, that's cute n_n
<Denommus>
dkreuter: hm, are you coming from Rust?
<dkreuter>
Denommus, I'm coming from c++ and python
<dkreuter>
And want to do something related to code analysis (graph stuff)
<dkreuter>
And found that people use OCaml for this.
<Drup>
indeed
<dkreuter>
So I thought I should check it out.
<dkreuter>
And the other language I am considering is Rust.
<Drup>
ocaml is very good for code analysis
<ggole>
Modules are very roughly "units of code"
<dkreuter>
><Drup> no, functors as in "function over modules"
<dkreuter>
so basically templates
<Drup>
very roughly, yes
<Denommus>
dkreuter: hm. Modules are structures where you put associated types and values
<Drup>
but with proper compile time garanty and with a sane execution model
<ggole>
You can use them for organising, hiding, abstracting etc values
<Denommus>
dkreuter: and can be used as compilation units
<dkreuter>
o_O okay
<ggole>
Or parameterise them
Haudegen has joined #ocaml
b0mbastus has joined #ocaml
<Drup>
dkreuter: for the domain you are interested in OCaml is better than Rust
<dkreuter>
It seems to me that pattern matching is the most helpful aspect for me in this area. Something that Rust and OCaml share apparently.
<Drup>
for two reasons: 1) libraries exists already for that in OCaml, not so much in Rust 2) Rust main selling point is control over memory/allocation and you don't care about that
<Drup>
(on the contrary, fighting with the ownership system when doing graph stuff is going to be a pain)
<Denommus>
dkreuter: you probably don't need Rust's static guarantees over your resource's lifetimes
<Denommus>
dkreuter: but that would be more annoying than helpful in your domain
<dkreuter>
The nodes would just be owned by the graph
<dkreuter>
And everyone else borrows
<dkreuter>
Seems simple enough
<dkreuter>
How else could OCaml help me?
<Drup>
dkreuter: there is a gc and you don't have to care about it ?
<Drup>
at all.
<Denommus>
dkreuter: I know nearly nothing about this domain, but is lexing and parsing useful for that?
<dkreuter>
I think not so much. I already get the data preparsed.
pleiosaur has joined #ocaml
<Drup>
dkreuter: what kind of static analysis are you interested in ?
<dkreuter>
Drup, the stuff compilers do too
<ggole>
dkreuter: Hmm, how do you delete from such lifetime managed graphs?
<dkreuter>
Constant folding
<dkreuter>
Dead code elimination
<Drup>
dkreuter: for which language ?
<dkreuter>
Drup, a custom assembly level intermediate language.
<dkreuter>
LLVM IR level
A19774941 has joined #ocaml
<dkreuter>
ggole, I don't know yet. I'm a beginner in rust too.
<Denommus>
dkreuter: is it really a graph?
<dkreuter>
Denommus, it's an SSA graph.
<Denommus>
dkreuter: I mean, does it have cycles?
Hannibal_Smith has joined #ocaml
<dkreuter>
Denommus, the nodes creating the cycles are specially marked. I could break the graph at these points
<ggole>
SSA IRs almost always have cycles
<ggole>
(At two levels.)
<dkreuter>
ggole, what's the second (other than phi nodes)
<dkreuter>
(you mean for flow?)
<ggole>
The CFG
<ggole>
Right
<Denommus>
dkreuter: well, then I'd use OCaml. Dealing with cycles in Rust is annoying (as much as I like Rust)
<adrien_znc>
I want OCaml for high-level code and Rust for low-level libraries :)
<Drup>
dkreuter: the static analysis community in OCaml is rather large, so you should find a lot of like-minded folks to look at your thing
paddymahoney has joined #ocaml
larhat has quit [Quit: Leaving.]
<Drup>
the Rust community is rather oriented in different directions
larhat has joined #ocaml
<Drup>
(low level stuff, a bit of web stuff, graphic engines, games)
<dkreuter>
Drup, I only know BAP at the moment.
<dkreuter>
What other projects are there?
<Denommus>
Drup: not even the compiler does that much analysis (besides the type checking, of course). Most of optimizations they leave to LLVM to handle
<ggole>
FramaC
larhat has quit [Client Quit]
<ggole>
Various compilers, if that counts
<Drup>
FramaC, cil, Aspic
larhat has joined #ocaml
<Drup>
I guess pfff count as well
ncthom91 has joined #ocaml
<Drup>
that's the big released one, there is also the little ones done by french researchers :D
<Drup>
which is rather a big thing, even if not foss :(
nojb- has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
freling has joined #ocaml
<adrien_znc>
which is really surprising considering their website
larhat has quit [Client Quit]
larhat has joined #ocaml
wraithm has quit [Quit: leaving]
hilquias` has joined #ocaml
hilquias has quit [Ping timeout: 272 seconds]
<octachron>
a non-foss software from ens? quite disappointing
nojb has quit [Quit: nojb]
b0mbastus has quit [Read error: Connection reset by peer]
palomer has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nojb- has quit [Ping timeout: 265 seconds]
badkins has joined #ocaml
freling has left #ocaml [#ocaml]
ncthom91 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]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
larhat has quit [Client Quit]
dsheets has quit [Ping timeout: 246 seconds]
larhat has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
jwatzman|work has joined #ocaml
larhat has joined #ocaml
thomasga has quit [Ping timeout: 256 seconds]
<Drup>
octachron: exactly like compcert, really
larhat has quit [Client Quit]
larhat has joined #ocaml
jabesed has quit [Ping timeout: 255 seconds]
larhat has quit [Client Quit]
palomer has quit [Quit: palomer]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
palomer has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
jabesed has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
nojb has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
nullcat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
palomer has quit [Quit: palomer]
larhat has quit [Client Quit]
larhat has joined #ocaml
octachron has quit [Quit: Leaving]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
MrScout has joined #ocaml
yomimono has quit [Ping timeout: 244 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
MrScout_ has joined #ocaml
MrScout has quit [Remote host closed the connection]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
avsm has quit [Quit: Leaving.]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 272 seconds]
larhat has joined #ocaml
larhat has quit [Client Quit]
nojb has quit [Quit: nojb]
larhat has joined #ocaml
psy_ has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
tane has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
seako has joined #ocaml
larhat has joined #ocaml
rand000 has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
Haudegen has joined #ocaml
nullcat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
jonludlam has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<flux>
hmm, so I guess it appears that 'fibers' in ocaml-multicore are a form of co-operative multitasking?
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
ygrek has joined #ocaml
larhat has quit [Client Quit]
JuggleTux has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat has quit [Client Quit]
larhat has joined #ocaml
dubosec has quit [Ping timeout: 272 seconds]
Kakadu has quit [Quit: Page closed]
larhat has quit [Client Quit]
larhat has joined #ocaml
dubosec has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
hilquias` has quit [Remote host closed the connection]
larhat has joined #ocaml
jonludlam has quit [Ping timeout: 272 seconds]
pii4 has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
clog has joined #ocaml
larhat has joined #ocaml
uris77 has quit [Ping timeout: 245 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
avsm has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<Drup>
yes
alkoma has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
avsm has quit [Quit: Leaving.]
alkoma has quit [Remote host closed the connection]
alkoma has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
nullcat has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
pyon has quit [Quit: I have irrefutable proof that D < 0. It follows trivially from 2D > 3D, which is obviously true.]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
pyon has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
JuggleTux has joined #ocaml
wraithm has joined #ocaml
wraithm has quit [Client Quit]
larhat has quit [Client Quit]
larhat has joined #ocaml
paddymahoney has quit [Ping timeout: 272 seconds]
larhat has quit [Client Quit]
Gama11 has quit [Ping timeout: 265 seconds]
nojb has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
robink has quit [Ping timeout: 255 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat has quit [Client Quit]
larhat has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larhat has quit [Client Quit]
robink_ has joined #ocaml
7GHAAHE33 has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
Haudegen has quit [Ping timeout: 245 seconds]
Gama11 has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
jonludlam has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<7GHAAHE33>
is core_kernel.std os-independent now?
larhat has quit [Client Quit]
7GHAAHE33 has quit [Quit: gone...]
larhat has joined #ocaml
nullcat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
jabesed has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<dubosec>
silly question, but I am learning ocaml and maybe hoping to put a resume together in a couple of years as a functional programmer. Unfortunately, I do not have any formal or academic background in computer science or programming, but I might take an online course through the local community college soon and get an associates in supply chain management. In the future, should I list an unrelated degree or would it be better to state my
<dubosec>
learning resources (such as books read)?
ygrek has quit [Remote host closed the connection]
larhat has quit [Client Quit]
<dubosec>
thanks! Real World OCaml has been very helpful. I like that it incorporates utop and opam in the text
slash^ has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
ygrek has joined #ocaml
ggole has quit []
larhat has quit [Client Quit]
larhat has joined #ocaml
<Algebr>
dubosec: to be honest the community college thing sounds quite useless and a waste, unless you're taking like intro to computer science or something like that.
Sim_n has quit [Ping timeout: 252 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
jabesed has joined #ocaml
larhat has quit [Client Quit]
<dubosec>
yeah. That's mostly based off of liking the logistics aspects of some jobs I've had, and I don't have the time to take non-online classes (I'm a full-time baker), but in case the programming doesn't work out I feel like I should have a backup or something. But I am not 100% sold on the idea of going back to college.
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
nullcat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
Gama11 has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
Gama11 has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
kushal has quit [Quit: Leaving]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
seako has quit [Quit: Connection closed for inactivity]
`\_o-` has joined #ocaml
larhat has joined #ocaml
tanguy` has quit [Ping timeout: 272 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
robink_ is now known as robink
larhat has quit [Client Quit]
larhat has joined #ocaml
matason has quit []
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
ncthom91 has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<apache2>
flux: alright, thanks
<apache2>
I forgot about sumtypes
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
matason has joined #ocaml
hay207 has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<apache2>
er, not sumtypes. I had something different in mind
<struk|work>
does anyone know of a ocaml module that allows you run a shell command and get stdout back as a string return value? I found one solution but want something with less boiler plate: http://rosettacode.org/wiki/Execute_a_system_command#OCaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<dmbaturin>
apache2: ocaml.org maintainers are responsive to pull requests, I've had a few merged.
<apache2>
dmbaturin: In this case I'm looking for the solution myself; I'm not in a position to help them :)
<dmbaturin>
struk|work: I believe I've seen it in some OS library under development, but not anywhere in libs that are in opam. I'm making it up when I need it. :)
Anarchos has joined #ocaml
larhat has quit [Client Quit]
<dmbaturin>
apache2: Ah. Well, you can create an issue too, but I think issues are lowed priority than pull requests. :)
<struk|work>
dmbaturin: got it. I could have sworn I saw a lib that makes interacting w/shell less annoying but I can't find it again.
<dmbaturin>
I'm not sure what direct way the FIXME author meant.
larhat has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apache2>
no, me neither
<dmbaturin>
struk|work: I've been thinking about making one yesterday. Guess I should search for that one again, if nothing found, maybe we should make one.
larhat has quit [Client Quit]
<apache2>
nullcat: that is a bit excessive
larhat has joined #ocaml
<apache2>
oh wait I'm looking at Batteries documentation
<Algebr>
apache2: isn't it just Unix.open_process?
<Algebr>
and then collect the result
hay207 has quit [Ping timeout: 256 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
<apache2>
Algebr:
<dmbaturin>
Algebr: Well, it's quite far from let out = output_of_process "rm -rf /*". :)
<NSA_Agent>
Because this does not print, for examlpe "Choose player: " before reading user value.
Hannibal_Smith has quit [Quit: Leaving]
larhat has joined #ocaml
<apache2>
what happens is that the output is buffered by gnu libc (which is what whoever made the unix ocaml build seemed to love, so it was used for everything behind the scenes, resulting in a lot of weird and stupid behavior)
larhat has quit [Client Quit]
<apache2>
usually you can force flushing using %! in printf
badkins has joined #ocaml
larhat has joined #ocaml
<apache2>
print_endline and print_newline from Pervasives automatically flush
<apache2>
there's also Pervasives.flush and .flush_all (if ending hte printf with %! doesn't work)
<dmbaturin>
apache2: No, it's just another character allowed in identifiers.
<apache2>
dmbaturin: alright :)
larhat has quit [Client Quit]
larhat has joined #ocaml
<dmbaturin>
module Foo : sig val foo' : unit -> unit end = struct let foo' () = print_endline "foo" end ;; :)
<apache2>
what's the common way to denote "private" functions in a module? (to make it clear to casual readers that this isn't exported in the interface) ?
larhat has quit [Client Quit]
<apache2>
is there an ocaml custom for something like that, or should I just go with a _prefix ?
larhat has joined #ocaml
tane has quit [Quit: Verlassend]
<dmbaturin>
Hhm, I don't think there's a widely used convention.
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
mengu has joined #ocaml
mengu has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
<NSA_Agent>
apache2: Thanks a lot, print_endline worked very well!
Submarine has quit [Quit: Leaving]
larhat has joined #ocaml
larhat has quit [Client Quit]
ncthom91 has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
<apache2>
cool @ both of you! :)
larhat has quit [Client Quit]
larhat has joined #ocaml
dav has quit [Ping timeout: 240 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
nojb has quit [Ping timeout: 264 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
hilquias has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
larhat has quit [Client Quit]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
larhat has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
larhat has quit [Client Quit]
larhat has joined #ocaml
<apache2>
I'm struggling to understand how to read this curried function definition:
<dkreuter>
I want to specify the signature of method1 once, and specify that A and B need to fulfill this.
<adrien>
also I think lwt has some C
<adrien>
we typically don't use objects much
larhat has joined #ocaml
BiDOrD has joined #ocaml
<dmbaturin>
That gentleman ported a whole big application from python to ocaml.
<adrien>
mostly because the ocaml type system without object is already very powerful
<adrien>
this/self is something that requires objects however
<adrien>
(roughly)
<adrien>
in you case, you can make a "class type" if I remember correctly
<adrien>
and then
<adrien>
class foo : <yourclasstype> = ...
<adrien>
I think that's the syntax
<dkreuter>
nice
<adrien>
a bit late and alcoholed here but that should be right
larhat has quit [Client Quit]
<dmbaturin>
The unusual part is that class names don't matter much. The object system, like the rest of the type system, is structural rather than nominal.
larhat has joined #ocaml
larhat has quit [Client Quit]
<apache2>
I think you can also have objects without classes