MaskRay has quit [Remote host closed the connection]
ocp has joined #ocaml
Cyanure has quit [Remote host closed the connection]
zorun has joined #ocaml
notk0 has joined #ocaml
<notk0>
is ocaml better than C?
<djcoin>
:troll:!
<notk0>
wtf?
<notk0>
my teacher told me so
<djcoin>
I like beer over banana
<notk0>
weren't functional languages mathematically proven to be more expressive than other type of languages?
<notk0>
in the hierarchy of languages
<notk0>
if you start at asm, in C it would take less time and lines of code to do the same thing
<notk0>
then if you go to higher languages you need even less code to express the same code
<notk0>
isn't ocaml the highest there is?
datkin has quit [Read error: Connection reset by peer]
<notk0>
wow guys no wonder this language is not popular
<gasche>
notk0, "productivity" is not a formal property, you can't "mathematically prove" anything about it
<notk0>
gasche, I talked about expressibility , ocaml is more expressive than C, a lot more
<notk0>
that translates directly in productivity
<notk0>
that's why google choose python, it's more productive, and faster to develop
<gasche>
well, "directly" is a bit of a stretch here
cago has quit [Ping timeout: 265 seconds]
<notk0>
gasche, I don't think so, I am pretty sure ocaml is better than C
<gasche>
for example, Scala is more expressive than Java, but it's not clear that the average programmer will be more productive using it
<gasche>
it all depends on the context and the application domain
datkin has joined #ocaml
<notk0>
gasche, just because a programmer is bad doesn't mean the language is bad as well
<gasche>
if you want to write an OS kernel, there are a lot of good reasons to prefer C (.. though some people use OCaml in again more specific context, and win)
<gasche>
but I'm playing the devil advocate here, indeed I prefer using OCaml over C
<gasche>
I still would be *very* careful with claims such as "mathematically proven to be more ... than any other type of languages"
<notk0>
that's what my teacher told me
<notk0>
I think he said mathematically proven to be more expressive
<gasche>
well, it depends on what he means by "expressive"
<notk0>
write less, do same thing ?
mariano has quit [Quit: Leaving]
dhconnelly has joined #ocaml
<gasche>
but probably he was just doing hand-waving and you shouldn't put too much into these words
<notk0>
what do you mean hand-waving ?
<notk0>
by
<notk0>
*
<gasche>
speaking informally, making generalizations for the purpose of scientific vulgarization
<notk0>
technically speaking you can express more things in ocaml than you would have to do in C
avsm has quit [Quit: Leaving.]
<Ptival>
you can express the same things
<gasche>
notk0, I don't think so; how could you prove it?
<notk0>
Ptival, yes, both are turing complete, but in C you would require more words to express the same thing
<Ptival>
well, most probably
<notk0>
gasche, the syntax ?
<gasche>
what you could formally claim, I think, is that it is not possible to do a *local* transformation of an OCaml piece of code into an equivalent C one: at some point you need a *global* transformation pass (~ compilation)
<Ptival>
notk0: for instance, if you're doing some bit manipulation, it's a bit easier to write in C than in OCaml (it's still debatable)
<gasche>
you could also show examples of OCaml code that are difficult or painful to translate faithfully into C -- but the converse also exists
<Ptival>
because the syntax matches the domain
<notk0>
how can you guys be from INRIA and defend C, wtf?
<Ptival>
we're not defending C, we're defending truth :p
<notk0>
truth is subjective
<notk0>
your opinion of the truth is flawed , you don't realize how good Ocaml is
<Ptival>
as mentioned before, in _most_ cases, we would rather use OCaml than C
<gasche>
besides, agreeing with people over the net is no fun
<notk0>
honestly tho I was kidding
<notk0>
Ocaml is bad
<notk0>
no wonder it's not used by anybody except some French people who do research
<djcoin>
I spotted you as a troll from the start :)
<Ptival>
:)
<adrien>
ocaml is crap
<adrien>
but it's probably one of the least bad languages :P
<notk0>
they only make us learn it at university because it's made in France, we should learn a real Functional language that is actually used in the industry
<djcoin>
Yep
<notk0>
I am sure that in universities outside of France nobody even heard of Ocaml
<djcoin>
Sure
<Ptival>
notk0: I went to one university in the US, and the guys in the PL group were programming OCaml
<hcarty>
What's OCaml? (outside of any French university)
<notk0>
no major piece of software is written in ocaml (except maybe the ocaml library and other stuff related to ocaml itself)
<Ptival>
True story
<notk0>
Ptival, they were probably studying it to try to avoid such a horrible language
<notk0>
or you're probably lying
<notk0>
true story
<gasche>
hm
<gasche>
the previous position was funnier to debunk
<hcarty>
gasche: From another lurker - thank you for the reddit posts, including the older articles.
<djcoin>
One true fact: popularity of a language has nothing to do with its pros and cons
<notk0>
ocaml doesn't even have a proper emacs mode, tuareg is so bad
<gasche>
hcarty, you're welcome; do not hesitate to post things yourself if you have interesting stuff and it lacks activity
<hcarty>
gasche: As one who writes (obviously minor!) pieces of software in OCaml, the updates on new material and reminders of older work are nice to have.
<notk0>
I can't even think of what kind of program I would be able to write in Ocaml
<notk0>
djcoin, please don't try to discredit me with such false accusations
<notk0>
it is clear as crystal that those logs were fabricated with the sole purpose of damaging my public persona
<notk0>
ask in any other channel, my name is very respected around here
<Ptival>
this fails to be funny
<djcoin>
lol
<djcoin>
bye
<djcoin>
good luck
djcoin has quit [Quit: WeeChat 0.3.2]
<notk0>
Ptival, it is not funny at all
<Ptival>
now we agree!
asdfhjkl has quit [Quit: Leaving]
<notk0>
Ptival, we may agree on many things actually
<notk0>
but in this case I think you were confused, since I probably meant something different (by saying "it") than you did
emmanuelux has quit [Ping timeout: 245 seconds]
<jonafan>
wow, a troll in #ocaml
<jonafan>
we hit the big time!
pippijn has left #ocaml []
<_habnabit>
oh, _that's_ why your nick is familiar. you've been banned from #python before.
<_habnabit>
re: notk0
<notk0>
_habnabit, It may be so. I don't recall it
<notk0>
jonafan, indeed, ocaml is becoming a major language now!
<jonafan>
i knew everyone would see the light someday!
<notk0>
jonafan, unfortunately I am not a troll and Ocaml is still not popular
<jonafan>
i can scroll up dude
<notk0>
jonafan, how does that make me a troll?
<jonafan>
typical troll behavior: asking me to ruminate on shit that just happened
<notk0>
jonafan, in other words, you don't know
<jonafan>
haha okay
<notk0>
just because I question stuff doesn't make me a troll jonafan
<notk0>
people use this word so often nowadays, every time they can't support their opinion they call troll
<jonafan>
"is it possible for me to even ask a question without it being considered trolling???"
<notk0>
jonafan, why the quotes?
<jonafan>
i've heard it before
<notk0>
jonafan, right
<jonafan>
only trolls say stuff like that
<notk0>
jonafan, what a nice generalization
<jonafan>
thank you
<notk0>
jonafan, very easy to call someone a troll, and claim they are so because of what they say
<jonafan>
yeah that's basically how it works
<Schadenfreude>
too bad they actually are
<jonafan>
why do you think i think you're a troll?
<notk0>
all people that say a certain thing are troll regardless of context , got it
<Schadenfreude>
what a nice generalization
<notk0>
jonafan, because you believe it?
<notk0>
because in your mind, you convinced yourself that I am a troll
<jonafan>
is it possible for me to accurately conclude someone is a troll?
<notk0>
if we are talking about accuracy , you must first accurately define what is a troll
<jonafan>
what is a troll then?
<notk0>
why are you asking me?
<jonafan>
why aren't you answering?
<notk0>
am I supposed to know what a troll is?
<jonafan>
don't you know?
<notk0>
I am not sure
<jonafan>
where could you learn the definition of this term?
<notk0>
using a search engine perhaps
andreypopp has joined #ocaml
<notk0>
jonafan, any luck?
<jonafan>
are you asking me to google things for you?
<notk0>
jonafan, are you expecting me to google things for you? you asked me
<jonafan>
but didn't you suggest using an accurate definition of trolling?
<jonafan>
isn't it your responsibility to define the term?
<notk0>
jonafan, you were the one that identified me as a troll and claimed to be able to accurately identify trolls, therefore you must have your own criteria and definition
<notk0>
jonafan, you seem lost
<Ptival>
notk0: how do you know you're not a troll if you don't know what a troll is?
<notk0>
Ptival, I read the definition of a troll, and I don't considered myself a troll
<_habnabit>
#python.02-05.log:13:08 < notk0> m0rpho, do you like fishdicks?
<_habnabit>
#python.02-05.log:13:08 < notk0> m0rpho, fishsticks do you like them?
<notk0>
_habnabit, clearly fabricated
<_habnabit>
of course.
<notk0>
_habnabit, it's very east to type that, replacing my nick in the process
<notk0>
#python.02-05.log:13:08 < _habnabit> m0rpho, do you like fishdicks?
<notk0>
easy
<Schadenfreude>
why would anyone do this to you if you weren't even a tiny bit of an annoyance to said one, notk0
<notk0>
Schadenfreude, how am I supposed to know the reason why certain people do certain things?
<_habnabit>
it's a massive conspiracy
<notk0>
I don't even know the reasons behind my own actions
<_habnabit>
leave the paranoid schizophrenic alone
<Schadenfreude>
ooh, that explains
<_habnabit>
##c.09-25.log:12:39 < notk0> damn DRE makes good beats, raps and even knows C
<notk0>
Are you telling me you know the reasons behind your own actions Schadenfreude ? because I doubt that
<_habnabit>
there's some great stuff in my logs
<notk0>
_habnabit, in your fabricated logs that is
<Schadenfreude>
notk0: I can assure you I do nothing like visiting a random channel and flooding it with things I don't know why I am saying (which is, in a nutshell, how you described yourself)
<notk0>
Schadenfreude, so are you saying that you know the exact reason behind your every action? you know exactly what factors in the universe influenced the atoms from your brain to make you conceive a certain thought at a certain time and do a certain action ?
<Schadenfreude>
I didn't say so. if you're barely trying to not look like a troll, you're certainly doing it bad
<notk0>
Schadenfreude, I simply claimed that I don't know the reason behind my own actions
<Schadenfreude>
correct. by this you mean you don't seem to have a lot of common sense too, do you?
<_habnabit>
Schadenfreude, oh no you're letting him win :(
<notk0>
Schadenfreude, what does that have to do with anything? you mean there are people who know the reason behind their own actions?
<notk0>
_habnabit, this is not a game, nobody wins
<Schadenfreude>
I know there are people who have enough common sense to explain themselves clearly
<Schadenfreude>
and the ones who don't
<_habnabit>
Schadenfreude, stop it !! he'll think he's winning
<notk0>
_habnabit, this is not a game
<Schadenfreude>
this is still a situation where you can lose
<notk0>
Schadenfreude, what can I lose? an argument?
<Schadenfreude>
who is arguing with you?
<notk0>
Schadenfreude, what do I lose then?
<Schadenfreude>
why didn't you answer my question?
fabjan has joined #ocaml
<notk0>
Schadenfreude, I think I forgot, can you ask again?
chambart has quit [Ping timeout: 260 seconds]
<Schadenfreude>
can't you manage your irc client manually?
<notk0>
what do you mean by manage my irc client manually?
<_habnabit>
use your scollback
<_habnabit>
+r
<notk0>
well I think he may have asked multiple questions, I don't know witch one he wants me to answer
<Schadenfreude>
why didn't you answer every one of my questions, then? I clearly wish to see the answer to the ones that were left unanswered
<notk0>
Schadenfreude, I don't remember witch questions were left unanswered, could you perhaps ask them again?
pangoafk is now known as pango
<Schadenfreude>
will you answer them?
<notk0>
Schadenfreude, I cannot predict the future, but if you ask I will try to answer
chambart has joined #ocaml
<Schadenfreude>
my former question is void now, seeing your current attitude, but I would like to ask you: why are you having this discussion in a channel that's clearly labeled as topical?
<notk0>
Schadenfreude, quite a difficult question, It means I have to know what actions lead me to this state, I am having this conversation because it evolved this way from the time I joined this channel until now
<Schadenfreude>
don't you remember your past actions?
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
<notk0>
Schadenfreude, I remember some of them
<Schadenfreude>
just some? does your memory serve you well?
<notk0>
Schadenfreude, I think my memory serves me well, I don't think anyone remembers everything (from their past actions)
nonickrightnow has joined #ocaml
The_third_man has quit []
The_third_man has joined #ocaml
<nonickrightnow>
I want to compile an existing code to javascript and run on a browser (with some additional javascript code), with either js_of_ocaml or ocamljs.the program reads values from stdin and outputs to stdout. I need either a javascript function to provide values to "stdin" (and read from "stdout") or somehow modify my code. any suggestions?
<nonickrightnow>
maybe there is an implementation of the stdin/stdout interface suitable to run on browsers
<thelema>
nonickrightnow: I think there's a javascript console...
ocp has quit [Ping timeout: 244 seconds]
<thelema>
but I dunno how js_of_ocaml interacts with that
<nonickrightnow>
thelema, exactly, I want to combine my code with some of those in-browser console
<nonickrightnow>
mfp, nice, thanks
<nonickrightnow>
thelema, the issue would be, those consoles are pure javascript code. I want a way to interface my stdin/stdout program (that will run as javascript in the browser) to them
<Schadenfreude>
notk0: can you prove this point of view?
<notk0>
Schadenfreude, a point of view required proving?
<nonickrightnow>
mfp, and btw, print_int works on tryocaml..
<Schadenfreude>
it doesn't deserve to exist if you cannot prove it, does it?
<nonickrightnow>
Schadenfreude, said the intuitionist extremist
<nonickrightnow>
intuitionistic* perhaps
<notk0>
nonickrightnow, because tryocaml emulates a console in javascript, and it's made to work with the ocaml compiled in javascript
<notk0>
Schadenfreude, what do you mean deserve? from my local point of view I can prove anything to myself, outside of that I can't prove anything
mcclurmc_ has joined #ocaml
<Schadenfreude>
nonickrightnow: said the personal attacker
<Schadenfreude>
notk0: why are you trying to prove something to me?
<nonickrightnow>
notk0, does it implement its own print_int (or some low-level concept like a descriptor)? or is this in-browser stdin/stdout implemented by js_of_ocaml?
pippijn has joined #ocaml
<pippijn>
hi al
<pippijn>
l
<notk0>
nonickrightnow, I don't know the details, but I assume it just redefines stdin and stdout to some javascript functions
<notk0>
Schadenfreude, I am not trying to prove anything to you
<Schadenfreude>
notk0: why are you continuing this dispute, then?
<notk0>
Schadenfreude, are we disputing something?
<Ptival>
pippijn: what's the point of "= function | n ->" ?
<Ptival>
instead of just "n ="
<pippijn>
without repeating the function names in every function
<pippijn>
Ptival: there will be other stuff coming in there
<pippijn>
it's not about those
<Ptival>
ok
nibnbjhsasdfgh has joined #ocaml
Xorite has joined #ocaml
twittard has quit [Quit: twittard]
<pippijn>
it's about the Visit.mutate* calls
Xorite has left #ocaml []
<nibnbjhsasdfgh>
oh okay thanks
<Schadenfreude>
notk0: aren't you?
<notk0>
Schadenfreude, I don't know, right now I don't think I am
<nibnbjhsasdfgh>
notk0 you troll
<notk0>
nibnbjhsasdfgh, pardon me?
<nibnbjhsasdfgh>
you were removed from #python for a reason
<notk0>
nibnbjhsasdfgh, but I am in #python
<nibnbjhsasdfgh>
no you were banned
<thelema>
pippijn: let an_funs nm = let rec assign_names_decl = ... and assign_names_expr = ... ... and assign_struct = (assign_names_decl, assign_names_expr, assign_names_stmt, assign_names_type) in ...
<pippijn>
oh
<thelema>
and use Visit.mutate_stmt assign_struct
<pippijn>
that works?
<nibnbjhsasdfgh>
qrntz told me
<pippijn>
let me check
<thelema>
pippijn: double check, plz. I think it does
<notk0>
nibnbjhsasdfgh, I am in python right now
<nibnbjhsasdfgh>
no
<nibnbjhsasdfgh>
uch
nibnbjhsasdfgh has left #ocaml []
<_habnabit>
haha welp
<Ptival>
what's Visit?
<thelema>
Ptival: I assume it's some visitor pattern
<thelema>
Ptival: a tree traversal.
<pippijn>
thelema: yup
<pippijn>
I tried something similar, but failed, then I thought it didn't work
<Ptival>
anyway why am I trying to understand side-effectful code =__=
<pippijn>
Ptival: side-effect?
<thelema>
Ptival: what's to understand? arguments are evaluated right to left
<pippijn>
ah yeah
<pippijn>
that one does have side effects
milosn has quit [Read error: No route to host]
<Ptival>
I see "mutate" and "assign" :p
<Ptival>
and "ref"
<pippijn>
the only side effect is a counter being incremented
<Ptival>
ok, I was misled by naming
<pippijn>
yes
<pippijn>
mutate shouldbe called map
<nonickrightnow>
and ocamljs? can I have a browser implementation of stdin/stdout with it? (and btw, which one is "lighter"? I suppose ocamljs will have better performance, but not entirely sure)
<Ptival>
ok you're mutating all the nodes of an AST to add stuff
<Ptival>
replacing a -> b -> c -> d by a * b * c * d ?
<pippijn>
yes
<pippijn>
I did that
<Ptival>
how is that valid!?
<pippijn>
that's fine, because I will never partially apply that
<kmacy>
typechecking doesn't cover the number of free variables in a closure does it? e.g. one path through a function can return a closure with 2 free variable and another with 3 free variables, right?
<pippijn>
the visitor functions always come in a group
<Ptival>
oh, so you changed the code of mutate_*
<pippijn>
yes
<Ptival>
k got it
<Ptival>
I thought you couldn't do that :)
<pippijn>
it's all mine :)
<pippijn>
and yes, I should call it "map" or something
<Ptival>
at this point I'd probably use a record
<pippijn>
maybe a good idea
<Ptival>
a "traversal kit" as I've read before
<nonickrightnow>
I have to go, bye
nonickrightnow has quit [Quit: Leaving]
<Ptival>
well, now that your problem has been solved ten minutes ago, I can say that I understand it!
<pippijn>
:)
milosn has joined #ocaml
<pippijn>
by the way, I found that the C language parsing "lexer hack" is an even worse hack on ocamlyacc/ocamllex
<pippijn>
with bison/flex it's at least reentrant
<pippijn>
because ocamlyacc/lex can only talk in one direction
<pippijn>
so it needs global mutable data :(
<Ptival>
there are other solutions to that problem
milosn has quit [Read error: Connection reset by peer]