<Quintasan>
I'll be frank, I have no idea what happened here. Can someone elaborate?
pyx has joined #ocaml
pyx has quit [Client Quit]
Algebr has joined #ocaml
ygrek_ has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Remote host closed the connection]
nullcatxxx_ has joined #ocaml
swgillespie has joined #ocaml
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
ncthom91 has joined #ocaml
ceryo has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
struktured has quit [Ping timeout: 240 seconds]
ceryo has quit [Ping timeout: 255 seconds]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup>
do it by hand, you will figure it out
toomuchtvrotsurb has quit [Remote host closed the connection]
darkf has joined #ocaml
raazdaan has joined #ocaml
raazdaan has quit [Client Quit]
struktured has joined #ocaml
rgrinberg1 has quit [Read error: Connection reset by peer]
mac10688 has quit [Ping timeout: 244 seconds]
struktured has quit [Ping timeout: 255 seconds]
antkong has quit [Quit: antkong]
antkong has joined #ocaml
struktured has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
<Algebr>
Drup: Sometimes my generated js from jsoo has runtime undefines and places like this: if(meths_e_[ofs_i_]===tag_b_) /*<<stdlib.js 942 33>>*/ return meths_e_[ofs_i_-1];} What does that usually mean, if any hints can be gleaned
<Algebr>
Drup: and how can I turn what I know to be a Javascript object into a string or json format?
pierpa has quit [Ping timeout: 240 seconds]
<Drup>
1) No idea 2) method to_string
tmtwd has quit [Ping timeout: 260 seconds]
<Algebr>
Drup: to_string is just for js_string Js.t, I meant for {"foo":10} into a string...
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
MercurialAlchemi has joined #ocaml
nullcatx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djellemah_ is now known as djellemah
tmtwd has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
ygrek_ has joined #ocaml
gobbledigook has quit [Remote host closed the connection]
Algebr has quit [Remote host closed the connection]
mobius-eng has joined #ocaml
tmtwd has quit [Ping timeout: 260 seconds]
manizzle has joined #ocaml
kushal has joined #ocaml
antkong has quit [Quit: antkong]
larhat1 has quit [Quit: Leaving.]
AlexRussia has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
mort___ has quit [Quit: Leaving.]
manizzle has quit [Ping timeout: 244 seconds]
lolisa has joined #ocaml
rand has joined #ocaml
mobius-eng has quit [Read error: Connection reset by peer]
adrien_znc has quit [Ping timeout: 268 seconds]
adrien_znc has joined #ocaml
antkong has joined #ocaml
antkong has quit [Read error: Connection reset by peer]
ely-se has joined #ocaml
Kakadu has joined #ocaml
ygrek_ has quit [Ping timeout: 250 seconds]
rand has quit [Quit: leaving]
mort___ has joined #ocaml
ollehar has joined #ocaml
xificurC has quit [Ping timeout: 256 seconds]
mort___ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
mort___ has quit [Client Quit]
bitemyapp has quit [Ping timeout: 255 seconds]
<Leonidas>
such a sad thing that |> does not work like composition
bitemyapp has joined #ocaml
<Leonidas>
fun x y = y |> f x |> f2 is unfortunately not fun x = f x |> f2
<ely-se>
it's is actually quite fortunate
<ely-se>
imagine how many horrible amiguity errors you would get if |> did both composition and application
<ely-se>
KISS
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
Simn has joined #ocaml
mort___ has joined #ocaml
orbifx has joined #ocaml
<Leonidas>
I ended up defining (<<) as composition operator and removed threading altogether.
* Leonidas
is fine with that outcome
ollehar has quit [Ping timeout: 260 seconds]
<lyxia>
module Array = struct let get f g x = x |> g |> f end, then write "fun x -> f2 . (f x)" !
<lyxia>
I read before that the desugaring of .() was going to be fixed, what's the proposed "fix" for that?
raazdaan has quit [Read error: Connection reset by peer]
ceryo_ has joined #ocaml
ceryo has quit [Ping timeout: 268 seconds]
raphaelsss has joined #ocaml
ely-se has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
jeffmo has joined #ocaml
tmtwd has joined #ocaml
rand has quit [Quit: leaving]
jwatzman|work has joined #ocaml
raphaelsss is now known as raphaelss
ely-se has quit [Quit: leaving]
ggVGc has joined #ocaml
jwatzman|work has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
<ggVGc>
I am trying to decide on a language to introduce to my team, who consits of very dynamic and imperative-focused background(mostly actionscript and javascript). We are already moving towards a more functional approach within JS but I want to attempt bringing in a typed language into our workflow. I am thinking Ocaml(or maybe F#) would be a good candidate for this. Would you guys say the imperative structures and mutable data types in Ocaml are familiar
<ggVGc>
enough for my team to start being able to get some work done while getting into the more functional aspects over time?
<ggVGc>
and also, would you say js_of_caml mature enough for production use?
<flux>
personally in that context I might seriously consider haxe, even though I have zero knowledge on it.
<Drup>
Issue with haxe is the tiny community
<Drup>
(OCaml is already not that big, but haxe ...)
<Drup>
ggVGc: regarding js_of_ocaml, yes
<flux>
well, the js_of_ocaml community of ocaml might be comparable in size?-)
<Drup>
flux: you can use a good amount of the ocaml ecosystem directly, though :p
<ggVGc>
I've done commercial work in haxe before, and yes it could be an option, but I would rather get away from the kinds of type systems that Haxe is part of
<flux>
true
<ggVGc>
and I would like to remove as much dynamic behaviour as possible. If we have haxe, they will fall back into their old AS ways very easy
<Drup>
ggVGc: regarding the rest ... I know several people who started learning OCaml by writing imperative code and got slowly pushed toward a functional style
<ggVGc>
Drup: yeah, that's what I've gathered. I think it could be fairly accessible for them
<Drup>
but I won't say it's the best way to learn (it means you are going to write god that isn't pretty for a while, technical debt, all that)
<Drup>
write code*
<ggVGc>
Drup: anything will be better than what we're doing now.
<Drup>
do you have only frontend code ?
<ggVGc>
well-typed crappy imperative Ocaml is still better than untyped spaghetti javascript
<ggVGc>
yeah, only frontend in this team
<Drup>
I see
<ggVGc>
what I'm looking for is something where they can feel liuke they're in the same "world" as when writing JS and similar, but with static typing and nice syntax shortcuts for things like function application, so they'll slowly start experiencing the functional mindset by themselves
<ggVGc>
they are already being very interested in lodash in JS
<Drup>
ocaml + jsoo is not really the same word
<def`>
have you considered flow?
<Drup>
world*
<flux>
does js_of_ocaml yet support the javascript debug information? (ie. linenumbers)
<ggVGc>
Drup: yes, but it won't achieve what I'm aiming for, so introducing it wouldn't be worth it at this point
<ggVGc>
flux: you mean source mappings? I would hope so
<Drup>
flux: yes
<flux>
cool
<ggVGc>
if they can define a closure with a mutable object, attach functions to that object and return it, then that's close enough. I don't think that will be too different in OCaml for them?
<ggVGc>
maybe I#m wrong
<ggVGc>
I haven't written Ocaml myself in a long time, so I will need to sit down and refresh before I pitch it
<ggVGc>
if I pitch it
<Kakadu>
Folks, I have haskell issue and I don't know where to ask :) will it be too much offtop?
<ggVGc>
#haskell is probably better?
<def`>
you can always ask :)
<Kakadu>
They are a little bit silent and it bother's me... , ggVGc
<Drup>
ggVGc: My main reservation is that the ecosystem surrounding jsoo is not really geared towards beginners
Kakadu is now known as Kakadu_offtops
<ggVGc>
Drup: yeahg, I'd have to be the tutor fully
<Enjolras>
ggVGc: my personal opinion is that imperative structure of ocaml will be judged very poor by your team if they are used to more mainstream imperative workflow
<Enjolras>
ggVGc: on the other hand, it might make them want to switch to a more ocaml-ish style quickier
<def`>
to me it looks more disciplined
<Drup>
Yeah, I tend to prefer writing C code in OCaml than in C
<def`>
(the more important change being that references are first class values)
<ggVGc>
Enjolras: what are my alternatives?
<Drup>
ggVGc: I guess you already considered typescript ?
<def`>
Drup: I like writing ML looking code in C :)
<ggVGc>
Drup: yeah, but I want to break from JS semantics
<Enjolras>
ggVGc: i'm not a good autority in this area
Kakadu_offtops is now known as Kakadu
<Drup>
ggVGc: there is Elm and Purescript, with a similar caveat than Haxe : tiny tiny community
<Enjolras>
i don't know many languages and none of them would fill your usecase
<def`>
Kakadu: you give up :P ?
<Enjolras>
I don't think you want to switch to Elm from js directly
<Kakadu>
def`: Out of ideas
<Enjolras>
the gap is quite huge
<ggVGc>
Drup: they are both too functional to be introduced in this context I feel
<Enjolras>
it will not be a smooth transition
slash^ has joined #ocaml
<Drup>
Enjolras: yes, and I personally think jsoo is nicer than Elm, but that's my personal opinion :p
<Drup>
(well, not nicer, but more useful)
<Enjolras>
Drup: i don't know if it is nicer, but i definitly feel like it would be easier
<Enjolras>
Elm is a typical "haskell community mindset" tool
<ggVGc>
has anyone used F# for generating JS and can compare to jsoo?
<Kakadu>
def`: I changed nick to be able to write in #haskell again :)
<Drup>
ggVGc: there is the OCaml MOOC running right now (started second week) :D
<Enjolras>
you need to have deep knowleged of the paradigm to be able to using, or be willing to invest a lot of time to learn it
<ggVGc>
I wonder if I might have to choose F#, simply because it's supported by MS, which will make it much easier to sell to my suervisors
<Enjolras>
does F# have something like jsoo ?
<Enjolras>
this is a selling point for your supervisor
<ggVGc>
yes, WebSharper and FunScript
<Enjolras>
ok :)
<ggVGc>
Enjolras: it's easier to motivate bringing a new tool if it's backed by a multi-billion company and used by multiple banks and trading shops
<ggVGc>
rather than "some random github repo"
<Drup>
If that can reassure you, jsoo is used by several companies
<Enjolras>
i think ocaml qualify
<ggVGc>
yeah, ocaml, but not js_of_ocaml
<ggVGc>
that's my concern
<Drup>
yes, js_of_ocaml too
<Enjolras>
js_of_ocmal quality too
<Drup>
(facebook, among others)
<ggVGc>
it's not that I don't believe it. I would rather have ocaml
<ggVGc>
for reference it took me 9 months to get lodash into our workflow
<ggVGc>
and they refused to allow jquery
<Drup>
(there is even a company that works only under windows that uses js_of_ocaml :p)
rand has joined #ocaml
<companion_cube>
[16:50:00] < ggVGc> maybe I#m wrong ← too many method calls today, I presume
raphaelss has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
<flux>
drup, is there a way to just use nodejs with js_of_ocaml and have a whole new opam switch where everything works with javascript?-)
<flux>
everything, except the tiny small bits of.. c
<Enjolras>
ask alegbr when he is around :)
ggole has joined #ocaml
darkf has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
<Drup>
flux: why do you want a switch ?
FreeBirdLjj has quit [Remote host closed the connection]
<Drup>
I mean, just use normal OCaml ...
Intensity has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
mort___ has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
jonasac has joined #ocaml
jonasac has left #ocaml [#ocaml]
Tekilla has quit [Ping timeout: 260 seconds]
native_killer has joined #ocaml
toomuchtvrotsurb has joined #ocaml
^elyse^ has joined #ocaml
JuggleTux has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
toomuchtvrotsurb has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
Lis has joined #ocaml
<flux>
drup, but I want an ocaml compiler that runs under nodejs!
<flux>
well, "want" might be overselling it a bit.. ;)
<flux>
I could just copy that opam environment then to a macosx and it would just work! also, on windows!
jonasac has joined #ocaml
<Drup>
like bytecode, then.
<flux>
well, it would also work in the web browser with a proper runtime ;)
<Drup>
flux: I know you are trolling, but I don't see the point of having the same for both :)
nullcatxxx_ has joined #ocaml
^elyse^ has quit [Quit: Leaving]
rpg has joined #ocaml
JuggleTux has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 255 seconds]
native_killer has quit [Quit: Leaving]
python476 has joined #ocaml
ygrek_ has joined #ocaml
^elyse^ has joined #ocaml
kushal has quit [Ping timeout: 260 seconds]
jonasac has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 244 seconds]
JuggleTux has joined #ocaml
rpg has quit [Quit: rpg]
kushal has joined #ocaml
ollehar has joined #ocaml
ggole has quit []
rpg has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
keen___________ has joined #ocaml
toomucht_ has joined #ocaml
Algebr has joined #ocaml
keen__________ has quit [Ping timeout: 244 seconds]
toomucht_ has quit [Ping timeout: 244 seconds]
tane has joined #ocaml
toomuchtvrotsurb has joined #ocaml
larhat1 has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kakadu_ has joined #ocaml
mobius-eng has joined #ocaml
jonasac has joined #ocaml
jonasac has quit [Read error: Connection reset by peer]
jonasac has joined #ocaml
__uu__ has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
nullcatxxx_ has joined #ocaml
_andre has quit [Quit: leaving]
orbifx has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
xificurC has quit [Quit: WeeChat 1.3]
tmtwd has quit [Ping timeout: 240 seconds]
Kariem has joined #ocaml
Algebr has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 264 seconds]
mobius-eng has quit [Ping timeout: 260 seconds]
ollehar has joined #ocaml
freehck has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
Kariem has quit [Quit: Leaving]
jonasac has left #ocaml [#ocaml]
swgillespie has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Tekilla has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ollehar has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Ping timeout: 250 seconds]
mac10688 has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
pyon has joined #ocaml
ollehar has joined #ocaml
toomuchtvrotsurb has quit [Read error: Connection reset by peer]
Algebr has joined #ocaml
toomuchtvrotsurb has joined #ocaml
<Algebr>
does the OCaml TLS implementation use any systems calls or assume Unix? Can it be compiled to jsoo
<hannes>
certainly the hard part would be to get zarith and nocrypto (plus entropy, see mirage-entropy-xen) working on jsoo.
<Algebr>
so the answer is no?
<hannes>
the answer is yes, it is possible. it is not done yet, and currently nobody works actively on it.
<Algebr>
Okay, there goes that idea.
<hannes>
I'm happy to support where I can, but can't do this myself right now (due to limited time)
<Drup>
having zarith working on jsoo should not be too difficult (and would be very desirable, in the grand scheme of things)
<Drup>
it basically boils down to picking an arbitrary integer library in js and implementing the external functions in js
jonasac has joined #ocaml
ollehar has quit [Quit: ollehar]
<Algebr>
libraries, libraries and no applications. sigh.
ygrek_ has joined #ocaml
Tekilla has quit [Quit: Quitte]
<hannes>
Algebr: that's why I started jackline (an terminal-based xmpp client) at some point.. but turns out, there are various libraries which need some love
ceryo_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonasac has quit []
Algebr` has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
Algebr has quit [Ping timeout: 256 seconds]
Denommus has joined #ocaml
nullcatxxx_ has joined #ocaml
xet7_ has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
Haudegen has joined #ocaml
Algebr`` has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
tane has quit [Quit: Verlassend]
Algebr``` has joined #ocaml
Algebr`` has quit [Ping timeout: 252 seconds]
<Algebr```>
GADTs are closed right? I can't add another one to an existing library right
<Drup>
you can have extensible sum types that are GADTs
<Algebr```>
How
<Drup>
but the usual version is the closed version
<Drup>
same as extensible sum types
<Algebr```>
I thought that was just for poly variants
kakadu_ has quit [Remote host closed the connection]
rand has quit [Quit: leaving]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Algebr```>
I still don't fully grok GADTs =/
mtesseract has joined #ocaml
bugabinga has quit [Remote host closed the connection]
ncthom91 has joined #ocaml
bugabinga has joined #ocaml
<Algebr```>
Drup: this doesn't make sense, why is a catch all _ case required for open types even for a function that expicity says what type it takes. Example: type foo = .. then type foo += A | B let g (item : foo) = match item with A -> "123" | B -> "456" but this will complain about a catch all needed, but g is explicity saying the type of its paramater
<Drup>
Algebr```: because you can add other constructors at any point in the program
<Algebr```>
but g can't take into account the new constructors right, something would have to wrap g I guess.
<Algebr```>
its not like I can "inherit" g and add the missing cases in the match as new constructors are added, right
<Drup>
well sure it can
<Drup>
with a catchall
<Algebr```>
but the catchall can't tell what constructor it got
rpg has quit [Quit: rpg]
<Drup>
No, but it can at least do something else than crashing
<Drup>
(or craching in a sensible manner)
^elyse^ has quit [Quit: Leaving]
nullcatxxx_ has joined #ocaml
Simn has quit [Read error: Connection reset by peer]