<Drakken>
everyonemines I'm more familiar with Lisp macros.
<Drakken>
But this stuff about transforming code sounds like something that macros would be good for.
nixfreak has joined #ocaml
dnolen has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
struktured has joined #ocaml
arubin has quit [Quit: arubin]
brendan has quit [Ping timeout: 244 seconds]
sully has left #ocaml []
<smango>
http://pastie.org/2936588 it says syntax error on line 7 but I have no clue why, line 7 looks just like every line above it
<_habnabit>
Queue isn't a type; it's a module
<_habnabit>
you probably mean Queue.t
<everyonemines>
You could do type queue = Queue.t if that's less confusing.
<_habnabit>
(nearly everything follows the Module.t convention though)
<everyonemines>
Yes, true.
<smango>
got it, thanks :)
everyonemines has quit [Quit: Leaving.]
<smango>
sorry, have another syntax error I can't figure out, I think I might be using try...with wrong http://pastie.org/2936680
<smango>
ah nevermind I got it
dnolen has quit [Quit: dnolen]
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
dnolen has joined #ocaml
sebz has joined #ocaml
ijp has quit [Quit: (when (sleepy? *me*) (irc-quit))]
ankit9 has quit [Remote host closed the connection]
hto has joined #ocaml
brendan has joined #ocaml
ulfdoz has joined #ocaml
dnolen has quit [Quit: dnolen]
sebz has quit [Quit: Computer has gone to sleep.]
ankit9 has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
nixfreak has quit [Ping timeout: 252 seconds]
EmmanuelOga has quit [Ping timeout: 244 seconds]
sebz has joined #ocaml
JdpB42 has joined #ocaml
ikaros has joined #ocaml
<JdpB42>
anyone have experience with ocsigen?
<JdpB42>
how was it lately?
<taupin>
hard to install and to use, funny to play with
<JdpB42>
looks like it has a new website
<taupin>
(you should also join #ocsigen)
<JdpB42>
i think some of the docs were improved
<taupin>
(oh, you did, nevermind)
<JdpB42>
hehe
<taupin>
JdpB42: Ocsigen is a surprising framework ; the demo application (Graffiti) is a complicated and advanced example, but on the other hand the framework really lacks libraries to build more traditional websites
<JdpB42>
i see
<JdpB42>
i do mostly php honeslty for work
<JdpB42>
always liked ocaml
<JdpB42>
taupin: hmmm
ftrvxmtrx has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
<JdpB42>
taupin: everyone complains about php ....but honestly besides python and ruby there isn't much competition ....this thing seems heavily over thought
testcocoon has joined #ocaml
<_habnabit>
php is dying, at least
ttamttam has joined #ocaml
Cyanure has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
ankit9 has quit [Ping timeout: 248 seconds]
edwin has joined #ocaml
Kakadu has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
<JdpB42>
_habnabit: it is?
<_habnabit>
oh yes. lots of momentum away from it and towards saner languages.
<JdpB42>
_habnabit: php is still the most popular web language there is ....and many php projects are growing steadily
<_habnabit>
well on its way to being a legacy-development-only language.
<JdpB42>
that is incorrect, if anything rails and django have lost momentum in the past year or so
<_habnabit>
what's a 'web language'? if your choices are between, like, php and coldfusion then okay
<JdpB42>
how can you say that when for instance Drupal for instance is the most widely used CMS right now ....that wasn't true 3 years ago ....now its being used by some of the top sites on the internet
<JdpB42>
i'm just playing devils advocate ...not trying to disagree
<_habnabit>
no, seriously. what's a 'web language'
<JdpB42>
stop it
<JdpB42>
_habnabit: i will not be belittled
<_habnabit>
I want to know what you meant by that
<JdpB42>
php is a general purpose programming language that leans heavily towards web
<JdpB42>
^^
<_habnabit>
ha ha, no, php is not general-purpose.
<JdpB42>
....
<JdpB42>
that is not true
<_habnabit>
of course it's general purpose! that's why you have to wrap all of your CLI programs and libraries in <?php tags
<JdpB42>
....so go change the wiki
<JdpB42>
i mean ...look ...its not as used as a general purpose like that because its mostly a web based language
<JdpB42>
it was designed for that purpose
<_habnabit>
yes. 'designed for that purpose'. you can abuse it to do 'general purpose' things.
<_habnabit>
you can't be designed for a purpose and general purpose
<JdpB42>
i don't get emotional with langauges btw ...i'm agnostic ...i like python, i like ruby, i like php
<JdpB42>
but to say php is becoming legacy is insane!!!
thomasga has joined #ocaml
<JdpB42>
top sites on the internet are php, java, and .net .....php is still a major player
<JdpB42>
and in some ways for good reasons
<_habnabit>
sure, and lots of business code is still written in COBOL and FORTRAN
<JdpB42>
its not even something you can compare like that
<JdpB42>
PHP is still modern and continues to evolve
<JdpB42>
you seem to have a hate .....again emotional
<JdpB42>
don't get emotional over programming languages ....
<_habnabit>
yes, because I've seen too many people brain damaged by php. it's an objectively bad language that does nothing but harm new programmers.
<JdpB42>
Python has its fair share of web development pains
<JdpB42>
well i'm not new by any means, i guess i was sparred
<JdpB42>
spared*
<JdpB42>
but again many of the most popular websites developed *today* are still being written in PHP
<JdpB42>
look at all the php frameworks , cake, codeigniter, symfony >> all have user bases much larger than python and ruby frameworks of the same type
<JdpB42>
not to mention the cms framework systems like drupal ....which has a community probably 2-4x the size of django per se
<_habnabit>
you do understand how legacy development works, right? there's been enough time sunk into an existing thing that it takes less effort to continue using the same language and code base.
<_habnabit>
also where are you getting these numbers
<JdpB42>
which?
rby has joined #ocaml
<_habnabit>
"user bases much larger", "a community probably 2-4x the size", etc.
<JdpB42>
have you not been paying attention to the popularity of Drupal? had what the largest conference in north america last year for technolgoy outside of oreilly or something like that?
<JdpB42>
whitehouse.gov ... << drupal ....ebay uses it ....amazon uses it heavily ....etc etc
<JdpB42>
and drupal continually gets more and more popular
<JdpB42>
django and rails per se ....have went on a decline because people figured out it wasn't the langauge nor framework that made it special ...it was purely mvc and a good framework
<JdpB42>
which many languages have implemented
<JdpB42>
_habnabit: again i'm not over here defending php as a great language of the future ....I'm just saying ....lying to make yourself feel better does not make it true
<JdpB42>
now with facebook doing all that stuff with php and working with core dev's and stuff ...its sorta helped php core development alot
<JdpB42>
PHP has a ton of life left in it
<_habnabit>
okay? inventing numbers doesn't make it true either
<JdpB42>
go look at for one just the irc room in general
<JdpB42>
#drupal and #drupal-support and #drupal-contribute and #drupal-themes
<JdpB42>
combined these all have more users than probably all python frameworks combined
<JdpB42>
and thats just one framework
<_habnabit>
'combined' doesn't make any sense; users can be in multiple channels.
<JdpB42>
drupal channels do not usually work like that
<JdpB42>
which is why they split them up heavily
<JdpB42>
django still does not have one huge example behind it really
<JdpB42>
and i like django
<JdpB42>
but they overcomplicated many aspects of it
<_habnabit>
django is terrible.
<JdpB42>
and the other ones which are lighter , werk and pylons etc ...are not rad enough to make them practical for many companies
<JdpB42>
people don't want to reinvent the wheel anymore _habnabit
<_habnabit>
werkzeug is not a framework and pylons has been superseded.
<JdpB42>
pyramid or what not , i remember
<taupin>
JdpB42: I'm not arguing wether OCaml is a better technology for web development or not
ikaros has quit [Remote host closed the connection]
<JdpB42>
_habnabit: i prefer python over php btw
<taupin>
JdpB42: OCaml is a well-designed language, and Ocsigen gives me the ability to use it for web programming
<JdpB42>
but framework wise, they have all lost popularity to some degree, django more than others probably ....eventually they will just be like zope
<_habnabit>
also #python has twice as many users as ##php
<JdpB42>
a smaller dedicated base
<taupin>
but it's only a personal thought, you know :)
<_habnabit>
even #rubyonrails has more people in it than #django
<_habnabit>
er
<_habnabit>
than ##php
<JdpB42>
btw ....
<JdpB42>
the ##php channel is not a place most php go ....usually goto the sub channels because they dont allow any talk but *core* php and you learn that quickly
<_habnabit>
also #rubyonrails has more users than all of those drupal channels you mentioned combined
<_habnabit>
#django has more than #drupal-support, too
<_habnabit>
ha. even #go-nuts has more users than #drupal-support
<JdpB42>
uhh
<JdpB42>
are you cherry picking _habnabit
<JdpB42>
#drupal itself has 513
<_habnabit>
what would I be cherry picking
<JdpB42>
which is the main one ...support is for more involved stuff / longer convo's
<_habnabit>
I don't see that on the channel list
ftrvxmtrx has quit [Remote host closed the connection]
<JdpB42>
also as i said #codeigniter #zftalk etc etc ....add them up ....its all besides the point ...if you believe python is more popular than php right now for web ...thats fine
<_habnabit>
pretty sure I never said that, but okay !
<JdpB42>
seems that what you were implying
<_habnabit>
what did I say that even remotely implied that
<JdpB42>
i would say Drupal is the most single popular web "thing" out right now ...above any framework or anything
<_habnabit>
I'm a professional ocaml developer and I make more than any php developer I know :V
ikaros has joined #ocaml
<JdpB42>
what is that if i may ask?
<JdpB42>
2ndly you know how rare it is to have an ocaml job? jeesh
<_habnabit>
yes, exactly
<JdpB42>
you would only get that through someone in here or knowing someone etc
<JdpB42>
being a contractor i would starve once again
<JdpB42>
although i do like ocaml .....i would saying for doing web dev i would prefer php ....much less headaches if done correctly ....this eliom makes my head hurt
pcjoby has quit [Read error: Connection reset by peer]
f[x] has quit [Ping timeout: 258 seconds]
Kakadu has quit [Ping timeout: 265 seconds]
pierrc has left #ocaml []
jonludlam has joined #ocaml
f[x] has joined #ocaml
jonludlam has quit [Client Quit]
pcjoby has joined #ocaml
pcjoby has quit [Client Quit]
pcjoby has joined #ocaml
ijp has joined #ocaml
jonludlam has joined #ocaml
Kakadu has joined #ocaml
<Kakadu>
Yeah! Internet is up again
<Kakadu>
adrien: have I missed something?
probst has quit [Quit: probst]
bwright has joined #ocaml
<yezariaely>
Kakadu: As I was online all the time: no you did not
<Kakadu>
yezariaely: thx
EmmanuelOga has joined #ocaml
merijn has joined #ocaml
<merijn>
Does ocaml support GADTs?
<Kakadu>
merijn: from version 3.12 afair
<Kakadu>
merijn: from version 3.13 afair
<merijn>
Kakadu: ok, thanks
rby has quit [Ping timeout: 260 seconds]
merijn has left #ocaml []
rby has joined #ocaml
merijn has joined #ocaml
nixfreak has joined #ocaml
<merijn>
hmm, is there any tutorial/guide for ocaml's GADT syntax? I can't seem to find anything useful using Google
<merijn>
The GADT stuff I find uses a syntax like "type _ t = Lit : 'a -> 'a t", but this produces a syntax error for me and I can't find whether I need to use different syntax, add some flag to the compiler or whatever
<merijn>
nixfreak: Yeah, that was the first site I found and tried, but that produces a syntax error. Thanks anyway
thomasga has quit [Quit: Leaving.]
iris1 has quit [Quit: iris1]
jamii has joined #ocaml
<adrien>
Kakadu: had to leave; also I had the issue too and don't really have an idea
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
nixfreak has quit [Ping timeout: 260 seconds]
struktured has quit [*.net *.split]
<mbac>
scumbag omake
<mbac>
says it has N files to compile
<mbac>
INCREASES THE NUMBER WHILE COMPILING
<f[x]>
discovers dynamic dependencies
struktured has joined #ocaml
<adrien>
Kakadu: haven't found but when did the error started to appear?
<adrien>
is it a regression or does it stem from a new feature?
<adrien>
Kakadu: also, see http://git.tukaani.org/?p=xz.git;a=blob;f=configure.ac;hb=HEAD#l632 : you should enable all possible warnings for your bindings, it'll help: compared to this list, remove -Wstrict-prototypes and -Wbad-function-cast and add -Woverloaded-virtual -Wsign-promo
<adrien>
Kakadu: ok, will take a look when I come back
hashpuppy has quit [Quit: hashpuppy]
probst has joined #ocaml
<adrien>
also, do you have a bindings that are hand-written? something like three classes which inherit from each others and two methods in each
merijn has left #ocaml []
<adrien>
it could be useful to pinpoint issues earlier
<adrien>
s/earlier/better/
<Kakadu>
I think lablqt/inher is the closest example to your definition
<Kakadu>
adrien: ^^
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
Cyanure has quit [Ping timeout: 240 seconds]
<adrien>
Kakadu: does it have the issue?
<Kakadu>
no
<Kakadu>
I'm suprised why QWidget_twin.h doesn't have this issue, but QSpinBox_twin.h do
nixfreak has joined #ocaml
khia0 has joined #ocaml
khia0 has left #ocaml []
larhat has quit [Quit: Leaving.]
Kakadu has quit [Quit: Page closed]
sebz has joined #ocaml
probst has quit [Quit: probst]
raichoo has quit [Quit: leaving]
probst has joined #ocaml
f[x] has quit [Ping timeout: 258 seconds]
bwright has quit [Quit: leaving]
f[x] has joined #ocaml
f[x] has quit [Read error: Operation timed out]
bwright has joined #ocaml
bwright has quit [Quit: leaving]
Kakadu has joined #ocaml
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 240 seconds]
yezariaely has quit [Quit: Leaving.]
Drakken has left #ocaml []
lopex has quit [Excess Flood]
joewilliams has quit [Ping timeout: 258 seconds]
Drakken has joined #ocaml
joewilliams has joined #ocaml
bwright has joined #ocaml
probst has quit [Quit: probst]
lopex has joined #ocaml
ankit9 has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
<zorun>
nixfreak: pong
bwright has quit [Quit: leaving]
Drakken has left #ocaml []
Drakken has joined #ocaml
ttamttam has quit [Remote host closed the connection]
<zorun>
nixfreak: still having trouble building ocsigen?
avsm has joined #ocaml
avsm has quit [Client Quit]
Drakken has left #ocaml []
hto_ has joined #ocaml
hto__ has joined #ocaml
hto has quit [Quit: Lost terminal]
hto_ has quit [Client Quit]
hto__ has quit [Client Quit]
hto has joined #ocaml
raichoo has joined #ocaml
hto has quit [Client Quit]
Drakken has joined #ocaml
hto has joined #ocaml
jamii has quit [Read error: Connection reset by peer]
sebz has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Ping timeout: 248 seconds]
f[x] has joined #ocaml
sepp2k has joined #ocaml
<adrien>
ouch: mono hurts
<adrien>
"let x = 42;;" in the toplevel of f# takes 1 to 2 seconds to run on my laptop the first time it's executed
<adrien>
and defining a non-tail-rec version of the factorial takes more than 2 seconds, maybe more than 3
<taupin>
I once found a (correct) OCaml code that made Mono crash :]
<adrien>
I had mono crash during build at first actually
<adrien>
their 2.10.2 version (or something like that) wasn't good
<thelema>
thanks for reminding me why I use ocaml and not F#
<adrien>
I'll have to do ".net" tomorrow
<adrien>
figured I'd better do F# on mono on my slackware install instead of C# on the .net framework on windows on a computer that isn't mine
sebz has joined #ocaml
<adrien>
hahaha: "type t = | Int of int | Float of float;;" triggered 3 seconds of CPU time :P
as has joined #ocaml
<adrien>
it's actually quite depressing and frustruatin: I got used to ocaml's speed of interpreting/compiling
ulfdoz has joined #ocaml
ikaros has joined #ocaml
Anarchos has joined #ocaml
abdallah has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
<abdallah>
type ('a, 'b) choice = Left of 'a | Right of 'b
<abdallah>
let map_left f t = match t with | Left a -> Left (f a) | Right _ -> t
<abdallah>
The previous function doesn't type.
<abdallah>
Or rather it does not with the type I'd like to have which is "('a -> 'c) -> ('a, 'b) t -> ('c, 'b) t"
<abdallah>
The inferred type is "('a -> 'a) -> ('a, 'b) t -> ('a, 'b) t"
<abdallah>
I think I understand why this is happening (btw I'm using 3.11).
<abdallah>
The solution to have the correct type is to replace "| Right _ -> t" with "| Right b -> Right b"
<abdallah>
I think it makes one more allocation so it might be undesirable for very efficient code.
<abdallah>
Is there any better solution in ocaml 3.11?
<abdallah>
Is there any better solution in ocaml 3.13 with gadts? (I think so, but I haven't fully understood gadts yet)
<abdallah>
(I asked this question yesterday, but I didn't get any answer yet)
joewilliams has quit [Max SendQ exceeded]
superbobry has quit [Ping timeout: 244 seconds]
<_habnabit>
abdallah, worry about it when it's slow
<thelema>
abdallah: There's a solution in 3.11 involving obj.magic-ing t to make the types work out
<abdallah>
Ok, I see.
<abdallah>
But if the function map_left was more complicated, I would probably not want to trust my using of Obj.magic.
<adrien>
I don't know why but using this seems to work for me (disclaimer: my eyes might be off): | Right _ as t -> t
<thelema>
abdallah: I don't know enough about GADTs to know how to fix this with them, but I think this is possible
<abdallah>
Yes, it seems very plausible
<adrien>
(I mostly used that because I used the function -> construct instead of explicitly naming the t parameter)
<_habnabit>
adrien, yeah, I was going to try that next
<_habnabit>
and yes, it does fix it
<_habnabit>
# let map_left: 'a 'b 'c. ('a -> 'b) -> ('a, 'c) choice -> ('b, 'c) choice = fun f t -> match t with | Left a -> Left (f a) | Right _ as t -> t;;
<thelema>
adrien: hmm, if that works, it's probably the right solution
sebz has quit [Quit: Computer has gone to sleep.]
<abdallah>
Oh perfect thanks!
<abdallah>
I didn't think about using "as" to avoid reconstructing the term, also I use it often in other situations...
<adrien>
now, if someone had an explanation...
<adrien>
bedtime :P
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
testcocoon has quit [Client Quit]
testcocoon has joined #ocaml
zorun has quit [Read error: Connection reset by peer]
zorun has joined #ocaml
testcocoon has quit [Client Quit]
testcocoon has joined #ocaml
_andre has quit [Quit: leaving]
testcocoon has quit [Client Quit]
testcocoon has joined #ocaml
superbobry has joined #ocaml
testcocoon has quit [Client Quit]
f[x] has quit [Ping timeout: 244 seconds]
testcocoon has joined #ocaml
f[x] has joined #ocaml
testcocoon has quit [Client Quit]
testcocoon has joined #ocaml
testcocoon has quit [Client Quit]
testcocoon has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
as has quit [Quit: Leaving]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
nixfreak has quit [Ping timeout: 255 seconds]
raichoo has quit [Quit: leaving]
srcerer has joined #ocaml
merijn has joined #ocaml
<merijn>
The only way to force certain types on the compiler is to specify the in a .mli file (which is not used by the REPL), right?
<thelema>
merijn: in 3.12, polymorphic types can be forced
<thelema>
merijn: the .mli file just specifies a module signature - this functionality is available in the REPL, although is a bit cumbersome
<merijn>
thelema: You mean the inline type annotations?
<thelema>
for the first, yes
<merijn>
Basically I'm writing some basic parser combinator style stuff and defined a "type 'a parser = string -> ('a option * string)", but the type checker of course uses the inferred "'a -> ('b option * 'a)" type for all functions. Since this is for some beginners I wanted to force it to use the 'a parser types to make the signatures easier to read for newbies
<thelema>
oh, that's not so bad...
<thelema>
let foo : 'a parser = fun str -> ...
<thelema>
this is supported pre 3.12 even
<merijn>
thelema: That works for simple ones, but if you combine them it becomes really hard to read the inline types :\