lokien_ has quit [Quit: Connection closed for inactivity]
jeffmo has quit [Ping timeout: 240 seconds]
hcarty has quit [Ping timeout: 276 seconds]
badon has joined #ocaml
pierpa has quit [Ping timeout: 250 seconds]
skeuomorf has joined #ocaml
Guest75614 has quit [Quit: Guest75614]
Soni has joined #ocaml
FreeBirdLjj has joined #ocaml
Stalkr_ has quit [Ping timeout: 276 seconds]
nullremains has quit [Ping timeout: 264 seconds]
virtualeyes has joined #ocaml
lostman_ has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mac10688 has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 240 seconds]
cody` has quit [Quit: Connection closed for inactivity]
virtualeyes has quit [Ping timeout: 245 seconds]
Soni is now known as cat5e
govg has quit [Ping timeout: 264 seconds]
govg has joined #ocaml
yegods has joined #ocaml
cat5e has quit [Quit: Leaving]
Soni has joined #ocaml
Soni is now known as cat5e
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
kushal has quit [Excess Flood]
<teknozulu_>
smondet: What's effective difference between killing my control master ssh session's process, and sending -O stop? I'm at a point in writing my module where I have to decide what to do with the subprocess after it is created, i.e. if I need to pass it around so I can kill it
<teknozulu_>
sorry, I meant -O exit
kushal has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
j_king has joined #ocaml
<j_king>
How can you match on the return of Sys.is_directory in 4.02.3? It's ?follow_symlinks:bool -> string -> [ 'No | 'Unknown | 'Yes ]
<j_king>
where the documentation online says, string -> bool
<teknozulu_>
j_king: fire up utop, Sys.is_directory;;
<teknozulu_>
(string -> bool is the original ocaml version, the more complex signature is Core)
<j_king>
ah; I figured but I couldn't find the relevant docs in core.
decaf has joined #ocaml
<j_king>
s/figured/suspected/
* j_king
found it.
decaf has quit [Quit: Leaving]
<mahem1>
Hmmm, I've gotten into the bad habit of doing <Esc><Esc><Esc>:w:w:w:w:w:w everytime I make an edit and it really wastes time and distracts myself.
<mahem1>
Is there anyway I can do something like :command w :!sudo shutdown -h now to try to break this habit?
sh0t has quit [Ping timeout: 240 seconds]
psy_ has quit [Ping timeout: 264 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
johnelse has quit [Ping timeout: 240 seconds]
johnelse has joined #ocaml
johnelse is now known as Guest65273
struk|desk2 is now known as struk|desk|away
ygrek has joined #ocaml
MercurialAlchemi has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
raphaelss has quit [Quit: Leaving]
govg has quit [Ping timeout: 245 seconds]
govg has joined #ocaml
troydm has quit [Ping timeout: 248 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
ril has joined #ocaml
JacobEdelman has quit [Quit: Connection closed for inactivity]
<exm>
Quick question. Num defines infix operators like + on its num type. First, how can I bring those into scope so I can use them as infix, without doing Num.(+) a b, and second, I presume that'll get rid of my normal infix int operators?
<exm>
Google shows me lots about how to create my own :P
<nv_>
let open Num in
<nv_>
and yeah it will
AltGr has left #ocaml [#ocaml]
<exm>
nv_: Thanks
darkf has joined #ocaml
djellemah_ is now known as djellemah
MercurialAlchemi has joined #ocaml
toolslive has joined #ocaml
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
Lis has joined #ocaml
toolslive has quit [Quit: Leaving]
sgnb has quit [Ping timeout: 240 seconds]
zpe_ has quit [Remote host closed the connection]
jeffmo has joined #ocaml
ril has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
yegods has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
larhat1 has quit [Quit: Leaving.]
pierpa has joined #ocaml
jwatzman|work has joined #ocaml
<l1x>
because of HN :)
silver has joined #ocaml
govg has joined #ocaml
lokien has joined #ocaml
cody` has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
prepor has quit [Quit: Leaving.]
zpe has joined #ocaml
andrei__ has joined #ocaml
<andrei__>
hi. does anybody know why ocaml hasn't ** function for Integers?
<def`>
any other language has that?
<rks`>
def`: every language where Decimals is a subtype of Integers
Guest65273 is now known as johnelse
<rks`>
(yes, the order is correct.)
<def`>
:D
<Drup>
andrei__: because the standard library is poor
<Drup>
Most extensions of the stdlib have a pow function for integers
prepor has joined #ocaml
<andrei__>
@Drup there are * for integers and *. for floats but ** for floats and no function for integers. i just try to understand decision.
FreeBirdLjj has quit [Remote host closed the connection]
<Drup>
I don't think it was a decision :)
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
<yawnt>
is there a timeline for the modular implicits merge in OCaml?
<yawnt>
i'm not really familiar with the situation, i know there's a fork from Ocamllabs, but that's it
<companion_cube>
the maintainers require a formal proof of correctness before the merge
<def`>
beh it's being worked on... hard to tell anything about the schedule
<yawnt>
nice :)
<yawnt>
exciting stuff
<Drup>
def`: how is it going ? :)
<Drup>
did you rewrote all of it already ? :D
<def`>
not yet :). but it is deeper than expected
<def`>
the expressivity is increased to make limitations less adhoc
<def`>
so it is tricky but looking good :)
<yawnt>
def`: whatya rewriting?
<Drup>
nice
<companion_cube>
this would truly change the language
<def`>
yawnt: implicits
<yawnt>
companion_cube: yeah, i imagine it would be quite groundbreaking for the stdlib
<yawnt>
no more +. :D
<yawnt>
def`: ah gotcha, didn't know you were the one working on it! :)
<companion_cube>
I'm not sure the stdlib would change
<companion_cube>
but it would certainly be a good time for switching to alternative stdlibs
<def`>
yes as usual
lokien has quit [Quit: Leaving]
<yawnt>
companion_cube: yep, that's what I meant
Simn has quit [Quit: Leaving]
<companion_cube>
I, for one, am eager to see what stdlibs will look like with implicits
<Drup>
It will look exactly the same as today
<Drup>
Mostly, I hope
lokien has joined #ocaml
<yawnt>
do people use JaneStreet's Core a lot?
<yawnt>
i'm switching from Scala to OCaml, and I see a lot of mentioning
<pierpa>
does a lightweight language interpreter implemented in ocaml exists? something that could be used as a data description and configuration language by non-technical users without scaring them away? something like Lua, but in ocaml?
<companion_cube>
Drup: alternative stdlibs? I don't think so
<companion_cube>
numeric code, comparisons, etc. would start relying on it
<yawnt>
trying to figure out what people use out there :P
<companion_cube>
pierpa: ocaml-lua ?
<pierpa>
hmmmm :) ty, will look
mstevens has joined #ocaml
<companion_cube>
yawnt: it's quite diverse (that's why there are still several alternative stdlibs), so some people use Core, some use batteries, some use containers, some use their own, some use just the stdlib
prepor has quit [Quit: Leaving.]
lokien_ has quit [Quit: Connection closed for inactivity]
<Drup>
(very alpha, not necessarily very well designed :p)
<yawnt>
companion_cube: thx!
<pierpa>
will see :)
* mstevens
comes to investigate ocaml after news.yc talked about it
<companion_cube>
o/
<mstevens>
apparently it's amazing and will wash your dog etc
<mstevens>
and I always like to checkout the irc channel on new things
<lokien>
hey, what would you recommend for writing ocaml code?
* lokien
is ocaml noob, normally uses vim
<Drup>
whatever+merlin
<yawnt>
emacs+merlin
<companion_cube>
vim + merlin then, if you use vim
<lokien>
no need for ocp indent?
<companion_cube>
mstevens: of course we'll tell you it's amazing :)
<Drup>
lokien: ocp-indent is cool too
<lokien>
Drup: I don't know how to set it up though, gonna find some tutorial
<mstevens>
companion_cube: Obviously everyone thinks their own thing is amazing, but I think you can get a good feel for the community
sillyotter has joined #ocaml
<bernardofpc>
mstevens: I've been very slow on using OCaml, and for some things it really surprised me
<bernardofpc>
and even if I think mostly on registers and imperative ways, sometimes when I back up and try to write a sketch I'll do it more in an OCaml way (functions, functors, etc)
Simn has quit [Quit: Leaving]
<bernardofpc>
and structural pattern matching + recursion is just plain goodness
<bernardofpc>
lokien: you should be fine with that
<bernardofpc>
(I used the emacs one, but no reason it cannot help)
<lokien>
bernardofpc: we'll find out in 10 mins or so
<mstevens>
I don't like python because it doesn't have enough types, I don't like java because it has crappy types and you can do a sort of functionalish style java but it's not natural
<mstevens>
okay, I failed at the first example in Real World Ocaml, this is not a good start.
<def`>
you failed?
<mstevens>
The book says to type "open Core.Std;;" in the shell but it just says "unbound module core"
<lokien>
install core then
<lokien>
I had this error too
<def`>
and #require "core";; to load the package
zapu has joined #ocaml
<def`>
(the setup suggested in the book automatically load the package)
<mstevens>
def`: I've just noticed the book has moderately hidden setup instructions
yegods has joined #ocaml
<mstevens>
def`: this may help a lot
<mstevens>
I falsely thought it was starting from a standard install
<def`>
:)
<def`>
the standard install is... minimal
<lokien>
do we need let every time we declare a variable? or is this only a repl thing
<def`>
(that's an habit here to start minimal and have flexible setup)
<def`>
everytime, how would you bind a variable otherwise?
Haudegen has quit [Ping timeout: 260 seconds]
<lokien>
python's fine with x = 1
<lokien>
that's why it sucks :^)
<def`>
but beware that in python this both binds and assign
<lokien>
oh, yeah
<lokien>
lack of kebab case hurts though, I really like it
<def`>
kebab :D?
<lokien>
kebab-case
<lokien>
snake_case
<lokien>
camelCase
<def`>
ah.
<def`>
you can fake kebab'case then
<def`>
don't_abuse_it_though
<lokien>
camel case reminds me of java :(
<lokien>
that's the only downside of ocaml so far
<def`>
hmm, snake_case is preferred though
<lokien>
oh, really? with all lowercase?
<def`>
capitals are used to distinguish namespaces
<def`>
but for the rest of the word, snake case is more common
<lokien>
yay! zero downsides!
<lokien>
and the prettiest repl in the world
<mstevens>
hurrah! Core.Std works
<lokien>
congrats :D
virtualeyes has joined #ocaml
<mstevens>
Also, I can confirm utop is pretty
lobo has joined #ocaml
<lokien>
I remember when I gagged, opening clojure repl on windows
<lokien>
"ocaml requires that both branches of an if statement have the same type" - isn't that annoying?
<def`>
what would be the type of the if otherwise?
<lokien>
oh, right. sorry for my type ignorance, I've spent too much time with dynamic languages
Haudegen has joined #ocaml
<def`>
(in practice no it is not annoying, there are verybfew programs that would require more expressivity)
<def`>
in most languages if are statements, not expression, so they don't event have a type
<lokien>
maybe silly, but are there statements in ocaml?
<def`>
it depends on how you define statements
<def`>
if you write effectful sequential codes, yes you have statements in terms
<def`>
that is you can write if/for/while exactly.as in C/python/...
<def`>
OCaml if is more general in that it also returns a value
<def`>
so it is a mix of a ? b : c and traditional if/then/else
<flux>
there are things in ocaml that don't have a value, or a type, such as the top-level definition let a = 42
<def`>
yep
<lokien>
kay, thanks
zaquest has joined #ocaml
BitPuffin has joined #ocaml
Simn has joined #ocaml
<lokien>
what is most frequently used data structure in ocaml? like map in clojure, array in c++ etc
darkf_ has joined #ocaml
sh0t has joined #ocaml
<def`>
list, but it is very common to have custom algebraic types in my
<def`>
experience*
darkf has quit [Ping timeout: 256 seconds]
<lokien>
def`: is it a regular linked list?
<def`>
yes
<lokien>
hope I won't miss my maps
zpe has joined #ocaml
igstan has joined #ocaml
igstan has quit [Client Quit]
JacobEdelman has joined #ocaml
<pierpa>
you also have maps, and sets, and hashtbls...
<lokien>
yeah, but (almost) every language likes one data structure in particular
<pierpa>
just in the standard library. There's no scarcity of data structures, in general
<lokien>
and you see it everywhere in the code
<pierpa>
then lists it is
<mstevens>
I'm sort of hoping to enjoy a life of fewer maps, I'm tired of the "I wonder what's in this" factor
<def`>
mstevens: this never occurs in ocaml
<lokien>
do vectors of maps of maps occur in ocaml?
<def`>
without types, most datastructures looks like maps, luckily it is not the case
<mstevens>
def`: I like python in a lot of ways, but I find the way any variable could be anything frustrating
<def`>
lokien: if you want, this might happen through abstraction, rarely in concrete code
<lokien>
mstevens: try clojure with schema! or typed clojure
<lokien>
def`: phew, thank god
<mstevens>
lokien: ocaml looks promising
<lokien>
mstevens: I mean, if you like being dynamic/flexible. ocaml doesn't look flexible at all
<def`>
lokien: well, it's object system is one of the most flexible. nit that it is a good idea in general
<def`>
not*
<mstevens>
lokien: I don't think I necessarily want to be too flexible. I'll see how I go.
<lokien>
by the way, do I really have to manually cast int to float every time I want to do arithmetic with floats?
<def`>
(scala's one is more flexible, but that might be the only "general purpose" one )
<lokien>
def`: but does it have real macros? :^)
<def`>
yes
<mstevens>
Basicaly I think I want strict types but easy to work with. But I'll find out more as I learn.
<lokien>
scala is so freaking big
<def`>
no :) (not yet at least)
hcarty has joined #ocaml
<mstevens>
It's interesting, I remember doing ml in university and thinking it was insane, my views have changed much.
<lokien>
by "big" I mean five ways of doing the same thing, many paradigms etc
<mstevens>
anyway I should shut up and read
<lokien>
where are you now mstevens?
<def`>
my no was about implicit coercion between int and float, there is no such thing
<lokien>
def`: so, let's say my x is 2, and I want to add x to 2.5
<lokien>
do I really have to do Int.to_float x +. 2.5 ?
<zozozo>
lokien: yes
<lokien>
eh :(
sh0t has quit [Remote host closed the connection]
<def`>
float x + 2.5 should be enough
<def`>
+.
<def`>
sry
<def`>
in practice two cases occur: you have a few operations to write, with proper abstraction it disappear
<def`>
this include working on vector code (like numpy)
Reventlov has joined #ocaml
<def`>
second case, you work with numerical computations with irregular structure... then it becomes a bit painful
* lokien
checks out language benchmarks game
<adrien>
the one which has itself been gamed to death?
<lokien>
actually, ocaml is comparable to clojure, I thought it would be much faster
<def`>
:D that's mostly non sense :)
<lokien>
adrien: you mean?
<adrien>
it's not very telling anymore
<lokien>
def`: and clojure programs there is basically hand written assembly
<adrien>
it used to be 10 years ago
<adrien>
afk
<companion_cube>
the programs look nothing like real programs
Guest70 has joined #ocaml
<lokien>
there are no good benchmarks, actually
<adrien>
in ocaml they still do, but that's because we hadn't tried that hard
<adrien>
and when people from the ocaml community started doing heavy optimizations, it snowballed and everyone else really went far
<lokien>
adrien: they are still more readable than clojure ones
<adrien>
then making the whole thing removed from reality
<lokien>
really? *ocaml* guys pushed it that hard?
<adrien>
and making the game maintainer almost crazy :P
<adrien>
lokien: not really ocaml people but everyone started doing heavier and heavier "optimizations"
<lokien>
oh, right.
<adrien>
and the game maintainer had setup criteria for such optimizations that could be gamed differently by different languages
<adrien>
like for GHC the GC parameters can be setup in the file header
<adrien>
and that was accepted
<adrien>
same for java and its huge heaps
<adrien>
but for ocaml, we would do it programmatically and that was refused
<adrien>
stuff like that
yawnt has quit [Ping timeout: 245 seconds]
<adrien>
anyway, gtg
<lokien>
kay, thanks for a nice conversation
<def`>
and if you see luajit being fast, it is because it is first order code
<def`>
It is a feat of engineering, but it is fast when the actual code is a loop mutating an array
<def`>
not really representative... So yes, benchmark are gamed and focused. it is not a problem per se, but results have to be interpreted "in context"
<lokien>
yeah, right.
yegods has quit [Remote host closed the connection]
ontologiae has joined #ocaml
Guest70 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ggole has joined #ocaml
yegods has joined #ocaml
darkf_ is now known as darkf
AlexRussia has quit [Ping timeout: 250 seconds]
igoroliveira has joined #ocaml
xavierm02 has joined #ocaml
<lokien>
also, how to build ocaml projects? do we have any build tool or something?
<zozozo>
there is ocamlbuild, among other build systems
silver has quit [Read error: Connection reset by peer]
xavierm02 has quit [Client Quit]
manizzle has quit [Ping timeout: 264 seconds]
<def`>
ahem. yes, but the situation is a bit contrived. I am not really uptodate on this matter
<lokien>
so, just one plain .ml file and then ocamlbiuld it? nifty
silver has joined #ocaml
<def`>
for simple project, yea ocamlbuild automatize most of the work
<MercurialAlchemi>
a lot of people (for OCaml community numbers value of 'a lot') use OASIS
<lokien>
you mean, like five people? :)
octachron has joined #ocaml
<lokien>
too bad ocaml isn't widely used, it's a good language
manizzle has joined #ocaml
Guest70 has joined #ocaml
lokien has quit [Quit: Leaving]
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
yegods has quit [Remote host closed the connection]
<tautologico>
oasis is good to setup simple projects
yegods has joined #ocaml
yawnt has joined #ocaml
<fds>
It's probably one of the most widely used `minority' programming languages.
<tautologico>
many new languages have (or had, initially) compilers written in ocaml
<tautologico>
the Rust compiler was written in OCaml, later ported to Rust
<MercurialAlchemi>
oasis is, well
<MercurialAlchemi>
it's better than nothing is what I'd say
<mstevens>
tautologico: I think I remember something about perl6, or is that my memory?
<tautologico>
oasis is ok for small projects, you can setup a new project with tests, dependencies etc in very little time compared to the alternatives
<tautologico>
mstevens: I remember there once was a reference perl6 compiler written in Haskell, I don't know if there is or was another one written in OCaml
mort___ has joined #ocaml
<tautologico>
the Hack language from Facebook is also implemented in OCaml
<mstevens>
tautologico: oh, maybe it was haskell
<jwatzman|work>
tautologico: the typechecker is, yes. the runtime is HHVM, which is C++
<tautologico>
jwatzman|work: oh right
<tautologico>
forgot about HHVM
<MercurialAlchemi>
tautologico: yeah, it sort of works
<flux>
don't forget haxe :)
<MercurialAlchemi>
except that it works by dumping generated code all over your source tree
octachron has quit [Quit: Leaving]
struk|desk|away is now known as struk|desk2
<tautologico>
MercurialAlchemi: you mean the setup.ml?
<MercurialAlchemi>
that, the tags file, the mldylib...
<MercurialAlchemi>
blarg
<tautologico>
right
<tautologico>
_tags is required by ocamlbuild
<tautologico>
but I see what you mean
<hcarty>
There is/was a request to allow all ocamlbuild configuration to be set in myocamlbuild.ml
<hcarty>
That could help reduce the clutter significantly if it happens
<MercurialAlchemi>
I think I object to the ocaml build ecosystem in general :)
<jwatzman|work>
MercurialAlchemi: yeah, AFAICT no build system gets incremental builds right, without the occasional "inconsistent assumptions" error
<jwatzman|work>
(the root problem is that the answer to "what files does 'ocamlc foo.ml' read and write" requires parsing ocaml)
<l1x>
yawnt: may i ask what is your motivation to move to Ocaml from Scala?
<yawnt>
l1x: native code, C FFI
<yawnt>
scala is 60% functional and 40% OOP
<yawnt>
OCaml is more like 80/20
<MercurialAlchemi>
jwatzman|work: this shouldn't be a cause for an epidemic of generated files
<yawnt>
plus, there are companies using OCaml in the finance sector, which is something I find interesting
<yawnt>
OCaml / Haskell
<yawnt>
so there's that too :)
<MercurialAlchemi>
ocaml code compiles in your lifetime, too
<yawnt>
i never actually had issues with the compiler speed in Scala tbh
<yawnt>
maybe I'm too tolerant :D
<yawnt>
and I have worked on fairly big projects (like Scala.js), so ...
<edwin>
I usually add ./configure --override ocamlbuildflags '-j\ 0' to make it a bit faster, and avoid camlp4
<l1x>
yawnt: thanks!
<yawnt>
I find `sbt` to be more frustrating than scalac itself
<yawnt>
MercurialAlchemi: ^
<MercurialAlchemi>
the scala build tool
<yawnt>
yeah
<yawnt>
like, everytime you start it up, it's 1,2GB of RAM going bye-bye
<yawnt>
even if you're not compiling
<MercurialAlchemi>
wow
<MercurialAlchemi>
your RAM dollars at work
<yawnt>
heh
<yawnt>
i got 8GB
<yawnt>
and it's not enough, planning on moving to 16
<yawnt>
(not enough if you have like, 3-4 projects open, say 3 sbt's + emacs/eclipse which is another one)
<yawnt>
l1x: but generally speaking, there's way more work in Scala than OCaml, if that's your worry.. and Scala is okay
<yawnt>
mine is more of a personal preference than a logical career move :)
mattg has joined #ocaml
<l1x>
well i refuse to do Scala after reading about it and seen some of the code that came out from that crowd
<l1x>
i also would not use sbt if there was the only build tool on the planet either
<l1x>
also did not help that i was running into the biggest idiots in the Scala community when i was having a look
<yawnt>
I kinda think the Scala community is a bit trying to fight a losing battle
<yawnt>
like, they're trying to take Scala and turn it into Haskell or whatever
<yawnt>
with Shapeless etc
<yawnt>
I think it feels forced, a bit
<yawnt>
but hey, just my $0.02
kakadu has joined #ocaml
<l1x>
yeah, no worries, i appreciate your opinion
Stalkr_ has joined #ocaml
<l1x>
ocaml is the only staticly typed language i use btw. :D
<Drup>
yawnt: some part of the scala community the creator of the language disagree with*
<l1x>
i like the concept of algebraic data type
<l1x>
Drup: the creator of the languages disagrees with lot of people
<yawnt>
Drup: yes, well, they are a pretty vocal minority :D
<yawnt>
on one side, I like that they try to push for a more functionally pure approach
Guest70 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yawnt>
but no matter how you turn it, resulting code doesn't look as pretty as Haskell
<l1x>
yep that is for sure
Guest70 has joined #ocaml
<yawnt>
which is why i'm like, why force something that clearly isn't there
<yawnt>
use Haskell and be done with it
<yawnt>
l1x: do you do OCaml for work?
<l1x>
yawnt: not at all, i am a consultant in the big data space so when you mention Ocaml they think you are talking about a scifi here
<l1x>
i do Clojure for my own projects mostly and Ocaml for pet projects
<yawnt>
ah, another language I like!
<l1x>
i am in love with Clojure
<yawnt>
I like how elegant LISP is, but I have my doubts when it comes to big projects
<l1x>
it is just so freakin damn good
<l1x>
sure
<yawnt>
i love me my macros, but no type system is an issue
octachron has joined #ocaml
<yawnt>
and Typed Clojure is ,eh
<yawnt>
*meh
<l1x>
i totally get that, but usually i work alone and i never run into problems because of lack of types
<l1x>
in fact, i love that i have functions that can take any sequable objects
<yawnt>
if you work alone, it can work out
prepor has quit [Quit: Leaving.]
<l1x>
yep, i am just lucky :)
<yawnt>
i'm actually surprised they let you do Clojure in Big Data
<yawnt>
where I can from, it's all Java or Scala
<yawnt>
*come from
<l1x>
i am the CTO of the company :D
JacobEdelman has quit [Quit: Connection closed for inactivity]
<l1x>
this is exactly why i started the company because i got tired of Java and Scala guys being mediocre and very vocal about how good Java and Scala is
<yawnt>
there are Scala guys who are legit good
<yawnt>
I'm just wary of people who advocate one single language :P
<MasseR>
TBH I'd rather choose java than scala
AlexRussia has joined #ocaml
fluter has quit [Ping timeout: 264 seconds]
<l1x>
yawnt: sure thing, i was just unlucky
<l1x>
also loved that twitter is rewriting JVM for scala
manizzle has quit [Ping timeout: 240 seconds]
<l1x>
when i asked wouldnt it be better to go for a different languages instead on rewriting JVM i got grumpy looks
manizzle has joined #ocaml
<yawnt>
i wish they opensourced it
<l1x>
one twitter guy interviewed me and asked a question that requires you to find hamilton loops in a graph during a 30 minutes phone call
<l1x>
i just dont get these people
<l1x>
while twitter is going down the shitter because of trivial problems they try to make it super hard for engineers to get in
<l1x>
funny
<def`>
they are reimplementing a jvm ?
<yawnt>
def`: they forked OpenJDK and have their own patches to cope with Scala at scale
<yawnt>
which grew and grew and eventually turned into a TwitterJDK distribution, which they now run on their servers
<MercurialAlchemi>
aren't they going mostly because lack of good business plan?
Guest70 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rks`>
MercurialAlchemi: yes.
<def`>
problem dogfooding :)
<yawnt>
l1x: i had no idea what a hamiltonian graph was, I checked wikipedia and it says that checking if they exist is NP-complete?
<yawnt>
so you have to what? brute force it?
<l1x>
yawnt: me neither, i called my friend who teaches math to software engineers at the local university and asked him how to solve the poblem, he came back after two days that he cant find any better solution than that
<l1x>
again context: 30 minutes initial interview for a software engineer position :)
<rks`>
well
lokien has joined #ocaml
<rks`>
it takes less than 30 minutes to say that.
<l1x>
well they expect you to write a working solution in 30 mins :)
<l1x>
this was prior when Max went nuts on a Google interview (inverting binary trees)
struk|desk2 is now known as struk|desk|away
<ggole>
What's inverting a tree anyway?
<l1x>
a binary tree has two leafs per node you need to flip them i guess
cody` has quit [Quit: Connection closed for inactivity]
<edwin>
the code still seems to be there, its the site thats gone
ygrek has quit [Ping timeout: 265 seconds]
yegods has quit [Ping timeout: 272 seconds]
groovy2shoes has quit [Remote host closed the connection]
<kakadu>
good, thanks!
yegods has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
larhat1 has joined #ocaml
yegods has quit [Read error: Connection reset by peer]
yegods has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
sgnb has joined #ocaml
Haudegen has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
ygrek has joined #ocaml
jeffmo has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
ggole has quit []
mort___ has joined #ocaml
zpe has joined #ocaml
mort___ has left #ocaml [#ocaml]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
kushal has quit [Ping timeout: 265 seconds]
kushal has joined #ocaml
lokien has joined #ocaml
kakadu has quit [Quit: Page closed]
Algebr` has joined #ocaml
yegods has quit [Ping timeout: 272 seconds]
yegods has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
sepp2k has quit [Quit: Leaving.]
badon_ is now known as badon
zpe has quit [Remote host closed the connection]
groovy2shoes has joined #ocaml
sh0t has joined #ocaml
yegods has quit []
zpe has joined #ocaml
zpe_ has joined #ocaml
kakadu has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
<lokien>
how can I create a program which I would call with arguments from cli? like "hello -world" in bash would print "hello world"
zpe has quit [Ping timeout: 250 seconds]
<Algebr`>
let () = print_endline Sys.argv.(1) is the fastest way now, can later learn a library like cmdliner
zpe_ has quit [Read error: Connection reset by peer]
<lokien>
Algebr`: thanks
<lokien>
how would I download that library? with opam, right?
<Algebr`>
opam install cmdliner
<Algebr`>
many examples provided by cmdliner as well
<lokien>
thank you, just wanted to make sure
groovy2shoes has quit [Quit: Leaving]
groovy2shoes has joined #ocaml
_andre has quit [Quit: leaving]
sh0t has joined #ocaml
groovy2shoes has quit [Quit: Leaving]
<Drup>
lokien: beware, cmdliner is going to seem very akward for an ocaml beginner
<lokien>
Drup: let me look at it
<lokien>
whaaa
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
jeffmo has joined #ocaml
<companion_cube>
:DD
<companion_cube>
really, just start using Arg
<companion_cube>
it's provided with the stdlib and is sufficient for many cases
<lokien>
which core is the best? jane street's one?
<yawnt>
'nuff OCaml for today
<adrien>
I wouldn't advise anyone to start with cmdliner
<yawnt>
me likes it
<lokien>
yawnt: it's never 'nuff!
<adrien>
it's powerful but really often not obvious
groovy2shoes has joined #ocaml
<yawnt>
lokien: i know, but usually what happens is, I wanna learn more and more and more
<yawnt>
and then I burn out
<yawnt>
so i'm taking this one slowly
<yawnt>
couple of chapters a day :)
<lokien>
yawnt: I call it a haskell headache
<yawnt>
and it keeps you wanting for more, so it's good for morale
<Algebr`>
lokien: what other core is there?
<yawnt>
lokien: true! i went through the real world haskell book
<yawnt>
twice
<yawnt>
and i dropped out at half
<yawnt>
twice
<yawnt>
which is why im trying the alternative approach :P
<Algebr`>
adrien: the examples can pretty much be copy pasted, but yea, it would be a bit harder than the average library for a beginner.
<Algebr`>
although I'm still trying to figure out how to do subcommands like how opam has a sub commands list for switch
<lokien>
Algebr`: I've heard ocaml has three core libraries
<yawnt>
lokien: `core` is the name of JaneStree's stdlib
<yawnt>
there are alternative stdlib's
<yawnt>
there's core, batteries and the one ocaml comes with
<yawnt>
probably more, I think?
<lokien>
yawnt: my haskell learning experience : 1. read three sentences 2. think about them 3. be enlightened 4. headache, unable to do anything for few hours
<lokien>
stdlib*, yeah, sorry
<companion_cube>
there is containers, too, smaller than core and batteries
<yawnt>
ah, there, containers
<lokien>
which one is for what? or just "depends on what you like"?
<companion_cube>
you can use whichever you prefer
<lokien>
oh, well.
<Algebr`>
lokien: if you are in the Bay Area, then come to the Feb 8 OCaml meetup.
<lokien>
Algebr`: I'm in poland, sadly
<yawnt>
lokien: Poznan?
<yawnt>
i have a friend in Poznan
<yawnt>
:D
<lokien>
not so far away from poznan
<lokien>
let me write a killer app in ocaml, and then I'll come to the meetup for sure
<lokien>
by the way, are 2.5d graphics not painful in ocaml? like these in duelyst
govg has quit [Ping timeout: 240 seconds]
<Algebr`>
I think there's SDL bindings and the vg thing can do graphics, I think
<lokien>
if ocaml to js is alive, graphics would be kind of easy
<lokien>
is it alive?
<Drup>
js_of_ocaml ? yes
<Drup>
we got a release yesterday ! :D
govg has joined #ocaml
eeks_ has joined #ocaml
<kakadu>
btw, can I compile jsoo without camlp4?
<Algebr`>
js_of_ocaml is very much alive and well, my commits were part of that release :) !
mort___ has joined #ocaml
<Algebr`>
kakadu: I don't think camlp4 is a prereq
<lokien>
oh my god!
<Drup>
it is
<Drup>
but it would be easy to make a pure ppx version
<kakadu>
In my head it should but by some reason it doesn't
<kakadu>
(* I'm debugging my pull request about in-process PPXs, btw. And it seems that `mapper.structures` calls default_mapper.structure and I don't know why *)
slash^ has quit [Read error: Connection reset by peer]
<Drup>
yeah, that's because that's wrong
<kakadu>
shit
<kakadu>
I got it
* Drup
plays the rubber duck.
Guest70 has joined #ocaml
Guest70 has quit [Client Quit]
cody` has quit [Quit: Connection closed for inactivity]
rpg has quit [Quit: rpg]
copy` has joined #ocaml
<lokien>
thank you guys, I'm going to sleep
<lokien>
goodnight :)
lokien has quit [Quit: Leaving]
xyh_ has joined #ocaml
darkf has quit [Quit: Leaving]
xyh_ has quit [Client Quit]
Guest70 has joined #ocaml
freehck has quit [Remote host closed the connection]
pilne has joined #ocaml
hcarty has quit [Quit: WeeChat 1.4]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
mort___ has quit [Quit: Leaving.]
BitPuffin|osx has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Ping timeout: 245 seconds]
BitPuffin|osx has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
<teknozulu_>
ugh. any neat formatting tips for when an ~f param (i.e. ~f:(fun blah -> ...)) needs to go on a new line
<Drup>
when the whole function application doesn't fit on a line or when you can write it like that "foo ~f @@"
<Drup>
(with a big value after that)
<teknozulu_>
when the body of the function doesn't fit. Somehow it seems like each intuitive part to break it up at results in ugly, maybe the reasonable thing to do is to just use a let binding for the func and then pass it by name
Snark has quit [Read error: No route to host]
<Drup>
if the body of the function doesn't fit, declare it before.
<Drup>
let f = .... in foo ~f ...
<teknozulu_>
yep. although it seems that you can get a decently neat result when f isn't a labeled arg, such as with Clock.every or Monitor.try_with
<Drup>
well, you don't have to use the label
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<teknozulu_>
yeah, I scrabbed the label and restored peace
ely-se has joined #ocaml
mort___ has joined #ocaml
sh0t has quit [Ping timeout: 272 seconds]
yawnt has quit [Quit: leaving]
Algebr` has quit [Remote host closed the connection]
Algebr` has joined #ocaml
mort___ has left #ocaml [#ocaml]
Guest70 has quit [Ping timeout: 250 seconds]
mac10688 has joined #ocaml
thesnowdog3 has quit [Read error: Connection reset by peer]
thesnowdog3 has joined #ocaml
xaimus has quit [Ping timeout: 245 seconds]
hunteriam has joined #ocaml
xaimus has joined #ocaml
Simn has quit [Quit: Leaving]
eeks_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lobo has quit [Quit: zleep]
ely-se has quit [Quit: Leaving...]
silver has quit [Quit: rakede]
nyon has quit [Quit: Loops are hard. Let's GOTO shopping!]
kakadu has quit [Remote host closed the connection]
lokien_ has quit [Quit: Connection closed for inactivity]